@abtnode/blocklet-services 1.16.42-beta-20250416-010627-a89e72e0 → 1.16.42

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 (81) hide show
  1. package/dist/assets/{access-control-7Ih10vY9.js → access-control-URJ2ACEE.js} +1 -1
  2. package/dist/assets/{add-component-core-DRJSzr-6.js → add-component-core-YuQ3TiFu.js} +1 -1
  3. package/dist/assets/{add-resource-VgacdokL.js → add-resource-DJW7iUoP.js} +1 -1
  4. package/dist/assets/{advanced-a-1InjKG.js → advanced-6m9VnipD.js} +1 -1
  5. package/dist/assets/{appearance-BWtF9DZd.js → appearance-Ks2n1JJ9.js} +1 -1
  6. package/dist/assets/{audit-logs-DqFf6jS-.js → audit-logs-CyUffLP5.js} +1 -1
  7. package/dist/assets/{authorize-BKpxW7YW.js → authorize-DCUCKc1-.js} +1 -1
  8. package/dist/assets/{branding-DoPxX3nU.js → branding-Cag0aDCR.js} +2 -2
  9. package/dist/assets/{branding--Qk4aIi4.js → branding-Dv6KIot-.js} +1 -1
  10. package/dist/assets/{bundle-avatar-DNxC8z4b.js → bundle-avatar-CSEBu3MU.js} +1 -1
  11. package/dist/assets/{complete-Cnzbqj4O.js → complete-BorStSwi.js} +1 -1
  12. package/dist/assets/{component-BBRNk4Tr.js → component-CGuQ2QSk.js} +1 -1
  13. package/dist/assets/{config-Ba-WdcGO.js → config-Co9p5iPr.js} +1 -1
  14. package/dist/assets/{config-navigation-CDw3CW3J.js → config-navigation-aTpclkWb.js} +3 -3
  15. package/dist/assets/{config-space-CSSDG-WO.js → config-space-Bc3ndGw-.js} +1 -1
  16. package/dist/assets/{confirm-BX8_-j-l.js → confirm-Fhl5qi_m.js} +1 -1
  17. package/dist/assets/{connect-ByA6PdRd.js → connect-Dds1wvN9.js} +1 -1
  18. package/dist/assets/connect-DigT1D00.js +5 -0
  19. package/dist/assets/{connect-to-yIsMDJbM.js → connect-to-BMDSElVg.js} +1 -1
  20. package/dist/assets/{dashboard-oxsbu66O.js → dashboard-D3KvORmC.js} +3 -3
  21. package/dist/assets/{delete-confirm-C0cAQSXq.js → delete-confirm-Dtzz6Jaz.js} +1 -1
  22. package/dist/assets/domain-BSF-ZwXV.js +9 -0
  23. package/dist/assets/{domain-action-card-BKzC5bbv.js → domain-action-card-ZJ-cQ-aa.js} +2 -2
  24. package/dist/assets/domains-DjSbrUlR.js +1 -0
  25. package/dist/assets/{email-B9kMynU0.js → email-zgArXfS8.js} +1 -1
  26. package/dist/assets/{exchange-passport-CgO3iLVh.js → exchange-passport-O7J_1njm.js} +1 -1
  27. package/dist/assets/{fuel-C6fpJHcg.js → fuel-BFFqH-nX.js} +1 -1
  28. package/dist/assets/{gen-access-key-jNw5st5h.js → gen-access-key-DhAGvo8z.js} +1 -1
  29. package/dist/assets/{index-B64a4BbE.js → index-BLv5CM0y.js} +3 -3
  30. package/dist/assets/{index-C1H5SEVx.js → index-BVgoikAb.js} +1 -1
  31. package/dist/assets/{index-DKLLCs8G.js → index-Bv-pwUe7.js} +1 -1
  32. package/dist/assets/{index-DIckhHU5.js → index-Bx2tzf6d.js} +1 -1
  33. package/dist/assets/{index-8Co4tmLR.js → index-C0Yvp1nU.js} +4 -4
  34. package/dist/assets/{index-BSlpaPEE.js → index-C4aiK5ag.js} +1 -1
  35. package/dist/assets/{index-Cv9H4C1K.js → index-C6B-01xU.js} +1 -1
  36. package/dist/assets/{index-tjRN_EVx.js → index-CWohFZPl.js} +2 -2
  37. package/dist/assets/{index-EBUaBME3.js → index-CuQlnfwu.js} +1 -1
  38. package/dist/assets/{index-CNl-IhR2.js → index-DHEDtVhz.js} +1 -1
  39. package/dist/assets/{index-B5bNvBjf.js → index-DWue5FZ4.js} +1 -1
  40. package/dist/assets/{index-BP62CTBB.js → index-DkIEu7Lb.js} +1 -1
  41. package/dist/assets/{index-PfRsNX8F.js → index-DwLhvC8N.js} +1 -1
  42. package/dist/assets/{index-DyO7bYXp.js → index-GP_jFykV.js} +1 -1
  43. package/dist/assets/{index-BS5tohCn.js → index-bQ-8RhFL.js} +1 -1
  44. package/dist/assets/{index-CyBxUW5e.js → index-uHTdpm71.js} +1 -1
  45. package/dist/assets/{invitation-DVbBeS8B.js → invitation-D6DHxZjO.js} +1 -1
  46. package/dist/assets/{invite-t8rB5ZWZ.js → invite-DIncZ5ep.js} +1 -1
  47. package/dist/assets/{issue-passport-CSlA5ioP.js → issue-passport-DBIo8EtU.js} +1 -1
  48. package/dist/assets/{item--dgEgBvz.js → item-D8zBx1dJ.js} +1 -1
  49. package/dist/assets/{layout-B4YOjaNK.js → layout-DbKPqvnm.js} +1 -1
  50. package/dist/assets/{list-Bny5F0T2.js → list-BTx_8ZHD.js} +1 -1
  51. package/dist/assets/{log-CP1_Zl5R.js → log-BKrMj0yE.js} +1 -1
  52. package/dist/assets/{login-C8k7kmim.js → login-3U6j8E6s.js} +1 -1
  53. package/dist/assets/{logo-uploader-zhddoC5p.js → logo-uploader-CcwN1uWX.js} +2 -2
  54. package/dist/assets/{lost-passport-Croi_0xR.js → lost-passport-BbPQj08X.js} +1 -1
  55. package/dist/assets/{overview-C8MR_9r7.js → overview-DFc4LXLh.js} +1 -1
  56. package/dist/assets/{passport-item-DDktLU4q.js → passport-item-BEGCAq1O.js} +1 -1
  57. package/dist/assets/{publish-resource-tDbEc2CN.js → publish-resource-CrvVpn2O.js} +1 -1
  58. package/dist/assets/{relative-time-DESntOZH.js → relative-time-BBLaQUJf.js} +1 -1
  59. package/dist/assets/{runtime-8Gq50HDL.js → runtime-A09BTZXh.js} +1 -1
  60. package/dist/assets/{security-CRd92J54.js → security-DM8YTbEj.js} +1 -1
  61. package/dist/assets/setup-Bb0ZZK40.js +19 -0
  62. package/dist/assets/{start-Df0wvo1-.js → start-BrRd22Kx.js} +1 -1
  63. package/dist/assets/{status-D7e11K9q.js → status-Cyln1yDP.js} +1 -1
  64. package/dist/assets/{step-actions-BAf7tRyq.js → step-actions-BnMmi82x.js} +1 -1
  65. package/dist/assets/{traffic-Brsh4OZD.js → traffic-CjCHxLye.js} +1 -1
  66. package/dist/assets/{transfer-CBAuvpGA.js → transfer-BYeu2CqJ.js} +1 -1
  67. package/dist/assets/{unsubscribe-Cyuj6w2n.js → unsubscribe-D7OPmQBG.js} +1 -1
  68. package/dist/assets/useAsync-DKE0K0bz.js +1 -0
  69. package/dist/assets/{useAsyncRetry-k063P8TB.js → useAsyncRetry-BBomZj1z.js} +2 -2
  70. package/dist/assets/{user-center-DOyIfHWq.js → user-center-BdWhBs4v.js} +1 -1
  71. package/dist/assets/{util-C9b90o5T.js → util-rMFbd0lA.js} +1 -1
  72. package/dist/assets/{wrap-locale--aKPMOdK.js → wrap-locale-DgmlMdxX.js} +1 -1
  73. package/dist/index.html +1 -1
  74. package/dist/service-worker.js +1 -1
  75. package/package.json +21 -21
  76. package/dist/assets/connect-DBfZH_8M.js +0 -5
  77. package/dist/assets/domain-BB7h2xMD.js +0 -9
  78. package/dist/assets/domains-CQPZJx98.js +0 -1
  79. package/dist/assets/setup-DXwqTfxV.js +0 -19
  80. package/dist/assets/useAsync-BmW5cnbx.js +0 -1
  81. package/dist/assets/useAsync-DkPaceIy.js +0 -1
@@ -1,4 +1,4 @@
1
- import{e as E,j as e,aa as c,bo as g,bu as h,bs as L,bv as N,H as y,ag as I}from"./vendor-mui-core-DxD1UA4o.js";import{r as m}from"./vendor-react-DoD83n6N.js";import{u as b,p as o,Y as j}from"./vendor-ux-did-connect-CiLSrCOH.js";import{A as O}from"./config-Dko9yBri.js";import{P}from"./page-header-Cu9lHawO.js";import{n as T,f as v,e as R}from"./index-tjRN_EVx.js";import{S as Y}from"./layout-B4YOjaNK.js";import{S as H}from"./step-actions-BAf7tRyq.js";import{S as D}from"./button-leITu2bm.js";import"./vendor-utils-CTIzdAFg.js";import"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-BtlDhznp.js";import"./content-layout-BM34AwsG.js";import"./use-mobile-CHMVa8_W.js";function C({onNext:a}){const S=E(),{t:n,locale:p}=b(),[i,l]=m.useState(!1),[f,d]=m.useState(""),{blocklet:r}=T();m.useEffect(()=>{var s;const t=v.findServiceFromMeta(r.meta,o.NODE_SERVICES.AUTH);d(((s=t==null?void 0:t.config)==null?void 0:s.whoCanAccess)||o.WHO_CAN_ACCESS.ALL)},[r]);const u=async t=>{let s=o.ACCESS_POLICY_PUBLIC;t===o.WHO_CAN_ACCESS.ALL?s=o.ACCESS_POLICY_PUBLIC:t===o.WHO_CAN_ACCESS.INVITED?s=o.ACCESS_POLICY_INVITED_ONLY:t===o.WHO_CAN_ACCESS.OWNER?s=o.ACCESS_POLICY_OWNER_ONLY:t===o.WHO_CAN_ACCESS.ADMIN&&(s=o.ACCESS_POLICY_ADMIN_ONLY);try{l(!0),await R.updateBlockletSecurityRule({input:{did:r.meta.did,data:{id:o.SECURITY_RULE_DEFAULT_ID,accessPolicyId:s}}}),l(!1)}catch(A){l(!1),j.error(A.message)}},x=async t=>{i||(d(t.target.value),await u(t.target.value))},_={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:S.palette.text.secondary};return e.jsxs(W,{children:[e.jsx(c,{className:"header",children:e.jsx(P,{title:n("blocklet.config.access.title"),subTitle:n("blocklet.config.access.description")})}),e.jsx(g,{component:"fieldset",children:e.jsx(h,{name:"inherit",value:f,onChange:x,children:O.map(t=>e.jsxs(c,{sx:{mb:2},children:[e.jsx(L,{value:t.value,control:e.jsx(N,{size:"small",color:"primary"}),label:e.jsxs("span",{style:{display:"flex",alignItems:"center",position:"relative"},children:[e.jsx(t.icon,{style:_}),e.jsx("span",{style:{marginTop:2},children:t.title[p]})]})}),e.jsx(c,{className:"tip",children:t.description[p]})]},t.value))})}),e.jsx(H,{mt:8,disabled:i,blocklet:r,onStartNow:()=>a("complete"),children:e.jsx(D,{loading:i,variant:"contained",disabled:i,onClick:()=>a(),children:n("setup.continue")})})]})}C.propTypes={onNext:y.func};C.defaultProps={onNext:()=>{}};const W=I(Y)`
1
+ import{e as E,j as e,aa as c,bo as g,bu as h,bs as L,bv as N,H as y,ag as I}from"./vendor-mui-core-DxD1UA4o.js";import{r as m}from"./vendor-react-DoD83n6N.js";import{u as b,p as o,Y as j}from"./vendor-ux-did-connect-CiLSrCOH.js";import{A as O}from"./config-Dko9yBri.js";import{P}from"./page-header-Cu9lHawO.js";import{n as T,f as v,e as R}from"./index-CWohFZPl.js";import{S as Y}from"./layout-DbKPqvnm.js";import{S as H}from"./step-actions-BnMmi82x.js";import{S as D}from"./button-leITu2bm.js";import"./vendor-utils-CTIzdAFg.js";import"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-BtlDhznp.js";import"./content-layout-BM34AwsG.js";import"./use-mobile-CHMVa8_W.js";function C({onNext:a}){const S=E(),{t:n,locale:p}=b(),[i,l]=m.useState(!1),[f,d]=m.useState(""),{blocklet:r}=T();m.useEffect(()=>{var s;const t=v.findServiceFromMeta(r.meta,o.NODE_SERVICES.AUTH);d(((s=t==null?void 0:t.config)==null?void 0:s.whoCanAccess)||o.WHO_CAN_ACCESS.ALL)},[r]);const u=async t=>{let s=o.ACCESS_POLICY_PUBLIC;t===o.WHO_CAN_ACCESS.ALL?s=o.ACCESS_POLICY_PUBLIC:t===o.WHO_CAN_ACCESS.INVITED?s=o.ACCESS_POLICY_INVITED_ONLY:t===o.WHO_CAN_ACCESS.OWNER?s=o.ACCESS_POLICY_OWNER_ONLY:t===o.WHO_CAN_ACCESS.ADMIN&&(s=o.ACCESS_POLICY_ADMIN_ONLY);try{l(!0),await R.updateBlockletSecurityRule({input:{did:r.meta.did,data:{id:o.SECURITY_RULE_DEFAULT_ID,accessPolicyId:s}}}),l(!1)}catch(A){l(!1),j.error(A.message)}},x=async t=>{i||(d(t.target.value),await u(t.target.value))},_={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:S.palette.text.secondary};return e.jsxs(W,{children:[e.jsx(c,{className:"header",children:e.jsx(P,{title:n("blocklet.config.access.title"),subTitle:n("blocklet.config.access.description")})}),e.jsx(g,{component:"fieldset",children:e.jsx(h,{name:"inherit",value:f,onChange:x,children:O.map(t=>e.jsxs(c,{sx:{mb:2},children:[e.jsx(L,{value:t.value,control:e.jsx(N,{size:"small",color:"primary"}),label:e.jsxs("span",{style:{display:"flex",alignItems:"center",position:"relative"},children:[e.jsx(t.icon,{style:_}),e.jsx("span",{style:{marginTop:2},children:t.title[p]})]})}),e.jsx(c,{className:"tip",children:t.description[p]})]},t.value))})}),e.jsx(H,{mt:8,disabled:i,blocklet:r,onStartNow:()=>a("complete"),children:e.jsx(D,{loading:i,variant:"contained",disabled:i,onClick:()=>a(),children:n("setup.continue")})})]})}C.propTypes={onNext:y.func};C.defaultProps={onNext:()=>{}};const W=I(Y)`
2
2
  height: 100%;
3
3
  overflow-y: auto;
