@abtnode/blocklet-services 1.16.52-beta-20250917-070942-7ee57044 → 1.16.52-beta-20250922-225859-f34775fa

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 (144) hide show
  1. package/api/routes/mcp.js +2 -0
  2. package/dist/assets/{AdapterDayjs-CRMDLq6K.js → AdapterDayjs-Ch1GqpK7.js} +1 -1
  3. package/dist/assets/{Google-Co0ES_Ef.js → Google-CZPwmMCG.js} +1 -1
  4. package/dist/assets/{access-control-CXa4XdTR.js → access-control-CUncF5eX.js} +1 -1
  5. package/dist/assets/{add-component-core-C8Wvhlwd.js → add-component-core-DTRxHh-8.js} +1 -1
  6. package/dist/assets/{add-resource-CKVcDfq1.js → add-resource-YxBtdKAz.js} +1 -1
  7. package/dist/assets/{addon-CGYbwnAQ.js → addon-C-cTa3hU.js} +2 -2
  8. package/dist/assets/{advanced-BHQ085Rc.js → advanced-Bc2FwW94.js} +1 -1
  9. package/dist/assets/{aigne-CSzB6EAi.js → aigne-BmhUzMaB.js} +1 -1
  10. package/dist/assets/{appearance-wlMh61hK.js → appearance-KZ98aKpU.js} +1 -1
  11. package/dist/assets/{arrow-down.svg-2NUXhc9M.js → arrow-down.svg-DNHk5QBL.js} +1 -1
  12. package/dist/assets/{audit-logs-OiH-ZCCu.js → audit-logs-CToENzIH.js} +1 -1
  13. package/dist/assets/{authorize-C1p1aX84.js → authorize-Cr07b2RV.js} +1 -1
  14. package/dist/assets/{base32-Bs5DmmgZ.js → base32-9HlsUoU3.js} +1 -1
  15. package/dist/assets/{bind-account-CnWbtI8I.js → bind-account-DGyijOaV.js} +1 -1
  16. package/dist/assets/{branding-C1lgysY6.js → branding-Bop5aLE8.js} +1 -1
  17. package/dist/assets/{branding-BnhQzGq_.js → branding-EXYczJqB.js} +1 -1
  18. package/dist/assets/{branding-Bk8D93gd.js → branding-rX1QvJVq.js} +2 -2
  19. package/dist/assets/{bundle-avatar-CF-8YjIk.js → bundle-avatar-BhNvlq8g.js} +1 -1
  20. package/dist/assets/{button-bUtVfsu_.js → button-D5GaRQPz.js} +1 -1
  21. package/dist/assets/{click-to-copy-BWrdBff2.js → click-to-copy-Dqmzk5Lh.js} +1 -1
  22. package/dist/assets/{complete-C_JNPzD5.js → complete-CE-9uScC.js} +1 -1
  23. package/dist/assets/{component-IFve4dXC.js → component-BGn03l-s.js} +3 -3
  24. package/dist/assets/{config-DBzwJyqc.js → config-CLkKQ7r7.js} +1 -1
  25. package/dist/assets/{config-CKpqEH5r.js → config-Ce7mmKUy.js} +1 -1
  26. package/dist/assets/{config-BPieGs6J.js → config-CiMC747A.js} +1 -1
  27. package/dist/assets/{config-navigation-pmywYpni.js → config-navigation-C_bXC3i-.js} +3 -3
  28. package/dist/assets/{config-space-Da0MmMPn.js → config-space-B1RlBsPr.js} +1 -1
  29. package/dist/assets/{confirm-BSaR4_fO.js → confirm-DUjUXcfn.js} +1 -1
  30. package/dist/assets/{connect-9m4Nmfes.js → connect-Cd4wFjvm.js} +1 -1
  31. package/dist/assets/{connect-BuRk8HoH.js → connect-DWVzC8Cs.js} +1 -1
  32. package/dist/assets/{connect-to-DhIpK6hj.js → connect-to-DgA22hrU.js} +1 -1
  33. package/dist/assets/{createClass-BFCNnTU0.js → createClass-CDs8uNCX.js} +1 -1
  34. package/dist/assets/{dashboard-DgmOVZgS.js → dashboard-q_CEWNOG.js} +3 -3
  35. package/dist/assets/{delete-confirm-BR2z4Ljn.js → delete-confirm-BIF7Oky1.js} +1 -1
  36. package/dist/assets/{did-address-D6qV21Cc.js → did-address-CNnw4_bl.js} +1 -1
  37. package/dist/assets/{domain-CkwVqsGZ.js → domain-DXf6J0eN.js} +1 -1
  38. package/dist/assets/{domain-action-card-DmX4ipuD.js → domain-action-card-BfXWszwh.js} +1 -1
  39. package/dist/assets/{domains-IK6JBOMk.js → domains-CbRUCl8I.js} +1 -1
  40. package/dist/assets/{email-C7dt-OoA.js → email-C99N-_0O.js} +1 -1
  41. package/dist/assets/engine-Cc4hAHgQ.js +1 -0
  42. package/dist/assets/{exchange-passport-BlpeYXD-.js → exchange-passport-iJ_WwErZ.js} +1 -1
  43. package/dist/assets/{form-BoRGzdQH.js → form-B28GN43f.js} +1 -1
  44. package/dist/assets/{form-text-input-qFGxuulC.js → form-text-input-xNlMjrH6.js} +1 -1
  45. package/dist/assets/{fuel-DPqYXNcT.js → fuel-BTDuZSSj.js} +1 -1
  46. package/dist/assets/{gen-access-key-DTf8XM_B.js → gen-access-key-naR-6zBu.js} +1 -1
  47. package/dist/assets/{gen-simple-access-key-BHpsJW1z.js → gen-simple-access-key-C7ybjshX.js} +1 -1
  48. package/dist/assets/get-safe-url-PVZ8sNva.js +1 -0
  49. package/dist/assets/{hdkey-iF7Zd5Mt.js → hdkey-CcHIRiJU.js} +1 -1
  50. package/dist/assets/{home-Bq8Kaby6.js → home-BQG60l8o.js} +1 -1
  51. package/dist/assets/{iframe-BZdurKlN.js → iframe-sRTCxuKq.js} +1 -1
  52. package/dist/assets/{index-DEdn8u__.js → index-B06oP6vd.js} +1 -1
  53. package/dist/assets/{index-ptPisY0K.js → index-B2Y1qZ07.js} +2 -2
  54. package/dist/assets/{index-DGBu1iXZ.js → index-BHu1ffJP.js} +1 -1
  55. package/dist/assets/{index-DIzco3bK.js → index-BT7jxh7R.js} +1 -1
  56. package/dist/assets/{index-VRhIKoNb.js → index-BVZj6aBL.js} +1 -1
  57. package/dist/assets/{index-C91ORskB.js → index-BXOWDqXU.js} +1 -1
  58. package/dist/assets/{index-BTbAsTsB.js → index-BqyC8rPJ.js} +1 -1
  59. package/dist/assets/{index-DVNnjX93.js → index-CKFVrVhW.js} +1 -1
  60. package/dist/assets/{index-CGdAaiDX.js → index-CNvRrWdA.js} +1 -1
  61. package/dist/assets/{index-BUKvf-Yt.js → index-Ck6n4b0a.js} +1 -1
  62. package/dist/assets/{index-BJftyOWK.js → index-Co6fM09o.js} +1 -1
  63. package/dist/assets/{index-0r-rUxmD.js → index-CtG4EPx1.js} +1 -1
  64. package/dist/assets/{index-6k6hDX7K.js → index-D5Esor4q.js} +55 -55
  65. package/dist/assets/{index-klWBrV7H.js → index-DANBSlDF.js} +1 -1
  66. package/dist/assets/{index-BE6_aQqm.js → index-DDpL_qpY.js} +1 -1
  67. package/dist/assets/{index-CvK2LB0C.js → index-DIfIqZRw.js} +3 -3
  68. package/dist/assets/{index-DlbJhxX4.js → index-DL5x17V7.js} +1 -1
  69. package/dist/assets/{index-BioPPNyR.js → index-DP4_T7ss.js} +1 -1
  70. package/dist/assets/{index-DzHxtRuX.js → index-D_tcdsnn.js} +1 -1
  71. package/dist/assets/{index-D0zr5fnU.js → index-DbV_otyH.js} +4 -4
  72. package/dist/assets/{index-C7WNgxRc.js → index-De78rJ-L.js} +1 -1
  73. package/dist/assets/{index-BxgIheOv.js → index-DhLCZYhn.js} +1 -1
  74. package/dist/assets/{index-1BANSka2.js → index-DzI9kX_C.js} +1 -1
  75. package/dist/assets/{index-BcOGe7jx.js → index-I4fObt9S.js} +1 -1
  76. package/dist/assets/{index-ZScchkNG.js → index-P7sOU3FB.js} +1 -1
  77. package/dist/assets/{index-Cw5ltvNg.js → index-VDwida7T.js} +1 -1
  78. package/dist/assets/{index-DtDqVnOd.js → index-mK8LnyWX.js} +1 -1
  79. package/dist/assets/{invitation-BbSlWYAY.js → invitation-xW_qcQrB.js} +1 -1
  80. package/dist/assets/{invite-DKkAcNxp.js → invite-5NmeedgR.js} +1 -1
  81. package/dist/assets/{isURL-BOLVWN6q.js → isURL-DZGsNcmL.js} +1 -1
  82. package/dist/assets/{issue-passport-kvrsHOXO.js → issue-passport-CUjAU9Y6.js} +1 -1
  83. package/dist/assets/{item-CRpPGQS5.js → item-B-p0IMj0.js} +1 -1
  84. package/dist/assets/{landing-page-Bb2t2ubc.js → landing-page-RSi1tJUt.js} +1 -1
  85. package/dist/assets/{layout-O4FRf5d2.js → layout-BTKpH5C3.js} +1 -1
  86. package/dist/assets/{list-BeJAd6oJ.js → list-C9HtsKYw.js} +3 -3
  87. package/dist/assets/{list-BmwWshfg.js → list-DM_X_DbX.js} +1 -1
  88. package/dist/assets/localization-B-_Xdumv.js +1 -0
  89. package/dist/assets/{log-DwbFr2nR.js → log-ByUaGQDD.js} +1 -1
  90. package/dist/assets/logger-Cror7fb1.js +1 -0
  91. package/dist/assets/{login-D2_PE9lX.js → login-B1S8adpO.js} +1 -1
  92. package/dist/assets/{login-oauth-callback-BQNBl6bZ.js → login-oauth-callback-CK2OuZQv.js} +1 -1
  93. package/dist/assets/{logo-uploader-vRfbxowv.js → logo-uploader-DijYekzI.js} +2 -2
  94. package/dist/assets/{lost-passport-pY1dhWDO.js → lost-passport-wz0F5eGp.js} +1 -1
  95. package/dist/assets/{open-window-C0eYx4_v.js → open-window-PMr3_tpx.js} +1 -1
  96. package/dist/assets/{over-due-invoice-payment-OBj9thMb.js → over-due-invoice-payment-CgKEpOv9.js} +1 -1
  97. package/dist/assets/{overview-Rpt1OYCM.js → overview-BPXQ5NOz.js} +1 -1
  98. package/dist/assets/{passport-item-Bq1c8VJl.js → passport-item-CtgFdOsh.js} +1 -1
  99. package/dist/assets/{permission-Doi0-9cF.js → permission-DO4jN8xJ.js} +1 -1
  100. package/dist/assets/{preferences-zYe_BxLJ.js → preferences-FO1x_0r1.js} +1 -1
  101. package/dist/assets/profile-embed-BKg9ZugM.js +1 -0
  102. package/dist/assets/{publish-resource-CnXtK3LB.js → publish-resource-CtlORU2W.js} +1 -1
  103. package/dist/assets/{react-beautiful-dnd.esm-5xsARSNi.js → react-beautiful-dnd.esm-DPZZJVHP.js} +1 -1
  104. package/dist/assets/{runtime-DjdnpZoh.js → runtime-B0pQvnF3.js} +1 -1
  105. package/dist/assets/sdk-C9i2DDEJ.js +1 -0
  106. package/dist/assets/{security-Bdj-FYH4.js → security-CQehWrjL.js} +1 -1
  107. package/dist/assets/{session-D-9YOhAy.js → session-DGB-yOme.js} +1 -1
  108. package/dist/assets/{setup-CYAJarl4.js → setup-neejBzI5.js} +1 -1
  109. package/dist/assets/{spaces-Cq_dfNLt.js → spaces-CZJwyRzV.js} +1 -1
  110. package/dist/assets/{start-EO_1F43S.js → start-OOD_HRyM.js} +1 -1
  111. package/dist/assets/{starting-progress-Ck9Thp6d.js → starting-progress-C6OFR0oi.js} +1 -1
  112. package/dist/assets/{status-DJWbsb5u.js → status-5pZO2qoE.js} +1 -1
  113. package/dist/assets/{step-actions-C91dncKW.js → step-actions-C_A-deel.js} +1 -1
  114. package/dist/assets/{studio-B3QjabKr.js → studio-DkZBruFV.js} +1 -1
  115. package/dist/assets/{switch-control-o8fDOnJX.js → switch-control-XooTt-i6.js} +1 -1
  116. package/dist/assets/{table-tips-B7dQ0Rgb.js → table-tips-CgCabdgD.js} +1 -1
  117. package/dist/assets/{team-RDmDo4cZ.js → team-CGGZIbfh.js} +1 -1
  118. package/dist/assets/{traffic-BUIhb2HS.js → traffic-Bt0n-c6_.js} +1 -1
  119. package/dist/assets/{transfer-Dfbnhl7y.js → transfer-KpJ1sGgq.js} +1 -1
  120. package/dist/assets/{unsubscribe-Xjc5jAJO.js → unsubscribe-CF4vy-ZY.js} +1 -1
  121. package/dist/assets/{use-app-logo-DesKuFha.js → use-app-logo-DxlfjGOQ.js} +1 -1
  122. package/dist/assets/{use-window-close-CN9L863w.js → use-window-close-toR_SRTv.js} +1 -1
  123. package/dist/assets/{useLocalStorage-vyIYLydJ.js → useLocalStorage-CiLfInVV.js} +1 -1
  124. package/dist/assets/{user-center-DdBnHKdX.js → user-center-C7a4TtFt.js} +3 -3
  125. package/dist/assets/{user-follower-DuL1BMYz.js → user-follower-Cs8st3w5.js} +1 -1
  126. package/dist/assets/{user-sessions-SImh8rHV.js → user-sessions-DN1hzt8P.js} +1 -1
  127. package/dist/assets/{util-CHZLxs1T.js → util-CYsTlK2W.js} +1 -1
  128. package/dist/assets/{util-BlUZ4Q2D.js → util-CnXmjN2T.js} +1 -1
  129. package/dist/assets/{vendor-arcblock-C-xQV6LY.js → vendor-arcblock-DEa0A9MF.js} +1 -1
  130. package/dist/assets/{vendor-ux-ESjuHpb6.js → vendor-ux-pYOhjQLA.js} +1 -1
  131. package/dist/assets/{wait-connect-zz_yxj4x.js → wait-connect-DxmVFheW.js} +1 -1
  132. package/dist/assets/{wizard-CRrvtL2U.js → wizard-BvaUZfHg.js} +1 -1
  133. package/dist/assets/{wizard-components-CR8h5HCI.js → wizard-components-BoWnBOyn.js} +2 -2
  134. package/dist/assets/{wrap-locale-BraEpa0W.js → wrap-locale-DU2DJaEg.js} +1 -1
  135. package/dist/assets/{zh-DQDxmpdl.js → zh-CVf8x4U0.js} +1 -1
  136. package/dist/index.html +3 -3
  137. package/dist/service-worker.js +1 -1
  138. package/package.json +36 -36
  139. package/dist/assets/engine-B4t4bO94.js +0 -1
  140. package/dist/assets/get-safe-url-C5Vpma4S.js +0 -1
  141. package/dist/assets/localization-EdFO66I_.js +0 -1
  142. package/dist/assets/logger-DHvXC8jl.js +0 -1
  143. package/dist/assets/profile-embed-BqOWDoBR.js +0 -1
  144. package/dist/assets/sdk-ChXfsb2q.js +0 -1
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CgdhTqWX.js","assets/vendor-react-Dvs43sk9.js"])))=>i.map(i=>d[i]);
2
- import{j as e,at as $,W as v,J as R,ak as r,b4 as U,b0 as z,T as N,bH as F,bI as X,bJ as H,a$ as J,av as B,bE as G,bK as Q,bL as V}from"./vendor-mui-core-CmD-NPnl.js";import{G as K,I as O,D as I,_ as q,Q as Y,T as Z}from"./vendor-ux-ESjuHpb6.js";import{r as d}from"./vendor-react-Dvs43sk9.js";import{g as ee,p as te}from"./vendor-hooks-DLNZ8kxG.js";import{v as D,J as L,H as se,d as oe,S as ae,s as ne,b as re}from"./index-6k6hDX7K.js";import{T as ie}from"./vendor-utils-DQK0pEML.js";import{N as ce}from"./index-VRhIKoNb.js";import{W as le}from"./did-address-D6qV21Cc.js";import{w as pe}from"./wrap-locale-BraEpa0W.js";import{u as de}from"./use-passport-id-B-b-_oYF.js";import{g as me}from"./get-safe-url-C5Vpma4S.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";function W({list:s=[],width:l=300,height:m=400,cardSpace:p=40,onSelect:i=()=>{},defaultIndex:k=0}){const[u,h]=d.useState(0),[o,x]=d.useState(0),b=d.useRef(null),f=n=>{if(n<0||n>s.length-1)return;h(n);const c=b.current.clientWidth;x(n*(l+p)-(c-l)/2+p*.5),i(n)};d.useEffect(()=>{f(k);const n=c=>c.preventDefault();b.current.addEventListener("touchmove",n,{passive:!1})},[]);let a;const j=n=>{a=n.touches[0].clientX},y=n=>{const c=n.changedTouches[0],w=a-c.clientX;Math.abs(w)>60&&(w>0?f(u+1):f(u-1))};return e.jsx(ue,{ref:b,onTouchStart:j,onTouchEnd:y,children:e.jsx("div",{className:"card-container",style:{transform:`translate(${-o}px, 0)`},children:s.map((n,c)=>e.jsx("div",{className:`card-item ${c===u?"selected":""}`,style:{width:l,height:m,margin:p/2},onClick:()=>f(c),children:n.display?e.jsx("div",{className:"card-content",children:e.jsx(ce,{data:n.display,style:{width:"100%",height:"100%"}})}):e.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const ue=$.div`
2
+ import{j as e,at as $,W as v,J as R,ak as r,b4 as U,b0 as z,T as N,bH as F,bI as X,bJ as H,a$ as J,av as B,bE as G,bK as Q,bL as V}from"./vendor-mui-core-CmD-NPnl.js";import{G as K,I as O,D as I,_ as q,Q as Y,T as Z}from"./vendor-ux-pYOhjQLA.js";import{r as d}from"./vendor-react-Dvs43sk9.js";import{g as ee,p as te}from"./vendor-hooks-DLNZ8kxG.js";import{v as D,J as L,H as se,d as oe,S as ae,s as ne,b as re}from"./index-D5Esor4q.js";import{T as ie}from"./vendor-utils-DQK0pEML.js";import{N as ce}from"./index-BVZj6aBL.js";import{W as le}from"./did-address-CNnw4_bl.js";import{w as pe}from"./wrap-locale-DU2DJaEg.js";import{u as de}from"./use-passport-id-B-b-_oYF.js";import{g as me}from"./get-safe-url-PVZ8sNva.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DEa0A9MF.js";function W({list:s=[],width:l=300,height:m=400,cardSpace:p=40,onSelect:i=()=>{},defaultIndex:k=0}){const[u,h]=d.useState(0),[o,x]=d.useState(0),b=d.useRef(null),f=n=>{if(n<0||n>s.length-1)return;h(n);const c=b.current.clientWidth;x(n*(l+p)-(c-l)/2+p*.5),i(n)};d.useEffect(()=>{f(k);const n=c=>c.preventDefault();b.current.addEventListener("touchmove",n,{passive:!1})},[]);let a;const j=n=>{a=n.touches[0].clientX},y=n=>{const c=n.changedTouches[0],w=a-c.clientX;Math.abs(w)>60&&(w>0?f(u+1):f(u-1))};return e.jsx(ue,{ref:b,onTouchStart:j,onTouchEnd:y,children:e.jsx("div",{className:"card-container",style:{transform:`translate(${-o}px, 0)`},children:s.map((n,c)=>e.jsx("div",{className:`card-item ${c===u?"selected":""}`,style:{width:l,height:m,margin:p/2},onClick:()=>f(c),children:n.display?e.jsx("div",{className:"card-content",children:e.jsx(ce,{data:n.display,style:{width:"100%",height:"100%"}})}):e.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const ue=$.div`
3
3
  overflow: hidden;
4
4
  mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
5
5
  overflow: hidden;
@@ -1 +1 @@
1
- import{j as s}from"./vendor-mui-core-CmD-NPnl.js";import{r as e}from"./vendor-react-Dvs43sk9.js";import{g as m}from"./get-safe-url-C5Vpma4S.js";import"./index-6k6hDX7K.js";import"./vendor-ux-ESjuHpb6.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";function S(){const r=e.useRef(null),n=e.useRef(Date.now());return e.useEffect(()=>{const t=`open-window-url-${new URLSearchParams(window.location.search).get("key")}`;return r.current=setInterval(()=>{if(Date.now()-n.current>10*1e3){localStorage.removeItem(t),clearInterval(r.current);return}const o=localStorage.getItem(t);if(o)try{const{url:a,time:i}=JSON.parse(o);localStorage.removeItem(t),Date.now()-i<10*1e3&&(window.location.href=m(a,{allowDomains:null}))}catch{}},200),()=>clearInterval(r.current)},[]),s.jsx("div",{})}export{S as default};
1
+ import{j as s}from"./vendor-mui-core-CmD-NPnl.js";import{r as e}from"./vendor-react-Dvs43sk9.js";import{g as m}from"./get-safe-url-PVZ8sNva.js";import"./index-D5Esor4q.js";import"./vendor-ux-pYOhjQLA.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DEa0A9MF.js";function S(){const r=e.useRef(null),n=e.useRef(Date.now());return e.useEffect(()=>{const t=`open-window-url-${new URLSearchParams(window.location.search).get("key")}`;return r.current=setInterval(()=>{if(Date.now()-n.current>10*1e3){localStorage.removeItem(t),clearInterval(r.current);return}const o=localStorage.getItem(t);if(o)try{const{url:a,time:i}=JSON.parse(o);localStorage.removeItem(t),Date.now()-i<10*1e3&&(window.location.href=m(a,{allowDomains:null}))}catch{}},200),()=>clearInterval(r.current)},[]),s.jsx("div",{})}export{S as default};
@@ -1 +1 @@
1
- import{D as le,j as t,b1 as p,aX as X,Q as h,T as k,b0 as de}from"./vendor-mui-core-CmD-NPnl.js";import{r as l}from"./vendor-react-Dvs43sk9.js";import{T as me,H as f,F as ye}from"./vendor-ux-ESjuHpb6.js";import{C as w,d as pe}from"./vendor-utils-DQK0pEML.js";import{k as fe}from"./vendor-hooks-DLNZ8kxG.js";import{w as ve,x as R,y as he,z as xe,C as A,D as be,F as ge,L as Ce,G as je}from"./index-6k6hDX7K.js";const ke=async n=>{if(!n.subscriptionId&&!n.customerId)throw new Error("Either subscriptionId or customerId must be provided");let m;return n.subscriptionId?m=`/api/subscriptions/${n.subscriptionId}/overdue/invoices`:m=`/api/customers/${n.customerId}/overdue/invoices`,(await be.get(n.authToken?w(m,`?authToken=${n.authToken}`):m)).data};function Ee({subscriptionId:n=void 0,customerId:m=void 0,mode:B="default",dialogProps:x={open:!0},children:S=void 0,onPaid:z=()=>{},detailLinkOptions:d={enabled:!0},successToast:M=!0,alertMessage:q="",authToken:J=void 0}){const{t:r,locale:Y}=me(),T=le(),{connect:$,session:Z}=ve(),[H,ee]=l.useState(""),[O,v]=l.useState(!1),[te,P]=l.useState(x.open||!1),[re,ne]=l.useState({}),[se,D]=l.useState({}),N=n?"subscription":"customer",i=m||Z?.user?.did,U=n||i,b=l.useRef(i),{data:s={summary:{},invoices:[]},error:W,loading:oe,runAsync:G}=fe(()=>ke({subscriptionId:n,customerId:i,authToken:J}),{ready:!!n||!!i,onSuccess:e=>{e.customer?.id&&e.customer?.id!==b.current&&(b.current=e.customer?.id)}}),g=l.useMemo(()=>n?w(R(),`/customer/subscription/${n}`):i?w(R(),"/customer/invoice/past-due"):"",[n,i]),o=l.useMemo(()=>s?.summary?Object.values(s.summary):[],[s?.summary]),ie=pe(async e=>{M&&(f.close(),f.success(r("payment.customer.invoice.paySuccess"))),v(!1),(await G()).invoices?.length===0&&(P(!1),z(U,e,N))},1e3,{leading:!1,trailing:!0,maxWait:5e3}),E=he(),F=xe("events"),ce=async()=>{let e=!1;return await je(async()=>(e=(await G()).invoices?.length===0,e),{interval:2e3,timeout:3*60*1e3}),e},ae=async()=>{if(E)try{const e=await ce();M&&(f.close(),f.success(r("payment.customer.invoice.paySuccess"))),e&&(P(!1),z(U,H,N))}catch(e){console.error("Check payment status failed:",e)}};l.useEffect(()=>{F&&!E&&F.on("invoice.paid",({response:e})=>{const a=`${n||e.customer_id}-${e.currency_id}`;(n&&e.subscription_id===n||i&&i===e.customer_id||b.current&&b.current===e.customer_id)&&(re[a]||(ne(u=>({...u,[a]:1})),ie(e.currency_id)))})},[F,n,i]);const I=e=>{const{currency:c,method:a}=e;if(a.type==="stripe"){f.error(r("payment.subscription.overdue.notSupport"));return}if(!O&&(ee(c.id),v(!0),D(u=>({...u,[c.id]:"idle"})),["arcblock","ethereum","base"].includes(a.type))){const u={currencyId:c.id};n?u.subscriptionId=n:i&&(u.customerId=i),$.open({locale:Y,containerEl:void 0,saveConnect:!1,action:"collect-batch",prefix:w(R(),"/api/did"),useSocket:!E,extraParams:u,messages:{scan:r("common.connect.defaultScan"),title:r("payment.customer.invoice.payBatch"),confirm:r("common.connect.confirm")},onSuccess:()=>{$.close(),ae(),v(!1),D(y=>({...y,[c.id]:"success"}))},onClose:()=>{$.close(),v(!1)},onError:y=>{f.error(ge(y)),D(j=>({...j,[c.id]:"error"})),v(!1)}})}},C=()=>{P(!1),x.onClose?.()},K=e=>{d.onClick?(e.preventDefault(),d.onClick(e)):d.enabled||(e.preventDefault(),C())};if(oe)return null;const L=()=>d.title?d.title:r(n?"payment.subscription.overdue.view":"payment.customer.pastDue.view"),Q=(e,c=!0,a={variant:"contained"})=>{const{currency:u}=e,y=O&&H===u.id,j=se[u.id]||"idle";return j==="success"?t.jsx(h,{variant:a?.variant||"contained",size:"small",...c?{}:{color:"success",startIcon:t.jsx(de,{})},children:r("payment.subscription.overdue.paid")}):j==="error"?t.jsx(h,{variant:"contained",size:"small",onClick:()=>I(e),...a,children:r("payment.subscription.overdue.retry")}):e.method.type==="stripe"?t.jsx(h,{variant:"contained",color:"primary",onClick:()=>window.open(g,"_blank"),...a,children:r("payment.subscription.overdue.viewNow")}):t.jsx(Ce,{variant:"contained",size:"small",disabled:y,loading:y,onClick:()=>I(e),...a,children:r("payment.subscription.overdue.payNow")})},_=e=>e.name&&e.type!=="arcblock"?` (${e.name})`:"",V=()=>{if(n&&s.subscription)return o.length===1?r("payment.subscription.overdue.title",{name:s.subscription?.description,count:s.invoices?.length,total:A(o[0]?.amount,o[0]?.currency?.decimal),symbol:o[0]?.currency?.symbol,method:_(o[0]?.method)}):r("payment.subscription.overdue.simpleTitle",{name:s.subscription?.description,count:s.invoices?.length});if(i){let e="";return o.length===1?e=r("payment.customer.overdue.title",{subscriptionCount:s.subscriptionCount||0,count:s.invoices?.length,total:A(o[0]?.amount,o[0]?.currency?.decimal),symbol:o[0]?.currency?.symbol,method:_(o[0]?.method)}):e=r("payment.customer.overdue.simpleTitle",{subscriptionCount:s.subscriptionCount||0,count:s.invoices?.length}),q?`${e}${q}`:`${e}${r("payment.customer.overdue.defaultAlert")}`}return""},ue=()=>n&&s.subscription?r("payment.subscription.overdue.empty",{name:s.subscription?.description}):r("payment.customer.overdue.empty");return B==="custom"&&S&&typeof S=="function"?t.jsx(p,{children:S(I,{subscription:s?.subscription,summary:s?.summary,invoices:s?.invoices,subscriptionCount:s?.subscriptionCount,detailUrl:g})}):t.jsx(ye,{PaperProps:{style:{minHeight:"auto"}},...x||{},open:te,title:x?.title||r("payment.subscription.overdue.pastDue"),sx:{"& .MuiDialogContent-root":{pt:0}},onClose:C,children:W?t.jsx(X,{severity:"error",children:W.message}):t.jsxs(p,{sx:{gap:1},children:[o.length===0&&t.jsxs(t.Fragment,{children:[t.jsx(X,{severity:"success",children:ue()}),t.jsx(p,{direction:"row",sx:{justifyContent:"flex-end",mt:2},children:t.jsx(h,{variant:"outlined",color:"primary",onClick:C,sx:{width:"fit-content"},children:r("common.know")})})]}),o.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(k,{variant:"body1",sx:{color:"text.secondary"},children:[V(),d.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:g,target:"_blank",onClick:K,rel:"noreferrer",style:{color:T.palette.text.link},children:L()})]})]}),t.jsxs(p,{direction:"row",sx:{justifyContent:"flex-end",gap:2,mt:2},children:[t.jsx(h,{variant:"outlined",color:"primary",onClick:C,children:r("common.cancel")}),Q(o[0])]})]}),o.length>1&&t.jsxs(t.Fragment,{children:[t.jsxs(k,{variant:"body1",sx:{color:"text.secondary"},children:[V(),d.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:g,target:"_blank",rel:"noreferrer",onClick:K,style:{color:T.palette.text.link},children:L()})]})]}),t.jsx(k,{variant:"body1",sx:{color:"text.secondary"},children:r("payment.subscription.overdue.list")}),t.jsx(p,{children:o.map(e=>t.jsxs(p,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center",py:1,px:.5,borderBottom:"1px solid",borderColor:"divider","&:hover":{backgroundColor:()=>T.palette.grey[100]},mt:0},children:[t.jsx(k,{children:r("payment.subscription.overdue.total",{total:A(e?.amount,e?.currency?.decimal),currency:e?.currency?.symbol,method:_(e?.method)})}),Q(e,!1,{variant:"text",sx:{color:"text.link"}})]},e?.currency?.id))})]})]})})}export{Ee as O};
1
+ import{D as le,j as t,b1 as p,aX as X,Q as h,T as k,b0 as de}from"./vendor-mui-core-CmD-NPnl.js";import{r as l}from"./vendor-react-Dvs43sk9.js";import{T as me,H as f,F as ye}from"./vendor-ux-pYOhjQLA.js";import{C as w,d as pe}from"./vendor-utils-DQK0pEML.js";import{k as fe}from"./vendor-hooks-DLNZ8kxG.js";import{w as ve,x as R,y as he,z as xe,C as A,D as be,F as ge,L as Ce,G as je}from"./index-D5Esor4q.js";const ke=async n=>{if(!n.subscriptionId&&!n.customerId)throw new Error("Either subscriptionId or customerId must be provided");let m;return n.subscriptionId?m=`/api/subscriptions/${n.subscriptionId}/overdue/invoices`:m=`/api/customers/${n.customerId}/overdue/invoices`,(await be.get(n.authToken?w(m,`?authToken=${n.authToken}`):m)).data};function Ee({subscriptionId:n=void 0,customerId:m=void 0,mode:B="default",dialogProps:x={open:!0},children:S=void 0,onPaid:z=()=>{},detailLinkOptions:d={enabled:!0},successToast:M=!0,alertMessage:q="",authToken:J=void 0}){const{t:r,locale:Y}=me(),T=le(),{connect:$,session:Z}=ve(),[H,ee]=l.useState(""),[O,v]=l.useState(!1),[te,P]=l.useState(x.open||!1),[re,ne]=l.useState({}),[se,D]=l.useState({}),N=n?"subscription":"customer",i=m||Z?.user?.did,U=n||i,b=l.useRef(i),{data:s={summary:{},invoices:[]},error:W,loading:oe,runAsync:G}=fe(()=>ke({subscriptionId:n,customerId:i,authToken:J}),{ready:!!n||!!i,onSuccess:e=>{e.customer?.id&&e.customer?.id!==b.current&&(b.current=e.customer?.id)}}),g=l.useMemo(()=>n?w(R(),`/customer/subscription/${n}`):i?w(R(),"/customer/invoice/past-due"):"",[n,i]),o=l.useMemo(()=>s?.summary?Object.values(s.summary):[],[s?.summary]),ie=pe(async e=>{M&&(f.close(),f.success(r("payment.customer.invoice.paySuccess"))),v(!1),(await G()).invoices?.length===0&&(P(!1),z(U,e,N))},1e3,{leading:!1,trailing:!0,maxWait:5e3}),E=he(),F=xe("events"),ce=async()=>{let e=!1;return await je(async()=>(e=(await G()).invoices?.length===0,e),{interval:2e3,timeout:3*60*1e3}),e},ae=async()=>{if(E)try{const e=await ce();M&&(f.close(),f.success(r("payment.customer.invoice.paySuccess"))),e&&(P(!1),z(U,H,N))}catch(e){console.error("Check payment status failed:",e)}};l.useEffect(()=>{F&&!E&&F.on("invoice.paid",({response:e})=>{const a=`${n||e.customer_id}-${e.currency_id}`;(n&&e.subscription_id===n||i&&i===e.customer_id||b.current&&b.current===e.customer_id)&&(re[a]||(ne(u=>({...u,[a]:1})),ie(e.currency_id)))})},[F,n,i]);const I=e=>{const{currency:c,method:a}=e;if(a.type==="stripe"){f.error(r("payment.subscription.overdue.notSupport"));return}if(!O&&(ee(c.id),v(!0),D(u=>({...u,[c.id]:"idle"})),["arcblock","ethereum","base"].includes(a.type))){const u={currencyId:c.id};n?u.subscriptionId=n:i&&(u.customerId=i),$.open({locale:Y,containerEl:void 0,saveConnect:!1,action:"collect-batch",prefix:w(R(),"/api/did"),useSocket:!E,extraParams:u,messages:{scan:r("common.connect.defaultScan"),title:r("payment.customer.invoice.payBatch"),confirm:r("common.connect.confirm")},onSuccess:()=>{$.close(),ae(),v(!1),D(y=>({...y,[c.id]:"success"}))},onClose:()=>{$.close(),v(!1)},onError:y=>{f.error(ge(y)),D(j=>({...j,[c.id]:"error"})),v(!1)}})}},C=()=>{P(!1),x.onClose?.()},K=e=>{d.onClick?(e.preventDefault(),d.onClick(e)):d.enabled||(e.preventDefault(),C())};if(oe)return null;const L=()=>d.title?d.title:r(n?"payment.subscription.overdue.view":"payment.customer.pastDue.view"),Q=(e,c=!0,a={variant:"contained"})=>{const{currency:u}=e,y=O&&H===u.id,j=se[u.id]||"idle";return j==="success"?t.jsx(h,{variant:a?.variant||"contained",size:"small",...c?{}:{color:"success",startIcon:t.jsx(de,{})},children:r("payment.subscription.overdue.paid")}):j==="error"?t.jsx(h,{variant:"contained",size:"small",onClick:()=>I(e),...a,children:r("payment.subscription.overdue.retry")}):e.method.type==="stripe"?t.jsx(h,{variant:"contained",color:"primary",onClick:()=>window.open(g,"_blank"),...a,children:r("payment.subscription.overdue.viewNow")}):t.jsx(Ce,{variant:"contained",size:"small",disabled:y,loading:y,onClick:()=>I(e),...a,children:r("payment.subscription.overdue.payNow")})},_=e=>e.name&&e.type!=="arcblock"?` (${e.name})`:"",V=()=>{if(n&&s.subscription)return o.length===1?r("payment.subscription.overdue.title",{name:s.subscription?.description,count:s.invoices?.length,total:A(o[0]?.amount,o[0]?.currency?.decimal),symbol:o[0]?.currency?.symbol,method:_(o[0]?.method)}):r("payment.subscription.overdue.simpleTitle",{name:s.subscription?.description,count:s.invoices?.length});if(i){let e="";return o.length===1?e=r("payment.customer.overdue.title",{subscriptionCount:s.subscriptionCount||0,count:s.invoices?.length,total:A(o[0]?.amount,o[0]?.currency?.decimal),symbol:o[0]?.currency?.symbol,method:_(o[0]?.method)}):e=r("payment.customer.overdue.simpleTitle",{subscriptionCount:s.subscriptionCount||0,count:s.invoices?.length}),q?`${e}${q}`:`${e}${r("payment.customer.overdue.defaultAlert")}`}return""},ue=()=>n&&s.subscription?r("payment.subscription.overdue.empty",{name:s.subscription?.description}):r("payment.customer.overdue.empty");return B==="custom"&&S&&typeof S=="function"?t.jsx(p,{children:S(I,{subscription:s?.subscription,summary:s?.summary,invoices:s?.invoices,subscriptionCount:s?.subscriptionCount,detailUrl:g})}):t.jsx(ye,{PaperProps:{style:{minHeight:"auto"}},...x||{},open:te,title:x?.title||r("payment.subscription.overdue.pastDue"),sx:{"& .MuiDialogContent-root":{pt:0}},onClose:C,children:W?t.jsx(X,{severity:"error",children:W.message}):t.jsxs(p,{sx:{gap:1},children:[o.length===0&&t.jsxs(t.Fragment,{children:[t.jsx(X,{severity:"success",children:ue()}),t.jsx(p,{direction:"row",sx:{justifyContent:"flex-end",mt:2},children:t.jsx(h,{variant:"outlined",color:"primary",onClick:C,sx:{width:"fit-content"},children:r("common.know")})})]}),o.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(k,{variant:"body1",sx:{color:"text.secondary"},children:[V(),d.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:g,target:"_blank",onClick:K,rel:"noreferrer",style:{color:T.palette.text.link},children:L()})]})]}),t.jsxs(p,{direction:"row",sx:{justifyContent:"flex-end",gap:2,mt:2},children:[t.jsx(h,{variant:"outlined",color:"primary",onClick:C,children:r("common.cancel")}),Q(o[0])]})]}),o.length>1&&t.jsxs(t.Fragment,{children:[t.jsxs(k,{variant:"body1",sx:{color:"text.secondary"},children:[V(),d.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:g,target:"_blank",rel:"noreferrer",onClick:K,style:{color:T.palette.text.link},children:L()})]})]}),t.jsx(k,{variant:"body1",sx:{color:"text.secondary"},children:r("payment.subscription.overdue.list")}),t.jsx(p,{children:o.map(e=>t.jsxs(p,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center",py:1,px:.5,borderBottom:"1px solid",borderColor:"divider","&:hover":{backgroundColor:()=>T.palette.grey[100]},mt:0},children:[t.jsx(k,{children:r("payment.subscription.overdue.total",{total:A(e?.amount,e?.currency?.decimal),currency:e?.currency?.symbol,method:_(e?.method)})}),Q(e,!1,{variant:"text",sx:{color:"text.link"}})]},e?.currency?.id))})]})]})})}export{Ee as O};
@@ -1,4 +1,4 @@
1
- import{j as e,ak as n,ar as D,a$ as te,at as W,W as p,am as k,co as ne,T as _,c1 as L,bd as M}from"./vendor-mui-core-CmD-NPnl.js";import{r as u,a as oe}from"./vendor-react-Dvs43sk9.js";import{ab as h,T as A,D as se,a6 as ae,al as ie}from"./vendor-ux-ESjuHpb6.js";import{d as re}from"./keyboard-arrow-down-rounded-8U0_i9QO.js";import{f as E}from"./index-BojVbZw0.js";import{p as le}from"./dashboard-DgmOVZgS.js";import{Z as ce,a8 as me,aa as de,aV as pe,a9 as ue,c as T,ap as N}from"./index-6k6hDX7K.js";import{v as he}from"./index-1BANSka2.js";import{u as xe}from"./useAsyncRetry-6TjWJyO6.js";import{C as ge}from"./vendor-utils-DQK0pEML.js";import{u as fe}from"./team-RDmDo4cZ.js";import{W as v}from"./did-address-D6qV21Cc.js";import{V as ve}from"./status-DJWbsb5u.js";import{c as be}from"./spaces-Cq_dfNLt.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./useLocalStorage-vyIYLydJ.js";import"./index-DBs9Ljax.js";import"./confirm-BSaR4_fO.js";import"./get-safe-url-C5Vpma4S.js";import"./session-D-9YOhAy.js";import"./useSetState-DFuQZPPV.js";import"./index-BxgIheOv.js";import"./over-due-invoice-payment-OBj9thMb.js";import"./use-mobile-CQ7Tw4aD.js";import"./useAsync-CNAYLnLm.js";import"./isURL-BOLVWN6q.js";import"./use-app-logo-DesKuFha.js";import"./omit-C2ouGG7F.js";import"./api-sewNv0AE.js";const je={width:24,height:24,body:'<path fill="currentColor" d="m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 10.8Z"/>'},ke={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 17a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm12 0a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM6 15v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1m-6-6v3"/>'},ye={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 7a4 4 0 1 0 8 0a4 4 0 1 0-8 0M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2m1-17.87a4 4 0 0 1 0 7.75M21 21v-2a4 4 0 0 0-3-3.85"/>'},we={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 12h3v4H7z"/><path d="M10 6H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-6"/><path d="M10 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zm4 12h2m-2-4h4"/></g>'},Se={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M19.5 7A9 9 0 0 0 12 3a8.991 8.991 0 0 0-7.484 4"/><path d="M11.5 3a16.989 16.989 0 0 0-1.826 4M12.5 3a16.989 16.989 0 0 1 1.828 4M19.5 17a9 9 0 0 1-7.5 4a8.991 8.991 0 0 1-7.484-4"/><path d="M11.5 21a16.989 16.989 0 0 1-1.826-4m2.826 4a16.989 16.989 0 0 0 1.828-4M2 10l1 4l1.5-4L6 14l1-4m10 0l1 4l1.5-4l1.5 4l1-4M9.5 10l1 4l1.5-4l1.5 4l1-4"/></g>'},O={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0"/><path d="M12 7v5l3 3"/></g>'},Te={width:24,height:24,body:'<path fill="currentColor" d="M12 14q-.825 0-1.413-.588T10 12q0-.825.588-1.413T12 10q.825 0 1.413.588T14 12q0 .825-.588 1.413T12 14Zm0 7q-3.475 0-6.025-2.288T3.05 13H5.1q.35 2.6 2.313 4.3T12 19q2.925 0 4.963-2.038T19 12q0-2.925-2.038-4.963T12 5q-1.725 0-3.225.8T6.25 8H9v2H3V4h2v2.35q1.275-1.6 3.113-2.475T12 3q1.875 0 3.513.713t2.85 1.924q1.212 1.213 1.925 2.85T21 12q0 1.875-.713 3.513t-1.924 2.85q-1.213 1.212-2.85 1.925T12 21Z"/>'};function F({icon:t,value:s,name:o,url:i="",animated:l=!1,LinkComponent:d=te,loading:x=!1}){const g=()=>oe.isValidElement(t)?t:e.jsx(n,{component:h,icon:t,alt:typeof o=="string"?o:"",sx:{fontSize:30}});if(x)return e.jsxs(V,{children:[t&&e.jsx(n,{className:"metric__image",children:e.jsx(D,{variant:"circular",width:32,height:32})}),e.jsxs(n,{children:[e.jsx(D,{className:`metric__number ${l?"metric__number--animated":""}`,variant:"rounded",width:160,height:"36px",sx:{mb:1}}),e.jsx(D,{className:"metric__name",variant:"rounded",width:80,height:20})]})]});const f=e.jsxs(e.Fragment,{children:[t&&e.jsx(n,{className:"metric__image",children:g()}),e.jsxs(n,{children:[u.isValidElement(s)?e.jsx(n,{className:`metric__number ${l?"metric__number--animated":""}`,children:s}):e.jsx(n,{className:`metric__number ${l?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:s}}),e.jsx(n,{className:"metric__name",children:o})]})]});return e.jsx(V,{children:i?e.jsx(d,{href:i,sx:{textDecoration:"none"},children:f}):f})}F.propTypes={icon:p.string.isRequired,value:p.string.isRequired,name:p.string.isRequired,url:p.string,animated:p.bool,LinkComponent:p.elementType,loading:p.bool};const V=W(n)`
1
+ import{j as e,ak as n,ar as D,a$ as te,at as W,W as p,am as k,co as ne,T as _,c1 as L,bd as M}from"./vendor-mui-core-CmD-NPnl.js";import{r as u,a as oe}from"./vendor-react-Dvs43sk9.js";import{ab as h,T as A,D as se,a6 as ae,al as ie}from"./vendor-ux-pYOhjQLA.js";import{d as re}from"./keyboard-arrow-down-rounded-8U0_i9QO.js";import{f as E}from"./index-BojVbZw0.js";import{p as le}from"./dashboard-q_CEWNOG.js";import{Z as ce,a8 as me,aa as de,aV as pe,a9 as ue,c as T,ap as N}from"./index-D5Esor4q.js";import{v as he}from"./index-DzI9kX_C.js";import{u as xe}from"./useAsyncRetry-6TjWJyO6.js";import{C as ge}from"./vendor-utils-DQK0pEML.js";import{u as fe}from"./team-CGGZIbfh.js";import{W as v}from"./did-address-CNnw4_bl.js";import{V as ve}from"./status-5pZO2qoE.js";import{c as be}from"./spaces-CZJwyRzV.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DEa0A9MF.js";import"./useLocalStorage-CiLfInVV.js";import"./index-DBs9Ljax.js";import"./confirm-DUjUXcfn.js";import"./get-safe-url-PVZ8sNva.js";import"./session-DGB-yOme.js";import"./useSetState-DFuQZPPV.js";import"./index-DhLCZYhn.js";import"./over-due-invoice-payment-CgKEpOv9.js";import"./use-mobile-CQ7Tw4aD.js";import"./useAsync-CNAYLnLm.js";import"./isURL-DZGsNcmL.js";import"./use-app-logo-DxlfjGOQ.js";import"./omit-C2ouGG7F.js";import"./api-sewNv0AE.js";const je={width:24,height:24,body:'<path fill="currentColor" d="m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 10.8Z"/>'},ke={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 17a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm12 0a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM6 15v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1m-6-6v3"/>'},ye={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 7a4 4 0 1 0 8 0a4 4 0 1 0-8 0M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2m1-17.87a4 4 0 0 1 0 7.75M21 21v-2a4 4 0 0 0-3-3.85"/>'},we={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 12h3v4H7z"/><path d="M10 6H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-6"/><path d="M10 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zm4 12h2m-2-4h4"/></g>'},Se={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M19.5 7A9 9 0 0 0 12 3a8.991 8.991 0 0 0-7.484 4"/><path d="M11.5 3a16.989 16.989 0 0 0-1.826 4M12.5 3a16.989 16.989 0 0 1 1.828 4M19.5 17a9 9 0 0 1-7.5 4a8.991 8.991 0 0 1-7.484-4"/><path d="M11.5 21a16.989 16.989 0 0 1-1.826-4m2.826 4a16.989 16.989 0 0 0 1.828-4M2 10l1 4l1.5-4L6 14l1-4m10 0l1 4l1.5-4l1.5 4l1-4M9.5 10l1 4l1.5-4l1.5 4l1-4"/></g>'},O={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0"/><path d="M12 7v5l3 3"/></g>'},Te={width:24,height:24,body:'<path fill="currentColor" d="M12 14q-.825 0-1.413-.588T10 12q0-.825.588-1.413T12 10q.825 0 1.413.588T14 12q0 .825-.588 1.413T12 14Zm0 7q-3.475 0-6.025-2.288T3.05 13H5.1q.35 2.6 2.313 4.3T12 19q2.925 0 4.963-2.038T19 12q0-2.925-2.038-4.963T12 5q-1.725 0-3.225.8T6.25 8H9v2H3V4h2v2.35q1.275-1.6 3.113-2.475T12 3q1.875 0 3.513.713t2.85 1.924q1.212 1.213 1.925 2.85T21 12q0 1.875-.713 3.513t-1.924 2.85q-1.213 1.212-2.85 1.925T12 21Z"/>'};function F({icon:t,value:s,name:o,url:i="",animated:l=!1,LinkComponent:d=te,loading:x=!1}){const g=()=>oe.isValidElement(t)?t:e.jsx(n,{component:h,icon:t,alt:typeof o=="string"?o:"",sx:{fontSize:30}});if(x)return e.jsxs(V,{children:[t&&e.jsx(n,{className:"metric__image",children:e.jsx(D,{variant:"circular",width:32,height:32})}),e.jsxs(n,{children:[e.jsx(D,{className:`metric__number ${l?"metric__number--animated":""}`,variant:"rounded",width:160,height:"36px",sx:{mb:1}}),e.jsx(D,{className:"metric__name",variant:"rounded",width:80,height:20})]})]});const f=e.jsxs(e.Fragment,{children:[t&&e.jsx(n,{className:"metric__image",children:g()}),e.jsxs(n,{children:[u.isValidElement(s)?e.jsx(n,{className:`metric__number ${l?"metric__number--animated":""}`,children:s}):e.jsx(n,{className:`metric__number ${l?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:s}}),e.jsx(n,{className:"metric__name",children:o})]})]});return e.jsx(V,{children:i?e.jsx(d,{href:i,sx:{textDecoration:"none"},children:f}):f})}F.propTypes={icon:p.string.isRequired,value:p.string.isRequired,name:p.string.isRequired,url:p.string,animated:p.bool,LinkComponent:p.elementType,loading:p.bool};const V=W(n)`
2
2
  border-left: 1px solid ${t=>t.theme.palette.divider};
3
3
  padding: 10px 0 10px 16px;
4
4
  @media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
@@ -1 +1 @@
1
- import{j as b,b1 as Ie,b4 as $e,T as we,am as Si,W as h,s as di,U as ci,ak as Me,bN as ge,bO as ve,bP as Ei,bQ as Ai,bR as Oi,bS as We,bT as Ci}from"./vendor-mui-core-CmD-NPnl.js";import{T as Be,a6 as Ti,a7 as Ve}from"./vendor-ux-ESjuHpb6.js";import{B as _i,o as Ii,l as Mi}from"./index-BE6_aQqm.js";import{a as je}from"./vendor-react-Dvs43sk9.js";import{a as ji}from"./vendor-hooks-DLNZ8kxG.js";import{W as Ue}from"./did-address-D6qV21Cc.js";import{p as Ui}from"./util-CHZLxs1T.js";import{u as Hi}from"./team-RDmDo4cZ.js";var Li="2.0.3",He=500,Ge="user-agent",W="",Xe="?",ue="function",z="undefined",V="object",Le="string",k="browser",_="cpu",T="device",O="engine",E="os",F="result",s="name",i="type",o="vendor",n="version",y="architecture",se="major",t="model",re="console",u="mobile",g="tablet",v="smarttv",C="wearable",xe="xr",oe="embedded",K="inapp",Ne="brands",N="formFactors",Pe="fullVersionList",$="platform",qe="platformVersion",fe="bitness",D="sec-ch-ua",zi=D+"-full-version-list",Di=D+"-arch",Bi=D+"-"+fe,Ni=D+"-form-factors",Pi=D+"-"+u,qi=D+"-"+t,wi=D+"-"+$,Fi=wi+"-version",ui=[Ne,Pe,u,t,$,qe,y,N,fe],le="Amazon",P="Apple",Ye="ASUS",Ke="BlackBerry",B="Google",Qe="Huawei",Ze="Lenovo",Je="Honor",de="LG",ke="Microsoft",ye="Motorola",Re="Nvidia",ei="OnePlus",Se="OPPO",Q="Samsung",ii="Sharp",Z="Sony",Ee="Xiaomi",Ae="Zebra",ti="Chrome",ri="Chromium",U="Chromecast",$i="Edge",J="Firefox",ee="Opera",Oe="Facebook",oi="Sogou",q="Mobile ",ie=" Browser",ze="Windows",Wi=typeof window!==z,R=Wi&&window.navigator?window.navigator:void 0,H=R&&R.userAgentData?R.userAgentData:void 0,Vi=function(e,r){var a={},w=r;if(!be(r)){w={};for(var d in r)for(var p in r[d])w[p]=r[d][p].concat(w[p]?w[p]:[])}for(var c in e)a[c]=w[c]&&w[c].length%2===0?w[c].concat(e[c]):e[c];return a},pe=function(e){for(var r={},a=0;a<e.length;a++)r[e[a].toUpperCase()]=e[a];return r},De=function(e,r){if(typeof e===V&&e.length>0){for(var a in e)if(I(e[a])==I(r))return!0;return!1}return X(e)?I(r).indexOf(I(e))!==-1:!1},be=function(e,r){for(var a in e)return/^(browser|cpu|device|engine|os)$/.test(a)||(r?be(e[a]):!1)},X=function(e){return typeof e===Le},Ce=function(e){if(e){for(var r=[],a=G(/\\?\"/g,e).split(","),w=0;w<a.length;w++)if(a[w].indexOf(";")>-1){var d=ne(a[w]).split(";v=");r[w]={brand:d[0],version:d[1]}}else r[w]=ne(a[w]);return r}},I=function(e){return X(e)?e.toLowerCase():e},Te=function(e){return X(e)?G(/[^\d\.]/g,e).split(".")[0]:void 0},M=function(e){for(var r in e){var a=e[r];typeof a==V&&a.length==2?this[a[0]]=a[1]:this[a]=void 0}return this},G=function(e,r){return X(r)?r.replace(e,W):r},te=function(e){return G(/\\?\"/g,e)},ne=function(e,r){if(X(e))return e=G(/^\s\s*/,e),typeof r===z?e:e.substring(0,He)},_e=function(e,r){if(!(!e||!r))for(var a=0,w,d,p,c,m,l;a<r.length&&!m;){var f=r[a],S=r[a+1];for(w=d=0;w<f.length&&!m&&f[w];)if(m=f[w++].exec(e),m)for(p=0;p<S.length;p++)l=m[++d],c=S[p],typeof c===V&&c.length>0?c.length===2?typeof c[1]==ue?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:c.length===3?typeof c[1]===ue&&!(c[1].exec&&c[1].test)?this[c[0]]=l?c[1].call(this,l,c[2]):void 0:this[c[0]]=l?l.replace(c[1],c[2]):void 0:c.length===4&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):void 0):this[c]=l||void 0;a+=2}},L=function(e,r){for(var a in r)if(typeof r[a]===V&&r[a].length>0){for(var w=0;w<r[a].length;w++)if(De(r[a][w],e))return a===Xe?void 0:a}else if(De(r[a],e))return a===Xe?void 0:a;return r.hasOwnProperty("*")?r["*"]:e},si={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ni={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ai={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[n,[s,q+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[n,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,n],[/opios[\/ ]+([\w\.]+)/i],[n,[s,ee+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[n,[s,ee+" GX"]],[/\bopr\/([\w\.]+)/i],[n,[s,ee]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[n,[s,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[n,[s,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[s,n],[/quark(?:pc)?\/([-\w\.]+)/i],[n,[s,"Quark"]],[/\bddg\/([\w\.]+)/i],[n,[s,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[n,[s,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[n,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[n,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[n,[s,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[n,[s,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[n,[s,"Smart "+Ze+ie]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure"+ie],n],[/\bfocus\/([\w\.]+)/i],[n,[s,J+" Focus"]],[/\bopt\/([\w\.]+)/i],[n,[s,ee+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[n,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[n,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[n,[s,ee+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[n,[s,"MIUI"+ie]],[/fxios\/([\w\.-]+)/i],[n,[s,q+J]],[/\bqihoobrowser\/?([\w\.]*)/i],[n,[s,"360"]],[/\b(qq)\/([\w\.]+)/i],[[s,/(.+)/,"$1Browser"],n],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1"+ie],n],[/samsungbrowser\/([\w\.]+)/i],[n,[s,Q+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[n,[s,oi+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[s,oi+" Mobile"],n],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[s,n],[/(lbbrowser|rekonq)/i],[s],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[n,s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,Oe],n,[i,K]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[s,n,[i,K]],[/\bgsa\/([\w\.]+) .*safari\//i],[n,[s,"GSA"],[i,K]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[n,[s,"TikTok"],[i,K]],[/\[(linkedin)app\]/i],[s,[i,K]],[/(chromium)[\/ ]([-\w\.]+)/i],[s,n],[/headlesschrome(?:\/([\w\.]+)| )/i],[n,[s,ti+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,ti+" WebView"],n],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[n,[s,"Android"+ie]],[/chrome\/([\w\.]+) mobile/i],[n,[s,q+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,n],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[n,[s,q+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[s,q+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[n,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[n,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[s,n],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[s,q+J],n],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],n],[/(wolvic|librewolf)\/([\w\.]+)/i],[s,n],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[n,[s,J+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[s,[n,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[s,[n,/[^\d\.]+./,W]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[y,/ower/,W,I]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[y,I]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[t,[o,Q],[i,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[t,[o,Q],[i,u]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[t,[o,P],[i,u]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[t,[o,P],[i,g]],[/(macintosh);/i],[t,[o,P]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[t,[o,ii],[i,u]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[t,[o,Je],[i,g]],[/honor([-\w ]+)[;\)]/i],[t,[o,Je],[i,u]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[t,[o,Qe],[i,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[t,[o,Qe],[i,u]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[t,/_/g," "],[o,Ee],[i,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[t,/_/g," "],[o,Ee],[i,u]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[t,[o,Se],[i,u]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[t,[o,L,{OnePlus:["304","403","203"],"*":Se}],[i,g]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[t,[o,"BLU"],[i,u]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[t,[o,"Vivo"],[i,u]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[t,[o,"Realme"],[i,u]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[t,[o,ye],[i,u]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[t,[o,ye],[i,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[t,[o,de],[i,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[t,[o,de],[i,u]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[t,[o,Ze],[i,g]],[/(nokia) (t[12][01])/i],[o,t,[i,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[t,/_/g," "],[i,u],[o,"Nokia"]],[/(pixel (c|tablet))\b/i],[t,[o,B],[i,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[t,[o,B],[i,u]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[t,[o,Z],[i,u]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[t,"Xperia Tablet"],[o,Z],[i,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[t,[o,ei],[i,u]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[t,[o,le],[i,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[t,/(.+)/g,"Fire Phone $1"],[o,le],[i,u]],[/(playbook);[-\w\),; ]+(rim)/i],[t,o,[i,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[t,[o,Ke],[i,u]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[t,[o,Ye],[i,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[t,[o,Ye],[i,u]],[/(nexus 9)/i],[t,[o,"HTC"],[i,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[o,[t,/_/g," "],[i,u]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[t,[o,"TCL"],[i,g]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[t,[o,"TCL"],[i,u]],[/(itel) ((\w+))/i],[[o,I],t,[i,L,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[t,[o,"Acer"],[i,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[t,[o,"Meizu"],[i,u]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[t,[o,"Ulefone"],[i,u]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[t,[o,"Energizer"],[i,u]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[t,[o,"Cat"],[i,u]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[t,[o,"Smartfren"],[i,u]],[/droid.+; (a(?:015|06[35]|142p?))/i],[t,[o,"Nothing"],[i,u]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[t,[o,"Archos"],[i,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[t,[o,"Archos"],[i,u]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[o,t,[i,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[o,t,[i,u]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[o,t,[i,g]],[/(surface duo)/i],[t,[o,ke],[i,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[t,[o,"Fairphone"],[i,u]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[t,[o,Re],[i,g]],[/(sprint) (\w+)/i],[o,t,[i,u]],[/(kin\.[onetw]{3})/i],[[t,/\./g," "],[o,ke],[i,u]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[t,[o,Ae],[i,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[t,[o,Ae],[i,u]],[/smart-tv.+(samsung)/i],[o,[i,v]],[/hbbtv.+maple;(\d+)/i],[[t,/^/,"SmartTV"],[o,Q],[i,v]],[/tcast.+(lg)e?. ([-\w]+)/i],[o,t,[i,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[o,de],[i,v]],[/(apple) ?tv/i],[o,[t,P+" TV"],[i,v]],[/crkey.*devicetype\/chromecast/i],[[t,U+" Third Generation"],[o,B],[i,v]],[/crkey.*devicetype\/([^/]*)/i],[[t,/^/,"Chromecast "],[o,B],[i,v]],[/fuchsia.*crkey/i],[[t,U+" Nest Hub"],[o,B],[i,v]],[/crkey/i],[[t,U],[o,B],[i,v]],[/(portaltv)/i],[t,[o,Oe],[i,v]],[/droid.+aft(\w+)( bui|\))/i],[t,[o,le],[i,v]],[/(shield \w+ tv)/i],[t,[o,Re],[i,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[t,[o,ii],[i,v]],[/(bravia[\w ]+)( bui|\))/i],[t,[o,Z],[i,v]],[/(mi(tv|box)-?\w+) bui/i],[t,[o,Ee],[i,v]],[/Hbbtv.*(technisat) (.*);/i],[o,t,[i,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[o,ne],[t,ne],[i,v]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[t,[i,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[i,v]],[/(ouya)/i,/(nintendo) (\w+)/i],[o,t,[i,re]],[/droid.+; (shield)( bui|\))/i],[t,[o,Re],[i,re]],[/(playstation \w+)/i],[t,[o,Z],[i,re]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[t,[o,ke],[i,re]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[t,[o,Q],[i,C]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[o,t,[i,C]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[t,[o,Se],[i,C]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[t,[o,P],[i,C]],[/(opwwe\d{3})/i],[t,[o,ei],[i,C]],[/(moto 360)/i],[t,[o,ye],[i,C]],[/(smartwatch 3)/i],[t,[o,Z],[i,C]],[/(g watch r)/i],[t,[o,de],[i,C]],[/droid.+; (wt63?0{2,3})\)/i],[t,[o,Ae],[i,C]],[/droid.+; (glass) \d/i],[t,[o,B],[i,xe]],[/(pico) (4|neo3(?: link|pro)?)/i],[o,t,[i,xe]],[/(quest( \d| pro)?s?).+vr/i],[t,[o,Oe],[i,xe]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[o,[i,oe]],[/(aeobc)\b/i],[t,[o,le],[i,oe]],[/(homepod).+mac os/i],[t,[o,P],[i,oe]],[/windows iot/i],[[i,oe]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[t,[i,L,{mobile:"Mobile",xr:"VR","*":g}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[i,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[i,u]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[t,[o,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[n,[s,$i+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[s,n],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[n,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[s,n],[/ladybird\//i],[[s,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[n,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,n],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[s,[n,L,si]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,L,si],[s,ze]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[n,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"macOS"],[n,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[n,[s,U+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[n,[s,U+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[n,[s,U+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[n,[s,U+" Linux"]],[/crkey\/([\d\.]+)/i],[n,[s,U]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[n,s],[/(ubuntu) ([\w\.]+) like android/i],[[s,/(.+)/,"$1 Touch"],n],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[s,n],[/\(bb(10);/i],[n,[s,Ke]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[n,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[n,[s,J+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[n,[s,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[n,[s,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[s,"Chrome OS"],n],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,n],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],n],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[s,n]]},ce=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return M.call(e.init,[[k,[s,n,se,i]],[_,[y]],[T,[i,t,o]],[O,[s,n]],[E,[s,n]]]),M.call(e.isIgnore,[[k,[n,se]],[O,[n]],[E,[n]]]),M.call(e.isIgnoreRgx,[[k,/ ?browser$/i],[E,/ ?os$/i]]),M.call(e.toString,[[k,[s,n]],[_,[y]],[T,[o,t]],[O,[s,n]],[E,[s,n]]]),e}(),Gi=function(e,r){var a=ce.init[r],w=ce.isIgnore[r]||0,d=ce.isIgnoreRgx[r]||0,p=ce.toString[r]||0;function c(){M.call(this,a)}return c.prototype.getItem=function(){return e},c.prototype.withClientHints=function(){return H?H.getHighEntropyValues(ui).then(function(m){return e.setCH(new bi(m,!1)).parseCH().get()}):e.parseCH().get()},c.prototype.withFeatureCheck=function(){return e.detectFeature().get()},r!=F&&(c.prototype.is=function(m){var l=!1;for(var f in this)if(this.hasOwnProperty(f)&&!De(w,f)&&I(d?G(d,this[f]):this[f])==I(d?G(d,m):m)){if(l=!0,m!=z)break}else if(m==z&&l){l=!l;break}return l},c.prototype.toString=function(){var m=W;for(var l in p)typeof this[p[l]]!==z&&(m+=(m?" ":W)+this[p[l]]);return m||z}),H||(c.prototype.then=function(m){var l=this,f=function(){for(var A in l)l.hasOwnProperty(A)&&(this[A]=l[A])};f.prototype={is:c.prototype.is,toString:c.prototype.toString};var S=new f;return m(S),S}),new c};function bi(e,r){if(e=e||{},M.call(this,ui),r)M.call(this,[[Ne,Ce(e[D])],[Pe,Ce(e[zi])],[u,/\?1/.test(e[Pi])],[t,te(e[qi])],[$,te(e[wi])],[qe,te(e[Fi])],[y,te(e[Di])],[N,Ce(e[Ni])],[fe,te(e[Bi])]]);else for(var a in e)this.hasOwnProperty(a)&&typeof e[a]!==z&&(this[a]=e[a])}function li(e,r,a,w){return this.get=function(d){return d?this.data.hasOwnProperty(d)?this.data[d]:void 0:this.data},this.set=function(d,p){return this.data[d]=p,this},this.setCH=function(d){return this.uaCH=d,this},this.detectFeature=function(){if(R&&R.userAgent==this.ua)switch(this.itemType){case k:R.brave&&typeof R.brave.isBrave==ue&&this.set(s,"Brave");break;case T:!this.get(i)&&H&&H[u]&&this.set(i,u),this.get(t)=="Macintosh"&&R&&typeof R.standalone!==z&&R.maxTouchPoints&&R.maxTouchPoints>2&&this.set(t,"iPad").set(i,g);break;case E:!this.get(s)&&H&&H[$]&&this.set(s,H[$]);break;case F:var d=this.data,p=function(c){return d[c].getItem().detectFeature().get()};this.set(k,p(k)).set(_,p(_)).set(T,p(T)).set(O,p(O)).set(E,p(E))}return this},this.parseUA=function(){return this.itemType!=F&&_e.call(this.data,this.ua,this.rgxMap),this.itemType==k&&this.set(se,Te(this.get(n))),this},this.parseCH=function(){var d=this.uaCH,p=this.rgxMap;switch(this.itemType){case k:case O:var c=d[Pe]||d[Ne],m;if(c)for(var l in c){var f=c[l].brand||c[l],S=c[l].version;this.itemType==k&&!/not.a.brand/i.test(f)&&(!m||/chrom/i.test(m)&&f!=ri)&&(f=L(f,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(s,f).set(n,S).set(se,Te(S)),m=f),this.itemType==O&&f==ri&&this.set(n,S)}break;case _:var A=d[y];A&&(A&&d[fe]=="64"&&(A+="64"),_e.call(this.data,A+";",p));break;case T:if(d[u]&&this.set(i,u),d[t]&&(this.set(t,d[t]),!this.get(i)||!this.get(o))){var x={};_e.call(x,"droid 9; "+d[t]+")",p),!this.get(i)&&x.type&&this.set(i,x.type),!this.get(o)&&x.vendor&&this.set(o,x.vendor)}if(d[N]){var ae;if(typeof d[N]!="string")for(var Fe=0;!ae&&Fe<d[N].length;)ae=L(d[N][Fe++],ni);else ae=L(d[N],ni);this.set(i,ae)}break;case E:var me=d[$];if(me){var he=d[qe];me==ze&&(he=parseInt(Te(he),10)>=13?"11":"10"),this.set(s,me).set(n,he)}this.get(s)==ze&&d[t]=="Xbox"&&this.set(s,"Xbox").set(n,void 0);break;case F:var yi=this.data,Y=function(Ri){return yi[Ri].getItem().setCH(d).parseCH().get()};this.set(k,Y(k)).set(_,Y(_)).set(T,Y(T)).set(O,Y(O)).set(E,Y(E))}return this},M.call(this,[["itemType",e],["ua",r],["uaCH",w],["rgxMap",a],["data",Gi(this,e)]]),this}function j(e,r,a){if(typeof e===V?(be(e,!0)?(typeof r===V&&(a=r),r=e):(a=e,r=void 0),e=void 0):typeof e===Le&&!be(r,!0)&&(a=r,r=void 0),a&&typeof a.append===ue){var w={};a.forEach(function(l,f){w[f]=l}),a=w}if(!(this instanceof j))return new j(e,r,a).getResult();var d=typeof e===Le?e:a&&a[Ge]?a[Ge]:R&&R.userAgent?R.userAgent:W,p=new bi(a,!0),c=r?Vi(ai,r):ai,m=function(l){return l==F?function(){return new li(l,d,c,p).set("ua",d).set(k,this.getBrowser()).set(_,this.getCPU()).set(T,this.getDevice()).set(O,this.getEngine()).set(E,this.getOS()).get()}:function(){return new li(l,d,c[l],p).parseUA().get()}};return M.call(this,[["getBrowser",m(k)],["getCPU",m(_)],["getDevice",m(T)],["getEngine",m(O)],["getOS",m(E)],["getResult",m(F)],["getUA",function(){return d}],["setUA",function(l){return X(l)&&(d=l.length>He?ne(l,He):l),this}]]).setUA(d),this}j.VERSION=Li;j.BROWSER=pe([s,n,se,i]);j.CPU=pe([y]);j.DEVICE=pe([t,o,i,re,u,v,g,C,oe]);j.ENGINE=j.OS=pe([s,n]);function Xi(e){return!e||typeof e!="string"?"break-all":e.includes(" ")?"break-word":"break-all"}function fi({logo:e="",name:r="",description:a="",size:w=40,variant:d="rounded",sx:p={},className:c="",logoName:m="",tooltip:l=null}){const f={width:w,height:w,...p},S=typeof r=="string"?r:e,A=b.jsxs(Ie,{direction:"row",spacing:1,className:`info-card-wrapper ${c}`,sx:{alignItems:"center",cursor:l?"pointer":"default"},children:[e?b.jsx($e,{src:e,alt:m??S,variant:d,sx:f}):b.jsx($e,{variant:d,sx:f,children:S?.slice(0,1)}),b.jsxs(Ie,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:Xi(r),minWidth:{xs:100,sm:140}},children:[b.jsx(we,{variant:"body1",component:"div",sx:{color:"text.primary"},children:r}),a&&b.jsx(we,{variant:"subtitle1",sx:{color:"text.secondary"},children:a})]})]});return l?b.jsx(Si,{title:l,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff",color:x=>x.palette.mode==="dark"?"#ffffff":x.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:x=>x.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:x=>x.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:A}):A}fi.propTypes={logo:h.string,name:h.oneOfType([h.string,h.node]).isRequired,description:h.oneOfType([h.string,h.node]),size:h.oneOfType([h.number,h.string]),variant:h.oneOf(["square","rounded","circular"]),sx:h.object,className:h.string,logoName:h.string,tooltip:h.oneOfType([h.string,h.node])};function Yi(e){try{if(!e.trim())return{device:{icon:b.jsx(ve,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:b.jsx(ge,{fontSize:"small"}),text:"Unknown Browser"}};const a=new j(e).getResult();let w="";const d=e.split(/\s+/).find(l=>l.startsWith("arcwallet"));if(d){const l=d.split("/");l.length>1&&Ve.coerce(l[1])&&(w=Ve.coerce(l[1]).version)}const p=(()=>{const{type:l="",model:f=""}=a.device;return l==="mobile"?{icon:b.jsx(Ei,{fontSize:"small"}),text:f||"Mobile Device"}:l==="tablet"?{icon:b.jsx(Ai,{fontSize:"small"}),text:f||"Tablet"}:{icon:b.jsx(Oi,{fontSize:"small"}),text:f||"Desktop"}})(),c=(()=>{const{name:l="",version:f=""}=a.os;return l.toLowerCase().includes("mac")?{icon:b.jsx(We,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("ios")?{icon:b.jsx(We,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("android")?{icon:b.jsx(Ci,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("windows")?{icon:b.jsx(ve,{fontSize:"small"}),text:`${l} ${f}`}:{icon:null,text:l?`${l} ${f}`:"Unknown OS"}})(),m=(()=>{const{name:l="",version:f=""}=a.browser;return{icon:b.jsx(ge,{fontSize:"small"}),text:l?`${l} ${f}`:"Unknown Browser"}})();return{device:p,os:c,browser:m,...w?{walletVersion:{icon:null,text:w}}:{}}}catch(r){return console.error("Error parsing user agent:",r),{device:{icon:b.jsx(ve,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:b.jsx(ge,{fontSize:"small"}),text:"Unknown Browser"}}}}function pi({ua:e}){const r=Yi(e);return b.jsx(Ie,{spacing:1,children:Object.entries(r).map(([a,{icon:w,text:d}])=>b.jsxs(Me,{sx:{display:"flex",alignItems:"center",gap:1},children:[b.jsx(Me,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:w}),b.jsx(we,{variant:"body2",sx:{display:"flex"},children:d})]},a))})}pi.propTypes={ua:h.string.isRequired};const Ki=()=>{const{t:e}=Be(),r={$all:e("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:r,formatRoleName:w=>{const d=(w||"").toLowerCase();return d.startsWith("$")?r[d]||d.slice(1):r[d]||d}}},Qi=(e,r=!1)=>{const a=r?1:.6;switch(e){case"owner":return`rgba(232, 222, 255, ${a})`;case"admin":return`rgba(227, 242, 253, ${a})`;case"member":return`rgba(232, 245, 233, ${a})`;case"guest":return`rgba(245, 245, 245, ${a})`;default:return`rgba(245, 245, 245, ${a})`}},Zi=di(ci)(({role:e})=>({backgroundColor:Qi(e.toLowerCase()),color:"#000000"})),Ji=e=>{switch(e){case"valid":return r=>r.palette.success.light;case"expired":return r=>r.palette.text.disabled;case"revoked":return r=>r.palette.error.light;default:return r=>r.palette.warning.light}},et=di(ci)(({theme:e,status:r})=>({backgroundColor:Ji(r)(e),color:"#FFFFFF"}));function mi({did:e}){return b.jsx(Ue,{size:14,responsive:!1,compact:!0,copyable:!1,did:e})}mi.propTypes={did:h.string.isRequired};function hi({timestamp:e,locale:r}){return b.jsx(Me,{sx:{minWidth:"100px"},children:b.jsx(Ti,{value:e,locale:r})})}hi.propTypes={timestamp:h.number.isRequired,locale:h.string.isRequired};function gi({name:e="",role:r}){const{formatRoleName:a}=Ki();return b.jsx(Zi,{label:a(e||r),size:"small",role:e||r,sx:{borderRadius:1}})}gi.propTypes={role:h.string.isRequired,name:h.string};function vi({status:e}){const{t:r}=Be();return b.jsx(et,{label:r(`team.passport.statusMap.${e}`),size:"small",status:e,sx:{borderRadius:1}})}vi.propTypes={status:h.string.isRequired};function xi({source:e}){const{t:r}=Be();return e?r(`team.passport.sourceMaps.${e}`):"-"}xi.propTypes={source:h.string.isRequired};function ki({user:e,size:r="default",tooltip:a=!1,inService:w=!1}){const{teamDid:d}=Hi(),p=je.useMemo(()=>Ui(e.avatar,d,w),[e.avatar,d,w]),c=je.useMemo(()=>b.jsx(Ue,{did:e?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[e?.did]),m=ji(()=>({...e,avatar:p}),[e,p]);return r==="small"?b.jsx(fi,{variant:"circular",logo:p,name:b.jsx(we,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:e.fullName||e.email}),...r==="small"?{tooltip:a?b.jsx(Ue,{did:e?.did}):!1,size:24}:{description:c,size:36}}):b.jsx(_i,{user:m,avatarSize:r==="small"?24:36,cardType:Mi.Detailed,infoType:Ii.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}ki.propTypes={user:h.object.isRequired,size:h.string,tooltip:h.bool,inService:h.bool};const it=je.memo(ki),ct=e=>b.jsx(mi,{did:e}),wt=(e,r)=>b.jsx(gi,{name:e,role:r}),ut=e=>b.jsx(vi,{status:e}),bt=(e,r)=>b.jsx(hi,{timestamp:e,locale:r}),ft=e=>b.jsx(xi,{source:e}),pt=(e,r=!1)=>b.jsx(it,{user:e,inService:r}),mt=e=>b.jsx(pi,{ua:e});export{pt as a,ut as b,bt as c,ft as d,mt as e,ct as f,wt as r,Ki as u};
1
+ import{j as b,b1 as Ie,b4 as $e,T as we,am as Si,W as h,s as di,U as ci,ak as Me,bN as ge,bO as ve,bP as Ei,bQ as Ai,bR as Oi,bS as We,bT as Ci}from"./vendor-mui-core-CmD-NPnl.js";import{T as Be,a6 as Ti,a7 as Ve}from"./vendor-ux-pYOhjQLA.js";import{B as _i,o as Ii,l as Mi}from"./index-DDpL_qpY.js";import{a as je}from"./vendor-react-Dvs43sk9.js";import{a as ji}from"./vendor-hooks-DLNZ8kxG.js";import{W as Ue}from"./did-address-CNnw4_bl.js";import{p as Ui}from"./util-CYsTlK2W.js";import{u as Hi}from"./team-CGGZIbfh.js";var Li="2.0.3",He=500,Ge="user-agent",W="",Xe="?",ue="function",z="undefined",V="object",Le="string",k="browser",_="cpu",T="device",O="engine",E="os",F="result",s="name",i="type",o="vendor",n="version",y="architecture",se="major",t="model",re="console",u="mobile",g="tablet",v="smarttv",C="wearable",xe="xr",oe="embedded",K="inapp",Ne="brands",N="formFactors",Pe="fullVersionList",$="platform",qe="platformVersion",fe="bitness",D="sec-ch-ua",zi=D+"-full-version-list",Di=D+"-arch",Bi=D+"-"+fe,Ni=D+"-form-factors",Pi=D+"-"+u,qi=D+"-"+t,wi=D+"-"+$,Fi=wi+"-version",ui=[Ne,Pe,u,t,$,qe,y,N,fe],le="Amazon",P="Apple",Ye="ASUS",Ke="BlackBerry",B="Google",Qe="Huawei",Ze="Lenovo",Je="Honor",de="LG",ke="Microsoft",ye="Motorola",Re="Nvidia",ei="OnePlus",Se="OPPO",Q="Samsung",ii="Sharp",Z="Sony",Ee="Xiaomi",Ae="Zebra",ti="Chrome",ri="Chromium",U="Chromecast",$i="Edge",J="Firefox",ee="Opera",Oe="Facebook",oi="Sogou",q="Mobile ",ie=" Browser",ze="Windows",Wi=typeof window!==z,R=Wi&&window.navigator?window.navigator:void 0,H=R&&R.userAgentData?R.userAgentData:void 0,Vi=function(e,r){var a={},w=r;if(!be(r)){w={};for(var d in r)for(var p in r[d])w[p]=r[d][p].concat(w[p]?w[p]:[])}for(var c in e)a[c]=w[c]&&w[c].length%2===0?w[c].concat(e[c]):e[c];return a},pe=function(e){for(var r={},a=0;a<e.length;a++)r[e[a].toUpperCase()]=e[a];return r},De=function(e,r){if(typeof e===V&&e.length>0){for(var a in e)if(I(e[a])==I(r))return!0;return!1}return X(e)?I(r).indexOf(I(e))!==-1:!1},be=function(e,r){for(var a in e)return/^(browser|cpu|device|engine|os)$/.test(a)||(r?be(e[a]):!1)},X=function(e){return typeof e===Le},Ce=function(e){if(e){for(var r=[],a=G(/\\?\"/g,e).split(","),w=0;w<a.length;w++)if(a[w].indexOf(";")>-1){var d=ne(a[w]).split(";v=");r[w]={brand:d[0],version:d[1]}}else r[w]=ne(a[w]);return r}},I=function(e){return X(e)?e.toLowerCase():e},Te=function(e){return X(e)?G(/[^\d\.]/g,e).split(".")[0]:void 0},M=function(e){for(var r in e){var a=e[r];typeof a==V&&a.length==2?this[a[0]]=a[1]:this[a]=void 0}return this},G=function(e,r){return X(r)?r.replace(e,W):r},te=function(e){return G(/\\?\"/g,e)},ne=function(e,r){if(X(e))return e=G(/^\s\s*/,e),typeof r===z?e:e.substring(0,He)},_e=function(e,r){if(!(!e||!r))for(var a=0,w,d,p,c,m,l;a<r.length&&!m;){var f=r[a],S=r[a+1];for(w=d=0;w<f.length&&!m&&f[w];)if(m=f[w++].exec(e),m)for(p=0;p<S.length;p++)l=m[++d],c=S[p],typeof c===V&&c.length>0?c.length===2?typeof c[1]==ue?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:c.length===3?typeof c[1]===ue&&!(c[1].exec&&c[1].test)?this[c[0]]=l?c[1].call(this,l,c[2]):void 0:this[c[0]]=l?l.replace(c[1],c[2]):void 0:c.length===4&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):void 0):this[c]=l||void 0;a+=2}},L=function(e,r){for(var a in r)if(typeof r[a]===V&&r[a].length>0){for(var w=0;w<r[a].length;w++)if(De(r[a][w],e))return a===Xe?void 0:a}else if(De(r[a],e))return a===Xe?void 0:a;return r.hasOwnProperty("*")?r["*"]:e},si={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ni={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ai={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[n,[s,q+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[n,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,n],[/opios[\/ ]+([\w\.]+)/i],[n,[s,ee+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[n,[s,ee+" GX"]],[/\bopr\/([\w\.]+)/i],[n,[s,ee]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[n,[s,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[n,[s,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[s,n],[/quark(?:pc)?\/([-\w\.]+)/i],[n,[s,"Quark"]],[/\bddg\/([\w\.]+)/i],[n,[s,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[n,[s,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[n,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[n,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[n,[s,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[n,[s,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[n,[s,"Smart "+Ze+ie]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure"+ie],n],[/\bfocus\/([\w\.]+)/i],[n,[s,J+" Focus"]],[/\bopt\/([\w\.]+)/i],[n,[s,ee+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[n,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[n,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[n,[s,ee+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[n,[s,"MIUI"+ie]],[/fxios\/([\w\.-]+)/i],[n,[s,q+J]],[/\bqihoobrowser\/?([\w\.]*)/i],[n,[s,"360"]],[/\b(qq)\/([\w\.]+)/i],[[s,/(.+)/,"$1Browser"],n],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1"+ie],n],[/samsungbrowser\/([\w\.]+)/i],[n,[s,Q+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[n,[s,oi+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[s,oi+" Mobile"],n],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[s,n],[/(lbbrowser|rekonq)/i],[s],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[n,s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,Oe],n,[i,K]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[s,n,[i,K]],[/\bgsa\/([\w\.]+) .*safari\//i],[n,[s,"GSA"],[i,K]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[n,[s,"TikTok"],[i,K]],[/\[(linkedin)app\]/i],[s,[i,K]],[/(chromium)[\/ ]([-\w\.]+)/i],[s,n],[/headlesschrome(?:\/([\w\.]+)| )/i],[n,[s,ti+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,ti+" WebView"],n],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[n,[s,"Android"+ie]],[/chrome\/([\w\.]+) mobile/i],[n,[s,q+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,n],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[n,[s,q+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[s,q+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[n,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[n,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[s,n],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[s,q+J],n],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],n],[/(wolvic|librewolf)\/([\w\.]+)/i],[s,n],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[n,[s,J+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[s,[n,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[s,[n,/[^\d\.]+./,W]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[y,/ower/,W,I]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[y,I]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[t,[o,Q],[i,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[t,[o,Q],[i,u]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[t,[o,P],[i,u]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[t,[o,P],[i,g]],[/(macintosh);/i],[t,[o,P]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[t,[o,ii],[i,u]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[t,[o,Je],[i,g]],[/honor([-\w ]+)[;\)]/i],[t,[o,Je],[i,u]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[t,[o,Qe],[i,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[t,[o,Qe],[i,u]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[t,/_/g," "],[o,Ee],[i,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[t,/_/g," "],[o,Ee],[i,u]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[t,[o,Se],[i,u]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[t,[o,L,{OnePlus:["304","403","203"],"*":Se}],[i,g]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[t,[o,"BLU"],[i,u]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[t,[o,"Vivo"],[i,u]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[t,[o,"Realme"],[i,u]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[t,[o,ye],[i,u]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[t,[o,ye],[i,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[t,[o,de],[i,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[t,[o,de],[i,u]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[t,[o,Ze],[i,g]],[/(nokia) (t[12][01])/i],[o,t,[i,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[t,/_/g," "],[i,u],[o,"Nokia"]],[/(pixel (c|tablet))\b/i],[t,[o,B],[i,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[t,[o,B],[i,u]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[t,[o,Z],[i,u]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[t,"Xperia Tablet"],[o,Z],[i,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[t,[o,ei],[i,u]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[t,[o,le],[i,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[t,/(.+)/g,"Fire Phone $1"],[o,le],[i,u]],[/(playbook);[-\w\),; ]+(rim)/i],[t,o,[i,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[t,[o,Ke],[i,u]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[t,[o,Ye],[i,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[t,[o,Ye],[i,u]],[/(nexus 9)/i],[t,[o,"HTC"],[i,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[o,[t,/_/g," "],[i,u]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[t,[o,"TCL"],[i,g]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[t,[o,"TCL"],[i,u]],[/(itel) ((\w+))/i],[[o,I],t,[i,L,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[t,[o,"Acer"],[i,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[t,[o,"Meizu"],[i,u]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[t,[o,"Ulefone"],[i,u]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[t,[o,"Energizer"],[i,u]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[t,[o,"Cat"],[i,u]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[t,[o,"Smartfren"],[i,u]],[/droid.+; (a(?:015|06[35]|142p?))/i],[t,[o,"Nothing"],[i,u]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[t,[o,"Archos"],[i,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[t,[o,"Archos"],[i,u]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[o,t,[i,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[o,t,[i,u]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[o,t,[i,g]],[/(surface duo)/i],[t,[o,ke],[i,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[t,[o,"Fairphone"],[i,u]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[t,[o,Re],[i,g]],[/(sprint) (\w+)/i],[o,t,[i,u]],[/(kin\.[onetw]{3})/i],[[t,/\./g," "],[o,ke],[i,u]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[t,[o,Ae],[i,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[t,[o,Ae],[i,u]],[/smart-tv.+(samsung)/i],[o,[i,v]],[/hbbtv.+maple;(\d+)/i],[[t,/^/,"SmartTV"],[o,Q],[i,v]],[/tcast.+(lg)e?. ([-\w]+)/i],[o,t,[i,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[o,de],[i,v]],[/(apple) ?tv/i],[o,[t,P+" TV"],[i,v]],[/crkey.*devicetype\/chromecast/i],[[t,U+" Third Generation"],[o,B],[i,v]],[/crkey.*devicetype\/([^/]*)/i],[[t,/^/,"Chromecast "],[o,B],[i,v]],[/fuchsia.*crkey/i],[[t,U+" Nest Hub"],[o,B],[i,v]],[/crkey/i],[[t,U],[o,B],[i,v]],[/(portaltv)/i],[t,[o,Oe],[i,v]],[/droid.+aft(\w+)( bui|\))/i],[t,[o,le],[i,v]],[/(shield \w+ tv)/i],[t,[o,Re],[i,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[t,[o,ii],[i,v]],[/(bravia[\w ]+)( bui|\))/i],[t,[o,Z],[i,v]],[/(mi(tv|box)-?\w+) bui/i],[t,[o,Ee],[i,v]],[/Hbbtv.*(technisat) (.*);/i],[o,t,[i,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[o,ne],[t,ne],[i,v]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[t,[i,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[i,v]],[/(ouya)/i,/(nintendo) (\w+)/i],[o,t,[i,re]],[/droid.+; (shield)( bui|\))/i],[t,[o,Re],[i,re]],[/(playstation \w+)/i],[t,[o,Z],[i,re]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[t,[o,ke],[i,re]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[t,[o,Q],[i,C]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[o,t,[i,C]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[t,[o,Se],[i,C]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[t,[o,P],[i,C]],[/(opwwe\d{3})/i],[t,[o,ei],[i,C]],[/(moto 360)/i],[t,[o,ye],[i,C]],[/(smartwatch 3)/i],[t,[o,Z],[i,C]],[/(g watch r)/i],[t,[o,de],[i,C]],[/droid.+; (wt63?0{2,3})\)/i],[t,[o,Ae],[i,C]],[/droid.+; (glass) \d/i],[t,[o,B],[i,xe]],[/(pico) (4|neo3(?: link|pro)?)/i],[o,t,[i,xe]],[/(quest( \d| pro)?s?).+vr/i],[t,[o,Oe],[i,xe]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[o,[i,oe]],[/(aeobc)\b/i],[t,[o,le],[i,oe]],[/(homepod).+mac os/i],[t,[o,P],[i,oe]],[/windows iot/i],[[i,oe]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[t,[i,L,{mobile:"Mobile",xr:"VR","*":g}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[i,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[i,u]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[t,[o,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[n,[s,$i+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[s,n],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[n,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[s,n],[/ladybird\//i],[[s,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[n,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,n],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[s,[n,L,si]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,L,si],[s,ze]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[n,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"macOS"],[n,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[n,[s,U+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[n,[s,U+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[n,[s,U+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[n,[s,U+" Linux"]],[/crkey\/([\d\.]+)/i],[n,[s,U]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[n,s],[/(ubuntu) ([\w\.]+) like android/i],[[s,/(.+)/,"$1 Touch"],n],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[s,n],[/\(bb(10);/i],[n,[s,Ke]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[n,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[n,[s,J+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[n,[s,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[n,[s,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[s,"Chrome OS"],n],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,n],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],n],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[s,n]]},ce=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return M.call(e.init,[[k,[s,n,se,i]],[_,[y]],[T,[i,t,o]],[O,[s,n]],[E,[s,n]]]),M.call(e.isIgnore,[[k,[n,se]],[O,[n]],[E,[n]]]),M.call(e.isIgnoreRgx,[[k,/ ?browser$/i],[E,/ ?os$/i]]),M.call(e.toString,[[k,[s,n]],[_,[y]],[T,[o,t]],[O,[s,n]],[E,[s,n]]]),e}(),Gi=function(e,r){var a=ce.init[r],w=ce.isIgnore[r]||0,d=ce.isIgnoreRgx[r]||0,p=ce.toString[r]||0;function c(){M.call(this,a)}return c.prototype.getItem=function(){return e},c.prototype.withClientHints=function(){return H?H.getHighEntropyValues(ui).then(function(m){return e.setCH(new bi(m,!1)).parseCH().get()}):e.parseCH().get()},c.prototype.withFeatureCheck=function(){return e.detectFeature().get()},r!=F&&(c.prototype.is=function(m){var l=!1;for(var f in this)if(this.hasOwnProperty(f)&&!De(w,f)&&I(d?G(d,this[f]):this[f])==I(d?G(d,m):m)){if(l=!0,m!=z)break}else if(m==z&&l){l=!l;break}return l},c.prototype.toString=function(){var m=W;for(var l in p)typeof this[p[l]]!==z&&(m+=(m?" ":W)+this[p[l]]);return m||z}),H||(c.prototype.then=function(m){var l=this,f=function(){for(var A in l)l.hasOwnProperty(A)&&(this[A]=l[A])};f.prototype={is:c.prototype.is,toString:c.prototype.toString};var S=new f;return m(S),S}),new c};function bi(e,r){if(e=e||{},M.call(this,ui),r)M.call(this,[[Ne,Ce(e[D])],[Pe,Ce(e[zi])],[u,/\?1/.test(e[Pi])],[t,te(e[qi])],[$,te(e[wi])],[qe,te(e[Fi])],[y,te(e[Di])],[N,Ce(e[Ni])],[fe,te(e[Bi])]]);else for(var a in e)this.hasOwnProperty(a)&&typeof e[a]!==z&&(this[a]=e[a])}function li(e,r,a,w){return this.get=function(d){return d?this.data.hasOwnProperty(d)?this.data[d]:void 0:this.data},this.set=function(d,p){return this.data[d]=p,this},this.setCH=function(d){return this.uaCH=d,this},this.detectFeature=function(){if(R&&R.userAgent==this.ua)switch(this.itemType){case k:R.brave&&typeof R.brave.isBrave==ue&&this.set(s,"Brave");break;case T:!this.get(i)&&H&&H[u]&&this.set(i,u),this.get(t)=="Macintosh"&&R&&typeof R.standalone!==z&&R.maxTouchPoints&&R.maxTouchPoints>2&&this.set(t,"iPad").set(i,g);break;case E:!this.get(s)&&H&&H[$]&&this.set(s,H[$]);break;case F:var d=this.data,p=function(c){return d[c].getItem().detectFeature().get()};this.set(k,p(k)).set(_,p(_)).set(T,p(T)).set(O,p(O)).set(E,p(E))}return this},this.parseUA=function(){return this.itemType!=F&&_e.call(this.data,this.ua,this.rgxMap),this.itemType==k&&this.set(se,Te(this.get(n))),this},this.parseCH=function(){var d=this.uaCH,p=this.rgxMap;switch(this.itemType){case k:case O:var c=d[Pe]||d[Ne],m;if(c)for(var l in c){var f=c[l].brand||c[l],S=c[l].version;this.itemType==k&&!/not.a.brand/i.test(f)&&(!m||/chrom/i.test(m)&&f!=ri)&&(f=L(f,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(s,f).set(n,S).set(se,Te(S)),m=f),this.itemType==O&&f==ri&&this.set(n,S)}break;case _:var A=d[y];A&&(A&&d[fe]=="64"&&(A+="64"),_e.call(this.data,A+";",p));break;case T:if(d[u]&&this.set(i,u),d[t]&&(this.set(t,d[t]),!this.get(i)||!this.get(o))){var x={};_e.call(x,"droid 9; "+d[t]+")",p),!this.get(i)&&x.type&&this.set(i,x.type),!this.get(o)&&x.vendor&&this.set(o,x.vendor)}if(d[N]){var ae;if(typeof d[N]!="string")for(var Fe=0;!ae&&Fe<d[N].length;)ae=L(d[N][Fe++],ni);else ae=L(d[N],ni);this.set(i,ae)}break;case E:var me=d[$];if(me){var he=d[qe];me==ze&&(he=parseInt(Te(he),10)>=13?"11":"10"),this.set(s,me).set(n,he)}this.get(s)==ze&&d[t]=="Xbox"&&this.set(s,"Xbox").set(n,void 0);break;case F:var yi=this.data,Y=function(Ri){return yi[Ri].getItem().setCH(d).parseCH().get()};this.set(k,Y(k)).set(_,Y(_)).set(T,Y(T)).set(O,Y(O)).set(E,Y(E))}return this},M.call(this,[["itemType",e],["ua",r],["uaCH",w],["rgxMap",a],["data",Gi(this,e)]]),this}function j(e,r,a){if(typeof e===V?(be(e,!0)?(typeof r===V&&(a=r),r=e):(a=e,r=void 0),e=void 0):typeof e===Le&&!be(r,!0)&&(a=r,r=void 0),a&&typeof a.append===ue){var w={};a.forEach(function(l,f){w[f]=l}),a=w}if(!(this instanceof j))return new j(e,r,a).getResult();var d=typeof e===Le?e:a&&a[Ge]?a[Ge]:R&&R.userAgent?R.userAgent:W,p=new bi(a,!0),c=r?Vi(ai,r):ai,m=function(l){return l==F?function(){return new li(l,d,c,p).set("ua",d).set(k,this.getBrowser()).set(_,this.getCPU()).set(T,this.getDevice()).set(O,this.getEngine()).set(E,this.getOS()).get()}:function(){return new li(l,d,c[l],p).parseUA().get()}};return M.call(this,[["getBrowser",m(k)],["getCPU",m(_)],["getDevice",m(T)],["getEngine",m(O)],["getOS",m(E)],["getResult",m(F)],["getUA",function(){return d}],["setUA",function(l){return X(l)&&(d=l.length>He?ne(l,He):l),this}]]).setUA(d),this}j.VERSION=Li;j.BROWSER=pe([s,n,se,i]);j.CPU=pe([y]);j.DEVICE=pe([t,o,i,re,u,v,g,C,oe]);j.ENGINE=j.OS=pe([s,n]);function Xi(e){return!e||typeof e!="string"?"break-all":e.includes(" ")?"break-word":"break-all"}function fi({logo:e="",name:r="",description:a="",size:w=40,variant:d="rounded",sx:p={},className:c="",logoName:m="",tooltip:l=null}){const f={width:w,height:w,...p},S=typeof r=="string"?r:e,A=b.jsxs(Ie,{direction:"row",spacing:1,className:`info-card-wrapper ${c}`,sx:{alignItems:"center",cursor:l?"pointer":"default"},children:[e?b.jsx($e,{src:e,alt:m??S,variant:d,sx:f}):b.jsx($e,{variant:d,sx:f,children:S?.slice(0,1)}),b.jsxs(Ie,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:Xi(r),minWidth:{xs:100,sm:140}},children:[b.jsx(we,{variant:"body1",component:"div",sx:{color:"text.primary"},children:r}),a&&b.jsx(we,{variant:"subtitle1",sx:{color:"text.secondary"},children:a})]})]});return l?b.jsx(Si,{title:l,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff",color:x=>x.palette.mode==="dark"?"#ffffff":x.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:x=>x.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:x=>x.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:A}):A}fi.propTypes={logo:h.string,name:h.oneOfType([h.string,h.node]).isRequired,description:h.oneOfType([h.string,h.node]),size:h.oneOfType([h.number,h.string]),variant:h.oneOf(["square","rounded","circular"]),sx:h.object,className:h.string,logoName:h.string,tooltip:h.oneOfType([h.string,h.node])};function Yi(e){try{if(!e.trim())return{device:{icon:b.jsx(ve,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:b.jsx(ge,{fontSize:"small"}),text:"Unknown Browser"}};const a=new j(e).getResult();let w="";const d=e.split(/\s+/).find(l=>l.startsWith("arcwallet"));if(d){const l=d.split("/");l.length>1&&Ve.coerce(l[1])&&(w=Ve.coerce(l[1]).version)}const p=(()=>{const{type:l="",model:f=""}=a.device;return l==="mobile"?{icon:b.jsx(Ei,{fontSize:"small"}),text:f||"Mobile Device"}:l==="tablet"?{icon:b.jsx(Ai,{fontSize:"small"}),text:f||"Tablet"}:{icon:b.jsx(Oi,{fontSize:"small"}),text:f||"Desktop"}})(),c=(()=>{const{name:l="",version:f=""}=a.os;return l.toLowerCase().includes("mac")?{icon:b.jsx(We,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("ios")?{icon:b.jsx(We,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("android")?{icon:b.jsx(Ci,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("windows")?{icon:b.jsx(ve,{fontSize:"small"}),text:`${l} ${f}`}:{icon:null,text:l?`${l} ${f}`:"Unknown OS"}})(),m=(()=>{const{name:l="",version:f=""}=a.browser;return{icon:b.jsx(ge,{fontSize:"small"}),text:l?`${l} ${f}`:"Unknown Browser"}})();return{device:p,os:c,browser:m,...w?{walletVersion:{icon:null,text:w}}:{}}}catch(r){return console.error("Error parsing user agent:",r),{device:{icon:b.jsx(ve,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:b.jsx(ge,{fontSize:"small"}),text:"Unknown Browser"}}}}function pi({ua:e}){const r=Yi(e);return b.jsx(Ie,{spacing:1,children:Object.entries(r).map(([a,{icon:w,text:d}])=>b.jsxs(Me,{sx:{display:"flex",alignItems:"center",gap:1},children:[b.jsx(Me,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:w}),b.jsx(we,{variant:"body2",sx:{display:"flex"},children:d})]},a))})}pi.propTypes={ua:h.string.isRequired};const Ki=()=>{const{t:e}=Be(),r={$all:e("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:r,formatRoleName:w=>{const d=(w||"").toLowerCase();return d.startsWith("$")?r[d]||d.slice(1):r[d]||d}}},Qi=(e,r=!1)=>{const a=r?1:.6;switch(e){case"owner":return`rgba(232, 222, 255, ${a})`;case"admin":return`rgba(227, 242, 253, ${a})`;case"member":return`rgba(232, 245, 233, ${a})`;case"guest":return`rgba(245, 245, 245, ${a})`;default:return`rgba(245, 245, 245, ${a})`}},Zi=di(ci)(({role:e})=>({backgroundColor:Qi(e.toLowerCase()),color:"#000000"})),Ji=e=>{switch(e){case"valid":return r=>r.palette.success.light;case"expired":return r=>r.palette.text.disabled;case"revoked":return r=>r.palette.error.light;default:return r=>r.palette.warning.light}},et=di(ci)(({theme:e,status:r})=>({backgroundColor:Ji(r)(e),color:"#FFFFFF"}));function mi({did:e}){return b.jsx(Ue,{size:14,responsive:!1,compact:!0,copyable:!1,did:e})}mi.propTypes={did:h.string.isRequired};function hi({timestamp:e,locale:r}){return b.jsx(Me,{sx:{minWidth:"100px"},children:b.jsx(Ti,{value:e,locale:r})})}hi.propTypes={timestamp:h.number.isRequired,locale:h.string.isRequired};function gi({name:e="",role:r}){const{formatRoleName:a}=Ki();return b.jsx(Zi,{label:a(e||r),size:"small",role:e||r,sx:{borderRadius:1}})}gi.propTypes={role:h.string.isRequired,name:h.string};function vi({status:e}){const{t:r}=Be();return b.jsx(et,{label:r(`team.passport.statusMap.${e}`),size:"small",status:e,sx:{borderRadius:1}})}vi.propTypes={status:h.string.isRequired};function xi({source:e}){const{t:r}=Be();return e?r(`team.passport.sourceMaps.${e}`):"-"}xi.propTypes={source:h.string.isRequired};function ki({user:e,size:r="default",tooltip:a=!1,inService:w=!1}){const{teamDid:d}=Hi(),p=je.useMemo(()=>Ui(e.avatar,d,w),[e.avatar,d,w]),c=je.useMemo(()=>b.jsx(Ue,{did:e?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[e?.did]),m=ji(()=>({...e,avatar:p}),[e,p]);return r==="small"?b.jsx(fi,{variant:"circular",logo:p,name:b.jsx(we,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:e.fullName||e.email}),...r==="small"?{tooltip:a?b.jsx(Ue,{did:e?.did}):!1,size:24}:{description:c,size:36}}):b.jsx(_i,{user:m,avatarSize:r==="small"?24:36,cardType:Mi.Detailed,infoType:Ii.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}ki.propTypes={user:h.object.isRequired,size:h.string,tooltip:h.bool,inService:h.bool};const it=je.memo(ki),ct=e=>b.jsx(mi,{did:e}),wt=(e,r)=>b.jsx(gi,{name:e,role:r}),ut=e=>b.jsx(vi,{status:e}),bt=(e,r)=>b.jsx(hi,{timestamp:e,locale:r}),ft=e=>b.jsx(xi,{source:e}),pt=(e,r=!1)=>b.jsx(it,{user:e,inService:r}),mt=e=>b.jsx(pi,{ua:e});export{pt as a,ut as b,bt as c,ft as d,mt as e,ct as f,wt as r,Ki as u};
@@ -1 +1 @@
1
- import{j as l,W as n}from"./vendor-mui-core-CmD-NPnl.js";import{u as m}from"./session-D-9YOhAy.js";function c({permission:i="",role:t="",component:e=null,children:o=null}){const{session:r}=m();let s=!0;const u=[].concat(i).filter(Boolean),f=[].concat(t).filter(Boolean);if(u.length){const p=r.user&&r.user.permissions||[];s=u.some(a=>p.includes(a))}return s&&f.length&&(s=f.includes(r.user.role)),typeof e=="function"?e(s):typeof o=="function"?o(s):s&&(e||o)||null}function x(i,t,e){return function(r){return l.jsx(c,{permission:t,role:e,children:s=>l.jsx(i,{...r,hasPermission:s})})}}c.propTypes={permission:n.oneOfType([n.string,n.arrayOf(n.string)]),role:n.oneOfType([n.string,n.arrayOf(n.string)]),component:n.oneOfType([n.func,n.node]),children:n.oneOfType([n.func,n.node])};export{c as P,x as w};
1
+ import{j as l,W as n}from"./vendor-mui-core-CmD-NPnl.js";import{u as m}from"./session-DGB-yOme.js";function c({permission:i="",role:t="",component:e=null,children:o=null}){const{session:r}=m();let s=!0;const u=[].concat(i).filter(Boolean),f=[].concat(t).filter(Boolean);if(u.length){const p=r.user&&r.user.permissions||[];s=u.some(a=>p.includes(a))}return s&&f.length&&(s=f.includes(r.user.role)),typeof e=="function"?e(s):typeof o=="function"?o(s):s&&(e||o)||null}function x(i,t,e){return function(r){return l.jsx(c,{permission:t,role:e,children:s=>l.jsx(i,{...r,hasPermission:s})})}}c.propTypes={permission:n.oneOfType([n.string,n.arrayOf(n.string)]),role:n.oneOfType([n.string,n.arrayOf(n.string)]),component:n.oneOfType([n.func,n.node]),children:n.oneOfType([n.func,n.node])};export{c as P,x as w};
@@ -1 +1 @@
1
- import{j as o}from"./vendor-mui-core-CmD-NPnl.js";import{C as t}from"./vendor-utils-DQK0pEML.js";import{I as s}from"./iframe-BZdurKlN.js";import{c as e}from"./index-6k6hDX7K.js";import{S as m}from"./studio-B3QjabKr.js";import"./vendor-react-Dvs43sk9.js";import"./vendor-ux-ESjuHpb6.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./index-BxgIheOv.js";function L(){const r=new URLSearchParams;r.set("title","Preference Builder"),r.set("schemaKey",t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/studio/preferences"));const i=`${t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/hosted/form-builder/")}?${r.toString()}`;return o.jsx(m,{children:o.jsx(s,{url:i,width:"100%",height:"100%",frameBorder:0,styles:{border:0}})})}export{L as default};
1
+ import{j as o}from"./vendor-mui-core-CmD-NPnl.js";import{C as t}from"./vendor-utils-DQK0pEML.js";import{I as s}from"./iframe-sRTCxuKq.js";import{c as e}from"./index-D5Esor4q.js";import{S as m}from"./studio-DkZBruFV.js";import"./vendor-react-Dvs43sk9.js";import"./vendor-ux-pYOhjQLA.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DEa0A9MF.js";import"./index-DhLCZYhn.js";function L(){const r=new URLSearchParams;r.set("title","Preference Builder"),r.set("schemaKey",t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/studio/preferences"));const i=`${t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/hosted/form-builder/")}?${r.toString()}`;return o.jsx(m,{children:o.jsx(s,{url:i,width:"100%",height:"100%",frameBorder:0,styles:{border:0}})})}export{L as default};
@@ -0,0 +1 @@
1
+ import{j as r}from"./vendor-mui-core-CmD-NPnl.js";import{_ as o}from"./user-center-C7a4TtFt.js";import{H as i}from"./index-D5Esor4q.js";import{T as e}from"./vendor-ux-pYOhjQLA.js";import"./vendor-react-Dvs43sk9.js";import"./vendor-hooks-DLNZ8kxG.js";import"./vendor-utils-DQK0pEML.js";import"./index-VDwida7T.js";import"./arrow-down.svg-DNHk5QBL.js";import"./user-sessions-DN1hzt8P.js";import"./index-BVZj6aBL.js";import"./index-B06oP6vd.js";import"./vendor-arcblock-DEa0A9MF.js";import"./index-B2Y1qZ07.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-Ck6n4b0a.js";import"./lottie-web-4koyQiv_.js";function H(){const{t}=e();return r.jsxs(r.Fragment,{children:[r.jsx(i,{children:r.jsx("title",{children:t("pageTitle.userCenter")})}),r.jsx(o,{onlyProfile:!0,currentTab:"",disableAutoRedirect:!0})]})}export{H as default};
@@ -1 +1 @@
1
- import{J as n,j as i,ak as l}from"./vendor-mui-core-CmD-NPnl.js";import{j as d,r as c}from"./vendor-react-Dvs43sk9.js";import{T as u,F as h}from"./vendor-ux-ESjuHpb6.js";import g from"./index-D0zr5fnU.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./index-6k6hDX7K.js";import"./vendor-arcblock-C-xQV6LY.js";import"./confirm-BSaR4_fO.js";import"./index-DBs9Ljax.js";import"./session-D-9YOhAy.js";import"./did-address-D6qV21Cc.js";import"./empty-spinner-DCC7mgEb.js";import"./bundle-avatar-CF-8YjIk.js";import"./shorten-label-Cbu8wo9m.js";import"./list-header-CoFZp82R.js";import"./click-to-copy-BWrdBff2.js";import"./question-mark-circle.svg-B4stD6SS.js";import"./useSetState-DFuQZPPV.js";import"./engine-B4t4bO94.js";import"./api-sewNv0AE.js";import"./vendor-mui-x--K2rEM1j.js";import"./react-beautiful-dnd.esm-5xsARSNi.js";import"./raf-schd.esm-CHNehTG3.js";import"./wait-connect-zz_yxj4x.js";import"./get-safe-url-C5Vpma4S.js";import"./item-CRpPGQS5.js";import"./delete-confirm-BR2z4Ljn.js";import"./index-DEdn8u__.js";import"./index-kiLQKwVa.js";import"./index-gcYTlYEZ.js";const r=new URL(window.location.href),s=r.searchParams.get("mode")==="dialog",w=s?"":r.searchParams.get("padding")||"";function V(){const{t:p}=u(),{componentDid:o}=d(),m=n(t=>t.breakpoints.down("md")),a=t=>{t.stopPropagation(),window.parent.postMessage({event:"resourceDialog.close",componentDid:o},"*")};c.useEffect(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:o},"*")},[o]);const e=i.jsx(g,{padding:w,initUrl:r});return s?i.jsx(h,{className:"studio-dialog",title:p("blocklet.publish.blockletStudio"),maxWidth:!1,fullWidth:!1,PaperProps:{style:m?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:a,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:i.jsx(l,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:e})}):e}export{V as default};
1
+ import{J as n,j as i,ak as l}from"./vendor-mui-core-CmD-NPnl.js";import{j as d,r as c}from"./vendor-react-Dvs43sk9.js";import{T as u,F as h}from"./vendor-ux-pYOhjQLA.js";import g from"./index-DbV_otyH.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./index-D5Esor4q.js";import"./vendor-arcblock-DEa0A9MF.js";import"./confirm-DUjUXcfn.js";import"./index-DBs9Ljax.js";import"./session-DGB-yOme.js";import"./did-address-CNnw4_bl.js";import"./empty-spinner-DCC7mgEb.js";import"./bundle-avatar-BhNvlq8g.js";import"./shorten-label-Cbu8wo9m.js";import"./list-header-CoFZp82R.js";import"./click-to-copy-Dqmzk5Lh.js";import"./question-mark-circle.svg-B4stD6SS.js";import"./useSetState-DFuQZPPV.js";import"./engine-Cc4hAHgQ.js";import"./api-sewNv0AE.js";import"./vendor-mui-x--K2rEM1j.js";import"./react-beautiful-dnd.esm-DPZZJVHP.js";import"./raf-schd.esm-CHNehTG3.js";import"./wait-connect-DxmVFheW.js";import"./get-safe-url-PVZ8sNva.js";import"./item-B-p0IMj0.js";import"./delete-confirm-BIF7Oky1.js";import"./index-B06oP6vd.js";import"./index-kiLQKwVa.js";import"./index-gcYTlYEZ.js";const r=new URL(window.location.href),s=r.searchParams.get("mode")==="dialog",w=s?"":r.searchParams.get("padding")||"";function V(){const{t:p}=u(),{componentDid:o}=d(),m=n(t=>t.breakpoints.down("md")),a=t=>{t.stopPropagation(),window.parent.postMessage({event:"resourceDialog.close",componentDid:o},"*")};c.useEffect(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:o},"*")},[o]);const e=i.jsx(g,{padding:w,initUrl:r});return s?i.jsx(h,{className:"studio-dialog",title:p("blocklet.publish.blockletStudio"),maxWidth:!1,fullWidth:!1,PaperProps:{style:m?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:a,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:i.jsx(l,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:e})}):e}export{V as default};
@@ -1,4 +1,4 @@
1
- import{a as F,r as w,c as Wn,b as kn}from"./vendor-react-Dvs43sk9.js";import{a as Ve,_ as E,aH as Qr,al as Nt}from"./vendor-mui-core-CmD-NPnl.js";import{at as Zr,au as Un,av as Hn,aw as qn}from"./vendor-ux-ESjuHpb6.js";import{u as R,a as S,r as Ee,w as $e,g as Tt,e as Mt,c as Vn,b as ue,d as $n,o as Ir}from"./raf-schd.esm-CHNehTG3.js";var Lt=F.createContext(null);function zn(e){e()}var Ft=zn,jn=function(r){return Ft=r},Yn=function(){return Ft};function Kn(){var e=Yn(),r=null,t=null;return{clear:function(){r=null,t=null},notify:function(){e(function(){for(var i=r;i;)i.callback(),i=i.next})},get:function(){for(var i=[],a=r;a;)i.push(a),a=a.next;return i},subscribe:function(i){var a=!0,o=t={callback:i,next:null,prev:t};return o.prev?o.prev.next=o:r=o,function(){!a||r===null||(a=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:r=o.next)}}}}var _r={notify:function(){},get:function(){return[]}};function Gt(e,r){var t,n=_r;function i(u){return c(),n.subscribe(u)}function a(){n.notify()}function o(){p.onStateChange&&p.onStateChange()}function l(){return!!t}function c(){t||(t=r?r.addNestedSub(o):e.subscribe(o),n=Kn())}function d(){t&&(t(),t=void 0,n.clear(),n=_r)}var p={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:o,isSubscribed:l,trySubscribe:c,tryUnsubscribe:d,getListeners:function(){return n}};return p}var Wt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?w.useLayoutEffect:w.useEffect;function Jn(e){var r=e.store,t=e.context,n=e.children,i=w.useMemo(function(){var l=Gt(r);return{store:r,subscription:l}},[r]),a=w.useMemo(function(){return r.getState()},[r]);Wt(function(){var l=i.subscription;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==r.getState()&&l.notifyNestedSubs(),function(){l.tryUnsubscribe(),l.onStateChange=null}},[i,a]);var o=t||Lt;return F.createElement(o.Provider,{value:i},n)}var cr={exports:{}},N={};/** @license React v17.0.2
1
+ import{a as F,r as w,c as Wn,b as kn}from"./vendor-react-Dvs43sk9.js";import{a as Ve,_ as E,aH as Qr,al as Nt}from"./vendor-mui-core-CmD-NPnl.js";import{at as Zr,au as Un,av as Hn,aw as qn}from"./vendor-ux-pYOhjQLA.js";import{u as R,a as S,r as Ee,w as $e,g as Tt,e as Mt,c as Vn,b as ue,d as $n,o as Ir}from"./raf-schd.esm-CHNehTG3.js";var Lt=F.createContext(null);function zn(e){e()}var Ft=zn,jn=function(r){return Ft=r},Yn=function(){return Ft};function Kn(){var e=Yn(),r=null,t=null;return{clear:function(){r=null,t=null},notify:function(){e(function(){for(var i=r;i;)i.callback(),i=i.next})},get:function(){for(var i=[],a=r;a;)i.push(a),a=a.next;return i},subscribe:function(i){var a=!0,o=t={callback:i,next:null,prev:t};return o.prev?o.prev.next=o:r=o,function(){!a||r===null||(a=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:r=o.next)}}}}var _r={notify:function(){},get:function(){return[]}};function Gt(e,r){var t,n=_r;function i(u){return c(),n.subscribe(u)}function a(){n.notify()}function o(){p.onStateChange&&p.onStateChange()}function l(){return!!t}function c(){t||(t=r?r.addNestedSub(o):e.subscribe(o),n=Kn())}function d(){t&&(t(),t=void 0,n.clear(),n=_r)}var p={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:o,isSubscribed:l,trySubscribe:c,tryUnsubscribe:d,getListeners:function(){return n}};return p}var Wt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?w.useLayoutEffect:w.useEffect;function Jn(e){var r=e.store,t=e.context,n=e.children,i=w.useMemo(function(){var l=Gt(r);return{store:r,subscription:l}},[r]),a=w.useMemo(function(){return r.getState()},[r]);Wt(function(){var l=i.subscription;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==r.getState()&&l.notifyNestedSubs(),function(){l.tryUnsubscribe(),l.onStateChange=null}},[i,a]);var o=t||Lt;return F.createElement(o.Provider,{value:i},n)}var cr={exports:{}},N={};/** @license React v17.0.2
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1 +1 @@
1
- import{r as v}from"./vendor-react-Dvs43sk9.js";import{D as M,n as k,j as n,W as r,ak as y,T as g,c1 as I,at as T,am as R,c2 as G,c3 as q}from"./vendor-mui-core-CmD-NPnl.js";import{B as V,p as Z}from"./dashboard-DgmOVZgS.js";import{T as $,O as _,ab as J,ac as K}from"./vendor-ux-ESjuHpb6.js";import{aC as w,aD as C,Z as Q,a8 as N,f as L,aE as X}from"./index-6k6hDX7K.js";import{V as Y}from"./vendor-utils-DQK0pEML.js";import{x as P}from"./index-DRYJ0xIl.js";import{B as S}from"./base-chart-BntWHeFy.js";import{B as ee}from"./bundle-avatar-CF-8YjIk.js";import"./vendor-arcblock-C-xQV6LY.js";import"./vendor-hooks-DLNZ8kxG.js";import"./useLocalStorage-vyIYLydJ.js";import"./index-DBs9Ljax.js";import"./confirm-BSaR4_fO.js";import"./get-safe-url-C5Vpma4S.js";import"./session-D-9YOhAy.js";import"./team-RDmDo4cZ.js";import"./isURL-BOLVWN6q.js";import"./use-app-logo-DesKuFha.js";import"./useAsyncRetry-6TjWJyO6.js";import"./useAsync-CNAYLnLm.js";import"./useSetState-DFuQZPPV.js";import"./index-BxgIheOv.js";import"./over-due-invoice-payment-OBj9thMb.js";import"./use-mobile-CQ7Tw4aD.js";import"./lottie-web-4koyQiv_.js";import"./index-DO9UDa6G.js";function z({title:s="",cpus:f=[],currentLoad:i=0,history:u=[],empty:l=null,onHover:p=()=>{},hoverIndex:a=null}){const{t:d,locale:x}=$(),t=M(),o=`${s||d("common.cpu")} (${Math.floor(i||0)}%)`,e=100,m=80,c=H=>`${H}%`,D=[{max:m,color:k(t.palette.primary.main,t.palette.mode==="dark"?.15:.08)},{min:m,max:100,color:k(t.palette.warning.main,t.palette.mode==="dark"?.18:.12)},{min:100,color:k(t.palette.error.main,t.palette.mode==="dark"?.25:.18)}],b={silent:!0,symbol:["none","none"],data:[{yAxis:100,lineStyle:{color:t.palette.error.main,type:"dashed",width:1.5},label:{formatter:`${c(100)}`,position:"insideEndTop",color:t.palette.text.secondary,padding:[2,4],borderRadius:2}},{yAxis:m,lineStyle:{color:t.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${c(m)}`,position:"insideEndTop",color:t.palette.text.secondary,padding:[2,4],borderRadius:2}}]},j=n.jsx("span",{children:`${d("system.cores")}: ${f?.length||0}`}),B=H=>w(Number(H),"HH:mm",x);return n.jsx(S,{title:o,total:e,history:u,valueFn:c,xAxisFormat:B,visualMapPieces:D,markLineData:b,extraInfo:j,empty:l,onHover:p,hoverIndex:a})}z.propTypes={title:r.string,cpus:r.array,currentLoad:r.number,history:r.array,empty:r.node,onHover:r.func,hoverIndex:r.number};function E({instanceCount:s=null,title:f="",total:i=null,used:u=null,history:l=[],empty:p=null,onHover:a=()=>{},hoverIndex:d=null}){const{t:x,locale:t}=$(),o=M(),e=!!i,m=i-u,c=e?`(${C(u)}, ${Math.floor(u/i*100)}%)`:"",D=`${f||x("common.memory")} ${c}`,b=Math.ceil(i*.8),j=h=>P(h,{short:!0,iec:!0}),B=[];s&&B.push({title:x("system.instances"),metric:s}),e&&B.push({title:x("system.free"),metric:j(m)});const H=[{max:b,color:k(o.palette.primary.main,o.palette.mode==="dark"?.15:.08)},{min:b,max:i,color:k(o.palette.warning.main,o.palette.mode==="dark"?.18:.12)},{min:i,color:k(o.palette.error.main,o.palette.mode==="dark"?.25:.18)}],F={silent:!0,symbol:["none","none"],data:[{yAxis:i,lineStyle:{color:o.palette.error.main,type:"dashed",width:1.5},label:{formatter:`${j(i)}`,position:"insideEndTop",color:o.palette.text.secondary,padding:[2,4],borderRadius:2}},{yAxis:b,lineStyle:{color:o.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${j(b)}`,position:"insideEndTop",color:o.palette.text.secondary,padding:[2,4],borderRadius:2}}]},A=n.jsx(n.Fragment,{children:B.map((h,O)=>n.jsxs(y,{sx:{marginLeft:O===0?0:1,display:"inline-flex"},children:[h.title,": ",h.metric]},h.title))}),W=h=>w(Number(h),"HH:mm",t);return n.jsx(S,{title:D,total:i,history:l,valueFn:j,xAxisFormat:W,visualMapPieces:H,markLineData:F,extraInfo:A,empty:p,onHover:a,hoverIndex:d})}E.propTypes={title:r.string,instanceCount:r.number,total:r.number,used:r.number,history:r.array,empty:r.node,onHover:r.func,hoverIndex:r.number};function U({blocklet:s,cpuHistory:f=[],memoryHistory:i=[],...u}){const{t:l}=$(),{info:p}=Q(),{runtimeHistory:a}=N(),[d,x]=v.useState(null),t=v.useCallback(e=>s.status!=="running"?n.jsx(g,{children:l("blocklet.runtimeInfo.noRunning")}):e.length?null:n.jsx(_,{children:l("common.empty")}),[s.status,l]),o=v.useCallback(e=>{x(e)},[]);return a.length===0?n.jsx(g,{children:l("blocklet.runtimeInfo.noRunning")}):n.jsxs(te,{component:"div",...u,memoryHistory:i,cpuHistory:f,children:[n.jsxs(I,{className:"page-metrics",container:!0,spacing:5,children:[n.jsx(I,{sx:{pt:"16px !important"},size:12,children:n.jsx(g,{sx:{fontSize:"16px",fontWeight:"bold"},children:"CPU"})}),a?.map(e=>n.jsx(I,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:n.jsx(z,{title:`${e.name} CPU`,empty:t(e.cpu),currentLoad:e.appRuntimeInfo?.cpuUsage||0,cpus:e.appRuntimeInfo?.cpus||[],history:e.cpu,onHover:o,hoverIndex:d,style:{height:150}})},`${e.key}-cpu`))]}),n.jsxs(I,{className:"page-metrics",container:!0,spacing:5,sx:{mt:1},children:[n.jsx(I,{sx:{pt:"16px !important"},size:12,children:n.jsx(g,{sx:{fontSize:"16px",fontWeight:"bold"},children:"Memory"})}),a?.map(e=>n.jsx(I,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:n.jsx(E,{title:`${e.name} Memory`,empty:t(e.memory),total:p.runtimeConfig?.blockletMaxMemoryLimit?P.parseSize(`${p.runtimeConfig.blockletMaxMemoryLimit*(e.key===s?.meta?.did?a.length-1:1)}MiB`):0,used:e.appRuntimeInfo?.memoryUsage||0,history:e.memory,onHover:o,hoverIndex:d,style:{height:150}})},`${e.key}-memory`))]})]})}U.propTypes={blocklet:r.object.isRequired,cpuHistory:r.arrayOf(r.shape({date:r.number,value:r.number})),memoryHistory:r.arrayOf(r.shape({date:r.number,value:r.number}))};const te=T(g)``;function Me(){const{t:s,locale:f}=$(),[i,u]=v.useState(6),{blocklet:l,actions:{refreshBlocklet:p}}=N(),a=v.useMemo(()=>{const t=[];return L.forEachBlockletSync(l,(o,{ancestors:e,id:m,level:c})=>{o?.meta?.did&&o.meta.did!==l.meta.did&&t.push({type:"blocklet",groupId:l.meta.did,groupName:L.getDisplayName(l),id:m,name:L.getDisplayName(o,!0),blocklet:l,component:o,level:c-1>=0?c-1:0,runtimeInfo:o.runtimeInfo,ancestors:e})}),t},[l]);v.useEffect(()=>{p({hours:i});const t=setInterval(()=>{p({hours:i})},1e3*10);return()=>{clearInterval(t)}},[i]);const d=t=>Z(Number(t||0),{locale:X(f)}),x=[{label:s("common.name"),name:"name",options:{customBodyRenderLite(t){const{name:o,component:e,level:m,ancestors:c}=a[t];return n.jsxs(y,{sx:{display:"flex",alignItems:"center",pl:m*2},children:[n.jsx(ee,{size:20,blocklet:e,ancestors:c}),n.jsx(y,{sx:{ml:1},children:o}),n.jsx(V,{variant:"pin",style:{marginLeft:8},status:e.status,source:e.source,progress:e.progress})]})}}},{label:s("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(R,{title:s("common.noData"),children:"--"}):d(o?.uptime)}}},{label:s("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(R,{title:s("common.noData"),children:"--"}):C(o?.memoryUsage||0)}}},{label:s("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(R,{title:s("common.noData"),children:"--"}):`${(o?.cpuUsage||0).toFixed(1)}%`}}},{label:s("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return o?.uptime?n.jsxs(y,{sx:{display:"flex",alignItems:"center"},children:[n.jsx(J,{icon:o?.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),n.jsx(y,{sx:{ml:1},children:o?.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:s("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(R,{title:s("common.noData"),children:"--"}):o?.pid}}},{label:s("blocklet.runtimeInfo.port"),name:"runtimeInfo.port",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(R,{title:s("common.noData"),children:"--"}):o?.port}}}];return n.jsxs(ne,{component:"div",children:[n.jsxs(y,{sx:{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2},children:[n.jsx(g,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:2},children:s("analytics.trend")}),n.jsx(G,{size:"small",exclusive:!0,value:i,onChange:(t,o)=>{Y(o)&&u(o)},children:[1,3,6,12,24].map(t=>n.jsxs(q,{value:t,children:[t,"H"]},t))})]}),n.jsx(y,{children:n.jsx(U,{blocklet:l})}),n.jsx(y,{sx:{mt:3},children:n.jsx(K,{title:s("analytics.detail"),className:"monitor-table",locale:f,data:a,columns:x,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]})}const ne=T(g)``;export{Me as default};
1
+ import{r as v}from"./vendor-react-Dvs43sk9.js";import{D as M,n as k,j as n,W as r,ak as y,T as g,c1 as I,at as T,am as R,c2 as G,c3 as q}from"./vendor-mui-core-CmD-NPnl.js";import{B as V,p as Z}from"./dashboard-q_CEWNOG.js";import{T as $,O as _,ab as J,ac as K}from"./vendor-ux-pYOhjQLA.js";import{aC as w,aD as C,Z as Q,a8 as N,f as L,aE as X}from"./index-D5Esor4q.js";import{V as Y}from"./vendor-utils-DQK0pEML.js";import{x as P}from"./index-DRYJ0xIl.js";import{B as S}from"./base-chart-BntWHeFy.js";import{B as ee}from"./bundle-avatar-BhNvlq8g.js";import"./vendor-arcblock-DEa0A9MF.js";import"./vendor-hooks-DLNZ8kxG.js";import"./useLocalStorage-CiLfInVV.js";import"./index-DBs9Ljax.js";import"./confirm-DUjUXcfn.js";import"./get-safe-url-PVZ8sNva.js";import"./session-DGB-yOme.js";import"./team-CGGZIbfh.js";import"./isURL-DZGsNcmL.js";import"./use-app-logo-DxlfjGOQ.js";import"./useAsyncRetry-6TjWJyO6.js";import"./useAsync-CNAYLnLm.js";import"./useSetState-DFuQZPPV.js";import"./index-DhLCZYhn.js";import"./over-due-invoice-payment-CgKEpOv9.js";import"./use-mobile-CQ7Tw4aD.js";import"./lottie-web-4koyQiv_.js";import"./index-DO9UDa6G.js";function z({title:s="",cpus:f=[],currentLoad:i=0,history:u=[],empty:l=null,onHover:p=()=>{},hoverIndex:a=null}){const{t:d,locale:x}=$(),t=M(),o=`${s||d("common.cpu")} (${Math.floor(i||0)}%)`,e=100,m=80,c=H=>`${H}%`,D=[{max:m,color:k(t.palette.primary.main,t.palette.mode==="dark"?.15:.08)},{min:m,max:100,color:k(t.palette.warning.main,t.palette.mode==="dark"?.18:.12)},{min:100,color:k(t.palette.error.main,t.palette.mode==="dark"?.25:.18)}],b={silent:!0,symbol:["none","none"],data:[{yAxis:100,lineStyle:{color:t.palette.error.main,type:"dashed",width:1.5},label:{formatter:`${c(100)}`,position:"insideEndTop",color:t.palette.text.secondary,padding:[2,4],borderRadius:2}},{yAxis:m,lineStyle:{color:t.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${c(m)}`,position:"insideEndTop",color:t.palette.text.secondary,padding:[2,4],borderRadius:2}}]},j=n.jsx("span",{children:`${d("system.cores")}: ${f?.length||0}`}),B=H=>w(Number(H),"HH:mm",x);return n.jsx(S,{title:o,total:e,history:u,valueFn:c,xAxisFormat:B,visualMapPieces:D,markLineData:b,extraInfo:j,empty:l,onHover:p,hoverIndex:a})}z.propTypes={title:r.string,cpus:r.array,currentLoad:r.number,history:r.array,empty:r.node,onHover:r.func,hoverIndex:r.number};function E({instanceCount:s=null,title:f="",total:i=null,used:u=null,history:l=[],empty:p=null,onHover:a=()=>{},hoverIndex:d=null}){const{t:x,locale:t}=$(),o=M(),e=!!i,m=i-u,c=e?`(${C(u)}, ${Math.floor(u/i*100)}%)`:"",D=`${f||x("common.memory")} ${c}`,b=Math.ceil(i*.8),j=h=>P(h,{short:!0,iec:!0}),B=[];s&&B.push({title:x("system.instances"),metric:s}),e&&B.push({title:x("system.free"),metric:j(m)});const H=[{max:b,color:k(o.palette.primary.main,o.palette.mode==="dark"?.15:.08)},{min:b,max:i,color:k(o.palette.warning.main,o.palette.mode==="dark"?.18:.12)},{min:i,color:k(o.palette.error.main,o.palette.mode==="dark"?.25:.18)}],F={silent:!0,symbol:["none","none"],data:[{yAxis:i,lineStyle:{color:o.palette.error.main,type:"dashed",width:1.5},label:{formatter:`${j(i)}`,position:"insideEndTop",color:o.palette.text.secondary,padding:[2,4],borderRadius:2}},{yAxis:b,lineStyle:{color:o.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${j(b)}`,position:"insideEndTop",color:o.palette.text.secondary,padding:[2,4],borderRadius:2}}]},A=n.jsx(n.Fragment,{children:B.map((h,O)=>n.jsxs(y,{sx:{marginLeft:O===0?0:1,display:"inline-flex"},children:[h.title,": ",h.metric]},h.title))}),W=h=>w(Number(h),"HH:mm",t);return n.jsx(S,{title:D,total:i,history:l,valueFn:j,xAxisFormat:W,visualMapPieces:H,markLineData:F,extraInfo:A,empty:p,onHover:a,hoverIndex:d})}E.propTypes={title:r.string,instanceCount:r.number,total:r.number,used:r.number,history:r.array,empty:r.node,onHover:r.func,hoverIndex:r.number};function U({blocklet:s,cpuHistory:f=[],memoryHistory:i=[],...u}){const{t:l}=$(),{info:p}=Q(),{runtimeHistory:a}=N(),[d,x]=v.useState(null),t=v.useCallback(e=>s.status!=="running"?n.jsx(g,{children:l("blocklet.runtimeInfo.noRunning")}):e.length?null:n.jsx(_,{children:l("common.empty")}),[s.status,l]),o=v.useCallback(e=>{x(e)},[]);return a.length===0?n.jsx(g,{children:l("blocklet.runtimeInfo.noRunning")}):n.jsxs(te,{component:"div",...u,memoryHistory:i,cpuHistory:f,children:[n.jsxs(I,{className:"page-metrics",container:!0,spacing:5,children:[n.jsx(I,{sx:{pt:"16px !important"},size:12,children:n.jsx(g,{sx:{fontSize:"16px",fontWeight:"bold"},children:"CPU"})}),a?.map(e=>n.jsx(I,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:n.jsx(z,{title:`${e.name} CPU`,empty:t(e.cpu),currentLoad:e.appRuntimeInfo?.cpuUsage||0,cpus:e.appRuntimeInfo?.cpus||[],history:e.cpu,onHover:o,hoverIndex:d,style:{height:150}})},`${e.key}-cpu`))]}),n.jsxs(I,{className:"page-metrics",container:!0,spacing:5,sx:{mt:1},children:[n.jsx(I,{sx:{pt:"16px !important"},size:12,children:n.jsx(g,{sx:{fontSize:"16px",fontWeight:"bold"},children:"Memory"})}),a?.map(e=>n.jsx(I,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:n.jsx(E,{title:`${e.name} Memory`,empty:t(e.memory),total:p.runtimeConfig?.blockletMaxMemoryLimit?P.parseSize(`${p.runtimeConfig.blockletMaxMemoryLimit*(e.key===s?.meta?.did?a.length-1:1)}MiB`):0,used:e.appRuntimeInfo?.memoryUsage||0,history:e.memory,onHover:o,hoverIndex:d,style:{height:150}})},`${e.key}-memory`))]})]})}U.propTypes={blocklet:r.object.isRequired,cpuHistory:r.arrayOf(r.shape({date:r.number,value:r.number})),memoryHistory:r.arrayOf(r.shape({date:r.number,value:r.number}))};const te=T(g)``;function Me(){const{t:s,locale:f}=$(),[i,u]=v.useState(6),{blocklet:l,actions:{refreshBlocklet:p}}=N(),a=v.useMemo(()=>{const t=[];return L.forEachBlockletSync(l,(o,{ancestors:e,id:m,level:c})=>{o?.meta?.did&&o.meta.did!==l.meta.did&&t.push({type:"blocklet",groupId:l.meta.did,groupName:L.getDisplayName(l),id:m,name:L.getDisplayName(o,!0),blocklet:l,component:o,level:c-1>=0?c-1:0,runtimeInfo:o.runtimeInfo,ancestors:e})}),t},[l]);v.useEffect(()=>{p({hours:i});const t=setInterval(()=>{p({hours:i})},1e3*10);return()=>{clearInterval(t)}},[i]);const d=t=>Z(Number(t||0),{locale:X(f)}),x=[{label:s("common.name"),name:"name",options:{customBodyRenderLite(t){const{name:o,component:e,level:m,ancestors:c}=a[t];return n.jsxs(y,{sx:{display:"flex",alignItems:"center",pl:m*2},children:[n.jsx(ee,{size:20,blocklet:e,ancestors:c}),n.jsx(y,{sx:{ml:1},children:o}),n.jsx(V,{variant:"pin",style:{marginLeft:8},status:e.status,source:e.source,progress:e.progress})]})}}},{label:s("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(R,{title:s("common.noData"),children:"--"}):d(o?.uptime)}}},{label:s("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(R,{title:s("common.noData"),children:"--"}):C(o?.memoryUsage||0)}}},{label:s("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(R,{title:s("common.noData"),children:"--"}):`${(o?.cpuUsage||0).toFixed(1)}%`}}},{label:s("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return o?.uptime?n.jsxs(y,{sx:{display:"flex",alignItems:"center"},children:[n.jsx(J,{icon:o?.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),n.jsx(y,{sx:{ml:1},children:o?.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:s("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(R,{title:s("common.noData"),children:"--"}):o?.pid}}},{label:s("blocklet.runtimeInfo.port"),name:"runtimeInfo.port",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(R,{title:s("common.noData"),children:"--"}):o?.port}}}];return n.jsxs(ne,{component:"div",children:[n.jsxs(y,{sx:{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2},children:[n.jsx(g,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:2},children:s("analytics.trend")}),n.jsx(G,{size:"small",exclusive:!0,value:i,onChange:(t,o)=>{Y(o)&&u(o)},children:[1,3,6,12,24].map(t=>n.jsxs(q,{value:t,children:[t,"H"]},t))})]}),n.jsx(y,{children:n.jsx(U,{blocklet:l})}),n.jsx(y,{sx:{mt:3},children:n.jsx(K,{title:s("analytics.detail"),className:"monitor-table",locale:f,data:a,columns:x,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]})}const ne=T(g)``;export{Me as default};
@@ -0,0 +1 @@
1
+ import{g as o}from"./index-D5Esor4q.js";const e=o();export{e as b};
@@ -1,4 +1,4 @@
1
- import{T as U,ab as O,G as ee,H as E,F as ae,D as de,ac as ue,L as _e}from"./vendor-ux-ESjuHpb6.js";import{g as oe,k as K,b as w,a as me,h as ge}from"./vendor-hooks-DLNZ8kxG.js";import{r as k}from"./vendor-react-Dvs43sk9.js";import{j as e,ak as P,am as q,I as N,be as Y,W as g,D as te,z as D,A as We,Q as X,T as Fe,cL as Ne,cM as Le,M as Ve,y as L,b5 as J,b6 as V,a5 as G,F as Me,U as Ze,b7 as Ue,a7 as $e,b9 as Xe,bp as ve,bq as Ce,b1 as Ge,at as Ke}from"./vendor-mui-core-CmD-NPnl.js";import{a8 as se,Z as re,c as T,aZ as fe,bj as Pe}from"./index-6k6hDX7K.js";import{n as Z,a1 as Q,Y as $,a2 as Ye,C as Je,G as be,a3 as ye,c as M,o as je}from"./vendor-utils-DQK0pEML.js";import{u as pe,C as F}from"./index.esm-JPZAjt0x.js";import{S as le}from"./simple-select-BqhbnnqN.js";import{u as Se}from"./team-RDmDo4cZ.js";import{A as we}from"./config-DBzwJyqc.js";import{u as Qe}from"./use-mobile-D93Bk2Ru.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./session-D-9YOhAy.js";import"./isURL-BOLVWN6q.js";import"./use-app-logo-DesKuFha.js";const eo={width:24,height:24,body:'<path fill="currentColor" d="M11 14.2V6q0-.425.288-.713T12 5q.425 0 .713.288T13 6v8.2l2.9-2.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7l-4.6 4.6q-.3.3-.7.3t-.7-.3l-4.6-4.6q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l2.9 2.9Z"/>'},oo={width:24,height:24,body:'<path fill="currentColor" d="m11 8.8l-2.9 2.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L13 8.8V17q0 .425-.288.713T12 18q-.425 0-.713-.288T11 17V8.8Z"/>'},he={width:24,height:24,body:'<path fill="currentColor" d="M7 21q-.825 0-1.413-.588T5 19V6q-.425 0-.713-.288T4 5q0-.425.288-.713T5 4h4q0-.425.288-.713T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6v13q0 .825-.588 1.413T17 21H7Zm2-4h2V8H9v9Zm4 0h2V8h-2v9Z"/>'},xe={width:24,height:24,body:'<path fill="currentColor" d="M4 21q-.425 0-.713-.288T3 20v-2.425q0-.4.15-.763t.425-.637L16.2 3.575q.3-.275.663-.425t.762-.15q.4 0 .775.15t.65.45L20.425 5q.3.275.437.65T21 6.4q0 .4-.138.763t-.437.662l-12.6 12.6q-.275.275-.638.425t-.762.15H4ZM17.6 7.8L19 6.4L17.6 5l-1.4 1.4l1.4 1.4Z"/>'};function He({enabled:o,showUp:t=!0,showDown:c=!0,showSwitch:n=!0,showDelete:s=!0,showEdit:l=!0,disableEdit:d=!1,disableSwitch:u=!1,onClickUp:i=()=>{},onClickDown:r=()=>{},onClickSwitch:f=()=>{},onClickDelete:h=()=>{},onClickEdit:H=()=>{}}){const{t:x}=U();return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:0},onClick:I=>I.stopPropagation(),children:[l?e.jsx(q,{title:x("common.edit"),children:e.jsx(N,{size:"small",onClick:H,color:"success",disabled:d,children:e.jsx(O,{icon:xe,fontSize:18})})}):null,s?e.jsx(q,{title:x("common.delete"),children:e.jsx(N,{size:"small",onClick:h,color:"error",children:e.jsx(O,{icon:he,fontSize:18})})}):null,n?e.jsx(q,{title:x(o?"common.enabled":"common.disabled"),children:e.jsx(Y,{size:"small",checked:o,onClick:f,disabled:u})}):null,t?e.jsx(q,{title:x("common.moveUp"),children:e.jsx(N,{size:"small",onClick:i,disabled:d,children:e.jsx(O,{icon:oo,fontSize:20})})}):null,c?e.jsx(q,{title:x("common.moveDown"),children:e.jsx(N,{size:"small",onClick:r,disabled:d,children:e.jsx(O,{icon:eo,fontSize:20})})}):null]})}He.propTypes={enabled:g.bool.isRequired,showUp:g.bool,showDown:g.bool,showSwitch:g.bool,showDelete:g.bool,showEdit:g.bool,disableEdit:g.bool,disableSwitch:g.bool,onClickUp:g.func,onClickDown:g.func,onClickSwitch:g.func,onClickDelete:g.func,onClickEdit:g.func};function Re({ref:o=null}){const{t}=k.useContext(ee),{blocklet:c}=se(),{api:n}=re(),s=c?.meta?.did,d=te()?.transitions?.duration?.leavingScreen||300,u=oe({mode:"add",show:!1,isDefaultRule:!1,callback:Z,get dialogTitle(){return this.mode==="edit"?t("securityRule.edit"):this.mode==="view"?t("securityRule.view"):t("securityRule.add")}}),i=K(async()=>{const{accessPolicies:y}=await n.getBlockletAccessPolicies({input:{did:s}});return Q(y,C=>C.isProtected?1:0)},{manual:!0}),r=K(async()=>{const{responseHeaderPolicies:y}=await n.getBlockletResponseHeaderPolicies({input:{did:s}});return Q(y,C=>C.isProtected?1:0)},{manual:!0}),{handleSubmit:f,control:h,watch:H,setValue:x,getValues:I,reset:B,formState:{errors:A}}=pe({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),_=w(()=>{B(),u.mode="add"}),S=w(()=>{u.show=!1,setTimeout(()=>{_()},d)}),b=w((y,C=null)=>{u.show=!0,C&&(u.isDefaultRule=C.id===T.SECURITY_RULE_DEFAULT_ID,u.mode="edit",x("componentDid",C.componentDid),x("pathPattern",C.pathPattern),x("responseHeaderPolicyId",C.responseHeaderPolicyId),x("accessPolicyId",C.accessPolicyId),x("remark",C.remark||"")),y?u.callback=y:u.mode="view",i.run(),r.run()});k.useImperativeHandle(o,()=>({open:b,close:S}),[b,S]);const m=w(()=>{const[y,C]=I(["accessPolicyId","responseHeaderPolicyId"]);return!y&&!C?t("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),a=w(y=>{const C=m();if(C===!0){const ne=u.isDefaultRule?$(y,"componentDid"):y;u.callback(ne,S)}else E.error(C)}),j=H("componentDid"),z=w(y=>{const C=y?.trim();if(!C)return t("common.requiredErrorText",{name:t("securityRule.form.pathPattern")});if(j){if(C.startsWith("/"))return t("securityRule.form.pathPatternErrorText")}else if(!C.startsWith("/")&&C!=="*")return t("securityRule.form.pathPatternErrorText");return!0}),p=w(y=>y?.trim()?!0:t("common.requiredErrorText",{name:t("securityRule.form.accessPolicy")})),v=w(y=>y?.trim()?!0:t("common.requiredErrorText",{name:t("securityRule.form.responseHeaderPolicy")})),R=me(()=>{const C=(c?.children||[]).find(ne=>ne.meta.did===j);return C?.mountPoint?Ye(C.mountPoint):null},[c,j]);return e.jsx(ae,{open:u.show,title:u.dialogTitle,onClose:S,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(de,{color:"primary",autoFocus:!0,variant:"contained",onClick:f(a),children:t("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[u.isDefaultRule?null:e.jsx(F,{name:"componentDid",control:h,render:({field:y})=>e.jsx(le,{fullWidth:!0,margin:"dense",size:"small",label:t("securityRule.form.component"),placeholer:t("securityRule.form.componentPlaceholder"),options:c.children.map(C=>({title:C.meta.title,value:C.meta.did,description:C.mountPoint})),error:!!A?.componentDid?.message,helperText:A?.componentDid?.message||"Choose belong to component",...$(y,"ref"),readOnly:u.mode==="view"})}),e.jsx(F,{name:"pathPattern",control:h,rules:{validate:z},render:({field:y})=>e.jsx(D,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:t("securityRule.form.pathPatternPlaceholder"),label:t("securityRule.form.pathPattern"),error:!!A?.pathPattern?.message,helperText:A?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...y,disabled:u.isDefaultRule||u.mode==="view",slotProps:{input:{startAdornment:R?e.jsx(We,{position:"start",children:R}):null}}})}),e.jsx(F,{name:"accessPolicyId",control:h,rules:{validate:u.isDefaultRule?p:Z},render:({field:y})=>e.jsx(le,{fullWidth:!0,required:u.isDefaultRule,margin:"dense",size:"small",label:t("securityRule.form.accessPolicy"),placeholer:t("securityRule.form.accessPolicyPlaceholder"),options:(i.data||[]).map(C=>({value:C.id,title:C.name,description:C.description})),error:!!A?.accessPolicyId?.message,helperText:A?.accessPolicyId?.message||t("securityRule.form.accessPolicyHelperText"),...$(y,"ref"),disabled:u.mode==="view"})}),e.jsx(F,{name:"responseHeaderPolicyId",control:h,rules:{validate:u.isDefaultRule?v:Z},render:({field:y})=>e.jsx(le,{fullWidth:!0,required:u.isDefaultRule,margin:"dense",size:"small",label:t("securityRule.form.responseHeaderPolicy"),placeholer:t("securityRule.form.responseHeaderPolicyPlaceholder"),options:(r.data||[]).map(C=>({title:C.name,value:C.id,description:C.description})),error:!!A?.responseHeaderPolicyId?.message,helperText:A?.responseHeaderPolicyId?.message||t("securityRule.form.responseHeaderPolicyHelperText"),...$(y,"ref"),disabled:u.mode==="view"})}),e.jsx(F,{name:"remark",control:h,render:({field:y})=>e.jsx(D,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:t("securityRule.form.remarkPlaceholder"),label:t("securityRule.form.remark"),helperText:A?.message,...y,disabled:u.mode==="view"})})]})})}Re.propTypes={ref:g.any};const W=async(o,t="Failed to saved")=>{try{await o()}catch(c){E.error(c?.message||t)}};function to(){const{t:o,locale:t}=U(),{blocklet:c}=se(),{api:n}=re(),s=c?.meta?.did,l=te(),d=k.useRef(null),u=k.useRef(null),{confirmApi:i,confirmHolder:r}=fe(),f=K(async()=>{const{securityRules:p}=await n.getBlockletSecurityRules({input:{did:s,includeDisabled:!0}});return p}),h=p=>p.id===T.SECURITY_RULE_DEFAULT_ID,H=w(p=>(c?.children||[]).find(R=>R.meta.did===p)?.mountPoint),x=(f.data||[]).map(p=>{if(p.componentDid){const v=H(p.componentDid);p._disabled=v===void 0}return p}),I=x.filter(p=>!h(p)),B=(p,v)=>{W(async()=>{const R=p.target.checked;await n.updateBlockletSecurityRule({input:{did:s,data:{id:v.id,enabled:R}}}),E.success(o("common.succeeded")),f.run()})},A=(p,v,R)=>{W(async()=>{const y=R-1,C=x[y];await Promise.all([n.updateBlockletSecurityRule({input:{did:s,data:{id:v.id,priority:C.priority}}}),n.updateBlockletSecurityRule({input:{did:s,data:{id:C.id,priority:v.priority}}})]),E.success(o("common.succeeded")),f.run()})},_=(p,v,R)=>{W(async()=>{const y=R+1,C=x[y];await Promise.all([n.updateBlockletSecurityRule({input:{did:s,data:{id:v.id,priority:C.priority}}}),n.updateBlockletSecurityRule({input:{did:s,data:{id:C.id,priority:v.priority}}})]),E.success(o("common.succeeded")),f.run()})},S=()=>{d.current.open((p,v)=>{W(async()=>{await n.addBlockletSecurityRule({input:{did:s,data:p}}),E.success(o("common.succeeded")),f.run(),v()})})},b=(p,v)=>{d.current.open((R,y)=>{W(async()=>{await n.updateBlockletSecurityRule({input:{did:s,data:{...R,id:v.id}}}),E.success(o("common.succeeded")),f.run(),y()})},v)},m=(p,v)=>{i.open({title:o("securityRule.delete.title"),content:o("securityRule.delete.description"),confirmButtonText:o("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:o("common.cancel"),onConfirm(R){W(async()=>{await n.deleteBlockletSecurityRule({input:{did:s,id:v.id}}),E.success(o("common.succeeded")),f.run(),R()})}})},a={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(p,{dataIndex:v},R){if(u.current?.contains(R.target)){const y=x[v];d.current.open(void 0,y)}},setRowProps:(p,v)=>x[v]._disabled?{title:o("securityRule.useless"),style:{backgroundColor:l.palette.action.disabledBackground,cursor:"default"}}:{}},j=[e.jsx(X,{size:"small",variant:"outlined",onClick:()=>{f.run()},sx:{mr:1},children:o("common.refresh")},"refresh"),e.jsx(X,{size:"small",variant:"contained",onClick:S,children:o("common.add")})],z=[{label:o("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(p){const v=x[p];return e.jsx(P,{sx:{whiteSpace:"nowrap"},children:v.id===T.SECURITY_RULE_DEFAULT_ID?"Default":Je(H(v.componentDid),v.pathPattern)})}}},{label:o("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(p){return x[p].responseHeaderPolicy?.name}}},{label:o("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(p){return x[p].accessPolicy?.name}}},{label:o("securityRule.form.remark"),name:"remark"},{label:o("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(p){const v=x[p],R=h(v);return e.jsx(He,{disableEdit:v._disabled,disableSwitch:v._disabled,enabled:v.enabled,showSwitch:!R,showDelete:!R,showUp:p>0&&!R,showDown:p<I.length-1&&!R,onClickSwitch:y=>{B(y,v)},onClickUp:y=>{A(y,v,p)},onClickDown:y=>{_(y,v,p)},onClickEdit:y=>{b(y,v)},onClickDelete:y=>{m(y,v)}})}}}].filter(Boolean);return e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2},ref:u,children:[e.jsx(ue,{verticalKeyWidth:100,locale:t,title:e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:1},children:[o("securityRule.title")," ",e.jsx(Fe,{variant:"body2",children:o("securityRule.sortByDescription")})]}),data:x,columns:z,customButtons:j,options:a,loading:f.loading}),e.jsx(Re,{ref:d}),r]})}const Te={width:24,height:24,body:'<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm0-2h14V7H5v12Zm7-2q-2.05 0-3.663-1.113T6 13q.725-1.775 2.337-2.888T12 9q2.05 0 3.663 1.113T18 13q-.725 1.775-2.337 2.888T12 17Zm0-2.5q-.625 0-1.063-.438T10.5 13q0-.625.438-1.063T12 11.5q.625 0 1.063.438T13.5 13q0 .625-.438 1.063T12 14.5Zm0 1q1.05 0 1.775-.725T14.5 13q0-1.05-.725-1.775T12 10.5q-1.05 0-1.775.725T9.5 13q0 1.05.725 1.775T12 15.5Z"/>'};function ke({value:o,onChange:t,...c}){const n="roles",s="roles_reverse",{t:l,locale:d}=U(),u=[...we,{value:n,icon:Ne,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:s,icon:Le,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(D,{...c,label:l("blocklet.config.access.description"),select:!0,fullWidth:!0,value:o,onChange:t,slotProps:{select:{renderValue:i=>{const r=u.find(f=>f.value===i);return r?e.jsxs(P,{children:[e.jsx(P,{component:r.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),r.title[d]||r.title.en]}):null}}},children:u.map(i=>e.jsxs(Ve,{value:i.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:r})=>r.palette.text.secondary}`}},children:[e.jsxs(P,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(P,{component:i.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx(P,{children:i.title[d]||i.title.en})]}),e.jsx(P,{className:"tip",children:i.description[d]||i.description.en})]}))})}ke.propTypes={value:g.string,onChange:g.func};const Ae=o=>{const t={name:o.name,description:o.description},{roles:c=null,reverse:n}=o;return c===null?n===!1&&(t.whoCanAccess=T.WHO_CAN_ACCESS.ALL,t.roles=null):c.length===0&&n===!0?(t.whoCanAccess=T.WHO_CAN_ACCESS.INVITED,t.roles=[]):ye(c,[T.WHO_CAN_ACCESS.OWNER])&&n===!1?(t.whoCanAccess=T.WHO_CAN_ACCESS.OWNER,t.roles=[T.WHO_CAN_ACCESS.OWNER]):ye(c,[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN])&&n===!1?(t.whoCanAccess=T.WHO_CAN_ACCESS.ADMIN,t.roles=[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN]):(t.whoCanAccess=n?"roles_reverse":"roles",t.roles=c),t},so=o=>{const t={name:o.name,description:o.description},{roles:c=null,whoCanAccess:n}=o;return n==="roles"?(t.roles=c,t.reverse=!1):n==="roles_reverse"?(t.roles=c,t.reverse=!0):n===T.WHO_CAN_ACCESS.ALL?(t.roles=null,t.reverse=!1):n===T.WHO_CAN_ACCESS.INVITED?(t.roles=[],t.reverse=!0):n===T.WHO_CAN_ACCESS.OWNER?(t.roles=[T.WHO_CAN_ACCESS.OWNER],t.reverse=!1):n===T.WHO_CAN_ACCESS.ADMIN&&(t.roles=[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN],t.reverse=!1),t},ro=o=>o instanceof Object?{origin:o.origin?{override:o.origin?.override??!0,value:o.origin?.value?.join(`
1
+ import{T as U,ab as O,G as ee,H as E,F as ae,D as de,ac as ue,L as _e}from"./vendor-ux-pYOhjQLA.js";import{g as oe,k as K,b as w,a as me,h as ge}from"./vendor-hooks-DLNZ8kxG.js";import{r as k}from"./vendor-react-Dvs43sk9.js";import{j as e,ak as P,am as q,I as N,be as Y,W as g,D as te,z as D,A as We,Q as X,T as Fe,cL as Ne,cM as Le,M as Ve,y as L,b5 as J,b6 as V,a5 as G,F as Me,U as Ze,b7 as Ue,a7 as $e,b9 as Xe,bp as ve,bq as Ce,b1 as Ge,at as Ke}from"./vendor-mui-core-CmD-NPnl.js";import{a8 as se,Z as re,c as T,aZ as fe,bj as Pe}from"./index-D5Esor4q.js";import{n as Z,a1 as Q,Y as $,a2 as Ye,C as Je,G as be,a3 as ye,c as M,o as je}from"./vendor-utils-DQK0pEML.js";import{u as pe,C as F}from"./index.esm-JPZAjt0x.js";import{S as le}from"./simple-select-BqhbnnqN.js";import{u as Se}from"./team-CGGZIbfh.js";import{A as we}from"./config-CLkKQ7r7.js";import{u as Qe}from"./use-mobile-D93Bk2Ru.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DEa0A9MF.js";import"./session-DGB-yOme.js";import"./isURL-DZGsNcmL.js";import"./use-app-logo-DxlfjGOQ.js";const eo={width:24,height:24,body:'<path fill="currentColor" d="M11 14.2V6q0-.425.288-.713T12 5q.425 0 .713.288T13 6v8.2l2.9-2.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7l-4.6 4.6q-.3.3-.7.3t-.7-.3l-4.6-4.6q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l2.9 2.9Z"/>'},oo={width:24,height:24,body:'<path fill="currentColor" d="m11 8.8l-2.9 2.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L13 8.8V17q0 .425-.288.713T12 18q-.425 0-.713-.288T11 17V8.8Z"/>'},he={width:24,height:24,body:'<path fill="currentColor" d="M7 21q-.825 0-1.413-.588T5 19V6q-.425 0-.713-.288T4 5q0-.425.288-.713T5 4h4q0-.425.288-.713T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6v13q0 .825-.588 1.413T17 21H7Zm2-4h2V8H9v9Zm4 0h2V8h-2v9Z"/>'},xe={width:24,height:24,body:'<path fill="currentColor" d="M4 21q-.425 0-.713-.288T3 20v-2.425q0-.4.15-.763t.425-.637L16.2 3.575q.3-.275.663-.425t.762-.15q.4 0 .775.15t.65.45L20.425 5q.3.275.437.65T21 6.4q0 .4-.138.763t-.437.662l-12.6 12.6q-.275.275-.638.425t-.762.15H4ZM17.6 7.8L19 6.4L17.6 5l-1.4 1.4l1.4 1.4Z"/>'};function He({enabled:o,showUp:t=!0,showDown:c=!0,showSwitch:n=!0,showDelete:s=!0,showEdit:l=!0,disableEdit:d=!1,disableSwitch:u=!1,onClickUp:i=()=>{},onClickDown:r=()=>{},onClickSwitch:f=()=>{},onClickDelete:h=()=>{},onClickEdit:H=()=>{}}){const{t:x}=U();return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:0},onClick:I=>I.stopPropagation(),children:[l?e.jsx(q,{title:x("common.edit"),children:e.jsx(N,{size:"small",onClick:H,color:"success",disabled:d,children:e.jsx(O,{icon:xe,fontSize:18})})}):null,s?e.jsx(q,{title:x("common.delete"),children:e.jsx(N,{size:"small",onClick:h,color:"error",children:e.jsx(O,{icon:he,fontSize:18})})}):null,n?e.jsx(q,{title:x(o?"common.enabled":"common.disabled"),children:e.jsx(Y,{size:"small",checked:o,onClick:f,disabled:u})}):null,t?e.jsx(q,{title:x("common.moveUp"),children:e.jsx(N,{size:"small",onClick:i,disabled:d,children:e.jsx(O,{icon:oo,fontSize:20})})}):null,c?e.jsx(q,{title:x("common.moveDown"),children:e.jsx(N,{size:"small",onClick:r,disabled:d,children:e.jsx(O,{icon:eo,fontSize:20})})}):null]})}He.propTypes={enabled:g.bool.isRequired,showUp:g.bool,showDown:g.bool,showSwitch:g.bool,showDelete:g.bool,showEdit:g.bool,disableEdit:g.bool,disableSwitch:g.bool,onClickUp:g.func,onClickDown:g.func,onClickSwitch:g.func,onClickDelete:g.func,onClickEdit:g.func};function Re({ref:o=null}){const{t}=k.useContext(ee),{blocklet:c}=se(),{api:n}=re(),s=c?.meta?.did,d=te()?.transitions?.duration?.leavingScreen||300,u=oe({mode:"add",show:!1,isDefaultRule:!1,callback:Z,get dialogTitle(){return this.mode==="edit"?t("securityRule.edit"):this.mode==="view"?t("securityRule.view"):t("securityRule.add")}}),i=K(async()=>{const{accessPolicies:y}=await n.getBlockletAccessPolicies({input:{did:s}});return Q(y,C=>C.isProtected?1:0)},{manual:!0}),r=K(async()=>{const{responseHeaderPolicies:y}=await n.getBlockletResponseHeaderPolicies({input:{did:s}});return Q(y,C=>C.isProtected?1:0)},{manual:!0}),{handleSubmit:f,control:h,watch:H,setValue:x,getValues:I,reset:B,formState:{errors:A}}=pe({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),_=w(()=>{B(),u.mode="add"}),S=w(()=>{u.show=!1,setTimeout(()=>{_()},d)}),b=w((y,C=null)=>{u.show=!0,C&&(u.isDefaultRule=C.id===T.SECURITY_RULE_DEFAULT_ID,u.mode="edit",x("componentDid",C.componentDid),x("pathPattern",C.pathPattern),x("responseHeaderPolicyId",C.responseHeaderPolicyId),x("accessPolicyId",C.accessPolicyId),x("remark",C.remark||"")),y?u.callback=y:u.mode="view",i.run(),r.run()});k.useImperativeHandle(o,()=>({open:b,close:S}),[b,S]);const m=w(()=>{const[y,C]=I(["accessPolicyId","responseHeaderPolicyId"]);return!y&&!C?t("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),a=w(y=>{const C=m();if(C===!0){const ne=u.isDefaultRule?$(y,"componentDid"):y;u.callback(ne,S)}else E.error(C)}),j=H("componentDid"),z=w(y=>{const C=y?.trim();if(!C)return t("common.requiredErrorText",{name:t("securityRule.form.pathPattern")});if(j){if(C.startsWith("/"))return t("securityRule.form.pathPatternErrorText")}else if(!C.startsWith("/")&&C!=="*")return t("securityRule.form.pathPatternErrorText");return!0}),p=w(y=>y?.trim()?!0:t("common.requiredErrorText",{name:t("securityRule.form.accessPolicy")})),v=w(y=>y?.trim()?!0:t("common.requiredErrorText",{name:t("securityRule.form.responseHeaderPolicy")})),R=me(()=>{const C=(c?.children||[]).find(ne=>ne.meta.did===j);return C?.mountPoint?Ye(C.mountPoint):null},[c,j]);return e.jsx(ae,{open:u.show,title:u.dialogTitle,onClose:S,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(de,{color:"primary",autoFocus:!0,variant:"contained",onClick:f(a),children:t("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[u.isDefaultRule?null:e.jsx(F,{name:"componentDid",control:h,render:({field:y})=>e.jsx(le,{fullWidth:!0,margin:"dense",size:"small",label:t("securityRule.form.component"),placeholer:t("securityRule.form.componentPlaceholder"),options:c.children.map(C=>({title:C.meta.title,value:C.meta.did,description:C.mountPoint})),error:!!A?.componentDid?.message,helperText:A?.componentDid?.message||"Choose belong to component",...$(y,"ref"),readOnly:u.mode==="view"})}),e.jsx(F,{name:"pathPattern",control:h,rules:{validate:z},render:({field:y})=>e.jsx(D,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:t("securityRule.form.pathPatternPlaceholder"),label:t("securityRule.form.pathPattern"),error:!!A?.pathPattern?.message,helperText:A?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...y,disabled:u.isDefaultRule||u.mode==="view",slotProps:{input:{startAdornment:R?e.jsx(We,{position:"start",children:R}):null}}})}),e.jsx(F,{name:"accessPolicyId",control:h,rules:{validate:u.isDefaultRule?p:Z},render:({field:y})=>e.jsx(le,{fullWidth:!0,required:u.isDefaultRule,margin:"dense",size:"small",label:t("securityRule.form.accessPolicy"),placeholer:t("securityRule.form.accessPolicyPlaceholder"),options:(i.data||[]).map(C=>({value:C.id,title:C.name,description:C.description})),error:!!A?.accessPolicyId?.message,helperText:A?.accessPolicyId?.message||t("securityRule.form.accessPolicyHelperText"),...$(y,"ref"),disabled:u.mode==="view"})}),e.jsx(F,{name:"responseHeaderPolicyId",control:h,rules:{validate:u.isDefaultRule?v:Z},render:({field:y})=>e.jsx(le,{fullWidth:!0,required:u.isDefaultRule,margin:"dense",size:"small",label:t("securityRule.form.responseHeaderPolicy"),placeholer:t("securityRule.form.responseHeaderPolicyPlaceholder"),options:(r.data||[]).map(C=>({title:C.name,value:C.id,description:C.description})),error:!!A?.responseHeaderPolicyId?.message,helperText:A?.responseHeaderPolicyId?.message||t("securityRule.form.responseHeaderPolicyHelperText"),...$(y,"ref"),disabled:u.mode==="view"})}),e.jsx(F,{name:"remark",control:h,render:({field:y})=>e.jsx(D,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:t("securityRule.form.remarkPlaceholder"),label:t("securityRule.form.remark"),helperText:A?.message,...y,disabled:u.mode==="view"})})]})})}Re.propTypes={ref:g.any};const W=async(o,t="Failed to saved")=>{try{await o()}catch(c){E.error(c?.message||t)}};function to(){const{t:o,locale:t}=U(),{blocklet:c}=se(),{api:n}=re(),s=c?.meta?.did,l=te(),d=k.useRef(null),u=k.useRef(null),{confirmApi:i,confirmHolder:r}=fe(),f=K(async()=>{const{securityRules:p}=await n.getBlockletSecurityRules({input:{did:s,includeDisabled:!0}});return p}),h=p=>p.id===T.SECURITY_RULE_DEFAULT_ID,H=w(p=>(c?.children||[]).find(R=>R.meta.did===p)?.mountPoint),x=(f.data||[]).map(p=>{if(p.componentDid){const v=H(p.componentDid);p._disabled=v===void 0}return p}),I=x.filter(p=>!h(p)),B=(p,v)=>{W(async()=>{const R=p.target.checked;await n.updateBlockletSecurityRule({input:{did:s,data:{id:v.id,enabled:R}}}),E.success(o("common.succeeded")),f.run()})},A=(p,v,R)=>{W(async()=>{const y=R-1,C=x[y];await Promise.all([n.updateBlockletSecurityRule({input:{did:s,data:{id:v.id,priority:C.priority}}}),n.updateBlockletSecurityRule({input:{did:s,data:{id:C.id,priority:v.priority}}})]),E.success(o("common.succeeded")),f.run()})},_=(p,v,R)=>{W(async()=>{const y=R+1,C=x[y];await Promise.all([n.updateBlockletSecurityRule({input:{did:s,data:{id:v.id,priority:C.priority}}}),n.updateBlockletSecurityRule({input:{did:s,data:{id:C.id,priority:v.priority}}})]),E.success(o("common.succeeded")),f.run()})},S=()=>{d.current.open((p,v)=>{W(async()=>{await n.addBlockletSecurityRule({input:{did:s,data:p}}),E.success(o("common.succeeded")),f.run(),v()})})},b=(p,v)=>{d.current.open((R,y)=>{W(async()=>{await n.updateBlockletSecurityRule({input:{did:s,data:{...R,id:v.id}}}),E.success(o("common.succeeded")),f.run(),y()})},v)},m=(p,v)=>{i.open({title:o("securityRule.delete.title"),content:o("securityRule.delete.description"),confirmButtonText:o("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:o("common.cancel"),onConfirm(R){W(async()=>{await n.deleteBlockletSecurityRule({input:{did:s,id:v.id}}),E.success(o("common.succeeded")),f.run(),R()})}})},a={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(p,{dataIndex:v},R){if(u.current?.contains(R.target)){const y=x[v];d.current.open(void 0,y)}},setRowProps:(p,v)=>x[v]._disabled?{title:o("securityRule.useless"),style:{backgroundColor:l.palette.action.disabledBackground,cursor:"default"}}:{}},j=[e.jsx(X,{size:"small",variant:"outlined",onClick:()=>{f.run()},sx:{mr:1},children:o("common.refresh")},"refresh"),e.jsx(X,{size:"small",variant:"contained",onClick:S,children:o("common.add")})],z=[{label:o("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(p){const v=x[p];return e.jsx(P,{sx:{whiteSpace:"nowrap"},children:v.id===T.SECURITY_RULE_DEFAULT_ID?"Default":Je(H(v.componentDid),v.pathPattern)})}}},{label:o("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(p){return x[p].responseHeaderPolicy?.name}}},{label:o("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(p){return x[p].accessPolicy?.name}}},{label:o("securityRule.form.remark"),name:"remark"},{label:o("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(p){const v=x[p],R=h(v);return e.jsx(He,{disableEdit:v._disabled,disableSwitch:v._disabled,enabled:v.enabled,showSwitch:!R,showDelete:!R,showUp:p>0&&!R,showDown:p<I.length-1&&!R,onClickSwitch:y=>{B(y,v)},onClickUp:y=>{A(y,v,p)},onClickDown:y=>{_(y,v,p)},onClickEdit:y=>{b(y,v)},onClickDelete:y=>{m(y,v)}})}}}].filter(Boolean);return e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2},ref:u,children:[e.jsx(ue,{verticalKeyWidth:100,locale:t,title:e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:1},children:[o("securityRule.title")," ",e.jsx(Fe,{variant:"body2",children:o("securityRule.sortByDescription")})]}),data:x,columns:z,customButtons:j,options:a,loading:f.loading}),e.jsx(Re,{ref:d}),r]})}const Te={width:24,height:24,body:'<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm0-2h14V7H5v12Zm7-2q-2.05 0-3.663-1.113T6 13q.725-1.775 2.337-2.888T12 9q2.05 0 3.663 1.113T18 13q-.725 1.775-2.337 2.888T12 17Zm0-2.5q-.625 0-1.063-.438T10.5 13q0-.625.438-1.063T12 11.5q.625 0 1.063.438T13.5 13q0 .625-.438 1.063T12 14.5Zm0 1q1.05 0 1.775-.725T14.5 13q0-1.05-.725-1.775T12 10.5q-1.05 0-1.775.725T9.5 13q0 1.05.725 1.775T12 15.5Z"/>'};function ke({value:o,onChange:t,...c}){const n="roles",s="roles_reverse",{t:l,locale:d}=U(),u=[...we,{value:n,icon:Ne,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:s,icon:Le,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(D,{...c,label:l("blocklet.config.access.description"),select:!0,fullWidth:!0,value:o,onChange:t,slotProps:{select:{renderValue:i=>{const r=u.find(f=>f.value===i);return r?e.jsxs(P,{children:[e.jsx(P,{component:r.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),r.title[d]||r.title.en]}):null}}},children:u.map(i=>e.jsxs(Ve,{value:i.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:r})=>r.palette.text.secondary}`}},children:[e.jsxs(P,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(P,{component:i.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx(P,{children:i.title[d]||i.title.en})]}),e.jsx(P,{className:"tip",children:i.description[d]||i.description.en})]}))})}ke.propTypes={value:g.string,onChange:g.func};const Ae=o=>{const t={name:o.name,description:o.description},{roles:c=null,reverse:n}=o;return c===null?n===!1&&(t.whoCanAccess=T.WHO_CAN_ACCESS.ALL,t.roles=null):c.length===0&&n===!0?(t.whoCanAccess=T.WHO_CAN_ACCESS.INVITED,t.roles=[]):ye(c,[T.WHO_CAN_ACCESS.OWNER])&&n===!1?(t.whoCanAccess=T.WHO_CAN_ACCESS.OWNER,t.roles=[T.WHO_CAN_ACCESS.OWNER]):ye(c,[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN])&&n===!1?(t.whoCanAccess=T.WHO_CAN_ACCESS.ADMIN,t.roles=[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN]):(t.whoCanAccess=n?"roles_reverse":"roles",t.roles=c),t},so=o=>{const t={name:o.name,description:o.description},{roles:c=null,whoCanAccess:n}=o;return n==="roles"?(t.roles=c,t.reverse=!1):n==="roles_reverse"?(t.roles=c,t.reverse=!0):n===T.WHO_CAN_ACCESS.ALL?(t.roles=null,t.reverse=!1):n===T.WHO_CAN_ACCESS.INVITED?(t.roles=[],t.reverse=!0):n===T.WHO_CAN_ACCESS.OWNER?(t.roles=[T.WHO_CAN_ACCESS.OWNER],t.reverse=!1):n===T.WHO_CAN_ACCESS.ADMIN&&(t.roles=[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN],t.reverse=!1),t},ro=o=>o instanceof Object?{origin:o.origin?{override:o.origin?.override??!0,value:o.origin?.value?.join(`
2
2
  `),smart:o.origin?.smart??!0}:void 0,methods:o.methods,allowedHeaders:o.allowedHeaders?{override:o.allowedHeaders?.override??!0,value:o.allowedHeaders?.value?.join(`
3
3
  `)}:void 0,exposedHeaders:o.exposedHeaders?{override:o.exposedHeaders?.override??!0,value:o.exposedHeaders?.value?.join(`
4
4
  `)}:void 0,maxAge:o.maxAge,optionsSuccessStatus:o.optionsSuccessStatus,preflightContinue:o.preflightContinue,credentials:o.credentials}:void 0,no=o=>o instanceof Object?{origin:{override:o.origin?.override,value:o.origin?.value?.split(`
@@ -1 +1 @@
1
- import{r as o}from"./vendor-react-Dvs43sk9.js";import{W as t}from"./index-6k6hDX7K.js";function s(){return o.useContext(t)}export{s as u};
1
+ import{r as o}from"./vendor-react-Dvs43sk9.js";import{W as t}from"./index-D5Esor4q.js";function s(){return o.useContext(t)}export{s as u};
@@ -1,4 +1,4 @@
1
- import{D as h,j as t,aY as u,aT as f,at as g,ak as j}from"./vendor-mui-core-CmD-NPnl.js";import{c as S,N as y,f as E,S as N}from"./index-6k6hDX7K.js";import{C as P}from"./config-space-Da0MmMPn.js";import{H as b}from"./addon-CGYbwnAQ.js";import{P as W,L as v}from"./vendor-arcblock-C-xQV6LY.js";import{u as L,W as k}from"./wizard-components-CR8h5HCI.js";import"./vendor-react-Dvs43sk9.js";import"./vendor-ux-ESjuHpb6.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./spaces-Cq_dfNLt.js";import"./api-sewNv0AE.js";import"./question-mark-circle.svg-B4stD6SS.js";import"./get-safe-url-C5Vpma4S.js";import"./use-server-logo-BJM5bxfh.js";import"./server-logo-notext.svg-CKQB0tIp.js";import"./use-mobile-D93Bk2Ru.js";function Q(){const s=h(),a=`${S.WELLKNOWN_SERVICE_PATH_PREFIX}/setup`,{meta:e,blocklet:o,launcherSession:r,steps:i,stepIndex:l,totalSteps:p,logoUrl:n,logo:m,t:d,onNext:c,onPrevious:x}=L(a);return t.jsx(W,{steps:p,children:t.jsx(y,{children:t.jsxs(P,{children:[t.jsx(u,{styles:w}),t.jsx(C,{children:t.jsx(v,{locale:"zh",loading:!1,blockletMeta:{...e,title:E.getDisplayName({...o,meta:e})},navLogo:m,pcWidth:"80%",style:{height:"100%"},logoUrl:n,useOfSkeleton:!1,extraNav:null,headerEndAddons:t.jsx(b,{SessionContext:N,sessionManagerProps:{disableLogout:!0}}),theme:s,launchingText:d("setup.title"),children:t.jsx(k,{blocklet:o,stepIndex:l,steps:i,onNext:c,onPrevious:x,launcherSession:r})})})]})})})}const w=f`
1
+ import{D as h,j as t,aY as u,aT as f,at as g,ak as j}from"./vendor-mui-core-CmD-NPnl.js";import{c as S,N as y,f as E,S as N}from"./index-D5Esor4q.js";import{C as P}from"./config-space-B1RlBsPr.js";import{H as b}from"./addon-C-cTa3hU.js";import{P as W,L as v}from"./vendor-arcblock-DEa0A9MF.js";import{u as L,W as k}from"./wizard-components-BoWnBOyn.js";import"./vendor-react-Dvs43sk9.js";import"./vendor-ux-pYOhjQLA.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./spaces-CZJwyRzV.js";import"./api-sewNv0AE.js";import"./question-mark-circle.svg-B4stD6SS.js";import"./get-safe-url-PVZ8sNva.js";import"./use-server-logo-BJM5bxfh.js";import"./server-logo-notext.svg-CKQB0tIp.js";import"./use-mobile-D93Bk2Ru.js";function Q(){const s=h(),a=`${S.WELLKNOWN_SERVICE_PATH_PREFIX}/setup`,{meta:e,blocklet:o,launcherSession:r,steps:i,stepIndex:l,totalSteps:p,logoUrl:n,logo:m,t:d,onNext:c,onPrevious:x}=L(a);return t.jsx(W,{steps:p,children:t.jsx(y,{children:t.jsxs(P,{children:[t.jsx(u,{styles:w}),t.jsx(C,{children:t.jsx(v,{locale:"zh",loading:!1,blockletMeta:{...e,title:E.getDisplayName({...o,meta:e})},navLogo:m,pcWidth:"80%",style:{height:"100%"},logoUrl:n,useOfSkeleton:!1,extraNav:null,headerEndAddons:t.jsx(b,{SessionContext:N,sessionManagerProps:{disableLogout:!0}}),theme:s,launchingText:d("setup.title"),children:t.jsx(k,{blocklet:o,stepIndex:l,steps:i,onNext:c,onPrevious:x,launcherSession:r})})})]})})})}const w=f`
2
2
  html,
3
3
  body,
4
4
  #app,
@@ -1 +1 @@
1
- import{X as u,Y as i}from"./index-6k6hDX7K.js";import{I as l,C as s,J as f,F as m}from"./vendor-utils-DQK0pEML.js";import{a as o}from"./api-sewNv0AE.js";function P(t){const e=t.replace(/\/api\/space\/.+/,""),a=t.replace(/\/$/,"").split("/"),r=a.at(-4),n=a.at(-2);return s(e,"space",r,"apps",n,`explorer?key=/apps/${n}/.did-objects/${n}/`)}function U(t){const e=t.replace(/\/api\/space\/.+/,""),r=t.replace(/\/$/,"").split("/").at(-4);return s(e,"space",r)}function h(t){return t.replace(/\/$/,"").split("/").at(-4)}async function L(t){try{if(!i(t))return!1;const{headers:e}=await o.head(t,{timeout:5e3});return e["x-listable"]==="true"&&e["x-readable"]==="true"&&e["x-writeable"]==="true"}catch(e){return console.error(e),!1}}function _(t){return t?.find(e=>e.key===u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT)?.value||""}function y(t){return t?.replace(/\/api\/space\/.+/,"")}function E(t){const e=new URL(t);return s(e.origin,e.pathname)}async function A(t){try{if(!i(t))return!1;const e=E(t),a=s(e,"space/api/did/one-click-authorization/token"),{status:r,data:n}=await o.get(a,{timeout:5e3});return r===200&&m(n)}catch(e){return console.error(e),!1}}async function w(t,{timeout:e}={timeout:3e3}){try{if(!i(t))return"";const{headers:a}=await o.head(t,{timeout:e}),r=a["x-space-name"];return r?decodeURIComponent(r):""}catch(a){return console.error(a),""}}const k=t=>t?.configs?.find(e=>e.key===u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)?.value||null;async function x(t){const e={};return e.did=h(t),e.name=await w(t),e.url=y(t),e.endpoint=t,e}async function B(t,e={timeout:3e4,withSearchParams:!0}){if(!l(t))throw new Error(`url(${t}) must be a string`);const a=t.startsWith("http")?t:`https://${t}`,r=new URL(a),{data:n}=await o.get(s(r.origin,"/__blocklet__.js?type=json"),{timeout:e.timeout}),c=n.componentMountPoints.findLast(d=>d.did==="z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf")?.mountPoint;if(!c)throw new Error(`MountPoint(${c}) not found`);const p=s(r.origin,c);return e.withSearchParams&&r.searchParams.get("spaceDid")?f(p,{spaceDid:r.searchParams.get("spaceDid")}):p}export{x as a,w as b,_ as c,B as d,h as e,U as f,k as g,P as h,A as i,L as j};
1
+ import{X as u,Y as i}from"./index-D5Esor4q.js";import{I as l,C as s,J as f,F as m}from"./vendor-utils-DQK0pEML.js";import{a as o}from"./api-sewNv0AE.js";function P(t){const e=t.replace(/\/api\/space\/.+/,""),a=t.replace(/\/$/,"").split("/"),r=a.at(-4),n=a.at(-2);return s(e,"space",r,"apps",n,`explorer?key=/apps/${n}/.did-objects/${n}/`)}function U(t){const e=t.replace(/\/api\/space\/.+/,""),r=t.replace(/\/$/,"").split("/").at(-4);return s(e,"space",r)}function h(t){return t.replace(/\/$/,"").split("/").at(-4)}async function L(t){try{if(!i(t))return!1;const{headers:e}=await o.head(t,{timeout:5e3});return e["x-listable"]==="true"&&e["x-readable"]==="true"&&e["x-writeable"]==="true"}catch(e){return console.error(e),!1}}function _(t){return t?.find(e=>e.key===u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT)?.value||""}function y(t){return t?.replace(/\/api\/space\/.+/,"")}function E(t){const e=new URL(t);return s(e.origin,e.pathname)}async function A(t){try{if(!i(t))return!1;const e=E(t),a=s(e,"space/api/did/one-click-authorization/token"),{status:r,data:n}=await o.get(a,{timeout:5e3});return r===200&&m(n)}catch(e){return console.error(e),!1}}async function w(t,{timeout:e}={timeout:3e3}){try{if(!i(t))return"";const{headers:a}=await o.head(t,{timeout:e}),r=a["x-space-name"];return r?decodeURIComponent(r):""}catch(a){return console.error(a),""}}const k=t=>t?.configs?.find(e=>e.key===u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)?.value||null;async function x(t){const e={};return e.did=h(t),e.name=await w(t),e.url=y(t),e.endpoint=t,e}async function B(t,e={timeout:3e4,withSearchParams:!0}){if(!l(t))throw new Error(`url(${t}) must be a string`);const a=t.startsWith("http")?t:`https://${t}`,r=new URL(a),{data:n}=await o.get(s(r.origin,"/__blocklet__.js?type=json"),{timeout:e.timeout}),c=n.componentMountPoints.findLast(d=>d.did==="z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf")?.mountPoint;if(!c)throw new Error(`MountPoint(${c}) not found`);const p=s(r.origin,c);return e.withSearchParams&&r.searchParams.get("spaceDid")?f(p,{spaceDid:r.searchParams.get("spaceDid")}):p}export{x as a,w as b,_ as c,B as d,h as e,U as f,k as g,P as h,A as i,L as j};
@@ -1,4 +1,4 @@
1
- import{D as V,J as q,j as t,a6 as G,aY as X,ak as c,aZ as Q,at as z,aT as J,P as Y,a_ as Z,a$ as ee,W as y}from"./vendor-mui-core-CmD-NPnl.js";import{r as g,L as H}from"./vendor-react-Dvs43sk9.js";import{l as te,a as E}from"./vendor-hooks-DLNZ8kxG.js";import{C as R}from"./vendor-utils-DQK0pEML.js";import{T as F,H as U,C as ne,D as P,$ as oe,M as re}from"./vendor-ux-ESjuHpb6.js";import{W as se}from"./did-address-D6qV21Cc.js";import{o as ie,s as ae}from"./vendor-arcblock-C-xQV6LY.js";import{e as D,f as _,h as W,i as le,j as ce,l as L,S as de,c as T,a as pe,m as me,n as ue,o as he,P as ge,p as S,q as fe,r as A}from"./index-6k6hDX7K.js";import{H as xe}from"./addon-CGYbwnAQ.js";import{u as be}from"./use-server-logo-BJM5bxfh.js";import{g as M}from"./get-safe-url-C5Vpma4S.js";import{O as ke}from"./over-due-invoice-payment-OBj9thMb.js";import{p as je,S as ye,P as we}from"./starting-progress-Ck9Thp6d.js";import"./lottie-web-4koyQiv_.js";import"./question-mark-circle.svg-B4stD6SS.js";import"./server-logo-notext.svg-CKQB0tIp.js";import"./use-mobile-D93Bk2Ru.js";function K({appInfo:e,...r}){const[n,s]=g.useState(!1),l=q(f=>f.breakpoints.down("md"))?32:48;return n?t.jsx(oe,{did:e.publisher,size:l}):t.jsx(re,{src:e.icon,alt:e.title,width:l,height:l,...r,onError:()=>s(!0)})}K.propTypes={appInfo:y.object.isRequired};const B=(e,r)=>_.findComponentByIdV2(e,r)||e;function Fe(){const{t:e,locale:r}=F(),[n,s]=te({blocklet:null,component:null,launcherSession:null,loading:!1,starting:!1,manageSubscriptionURL:"",restart:!1}),a=localStorage.getItem("blocklet-server-url"),l=be({onClick:()=>{a&&window.open(M(a,{allowDomains:null}))}}),f=new URL(window.location.href),w=f.searchParams.get("componentId"),$=V(),j=q(o=>o.breakpoints.down("md")),x=()=>{const o=f.searchParams.get("redirect")||"/";window.location.href=M(decodeURIComponent(o))},b=()=>{const o=setInterval(()=>{D.get("/blocklet/detail?nocache=1").then(({data:i})=>{s(N=>({...N,blocklet:i}));const d=B(i,w);if(d.status==="running"){x();return}d.status!=="starting"&&!n.restart&&(s({blocklet:i,starting:!1}),i!==d&&s({component:d}),clearInterval(o))}).catch(i=>{s({loading:!1,restart:!1}),U.error(i.message)})},3e3)},C=()=>{s({restart:!0,starting:!0,loading:!0}),setTimeout(()=>{b()},10)};g.useEffect(()=>{s({loading:!0}),D.get("/blocklet/detail?nocache=1").then(({data:o})=>{const i=B(o,w);if(s({blocklet:o,loading:!1}),i.status==="running"){x();return}s({blocklet:o}),o!==i&&s({component:i}),i.status==="starting"&&(s({starting:!0}),b())}).catch(o=>{s({loading:!1}),U.error(o.message)})},[]);const u=g.useCallback(()=>{s({loading:!0,starting:!0});const o=n.blocklet;if(!o)return;const i={did:o?.meta.did};o.children.length>0&&(i.componentDids=o.children.map(d=>d.meta.did)),W.startBlocklet({input:i}).then(({blocklet:d})=>{s(N=>({...N,blocklet:d})),b()}).catch(d=>{U.error(d.message),s({loading:!1,starting:!1})})},[n.component,n.blocklet]);g.useEffect(()=>{n.blocklet?.controller&&(le({launcherUrl:n.blocklet.controller.launcherUrl,launcherSessionId:n.blocklet.controller.launcherSessionId,locale:r}).then(o=>{s({manageSubscriptionURL:o})}).catch(o=>{console.error("get manage subscription url error",o)}),W.getLauncherSession({input:{launcherSessionId:n.blocklet.controller.launcherSessionId,launcherUrl:n.blocklet.controller.launcherUrl}}).then(o=>{s({launcherSession:o.launcherSession})}).catch(o=>{console.error("get launcher session error",o)}))},[n.blocklet?.controller]);const p=E(()=>n.blocklet?.children?.length,[n.blocklet]),m=E(()=>n.blocklet?.children?.filter(o=>o.status==="running")?.length||0,[n.blocklet]),k=E(()=>p?m?Math.round(Math.max(m/p,.15)*100):5:0,[m,p]);if(!n.blocklet)return t.jsx(ie,{children:t.jsx(G,{})});const h={icon:`${T.WELLKNOWN_SERVICE_PATH_PREFIX}/blocklet/logo`,title:_.getDisplayName(n.blocklet),publisher:n.blocklet.appDid},I=ne(je,n.starting?{width:`${k}%`,"&::after":{width:`${k}%`},"&::before":{width:`${k}%`,animation:"shimmer 1s infinite cubic-bezier(0.4, 0.0, 0.2, 1)","@keyframes shimmer":{"0%":{width:0},"100%":{width:`${k}%`}}}}:{}),v=ce(n.blocklet)||L(n.launcherSession);return t.jsxs(Se,{children:[t.jsx(X,{styles:ve}),t.jsxs("header",{className:"root-header",children:[j?null:t.jsx("div",{className:"left",children:l}),t.jsx(ae,{sx:{background:j?$.palette.background.default:"transparent",display:"flex",alignItems:"center",justifyContent:"flex-end"},children:t.jsx(xe,{SessionContext:de})})]}),t.jsxs(Pe,{elevation:0,children:[t.jsxs(_e,{children:[t.jsx(K,{appInfo:h}),t.jsxs("div",{className:"app-info_content",children:[t.jsx(c,{className:"app-info_name",children:h.title}),t.jsx(se,{size:14,className:"app-info_did",did:h.publisher})]})]}),(n.restart||!v)&&t.jsxs(t.Fragment,{children:[t.jsxs(c,{className:"title-box",children:[t.jsx(c,{className:"icon",children:t.jsx(Q,{})}),t.jsx(c,{className:"title",children:e("blocklet.startApplication")})]}),t.jsx(c,{className:"sub-title",children:n.starting?t.jsx(ye,{blocklets:n.blocklet?.children??[]}):e("blocklet.startDescription",{name:n.component?_.getDisplayName(n.component,!0):_.getDisplayName(n.blocklet)})}),t.jsx(c,{sx:{mt:8,display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:t.jsx(we,{blocklets:n.blocklet?.children??[],status:n.starting?"starting":"",children:t.jsx(P,{sx:I,disabled:n.loading||n.starting,variant:"contained",color:"primary",size:"large",loading:n.starting,onClick:()=>u(),children:t.jsx("span",{style:{position:"relative",zIndex:2},children:n.starting?`(${m}/${p}) ${e("blocklet.starting")}`:e("blocklet.start")})})})})]}),v&&!n.restart&&t.jsx(O,{blocklet:n.blocklet,launcherSession:n.launcherSession,manageSubscriptionURL:n.manageSubscriptionURL,handleRestart:C}),t.jsx(c,{sx:{mt:5},children:t.jsx(H,{className:"footer-link",to:`${T.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/overview`,children:e("blocklet.dashboard")})})]})]})}function O({blocklet:e,launcherSession:r,manageSubscriptionURL:n,handleRestart:s}){const{t:a,locale:l}=F(),{connectApi:f,session:w}=pe(),{refreshSubscription:$}=me(),[j,x]=g.useState(!1),[b,C]=g.useState("");if(g.useEffect(()=>{if(e?.controller?.launcherUrl&&L(r)){const k=R(e.controller.launcherUrl,"__blocklet__.js?type=json");fetch(k).then(h=>h.json()).then(h=>{const I=h.componentMountPoints?.find(o=>o.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint,v=R(e.controller.launcherUrl,I);C(v)})}},[e?.controller?.launcherUrl,r]),!e||!r)return"";const u=L(r),p=!u&&ue(e,r),m=!u&&he(e,r);return!p&&!m&&!u?"":t.jsxs(t.Fragment,{children:[j&&b&&r&&t.jsx(ge,{session:w,connect:f,baseUrl:b,authToken:r.subscription.authToken,children:t.jsx(ke,{dialogProps:{open:j,onClose:()=>x(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{D.post("/blocklet/start?fromSetup=1"),$(),s(),x(!1)}})}),t.jsxs(c,{className:"title-box",children:[t.jsx(Z,{className:"icon-error"}),t.jsxs(c,{className:"title error",children:[p&&a("blocklet.suspended"),m&&a("blocklet.terminated"),u&&a("blocklet.suspended")]})]}),t.jsxs(c,{className:"sub-title",children:[p&&a("blocklet.suspendedCausedByExpired",{deadline:S(r?.reservedUntil,l),canceledAt:S((r?.subscription?.canceled_at||0)*1e3,l)}),m&&a("blocklet.suspendedCausedByTerminated",{canceledAt:S(r?.terminatedAt,l),deadline:fe(r?.terminatedAt,l)}),u&&a("blocklet.suspendedCausedByPastDue",{deadline:S(r?.reservedUntil,l)})]}),t.jsxs(c,{sx:{mt:8},children:[u&&!A(r)&&t.jsx(P,{style:{minWidth:200},variant:"contained",color:"primary",size:"large",onClick:()=>x(!0),children:a("blocklet.payNow")}),(p||A(r))&&t.jsx(P,{component:ee,style:{minWidth:200},variant:"contained",color:"primary",size:"large",target:"_blank",href:n||"#",children:a("blocklet.manageSubscription")}),m&&t.jsx(P,{component:H,to:R(T.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/did-spaces"),style:{minWidth:200},variant:"contained",color:"primary",size:"large",children:a("common.backup")})]})]})}O.propTypes={blocklet:y.object.isRequired,launcherSession:y.object.isRequired,manageSubscriptionURL:y.string.isRequired,handleRestart:y.func.isRequired};const ve=J`
1
+ import{D as V,J as q,j as t,a6 as G,aY as X,ak as c,aZ as Q,at as z,aT as J,P as Y,a_ as Z,a$ as ee,W as y}from"./vendor-mui-core-CmD-NPnl.js";import{r as g,L as H}from"./vendor-react-Dvs43sk9.js";import{l as te,a as E}from"./vendor-hooks-DLNZ8kxG.js";import{C as R}from"./vendor-utils-DQK0pEML.js";import{T as F,H as U,C as ne,D as P,$ as oe,M as re}from"./vendor-ux-pYOhjQLA.js";import{W as se}from"./did-address-CNnw4_bl.js";import{o as ie,s as ae}from"./vendor-arcblock-DEa0A9MF.js";import{e as D,f as _,h as W,i as le,j as ce,l as L,S as de,c as T,a as pe,m as me,n as ue,o as he,P as ge,p as S,q as fe,r as A}from"./index-D5Esor4q.js";import{H as xe}from"./addon-C-cTa3hU.js";import{u as be}from"./use-server-logo-BJM5bxfh.js";import{g as M}from"./get-safe-url-PVZ8sNva.js";import{O as ke}from"./over-due-invoice-payment-CgKEpOv9.js";import{p as je,S as ye,P as we}from"./starting-progress-C6OFR0oi.js";import"./lottie-web-4koyQiv_.js";import"./question-mark-circle.svg-B4stD6SS.js";import"./server-logo-notext.svg-CKQB0tIp.js";import"./use-mobile-D93Bk2Ru.js";function K({appInfo:e,...r}){const[n,s]=g.useState(!1),l=q(f=>f.breakpoints.down("md"))?32:48;return n?t.jsx(oe,{did:e.publisher,size:l}):t.jsx(re,{src:e.icon,alt:e.title,width:l,height:l,...r,onError:()=>s(!0)})}K.propTypes={appInfo:y.object.isRequired};const B=(e,r)=>_.findComponentByIdV2(e,r)||e;function Fe(){const{t:e,locale:r}=F(),[n,s]=te({blocklet:null,component:null,launcherSession:null,loading:!1,starting:!1,manageSubscriptionURL:"",restart:!1}),a=localStorage.getItem("blocklet-server-url"),l=be({onClick:()=>{a&&window.open(M(a,{allowDomains:null}))}}),f=new URL(window.location.href),w=f.searchParams.get("componentId"),$=V(),j=q(o=>o.breakpoints.down("md")),x=()=>{const o=f.searchParams.get("redirect")||"/";window.location.href=M(decodeURIComponent(o))},b=()=>{const o=setInterval(()=>{D.get("/blocklet/detail?nocache=1").then(({data:i})=>{s(N=>({...N,blocklet:i}));const d=B(i,w);if(d.status==="running"){x();return}d.status!=="starting"&&!n.restart&&(s({blocklet:i,starting:!1}),i!==d&&s({component:d}),clearInterval(o))}).catch(i=>{s({loading:!1,restart:!1}),U.error(i.message)})},3e3)},C=()=>{s({restart:!0,starting:!0,loading:!0}),setTimeout(()=>{b()},10)};g.useEffect(()=>{s({loading:!0}),D.get("/blocklet/detail?nocache=1").then(({data:o})=>{const i=B(o,w);if(s({blocklet:o,loading:!1}),i.status==="running"){x();return}s({blocklet:o}),o!==i&&s({component:i}),i.status==="starting"&&(s({starting:!0}),b())}).catch(o=>{s({loading:!1}),U.error(o.message)})},[]);const u=g.useCallback(()=>{s({loading:!0,starting:!0});const o=n.blocklet;if(!o)return;const i={did:o?.meta.did};o.children.length>0&&(i.componentDids=o.children.map(d=>d.meta.did)),W.startBlocklet({input:i}).then(({blocklet:d})=>{s(N=>({...N,blocklet:d})),b()}).catch(d=>{U.error(d.message),s({loading:!1,starting:!1})})},[n.component,n.blocklet]);g.useEffect(()=>{n.blocklet?.controller&&(le({launcherUrl:n.blocklet.controller.launcherUrl,launcherSessionId:n.blocklet.controller.launcherSessionId,locale:r}).then(o=>{s({manageSubscriptionURL:o})}).catch(o=>{console.error("get manage subscription url error",o)}),W.getLauncherSession({input:{launcherSessionId:n.blocklet.controller.launcherSessionId,launcherUrl:n.blocklet.controller.launcherUrl}}).then(o=>{s({launcherSession:o.launcherSession})}).catch(o=>{console.error("get launcher session error",o)}))},[n.blocklet?.controller]);const p=E(()=>n.blocklet?.children?.length,[n.blocklet]),m=E(()=>n.blocklet?.children?.filter(o=>o.status==="running")?.length||0,[n.blocklet]),k=E(()=>p?m?Math.round(Math.max(m/p,.15)*100):5:0,[m,p]);if(!n.blocklet)return t.jsx(ie,{children:t.jsx(G,{})});const h={icon:`${T.WELLKNOWN_SERVICE_PATH_PREFIX}/blocklet/logo`,title:_.getDisplayName(n.blocklet),publisher:n.blocklet.appDid},I=ne(je,n.starting?{width:`${k}%`,"&::after":{width:`${k}%`},"&::before":{width:`${k}%`,animation:"shimmer 1s infinite cubic-bezier(0.4, 0.0, 0.2, 1)","@keyframes shimmer":{"0%":{width:0},"100%":{width:`${k}%`}}}}:{}),v=ce(n.blocklet)||L(n.launcherSession);return t.jsxs(Se,{children:[t.jsx(X,{styles:ve}),t.jsxs("header",{className:"root-header",children:[j?null:t.jsx("div",{className:"left",children:l}),t.jsx(ae,{sx:{background:j?$.palette.background.default:"transparent",display:"flex",alignItems:"center",justifyContent:"flex-end"},children:t.jsx(xe,{SessionContext:de})})]}),t.jsxs(Pe,{elevation:0,children:[t.jsxs(_e,{children:[t.jsx(K,{appInfo:h}),t.jsxs("div",{className:"app-info_content",children:[t.jsx(c,{className:"app-info_name",children:h.title}),t.jsx(se,{size:14,className:"app-info_did",did:h.publisher})]})]}),(n.restart||!v)&&t.jsxs(t.Fragment,{children:[t.jsxs(c,{className:"title-box",children:[t.jsx(c,{className:"icon",children:t.jsx(Q,{})}),t.jsx(c,{className:"title",children:e("blocklet.startApplication")})]}),t.jsx(c,{className:"sub-title",children:n.starting?t.jsx(ye,{blocklets:n.blocklet?.children??[]}):e("blocklet.startDescription",{name:n.component?_.getDisplayName(n.component,!0):_.getDisplayName(n.blocklet)})}),t.jsx(c,{sx:{mt:8,display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:t.jsx(we,{blocklets:n.blocklet?.children??[],status:n.starting?"starting":"",children:t.jsx(P,{sx:I,disabled:n.loading||n.starting,variant:"contained",color:"primary",size:"large",loading:n.starting,onClick:()=>u(),children:t.jsx("span",{style:{position:"relative",zIndex:2},children:n.starting?`(${m}/${p}) ${e("blocklet.starting")}`:e("blocklet.start")})})})})]}),v&&!n.restart&&t.jsx(O,{blocklet:n.blocklet,launcherSession:n.launcherSession,manageSubscriptionURL:n.manageSubscriptionURL,handleRestart:C}),t.jsx(c,{sx:{mt:5},children:t.jsx(H,{className:"footer-link",to:`${T.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/overview`,children:e("blocklet.dashboard")})})]})]})}function O({blocklet:e,launcherSession:r,manageSubscriptionURL:n,handleRestart:s}){const{t:a,locale:l}=F(),{connectApi:f,session:w}=pe(),{refreshSubscription:$}=me(),[j,x]=g.useState(!1),[b,C]=g.useState("");if(g.useEffect(()=>{if(e?.controller?.launcherUrl&&L(r)){const k=R(e.controller.launcherUrl,"__blocklet__.js?type=json");fetch(k).then(h=>h.json()).then(h=>{const I=h.componentMountPoints?.find(o=>o.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint,v=R(e.controller.launcherUrl,I);C(v)})}},[e?.controller?.launcherUrl,r]),!e||!r)return"";const u=L(r),p=!u&&ue(e,r),m=!u&&he(e,r);return!p&&!m&&!u?"":t.jsxs(t.Fragment,{children:[j&&b&&r&&t.jsx(ge,{session:w,connect:f,baseUrl:b,authToken:r.subscription.authToken,children:t.jsx(ke,{dialogProps:{open:j,onClose:()=>x(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{D.post("/blocklet/start?fromSetup=1"),$(),s(),x(!1)}})}),t.jsxs(c,{className:"title-box",children:[t.jsx(Z,{className:"icon-error"}),t.jsxs(c,{className:"title error",children:[p&&a("blocklet.suspended"),m&&a("blocklet.terminated"),u&&a("blocklet.suspended")]})]}),t.jsxs(c,{className:"sub-title",children:[p&&a("blocklet.suspendedCausedByExpired",{deadline:S(r?.reservedUntil,l),canceledAt:S((r?.subscription?.canceled_at||0)*1e3,l)}),m&&a("blocklet.suspendedCausedByTerminated",{canceledAt:S(r?.terminatedAt,l),deadline:fe(r?.terminatedAt,l)}),u&&a("blocklet.suspendedCausedByPastDue",{deadline:S(r?.reservedUntil,l)})]}),t.jsxs(c,{sx:{mt:8},children:[u&&!A(r)&&t.jsx(P,{style:{minWidth:200},variant:"contained",color:"primary",size:"large",onClick:()=>x(!0),children:a("blocklet.payNow")}),(p||A(r))&&t.jsx(P,{component:ee,style:{minWidth:200},variant:"contained",color:"primary",size:"large",target:"_blank",href:n||"#",children:a("blocklet.manageSubscription")}),m&&t.jsx(P,{component:H,to:R(T.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/did-spaces"),style:{minWidth:200},variant:"contained",color:"primary",size:"large",children:a("common.backup")})]})]})}O.propTypes={blocklet:y.object.isRequired,launcherSession:y.object.isRequired,manageSubscriptionURL:y.string.isRequired,handleRestart:y.func.isRequired};const ve=J`
2
2
  html,
3
3
  body,
4
4
  #app,