4
4
  .header {
@@ -1,4 +1,4 @@
1
- import{a8 as Jc,j as a,H as B,a9 as Ft,ag as ut,aa as Q,T as xe,v as dn,bs as ho,bO as po,I as Ra,bG as Ia,bW as ka,A as Ca,bh as Qc,b5 as La,bq as Zc,O as ai,bB as eu,bC as tu,bD as nu,bx as ru,aj as ja,L as iu,b4 as ou,b2 as su,q as mo,ab as Na,ad as au,ak as pt,e as Xn,bH as lu,y as wr,Y as cu,a1 as Aa,M as Pa,bR as Da,am as uu,ah as un,bg as Ss,E as xs,a5 as du,P as fu,G as hu,w as pu,a6 as mu,D as gu,N as ws}from"./vendor-mui-core-DxD1UA4o.js";import{r as F,g as go,f as yu,k as vu,a as yo,e as ce,b as sn,l as bu}from"./vendor-react-DoD83n6N.js";import{j as Ba,d as Eu,S as Su,s as Ma,A as xu}from"./item--dgEgBvz.js";import{r as wu,B as xt,ak as vo,W as Fa,p as Ua,u as Ct,h as It,aF as Tu,aE as _u,l as li,b1 as Ou,am as $a,bi as Ts,ap as Ru,Y as bo,C as Iu,s as hn,X as ni,bj as ku,bk as Cu,bl as Lu,bm as ju,bn as Ha,bo as Nu,bp as Au,bq as Pu,br as Ka,bs as Du,bt as Bu,bu as Mu,bv as Wa,bw as Fu,bx as Uu,by as $u,bz as Eo,bA as Hu,bB as Ku,bC as Wu,bD as zu,bE as qu,aH as Vu,bF as Gu,bG as za,aw as _s,bH as Jr,d as So,b4 as qa,e as Va,_ as Xu,g as qi,bI as Yu,bJ as Ju}from"./vendor-ux-did-connect-CiLSrCOH.js";import{v as Os,c as Pt,w as Qu,E as ci,x as Zu,y as ed,z as td,L as nd,S as rd}from"./vendor-arcblock-BtlDhznp.js";import{L as Rs}from"./launch-result-message-Bvdtucih.js";import{P as Ga}from"./page-header-Cu9lHawO.js";import{c as St,p as id,B as rt,D as Vi,y as Vn,_ as Xa,s as od,A as sd,C as ad,a2 as ld,ac as cd,I as ud,o as wi,x as xo,Y as dd,ad as fd,ae as hd,af as pd,z as hr,ag as md,b as gd}from"./vendor-utils-CTIzdAFg.js";import{z as Yn,f as on,W as yd,X as vd,Y as bd,D as Ed,Z as Sd,_ as xd,$ as wd,C as ui,a0 as Ya,U as Td,a1 as _d,a2 as Od,a3 as Rd,a4 as Dr,a5 as Is,a6 as Id}from"./index-tjRN_EVx.js";import{u as kd,C as Cd}from"./config-space-CSSDG-WO.js";import{R as Ti}from"./logo-uploader-zhddoC5p.js";import{S as Ld}from"./index-CNl-IhR2.js";import{s as Ja,h as jd,w as Nd,f as Ad,a as Pd,b as Dd,c as Bd,M as Md}from"./index-O2l0NSUF.js";import{m as Tr,f as Fd,a as Ud,e as Qa,x as $d}from"./vendor-hooks-BwVH-TAd.js";import{g as Hd}from"./get-safe-url-ZRaKUVld.js";import{p as Kd}from"./index-C-7MyHbp.js";import{r as Wd}from"./cloneDeep-kMVNpUap.js";import{I as ks}from"./index-BRz2myBK.js";import{u as zd}from"./session-DaQ4KCFD.js";import{W as qd}from"./did-address-GAxLGeWB.js";import{_ as Za}from"./useLocalStorage-BXnF_60k.js";import{f as el}from"./format-error-LAoTjvJe.js";import{a as Cs}from"./api-3sG9at7i.js";import{d as Vd,a as Gd,v as Xd,e as Yd}from"./util-C9b90o5T.js";import{u as tl}from"./use-mobile-BHPd3bDQ.js";import{C as Jd}from"./content-layout-BM34AwsG.js";import{C as Qd,D as Zd,a as ef}from"./connect-to-yIsMDJbM.js";import{d as tf}from"./ArrowDropDown-DO9H_COV.js";import{d as nf}from"./ChevronLeft-BdrBCIFt.js";import{d as rf}from"./ChevronRight-CO9My6tF.js";const kb="blocklet-add-component-registry",Cb="server-add-registry",Lb=e=>`resource-${e}-add-registry`;var wo={},of=Jc;Object.defineProperty(wo,"__esModule",{value:!0});var nl=wo.default=void 0,sf=of(wu()),af=a;nl=wo.default=(0,sf.default)((0,af.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 rl(e){const{info:t}=Yn();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 To({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}To.propTypes={disabled:B.bool,children:B.any.isRequired,onConfirm:B.func.isRequired};To.defaultProps={disabled:!1};function _o({onContinue:e,nextDisabled:t,launching:n,texts:r,description:i}){const[o,s]=F.useState(!1),l=()=>s(d=>!d);return a.jsxs(a.Fragment,{children:[a.jsx(lf,{children:a.jsxs(To,{disabled:t,onConfirm:e,children:[a.jsx("div",{className:"eula-trigger",onClick:l,children:r.listenName}),a.jsx(xt,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?a.jsxs(a.Fragment,{children:[a.jsx(Ft,{size:14}),r.launchingText]}):r.buttonNext})]})}),a.jsx(vo,{open:o,title:r.listenName,onClose:()=>s(!1),children:i})]})}_o.propTypes={onContinue:B.func.isRequired,nextDisabled:B.bool,launching:B.bool,description:B.any,texts:B.object};_o.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const lf=ut.div`
1
+ import{a8 as Jc,j as a,H as B,a9 as Ft,ag as ut,aa as Q,T as xe,v as dn,bs as ho,bO as po,I as Ra,bG as Ia,bW as ka,A as Ca,bh as Qc,b5 as La,bq as Zc,O as ai,bB as eu,bC as tu,bD as nu,bx as ru,aj as ja,L as iu,b4 as ou,b2 as su,q as mo,ab as Na,ad as au,ak as pt,e as Xn,bH as lu,y as wr,Y as cu,a1 as Aa,M as Pa,bR as Da,am as uu,ah as un,bg as Ss,E as xs,a5 as du,P as fu,G as hu,w as pu,a6 as mu,D as gu,N as ws}from"./vendor-mui-core-DxD1UA4o.js";import{r as F,g as go,f as yu,k as vu,a as yo,e as ce,b as sn,l as bu}from"./vendor-react-DoD83n6N.js";import{j as Ba,d as Eu,S as Su,s as Ma,A as xu}from"./item-D8zBx1dJ.js";import{r as wu,B as xt,ak as vo,W as Fa,p as Ua,u as Ct,h as It,aF as Tu,aE as _u,l as li,b1 as Ou,am as $a,bi as Ts,ap as Ru,Y as bo,C as Iu,s as hn,X as ni,bj as ku,bk as Cu,bl as Lu,bm as ju,bn as Ha,bo as Nu,bp as Au,bq as Pu,br as Ka,bs as Du,bt as Bu,bu as Mu,bv as Wa,bw as Fu,bx as Uu,by as $u,bz as Eo,bA as Hu,bB as Ku,bC as Wu,bD as zu,bE as qu,aH as Vu,bF as Gu,bG as za,aw as _s,bH as Jr,d as So,b4 as qa,e as Va,_ as Xu,g as qi,bI as Yu,bJ as Ju}from"./vendor-ux-did-connect-CiLSrCOH.js";import{v as Os,c as Pt,w as Qu,E as ci,x as Zu,y as ed,z as td,L as nd,S as rd}from"./vendor-arcblock-BtlDhznp.js";import{L as Rs}from"./launch-result-message-Bvdtucih.js";import{P as Ga}from"./page-header-Cu9lHawO.js";import{c as St,p as id,B as rt,D as Vi,y as Vn,_ as Xa,s as od,A as sd,C as ad,a2 as ld,ac as cd,I as ud,o as wi,x as xo,Y as dd,ad as fd,ae as hd,af as pd,z as hr,ag as md,b as gd}from"./vendor-utils-CTIzdAFg.js";import{z as Yn,f as on,W as yd,X as vd,Y as bd,D as Ed,Z as Sd,_ as xd,$ as wd,C as ui,a0 as Ya,U as Td,a1 as _d,a2 as Od,a3 as Rd,a4 as Dr,a5 as Is,a6 as Id}from"./index-CWohFZPl.js";import{u as kd,C as Cd}from"./config-space-Bc3ndGw-.js";import{R as Ti}from"./logo-uploader-CcwN1uWX.js";import{S as Ld}from"./index-DHEDtVhz.js";import{s as Ja,h as jd,w as Nd,f as Ad,a as Pd,b as Dd,c as Bd,M as Md}from"./index-O2l0NSUF.js";import{m as Tr,f as Fd,a as Ud,e as Qa,x as $d}from"./vendor-hooks-BwVH-TAd.js";import{g as Hd}from"./get-safe-url-ZRaKUVld.js";import{p as Kd}from"./index-C-7MyHbp.js";import{r as Wd}from"./cloneDeep-kMVNpUap.js";import{I as ks}from"./index-BRz2myBK.js";import{u as zd}from"./session-DaQ4KCFD.js";import{W as qd}from"./did-address-GAxLGeWB.js";import{_ as Za}from"./useLocalStorage-BXnF_60k.js";import{f as el}from"./format-error-LAoTjvJe.js";import{a as Cs}from"./api-3sG9at7i.js";import{d as Vd,a as Gd,v as Xd,e as Yd}from"./util-rMFbd0lA.js";import{u as tl}from"./use-mobile-BHPd3bDQ.js";import{C as Jd}from"./content-layout-BM34AwsG.js";import{C as Qd,D as Zd,a as ef}from"./connect-to-BMDSElVg.js";import{d as tf}from"./ArrowDropDown-DO9H_COV.js";import{d as nf}from"./ChevronLeft-BdrBCIFt.js";import{d as rf}from"./ChevronRight-CO9My6tF.js";const kb="blocklet-add-component-registry",Cb="server-add-registry",Lb=e=>`resource-${e}-add-registry`;var wo={},of=Jc;Object.defineProperty(wo,"__esModule",{value:!0});var nl=wo.default=void 0,sf=of(wu()),af=a;nl=wo.default=(0,sf.default)((0,af.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 rl(e){const{info:t}=Yn();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 To({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}To.propTypes={disabled:B.bool,children:B.any.isRequired,onConfirm:B.func.isRequired};To.defaultProps={disabled:!1};function _o({onContinue:e,nextDisabled:t,launching:n,texts:r,description:i}){const[o,s]=F.useState(!1),l=()=>s(d=>!d);return a.jsxs(a.Fragment,{children:[a.jsx(lf,{children:a.jsxs(To,{disabled:t,onConfirm:e,children:[a.jsx("div",{className:"eula-trigger",onClick:l,children:r.listenName}),a.jsx(xt,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?a.jsxs(a.Fragment,{children:[a.jsx(Ft,{size:14}),r.launchingText]}):r.buttonNext})]})}),a.jsx(vo,{open:o,title:r.listenName,onClose:()=>s(!1),children:i})]})}_o.propTypes={onContinue:B.func.isRequired,nextDisabled:B.bool,launching:B.bool,description:B.any,texts:B.object};_o.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const lf=ut.div`
2
2
  margin: 0 auto;
3
3
  display: flex;
4
4
  justify-content: space-between;
@@ -1 +1 @@
1
- import{v as L,j as h}from"./vendor-mui-core-DxD1UA4o.js";import{l as B,r}from"./vendor-react-DoD83n6N.js";import{y as W,D as O}from"./vendor-utils-CTIzdAFg.js";import{u as A,ak as T}from"./vendor-ux-did-connect-CiLSrCOH.js";import{l as w,u as _,s as F}from"./vendor-hooks-BwVH-TAd.js";import{A as K,S as $}from"./add-component-core-DRJSzr-6.js";import{n as z,L as G}from"./index-tjRN_EVx.js";import"./lottie-web-B6s7dDoL.js";import"./item--dgEgBvz.js";import"./vendor-arcblock-BtlDhznp.js";import"./format-error-LAoTjvJe.js";import"./Launch-CIC8rZgo.js";import"./Done-BXISjL2g.js";import"./DeleteOutline-7AloJjcV.js";import"./delete-confirm-C0cAQSXq.js";import"./click-to-copy-Cygm8U3_.js";import"./shorten-label-CwDvu4_S.js";import"./confirm-BX8_-j-l.js";import"./session-DaQ4KCFD.js";import"./get-safe-url-ZRaKUVld.js";import"./did-address-GAxLGeWB.js";import"./launch-result-message-Bvdtucih.js";import"./page-header-Cu9lHawO.js";import"./config-space-CSSDG-WO.js";import"./spaces-D1rqZVaX.js";import"./api-3sG9at7i.js";import"./logo-uploader-zhddoC5p.js";import"./index-tUQxVYYQ.js";import"./index-CNl-IhR2.js";import"./Google-1eG1YH-u.js";import"./cloneDeep-kMVNpUap.js";import"./index-O2l0NSUF.js";import"./index-C-7MyHbp.js";import"./index-BRz2myBK.js";import"./useLocalStorage-BXnF_60k.js";import"./util-C9b90o5T.js";import"./use-mobile-BHPd3bDQ.js";import"./content-layout-BM34AwsG.js";import"./connect-to-yIsMDJbM.js";import"./ArrowDropDown-DO9H_COV.js";import"./ChevronLeft-BdrBCIFt.js";import"./ChevronRight-CO9My6tF.js";function Le(){var d;const{t:f}=A(),{blocklet:i}=z(),{componentDid:s}=B(),g=L(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")||"",y=o.searchParams.get("showFromUrl")!=="false",S=o.searchParams.get("showResourcesSwitch")!=="false",D=o.searchParams.get("enableRunBackground")!=="false",E=o.searchParams.get("showCategory")!=="false",n=(d=i==null?void 0:i.meta)==null?void 0:d.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),[P,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 O.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 u=({inDialog:e=!0}={})=>h.jsx(K,{stores:P,selectedMeta:b,storeUrl:j,resourceType:c,resourceDid:p,mode:"embed",inDialog:e,storageKey:$(`${c}+${p}`),showResourcesSwitch:S,showFromUrl:y,enableRunBackground:D,showCategory:E});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:u()}):u({inDialog:!1})}export{Le as default};
1
+ import{v as L,j as h}from"./vendor-mui-core-DxD1UA4o.js";import{l as B,r}from"./vendor-react-DoD83n6N.js";import{y as W,D as O}from"./vendor-utils-CTIzdAFg.js";import{u as A,ak as T}from"./vendor-ux-did-connect-CiLSrCOH.js";import{l as w,u as _,s as F}from"./vendor-hooks-BwVH-TAd.js";import{A as K,S as $}from"./add-component-core-YuQ3TiFu.js";import{n as z,L as G}from"./index-CWohFZPl.js";import"./lottie-web-B6s7dDoL.js";import"./item-D8zBx1dJ.js";import"./vendor-arcblock-BtlDhznp.js";import"./format-error-LAoTjvJe.js";import"./Launch-CIC8rZgo.js";import"./Done-BXISjL2g.js";import"./DeleteOutline-7AloJjcV.js";import"./delete-confirm-Dtzz6Jaz.js";import"./click-to-copy-Cygm8U3_.js";import"./shorten-label-CwDvu4_S.js";import"./confirm-Fhl5qi_m.js";import"./session-DaQ4KCFD.js";import"./get-safe-url-ZRaKUVld.js";import"./did-address-GAxLGeWB.js";import"./launch-result-message-Bvdtucih.js";import"./page-header-Cu9lHawO.js";import"./config-space-Bc3ndGw-.js";import"./spaces-D1rqZVaX.js";import"./api-3sG9at7i.js";import"./logo-uploader-CcwN1uWX.js";import"./index-tUQxVYYQ.js";import"./index-DHEDtVhz.js";import"./Google-1eG1YH-u.js";import"./cloneDeep-kMVNpUap.js";import"./index-O2l0NSUF.js";import"./index-C-7MyHbp.js";import"./index-BRz2myBK.js";import"./useLocalStorage-BXnF_60k.js";import"./util-rMFbd0lA.js";import"./use-mobile-BHPd3bDQ.js";import"./content-layout-BM34AwsG.js";import"./connect-to-BMDSElVg.js";import"./ArrowDropDown-DO9H_COV.js";import"./ChevronLeft-BdrBCIFt.js";import"./ChevronRight-CO9My6tF.js";function Le(){var d;const{t:f}=A(),{blocklet:i}=z(),{componentDid:s}=B(),g=L(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")||"",y=o.searchParams.get("showFromUrl")!=="false",S=o.searchParams.get("showResourcesSwitch")!=="false",D=o.searchParams.get("enableRunBackground")!=="false",E=o.searchParams.get("showCategory")!=="false",n=(d=i==null?void 0:i.meta)==null?void 0:d.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),[P,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 O.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 u=({inDialog:e=!0}={})=>h.jsx(K,{stores:P,selectedMeta:b,storeUrl:j,resourceType:c,resourceDid:p,mode:"embed",inDialog:e,storageKey:$(`${c}+${p}`),showResourcesSwitch:S,showFromUrl:y,enableRunBackground:D,showCategory:E});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:u()}):u({inDialog:!1})}export{Le as default};
@@ -1,4 +1,4 @@
1
- import{r as z,e as ee}from"./vendor-react-DoD83n6N.js";import{a8 as ge,j as k,a9 as le,H as N,aa as M,y as Ue,T as te,ag as ye,bs as Ve,bO as We,bx as Ke,aj as He,E as Ge,ak as Ee,O as Ze,N as Ye,bt as me,X as Z}from"./vendor-mui-core-DxD1UA4o.js";import{z as re,C as Qe,f as Xe,ax as et,l as tt,ar as rt,v as Ae,O as Ie,M as Te}from"./index-tjRN_EVx.js";import{P as st,w as ce}from"./permission-C5Df-sxb.js";import{r as be,u as ie,B as G,Y as H,am as Le,k as nt,ak as qe,bE as at,aF as it,l as V,p as ot,W as Ce,a$ as lt}from"./vendor-ux-did-connect-CiLSrCOH.js";import{v as Me}from"./vendor-hooks-BwVH-TAd.js";import{c as Y}from"./vendor-arcblock-BtlDhznp.js";import{C as ve}from"./confirm-BX8_-j-l.js";import{f as ae}from"./format-error-LAoTjvJe.js";import{_ as ct}from"./useSetState-BL3ktMon.js";import{u as Pe}from"./session-DaQ4KCFD.js";import{S as K,u as Ne}from"./dashboard-oxsbu66O.js";import{C as ut}from"./click-to-copy-Cygm8U3_.js";import{s as ft,aG as dt}from"./vendor-utils-CTIzdAFg.js";import{I as mt}from"./index-BRz2myBK.js";import{W as ht}from"./did-address-GAxLGeWB.js";import{V as pt}from"./status-D7e11K9q.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-BXnF_60k.js";import"./PlayArrow-NjIpSDwJ.js";import"./get-safe-url-ZRaKUVld.js";import"./index-DIckhHU5.js";import"./useAsyncRetry-k063P8TB.js";import"./useAsync-BmW5cnbx.js";import"./InfoOutlined-DO0_Vjz-.js";import"./use-mobile-CHMVa8_W.js";import"./omit-MMUW2k9W.js";var _e={},gt=ge;Object.defineProperty(_e,"__esModule",{value:!0});var Fe=_e.default=void 0,yt=gt(be()),bt=k;Fe=_e.default=(0,yt.default)((0,bt.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 we={},vt=ge;Object.defineProperty(we,"__esModule",{value:!0});var xe=we.default=void 0,_t=vt(be()),De=k;xe=we.default=(0,_t.default)([(0,De.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,De.jsx)("circle",{cx:"16",cy:"12",r:"1.5"},"1")],"AccountBalanceWalletOutlined");const wt=localStorage.getItem("enableDebug")==="true";function xt({teamDid:$,size:O="small",...E}){const{t:A}=ie(),{api:j}=re(),[w,g]=z.useState(!1),[o,b]=z.useState(null),h=()=>{g(!1),b(null)},f=async()=>{var a;try{g(!0);const n=await j.clearCache({input:{teamDid:$}});H.success(A("blocklet.config.clearCache.success",{count:((a=n.removed)==null?void 0:a.length)||0}))}catch(n){H.error(ae(n))}finally{g(!1),b(null)}},e={title:A("blocklet.config.clearCache.title"),description:A("blocklet.config.clearCache.description"),confirm:A("common.confirm"),cancel:A("common.cancel"),onConfirm:f,onCancel:h};return k.jsxs("div",{...E,children:[k.jsxs(G,{onClick:()=>b(e),color:"error",variant:"outlined",size:O,children:[w?k.jsx(le,{size:16,style:{marginRight:5}}):null,A("blocklet.config.clearCache.action")]}),o&&k.jsx(ve,{title:o.title,description:o.description,confirm:o.confirm,cancel:o.cancel,onConfirm:o.onConfirm,onCancel:o.onCancel})]})}var $e={},$t=ge;Object.defineProperty($e,"__esModule",{value:!0});var ze=$e.default=void 0,jt=$t(be()),kt=k;ze=$e.default=(0,jt.default)((0,kt.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 je({onChange:$,disabled:O,loading:E,inService:A}){const{t:j}=ie(),{api:w,session:g}=Pe(),{blocklet:o}=Qe(),[b,h]=ct({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),f=()=>h({isConnectOpen:!1}),e=()=>{if(Xe.isInProgress(o.status)){H.error(j("blocklet.error.isInProgress"));return}h({confirmDialogOpen:!0})};return k.jsxs(k.Fragment,{children:[k.jsx(K,{title:j("blocklet.config.migrate.button"),desc:j("blocklet.config.migrate.description"),children:k.jsx(M,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:k.jsxs(Ue,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:O||E,onClick:e,children:[k.jsx(ze,{style:{fontSize:"1.3em",marginRight:4}}),j("blocklet.config.migrate.button")]})})}),k.jsxs(k.Fragment,{children:[b.isConnectOpen&&k.jsx(Le,{popup:!0,open:b.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:w.get,checkTimeout:5*60*1e3,onSuccess:()=>{$(),A&&g.logout(),f()},extraParams:{appDid:o.appDid},messages:{title:j("setup.keyPair.title"),scan:j("setup.keyPair.scan"),confirm:j("setup.keyPair.confirm"),success:j("setup.keyPair.success")},onClose:f}),b.confirmDialogOpen&&k.jsx(ve,{title:k.jsx(te,{sx:{fontSize:"20px",fontWeight:"500"},children:j("blocklet.config.migrate.title")}),description:k.jsx(te,{sx:{fontSize:"14px",color:"#9397A1"},children:j("blocklet.config.migrate.confirm")}),confirm:j("common.confirm"),cancel:j("common.cancel"),onConfirm:()=>h({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>h({confirmDialogOpen:!1})})]})]})}je.propTypes={onChange:N.func,disabled:N.bool,loading:N.bool,inService:N.bool};je.defaultProps={onChange:()=>{},disabled:!1,loading:!1,inService:!1};function ke({onCancel:$,onSuccess:O,onError:E}){const{api:A}=z.useContext(nt),[j,w]=z.useState(!1),{t:g,locale:o}=ie(),[b,h]=z.useState(""),[f,e]=z.useState(!1),[a,n]=z.useState(0),[r,t]=z.useState(""),{endpoint:l}=Ne(),[s,i]=z.useState(!1),u=c=>{h(null),w(!0);try{t(c.result),n(_.length-1)}catch(m){const y=ae(m);h(y),E(m)}finally{w(!1)}},d=()=>{e(!0),n(1)},p=()=>{e(!1),n(0)},_=[{body:k.jsxs(M,{children:[k.jsx(te,{children:g("team.transferApp.transferDialog.tips.progress")}),k.jsx(te,{mt:3,mb:2,children:g("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:g("common.cancel"),confirm:g("team.transferApp.transferDialog.createTransferLink"),onCancel:$,onConfirm:d},{cancel:g("common.cancel"),confirm:g("team.transferApp.transferDialog.createTransferLink"),body:()=>k.jsx(Le,{action:"transfer-app-owner",open:f,locale:o,checkFn:A.get,onClose:p,onSuccess:u,checkTimeout:5*60*1e3,extraParams:{},messages:{title:g("team.transferApp.connectDialog.title"),scan:g("team.transferApp.connectDialog.scan"),confirm:g("team.transferApp.connectDialog.confirm"),success:g("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const c=et({transferId:r.transferId,endpoint:l});return k.jsxs(k.Fragment,{children:[k.jsx(M,{component:X,dangerouslySetInnerHTML:{__html:g("team.transferApp.transferDialog.createSuccessTip1")}}),k.jsx(M,{component:X,mt:2,children:k.jsx(X,{children:g("team.transferApp.transferDialog.createSuccessTip3")})}),k.jsxs(M,{children:[k.jsx(M,{component:X,mt:2,children:k.jsx(X,{children:g("team.transferApp.transferDialog.createSuccessTip2",{expireDate:tt(r.expireDate,o)})})}),k.jsx(M,{my:1,children:k.jsx(ut,{children:c})})]}),k.jsx("div",{children:k.jsx(Ve,{value:"end",control:k.jsx(We,{checked:s,onChange:m=>i(m.target.checked)}),label:g("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:g("common.confirm"),onConfirm:O}],v=_[a];return k.jsxs(qe,{title:k.jsx(X,{className:"title",children:g("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:k.jsxs(k.Fragment,{children:[v.cancel&&k.jsx(G,{onClick:v.onCancel,color:"inherit",children:v.cancel}),k.jsxs(G,{onClick:v.onConfirm,color:"error",disabled:j||a===_.length-1&&!s,variant:"contained",autoFocus:!0,children:[j&&k.jsx(le,{size:16}),v.confirm]})]}),children:[k.jsx(Ke,{component:"div",children:typeof v.body=="function"?v.body():v.body}),!!b&&k.jsx(He,{severity:"error",variant:"icon",children:b})]})}ke.propTypes={onCancel:N.func.isRequired,onSuccess:N.func.isRequired,onError:N.func};ke.defaultProps={onError:()=>{}};const X=ye.div`
1
+ import{r as z,e as ee}from"./vendor-react-DoD83n6N.js";import{a8 as ge,j as k,a9 as le,H as N,aa as M,y as Ue,T as te,ag as ye,bs as Ve,bO as We,bx as Ke,aj as He,E as Ge,ak as Ee,O as Ze,N as Ye,bt as me,X as Z}from"./vendor-mui-core-DxD1UA4o.js";import{z as re,C as Qe,f as Xe,ax as et,l as tt,ar as rt,v as Ae,O as Ie,M as Te}from"./index-CWohFZPl.js";import{P as st,w as ce}from"./permission-C5Df-sxb.js";import{r as be,u as ie,B as G,Y as H,am as Le,k as nt,ak as qe,bE as at,aF as it,l as V,p as ot,W as Ce,a$ as lt}from"./vendor-ux-did-connect-CiLSrCOH.js";import{v as Me}from"./vendor-hooks-BwVH-TAd.js";import{c as Y}from"./vendor-arcblock-BtlDhznp.js";import{C as ve}from"./confirm-Fhl5qi_m.js";import{f as ae}from"./format-error-LAoTjvJe.js";import{_ as ct}from"./useSetState-BL3ktMon.js";import{u as Pe}from"./session-DaQ4KCFD.js";import{S as K,u as Ne}from"./dashboard-D3KvORmC.js";import{C as ut}from"./click-to-copy-Cygm8U3_.js";import{s as ft,aG as dt}from"./vendor-utils-CTIzdAFg.js";import{I as mt}from"./index-BRz2myBK.js";import{W as ht}from"./did-address-GAxLGeWB.js";import{V as pt}from"./status-Cyln1yDP.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-BXnF_60k.js";import"./PlayArrow-NjIpSDwJ.js";import"./get-safe-url-ZRaKUVld.js";import"./index-Bx2tzf6d.js";import"./useAsyncRetry-BBomZj1z.js";import"./useAsync-DKE0K0bz.js";import"./InfoOutlined-DO0_Vjz-.js";import"./use-mobile-CHMVa8_W.js";import"./omit-MMUW2k9W.js";var _e={},gt=ge;Object.defineProperty(_e,"__esModule",{value:!0});var Fe=_e.default=void 0,yt=gt(be()),bt=k;Fe=_e.default=(0,yt.default)((0,bt.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 we={},vt=ge;Object.defineProperty(we,"__esModule",{value:!0});var xe=we.default=void 0,_t=vt(be()),De=k;xe=we.default=(0,_t.default)([(0,De.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,De.jsx)("circle",{cx:"16",cy:"12",r:"1.5"},"1")],"AccountBalanceWalletOutlined");const wt=localStorage.getItem("enableDebug")==="true";function xt({teamDid:$,size:O="small",...E}){const{t:A}=ie(),{api:j}=re(),[w,g]=z.useState(!1),[o,b]=z.useState(null),h=()=>{g(!1),b(null)},f=async()=>{var a;try{g(!0);const n=await j.clearCache({input:{teamDid:$}});H.success(A("blocklet.config.clearCache.success",{count:((a=n.removed)==null?void 0:a.length)||0}))}catch(n){H.error(ae(n))}finally{g(!1),b(null)}},e={title:A("blocklet.config.clearCache.title"),description:A("blocklet.config.clearCache.description"),confirm:A("common.confirm"),cancel:A("common.cancel"),onConfirm:f,onCancel:h};return k.jsxs("div",{...E,children:[k.jsxs(G,{onClick:()=>b(e),color:"error",variant:"outlined",size:O,children:[w?k.jsx(le,{size:16,style:{marginRight:5}}):null,A("blocklet.config.clearCache.action")]}),o&&k.jsx(ve,{title:o.title,description:o.description,confirm:o.confirm,cancel:o.cancel,onConfirm:o.onConfirm,onCancel:o.onCancel})]})}var $e={},$t=ge;Object.defineProperty($e,"__esModule",{value:!0});var ze=$e.default=void 0,jt=$t(be()),kt=k;ze=$e.default=(0,jt.default)((0,kt.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 je({onChange:$,disabled:O,loading:E,inService:A}){const{t:j}=ie(),{api:w,session:g}=Pe(),{blocklet:o}=Qe(),[b,h]=ct({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),f=()=>h({isConnectOpen:!1}),e=()=>{if(Xe.isInProgress(o.status)){H.error(j("blocklet.error.isInProgress"));return}h({confirmDialogOpen:!0})};return k.jsxs(k.Fragment,{children:[k.jsx(K,{title:j("blocklet.config.migrate.button"),desc:j("blocklet.config.migrate.description"),children:k.jsx(M,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:k.jsxs(Ue,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:O||E,onClick:e,children:[k.jsx(ze,{style:{fontSize:"1.3em",marginRight:4}}),j("blocklet.config.migrate.button")]})})}),k.jsxs(k.Fragment,{children:[b.isConnectOpen&&k.jsx(Le,{popup:!0,open:b.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:w.get,checkTimeout:5*60*1e3,onSuccess:()=>{$(),A&&g.logout(),f()},extraParams:{appDid:o.appDid},messages:{title:j("setup.keyPair.title"),scan:j("setup.keyPair.scan"),confirm:j("setup.keyPair.confirm"),success:j("setup.keyPair.success")},onClose:f}),b.confirmDialogOpen&&k.jsx(ve,{title:k.jsx(te,{sx:{fontSize:"20px",fontWeight:"500"},children:j("blocklet.config.migrate.title")}),description:k.jsx(te,{sx:{fontSize:"14px",color:"#9397A1"},children:j("blocklet.config.migrate.confirm")}),confirm:j("common.confirm"),cancel:j("common.cancel"),onConfirm:()=>h({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>h({confirmDialogOpen:!1})})]})]})}je.propTypes={onChange:N.func,disabled:N.bool,loading:N.bool,inService:N.bool};je.defaultProps={onChange:()=>{},disabled:!1,loading:!1,inService:!1};function ke({onCancel:$,onSuccess:O,onError:E}){const{api:A}=z.useContext(nt),[j,w]=z.useState(!1),{t:g,locale:o}=ie(),[b,h]=z.useState(""),[f,e]=z.useState(!1),[a,n]=z.useState(0),[r,t]=z.useState(""),{endpoint:l}=Ne(),[s,i]=z.useState(!1),u=c=>{h(null),w(!0);try{t(c.result),n(_.length-1)}catch(m){const y=ae(m);h(y),E(m)}finally{w(!1)}},d=()=>{e(!0),n(1)},p=()=>{e(!1),n(0)},_=[{body:k.jsxs(M,{children:[k.jsx(te,{children:g("team.transferApp.transferDialog.tips.progress")}),k.jsx(te,{mt:3,mb:2,children:g("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:g("common.cancel"),confirm:g("team.transferApp.transferDialog.createTransferLink"),onCancel:$,onConfirm:d},{cancel:g("common.cancel"),confirm:g("team.transferApp.transferDialog.createTransferLink"),body:()=>k.jsx(Le,{action:"transfer-app-owner",open:f,locale:o,checkFn:A.get,onClose:p,onSuccess:u,checkTimeout:5*60*1e3,extraParams:{},messages:{title:g("team.transferApp.connectDialog.title"),scan:g("team.transferApp.connectDialog.scan"),confirm:g("team.transferApp.connectDialog.confirm"),success:g("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const c=et({transferId:r.transferId,endpoint:l});return k.jsxs(k.Fragment,{children:[k.jsx(M,{component:X,dangerouslySetInnerHTML:{__html:g("team.transferApp.transferDialog.createSuccessTip1")}}),k.jsx(M,{component:X,mt:2,children:k.jsx(X,{children:g("team.transferApp.transferDialog.createSuccessTip3")})}),k.jsxs(M,{children:[k.jsx(M,{component:X,mt:2,children:k.jsx(X,{children:g("team.transferApp.transferDialog.createSuccessTip2",{expireDate:tt(r.expireDate,o)})})}),k.jsx(M,{my:1,children:k.jsx(ut,{children:c})})]}),k.jsx("div",{children:k.jsx(Ve,{value:"end",control:k.jsx(We,{checked:s,onChange:m=>i(m.target.checked)}),label:g("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:g("common.confirm"),onConfirm:O}],v=_[a];return k.jsxs(qe,{title:k.jsx(X,{className:"title",children:g("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:k.jsxs(k.Fragment,{children:[v.cancel&&k.jsx(G,{onClick:v.onCancel,color:"inherit",children:v.cancel}),k.jsxs(G,{onClick:v.onConfirm,color:"error",disabled:j||a===_.length-1&&!s,variant:"contained",autoFocus:!0,children:[j&&k.jsx(le,{size:16}),v.confirm]})]}),children:[k.jsx(Ke,{component:"div",children:typeof v.body=="function"?v.body():v.body}),!!b&&k.jsx(He,{severity:"error",variant:"icon",children:b})]})}ke.propTypes={onCancel:N.func.isRequired,onSuccess:N.func.isRequired,onError:N.func};ke.defaultProps={onError:()=>{}};const X=ye.div`
2
2
  font-size: 16px;
3
3
  font-weight: bold;
4
4
  &.title {
@@ -1 +1 @@
1
- import{y as m}from"./vendor-utils-CTIzdAFg.js";import{p as E}from"./vendor-ux-did-connect-CiLSrCOH.js";import{c as g}from"./vendor-arcblock-BtlDhznp.js";import{r as n}from"./vendor-react-DoD83n6N.js";import{z as h,C as w}from"./index-tjRN_EVx.js";import{j as e,aa as x,a9 as y}from"./vendor-mui-core-DxD1UA4o.js";import"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";function I(){const{info:f,inService:a}=h(),{did:p}=w(),c="calc(100vh - 430px)",[d,u]=n.useState(!0),i=n.useRef(null);let t="";a?t=E.WELLKNOWN_SERVICE_PATH_PREFIX:t=f.routing.adminPath;const s=new URLSearchParams;a||s.set("authKey","__sst"),s.set("schemaKey",m(window.location.origin,t,`/api/theme?id=${encodeURIComponent(p)}`));const l=n.useCallback(()=>{if(i.current){const o=window.location.origin;i.current.contentWindow.postMessage({type:"SEND_THEME",payload:g.defaultTheme},o)}},[]);return n.useEffect(()=>{const o=r=>{r.origin===window.location.origin&&(r.data.type==="REQUEST_THEME"&&l(),r.data.type==="THEME_BUILDER_LOADED"&&u(!1))};return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}},[l]),e.jsxs(e.Fragment,{children:[d&&e.jsx(x,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:c},children:e.jsx(y,{})}),e.jsx("iframe",{title:"Theme Builder",ref:i,src:`${m(window.location.origin,t,"/hosted/theme-builder/")}?${s.toString()}`,style:{border:0,width:"100%",height:c,display:d?"none":"block"}})]})}export{I as default};
1
+ import{y as m}from"./vendor-utils-CTIzdAFg.js";import{p as E}from"./vendor-ux-did-connect-CiLSrCOH.js";import{c as g}from"./vendor-arcblock-BtlDhznp.js";import{r as n}from"./vendor-react-DoD83n6N.js";import{z as h,C as w}from"./index-CWohFZPl.js";import{j as e,aa as x,a9 as y}from"./vendor-mui-core-DxD1UA4o.js";import"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";function I(){const{info:f,inService:a}=h(),{did:p}=w(),c="calc(100vh - 430px)",[d,u]=n.useState(!0),i=n.useRef(null);let t="";a?t=E.WELLKNOWN_SERVICE_PATH_PREFIX:t=f.routing.adminPath;const s=new URLSearchParams;a||s.set("authKey","__sst"),s.set("schemaKey",m(window.location.origin,t,`/api/theme?id=${encodeURIComponent(p)}`));const l=n.useCallback(()=>{if(i.current){const o=window.location.origin;i.current.contentWindow.postMessage({type:"SEND_THEME",payload:g.defaultTheme},o)}},[]);return n.useEffect(()=>{const o=r=>{r.origin===window.location.origin&&(r.data.type==="REQUEST_THEME"&&l(),r.data.type==="THEME_BUILDER_LOADED"&&u(!1))};return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}},[l]),e.jsxs(e.Fragment,{children:[d&&e.jsx(x,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:c},children:e.jsx(y,{})}),e.jsx("iframe",{title:"Theme Builder",ref:i,src:`${m(window.location.origin,t,"/hosted/theme-builder/")}?${s.toString()}`,style:{border:0,width:"100%",height:c,display:d?"none":"block"}})]})}export{I as default};
@@ -1,4 +1,4 @@
1
- import{Y as U,r as W,bd as N,u as V,bN as H,_ as Z,p as F}from"./vendor-ux-did-connect-CiLSrCOH.js";import{j as e,a8 as G,aa as p,bl as q,T as w,ab as K,I as M,a9 as Y,bo as J,br as Q,bn as X,q as ee,bM as te,ag as re}from"./vendor-mui-core-DxD1UA4o.js";import{p as oe}from"./util-Csa0tyHO.js";import{r as l,L as ae}from"./vendor-react-DoD83n6N.js";import{_ as se}from"./useLocalStorage-BXnF_60k.js";import{z as O}from"./index-tjRN_EVx.js";import{M as $}from"./index-O2l0NSUF.js";import{V as ie}from"./vendor-arcblock-BtlDhznp.js";import{d as ne}from"./InfoOutlined-DO0_Vjz-.js";import{d as le}from"./vendor-utils-CTIzdAFg.js";import{R as ce}from"./relative-time-DESntOZH.js";import{S as E}from"./shorten-label-CwDvu4_S.js";import{r as I}from"./index-DkPKxdcu.js";import{u as de}from"./dashboard-oxsbu66O.js";import"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";import"./base32-CQfYcymN.js";import"./index-DIckhHU5.js";import"./confirm-BX8_-j-l.js";import"./format-error-LAoTjvJe.js";import"./PlayArrow-NjIpSDwJ.js";import"./get-safe-url-ZRaKUVld.js";import"./session-DaQ4KCFD.js";import"./useAsyncRetry-k063P8TB.js";import"./useAsync-BmW5cnbx.js";import"./useSetState-BL3ktMon.js";import"./use-mobile-CHMVa8_W.js";const T=l.createContext({}),{Provider:pe,Consumer:Ye}=T;function ue(){return localStorage.getItem("audit-log-page-size")&&Number(localStorage.getItem("audit-log-page-size"))||10}function fe({children:t,scope:o="",categories:i=[],showScope:c,scopeFormatter:m}){const{api:f,info:C}=O(),[x,L]=l.useState([]),[a,h]=l.useState({total:0,pageSize:ue(),pageCount:0,page:1}),[v,g]=l.useState(!1),[r,n]=l.useState(""),[d,z]=se(`audit-log-category-${o}`,"all"),s=[{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(S=>i.length?S.value==="all"||i.includes(S.value):!0),u=async({page:S=1,pageSize:P=20,silent:k=!0}={})=>{if(!v){k||g(!0);try{const b=await f.getAuditLogs({input:{paging:{page:S,pageSize:P},category:d==="all"?"":d,scope:o,actionOrContent:r}});c&&(b.list||[]).forEach(_=>{_.scope!==C.did&&(_.link=`/blocklets/${_.scope}/components`)}),L(b.list),h(b.paging),g(!1)}catch(b){U.error(b.message),g(!1)}}};l.useEffect(()=>{localStorage.setItem("audit-log-page-size",a.pageSize)},[a.pageSize]),l.useEffect(()=>{u({page:1,pageSize:a.pageSize,silent:!1})},[]),l.useEffect(()=>{u({page:1,pageSize:a.pageSize,silent:!1})},[d,r]);const j={loading:v,fetch:u,filter:{category:d,scope:o},categories:s,setCategory:z,data:x,paging:a,setPaging:h,showScope:c,scopeFormatter:m,actionOrContent:r,setActionOrContent:n};return e.jsx(pe,{value:{auditLogs:j},children:t})}function B(){const{auditLogs:t}=l.useContext(T);return t}var A={},ge=G;Object.defineProperty(A,"__esModule",{value:!0});var R=A.default=void 0,me=ge(W()),xe=e;R=A.default=(0,me.default)((0,xe.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");const Le=`
1
+ import{Y as U,r as W,bd as N,u as V,bN as H,_ as Z,p as F}from"./vendor-ux-did-connect-CiLSrCOH.js";import{j as e,a8 as G,aa as p,bl as q,T as w,ab as K,I as M,a9 as Y,bo as J,br as Q,bn as X,q as ee,bM as te,ag as re}from"./vendor-mui-core-DxD1UA4o.js";import{p as oe}from"./util-Csa0tyHO.js";import{r as l,L as ae}from"./vendor-react-DoD83n6N.js";import{_ as se}from"./useLocalStorage-BXnF_60k.js";import{z as O}from"./index-CWohFZPl.js";import{M as $}from"./index-O2l0NSUF.js";import{V as ie}from"./vendor-arcblock-BtlDhznp.js";import{d as ne}from"./InfoOutlined-DO0_Vjz-.js";import{d as le}from"./vendor-utils-CTIzdAFg.js";import{R as ce}from"./relative-time-BBLaQUJf.js";import{S as E}from"./shorten-label-CwDvu4_S.js";import{r as I}from"./index-DkPKxdcu.js";import{u as de}from"./dashboard-D3KvORmC.js";import"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";import"./base32-CQfYcymN.js";import"./index-Bx2tzf6d.js";import"./confirm-Fhl5qi_m.js";import"./format-error-LAoTjvJe.js";import"./PlayArrow-NjIpSDwJ.js";import"./get-safe-url-ZRaKUVld.js";import"./session-DaQ4KCFD.js";import"./useAsyncRetry-BBomZj1z.js";import"./useAsync-DKE0K0bz.js";import"./useSetState-BL3ktMon.js";import"./use-mobile-CHMVa8_W.js";const T=l.createContext({}),{Provider:pe,Consumer:Ye}=T;function ue(){return localStorage.getItem("audit-log-page-size")&&Number(localStorage.getItem("audit-log-page-size"))||10}function fe({children:t,scope:o="",categories:i=[],showScope:c,scopeFormatter:m}){const{api:f,info:C}=O(),[x,L]=l.useState([]),[a,h]=l.useState({total:0,pageSize:ue(),pageCount:0,page:1}),[v,g]=l.useState(!1),[r,n]=l.useState(""),[d,z]=se(`audit-log-category-${o}`,"all"),s=[{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(S=>i.length?S.value==="all"||i.includes(S.value):!0),u=async({page:S=1,pageSize:P=20,silent:k=!0}={})=>{if(!v){k||g(!0);try{const b=await f.getAuditLogs({input:{paging:{page:S,pageSize:P},category:d==="all"?"":d,scope:o,actionOrContent:r}});c&&(b.list||[]).forEach(_=>{_.scope!==C.did&&(_.link=`/blocklets/${_.scope}/components`)}),L(b.list),h(b.paging),g(!1)}catch(b){U.error(b.message),g(!1)}}};l.useEffect(()=>{localStorage.setItem("audit-log-page-size",a.pageSize)},[a.pageSize]),l.useEffect(()=>{u({page:1,pageSize:a.pageSize,silent:!1})},[]),l.useEffect(()=>{u({page:1,pageSize:a.pageSize,silent:!1})},[d,r]);const j={loading:v,fetch:u,filter:{category:d,scope:o},categories:s,setCategory:z,data:x,paging:a,setPaging:h,showScope:c,scopeFormatter:m,actionOrContent:r,setActionOrContent:n};return e.jsx(pe,{value:{auditLogs:j},children:t})}function B(){const{auditLogs:t}=l.useContext(T);return t}var A={},ge=G;Object.defineProperty(A,"__esModule",{value:!0});var R=A.default=void 0,me=ge(W()),xe=e;R=A.default=(0,me.default)((0,xe.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");const Le=`
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 +1 @@
1
- import{j as e,aa as t,a9 as A,T as a,bl as P,ab as W,bN as z,bs as L,bO as R,X as E,ao as j,ak as I,y as c}from"./vendor-mui-core-DxD1UA4o.js";import{r as f}from"./vendor-react-DoD83n6N.js";import{v as O}from"./vendor-hooks-BwVH-TAd.js";import{y as T}from"./vendor-utils-CTIzdAFg.js";import{u as D,I as b,p as y}from"./vendor-ux-did-connect-CiLSrCOH.js";import{L as _}from"./landing-page-aHOyrHWC.js";import{H as F}from"./vendor-arcblock-BtlDhznp.js";import{W as B}from"./did-address-GAxLGeWB.js";import{u as U,d as H}from"./index-tjRN_EVx.js";import"./lottie-web-B6s7dDoL.js";function $(){var p,m,g;const{searchParams:i}=new URL(window.location.href),{session:o}=U(),{t:v}=D(),h=i.get("client_id"),w=i.get("scope")||"profile:read",[x,S]=f.useState(w.split(" ").filter(Boolean)),[d,u]=O({client:null,loading:!0});f.useEffect(()=>{(async()=>{const{data:n}=await H.get("/oauth/client",{params:{clientId:h}});u({client:n,loading:!1})})()},[h,u]);const k=s=>{s!=="profile:read"&&S(n=>n.includes(s)?n.filter(N=>N!==s):[...n,s])};if(d.loading||!d.client||!(o!=null&&o.user))return e.jsx(_,{did:(p=window.blocklet)==null?void 0:p.appPid,standalone:!0,children:e.jsx(t,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:e.jsx(A,{})})});const{client:r}=d,{user:l}=o,C=r.scope.split(" ");return e.jsxs(_,{did:(m=window.blocklet)==null?void 0:m.appPid,standalone:!0,children:[e.jsx(F,{children:e.jsx("title",{children:v("oauth.title")})}),e.jsxs(t,{sx:{width:"560px",maxWidth:"100%",height:"100%",display:"flex",flexDirection:"column",p:4,bgcolor:"background.paper",borderRadius:2,boxShadow:1},className:"page-authorize",children:[e.jsxs(t,{sx:{textAlign:"center",mb:2},children:[e.jsxs(t,{sx:{display:"flex",alignItems:"center",justifyContent:"center",mb:2},children:[e.jsx(b,{src:(g=window.blocklet)==null?void 0:g.appLogo,alt:"Server",width:48,height:48}),e.jsxs(t,{sx:{mx:2,display:"flex",alignItems:"center","& .dot":{width:8,height:8,borderRadius:"50%",bgcolor:"divider",mx:.5}},children:[e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"})]}),e.jsx(b,{src:r.logo_uri,alt:r.client_name,width:48,height:48})]}),e.jsxs(a,{sx:{mb:1,fontSize:"1.2rem","& .app-name":{color:"primary.main"}},children:["Authorize ",e.jsx("span",{className:"app-name",children:r.client_name})]})]}),e.jsxs(t,{sx:{display:"flex",alignItems:"center",width:"100%",overflow:"hidden",mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},className:"info",children:[e.jsx(P,{src:l.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),e.jsxs(t,{sx:{flex:1,overflow:"hidden"},children:[e.jsx(W,{title:l.fullName,children:e.jsx(t,{className:"name",sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:l.fullName})}),e.jsx(t,{className:"did",sx:{},children:e.jsx(B,{compact:!0,responsive:!1,did:l.did,showQrcode:!0})})]})]}),e.jsxs(a,{variant:"subtitle1",sx:{mb:2,fontWeight:500},children:["Allow ",r.client_name," to do the following on your behalf:"]}),e.jsxs(t,{sx:{border:"1px solid",borderColor:"divider",borderRadius:2,overflow:"hidden"},children:[e.jsx(t,{sx:{p:2},children:e.jsx(z,{children:Object.entries(y.OAUTH_SCOPES).filter(([s])=>C.includes(s)).map(([s,n])=>e.jsx(L,{control:e.jsx(R,{checked:x.includes(s),onChange:()=>k(s),disabled:s==="profile:read",color:"primary",sx:{"&.Mui-checked":{color:"success.main"}}}),label:e.jsx(t,{children:e.jsx(a,{variant:"body1",sx:{fontWeight:500},children:n})}),sx:{mb:0}},s))})}),(r.tos_uri||r.policy_uri)&&e.jsxs(e.Fragment,{children:[e.jsx(E,{}),e.jsx(t,{sx:{height:1,bgcolor:"divider"}}),e.jsx(t,{sx:{p:2,color:"text.secondary"},children:e.jsxs(a,{variant:"body2",children:["By authorize the access, you also agree with the"," ",!!r.tos_uri&&e.jsx(j,{href:r.tos_uri,target:"_blank",children:"Terms of Use"}),!!r.tos_uri&&!!r.policy_uri&&" and ",!!r.policy_uri&&e.jsx(j,{href:r.policy_uri,target:"_blank",children:"Privacy Policy"})]})})]})]}),e.jsxs("form",{method:"POST",action:T(window.location.origin,y.WELLKNOWN_SERVICE_PATH_PREFIX,"/oauth/authorize"),children:[i.get("client_id")&&e.jsx("input",{type:"hidden",name:"client_id",value:i.get("client_id")}),i.get("response_type")&&e.jsx("input",{type:"hidden",name:"response_type",value:i.get("response_type")}),i.get("redirect_uri")&&e.jsx("input",{type:"hidden",name:"redirect_uri",value:i.get("redirect_uri")}),i.get("code_challenge")&&e.jsx("input",{type:"hidden",name:"code_challenge",value:i.get("code_challenge")}),i.get("code_challenge_method")&&e.jsx("input",{type:"hidden",name:"code_challenge_method",value:i.get("code_challenge_method")}),i.get("state")&&e.jsx("input",{type:"hidden",name:"state",value:i.get("state")}),e.jsx("input",{type:"hidden",name:"scope",value:x.join(" ")}),e.jsx(t,{sx:{mt:"auto",pt:3},children:e.jsxs(I,{direction:"row",spacing:2,children:[e.jsx(c,{variant:"outlined",size:"large",fullWidth:!0,type:"submit",name:"action",value:"deny",children:"Cancel"}),e.jsx(c,{variant:"contained",size:"large",fullWidth:!0,type:"submit",name:"action",value:"allow",children:"Authorize"})]})}),i.get("redirect_uri")&&e.jsxs(t,{sx:{mt:3,textAlign:"center"},children:[e.jsx(a,{variant:"body2",color:"text.secondary",children:"You will be redirected to"}),e.jsx(a,{variant:"body2",color:"text.secondary",sx:{wordBreak:"break-all"},children:i.get("redirect_uri")})]}),e.jsx(t,{sx:{mt:2,textAlign:"center"},children:e.jsxs(a,{variant:"body2",children:["Not you?"," ",e.jsx(c,{variant:"text",color:"primary",onClick:()=>o.switchDid(),sx:{p:0,minWidth:"auto",textTransform:"none",verticalAlign:"baseline",fontWeight:"inherit",fontSize:"inherit","&:hover":{background:"none",textDecoration:"underline"}},children:"Use another account"})]})})]})]})]})}export{$ as default};
1
+ import{j as e,aa as t,a9 as A,T as a,bl as P,ab as W,bN as z,bs as L,bO as R,X as E,ao as j,ak as I,y as c}from"./vendor-mui-core-DxD1UA4o.js";import{r as f}from"./vendor-react-DoD83n6N.js";import{v as O}from"./vendor-hooks-BwVH-TAd.js";import{y as T}from"./vendor-utils-CTIzdAFg.js";import{u as D,I as b,p as y}from"./vendor-ux-did-connect-CiLSrCOH.js";import{L as _}from"./landing-page-aHOyrHWC.js";import{H as F}from"./vendor-arcblock-BtlDhznp.js";import{W as B}from"./did-address-GAxLGeWB.js";import{u as U,d as H}from"./index-CWohFZPl.js";import"./lottie-web-B6s7dDoL.js";function $(){var p,m,g;const{searchParams:i}=new URL(window.location.href),{session:o}=U(),{t:v}=D(),h=i.get("client_id"),w=i.get("scope")||"profile:read",[x,S]=f.useState(w.split(" ").filter(Boolean)),[d,u]=O({client:null,loading:!0});f.useEffect(()=>{(async()=>{const{data:n}=await H.get("/oauth/client",{params:{clientId:h}});u({client:n,loading:!1})})()},[h,u]);const k=s=>{s!=="profile:read"&&S(n=>n.includes(s)?n.filter(N=>N!==s):[...n,s])};if(d.loading||!d.client||!(o!=null&&o.user))return e.jsx(_,{did:(p=window.blocklet)==null?void 0:p.appPid,standalone:!0,children:e.jsx(t,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:e.jsx(A,{})})});const{client:r}=d,{user:l}=o,C=r.scope.split(" ");return e.jsxs(_,{did:(m=window.blocklet)==null?void 0:m.appPid,standalone:!0,children:[e.jsx(F,{children:e.jsx("title",{children:v("oauth.title")})}),e.jsxs(t,{sx:{width:"560px",maxWidth:"100%",height:"100%",display:"flex",flexDirection:"column",p:4,bgcolor:"background.paper",borderRadius:2,boxShadow:1},className:"page-authorize",children:[e.jsxs(t,{sx:{textAlign:"center",mb:2},children:[e.jsxs(t,{sx:{display:"flex",alignItems:"center",justifyContent:"center",mb:2},children:[e.jsx(b,{src:(g=window.blocklet)==null?void 0:g.appLogo,alt:"Server",width:48,height:48}),e.jsxs(t,{sx:{mx:2,display:"flex",alignItems:"center","& .dot":{width:8,height:8,borderRadius:"50%",bgcolor:"divider",mx:.5}},children:[e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"})]}),e.jsx(b,{src:r.logo_uri,alt:r.client_name,width:48,height:48})]}),e.jsxs(a,{sx:{mb:1,fontSize:"1.2rem","& .app-name":{color:"primary.main"}},children:["Authorize ",e.jsx("span",{className:"app-name",children:r.client_name})]})]}),e.jsxs(t,{sx:{display:"flex",alignItems:"center",width:"100%",overflow:"hidden",mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},className:"info",children:[e.jsx(P,{src:l.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),e.jsxs(t,{sx:{flex:1,overflow:"hidden"},children:[e.jsx(W,{title:l.fullName,children:e.jsx(t,{className:"name",sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:l.fullName})}),e.jsx(t,{className:"did",sx:{},children:e.jsx(B,{compact:!0,responsive:!1,did:l.did,showQrcode:!0})})]})]}),e.jsxs(a,{variant:"subtitle1",sx:{mb:2,fontWeight:500},children:["Allow ",r.client_name," to do the following on your behalf:"]}),e.jsxs(t,{sx:{border:"1px solid",borderColor:"divider",borderRadius:2,overflow:"hidden"},children:[e.jsx(t,{sx:{p:2},children:e.jsx(z,{children:Object.entries(y.OAUTH_SCOPES).filter(([s])=>C.includes(s)).map(([s,n])=>e.jsx(L,{control:e.jsx(R,{checked:x.includes(s),onChange:()=>k(s),disabled:s==="profile:read",color:"primary",sx:{"&.Mui-checked":{color:"success.main"}}}),label:e.jsx(t,{children:e.jsx(a,{variant:"body1",sx:{fontWeight:500},children:n})}),sx:{mb:0}},s))})}),(r.tos_uri||r.policy_uri)&&e.jsxs(e.Fragment,{children:[e.jsx(E,{}),e.jsx(t,{sx:{height:1,bgcolor:"divider"}}),e.jsx(t,{sx:{p:2,color:"text.secondary"},children:e.jsxs(a,{variant:"body2",children:["By authorize the access, you also agree with the"," ",!!r.tos_uri&&e.jsx(j,{href:r.tos_uri,target:"_blank",children:"Terms of Use"}),!!r.tos_uri&&!!r.policy_uri&&" and ",!!r.policy_uri&&e.jsx(j,{href:r.policy_uri,target:"_blank",children:"Privacy Policy"})]})})]})]}),e.jsxs("form",{method:"POST",action:T(window.location.origin,y.WELLKNOWN_SERVICE_PATH_PREFIX,"/oauth/authorize"),children:[i.get("client_id")&&e.jsx("input",{type:"hidden",name:"client_id",value:i.get("client_id")}),i.get("response_type")&&e.jsx("input",{type:"hidden",name:"response_type",value:i.get("response_type")}),i.get("redirect_uri")&&e.jsx("input",{type:"hidden",name:"redirect_uri",value:i.get("redirect_uri")}),i.get("code_challenge")&&e.jsx("input",{type:"hidden",name:"code_challenge",value:i.get("code_challenge")}),i.get("code_challenge_method")&&e.jsx("input",{type:"hidden",name:"code_challenge_method",value:i.get("code_challenge_method")}),i.get("state")&&e.jsx("input",{type:"hidden",name:"state",value:i.get("state")}),e.jsx("input",{type:"hidden",name:"scope",value:x.join(" ")}),e.jsx(t,{sx:{mt:"auto",pt:3},children:e.jsxs(I,{direction:"row",spacing:2,children:[e.jsx(c,{variant:"outlined",size:"large",fullWidth:!0,type:"submit",name:"action",value:"deny",children:"Cancel"}),e.jsx(c,{variant:"contained",size:"large",fullWidth:!0,type:"submit",name:"action",value:"allow",children:"Authorize"})]})}),i.get("redirect_uri")&&e.jsxs(t,{sx:{mt:3,textAlign:"center"},children:[e.jsx(a,{variant:"body2",color:"text.secondary",children:"You will be redirected to"}),e.jsx(a,{variant:"body2",color:"text.secondary",sx:{wordBreak:"break-all"},children:i.get("redirect_uri")})]}),e.jsx(t,{sx:{mt:2,textAlign:"center"},children:e.jsxs(a,{variant:"body2",children:["Not you?"," ",e.jsx(c,{variant:"text",color:"primary",onClick:()=>o.switchDid(),sx:{p:0,minWidth:"auto",textTransform:"none",verticalAlign:"baseline",fontWeight:"inherit",fontSize:"inherit","&:hover":{background:"none",textDecoration:"underline"}},children:"Use another account"})]})})]})]})]})}export{$ as default};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B64a4BbE.js","assets/vendor-ux-did-connect-CiLSrCOH.js","assets/vendor-react-DoD83n6N.js","assets/vendor-utils-CTIzdAFg.js","assets/vendor-mui-core-DxD1UA4o.js","assets/vendor-hooks-BwVH-TAd.js","assets/lottie-web-B6s7dDoL.js","assets/vendor-ux-did-connect-2GapMFC4.css","assets/vendor-arcblock-BtlDhznp.js","assets/index-C-7MyHbp.js","assets/index-tjRN_EVx.js","assets/index-tUQxVYYQ.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
2
- import{_ as Se}from"./vendor-arcblock-BtlDhznp.js";import{a8 as Ie,j as e,ak as z,T as P,aa as m,bl as Pe,ab as re,I as F,D as ue,H as w,ai as Re,t as ke,bR as Ee,N as oe,z as _e,y as $,ag as De}from"./vendor-mui-core-DxD1UA4o.js";import{r as Le,u as Oe,b6 as Ve,p as O}from"./vendor-ux-did-connect-CiLSrCOH.js";import{E as M}from"./empty-spinner-Ict2ItjU.js";import{d as ie}from"./DeleteOutline-7AloJjcV.js";import{m as Te,e as $e}from"./vendor-hooks-BwVH-TAd.js";import{r as h}from"./vendor-react-DoD83n6N.js";import{D as se,C as ne,P as ae}from"./react-beautiful-dnd.esm-BQ3hEDNY.js";import{S as K}from"./studio-CJpRZ6Af.js";import"./vendor-utils-CTIzdAFg.js";import"./lottie-web-B6s7dDoL.js";import"./raf-schd.esm-GV-XhwE0.js";import"./TuneOutlined-Bry0vSC0.js";var C={};Object.defineProperty(C,"__esModule",{value:!0});C.getVideoId=V;var Ue=C.getEmbedUrl=ze,We=C.getVideoCoverUrl=Fe,Ae=C.getVideoCheckUrl=Ne;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=He;function pe(r){var s,l,i;const t=r.trim();return t.includes("youtu.be/")?(s=t.split("youtu.be/")[1])==null?void 0:s.split("?")[0]:t.includes("/embed/")?(l=t.split("/embed/")[1])==null?void 0:l.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?(i=t.split("/shorts/")[1])==null?void 0:i.split("?")[0]:""}function he(r){var s,l,i,a,u,y,f;const t=r.trim();return t.includes("/embed/")?(s=t.split("/embed/")[1])==null?void 0:s.split("?")[0]:t.includes("vimeo.com/video/")?(l=t.split("/video/")[1])==null?void 0:l.split("?")[0]:t.includes("vimeo.com/channels/")?(a=(i=t.split("/channels/")[1])==null?void 0:i.split("/")[1])==null?void 0:a.split("?")[0]:t.includes("vimeo.com/groups/")?(y=(u=t.split("/groups/")[1])==null?void 0:u.split("/")[1])==null?void 0:y.split("?")[0]:t.includes("vimeo.com/")?(f=t.split("vimeo.com/")[1])==null?void 0:f.split("?")[0]:""}const U={};function V(r){const t=r.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(U[t]||(U[t]=(()=>{const s=new URL(t);return s.host.includes("youtube.com")||s.host.includes("youtu.be")?[pe(t),"youtube"]:s.host.includes("vimeo.com")?[he(t),"vimeo"]:[]})()),U[t])}const k={};function ze(r,{modestbranding:t=1,controls:s=0,autoplay:l=0}={}){const i=r.trim();if(!i)return"";if(k[i]!==void 0)return k[i];const[a,u]=V(i);return u==="youtube"?k[i]=`https://www.youtube.com/embed/${a}?modestbranding=${t}&controls=${s}&autoplay=${l}`:u==="vimeo"?k[i]=`https://player.vimeo.com/video/${a}?autoplay=${l}`:k[i]="",k[i]}const E={};function Fe(r){const t=r.trim();if(!t)return"";if(E[t]!==void 0)return E[t];const[s,l]=V(t);return l==="youtube"?E[t]=`https://img.youtube.com/vi/${s}/mqdefault.jpg`:l==="vimeo"?E[t]=`https://i.vimeocdn.com/${s}/1000x563`:E[t]="",E[t]}function Ne(r){const t=r.trim();if(!t)return"";const[s,l]=V(t);return l==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${s}&format=json`:l==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${s}`:""}function He(r){const t=r.trim();return V(t).length>0}var X={},qe=Ie;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=qe(Le()),Ke=e;me=X.default=(0,Be.default)((0,Ke.jsx)("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}),"ContentPaste");const le=h.lazy(()=>Se(()=>import("./index-B64a4BbE.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(r=>({default:r.Uploader}))),Me=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Xe=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ye=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,W=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,Je=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,ce=5,de=3;function ut(){var ee;const{t:r,locale:t}=Oe(),[s,l]=h.useState(!1),[i,a]=h.useState(!1),[u,y]=h.useState([]),[f,j]=h.useState([]),[x,S]=h.useState(""),[T,_]=h.useState(""),[N,H]=h.useState(Date.now()),p=Te(async()=>{var c;const n=await(await fetch(W)).json();return y(n.screenshots||[]),j(((c=n.videos)==null?void 0:c.filter(d=>!!d))||[]),n}),R=h.useRef(null),g=h.useRef(null);if(p.loading&&!p.data)return e.jsx(K,{children:e.jsx(M,{size:40})});if(p.error)return e.jsx(K,{children:e.jsx(z,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(P,{color:"error.main",sx:{fontWeight:"bold"},children:p.error.message})})});const v=async o=>{const n=o.filter(c=>!!c);j(n),await fetch(Je,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:n})})},q=async o=>{const n=Array.from(f),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),await v(n)},fe=async o=>{const n=Array.from(u),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),y(n),await fetch(`${W}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:n})})},J=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await fe(o):o.source.droppableId==="videos"&&await q(o),p.runAsync())},Z=o=>{_(o.trim()),a(!0)},G=async(o,n="")=>{let c=[];n?c=o?f.map(d=>d===n?o.trim():d):f.filter(d=>d!==n):o&&(c=[...f,o.trim()]),_(""),a(!1),(o||n)&&await v(c),p.runAsync()},xe=o=>{l(!0),S(o)},Q=()=>{l(!1),S("")};function be(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],n=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx(A,{title:r("common.logo"),rules:o,tips:n,children:e.jsx(m,{sx:{flex:1,cursor:"pointer"},children:e.jsx(Pe,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ye}?t=${N}`,onClick:()=>{var c;return(c=R.current)==null?void 0:c.open()}})})})}function ve(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${ce}`},{label:r("studio.size"),value:"<5MB"}],n=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx(A,{title:r("common.screenshot"),tips:n,rules:o,children:e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"screenshots",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[u.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>{const te=`${W}/${b}`;return e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"screenshot",src:te,onClick:()=>xe(b),style:{cursor:"pointer"}}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(te,{method:"DELETE"}),p.runAsync()},children:e.jsx(ie,{})})})]})}},b)),d.placeholder,u.length<ce&&c()]})})})});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>{var d;return(d=g.current)==null?void 0:d.open()},children:"+"})}}function je(){const o=[{label:r("studio.count"),value:`1~${de}`},{label:r("studio.videoType"),value:e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",e.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})}],n=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs(A,{title:r("studio.video"),tips:n,rules:o,children:[e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"videos",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[f.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"videos",src:We(b),onClick:()=>Z(b),style:{cursor:"pointer"}}),e.jsx(m,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>Z(b),children:e.jsx(ge,{})}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>G(null,b),children:e.jsx(ie,{})})})]})},b)),d.placeholder,f.length<de&&c()]})})}),i&&e.jsx(Y,{t:r,handleOperateVideo:G,defaultUrl:T,videos:f})]});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>a(!0),children:"+"})}}function ye(){return e.jsx(ue,{open:s,onClose:Q,maxWidth:"xl",PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none"}},children:e.jsx("img",{src:`${W}/${x}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:Q})})}function we(){return e.jsxs(h.Suspense,{fallback:e.jsx(M,{size:40}),children:[e.jsx(le,{ref:R,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=R.current)==null||o.close(),H(Date.now()),p.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Me,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","image/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),e.jsx(le,{ref:g,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=g.current)==null||o.close(),p.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Xe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-u.length}},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})}const Ce=`https://www.arcblock.io/docs/blocklet-store/${t}/supplying-images`;return e.jsx(K,{children:e.jsxs(Ze,{children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(P,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:(ee=p.data)==null?void 0:ee.title})}),e.jsxs(P,{variant:"body2",color:"text.secondary",children:[r("studio.description")," ",e.jsx("a",{href:Ce,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),be(),ve(),je(),ye(),we()]})})}function A({title:r,rules:t,tips:s,children:l}){return e.jsxs(m,{display:"flex",flexDirection:"column",sx:{mb:4},children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(P,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(z,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:t.map(a=>i(a.label,a.value))}),s.map(a=>e.jsx(m,{sx:{fontSize:"13px",opacity:.8},children:i(a.label,a.value)}))]}),l]});function i(a,u){return e.jsxs(m,{component:"span",children:[e.jsxs(m,{component:"span",sx:{color:"#555",mr:.5},children:[a,":"]}),e.jsx(m,{component:"span",sx:{color:"#007ec6"},children:u})]})}}A.propTypes={title:w.string.isRequired,rules:w.array.isRequired,tips:w.array.isRequired,children:w.node.isRequired};function Y({handleOperateVideo:r,t,defaultUrl:s="",videos:l}){var R;const[i,a]=h.useState(s),[u,y]=h.useState(!1),[f,j]=h.useState(!1),x=h.useRef(i),S=i!==s&&l.includes(i),T=!i&&s,_=!S&&(i&&i!==x.current||u),N=!!((R=navigator.clipboard)!=null&&R.readText),{run:H}=$e(p,{wait:500,leading:!0});return e.jsxs(ue,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(Re,{children:t(s?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(ke,{children:[e.jsx(Ee,{fullWidth:!0,value:i,onChange:g=>{const v=g.target.value.trim();a(v),v?H(v):j(!1)},placeholder:t("studio.videoInputLabel"),endAdornment:i?e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:()=>{a(""),p("")},children:e.jsx(Ve,{})})}):N&&e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:async()=>{try{const g=(await navigator.clipboard.readText()||"").trim();a(g),p(g)}catch(g){console.error(g)}},children:e.jsx(me,{})})})}),e.jsxs(m,{mb:2,mt:.5,children:[S&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.duplicateVideo")}),!S&&f&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.videoDialogNoSrc")})]}),x.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${x.current}`,src:Ue(x.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(m,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:u?e.jsx(M,{size:40}):e.jsx(P,{variant:"h5",color:"text.secondary",children:e.jsx(ge,{})})})]}),e.jsxs(_e,{children:[e.jsx($,{onClick:()=>r(),children:t("studio.cancel")}),T&&e.jsx($,{variant:"contained",color:"error",onClick:()=>r(null,s),children:t("studio.delete")}),_&&e.jsx($,{variant:"contained",onClick:()=>p(i),disabled:!i||u,children:t("studio.preview")}),!T&&!_&&e.jsx($,{variant:"contained",onClick:()=>r(x.current),disabled:!x.current||s===x.current||S,children:t("studio.confirm")})]})]});function p(g){x.current="";const v=Ae(g);j(g?!v:!1),v&&(y(!0),fetch(v).then(q=>{q.ok?(x.current=g,j(!1)):j(!0)}).catch(()=>{j(!0)}).finally(()=>y(!1)))}}Y.propTypes={handleOperateVideo:w.func.isRequired,t:w.func.isRequired,defaultUrl:w.string,videos:w.array.isRequired};Y.defaultProps={defaultUrl:""};function ge(){return e.jsxs("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:48,width:48,children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"black","fill-opacity":"0.54"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39.6667 28L21 17.5V38.5L39.6667 28Z",fill:"white"})]})}const Ze=De.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BLv5CM0y.js","assets/vendor-ux-did-connect-CiLSrCOH.js","assets/vendor-react-DoD83n6N.js","assets/vendor-utils-CTIzdAFg.js","assets/vendor-mui-core-DxD1UA4o.js","assets/vendor-hooks-BwVH-TAd.js","assets/lottie-web-B6s7dDoL.js","assets/vendor-ux-did-connect-2GapMFC4.css","assets/vendor-arcblock-BtlDhznp.js","assets/index-C-7MyHbp.js","assets/index-CWohFZPl.js","assets/index-tUQxVYYQ.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
2
+ import{_ as Se}from"./vendor-arcblock-BtlDhznp.js";import{a8 as Ie,j as e,ak as z,T as P,aa as m,bl as Pe,ab as re,I as F,D as ue,H as w,ai as Re,t as ke,bR as Ee,N as oe,z as _e,y as $,ag as De}from"./vendor-mui-core-DxD1UA4o.js";import{r as Le,u as Oe,b6 as Ve,p as O}from"./vendor-ux-did-connect-CiLSrCOH.js";import{E as M}from"./empty-spinner-Ict2ItjU.js";import{d as ie}from"./DeleteOutline-7AloJjcV.js";import{m as Te,e as $e}from"./vendor-hooks-BwVH-TAd.js";import{r as h}from"./vendor-react-DoD83n6N.js";import{D as se,C as ne,P as ae}from"./react-beautiful-dnd.esm-BQ3hEDNY.js";import{S as K}from"./studio-CJpRZ6Af.js";import"./vendor-utils-CTIzdAFg.js";import"./lottie-web-B6s7dDoL.js";import"./raf-schd.esm-GV-XhwE0.js";import"./TuneOutlined-Bry0vSC0.js";var C={};Object.defineProperty(C,"__esModule",{value:!0});C.getVideoId=V;var Ue=C.getEmbedUrl=ze,We=C.getVideoCoverUrl=Fe,Ae=C.getVideoCheckUrl=Ne;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=He;function pe(r){var s,l,i;const t=r.trim();return t.includes("youtu.be/")?(s=t.split("youtu.be/")[1])==null?void 0:s.split("?")[0]:t.includes("/embed/")?(l=t.split("/embed/")[1])==null?void 0:l.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?(i=t.split("/shorts/")[1])==null?void 0:i.split("?")[0]:""}function he(r){var s,l,i,a,u,y,f;const t=r.trim();return t.includes("/embed/")?(s=t.split("/embed/")[1])==null?void 0:s.split("?")[0]:t.includes("vimeo.com/video/")?(l=t.split("/video/")[1])==null?void 0:l.split("?")[0]:t.includes("vimeo.com/channels/")?(a=(i=t.split("/channels/")[1])==null?void 0:i.split("/")[1])==null?void 0:a.split("?")[0]:t.includes("vimeo.com/groups/")?(y=(u=t.split("/groups/")[1])==null?void 0:u.split("/")[1])==null?void 0:y.split("?")[0]:t.includes("vimeo.com/")?(f=t.split("vimeo.com/")[1])==null?void 0:f.split("?")[0]:""}const U={};function V(r){const t=r.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(U[t]||(U[t]=(()=>{const s=new URL(t);return s.host.includes("youtube.com")||s.host.includes("youtu.be")?[pe(t),"youtube"]:s.host.includes("vimeo.com")?[he(t),"vimeo"]:[]})()),U[t])}const k={};function ze(r,{modestbranding:t=1,controls:s=0,autoplay:l=0}={}){const i=r.trim();if(!i)return"";if(k[i]!==void 0)return k[i];const[a,u]=V(i);return u==="youtube"?k[i]=`https://www.youtube.com/embed/${a}?modestbranding=${t}&controls=${s}&autoplay=${l}`:u==="vimeo"?k[i]=`https://player.vimeo.com/video/${a}?autoplay=${l}`:k[i]="",k[i]}const E={};function Fe(r){const t=r.trim();if(!t)return"";if(E[t]!==void 0)return E[t];const[s,l]=V(t);return l==="youtube"?E[t]=`https://img.youtube.com/vi/${s}/mqdefault.jpg`:l==="vimeo"?E[t]=`https://i.vimeocdn.com/${s}/1000x563`:E[t]="",E[t]}function Ne(r){const t=r.trim();if(!t)return"";const[s,l]=V(t);return l==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${s}&format=json`:l==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${s}`:""}function He(r){const t=r.trim();return V(t).length>0}var X={},qe=Ie;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=qe(Le()),Ke=e;me=X.default=(0,Be.default)((0,Ke.jsx)("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}),"ContentPaste");const le=h.lazy(()=>Se(()=>import("./index-BLv5CM0y.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(r=>({default:r.Uploader}))),Me=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Xe=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ye=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,W=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,Je=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,ce=5,de=3;function ut(){var ee;const{t:r,locale:t}=Oe(),[s,l]=h.useState(!1),[i,a]=h.useState(!1),[u,y]=h.useState([]),[f,j]=h.useState([]),[x,S]=h.useState(""),[T,_]=h.useState(""),[N,H]=h.useState(Date.now()),p=Te(async()=>{var c;const n=await(await fetch(W)).json();return y(n.screenshots||[]),j(((c=n.videos)==null?void 0:c.filter(d=>!!d))||[]),n}),R=h.useRef(null),g=h.useRef(null);if(p.loading&&!p.data)return e.jsx(K,{children:e.jsx(M,{size:40})});if(p.error)return e.jsx(K,{children:e.jsx(z,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(P,{color:"error.main",sx:{fontWeight:"bold"},children:p.error.message})})});const v=async o=>{const n=o.filter(c=>!!c);j(n),await fetch(Je,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:n})})},q=async o=>{const n=Array.from(f),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),await v(n)},fe=async o=>{const n=Array.from(u),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),y(n),await fetch(`${W}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:n})})},J=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await fe(o):o.source.droppableId==="videos"&&await q(o),p.runAsync())},Z=o=>{_(o.trim()),a(!0)},G=async(o,n="")=>{let c=[];n?c=o?f.map(d=>d===n?o.trim():d):f.filter(d=>d!==n):o&&(c=[...f,o.trim()]),_(""),a(!1),(o||n)&&await v(c),p.runAsync()},xe=o=>{l(!0),S(o)},Q=()=>{l(!1),S("")};function be(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],n=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx(A,{title:r("common.logo"),rules:o,tips:n,children:e.jsx(m,{sx:{flex:1,cursor:"pointer"},children:e.jsx(Pe,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ye}?t=${N}`,onClick:()=>{var c;return(c=R.current)==null?void 0:c.open()}})})})}function ve(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${ce}`},{label:r("studio.size"),value:"<5MB"}],n=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx(A,{title:r("common.screenshot"),tips:n,rules:o,children:e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"screenshots",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[u.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>{const te=`${W}/${b}`;return e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"screenshot",src:te,onClick:()=>xe(b),style:{cursor:"pointer"}}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(te,{method:"DELETE"}),p.runAsync()},children:e.jsx(ie,{})})})]})}},b)),d.placeholder,u.length<ce&&c()]})})})});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>{var d;return(d=g.current)==null?void 0:d.open()},children:"+"})}}function je(){const o=[{label:r("studio.count"),value:`1~${de}`},{label:r("studio.videoType"),value:e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",e.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})}],n=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs(A,{title:r("studio.video"),tips:n,rules:o,children:[e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"videos",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[f.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"videos",src:We(b),onClick:()=>Z(b),style:{cursor:"pointer"}}),e.jsx(m,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>Z(b),children:e.jsx(ge,{})}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>G(null,b),children:e.jsx(ie,{})})})]})},b)),d.placeholder,f.length<de&&c()]})})}),i&&e.jsx(Y,{t:r,handleOperateVideo:G,defaultUrl:T,videos:f})]});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>a(!0),children:"+"})}}function ye(){return e.jsx(ue,{open:s,onClose:Q,maxWidth:"xl",PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none"}},children:e.jsx("img",{src:`${W}/${x}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:Q})})}function we(){return e.jsxs(h.Suspense,{fallback:e.jsx(M,{size:40}),children:[e.jsx(le,{ref:R,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=R.current)==null||o.close(),H(Date.now()),p.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Me,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","image/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),e.jsx(le,{ref:g,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=g.current)==null||o.close(),p.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Xe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-u.length}},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})}const Ce=`https://www.arcblock.io/docs/blocklet-store/${t}/supplying-images`;return e.jsx(K,{children:e.jsxs(Ze,{children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(P,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:(ee=p.data)==null?void 0:ee.title})}),e.jsxs(P,{variant:"body2",color:"text.secondary",children:[r("studio.description")," ",e.jsx("a",{href:Ce,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),be(),ve(),je(),ye(),we()]})})}function A({title:r,rules:t,tips:s,children:l}){return e.jsxs(m,{display:"flex",flexDirection:"column",sx:{mb:4},children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(P,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(z,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:t.map(a=>i(a.label,a.value))}),s.map(a=>e.jsx(m,{sx:{fontSize:"13px",opacity:.8},children:i(a.label,a.value)}))]}),l]});function i(a,u){return e.jsxs(m,{component:"span",children:[e.jsxs(m,{component:"span",sx:{color:"#555",mr:.5},children:[a,":"]}),e.jsx(m,{component:"span",sx:{color:"#007ec6"},children:u})]})}}A.propTypes={title:w.string.isRequired,rules:w.array.isRequired,tips:w.array.isRequired,children:w.node.isRequired};function Y({handleOperateVideo:r,t,defaultUrl:s="",videos:l}){var R;const[i,a]=h.useState(s),[u,y]=h.useState(!1),[f,j]=h.useState(!1),x=h.useRef(i),S=i!==s&&l.includes(i),T=!i&&s,_=!S&&(i&&i!==x.current||u),N=!!((R=navigator.clipboard)!=null&&R.readText),{run:H}=$e(p,{wait:500,leading:!0});return e.jsxs(ue,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(Re,{children:t(s?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(ke,{children:[e.jsx(Ee,{fullWidth:!0,value:i,onChange:g=>{const v=g.target.value.trim();a(v),v?H(v):j(!1)},placeholder:t("studio.videoInputLabel"),endAdornment:i?e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:()=>{a(""),p("")},children:e.jsx(Ve,{})})}):N&&e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:async()=>{try{const g=(await navigator.clipboard.readText()||"").trim();a(g),p(g)}catch(g){console.error(g)}},children:e.jsx(me,{})})})}),e.jsxs(m,{mb:2,mt:.5,children:[S&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.duplicateVideo")}),!S&&f&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.videoDialogNoSrc")})]}),x.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${x.current}`,src:Ue(x.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(m,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:u?e.jsx(M,{size:40}):e.jsx(P,{variant:"h5",color:"text.secondary",children:e.jsx(ge,{})})})]}),e.jsxs(_e,{children:[e.jsx($,{onClick:()=>r(),children:t("studio.cancel")}),T&&e.jsx($,{variant:"contained",color:"error",onClick:()=>r(null,s),children:t("studio.delete")}),_&&e.jsx($,{variant:"contained",onClick:()=>p(i),disabled:!i||u,children:t("studio.preview")}),!T&&!_&&e.jsx($,{variant:"contained",onClick:()=>r(x.current),disabled:!x.current||s===x.current||S,children:t("studio.confirm")})]})]});function p(g){x.current="";const v=Ae(g);j(g?!v:!1),v&&(y(!0),fetch(v).then(q=>{q.ok?(x.current=g,j(!1)):j(!0)}).catch(()=>{j(!0)}).finally(()=>y(!1)))}}Y.propTypes={handleOperateVideo:w.func.isRequired,t:w.func.isRequired,defaultUrl:w.string,videos:w.array.isRequired};Y.defaultProps={defaultUrl:""};function ge(){return e.jsxs("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:48,width:48,children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"black","fill-opacity":"0.54"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39.6667 28L21 17.5V38.5L39.6667 28Z",fill:"white"})]})}const Ze=De.div`
3
3
  margin-top: 24px;
4
4
  .image-wrapper {
5
5
  margin-bottom: 16px;
@@ -1,4 +1,4 @@
1
- import{b as AA,r as X}from"./vendor-react-DoD83n6N.js";import{H as v,j as A,I as J,bw as HA,y as o,P as PA,w as lA,a6 as jA,M as BA,q as yA,b_ as sA,O as eA,aa as e,a9 as zA,ag as h,cU as fA,bW as DA,E as ZA,bq as MA,ak as LA,T as R,X as p}from"./vendor-mui-core-DxD1UA4o.js";import{a$ as nA,d as q,Y as CA}from"./vendor-ux-did-connect-CiLSrCOH.js";import{v as aA}from"./vendor-hooks-BwVH-TAd.js";import{c as j}from"./vendor-arcblock-BtlDhznp.js";import{d as tA}from"./Done-BXISjL2g.js";import{F as uA,R as bA,L as k}from"./logo-uploader-zhddoC5p.js";import{E as TA}from"./EditIcon-5ixNT5sW.js";import{d as EA}from"./ArrowDropDown-DO9H_COV.js";import{z as cA,M as NA,O as mA}from"./index-tjRN_EVx.js";import{w as XA}from"./permission-C5Df-sxb.js";import{e as GA}from"./index-DIckhHU5.js";import{S as I}from"./dashboard-oxsbu66O.js";import"./vendor-utils-CTIzdAFg.js";import"./lottie-web-B6s7dDoL.js";import"./index-tUQxVYYQ.js";import"./session-DaQ4KCFD.js";import"./useLocalStorage-BXnF_60k.js";import"./confirm-BX8_-j-l.js";import"./format-error-LAoTjvJe.js";import"./PlayArrow-NjIpSDwJ.js";import"./get-safe-url-ZRaKUVld.js";import"./useAsyncRetry-k063P8TB.js";import"./useAsync-BmW5cnbx.js";import"./InfoOutlined-DO0_Vjz-.js";import"./useSetState-BL3ktMon.js";import"./use-mobile-CHMVa8_W.js";function U({triggers:f,onEnterEdit:t,disabled:x}){const w=AA.useRef(null),[B,d]=AA.useState(!1),H=c=>{d(!1),c()},P=()=>{d(c=>!c)},b=c=>{w.current&&w.current.contains(c.target)||d(!1)};return f.length===0?A.jsx(J,{"data-cy":"schema-form-item-edit",onClick:t,disabled:x,size:"large",children:A.jsx(TA,{})}):A.jsxs(A.Fragment,{children:[A.jsx(HA,{variant:"outlined",ref:w,"aria-label":"split button",children:A.jsx(o,{size:"large","aria-controls":B?"split-button-menu":void 0,"aria-expanded":B?"true":void 0,sx:{paddingLeft:"12px",paddingRight:"12px"},onClick:P,children:A.jsx(EA,{})})}),A.jsx(PA,{sx:{zIndex:9999},open:B,anchorEl:w.current,role:void 0,placement:"bottom-end",children:A.jsx(lA,{children:A.jsx(jA,{onClickAway:b,children:A.jsx(BA,{id:"split-button-menu",autoFocusItem:!0,children:f.map(c=>A.jsx(yA,{onClick:()=>H(c.handler),children:c.title},c.key))})})})})]})}U.propTypes={triggers:v.arrayOf(v.shape({key:v.string.isRequired,title:v.string.isRequired,handler:v.func.isRequired})),onEnterEdit:v.func.isRequired,disabled:v.bool.isRequired};U.defaultProps={triggers:[]};const vA=(f,t,x)=>f===null&&t&&x?"******":f?t?"******":f:"",YA=sA`
1
+ import{b as AA,r as X}from"./vendor-react-DoD83n6N.js";import{H as v,j as A,I as J,bw as HA,y as o,P as PA,w as lA,a6 as jA,M as BA,q as yA,b_ as sA,O as eA,aa as e,a9 as zA,ag as h,cU as fA,bW as DA,E as ZA,bq as MA,ak as LA,T as R,X as p}from"./vendor-mui-core-DxD1UA4o.js";import{a$ as nA,d as q,Y as CA}from"./vendor-ux-did-connect-CiLSrCOH.js";import{v as aA}from"./vendor-hooks-BwVH-TAd.js";import{c as j}from"./vendor-arcblock-BtlDhznp.js";import{d as tA}from"./Done-BXISjL2g.js";import{F as uA,R as bA,L as k}from"./logo-uploader-CcwN1uWX.js";import{E as TA}from"./EditIcon-5ixNT5sW.js";import{d as EA}from"./ArrowDropDown-DO9H_COV.js";import{z as cA,M as NA,O as mA}from"./index-CWohFZPl.js";import{w as XA}from"./permission-C5Df-sxb.js";import{e as GA}from"./index-Bx2tzf6d.js";import{S as I}from"./dashboard-D3KvORmC.js";import"./vendor-utils-CTIzdAFg.js";import"./lottie-web-B6s7dDoL.js";import"./index-tUQxVYYQ.js";import"./session-DaQ4KCFD.js";import"./useLocalStorage-BXnF_60k.js";import"./confirm-Fhl5qi_m.js";import"./format-error-LAoTjvJe.js";import"./PlayArrow-NjIpSDwJ.js";import"./get-safe-url-ZRaKUVld.js";import"./useAsyncRetry-BBomZj1z.js";import"./useAsync-DKE0K0bz.js";import"./InfoOutlined-DO0_Vjz-.js";import"./useSetState-BL3ktMon.js";import"./use-mobile-CHMVa8_W.js";function U({triggers:f,onEnterEdit:t,disabled:x}){const w=AA.useRef(null),[B,d]=AA.useState(!1),H=c=>{d(!1),c()},P=()=>{d(c=>!c)},b=c=>{w.current&&w.current.contains(c.target)||d(!1)};return f.length===0?A.jsx(J,{"data-cy":"schema-form-item-edit",onClick:t,disabled:x,size:"large",children:A.jsx(TA,{})}):A.jsxs(A.Fragment,{children:[A.jsx(HA,{variant:"outlined",ref:w,"aria-label":"split button",children:A.jsx(o,{size:"large","aria-controls":B?"split-button-menu":void 0,"aria-expanded":B?"true":void 0,sx:{paddingLeft:"12px",paddingRight:"12px"},onClick:P,children:A.jsx(EA,{})})}),A.jsx(PA,{sx:{zIndex:9999},open:B,anchorEl:w.current,role:void 0,placement:"bottom-end",children:A.jsx(lA,{children:A.jsx(jA,{onClickAway:b,children:A.jsx(BA,{id:"split-button-menu",autoFocusItem:!0,children:f.map(c=>A.jsx(yA,{onClick:()=>H(c.handler),children:c.title},c.key))})})})})]})}U.propTypes={triggers:v.arrayOf(v.shape({key:v.string.isRequired,title:v.string.isRequired,handler:v.func.isRequired})),onEnterEdit:v.func.isRequired,disabled:v.bool.isRequired};U.defaultProps={triggers:[]};const vA=(f,t,x)=>f===null&&t&&x?"******":f?t?"******":f:"",YA=sA`
2
2
  0%, 100% {
3
3
  transform: scale(1) translateX(0);
4
4
  }
@@ -1 +1 @@
1
- import{j as f,bl as P,H as a}from"./vendor-mui-core-DxD1UA4o.js";import{p as $,X as j}from"./vendor-ux-did-connect-CiLSrCOH.js";import{y as p}from"./vendor-utils-CTIzdAFg.js";import{z as y,A as E,T as h,U as R,V as A}from"./index-tjRN_EVx.js";function w({blocklet:r,ancestors:g=[]}){var d,m;const s=y(),{inService:n}=s,i=E(r==null?void 0:r.status)||h(r==null?void 0:r.status),o=`?v=${(d=r==null?void 0:r.meta)==null?void 0:d.version}${i?"~":""}`;let t=n?`${p(A,$.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${o}`:p(s.imgPrefix,"blocklet.png");if(r.source==="registry"&&r.deployedFrom&&r.meta.logo)t=`${p(r.deployedFrom,R(r.meta.bundleDid,r.meta.logo))}${o}`;else{const u=((m=window.env)==null?void 0:m.apiPrefix)||"/",e=g.concat(r),c=n?e.slice(1):e;t=`${p(u,`/blocklet/logo-bundle${c.map(x=>`/${x.meta.did}`).join("")}`)}${o}`}return{logoUrl:t,inService:n}}function v({blocklet:r,style:g,size:s,ancestors:n,...i}){const o=y(),{logoUrl:t,inService:d}=w({blocklet:r,ancestors:n}),{variant:m}=i,u=d?()=>{}:c=>{c.target.src=`${o.imgPrefix}/blocklet.png`};let e=f.jsx("img",{src:t,onError:u,alt:r.meta.name,style:{width:s}});return r.meta.logo||(e=f.jsx(j,{did:r.meta.did||"",responsive:!0})),f.jsx(P,{variant:m||"square",style:Object.assign({backgroundColor:"transparent",width:s,height:s,borderRadius:10},g),...i,children:e})}v.propTypes={blocklet:a.object.isRequired,style:a.object,size:a.oneOfType([a.number,a.string]),ancestors:a.array};v.defaultProps={style:{},size:40,ancestors:[]};export{v as B};
1
+ import{j as f,bl as P,H as a}from"./vendor-mui-core-DxD1UA4o.js";import{p as $,X as j}from"./vendor-ux-did-connect-CiLSrCOH.js";import{y as p}from"./vendor-utils-CTIzdAFg.js";import{z as y,A as E,T as h,U as R,V as A}from"./index-CWohFZPl.js";function w({blocklet:r,ancestors:g=[]}){var d,m;const s=y(),{inService:n}=s,i=E(r==null?void 0:r.status)||h(r==null?void 0:r.status),o=`?v=${(d=r==null?void 0:r.meta)==null?void 0:d.version}${i?"~":""}`;let t=n?`${p(A,$.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${o}`:p(s.imgPrefix,"blocklet.png");if(r.source==="registry"&&r.deployedFrom&&r.meta.logo)t=`${p(r.deployedFrom,R(r.meta.bundleDid,r.meta.logo))}${o}`;else{const u=((m=window.env)==null?void 0:m.apiPrefix)||"/",e=g.concat(r),c=n?e.slice(1):e;t=`${p(u,`/blocklet/logo-bundle${c.map(x=>`/${x.meta.did}`).join("")}`)}${o}`}return{logoUrl:t,inService:n}}function v({blocklet:r,style:g,size:s,ancestors:n,...i}){const o=y(),{logoUrl:t,inService:d}=w({blocklet:r,ancestors:n}),{variant:m}=i,u=d?()=>{}:c=>{c.target.src=`${o.imgPrefix}/blocklet.png`};let e=f.jsx("img",{src:t,onError:u,alt:r.meta.name,style:{width:s}});return r.meta.logo||(e=f.jsx(j,{did:r.meta.did||"",responsive:!0})),f.jsx(P,{variant:m||"square",style:Object.assign({backgroundColor:"transparent",width:s,height:s,borderRadius:10},g),...i,children:e})}v.propTypes={blocklet:a.object.isRequired,style:a.object,size:a.oneOfType([a.number,a.string]),ancestors:a.array};v.defaultProps={style:{},size:40,ancestors:[]};export{v as B};
@@ -1,4 +1,4 @@
1
- import{ag as d,j as e,a9 as T,aa as h,H as C}from"./vendor-mui-core-DxD1UA4o.js";import{u as B,a1 as _,Y as v,p as $}from"./vendor-ux-did-connect-CiLSrCOH.js";import{n as A,o as F,al as I,d as M,e as N,ad as W,am as z,P as H}from"./index-tjRN_EVx.js";import{r as a}from"./vendor-react-DoD83n6N.js";import{y as O}from"./vendor-utils-CTIzdAFg.js";import{L as V}from"./launch-result-message-Bvdtucih.js";import{g as X}from"./get-safe-url-CRmmLBFf.js";import{S as E}from"./button-leITu2bm.js";import{S as K}from"./layout-B4YOjaNK.js";import"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-BtlDhznp.js";import"./content-layout-BM34AwsG.js";const Q=d(V)`
1
+ import{ag as d,j as e,a9 as T,aa as h,H as C}from"./vendor-mui-core-DxD1UA4o.js";import{u as B,a1 as _,Y as v,p as $}from"./vendor-ux-did-connect-CiLSrCOH.js";import{n as A,o as F,al as I,d as M,e as N,ad as W,am as z,P as H}from"./index-CWohFZPl.js";import{r as a}from"./vendor-react-DoD83n6N.js";import{y as O}from"./vendor-utils-CTIzdAFg.js";import{L as V}from"./launch-result-message-Bvdtucih.js";import{g as X}from"./get-safe-url-CRmmLBFf.js";import{S as E}from"./button-leITu2bm.js";import{S as K}from"./layout-DbKPqvnm.js";import"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-BtlDhznp.js";import"./content-layout-BM34AwsG.js";const Q=d(V)`
2
2
  && .result-footer {
3
3
  height: 120px;
4
4
  > div {
@@ -1,4 +1,4 @@
1
- var Nw=Object.defineProperty;var Fw=(e,t,n)=>t in e?Nw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ho=(e,t,n)=>Fw(e,typeof t!="symbol"?t+"":t,n);import{cV as zw,ci as Te,ch as Ze,cf as Ww,a8 as Se,j as x,aa as Re,ab as Vn,H as oe,cW as cv,cX as uv,cY as Vw,bz as dv,ag as Nt,cZ as el,b_ as Kt,J as tl,c_ as pi,b6 as Jn,cB as ft,b2 as It,c$ as Uw,d0 as qw,c as Pe,_ as N,Z as yr,d1 as Ke,d2 as Hw,d3 as ys,b as qn,d4 as Xa,d5 as Gw,cC as Kw,d6 as Yw,b$ as Xw,cT as Qw,d7 as Zw,cD as Jw,g as ze,a as Le,k as Fe,d8 as fv,u as Gt,d9 as eS,d as nn,da as nl,db as Wp,o as on,dc as pv,i as Nr,dd as tS,de as mi,df as nS,dg as Vp,f as kd,dh as mv,di as rS,dj as oS,p as rl,K as aS,dk as iS,a$ as Up,aj as qp,O as Jt,I as an,ak as hv,T as Un,v as sS,q as Xn,a9 as Fr,e as lS,bl as cS,ao as ol,dl as uS,bu as dS,bs as Au,bv as Hp,bk as gv,y as fS,D as Gp,ai as Kp,t as Yp,bO as Xp,bg as Li,z as pS,bt as mS}from"./vendor-mui-core-DxD1UA4o.js";import{a4 as hS,y as Cs,aI as gS}from"./vendor-utils-CTIzdAFg.js";import{r as S,R as bS,d as hi,a as $e,g as Dd,b as tt,e as bv,c as vS,k as vv}from"./vendor-react-DoD83n6N.js";import{c6 as Ce,r as Vr,u as Yt,Y as ot,ci as yS,cj as CS,be as Qp,bf as xS,bg as wS,bh as SS,e as PS,b1 as gi,b6 as Zp,bH as TS,ck as kS,cl as DS,a$ as Tr,ak as al,p as Be,a1 as RS,b3 as ES,a4 as MS,h as Mn,B as Ni,_ as $S}from"./vendor-ux-did-connect-CiLSrCOH.js";import{B as yv,c as Qn,a1 as OS}from"./vendor-arcblock-BtlDhznp.js";import{z as Qt,C as Ur,O as yo,f as dt,M as Qa,az as IS,a3 as Cv,a4 as Co,am as xv,aA as wv,b as Ia,l as gc,aB as _S,a2 as AS}from"./index-tjRN_EVx.js";import{d as Sv}from"./TuneOutlined-Bry0vSC0.js";import{h as BS,W as xo,e as jS,i as Rd,B as Pv,b as LS}from"./dashboard-oxsbu66O.js";import{S as NS}from"./switch-control-DPANzJ8H.js";import{P as Bu,w as il}from"./permission-C5Df-sxb.js";import{d as Ed}from"./Edit-C1mcIe4c.js";import{d as Jp,c as FS,b as nt,_ as Je,o as zS,e as WS,i as VS,p as US,g as qS,r as kr}from"./slicedToArray-B8PdYes9.js";import{r as Ye,A as Md,B as Xt,C as xs,D as ju,t as qe,E as Tv,F as kv,j as Lu,m as HS,G as lr,H as GS,I as KS,J as Nu,K as Dv,L as YS,M as XS,N as Rv,O as $d,P as em,Q as QS,R as tm,S as ZS,T as JS,p as e1,e as nm,g as t1,b as bc,a as rm,c as n1,q as Fi,o as Qr,i as r1,d as o1,k as zi,l as vc,h as Wi,s as yc,f as Cc,x as a1,z as i1,n as s1,u as l1,v as c1,w as u1,U as d1,y as f1,V as p1,W as m1}from"./index-DzDfEcNp.js";import{a as Qe,u as Me,r as Za,d as qr,b as h1,w as ws,g as Ev,e as Mv,c as g1,o as Fu}from"./raf-schd.esm-GV-XhwE0.js";import{C as om}from"./click-to-copy-Cygm8U3_.js";import{d as am}from"./ChevronRight-CO9My6tF.js";import{d as b1}from"./ChevronLeft-BdrBCIFt.js";import{d as v1}from"./ArrowDropDown-DO9H_COV.js";import{f as En}from"./format-error-LAoTjvJe.js";import{A as y1,a as C1,b as x1,d as $v,B as w1,f as S1,c as P1}from"./add-component-core-DRJSzr-6.js";import{C as Mo}from"./confirm-BX8_-j-l.js";import{v as T1,b as Ss}from"./util-C9b90o5T.js";import{L as k1}from"./LockIcon-D3vSMIOk.js";import{d as Ov}from"./Launch-CIC8rZgo.js";import{D as D1}from"./delete-confirm-C0cAQSXq.js";import{d as R1}from"./InfoOutlined-DO0_Vjz-.js";import{I as E1}from"./iframe-C4N_8Wwh.js";import{B as M1}from"./bundle-avatar-DNxC8z4b.js";import{d as $1}from"./PlayArrow-NjIpSDwJ.js";import{A as Iv}from"./actions-BOikuUJD.js";import{I as xc}from"./index-BRz2myBK.js";import{W as O1}from"./did-address-GAxLGeWB.js";import{u as I1}from"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-BXnF_60k.js";import"./get-safe-url-ZRaKUVld.js";import"./index-DIckhHU5.js";import"./session-DaQ4KCFD.js";import"./useAsyncRetry-k063P8TB.js";import"./useAsync-BmW5cnbx.js";import"./useSetState-BL3ktMon.js";import"./use-mobile-CHMVa8_W.js";import"./item--dgEgBvz.js";import"./Done-BXISjL2g.js";import"./DeleteOutline-7AloJjcV.js";import"./launch-result-message-Bvdtucih.js";import"./page-header-Cu9lHawO.js";import"./config-space-CSSDG-WO.js";import"./spaces-D1rqZVaX.js";import"./api-3sG9at7i.js";import"./logo-uploader-zhddoC5p.js";import"./index-tUQxVYYQ.js";import"./index-CNl-IhR2.js";import"./Google-1eG1YH-u.js";import"./cloneDeep-kMVNpUap.js";import"./index-O2l0NSUF.js";import"./index-C-7MyHbp.js";import"./use-mobile-BHPd3bDQ.js";import"./content-layout-BM34AwsG.js";import"./connect-to-yIsMDJbM.js";import"./shorten-label-CwDvu4_S.js";import"./MoreHoriz-B8cBSV22.js";var _1=36e5;function A1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*_1)}var B1=864e5;function j1(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)/B1)}var L1=6e4;function N1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*L1)}function F1(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 z1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()-r.getFullYear()}function im(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 _v(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=im(n,r),a=Math.abs(j1(n,r));n.setDate(n.getDate()-o*a);var i=+(im(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 sm={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},W1="trunc";function bi(e){return e?sm[e]:sm[W1]}function V1(e,t,n){Ye(2,arguments);var r=sl(e,t)/Tv;return bi(void 0)(r)}function U1(e,t,n){Ye(2,arguments);var r=sl(e,t)/kv;return bi(void 0)(r)}function zu(e){Ye(1,arguments);var t=qe(e);return t.setHours(23,59,59,999),t}function q1(e){Ye(1,arguments);var t=qe(e);return zu(t).getTime()===Lu(t).getTime()}function Av(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(HS(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;q1(qe(e))&&a===1&&Fa(e,r)===1&&(s=!1),i=o*(a-Number(s))}return i===0?0:i}function H1(e,t,n){Ye(2,arguments);var r=Av(e,t)/3;return bi(void 0)(r)}function G1(e,t,n){Ye(2,arguments);var r=sl(e,t)/1e3;return bi(void 0)(r)}function K1(e,t,n){Ye(2,arguments);var r=_v(e,t)/7;return bi(void 0)(r)}function Y1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(z1(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 X1(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 Q1(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 Z1(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 b=o.getTimezoneOffset();if(b!==0){var h=Math.abs(b),w=lr(Math.floor(h/60),2),v=lr(h%60,2),g=b<0?"+":"-";c="".concat(g).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 J1(e){Ye(1,arguments);var t=qe(e),n=t.getDay();return n}function eP(e){Ye(1,arguments);var t=qe(e),n=t.getHours();return n}function tP(e){Ye(1,arguments);var t=qe(e),n=t.getMinutes();return n}function nP(e){Ye(1,arguments);var t=qe(e),n=t.getSeconds();return n}function rP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getTime()===r.getTime()}function lm(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=zw(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 Nw=Object.defineProperty;var Fw=(e,t,n)=>t in e?Nw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ho=(e,t,n)=>Fw(e,typeof t!="symbol"?t+"":t,n);import{cV as zw,ci as Te,ch as Ze,cf as Ww,a8 as Se,j as x,aa as Re,ab as Vn,H as oe,cW as cv,cX as uv,cY as Vw,bz as dv,ag as Nt,cZ as el,b_ as Kt,J as tl,c_ as pi,b6 as Jn,cB as ft,b2 as It,c$ as Uw,d0 as qw,c as Pe,_ as N,Z as yr,d1 as Ke,d2 as Hw,d3 as ys,b as qn,d4 as Xa,d5 as Gw,cC as Kw,d6 as Yw,b$ as Xw,cT as Qw,d7 as Zw,cD as Jw,g as ze,a as Le,k as Fe,d8 as fv,u as Gt,d9 as eS,d as nn,da as nl,db as Wp,o as on,dc as pv,i as Nr,dd as tS,de as mi,df as nS,dg as Vp,f as kd,dh as mv,di as rS,dj as oS,p as rl,K as aS,dk as iS,a$ as Up,aj as qp,O as Jt,I as an,ak as hv,T as Un,v as sS,q as Xn,a9 as Fr,e as lS,bl as cS,ao as ol,dl as uS,bu as dS,bs as Au,bv as Hp,bk as gv,y as fS,D as Gp,ai as Kp,t as Yp,bO as Xp,bg as Li,z as pS,bt as mS}from"./vendor-mui-core-DxD1UA4o.js";import{a4 as hS,y as Cs,aI as gS}from"./vendor-utils-CTIzdAFg.js";import{r as S,R as bS,d as hi,a as $e,g as Dd,b as tt,e as bv,c as vS,k as vv}from"./vendor-react-DoD83n6N.js";import{c6 as Ce,r as Vr,u as Yt,Y as ot,ci as yS,cj as CS,be as Qp,bf as xS,bg as wS,bh as SS,e as PS,b1 as gi,b6 as Zp,bH as TS,ck as kS,cl as DS,a$ as Tr,ak as al,p as Be,a1 as RS,b3 as ES,a4 as MS,h as Mn,B as Ni,_ as $S}from"./vendor-ux-did-connect-CiLSrCOH.js";import{B as yv,c as Qn,a1 as OS}from"./vendor-arcblock-BtlDhznp.js";import{z as Qt,C as Ur,O as yo,f as dt,M as Qa,az as IS,a3 as Cv,a4 as Co,am as xv,aA as wv,b as Ia,l as gc,aB as _S,a2 as AS}from"./index-CWohFZPl.js";import{d as Sv}from"./TuneOutlined-Bry0vSC0.js";import{h as BS,W as xo,e as jS,i as Rd,B as Pv,b as LS}from"./dashboard-D3KvORmC.js";import{S as NS}from"./switch-control-DPANzJ8H.js";import{P as Bu,w as il}from"./permission-C5Df-sxb.js";import{d as Ed}from"./Edit-C1mcIe4c.js";import{d as Jp,c as FS,b as nt,_ as Je,o as zS,e as WS,i as VS,p as US,g as qS,r as kr}from"./slicedToArray-B8PdYes9.js";import{r as Ye,A as Md,B as Xt,C as xs,D as ju,t as qe,E as Tv,F as kv,j as Lu,m as HS,G as lr,H as GS,I as KS,J as Nu,K as Dv,L as YS,M as XS,N as Rv,O as $d,P as em,Q as QS,R as tm,S as ZS,T as JS,p as e1,e as nm,g as t1,b as bc,a as rm,c as n1,q as Fi,o as Qr,i as r1,d as o1,k as zi,l as vc,h as Wi,s as yc,f as Cc,x as a1,z as i1,n as s1,u as l1,v as c1,w as u1,U as d1,y as f1,V as p1,W as m1}from"./index-DzDfEcNp.js";import{a as Qe,u as Me,r as Za,d as qr,b as h1,w as ws,g as Ev,e as Mv,c as g1,o as Fu}from"./raf-schd.esm-GV-XhwE0.js";import{C as om}from"./click-to-copy-Cygm8U3_.js";import{d as am}from"./ChevronRight-CO9My6tF.js";import{d as b1}from"./ChevronLeft-BdrBCIFt.js";import{d as v1}from"./ArrowDropDown-DO9H_COV.js";import{f as En}from"./format-error-LAoTjvJe.js";import{A as y1,a as C1,b as x1,d as $v,B as w1,f as S1,c as P1}from"./add-component-core-YuQ3TiFu.js";import{C as Mo}from"./confirm-Fhl5qi_m.js";import{v as T1,b as Ss}from"./util-rMFbd0lA.js";import{L as k1}from"./LockIcon-D3vSMIOk.js";import{d as Ov}from"./Launch-CIC8rZgo.js";import{D as D1}from"./delete-confirm-Dtzz6Jaz.js";import{d as R1}from"./InfoOutlined-DO0_Vjz-.js";import{I as E1}from"./iframe-C4N_8Wwh.js";import{B as M1}from"./bundle-avatar-CSEBu3MU.js";import{d as $1}from"./PlayArrow-NjIpSDwJ.js";import{A as Iv}from"./actions-BOikuUJD.js";import{I as xc}from"./index-BRz2myBK.js";import{W as O1}from"./did-address-GAxLGeWB.js";import{u as I1}from"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-BXnF_60k.js";import"./get-safe-url-ZRaKUVld.js";import"./index-Bx2tzf6d.js";import"./session-DaQ4KCFD.js";import"./useAsyncRetry-BBomZj1z.js";import"./useAsync-DKE0K0bz.js";import"./useSetState-BL3ktMon.js";import"./use-mobile-CHMVa8_W.js";import"./item-D8zBx1dJ.js";import"./Done-BXISjL2g.js";import"./DeleteOutline-7AloJjcV.js";import"./launch-result-message-Bvdtucih.js";import"./page-header-Cu9lHawO.js";import"./config-space-Bc3ndGw-.js";import"./spaces-D1rqZVaX.js";import"./api-3sG9at7i.js";import"./logo-uploader-CcwN1uWX.js";import"./index-tUQxVYYQ.js";import"./index-DHEDtVhz.js";import"./Google-1eG1YH-u.js";import"./cloneDeep-kMVNpUap.js";import"./index-O2l0NSUF.js";import"./index-C-7MyHbp.js";import"./use-mobile-BHPd3bDQ.js";import"./content-layout-BM34AwsG.js";import"./connect-to-BMDSElVg.js";import"./shorten-label-CwDvu4_S.js";import"./MoreHoriz-B8cBSV22.js";var _1=36e5;function A1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*_1)}var B1=864e5;function j1(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)/B1)}var L1=6e4;function N1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*L1)}function F1(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 z1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()-r.getFullYear()}function im(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 _v(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=im(n,r),a=Math.abs(j1(n,r));n.setDate(n.getDate()-o*a);var i=+(im(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 sm={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},W1="trunc";function bi(e){return e?sm[e]:sm[W1]}function V1(e,t,n){Ye(2,arguments);var r=sl(e,t)/Tv;return bi(void 0)(r)}function U1(e,t,n){Ye(2,arguments);var r=sl(e,t)/kv;return bi(void 0)(r)}function zu(e){Ye(1,arguments);var t=qe(e);return t.setHours(23,59,59,999),t}function q1(e){Ye(1,arguments);var t=qe(e);return zu(t).getTime()===Lu(t).getTime()}function Av(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(HS(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;q1(qe(e))&&a===1&&Fa(e,r)===1&&(s=!1),i=o*(a-Number(s))}return i===0?0:i}function H1(e,t,n){Ye(2,arguments);var r=Av(e,t)/3;return bi(void 0)(r)}function G1(e,t,n){Ye(2,arguments);var r=sl(e,t)/1e3;return bi(void 0)(r)}function K1(e,t,n){Ye(2,arguments);var r=_v(e,t)/7;return bi(void 0)(r)}function Y1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(z1(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 X1(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 Q1(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 Z1(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 b=o.getTimezoneOffset();if(b!==0){var h=Math.abs(b),w=lr(Math.floor(h/60),2),v=lr(h%60,2),g=b<0?"+":"-";c="".concat(g).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 J1(e){Ye(1,arguments);var t=qe(e),n=t.getDay();return n}function eP(e){Ye(1,arguments);var t=qe(e),n=t.getHours();return n}function tP(e){Ye(1,arguments);var t=qe(e),n=t.getMinutes();return n}function nP(e){Ye(1,arguments);var t=qe(e),n=t.getSeconds();return n}function rP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getTime()===r.getTime()}function lm(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=zw(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 Bv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bv=function(){return!!e})()}function rt(e){var t=Bv();return function(){var n,r=Jp(e);if(t){var o=Jp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return FS(this,n)}}var oP=10,jv=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}(),aP=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}(jv),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",oP),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}(jv),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 aP(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(n,r,o){return!0}}]),e}(),sP=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*Tv+a*kv+i*GS),rest:t.slice(n[0].length)}}function Lv(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 Nv(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 Fv(e){return e%400===0||e%4===0&&e%100!==0}var 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",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=Nv(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),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",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=KS(o,s);if(i.isTwoDigitYear){var l=Nv(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),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",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),Dv(s)}}]),n}(at),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",["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),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",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),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",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),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),"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),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",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 gP(e,t,n){Ye(2,arguments);var r=qe(e),o=Xt(t),a=YS(r,n)-o;return r.setUTCDate(r.getUTCDate()-a*7),r}var 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",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(gP(o,i,s),s)}}]),n}(at);function vP(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t),o=XS(n)-r;return n.setUTCDate(n.getUTCDate()-o*7),n}var yP=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 Dv(vP(o,i))}}]),n}(at),CP=[31,28,31,30,31,30,31,31,30,31,30,31],xP=[31,29,31,30,31,30,31,31,30,31,30,31],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",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=Fv(i),c=o.getUTCMonth();return s?a>=1&&a<=xP[c]:a>=1&&a<=CP[c]}},{key:"set",value:function(o,a,i){return o.setUTCDate(i),o.setUTCHours(0,0,0,0),o}}]),n}(at),SP=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=Fv(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=Rv(),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),b=Xt(t),h=m.getUTCDay(),w=b%7,v=(w+7)%7,g=(v<f?7:0)+b-h;return m.setUTCDate(m.getUTCDate()+g),m}var 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",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),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),"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),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),"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 DP(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 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","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=DP(o,i),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",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),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",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),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",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),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",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),_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",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),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",["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),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",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),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",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),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",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),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",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),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",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),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",40),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return Lv(o)}},{key:"set",value:function(o,a,i){return[new Date(i*1e3),{timestampIsSet:!0}]}}]),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",20),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return Lv(o)}},{key:"set",value:function(o,a,i){return[new Date(i),{timestampIsSet:!0}]}}]),n}(at),VP={G:new sP,y:new lP,Y:new cP,R:new uP,u:new dP,Q:new fP,q:new pP,M:new mP,L:new hP,w:new bP,I:new yP,d:new wP,D:new SP,E:new PP,e:new TP,c:new kP,i:new RP,a:new EP,b:new MP,B:new $P,h:new OP,H:new IP,K:new _P,k:new AP,m:new BP,s:new jP,S:new LP,X:new NP,x:new FP,t:new zP,T:new WP},UP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,HP=/^'([^]*?)'?$/,GP=/''/g,KP=/\S/,YP=/[a-zA-Z]/;function XP(e,t,n,r){var o,a,i,s,c,l,d,u,f,m,b,h,w,v,g,p,y,D;Ye(3,arguments);var P=String(e),T=String(t),k=Rv(),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((b=(h=(w=(v=r==null?void 0:r.weekStartsOn)!==null&&v!==void 0?v:r==null||(g=r.locale)===null||g===void 0||(p=g.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&&b!==void 0?b: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 iP],I=T.match(qP).map(function(H){var K=H[0];if(K in em){var Q=em[K];return Q(H,C.formatLong)}return H}).join("").match(UP),_=[],A=lm(I),F;try{var L=function(){var K=F.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&QS(K)&&tm(K,T,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&ZS(K)&&tm(K,T,e);var Q=K[0],ie=VP[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(YP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(K==="''"?K="'":Q==="'"&&(K=QP(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(Ww(W)==="object")return W.v}}catch(H){A.e(H)}finally{A.f()}if(P.length>0&&KP.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=JS(E,ju(E)),U={},j=lm(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],Q1(U,V[1])):q=V}}catch(H){j.e(H)}finally{j.f()}return q}function QP(e){return e.match(HP)[1].replace(GP,"'")}function cm(e){Ye(1,arguments);var t=qe(e);return t.setMinutes(0,0,0),t}function ZP(e,t){Ye(2,arguments);var n=cm(e),r=cm(t);return n.getTime()===r.getTime()}function JP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()===r.getFullYear()}function eT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setDate(r),n}function tT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setHours(r),n}function nT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setMinutes(r),n}function rT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setSeconds(r),n}var _d={},oT=Se;Object.defineProperty(_d,"__esModule",{value:!0});var zv=_d.default=void 0,aT=oT(Vr()),iT=x;zv=_d.default=(0,aT.default)((0,iT.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(NS,{checked:c,onChange:s,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}Ad.propTypes={children:oe.any};Ad.defaultProps={children:null};var Wv={},Go={},wc={};function Vv(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=Vv(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=Vv(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 Uv(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 qv(e){if(!hr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=qv(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])?qv(t[o]):t[o]:r[o]=t[o]}),r}function za(e,t){return t?Lr(e,t,{clone:!1}):e}function sT(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 lT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function cT(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 uT(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},um={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ll[e]}px)`},dT={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||um;return t.reduce((i,s,c)=>(i[a.up(a.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const a=r.breakpoints||um;return Object.keys(t).reduce((i,s)=>{if(lT(a.keys,s)){const c=cT(r.containerQueries?r:dT,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 fT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function pT(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"?"":Uv(u)}`,u)),n===!1?f:{[n]:f}})};return a.propTypes={},a.filterProps=[t],a}function mT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const hT={m:"margin",p:"padding"},gT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},dm={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},bT=mT(e=>{if(e.length>2)if(dm[e])e=dm[e];else return[e];const[t,n]=e.split(""),r=hT[t],o=gT[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 vT(e,t){return n=>e.reduce((r,o)=>(r[o]=yi(t,n),r),{})}function yT(e,t,n,r){if(!t.includes(n))return null;const o=bT(n),a=vT(o,r),i=e[n];return er(e,i,a)}function Hv(e,t){const n=Ld(e.theme);return Object.keys(e).map(r=>yT(e,t,r,n)).reduce(za,{})}function xt(e){return Hv(e,Bd)}xt.propTypes={};xt.filterProps=Bd;function wt(e){return Hv(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 CT=Pn("border",mn),xT=Pn("borderTop",mn),wT=Pn("borderRight",mn),ST=Pn("borderBottom",mn),PT=Pn("borderLeft",mn),TT=Pn("borderColor"),kT=Pn("borderTopColor"),DT=Pn("borderRightColor"),RT=Pn("borderBottomColor"),ET=Pn("borderLeftColor"),MT=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(CT,xT,wT,ST,PT,TT,kT,DT,RT,ET,dl,MT,$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 OT=Mt({prop:"gridColumn"}),IT=Mt({prop:"gridRow"}),_T=Mt({prop:"gridAutoFlow"}),AT=Mt({prop:"gridAutoColumns"}),BT=Mt({prop:"gridAutoRows"}),jT=Mt({prop:"gridTemplateColumns"}),LT=Mt({prop:"gridTemplateRows"}),NT=Mt({prop:"gridTemplateAreas"}),FT=Mt({prop:"gridArea"});ul(fl,pl,ml,OT,IT,_T,AT,BT,jT,LT,NT,FT);function mo(e,t){return t==="grey"?t:e}const zT=Mt({prop:"color",themeKey:"palette",transform:mo}),WT=Mt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:mo}),VT=Mt({prop:"backgroundColor",themeKey:"palette",transform:mo});ul(zT,WT,VT);function en(e){return e<=1&&e!==0?`${e*100}%`:e}const UT=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 qT=Mt({prop:"minWidth",transform:en}),HT=Mt({prop:"height",transform:en}),GT=Mt({prop:"maxHeight",transform:en}),KT=Mt({prop:"minHeight",transform:en});Mt({prop:"size",cssProperty:"width",transform:en});Mt({prop:"size",cssProperty:"height",transform:en});const YT=Mt({prop:"boxSizing"});ul(UT,Nd,qT,HT,GT,KT,YT);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 XT(...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 QT(e,t){return typeof e=="function"?e(t):e}function ZT(){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,b=>{let h=ks(f,d,b);return b===h&&typeof b=="string"&&(h=ks(f,d,`${n}${b==="default"?"":Uv(b)}`,b)),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=fT(o.breakpoints),d=Object.keys(l);let u=l;return Object.keys(c).forEach(f=>{const m=QT(c[f],o);if(m!=null)if(typeof m=="object")if(a[f])u=za(u,e(f,m,o,a));else{const b=er({theme:o},m,h=>({[f]:h}));XT(b,m)?u[f]=t({sx:m,theme:o}):u=za(u,b)}else u=za(u,e(f,m,o,a))}),sT(o,pT(d,u))}return Array.isArray(r)?r.map(i):i(r)}return t}const Hr=ZT();Hr.filterProps=["sx"];const JT=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 Gv(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=JT(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 ek=e=>{const t=uv(e);class n extends Vw{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=ek({key:"css",prepend:!0}));function tk(e){const{injectFirst:t,children:n}=e;return t&&Vu?x.jsx(cv,{value:Vu,children:n}):n}function nk(e){return e==null||Object.keys(e).length===0}function Kv(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(nk(o)?n:o):t;return x.jsx(dv,{styles:r})}/**
3
3
  * @mui/styled-engine v6.1.0
4
4
  *
@@ -1,4 +1,4 @@
1
- import{j as i,ag as U,H as f,v as q}from"./vendor-mui-core-DxD1UA4o.js";import{r as c}from"./vendor-react-DoD83n6N.js";import{y as F,_ as G,ag as H,I as M}from"./vendor-utils-CTIzdAFg.js";import{u as z,p as D,Y}from"./vendor-ux-did-connect-CiLSrCOH.js";import{S as Q}from"./index-CNl-IhR2.js";import{P as $}from"./page-header-Cu9lHawO.js";import{n as V,H as W,f as _}from"./index-tjRN_EVx.js";import{c as d}from"./vendor-arcblock-BtlDhznp.js";import{S as X}from"./layout-B4YOjaNK.js";import{S as J}from"./step-actions-BAf7tRyq.js";import{S as Z}from"./button-leITu2bm.js";import"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";import"./Done-BXISjL2g.js";import"./Google-1eG1YH-u.js";import"./cloneDeep-kMVNpUap.js";import"./logo-uploader-zhddoC5p.js";import"./index-tUQxVYYQ.js";import"./content-layout-BM34AwsG.js";import"./use-mobile-CHMVa8_W.js";function x({children:h,bottom:E,onBottomFix:m}){const p=c.useRef(null),o=c.useRef(null),u=c.useRef(null),l=c.useRef(null),[g,C]=c.useState(!1);return c.useEffect(()=>{let a;const t=()=>{a||(a=setTimeout(()=>{o.current&&(o.current.scrollHeight>p.current.clientHeight-u.current.clientHeight?(l.current!=="fix"&&(m("fix"),l.current="fix"),C(!0)):(l.current!=="scroll"&&(m("scroll"),l.current="scroll"),C(!1))),a=null},50))};let s;return window.ResizeObserver?s=new ResizeObserver(t):window.addEventListener("resize",t),s.observe(p.current),s.observe(o.current),()=>{s?s.disconnect():window.removeEventListener("resize",t),a&&clearTimeout(a)}},[m]),i.jsxs(ee,{ref:p,className:`${g?"scroll-mode":""}`,children:[i.jsx("div",{className:"compact-context",ref:o,children:h}),i.jsx("div",{className:"fix-container",ref:u,children:E})]})}const ee=U.div`
1
+ import{j as i,ag as U,H as f,v as q}from"./vendor-mui-core-DxD1UA4o.js";import{r as c}from"./vendor-react-DoD83n6N.js";import{y as F,_ as G,ag as H,I as M}from"./vendor-utils-CTIzdAFg.js";import{u as z,p as D,Y}from"./vendor-ux-did-connect-CiLSrCOH.js";import{S as Q}from"./index-DHEDtVhz.js";import{P as $}from"./page-header-Cu9lHawO.js";import{n as V,H as W,f as _}from"./index-CWohFZPl.js";import{c as d}from"./vendor-arcblock-BtlDhznp.js";import{S as X}from"./layout-DbKPqvnm.js";import{S as J}from"./step-actions-BnMmi82x.js";import{S as Z}from"./button-leITu2bm.js";import"./vendor-hooks-BwVH-TAd.js";import"./lottie-web-B6s7dDoL.js";import"./Done-BXISjL2g.js";import"./Google-1eG1YH-u.js";import"./cloneDeep-kMVNpUap.js";import"./logo-uploader-CcwN1uWX.js";import"./index-tUQxVYYQ.js";import"./content-layout-BM34AwsG.js";import"./use-mobile-CHMVa8_W.js";function x({children:h,bottom:E,onBottomFix:m}){const p=c.useRef(null),o=c.useRef(null),u=c.useRef(null),l=c.useRef(null),[g,C]=c.useState(!1);return c.useEffect(()=>{let a;const t=()=>{a||(a=setTimeout(()=>{o.current&&(o.current.scrollHeight>p.current.clientHeight-u.current.clientHeight?(l.current!=="fix"&&(m("fix"),l.current="fix"),C(!0)):(l.current!=="scroll"&&(m("scroll"),l.current="scroll"),C(!1))),a=null},50))};let s;return window.ResizeObserver?s=new ResizeObserver(t):window.addEventListener("resize",t),s.observe(p.current),s.observe(o.current),()=>{s?s.disconnect():window.removeEventListener("resize",t),a&&clearTimeout(a)}},[m]),i.jsxs(ee,{ref:p,className:`${g?"scroll-mode":""}`,children:[i.jsx("div",{className:"compact-context",ref:o,children:h}),i.jsx("div",{className:"fix-container",ref:u,children:E})]})}const ee=U.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;