@abtnode/webapp 1.16.29-beta-112566d5 → 1.16.29-beta-1fedbcdd

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 (178) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{Add-LTC9ZPHh.js → Add-BHECDESg.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-B9TabCUQ.js → ArrowDropDown-BDtEjKYX.js} +1 -1
  5. package/dist/assets/{Autocomplete-DA6il_1i.js → Autocomplete-DFC_FbfN.js} +1 -1
  6. package/dist/assets/{Breadcrumbs-Ch6zvYxu.js → Breadcrumbs--tlhx_kY.js} +1 -1
  7. package/dist/assets/{ButtonGroup-reI4zw37.js → ButtonGroup-BsGeyHPH.js} +1 -1
  8. package/dist/assets/{CheckCircle-ColTEZil.js → CheckCircle-1AjtuJml.js} +1 -1
  9. package/dist/assets/{ChevronLeft-n-Lu674N.js → ChevronLeft-DtF4yZw5.js} +1 -1
  10. package/dist/assets/{ChevronRight-BQAiuHlI.js → ChevronRight-Cg_Yljmq.js} +1 -1
  11. package/dist/assets/{Close-BHCZ0Bw1.js → Close-Dh1S6C94.js} +1 -1
  12. package/dist/assets/{Delete-CUte0jEQ.js → Delete-DrNN1_NC.js} +1 -1
  13. package/dist/assets/DeleteOutline-BbEJp5Yv.js +1 -0
  14. package/dist/assets/DeleteOutline-DcoGpr4d.js +1 -0
  15. package/dist/assets/{Done-Z8bUrs-4.js → Done-BQoc16v1.js} +1 -1
  16. package/dist/assets/{Edit-CAjWk028.js → Edit-CJIEc-k0.js} +1 -1
  17. package/dist/assets/{EditIcon-5cOXjWt1.js → EditIcon-BCZEwD1D.js} +1 -1
  18. package/dist/assets/{ExpandMore-D_XvdPjT.js → ExpandMore-DBZtVOu2.js} +1 -1
  19. package/dist/assets/{FilterList-BY5T-hLB.js → FilterList-DFTqCvYV.js} +1 -1
  20. package/dist/assets/{Google-8ss7z7oB.js → Google-2ljVxqxA.js} +1 -1
  21. package/dist/assets/{Https-CRlx_3vN.js → Https-HIHB_mu-.js} +1 -1
  22. package/dist/assets/{InputAdornment-C1r6p7SP.js → InputAdornment-7NSF5tvp.js} +1 -1
  23. package/dist/assets/{InputLabel-CExB3j6D.js → InputLabel-BVacxmju.js} +1 -1
  24. package/dist/assets/{LastPage-BlukH42P.js → LastPage-TCg78JGB.js} +1 -1
  25. package/dist/assets/{Launch-yLPtDPJO.js → Launch-B7XdcudY.js} +1 -1
  26. package/dist/assets/{Link-CYdb8X6z.js → Link-DEY_OBXK.js} +1 -1
  27. package/dist/assets/{LoadingButton-Cgv6BHxA.js → LoadingButton-DqL1fjxO.js} +1 -1
  28. package/dist/assets/{LockIcon-BrZi13Aj.js → LockIcon-C9kXDs34.js} +1 -1
  29. package/dist/assets/{Loop-BZATCgNU.js → Loop-CU1cNNql.js} +1 -1
  30. package/dist/assets/{MoreVert-NYc6koTI.js → MoreVert-Dt18zfj9.js} +1 -1
  31. package/dist/assets/{Pagination-Bpr_MZG3.js → Pagination-BdwJr2l9.js} +1 -1
  32. package/dist/assets/{Public-DJVLXFlr.js → Public-xCpRfmFo.js} +1 -1
  33. package/dist/assets/{SchemaReference.es-CjPEyQC-.js → SchemaReference.es-uz8Zc0eu.js} +1 -1
  34. package/dist/assets/{Search-Dz7VM7PV.js → Search-CDAInWfT.js} +1 -1
  35. package/dist/assets/{Select-Bmr7GD2T.js → Select-DM4jz5L4.js} +1 -1
  36. package/dist/assets/{Skeleton-OnJKCtYu.js → Skeleton-gv5XrTGj.js} +1 -1
  37. package/dist/assets/{Slider-CGhiUOe5.js → Slider--a155kQq.js} +1 -1
  38. package/dist/assets/{Stepper-CpM3LrYF.js → Stepper-D4YMSiMG.js} +1 -1
  39. package/dist/assets/{TextField-BtpuNQ33.js → TextField-Cb27WYFh.js} +1 -1
  40. package/dist/assets/{ToggleButtonGroup-BoN6aVCj.js → ToggleButtonGroup-zw2F4d4K.js} +1 -1
  41. package/dist/assets/{ViewList-Cw1uswUG.js → ViewList-BN391huQ.js} +1 -1
  42. package/dist/assets/{actions-634dtGmR.js → actions-CqEyEGdi.js} +1 -1
  43. package/dist/assets/{actions-DGOwZ57C.js → actions-Dt2hzsMg.js} +1 -1
  44. package/dist/assets/{agreement-C6HTWVte.js → agreement-8wzPI5A2.js} +8 -8
  45. package/dist/assets/api-BNsi_m3T.js +1 -0
  46. package/dist/assets/{app-avatar-B_rQHqOY.js → app-avatar-Ciqu7DzN.js} +1 -1
  47. package/dist/assets/{audit-logs-BzdTb6u7.js → audit-logs-DM5qrzhq.js} +1 -1
  48. package/dist/assets/blocklet-B866XgcM.js +1 -0
  49. package/dist/assets/{brace-fold.es-D_r4-J2g.js → brace-fold.es-CDyoGvqf.js} +1 -1
  50. package/dist/assets/bundle-avatar-DQouFsLp.js +1 -0
  51. package/dist/assets/{chart-D7fTlbH5.js → chart-CxTMvY28.js} +1 -1
  52. package/dist/assets/{click-to-copy-BwIQhcuz.js → click-to-copy-BWS50T1W.js} +1 -1
  53. package/dist/assets/{closebrackets.es-BpVvbcYW.js → closebrackets.es-C8aDSBEc.js} +1 -1
  54. package/dist/assets/{codemirror.es-BvooWNLt.js → codemirror.es-DIkx1wNL.js} +1 -1
  55. package/dist/assets/{comment.es-BiPY7IRp.js → comment.es-Bj4rfy15.js} +1 -1
  56. package/dist/assets/{config-navigation-eG4f_Oyq.js → config-navigation-DHVobtoo.js} +5 -5
  57. package/dist/assets/{delete-confirm-I7gjtI2L.js → delete-confirm-COcoVEWd.js} +1 -1
  58. package/dist/assets/{detail-BF4hjmdI.js → detail-zEMR4hLv.js} +3 -3
  59. package/dist/assets/{dialog.es-B2-FUZME.js → dialog.es-5ELfbGGf.js} +1 -1
  60. package/dist/assets/{download-rpw9Qgoj.js → download-CufT6M7y.js} +1 -1
  61. package/dist/assets/{foldgutter.es-8iFRTP0a.js → foldgutter.es-BluK5_B7.js} +1 -1
  62. package/dist/assets/getValidReactChildren-C6TVYF1_.js +1 -0
  63. package/dist/assets/{hint.es-CHvxg9mK.js → hint.es-_r7Ti8Sm.js} +1 -1
  64. package/dist/assets/{hint.es2-hI3iweAO.js → hint.es2-0WBsR7fo.js} +1 -1
  65. package/dist/assets/{iframe-BqS-rkNh.js → iframe-D7XRwAcu.js} +1 -1
  66. package/dist/assets/{index-G-HOuVIA.js → index-4cUBvM9c.js} +1 -1
  67. package/dist/assets/{index-BJ5g3x0B.js → index-8Whrl_cz.js} +1 -1
  68. package/dist/assets/{index-Ca4ojQR0.js → index-B8SfR5SO.js} +5 -5
  69. package/dist/assets/index-BL91wUxY.js +21 -0
  70. package/dist/assets/{index-CblMKkQZ.js → index-BMpCIzIn.js} +1 -1
  71. package/dist/assets/{index-BahC2Tvl.js → index-BQHGajKV.js} +1 -1
  72. package/dist/assets/{index-CUmTKs9Z.js → index-B_rtSE94.js} +10 -10
  73. package/dist/assets/{index-Dww51D0I.js → index-BdwqHkId.js} +1 -1
  74. package/dist/assets/{index-C1sxwK1q.js → index-BlbV7Lbg.js} +169 -169
  75. package/dist/assets/{index-CroucXQb.js → index-BmZ7fxmH.js} +1 -1
  76. package/dist/assets/{index-BNcA--Hd.js → index-BmgCwWx8.js} +66 -35
  77. package/dist/assets/{index-iGKrAz05.js → index-BwHAod4o.js} +3 -3
  78. package/dist/assets/{index-Dp_bcKBe.js → index-Bx-0NTkd.js} +1 -1
  79. package/dist/assets/{index-CD_6QFg_.js → index-C8tv-5HO.js} +1 -1
  80. package/dist/assets/{index-CpP8o0B-.js → index-CB-tsmEC.js} +1 -1
  81. package/dist/assets/index-CXHazti0.js +54 -0
  82. package/dist/assets/{index-C_7vG059.js → index-Ce_LNkxm.js} +1 -1
  83. package/dist/assets/{index-B46J_78A.js → index-Ch7pvL8F.js} +1 -1
  84. package/dist/assets/{index-BMAflILV.js → index-CkgIO-Ei.js} +1 -1
  85. package/dist/assets/{index-DkiVDcrH.js → index-CskaRAHF.js} +1 -1
  86. package/dist/assets/{index-C3DKd4Ro.js → index-CuAczo7P.js} +1 -1
  87. package/dist/assets/{index-BOmHLMq9.js → index-CwegGsPe.js} +1 -1
  88. package/dist/assets/{index-i7GCH6dr.js → index-CxOlUKp-.js} +1 -1
  89. package/dist/assets/index-D3a_ZvXr.js +344 -0
  90. package/dist/assets/index-D4-XA9ZN.js +11 -0
  91. package/dist/assets/{index-BIBIrwyW.js → index-D40jtuqJ.js} +1 -1
  92. package/dist/assets/{index-D-L4Ck2v.js → index-D4GRkcdU.js} +1 -1
  93. package/dist/assets/{index-DHoU0zZM.js → index-D52n0VvB.js} +7 -7
  94. package/dist/assets/{index-CKd5FqHo.js → index-DAHLtXpZ.js} +1 -1
  95. package/dist/assets/{index-B03uYmVa.js → index-DCPwvqqA.js} +1 -1
  96. package/dist/assets/{index-D5dR4ANx.js → index-D_4uGOGz.js} +1 -1
  97. package/dist/assets/{index-DKQUFPxk.js → index-Db3MJtg9.js} +1 -1
  98. package/dist/assets/{index-KlCiTQS2.js → index-Dczcia8A.js} +3 -3
  99. package/dist/assets/{index-C8ojF8vN.js → index-DhMPr-Sf.js} +1 -1
  100. package/dist/assets/{index-Binus2lr.js → index-Dl7kYtXZ.js} +1 -1
  101. package/dist/assets/index-DmSo_rH-.js +268 -0
  102. package/dist/assets/index-DnntsDmR.js +1 -0
  103. package/dist/assets/{index-D5Rsk7dq.js → index-LhVZUpfu.js} +1 -1
  104. package/dist/assets/{index-BqAzzrC8.js → index-PLNnQedK.js} +1 -1
  105. package/dist/assets/{index-BkAFfbQ9.js → index-WqNucEB5.js} +1 -1
  106. package/dist/assets/{index-BAQzBJFH.js → index-_5qLstzu.js} +3 -3
  107. package/dist/assets/{index-CiOtSWYB.js → index-_k8oY6yd.js} +1 -1
  108. package/dist/assets/{index--nbglgQ3.js → index-opQnaV74.js} +1 -1
  109. package/dist/assets/{index-Dn-_3zh6.js → index-sv8YNhSG.js} +1 -1
  110. package/dist/assets/{index-CzSKzhki.js → index-yTu8ymIr.js} +2 -2
  111. package/dist/assets/{index.es-DYaTMj-N.js → index.es-BYddSuDT.js} +1 -1
  112. package/dist/assets/{index.esm-Bm9YBLeo.js → index.esm-BD4d3uVr.js} +1 -1
  113. package/dist/assets/{info-addon.es-Do7YC0D2.js → info-addon.es-BJJ5pk51.js} +1 -1
  114. package/dist/assets/{info.es-CFNCQt9o.js → info.es-BprPoOcs.js} +1 -1
  115. package/dist/assets/{install-from-url-BjHwxVqE.js → install-from-url-ZYnVPJZA.js} +1 -1
  116. package/dist/assets/{invitation-CeRy7vzg.js → invitation-C4QKldyI.js} +1 -1
  117. package/dist/assets/{is-path-prefix-equal-CQJCYqAH.js → is-path-prefix-equal-BVP7ErMV.js} +1 -1
  118. package/dist/assets/{isEqual-BsT1dZPE.js → isEqual-D_04lJVB.js} +1 -1
  119. package/dist/assets/{item-ERkcgOMO.js → item-ChafvRb9.js} +1 -1
  120. package/dist/assets/{javascript.es-CpC9TJXL.js → javascript.es-tZuBoyo_.js} +1 -1
  121. package/dist/assets/{jump-to-line.es-CylECZ7R.js → jump-to-line.es-DxxXKbig.js} +1 -1
  122. package/dist/assets/{jump.es-DLrluqHg.js → jump.es-UWy_0T4j.js} +1 -1
  123. package/dist/assets/{line-C_2Hrpy1.js → line-fPz-YMhM.js} +3 -3
  124. package/dist/assets/{lint.es-BKML4shq.js → lint.es-Dh2OBAEf.js} +1 -1
  125. package/dist/assets/{lint.es2-BF1HKCYF.js → lint.es2-_OaBpmrB.js} +1 -1
  126. package/dist/assets/{lint.es3-C2QSNF0z.js → lint.es3-CywO0hV7.js} +1 -1
  127. package/dist/assets/{list-header-QjKUcFTw.js → list-header-Dt_lAmlF.js} +1 -1
  128. package/dist/assets/{log-CJHqgb2_.js → log-KWjsxMN4.js} +1 -1
  129. package/dist/assets/{lottie-D3czc7v1.js → lottie-CdVErR-8.js} +1 -1
  130. package/dist/assets/{matchbrackets.es-e9aBYOv_.js → matchbrackets.es-XbamjB0p.js} +1 -1
  131. package/dist/assets/{memory-CsXj8UaO.js → memory-iTIi7m4P.js} +1 -1
  132. package/dist/assets/{mode.es-5cZhDtkZ.js → mode.es-CxfnkJk0.js} +1 -1
  133. package/dist/assets/{mode.es2-CodDnKLI.js → mode.es2-Dy3nODPA.js} +1 -1
  134. package/dist/assets/{mode.es3-BuILqhlX.js → mode.es3-p9hzDihk.js} +1 -1
  135. package/dist/assets/{onlineParser.es-C6-JEN2E.js → onlineParser.es-CpFSa7g2.js} +1 -1
  136. package/dist/assets/{overview-DAw_INYh.js → overview-Cn3o0JSR.js} +2 -2
  137. package/dist/assets/react-DOpT91Sx.js +379 -0
  138. package/dist/assets/{redux-JVkClYgC.js → redux-CrGkFo1C.js} +1 -1
  139. package/dist/assets/{runtime-W4J04CkM.js → runtime-DH27bqmv.js} +1 -1
  140. package/dist/assets/{search.es-bB_x3JL4.js → search.es-DU6gLcL9.js} +1 -1
  141. package/dist/assets/{searchcursor.es-DgL4C9GF.js → searchcursor.es-DYLQM5hy.js} +1 -1
  142. package/dist/assets/service-BE-W-CQl.js +1 -0
  143. package/dist/assets/{shorten-label-9iEtol8i.js → shorten-label-C8wzxApJ.js} +1 -1
  144. package/dist/assets/{show-hint.es-CTIxfu4n.js → show-hint.es-aYSOCw1L.js} +1 -1
  145. package/dist/assets/{slicedToArray-C-KIkXYs.js → slicedToArray-CTprXHPZ.js} +2 -2
  146. package/dist/assets/{spaces-BDlrJxSc.js → spaces-a8m9RMdh.js} +1 -1
  147. package/dist/assets/{sublime.es-BIpvOaG_.js → sublime.es-DWBRVmfV.js} +1 -1
  148. package/dist/assets/{switch-control-BiRMcVKp.js → switch-control-DPEcexre.js} +1 -1
  149. package/dist/assets/{table-icons-Bx8jlz8p.js → table-icons-C4o-NnhS.js} +2 -2
  150. package/dist/assets/{tag-BsLtzNgc.js → tag-Bdou5m1X.js} +1 -1
  151. package/dist/assets/{team-Ct35NqwR.js → team-DHy_RyhB.js} +1 -1
  152. package/dist/assets/{toUpper-DV-JI2EJ.js → toUpper-CAcCx7d-.js} +1 -1
  153. package/dist/assets/{traffic-BEKDCWfv.js → traffic-DB2NxLKJ.js} +5 -5
  154. package/dist/assets/ua-parser-BSFgl4aM.js +1 -0
  155. package/dist/assets/{url-evaluation-Ctc4DSd9.js → url-evaluation-C3ISZkf1.js} +1 -1
  156. package/dist/assets/{url-join-4YCGlq9R.js → url-join-DiQ25GxI.js} +1 -1
  157. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-B1om2dOQ.js → use-blocklet-info-for-connect-did-spaces-D54Dv1sp.js} +1 -1
  158. package/dist/assets/{useLocalStorage-02uWRCTE.js → useLocalStorage-DjVTK9Hv.js} +1 -1
  159. package/dist/assets/{util-Bl1tgqEu.js → util-Cymy87Bf.js} +1 -1
  160. package/dist/assets/{wait-container-CUarPEd7.js → wait-container-D3CNDB0j.js} +1 -1
  161. package/dist/assets/{withStyles-mwdAF397.js → withStyles-CeJ3MZXD.js} +1 -1
  162. package/dist/assets/{wrap-locale-DDhOh8hH.js → wrap-locale-OY8SqaYo.js} +1 -1
  163. package/dist/index.html +1 -1
  164. package/dist/service-worker.js +1 -1
  165. package/package.json +1 -1
  166. package/dist/assets/DeleteOutline-Aff6fJia.js +0 -1
  167. package/dist/assets/api-Bo8RrpVh.js +0 -1
  168. package/dist/assets/blocklet-CtCpIFeQ.js +0 -1
  169. package/dist/assets/bundle-avatar-Ci6-oNkL.js +0 -1
  170. package/dist/assets/getValidReactChildren-9TX6zfai.js +0 -1
  171. package/dist/assets/index-B3KTzQCX.js +0 -21
  172. package/dist/assets/index-CX7wbZNb.js +0 -288
  173. package/dist/assets/index-CvBzQQ4d.js +0 -278
  174. package/dist/assets/index-Dv4oZdvT.js +0 -54
  175. package/dist/assets/index-PpzEIdrF.js +0 -1
  176. package/dist/assets/react-BzW-kb6J.js +0 -56
  177. package/dist/assets/resource-dialog-D78t25J3.js +0 -57
  178. package/dist/assets/service-UeJj__8r.js +0 -1
@@ -1,4 +1,4 @@
1
- import{bt as Ie,bu as Ue,bv as Oe,bw as Te,bx as qe,by as ze,bz as Ne,bA as ke,bB as He,g as Fe,bC as Ge,bD as Ve,bE as We,r as v,j as n,P as j,a1 as Ke,aK as R,aL as b,bF as Xe,n as Je,z as Ze,bm as Qe,f as pe,M as P,b as H,bG as M,a2 as Ye,a$ as et,J as tt,N as nt,be as at,S as rt,aD as st,C as se,a9 as ot,ad as oe,B as it,F as ie,m as q,aZ as ce,A as le,aa as ct,aQ as lt,K as ut,bH as dt,bI as mt,bJ as pt}from"./index-C1sxwK1q.js";import{_ as ft}from"./useLocalStorage-02uWRCTE.js";import{d as vt}from"./MoreVert-NYc6koTI.js";import{d as ht}from"./Delete-CUte0jEQ.js";import{B as gt}from"./ButtonGroup-reI4zw37.js";import{R as xt,b as ue,u as _t}from"./url-evaluation-Ctc4DSd9.js";var St=Ie,jt=Te,yt=qe,Dt=Ue,Rt=Oe,bt=ze,$t=200;function Ct(e,r,o,c){var s=-1,u=jt,g=!0,x=e.length,d=[],i=r.length;if(!x)return d;o&&(r=Dt(r,Rt(o))),c?(u=yt,g=!1):r.length>=$t&&(u=bt,g=!1,r=new St(r));e:for(;++s<x;){var p=e[s],f=o==null?p:o(p);if(p=c||p!==0?p:0,g&&f===f){for(var $=i;$--;)if(r[$]===f)continue e;d.push(p)}else u(r,f,c)||d.push(p)}return d}var Lt=Ct,wt=Lt,Bt=Ne,de=ke;function Pt(e,r,o){var c=e.length;if(c<2)return c?de(e[0]):[];for(var s=-1,u=Array(c);++s<c;)for(var g=e[s],x=-1;++x<c;)x!=s&&(u[s]=wt(u[s]||g,e[x],r,o));return de(Bt(u,1),r,o)}var Mt=Pt,At=Ge,Et=He,It=Mt,Ut=We,Ot=Ve,Tt=Et(function(e){var r=Ot(e);return r=typeof r=="function"?r:void 0,It(At(e,Ut),void 0,r)}),qt=Tt;const zt=Fe(qt),fe=v.createContext({});function ve({children:e,type:r}){const[o,c]=v.useState([]),s=v.useRef([]),u=d=>{if(!s.current.includes(d)){const i=[...s.current,d];c(i),s.current=i}},g=d=>{if(s.current.includes(d)){const i=s.current.filter(p=>p!==d);c(i),s.current=i}},x=d=>{const i=o.filter(f=>d.find($=>$===f));zt(i,o).forEach(f=>g(f))};return n.jsx(fe.Provider,{value:{type:r,deletingBlocklets:o,addDeletingDid:u,removeDeletingDid:g,matchDeletingDid:x},children:e})}ve.propTypes={type:j.string,children:j.node.isRequired};ve.defaultProps={type:"blocklets"};function _n(){return v.useContext(fe)}const Nt=(e,r)=>{if(!e)return"";if(!r)return e;const o=new URL(e),c=new URLSearchParams(o.searchParams),s=new URL(Ke(o.origin,r));return s.search=c.toString(),s.toString()};var F={},kt=b;Object.defineProperty(F,"__esModule",{value:!0});var he=F.default=void 0,Ht=kt(R()),Ft=n;he=F.default=(0,Ht.default)((0,Ft.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");var G={},Gt=b;Object.defineProperty(G,"__esModule",{value:!0});var ge=G.default=void 0,Vt=Gt(R()),Wt=n;ge=G.default=(0,Vt.default)((0,Wt.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var V={},Kt=b;Object.defineProperty(V,"__esModule",{value:!0});var xe=V.default=void 0,Xt=Kt(R()),Jt=n;xe=V.default=(0,Xt.default)((0,Jt.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var W={},Zt=b;Object.defineProperty(W,"__esModule",{value:!0});var _e=W.default=void 0,Qt=Zt(R()),Yt=n;_e=W.default=(0,Qt.default)((0,Yt.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var K={},en=b;Object.defineProperty(K,"__esModule",{value:!0});var Se=K.default=void 0,tn=en(R()),nn=n;Se=K.default=(0,tn.default)((0,nn.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var X={},an=b;Object.defineProperty(X,"__esModule",{value:!0});var je=X.default=void 0,rn=an(R()),sn=n;je=X.default=(0,rn.default)((0,sn.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var J={},on=b;Object.defineProperty(J,"__esModule",{value:!0});var ye=J.default=void 0,cn=on(R()),ln=n;ye=J.default=(0,cn.default)((0,ln.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Z={},un=b;Object.defineProperty(Z,"__esModule",{value:!0});var De=Z.default=void 0,dn=un(R()),mn=n;De=Z.default=(0,dn.default)((0,mn.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");const S={Start:he,Stop:ge,Restart:xe,Reload:_e,Remove:ht,Config:Se,Log:je,Group:ye,Cancel:De,Dashboard:Xe};function Q({blocklet:e,onStart:r,onComplete:o,variant:c,hasPermission:s,getComponentUrl:u,useBlockletUrlEvaluation:g,...x}){const d=Ze(),i=Qe(),[p,f]=v.useState(null),[$,Y]=v.useState(null),[A,E]=v.useState(!1),[m,z]=v.useState(null),{t:a}=v.useContext(pe),[Re]=ft("skip-blocklet-setup",!1),{loading:be,recommendedUrl:$e}=g(e),ee=P.isInProgress(e.status),[N,te]=v.useState(!1);v.useEffect(()=>{var l,y;if(!(e!=null&&e.controller))return;te(((y=(l=e==null?void 0:e.controller)==null?void 0:l.status)==null?void 0:y.value)===H.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var D,C,L;try{const h=await i.api.getLauncherSession({input:{launcherSessionId:(D=e==null?void 0:e.controller)==null?void 0:D.launcherSessionId,launcherUrl:(C=e==null?void 0:e.controller)==null?void 0:C.launcherUrl}});if(h!=null&&h.error){console.error("get launcher session failed",h.error);return}te([ie.LAUNCH_SESSION_STATUS.expired,ie.LAUNCH_SESSION_STATUS.terminated].includes((L=h==null?void 0:h.launcherSession)==null?void 0:L.status))}catch(h){console.error("call getLauncherSession error",h)}})()},[]);const{inService:k}=i,Ce=()=>{const t=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),l=u==null?void 0:u({mountPoint:t,blocklet:e});window.open(Nt(l,".well-known/service/admin"))},I=(t,l,y=!1)=>async()=>{const D=async U=>{var T;r({action:t,blocklet:e}),E(!0),Y(t);let O=!1;try{if(t==="remove")await l(U);else if(t==="start"){if(!P.hasRunnableComponent(e)){le.error(a("blocklet.noComponent"));return}if(!k&&!Re&&!((T=e.settings)!=null&&T.initialized)&&e.mode!==H.BLOCKLET_MODES.DEVELOPMENT){const _=ct(i.info),re=new URL($e);re.searchParams.set("serverUrl",_),window.open(re.href),o({action:t,blocklet:e});return}const w=e.children.filter(_=>!P.isInProgress(_.status)&&_.status!=="running").map(_=>_.meta.did),B={did:e.meta.did,componentDids:w};await l({input:B})}else if(["stop","restart","reload"].includes(t)){const w=e.children.filter(_=>_.status==="running").map(_=>_.meta.did),B={did:e.meta.did,componentDids:w};await l({input:B})}else{const w={did:e.meta.did};await l({input:w})}t==="remove"?O=!0:await lt(1e3),t==="reload"&&le.success(a("blocklet.reloadSuccess")),z(null),o({action:t,blocklet:e})}catch(w){const B=`Blocklet ${t} failed: ${ut(w)}`;throw o({action:t,blocklet:e,error:new Error(B)}),new Error(B)}finally{O||E(!1)}},C=()=>{E(!1),z(null)},L=P.getDisplayName(e,!0),h=e.mode===H.BLOCKLET_MODES.DEVELOPMENT?{description:()=>n.jsx(q,{component:"div",children:n.jsx(q,{gutterBottom:!0,children:a("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(U,O)=>n.jsxs(q,{component:"div",children:[n.jsx(q,{gutterBottom:!0,children:a("blocklet.action.removeApplicationDescription")}),n.jsxs(xt,{name:"removeType",value:U.removeType,onChange:T=>O({...U,removeType:T.target.value}),children:[n.jsx(ce,{value:"backup",control:n.jsx(ue,{}),label:a("blocklet.action.removeApplicationAfterBackup")}),n.jsx(ce,{value:"complete",control:n.jsx(ue,{}),label:a("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Ee={stop:{title:`${a("common.stop")} ${L}`,description:a("blocklet.action.stopDescription"),confirm:a("blocklet.action.confirmStop"),cancel:a("common.cancel"),onConfirm:D,onCancel:C},restart:{title:`${a("common.restart")} ${L}`,description:a("blocklet.action.restartDescription"),confirm:a("blocklet.action.confirmRestart"),cancel:a("common.cancel"),onConfirm:D,onCancel:C},remove:{title:`${a("common.remove")} ${L}`,confirm:a("blocklet.action.confirmRemove"),cancel:a("common.cancel"),onConfirm:D,onCancel:C,...h},cancelDownload:{title:`${a("common.cancel")}`,description:a("blocklet.action.cancelDownloadDescription",{name:L}),confirm:a("common.confirm"),cancel:a("common.cancel"),onConfirm:D,onCancel:C}};y?z(Ee[t]):await D()},Le=!!p,we=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}f(t.currentTarget)},Be=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}f(null)},ne=async(t,l)=>{try{l.stopPropagation(),l.preventDefault()}catch{}if(typeof t.handler=="function")try{E(!0),Y(t.action),await t.handler()}catch(y){console.error(`Blocklet ${t.name} failed: `,y)}finally{E(!1),f(null)}else f(null)},Pe=!k&&P.isDeletableBlocklet(e)?{action:"remove",icon:S.Remove,name:a("common.remove"),handler:I("remove",async({removeType:t})=>{t==="backup"&&await i.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await i.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:ee}:null,Me={action:"remove",icon:({sx:t,...l})=>n.jsx(S.Cancel,{sx:{...t,paddingRight:"2px",zoom:.95},...l}),name:a("common.cancel"),handler:I("cancelDownload",i.api.cancelDownloadBlocklet,!0)},Ae=P.getAppMissingConfigs(e),ae=[{action:"start",icon:S.Start,name:a("common.start"),handler:I("start",i.api.startBlocklet),disabled:N||e.children.every(t=>t.status==="running")||M(e.status)||be||ee},{action:"stop",icon:S.Stop,name:a("common.stop"),handler:I("stop",i.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",icon:S.Restart,name:a("common.restart"),handler:I("restart",i.api.restartBlocklet,!0),disabled:N||e.status!=="running"},M(e.status)?Me:Pe,{separator:!0},k?null:{action:"dashboard",icon:({style:t,...l})=>n.jsx(S.Dashboard,{...l,style:{...t,width:"26px",height:"26px",paddingRight:"3px"}}),name:a("sidebar.dashboard"),handler:Ce,disabled:N||e.status!=="running"},{separator:!0},{onlyInMenu:!0,action:"config",icon:S.Config,name:a("common.config"),handler:()=>{d(`/blocklets/${e.meta.did}/configuration`)},disabled:M(e.status)},{onlyInMenu:!0,action:"team",icon:S.Group,name:a("common.manageTeam"),handler:()=>{d(`/blocklets/${e.meta.did}/members`)},disabled:M(e.status)},{onlyInMenu:!0,action:"log",icon:S.Log,name:a("common.log"),handler:()=>{d(`/logs/blocklet-${e.meta.did}`)},disabled:M(e.status)}].filter(Boolean);return c==="menu"?n.jsxs(me,{"data-cy":"blocklet-actions",children:[n.jsx(Ye,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:we,size:"small",disabled:!s||!M(e.status)&&A,children:n.jsx(vt,{})}),n.jsxs(et,{id:"actions-menu",anchorEl:p,keepMounted:!0,open:Le,onClose:Be,PaperProps:{},children:[Ae.length>0&&n.jsxs(tt,{style:{maxWidth:"400px"},severity:"error",children:[a("blocklet.config.missingRequired"),n.jsx("br",{}),n.jsx(nt,{to:`/blocklets/${e.meta.did}/components`,children:a("blocklet.config.gotoFix")})]}),ae.map((t,l)=>t.separator?n.jsx(at,{},`separator-${l}`):n.jsxs(rt,{dense:!0,onClick:y=>ne(t,y),disabled:A||t.disabled,"data-cy":`${t.action}-blocklet`,children:[n.jsx(st,{style:{minWidth:24},children:$===t.action&&A?n.jsx(se,{size:16,sx:{marginRight:1}}):n.jsx(t.icon,{fontSize:"small"})}),n.jsx(ot,{primary:t.name})]},t.name))]}),m&&n.jsx(oe,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]}):n.jsxs(me,{"data-cy":"blocklet-actions",...x,children:[n.jsx(gt,{children:ae.filter(t=>!t.separator&&!t.onlyInMenu).map(t=>n.jsxs(it,{title:t.name,"data-cy":`${t.action}-blocklet`,onClick:()=>ne(t),disabled:!!t.disabled||A,children:[$===t.action&&A?n.jsx(se,{size:16,sx:{marginRight:1}}):n.jsx(t.icon,{}),n.jsx("span",{className:"blocklet-action-text",children:t.name})]},t.name))}),m&&n.jsx(oe,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}Q.propTypes={getComponentUrl:j.func,blocklet:j.object.isRequired,onStart:j.func.isRequired,onComplete:j.func.isRequired,variant:j.oneOf(["menu","group"]),hasPermission:j.bool,useBlockletUrlEvaluation:j.func};Q.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const me=Je.div`
1
+ import{bt as Ie,bu as Te,bv as Ue,bw as Oe,bx as qe,by as ze,bz as Ne,bA as ke,bB as He,g as Fe,bC as Ge,bD as Ve,bE as We,r as v,j as n,P as j,a1 as Ke,aK as R,aL as b,bF as Xe,n as Je,z as Ze,bm as Qe,f as pe,M as P,b as H,bG as M,a2 as Ye,a$ as et,J as tt,N as nt,be as at,S as rt,aD as st,C as se,a9 as ot,ad as oe,B as it,F as ie,m as q,aZ as ce,A as le,aa as ct,aQ as lt,K as ut,bH as dt,bI as mt,bJ as pt}from"./index-BlbV7Lbg.js";import{_ as ft}from"./useLocalStorage-DjVTK9Hv.js";import{d as vt}from"./MoreVert-Dt18zfj9.js";import{d as ht}from"./Delete-DrNN1_NC.js";import{B as gt}from"./ButtonGroup-BsGeyHPH.js";import{R as xt,b as ue,u as _t}from"./url-evaluation-C3ISZkf1.js";var St=Ie,jt=Oe,yt=qe,Dt=Te,Rt=Ue,bt=ze,$t=200;function Ct(e,r,o,c){var s=-1,u=jt,g=!0,x=e.length,d=[],i=r.length;if(!x)return d;o&&(r=Dt(r,Rt(o))),c?(u=yt,g=!1):r.length>=$t&&(u=bt,g=!1,r=new St(r));e:for(;++s<x;){var p=e[s],f=o==null?p:o(p);if(p=c||p!==0?p:0,g&&f===f){for(var $=i;$--;)if(r[$]===f)continue e;d.push(p)}else u(r,f,c)||d.push(p)}return d}var Lt=Ct,wt=Lt,Bt=Ne,de=ke;function Pt(e,r,o){var c=e.length;if(c<2)return c?de(e[0]):[];for(var s=-1,u=Array(c);++s<c;)for(var g=e[s],x=-1;++x<c;)x!=s&&(u[s]=wt(u[s]||g,e[x],r,o));return de(Bt(u,1),r,o)}var Mt=Pt,At=Ge,Et=He,It=Mt,Tt=We,Ut=Ve,Ot=Et(function(e){var r=Ut(e);return r=typeof r=="function"?r:void 0,It(At(e,Tt),void 0,r)}),qt=Ot;const zt=Fe(qt),fe=v.createContext({});function ve({children:e,type:r}){const[o,c]=v.useState([]),s=v.useRef([]),u=d=>{if(!s.current.includes(d)){const i=[...s.current,d];c(i),s.current=i}},g=d=>{if(s.current.includes(d)){const i=s.current.filter(p=>p!==d);c(i),s.current=i}},x=d=>{const i=o.filter(f=>d.find($=>$===f));zt(i,o).forEach(f=>g(f))};return n.jsx(fe.Provider,{value:{type:r,deletingBlocklets:o,addDeletingDid:u,removeDeletingDid:g,matchDeletingDid:x},children:e})}ve.propTypes={type:j.string,children:j.node.isRequired};ve.defaultProps={type:"blocklets"};function _n(){return v.useContext(fe)}const Nt=(e,r)=>{if(!e)return"";if(!r)return e;const o=new URL(e),c=new URLSearchParams(o.searchParams),s=new URL(Ke(o.origin,r));return s.search=c.toString(),s.toString()};var F={},kt=b;Object.defineProperty(F,"__esModule",{value:!0});var he=F.default=void 0,Ht=kt(R()),Ft=n;he=F.default=(0,Ht.default)((0,Ft.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");var G={},Gt=b;Object.defineProperty(G,"__esModule",{value:!0});var ge=G.default=void 0,Vt=Gt(R()),Wt=n;ge=G.default=(0,Vt.default)((0,Wt.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var V={},Kt=b;Object.defineProperty(V,"__esModule",{value:!0});var xe=V.default=void 0,Xt=Kt(R()),Jt=n;xe=V.default=(0,Xt.default)((0,Jt.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var W={},Zt=b;Object.defineProperty(W,"__esModule",{value:!0});var _e=W.default=void 0,Qt=Zt(R()),Yt=n;_e=W.default=(0,Qt.default)((0,Yt.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var K={},en=b;Object.defineProperty(K,"__esModule",{value:!0});var Se=K.default=void 0,tn=en(R()),nn=n;Se=K.default=(0,tn.default)((0,nn.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var X={},an=b;Object.defineProperty(X,"__esModule",{value:!0});var je=X.default=void 0,rn=an(R()),sn=n;je=X.default=(0,rn.default)((0,sn.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var J={},on=b;Object.defineProperty(J,"__esModule",{value:!0});var ye=J.default=void 0,cn=on(R()),ln=n;ye=J.default=(0,cn.default)((0,ln.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Z={},un=b;Object.defineProperty(Z,"__esModule",{value:!0});var De=Z.default=void 0,dn=un(R()),mn=n;De=Z.default=(0,dn.default)((0,mn.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");const S={Start:he,Stop:ge,Restart:xe,Reload:_e,Remove:ht,Config:Se,Log:je,Group:ye,Cancel:De,Dashboard:Xe};function Q({blocklet:e,onStart:r,onComplete:o,variant:c,hasPermission:s,getComponentUrl:u,useBlockletUrlEvaluation:g,...x}){const d=Ze(),i=Qe(),[p,f]=v.useState(null),[$,Y]=v.useState(null),[A,E]=v.useState(!1),[m,z]=v.useState(null),{t:a}=v.useContext(pe),[Re]=ft("skip-blocklet-setup",!1),{loading:be,recommendedUrl:$e}=g(e),ee=P.isInProgress(e.status),[N,te]=v.useState(!1);v.useEffect(()=>{var l,y;if(!(e!=null&&e.controller))return;te(((y=(l=e==null?void 0:e.controller)==null?void 0:l.status)==null?void 0:y.value)===H.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var D,C,L;try{const h=await i.api.getLauncherSession({input:{launcherSessionId:(D=e==null?void 0:e.controller)==null?void 0:D.launcherSessionId,launcherUrl:(C=e==null?void 0:e.controller)==null?void 0:C.launcherUrl}});if(h!=null&&h.error){console.error("get launcher session failed",h.error);return}te([ie.LAUNCH_SESSION_STATUS.expired,ie.LAUNCH_SESSION_STATUS.terminated].includes((L=h==null?void 0:h.launcherSession)==null?void 0:L.status))}catch(h){console.error("call getLauncherSession error",h)}})()},[]);const{inService:k}=i,Ce=()=>{const t=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),l=u==null?void 0:u({mountPoint:t,blocklet:e});window.open(Nt(l,".well-known/service/admin"))},I=(t,l,y=!1)=>async()=>{const D=async T=>{var O;r({action:t,blocklet:e}),E(!0),Y(t);let U=!1;try{if(t==="remove")await l(T);else if(t==="start"){if(!P.hasRunnableComponent(e)){le.error(a("blocklet.noComponent"));return}if(!k&&!Re&&!((O=e.settings)!=null&&O.initialized)&&e.mode!==H.BLOCKLET_MODES.DEVELOPMENT){const _=ct(i.info),re=new URL($e);re.searchParams.set("serverUrl",_),window.open(re.href),o({action:t,blocklet:e});return}const w=e.children.filter(_=>!P.isInProgress(_.status)&&_.status!=="running").map(_=>_.meta.did),B={did:e.meta.did,componentDids:w};await l({input:B})}else if(["stop","restart","reload"].includes(t)){const w=e.children.filter(_=>_.status==="running").map(_=>_.meta.did),B={did:e.meta.did,componentDids:w};await l({input:B})}else{const w={did:e.meta.did};await l({input:w})}t==="remove"?U=!0:await lt(1e3),t==="reload"&&le.success(a("blocklet.reloadSuccess")),z(null),o({action:t,blocklet:e})}catch(w){const B=`Blocklet ${t} failed: ${ut(w)}`;throw o({action:t,blocklet:e,error:new Error(B)}),new Error(B)}finally{U||E(!1)}},C=()=>{E(!1),z(null)},L=P.getDisplayName(e,!0),h=e.mode===H.BLOCKLET_MODES.DEVELOPMENT?{description:()=>n.jsx(q,{component:"div",children:n.jsx(q,{gutterBottom:!0,children:a("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(T,U)=>n.jsxs(q,{component:"div",children:[n.jsx(q,{gutterBottom:!0,children:a("blocklet.action.removeApplicationDescription")}),n.jsxs(xt,{name:"removeType",value:T.removeType,onChange:O=>U({...T,removeType:O.target.value}),children:[n.jsx(ce,{value:"backup",control:n.jsx(ue,{}),label:a("blocklet.action.removeApplicationAfterBackup")}),n.jsx(ce,{value:"complete",control:n.jsx(ue,{}),label:a("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Ee={stop:{title:`${a("common.stop")} ${L}`,description:a("blocklet.action.stopDescription"),confirm:a("blocklet.action.confirmStop"),cancel:a("common.cancel"),onConfirm:D,onCancel:C},restart:{title:`${a("common.restart")} ${L}`,description:a("blocklet.action.restartDescription"),confirm:a("blocklet.action.confirmRestart"),cancel:a("common.cancel"),onConfirm:D,onCancel:C},remove:{title:`${a("common.remove")} ${L}`,confirm:a("blocklet.action.confirmRemove"),cancel:a("common.cancel"),onConfirm:D,onCancel:C,...h},cancelDownload:{title:`${a("common.cancel")}`,description:a("blocklet.action.cancelDownloadDescription",{name:L}),confirm:a("common.confirm"),cancel:a("common.cancel"),onConfirm:D,onCancel:C}};y?z(Ee[t]):await D()},Le=!!p,we=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}f(t.currentTarget)},Be=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}f(null)},ne=async(t,l)=>{try{l.stopPropagation(),l.preventDefault()}catch{}if(typeof t.handler=="function")try{E(!0),Y(t.action),await t.handler()}catch(y){console.error(`Blocklet ${t.name} failed: `,y)}finally{E(!1),f(null)}else f(null)},Pe=!k&&P.isDeletableBlocklet(e)?{action:"remove",icon:S.Remove,name:a("common.remove"),handler:I("remove",async({removeType:t})=>{t==="backup"&&await i.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await i.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:ee}:null,Me={action:"remove",icon:({sx:t,...l})=>n.jsx(S.Cancel,{sx:{...t,paddingRight:"2px",zoom:.95},...l}),name:a("common.cancel"),handler:I("cancelDownload",i.api.cancelDownloadBlocklet,!0)},Ae=P.getAppMissingConfigs(e),ae=[{action:"start",icon:S.Start,name:a("common.start"),handler:I("start",i.api.startBlocklet),disabled:N||e.children.every(t=>t.status==="running")||M(e.status)||be||ee},{action:"stop",icon:S.Stop,name:a("common.stop"),handler:I("stop",i.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",icon:S.Restart,name:a("common.restart"),handler:I("restart",i.api.restartBlocklet,!0),disabled:N||e.status!=="running"},M(e.status)?Me:Pe,{separator:!0},k?null:{action:"dashboard",icon:({style:t,...l})=>n.jsx(S.Dashboard,{...l,style:{...t,width:"26px",height:"26px",paddingRight:"3px"}}),name:a("sidebar.dashboard"),handler:Ce,disabled:N||e.status!=="running"},{separator:!0},{onlyInMenu:!0,action:"config",icon:S.Config,name:a("common.config"),handler:()=>{d(`/blocklets/${e.meta.did}/configuration`)},disabled:M(e.status)},{onlyInMenu:!0,action:"team",icon:S.Group,name:a("common.manageTeam"),handler:()=>{d(`/blocklets/${e.meta.did}/members`)},disabled:M(e.status)},{onlyInMenu:!0,action:"log",icon:S.Log,name:a("common.log"),handler:()=>{d(`/logs/blocklet-${e.meta.did}`)},disabled:M(e.status)}].filter(Boolean);return c==="menu"?n.jsxs(me,{"data-cy":"blocklet-actions",children:[n.jsx(Ye,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:we,size:"small",disabled:!s||!M(e.status)&&A,children:n.jsx(vt,{})}),n.jsxs(et,{id:"actions-menu",anchorEl:p,keepMounted:!0,open:Le,onClose:Be,PaperProps:{},children:[Ae.length>0&&n.jsxs(tt,{style:{maxWidth:"400px"},severity:"error",children:[a("blocklet.config.missingRequired"),n.jsx("br",{}),n.jsx(nt,{to:`/blocklets/${e.meta.did}/components`,children:a("blocklet.config.gotoFix")})]}),ae.map((t,l)=>t.separator?n.jsx(at,{},`separator-${l}`):n.jsxs(rt,{dense:!0,onClick:y=>ne(t,y),disabled:A||t.disabled,"data-cy":`${t.action}-blocklet`,children:[n.jsx(st,{style:{minWidth:24},children:$===t.action&&A?n.jsx(se,{size:16,sx:{marginRight:1}}):n.jsx(t.icon,{fontSize:"small"})}),n.jsx(ot,{primary:t.name})]},t.name))]}),m&&n.jsx(oe,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]}):n.jsxs(me,{"data-cy":"blocklet-actions",...x,children:[n.jsx(gt,{children:ae.filter(t=>!t.separator&&!t.onlyInMenu).map(t=>n.jsxs(it,{title:t.name,"data-cy":`${t.action}-blocklet`,onClick:()=>ne(t),disabled:!!t.disabled||A,children:[$===t.action&&A?n.jsx(se,{size:16,sx:{marginRight:1}}):n.jsx(t.icon,{}),n.jsx("span",{className:"blocklet-action-text",children:t.name})]},t.name))}),m&&n.jsx(oe,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}Q.propTypes={getComponentUrl:j.func,blocklet:j.object.isRequired,onStart:j.func.isRequired,onComplete:j.func.isRequired,variant:j.oneOf(["menu","group"]),hasPermission:j.bool,useBlockletUrlEvaluation:j.func};Q.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const me=Je.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
 
@@ -1 +1 @@
1
- import{aK as D,aL as E,j as a,r as l,a2 as I,a$ as M,be as _,S as b,aD as z,a9 as R,P as u,n as S}from"./index-C1sxwK1q.js";var o={},C=E;Object.defineProperty(o,"__esModule",{value:!0});var p=o.default=void 0,T=C(D()),k=a;p=o.default=(0,T.default)((0,k.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz");function d({actions:m,size:f,...y}){const[n,i]=l.useState(null),v=!!n,x=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}i(e.currentTarget)},t=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}i(null)};return a.jsxs(q,{...y,children:[a.jsx(I,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:x,size:f,children:a.jsx(p,{})}),a.jsx(M,{id:"actions-menu","data-cy":"actions-menu",anchorEl:n,keepMounted:!0,open:v,onClose:t,slotProps:{paper:{}},children:m.map((e,r)=>{if(typeof e=="function")return e({close:t});if(e.separator)return a.jsx(_,{},`separator-${r}`);const{icon:h,text:j,render:A,onClick:s,disabled:g=!1,...P}=e;return l.createElement(b,{...P,disabled:g,dense:!0,onClick:async c=>{c.stopPropagation(),await(s==null?void 0:s(c)),t()},key:r,"data-cy":`actions-menu-${r}`},a.jsx(z,{style:{minWidth:24,marginRight:8},children:h}),a.jsx(R,{primary:j}))})})]})}d.propTypes={actions:u.array,size:u.oneOf(["small","medium","large"])};d.defaultProps={actions:[],size:"small"};const q=S.div``;export{d as A};
1
+ import{aK as D,aL as E,j as a,r as l,a2 as I,a$ as M,be as _,S as b,aD as z,a9 as R,P as u,n as S}from"./index-BlbV7Lbg.js";var o={},C=E;Object.defineProperty(o,"__esModule",{value:!0});var p=o.default=void 0,T=C(D()),k=a;p=o.default=(0,T.default)((0,k.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz");function d({actions:m,size:f,...y}){const[n,i]=l.useState(null),v=!!n,x=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}i(e.currentTarget)},t=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}i(null)};return a.jsxs(q,{...y,children:[a.jsx(I,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:x,size:f,children:a.jsx(p,{})}),a.jsx(M,{id:"actions-menu","data-cy":"actions-menu",anchorEl:n,keepMounted:!0,open:v,onClose:t,slotProps:{paper:{}},children:m.map((e,r)=>{if(typeof e=="function")return e({close:t});if(e.separator)return a.jsx(_,{},`separator-${r}`);const{icon:h,text:j,render:A,onClick:s,disabled:g=!1,...P}=e;return l.createElement(b,{...P,disabled:g,dense:!0,onClick:async c=>{c.stopPropagation(),await(s==null?void 0:s(c)),t()},key:r,"data-cy":`actions-menu-${r}`},a.jsx(z,{style:{minWidth:24,marginRight:8},children:h}),a.jsx(R,{primary:j}))})})]})}d.propTypes={actions:u.array,size:u.oneOf(["small","medium","large"])};d.defaultProps={actions:[],size:"small"};const q=S.div``;export{d as A};
@@ -1,4 +1,4 @@
1
- import{P as m,n as k,j as i,aK as oe,aL as ae,r as E,B as se,C as le,D as G,g as K,O as g,M as _,ch as ce,fb as pe,k as y,fI as ue,m as H,F as de,q as V,H as fe,fX as N,bm as me,E as he,z as xe,aZ as ge,a_ as ye,a2 as ve}from"./index-C1sxwK1q.js";import{a as Y,h as be,w as we,f as je,b as Ee,d as ke,e as Ce,M as Ne}from"./index-D-L4Ck2v.js";import{j as L}from"./url-join-4YCGlq9R.js";function Se({children:e,...t}){return i.jsx(Te,{...t,children:e})}Se.propTypes={children:m.any.isRequired};const Te=k.div`
1
+ import{P as m,n as k,j as i,aK as oe,aL as ae,r as E,B as se,C as le,D as X,g as K,O as g,M as _,ch as ce,fg as pe,k as y,fS as ue,m as H,F as de,q as V,H as fe,fB as N,bm as me,E as he,z as xe,aZ as ge,a_ as ye,a2 as ve}from"./index-BlbV7Lbg.js";import{a as Y,h as be,w as we,f as je,b as Ee,d as ke,e as Ce,M as Ne}from"./index-D4GRkcdU.js";import{j as L}from"./url-join-DiQ25GxI.js";function Se({children:e,...t}){return i.jsx(Te,{...t,children:e})}Se.propTypes={children:m.any.isRequired};const Te=k.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -40,7 +40,7 @@ import{P as m,n as k,j as i,aK as oe,aL as ae,r as E,B as se,C as le,D as G,g as
40
40
  padding-bottom: 10px;
41
41
  }
42
42
  }
43
- `;var F={},Re=ae;Object.defineProperty(F,"__esModule",{value:!0});var De=F.default=void 0,Fe=Re(oe()),Ae=i;De=F.default=(0,Fe.default)((0,Ae.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");function A({disabled:e,children:t,onConfirm:r}){return E.useEffect(()=>{if(e)return()=>{};const n=s=>{s.code==="Enter"&&(s.metaKey===!0||s.ctrlKey===!0)&&(s.preventDefault(),s.stopPropagation(),r())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e,r]),t}A.propTypes={disabled:m.bool,children:m.any.isRequired,onConfirm:m.func.isRequired};A.defaultProps={disabled:!1};function I({onContinue:e,nextDisabled:t,launching:r,texts:n,description:s}){const[a,o]=E.useState(!1),l=()=>o(u=>!u);return i.jsxs(i.Fragment,{children:[i.jsx(Ie,{children:i.jsxs(A,{disabled:t,onConfirm:e,children:[i.jsx("div",{className:"eula-trigger",onClick:l,children:n.listenName}),i.jsx(se,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:r?i.jsxs(i.Fragment,{children:[i.jsx(le,{size:14}),n.launchingText]}):n.buttonNext})]})}),i.jsx(G,{open:a,title:n.listenName,onClose:()=>o(!1),children:s})]})}I.propTypes={onContinue:m.func.isRequired,nextDisabled:m.bool,launching:m.bool,description:m.any,texts:m.object};I.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const Ie=k.div`
43
+ `;var F={},Re=ae;Object.defineProperty(F,"__esModule",{value:!0});var De=F.default=void 0,Fe=Re(oe()),Ae=i;De=F.default=(0,Fe.default)((0,Ae.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");function A({disabled:e,children:t,onConfirm:r}){return E.useEffect(()=>{if(e)return()=>{};const n=s=>{s.code==="Enter"&&(s.metaKey===!0||s.ctrlKey===!0)&&(s.preventDefault(),s.stopPropagation(),r())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e,r]),t}A.propTypes={disabled:m.bool,children:m.any.isRequired,onConfirm:m.func.isRequired};A.defaultProps={disabled:!1};function I({onContinue:e,nextDisabled:t,launching:r,texts:n,description:s}){const[a,o]=E.useState(!1),l=()=>o(u=>!u);return i.jsxs(i.Fragment,{children:[i.jsx(Ie,{children:i.jsxs(A,{disabled:t,onConfirm:e,children:[i.jsx("div",{className:"eula-trigger",onClick:l,children:n.listenName}),i.jsx(se,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:r?i.jsxs(i.Fragment,{children:[i.jsx(le,{size:14}),n.launchingText]}):n.buttonNext})]})}),i.jsx(X,{open:a,title:n.listenName,onClose:()=>o(!1),children:s})]})}I.propTypes={onContinue:m.func.isRequired,nextDisabled:m.bool,launching:m.bool,description:m.any,texts:m.object};I.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const Ie=k.div`
44
44
  margin: 0 auto;
45
45
  display: flex;
46
46
  justify-content: space-between;
@@ -69,18 +69,18 @@ import{P as m,n as k,j as i,aK as oe,aL as ae,r as E,B as se,C as le,D as G,g as
69
69
  .next-button {
70
70
  min-width: 200px;
71
71
  }
72
- `;var $={exports:{}},q=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$e=/\n/g,Pe=/^\s*/,Oe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Be=/^:\s*/,_e=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Le=/^[;\s]*/,qe=/^\s+|\s+$/g,ze=`
73
- `,z="/",M="*",j="",Me="comment",Ue="declaration",We=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function s(c){var p=c.match($e);p&&(r+=p.length);var v=c.lastIndexOf(ze);n=~v?c.length-v:n+c.length}function a(){var c={line:r,column:n};return function(p){return p.position=new o(c),h(),p}}function o(c){this.start=c,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function l(c){var p=new Error(t.source+":"+r+":"+n+": "+c);if(p.reason=c,p.filename=t.source,p.line=r,p.column=n,p.source=e,!t.silent)throw p}function u(c){var p=c.exec(e);if(p){var v=p[0];return s(v),e=e.slice(v.length),p}}function h(){u(Pe)}function f(c){var p;for(c=c||[];p=d();)p!==!1&&c.push(p);return c}function d(){var c=a();if(!(z!=e.charAt(0)||M!=e.charAt(1))){for(var p=2;j!=e.charAt(p)&&(M!=e.charAt(p)||z!=e.charAt(p+1));)++p;if(p+=2,j===e.charAt(p-1))return l("End of comment missing");var v=e.slice(2,p-2);return n+=2,s(v),e=e.slice(p),n+=2,c({type:Me,comment:v})}}function x(){var c=a(),p=u(Oe);if(p){if(d(),!u(Be))return l("property missing ':'");var v=u(_e),ie=c({type:Ue,property:U(p[0].replace(q,j)),value:v?U(v[0].replace(q,j)):j});return u(Le),ie}}function b(){var c=[];f(c);for(var p;p=x();)p!==!1&&(c.push(p),f(c));return c}return h(),b()};function U(e){return e?e.replace(qe,j):j}var Xe=We;function Q(e,t){var r=null;if(!e||typeof e!="string")return r;for(var n,s=Xe(e),a=typeof t=="function",o,l,u=0,h=s.length;u<h;u++)n=s[u],o=n.property,l=n.value,a?t(o,l,n):l&&(r||(r={}),r[o]=l);return r}$.exports=Q;$.exports.default=Q;var Ge=$.exports;const Ke=K(Ge),He={}.hasOwnProperty;function Ve(e,t,r){if(typeof e!="function")throw new TypeError("h is not a function");const n=Qe(e),s=et(e),a=Je(e);let o,l;if(typeof r=="string"||typeof r=="boolean"?(o=r,r={}):(r||(r={}),o=r.prefix),t&&t.type==="root"){const u=t.children[0];l=t.children.length===1&&u.type==="element"?u:{type:"element",tagName:"div",properties:{},children:t.children}}else if(t&&t.type==="element")l=t;else throw new Error("Expected root or element, not `"+(t&&t.type||t)+"`");return Z(e,l,{schema:r.space==="svg"?Y:be,prefix:o==null?n||s||a?"h-":void 0:typeof o=="string"?o:o?"h-":void 0,key:0,react:n,vue:s,vdom:a,hyperscript:Ze(e)})}function Z(e,t,r){const n=r.schema;let s=n,a=t.tagName;const o={},l=[];let u=-1,h;n.space==="html"&&a.toLowerCase()==="svg"&&(s=Y,r.schema=s);for(h in t.properties)t.properties&&He.call(t.properties,h)&&Ye(o,h,t.properties[h],r,a);if(r.vdom&&(s.space==="html"?a=a.toUpperCase():s.space&&(o.namespace=we[s.space])),r.prefix&&(r.key++,o.key=r.prefix+r.key),t.children)for(;++u<t.children.length;){const f=t.children[u];f.type==="element"?l.push(Z(e,f,r)):f.type==="text"&&l.push(f.value)}return r.schema=n,l.length>0?e.call(t,a,o,l):e.call(t,a,o)}function Ye(e,t,r,n,s){const a=je(n.schema,t);let o;r==null||typeof r=="number"&&Number.isNaN(r)||r===!1&&(n.vue||n.vdom||n.hyperscript)||!r&&a.boolean&&(n.vue||n.vdom||n.hyperscript)||(Array.isArray(r)&&(r=a.commaSeparated?Ee(r):ke(r)),a.boolean&&n.hyperscript&&(r=""),a.property==="style"&&typeof r=="string"&&(n.react||n.vue||n.vdom)&&(r=tt(r,s)),n.vue?a.property!=="style"&&(o="attrs"):a.mustUseProperty||(n.vdom?a.property!=="style"&&(o="attributes"):n.hyperscript&&(o="attrs")),o?e[o]=Object.assign(e[o]||{},{[a.attribute]:r}):a.space&&n.react?e[Ce[a.property]||a.property]=r:e[a.attribute]=r)}function Qe(e){const t=e("div",{});return!!(t&&("_owner"in t||"_store"in t)&&(t.key===void 0||t.key===null))}function Ze(e){return"context"in e&&"cleanup"in e}function Je(e){return e("div",{}).type==="VirtualNode"}function et(e){const t=e("div",{});return!!(t&&t.context&&t.context._isVue)}function tt(e,t){const r={};try{Ke(e,(n,s)=>{n.slice(0,4)==="-ms-"&&(n="ms-"+n.slice(4)),r[n.replace(/-([a-z])/g,(a,o)=>o.toUpperCase())]=s})}catch(n){const s=n;throw s.message=t+"[style]"+s.message.slice(9),s}return r}var nt=J;function J(e){if(typeof e=="string")return at(e);if(e==null)return st;if(typeof e=="object")return("length"in e?ot:it)(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function rt(e){for(var t=[],r=e.length,n=-1;++n<r;)t[n]=J(e[n]);return t}function it(e){return t;function t(r){var n;for(n in e)if(r[n]!==e[n])return!1;return!0}}function ot(e){var t=rt(e),r=t.length;return n;function n(){for(var s=-1;++s<r;)if(t[s].apply(this,arguments))return!0;return!1}}function at(e){return t;function t(r){return!!(r&&r.type===e)}}function st(){return!0}var lt=S,ct=nt,ee=!0,te="skip",C=!1;S.CONTINUE=ee;S.SKIP=te;S.EXIT=C;function S(e,t,r,n){var s;typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null),s=ct(t),a(e,null,[]);function a(l,u,h){var f=[],d;return(!t||s(l,u,h[h.length-1]||null))&&(f=W(r(l,h)),f[0]===C)?f:l.children&&f[0]!==te?(d=W(o(l.children,h.concat(l))),d[0]===C?d:f):f}function o(l,u){for(var h=-1,f=n?-1:1,d=(n?l.length:h)+f,x;d>h&&d<l.length;){if(x=a(l[d],d,u),x[0]===C)return x;d=typeof x[1]=="number"?x[1]:d+f}}}function W(e){return e!==null&&typeof e=="object"&&"length"in e?e:typeof e=="number"?[ee,e]:[e]}var pt=R,T=lt,ut=T.CONTINUE,dt=T.SKIP,ft=T.EXIT;R.CONTINUE=ut;R.SKIP=dt;R.EXIT=ft;function R(e,t,r,n){typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null),T(e,t,s,n);function s(a,o){var l=o[o.length-1],u=l?l.children.indexOf(a):null;return r(a,u,l)}}var mt=pt,ht=Object.prototype.hasOwnProperty,D={align:"text-align",valign:"vertical-align",height:"height",width:"width"},xt=function(t){return mt(t,"element",gt),t};function gt(e){if(!(e.tagName!=="tr"&&e.tagName!=="td"&&e.tagName!=="th")){var t,r;for(t in D)!ht.call(D,t)||e.properties[t]===void 0||(r=D[t],yt(e,r,e.properties[t]),delete e.properties[t])}}function yt(e,t,r){var n=(e.properties.style||"").trim();n&&!/;\s*/.test(n)&&(n+=";"),n&&(n+=" ");var s=n+t+": "+r+";";e.properties.style=s}const vt=K(xt);function bt(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}const wt={}.hasOwnProperty,jt=new Set(["table","thead","tbody","tfoot","tr"]);function Et(e){if(!e||typeof e.createElement!="function")throw new TypeError("createElement is not a function");const t=e.createElement,r=e.fixTableCellAlign!==!1;Object.assign(this,{Compiler:n});function n(a){let o=Ve(s,r?vt(a):a,e.prefix);return a.type==="root"?(o=o&&typeof o=="object"&&"type"in o&&"props"in o&&o.type==="div"&&(a.children.length!==1||a.children[0].type!=="element")?o.props.children:[o],t(e.Fragment||"div",{},o)):o}function s(a,o,l){if(l&&jt.has(a)&&(l=l.filter(u=>!bt(u))),e.components&&wt.call(e.components,a)){const u=e.components[a];return e.passNode&&typeof u=="function"&&(o=Object.assign({node:this},o)),t(u,o,l)}return t(a,o,l)}}function P({children:e}){return i.jsx(kt,{children:e})}const X="source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !important",kt=k(g)`
72
+ `;var $={exports:{}},q=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$e=/\n/g,Pe=/^\s*/,Be=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Oe=/^:\s*/,_e=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Le=/^[;\s]*/,qe=/^\s+|\s+$/g,ze=`
73
+ `,z="/",M="*",j="",Me="comment",Ue="declaration",We=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function s(c){var p=c.match($e);p&&(r+=p.length);var v=c.lastIndexOf(ze);n=~v?c.length-v:n+c.length}function a(){var c={line:r,column:n};return function(p){return p.position=new o(c),h(),p}}function o(c){this.start=c,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function l(c){var p=new Error(t.source+":"+r+":"+n+": "+c);if(p.reason=c,p.filename=t.source,p.line=r,p.column=n,p.source=e,!t.silent)throw p}function u(c){var p=c.exec(e);if(p){var v=p[0];return s(v),e=e.slice(v.length),p}}function h(){u(Pe)}function f(c){var p;for(c=c||[];p=d();)p!==!1&&c.push(p);return c}function d(){var c=a();if(!(z!=e.charAt(0)||M!=e.charAt(1))){for(var p=2;j!=e.charAt(p)&&(M!=e.charAt(p)||z!=e.charAt(p+1));)++p;if(p+=2,j===e.charAt(p-1))return l("End of comment missing");var v=e.slice(2,p-2);return n+=2,s(v),e=e.slice(p),n+=2,c({type:Me,comment:v})}}function x(){var c=a(),p=u(Be);if(p){if(d(),!u(Oe))return l("property missing ':'");var v=u(_e),ie=c({type:Ue,property:U(p[0].replace(q,j)),value:v?U(v[0].replace(q,j)):j});return u(Le),ie}}function b(){var c=[];f(c);for(var p;p=x();)p!==!1&&(c.push(p),f(c));return c}return h(),b()};function U(e){return e?e.replace(qe,j):j}var Ge=We;function Q(e,t){var r=null;if(!e||typeof e!="string")return r;for(var n,s=Ge(e),a=typeof t=="function",o,l,u=0,h=s.length;u<h;u++)n=s[u],o=n.property,l=n.value,a?t(o,l,n):l&&(r||(r={}),r[o]=l);return r}$.exports=Q;$.exports.default=Q;var Xe=$.exports;const Ke=K(Xe),He={}.hasOwnProperty;function Ve(e,t,r){if(typeof e!="function")throw new TypeError("h is not a function");const n=Qe(e),s=et(e),a=Je(e);let o,l;if(typeof r=="string"||typeof r=="boolean"?(o=r,r={}):(r||(r={}),o=r.prefix),t&&t.type==="root"){const u=t.children[0];l=t.children.length===1&&u.type==="element"?u:{type:"element",tagName:"div",properties:{},children:t.children}}else if(t&&t.type==="element")l=t;else throw new Error("Expected root or element, not `"+(t&&t.type||t)+"`");return Z(e,l,{schema:r.space==="svg"?Y:be,prefix:o==null?n||s||a?"h-":void 0:typeof o=="string"?o:o?"h-":void 0,key:0,react:n,vue:s,vdom:a,hyperscript:Ze(e)})}function Z(e,t,r){const n=r.schema;let s=n,a=t.tagName;const o={},l=[];let u=-1,h;n.space==="html"&&a.toLowerCase()==="svg"&&(s=Y,r.schema=s);for(h in t.properties)t.properties&&He.call(t.properties,h)&&Ye(o,h,t.properties[h],r,a);if(r.vdom&&(s.space==="html"?a=a.toUpperCase():s.space&&(o.namespace=we[s.space])),r.prefix&&(r.key++,o.key=r.prefix+r.key),t.children)for(;++u<t.children.length;){const f=t.children[u];f.type==="element"?l.push(Z(e,f,r)):f.type==="text"&&l.push(f.value)}return r.schema=n,l.length>0?e.call(t,a,o,l):e.call(t,a,o)}function Ye(e,t,r,n,s){const a=je(n.schema,t);let o;r==null||typeof r=="number"&&Number.isNaN(r)||r===!1&&(n.vue||n.vdom||n.hyperscript)||!r&&a.boolean&&(n.vue||n.vdom||n.hyperscript)||(Array.isArray(r)&&(r=a.commaSeparated?Ee(r):ke(r)),a.boolean&&n.hyperscript&&(r=""),a.property==="style"&&typeof r=="string"&&(n.react||n.vue||n.vdom)&&(r=tt(r,s)),n.vue?a.property!=="style"&&(o="attrs"):a.mustUseProperty||(n.vdom?a.property!=="style"&&(o="attributes"):n.hyperscript&&(o="attrs")),o?e[o]=Object.assign(e[o]||{},{[a.attribute]:r}):a.space&&n.react?e[Ce[a.property]||a.property]=r:e[a.attribute]=r)}function Qe(e){const t=e("div",{});return!!(t&&("_owner"in t||"_store"in t)&&(t.key===void 0||t.key===null))}function Ze(e){return"context"in e&&"cleanup"in e}function Je(e){return e("div",{}).type==="VirtualNode"}function et(e){const t=e("div",{});return!!(t&&t.context&&t.context._isVue)}function tt(e,t){const r={};try{Ke(e,(n,s)=>{n.slice(0,4)==="-ms-"&&(n="ms-"+n.slice(4)),r[n.replace(/-([a-z])/g,(a,o)=>o.toUpperCase())]=s})}catch(n){const s=n;throw s.message=t+"[style]"+s.message.slice(9),s}return r}var nt=J;function J(e){if(typeof e=="string")return at(e);if(e==null)return st;if(typeof e=="object")return("length"in e?ot:it)(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function rt(e){for(var t=[],r=e.length,n=-1;++n<r;)t[n]=J(e[n]);return t}function it(e){return t;function t(r){var n;for(n in e)if(r[n]!==e[n])return!1;return!0}}function ot(e){var t=rt(e),r=t.length;return n;function n(){for(var s=-1;++s<r;)if(t[s].apply(this,arguments))return!0;return!1}}function at(e){return t;function t(r){return!!(r&&r.type===e)}}function st(){return!0}var lt=S,ct=nt,ee=!0,te="skip",C=!1;S.CONTINUE=ee;S.SKIP=te;S.EXIT=C;function S(e,t,r,n){var s;typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null),s=ct(t),a(e,null,[]);function a(l,u,h){var f=[],d;return(!t||s(l,u,h[h.length-1]||null))&&(f=W(r(l,h)),f[0]===C)?f:l.children&&f[0]!==te?(d=W(o(l.children,h.concat(l))),d[0]===C?d:f):f}function o(l,u){for(var h=-1,f=n?-1:1,d=(n?l.length:h)+f,x;d>h&&d<l.length;){if(x=a(l[d],d,u),x[0]===C)return x;d=typeof x[1]=="number"?x[1]:d+f}}}function W(e){return e!==null&&typeof e=="object"&&"length"in e?e:typeof e=="number"?[ee,e]:[e]}var pt=R,T=lt,ut=T.CONTINUE,dt=T.SKIP,ft=T.EXIT;R.CONTINUE=ut;R.SKIP=dt;R.EXIT=ft;function R(e,t,r,n){typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null),T(e,t,s,n);function s(a,o){var l=o[o.length-1],u=l?l.children.indexOf(a):null;return r(a,u,l)}}var mt=pt,ht=Object.prototype.hasOwnProperty,D={align:"text-align",valign:"vertical-align",height:"height",width:"width"},xt=function(t){return mt(t,"element",gt),t};function gt(e){if(!(e.tagName!=="tr"&&e.tagName!=="td"&&e.tagName!=="th")){var t,r;for(t in D)!ht.call(D,t)||e.properties[t]===void 0||(r=D[t],yt(e,r,e.properties[t]),delete e.properties[t])}}function yt(e,t,r){var n=(e.properties.style||"").trim();n&&!/;\s*/.test(n)&&(n+=";"),n&&(n+=" ");var s=n+t+": "+r+";";e.properties.style=s}const vt=K(xt);function bt(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}const wt={}.hasOwnProperty,jt=new Set(["table","thead","tbody","tfoot","tr"]);function Et(e){if(!e||typeof e.createElement!="function")throw new TypeError("createElement is not a function");const t=e.createElement,r=e.fixTableCellAlign!==!1;Object.assign(this,{Compiler:n});function n(a){let o=Ve(s,r?vt(a):a,e.prefix);return a.type==="root"?(o=o&&typeof o=="object"&&"type"in o&&"props"in o&&o.type==="div"&&(a.children.length!==1||a.children[0].type!=="element")?o.props.children:[o],t(e.Fragment||"div",{},o)):o}function s(a,o,l){if(l&&jt.has(a)&&(l=l.filter(u=>!bt(u))),e.components&&wt.call(e.components,a)){const u=e.components[a];return e.passNode&&typeof u=="function"&&(o=Object.assign({node:this},o)),t(u,o,l)}return t(a,o,l)}}function P({children:e}){return i.jsx(kt,{children:e})}const G="source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !important",kt=k(g)`
74
74
  .highlight pre,
75
75
  pre {
76
76
  border-radius: 5px;
77
77
  }
78
78
  code {
79
- font-family: ${X};
79
+ font-family: ${G};
80
80
  }
81
81
  pre code {
82
82
  font-size: 14px;
83
- font-family: ${X};
83
+ font-family: ${G};
84
84
  }
85
85
 
86
86
  h1,
@@ -104,7 +104,7 @@ import{P as m,n as k,j as i,aK as oe,aL as ae,r as E,B as se,C as le,D as G,g as
104
104
  .anchor {
105
105
  display: none;
106
106
  }
107
- `;P.propTypes={children:m.any.isRequired};P.defaultProps={};function ne({infoList:e=[]}){return i.jsx(g,{className:"info-table",sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"max-content 1fr"},columnGap:4,rowGap:1.5},children:e.map(t=>i.jsxs(i.Fragment,{children:[i.jsx(g,{component:"span",sx:{fontWeight:"bold",whiteSpace:"nowrap"},children:t.key}),i.jsx(g,{component:"span",sx:{marginTop:{xs:-1,md:0}},children:t.value})]}))})}ne.propTypes={infoList:m.arrayOf(m.shape({key:m.string,value:m.string}))};const Ct=e=>e.payment?(e.payment.price||[]).map(r=>r.value||0).every(r=>r===0):!0,Nt=new Et({createElement:E.createElement}).Compiler,w={zh:{appinfo:{name:"应用名",version:"版本号",author:"开发者",description:"描述",community:"社区地址",documentation:"文档手册",support:"服务支持",overview:"概述",requirements:"节点版本要求"}},en:{appinfo:{name:"Name",version:"Version",author:"Author",description:"Description",community:"Community",documentation:"Documentation",support:"Support",overview:"Overview",requirements:"Server requirements"}}};function O({blockletMeta:e,locale:t,handleDescEle:r}){const{data:n}=e,{registryUrl:s,did:a}=n,o=_.getDisplayName({meta:n}),l=ce(()=>s&&a?fetch(L(s,"/api/blocklets",a,"readme")).then(c=>c.json()):null,{refreshDeps:[s,a]}),u=pe(()=>l.data?l.data[t]||l.data.en||l.data[Object.keys(l.data)[0]]:"",[l]),h=n&&n.htmlAst?Nt(n.htmlAst):"",f=Ct(n);let d=y(n,"owner.fullName");if(d){const c=y(n,"owner.did");c&&(d=i.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[d,i.jsx(ue,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:c,compact:!0,size:14,locale:t})]}))}else d=y(n,"author.name");const x=[{key:y(w[t],"appinfo.name"),value:_.getDisplayName({meta:n})},{key:y(w[t],"appinfo.version"),value:n.version},{key:y(w[t],"appinfo.author"),value:d},{type:"description",key:y(w[t],"appinfo.description"),value:n.description}];n.requirements&&x.push({key:y(w[t],"appinfo.requirements"),value:n.requirements.server}),n.community&&x.push({key:y(w[t],"appinfo.community"),value:i.jsx("a",{href:n.community,target:"_blank",rel:"noreferrer",children:n.community})}),n.documentation&&x.push({key:y(w[t],"appinfo.documentation"),value:i.jsx("a",{href:n.documentation,target:"_blank",rel:"noreferrer",children:n.documentation})}),n.support&&x.push({key:y(w[t],"appinfo.support"),value:i.jsx("a",{href:`mailto:${n.support}`,target:"_blank",rel:"noreferrer",children:n.support})}),h&&x.push({key:y(w[t],"appinfo.overview"),value:""});let b;return t==="zh"?b=i.jsxs(i.Fragment,{children:[f?i.jsxs("p",{children:["您可以免费使用 ",i.jsx("b",{children:o}),";"]}):i.jsxs("p",{children:["您需要购买才能使用 ",i.jsx("b",{children:o}),";"]}),i.jsx("p",{children:"在应用启动前,需要选择您的节点;"}),i.jsx("p",{children:"如果您没有节点,我们会引导您创建新的节点;"}),i.jsx("p",{children:"下面为该应用的信息:"})]}):b=i.jsxs(i.Fragment,{children:[f?i.jsxs("p",{children:["You can use ",i.jsx("b",{children:o})," for free;"]}):i.jsxs("p",{children:["You need to purchase before launch ",i.jsx("b",{children:o}),";"]}),i.jsx("p",{children:"Before the blocklet starts, you need to select your Blocklet Server; "}),i.jsx("p",{children:"If you do not have any Blocklet Server, we will guide you to create a new one; "}),i.jsx("p",{children:"Below is the information for the blocklet: "})]}),i.jsxs(Tt,{children:[r||b,i.jsx(ne,{infoList:x}),u?i.jsxs("div",{className:"app-overview",children:[i.jsx(H,{variant:"h5",gutterBottom:!0,children:y(w[t],"appinfo.overview")}),i.jsx(P,{children:i.jsx(St,{component:"div",className:"content-wrapper post-content",children:i.jsx(Ne,{source:u,wrapperElement:{"data-color-mode":"light"},urlTransform:(c,p,v)=>c.startsWith("/")?L(s,c):c})})})]}):h?i.jsx("div",{className:"app-overview",children:h}):null]})}const St=k(H)`
107
+ `;P.propTypes={children:m.any.isRequired};P.defaultProps={};function ne({infoList:e=[]}){return i.jsx(g,{className:"info-table",sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"max-content 1fr"},columnGap:4,rowGap:1.5},children:e.map(t=>i.jsxs(i.Fragment,{children:[i.jsx(g,{component:"span",sx:{fontWeight:"bold",whiteSpace:"nowrap"},children:t.key}),i.jsx(g,{component:"span",sx:{marginTop:{xs:-1,md:0}},children:t.value})]}))})}ne.propTypes={infoList:m.arrayOf(m.shape({key:m.string,value:m.string}))};const Ct=e=>e.payment?(e.payment.price||[]).map(r=>r.value||0).every(r=>r===0):!0,Nt=new Et({createElement:E.createElement}).Compiler,w={zh:{appinfo:{name:"应用名",version:"版本号",author:"开发者",description:"描述",community:"社区地址",documentation:"文档手册",support:"服务支持",overview:"概述",requirements:"节点版本要求"}},en:{appinfo:{name:"Name",version:"Version",author:"Author",description:"Description",community:"Community",documentation:"Documentation",support:"Support",overview:"Overview",requirements:"Server requirements"}}};function B({blockletMeta:e,locale:t,handleDescEle:r}){const{data:n}=e,{registryUrl:s,did:a}=n,o=_.getDisplayName({meta:n}),l=ce(()=>s&&a?fetch(L(s,"/api/blocklets",a,"readme")).then(c=>c.json()):null,{refreshDeps:[s,a]}),u=pe(()=>l.data?l.data[t]||l.data.en||l.data[Object.keys(l.data)[0]]:"",[l]),h=n&&n.htmlAst?Nt(n.htmlAst):"",f=Ct(n);let d=y(n,"owner.fullName");if(d){const c=y(n,"owner.did");c&&(d=i.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[d,i.jsx(ue,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:c,compact:!0,size:14,locale:t})]}))}else d=y(n,"author.name");const x=[{key:y(w[t],"appinfo.name"),value:_.getDisplayName({meta:n})},{key:y(w[t],"appinfo.version"),value:n.version},{key:y(w[t],"appinfo.author"),value:d},{type:"description",key:y(w[t],"appinfo.description"),value:n.description}];n.requirements&&x.push({key:y(w[t],"appinfo.requirements"),value:n.requirements.server}),n.community&&x.push({key:y(w[t],"appinfo.community"),value:i.jsx("a",{href:n.community,target:"_blank",rel:"noreferrer",children:n.community})}),n.documentation&&x.push({key:y(w[t],"appinfo.documentation"),value:i.jsx("a",{href:n.documentation,target:"_blank",rel:"noreferrer",children:n.documentation})}),n.support&&x.push({key:y(w[t],"appinfo.support"),value:i.jsx("a",{href:`mailto:${n.support}`,target:"_blank",rel:"noreferrer",children:n.support})}),h&&x.push({key:y(w[t],"appinfo.overview"),value:""});let b;return t==="zh"?b=i.jsxs(i.Fragment,{children:[f?i.jsxs("p",{children:["您可以免费使用 ",i.jsx("b",{children:o}),";"]}):i.jsxs("p",{children:["您需要购买才能使用 ",i.jsx("b",{children:o}),";"]}),i.jsx("p",{children:"在应用启动前,需要选择您的节点;"}),i.jsx("p",{children:"如果您没有节点,我们会引导您创建新的节点;"}),i.jsx("p",{children:"下面为该应用的信息:"})]}):b=i.jsxs(i.Fragment,{children:[f?i.jsxs("p",{children:["You can use ",i.jsx("b",{children:o})," for free;"]}):i.jsxs("p",{children:["You need to purchase before launch ",i.jsx("b",{children:o}),";"]}),i.jsx("p",{children:"Before the blocklet starts, you need to select your Blocklet Server; "}),i.jsx("p",{children:"If you do not have any Blocklet Server, we will guide you to create a new one; "}),i.jsx("p",{children:"Below is the information for the blocklet: "})]}),i.jsxs(Tt,{children:[r||b,i.jsx(ne,{infoList:x}),u?i.jsxs("div",{className:"app-overview",children:[i.jsx(H,{variant:"h5",gutterBottom:!0,children:y(w[t],"appinfo.overview")}),i.jsx(P,{children:i.jsx(St,{component:"div",className:"content-wrapper post-content",children:i.jsx(Ne,{source:u,wrapperElement:{"data-color-mode":"light"},urlTransform:(c,p,v)=>c.startsWith("/")?L(s,c):c})})})]}):h?i.jsx("div",{className:"app-overview",children:h}):null]})}const St=k(H)`
108
108
  width: 100%;
109
109
  word-wrap: break-word;
110
110
  word-break: break-word;
@@ -152,7 +152,7 @@ import{P as m,n as k,j as i,aK as oe,aL as ae,r as E,B as se,C as le,D as G,g as
152
152
  margin-left: 2em;
153
153
  }
154
154
  }
155
- `;O.propTypes={blockletMeta:m.object.isRequired,locale:m.string.isRequired,handleDescEle:m.node};O.defaultProps={handleDescEle:""};function Rt({...e}){return i.jsxs("div",{...e,style:{width:"100%"},children:[i.jsx("h3",{children:"End User License Agreement for Application"}),i.jsxs("p",{children:["Blocklet Server License Agreement ",de.COPYRIGHT_OWNER," version 2020-08-28"]}),i.jsx("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),i.jsx("p",{children:"暂无"})]})}function Dt(e){var t,r,n,s;return`${((t=e.bundleSource)==null?void 0:t.store)||e.meta.homepage}/assets/${(r=e.meta)==null?void 0:r.did}/${((n=e.meta)==null?void 0:n.logo)||"logo.png"}?v=${(s=e.meta)==null?void 0:s.version}`}function B({installRelated:e,meta:t,show:r,onClose:n,components:s,loading:a}){const{t:o}=V(),l=fe(d=>d.breakpoints.down("md"));if(!r)return null;const u=!a&&s.length===0,h=!a&&s.length!==0,f=40;return i.jsxs(G,{title:o("blocklet.component.relatedComponents",{name:t.title}),maxWidth:!1,fullWidth:!1,onClose:(d,x)=>{x!=="backdropClick"&&n(!1)},PaperProps:{style:l?{width:"100%",height:window.innerHeight}:{maxWidth:500,minWidth:300,width:"80%"}},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:[a&&i.jsx(g,{sx:{marginTop:4,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:i.jsx(g,{sx:{fontSize:32},color:"primary.main",component:N,icon:"line-md:loading-loop"})}),u&&i.jsx(g,{sx:{textAlign:"center"},children:o("blocklet.component.noDependencies",{name:t.title})}),h&&i.jsx(g,{sx:{marginBottom:2},children:s.map(d=>{if(!d.meta)return null;const{required:x}=d;let b;return e||x?b=1:b=.5,i.jsxs(g,{sx:{opacity:b,padding:"10px 0px",paddingBottom:.5,marginTop:0,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[i.jsx("img",{style:{width:f,height:f,minWidth:f,minHeight:f},src:Dt(d),alt:d.meta.title}),i.jsxs(g,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",flex:1,marginLeft:2},children:[i.jsxs(g,{sx:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var c;window.open(`${((c=d.bundleSource)==null?void 0:c.store)||d.meta.homepage}/blocklets/${d.meta.did}`,"_blank")},children:[d.meta.title,i.jsx(g,{sx:{display:x?"inline-block":"none",fontSize:"12px",fontWeight:"bold",marginLeft:1},children:o("blocklet.component.required")}),i.jsxs(g,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[d.meta.version,i.jsx(g,{className:"link-icon",icon:"fluent:open-20-filled",component:N,sx:{color:"primary.main",fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.1s"}})]})]}),i.jsx(g,{sx:{marginTop:0,opacity:.7},children:d.meta.description})]})]},d.meta.did)})})]})}B.propTypes={meta:m.object,show:m.bool,onClose:m.func.isRequired,installRelated:m.func,components:m.array.isRequired,loading:m.bool.isRequired};B.defaultProps={meta:null,show:!1,installRelated:!1};function Ft(e){return e&&(e.registryUrl||e.homepage)&&e.did?`${e.registryUrl||e.homepage}/api/blocklets/${e==null?void 0:e.did}/blocklet.json`:""}function At(e){const{api:t}=me(),[r]=he(),n=r.get("blocklet_meta_url")||Ft(e),[s,a]=E.useState([]),[o,l]=E.useState(!1);return E.useEffect(()=>{!n||e!=null&&e.inputUrl||(l(!0),t.getDynamicComponents({input:{url:n}}).then(u=>{a(u.components)}).finally(()=>{l(!1)}))},[n]),{components:s,loading:o}}function re({installRelated:e,onChangeInstallRelated:t,meta:r,onClickNext:n,handleDescEle:s}){const a=xe(),{t:o,locale:l}=V(),[u,h]=E.useState(!1),{components:f,loading:d}=At(r),x=n||(()=>{a(`/launch-blocklet/install${window.location.search}`)}),b=()=>{h(!0)},c=()=>{h(!1)};return i.jsxs(It,{children:[i.jsx("div",{className:"app-content",children:i.jsx("div",{className:"agreement",children:i.jsx("div",{className:"agreement-content",children:i.jsx(O,{blockletMeta:{data:r},locale:l,handleDescEle:s})})})}),i.jsxs(g,{className:"agreement-bottom",sx:{"> .agreement-loading":{color:"primary.main"}},children:[d?i.jsx(N,{className:"agreement-loading",icon:"line-md:loading-loop",style:{fontSize:42,transform:"scale(0.6)"}}):null,t&&(f!=null&&f.length)?i.jsxs(g,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[i.jsx(ge,{sx:{mr:.5},checked:e,onChange:p=>t(p.currentTarget.checked),control:i.jsx(ye,{}),label:i.jsx("span",{children:o("launchBlocklet.installRelatedComponents")})}),i.jsx(g,{sx:{"> button svg":{color:"primary.main"}},children:i.jsx(ve,{size:"small",onClick:b,children:i.jsx(N,{icon:"octicon:package-dependencies-16"})})})]}):null,i.jsx("div",{className:"button-container","data-cy":"agree-all",children:i.jsx(I,{onContinue:x,description:i.jsx(Rt,{}),texts:{listenName:o("launchBlocklet.license"),buttonNext:o("launchBlocklet.next")}})})]}),i.jsx(B,{installRelated:e,meta:r,show:u,onClose:c,components:f,loading:d})]})}re.propTypes={meta:m.object.isRequired,onClickNext:m.func,handleDescEle:m.node,installRelated:m.bool,onChangeInstallRelated:m.func};re.defaultProps={onClickNext:null,handleDescEle:"",installRelated:!0,onChangeInstallRelated:null};const It=k.div`
155
+ `;B.propTypes={blockletMeta:m.object.isRequired,locale:m.string.isRequired,handleDescEle:m.node};B.defaultProps={handleDescEle:""};function Rt({...e}){return i.jsxs("div",{...e,style:{width:"100%"},children:[i.jsx("h3",{children:"End User License Agreement for Application"}),i.jsxs("p",{children:["Blocklet Server License Agreement ",de.COPYRIGHT_OWNER," version 2020-08-28"]}),i.jsx("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),i.jsx("p",{children:"暂无"})]})}function Dt(e){var t,r,n,s;return`${((t=e.bundleSource)==null?void 0:t.store)||e.meta.homepage}/assets/${(r=e.meta)==null?void 0:r.did}/${((n=e.meta)==null?void 0:n.logo)||"logo.png"}?v=${(s=e.meta)==null?void 0:s.version}`}function O({installRelated:e,meta:t,show:r,onClose:n,components:s,loading:a}){const{t:o}=V(),l=fe(d=>d.breakpoints.down("md"));if(!r)return null;const u=!a&&s.length===0,h=!a&&s.length!==0,f=40;return i.jsxs(X,{title:o("blocklet.component.relatedComponents",{name:t.title}),maxWidth:!1,fullWidth:!1,onClose:(d,x)=>{x!=="backdropClick"&&n(!1)},PaperProps:{style:l?{width:"100%",height:window.innerHeight}:{maxWidth:500,minWidth:300,width:"80%"}},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:[a&&i.jsx(g,{sx:{marginTop:4,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:i.jsx(g,{sx:{fontSize:32},color:"primary.main",component:N,icon:"line-md:loading-loop"})}),u&&i.jsx(g,{sx:{textAlign:"center"},children:o("blocklet.component.noDependencies",{name:t.title})}),h&&i.jsx(g,{sx:{marginBottom:2},children:s.map(d=>{if(!d.meta)return null;const{required:x}=d;let b;return e||x?b=1:b=.5,i.jsxs(g,{sx:{opacity:b,padding:"10px 0px",paddingBottom:.5,marginTop:0,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[i.jsx("img",{style:{width:f,height:f,minWidth:f,minHeight:f},src:Dt(d),alt:d.meta.title}),i.jsxs(g,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",flex:1,marginLeft:2},children:[i.jsxs(g,{sx:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var c;window.open(`${((c=d.bundleSource)==null?void 0:c.store)||d.meta.homepage}/blocklets/${d.meta.did}`,"_blank")},children:[d.meta.title,i.jsx(g,{sx:{display:x?"inline-block":"none",fontSize:"12px",fontWeight:"bold",marginLeft:1},children:o("blocklet.component.required")}),i.jsxs(g,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[d.meta.version,i.jsx(g,{className:"link-icon",icon:"fluent:open-20-filled",component:N,sx:{color:"primary.main",fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.1s"}})]})]}),i.jsx(g,{sx:{marginTop:0,opacity:.7},children:d.meta.description})]})]},d.meta.did)})})]})}O.propTypes={meta:m.object,show:m.bool,onClose:m.func.isRequired,installRelated:m.func,components:m.array.isRequired,loading:m.bool.isRequired};O.defaultProps={meta:null,show:!1,installRelated:!1};function Ft(e){return e&&(e.registryUrl||e.homepage)&&e.did?`${e.registryUrl||e.homepage}/api/blocklets/${e==null?void 0:e.did}/blocklet.json`:""}function At(e){const{api:t}=me(),[r]=he(),n=r.get("blocklet_meta_url")||Ft(e),[s,a]=E.useState([]),[o,l]=E.useState(!1);return E.useEffect(()=>{!n||e!=null&&e.inputUrl||(l(!0),t.getDynamicComponents({input:{url:n}}).then(u=>{a(u.components)}).finally(()=>{l(!1)}))},[n]),{components:s,loading:o}}function re({installRelated:e,onChangeInstallRelated:t,meta:r,onClickNext:n,handleDescEle:s}){const a=xe(),{t:o,locale:l}=V(),[u,h]=E.useState(!1),{components:f,loading:d}=At(r),x=n||(()=>{a(`/launch-blocklet/install${window.location.search}`)}),b=()=>{h(!0)},c=()=>{h(!1)};return i.jsxs(It,{children:[i.jsx("div",{className:"app-content",children:i.jsx("div",{className:"agreement",children:i.jsx("div",{className:"agreement-content",children:i.jsx(B,{blockletMeta:{data:r},locale:l,handleDescEle:s})})})}),i.jsxs(g,{className:"agreement-bottom",sx:{"> .agreement-loading":{color:"primary.main"}},children:[d?i.jsx(N,{className:"agreement-loading",icon:"line-md:loading-loop",style:{fontSize:42,transform:"scale(0.6)"}}):null,t&&(f!=null&&f.length)?i.jsxs(g,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[i.jsx(ge,{sx:{mr:.5},checked:e,onChange:p=>t(p.currentTarget.checked),control:i.jsx(ye,{}),label:i.jsx("span",{children:o("launchBlocklet.installRelatedComponents")})}),i.jsx(g,{sx:{"> button svg":{color:"primary.main"}},children:i.jsx(ve,{size:"small",onClick:b,children:i.jsx(N,{icon:"octicon:package-dependencies-16"})})})]}):null,i.jsx("div",{className:"button-container","data-cy":"agree-all",children:i.jsx(I,{onContinue:x,description:i.jsx(Rt,{}),texts:{listenName:o("launchBlocklet.license"),buttonNext:o("launchBlocklet.next")}})})]}),i.jsx(O,{installRelated:e,meta:r,show:u,onClose:c,components:f,loading:d})]})}re.propTypes={meta:m.object.isRequired,onClickNext:m.func,handleDescEle:m.node,installRelated:m.bool,onChangeInstallRelated:m.func};re.defaultProps={onClickNext:null,handleDescEle:"",installRelated:!0,onChangeInstallRelated:null};const It=k.div`
156
156
  display: flex;
157
157
  flex-direction: column;
158
158
  align-items: center;
@@ -0,0 +1 @@
1
+ import{av as a}from"./index-BlbV7Lbg.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
@@ -1 +1 @@
1
- import{bm as A,b as L,a1 as u,d0 as B,bp as $,P as t,j as m,ce as y}from"./index-C1sxwK1q.js";const d=(s,a)=>{var r;let n="?v=";return a?n+=B(a):n+=`${(r=s==null?void 0:s.meta)==null?void 0:r.version}${$(s==null?void 0:s.status)?"~":""}`,n};function P({blocklet:s}){var p,O,g,v;const{inService:a}=A(),n=(p=((s==null?void 0:s.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:p.value,r=(O=((s==null?void 0:s.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:O.value,o=(g=((s==null?void 0:s.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:g.value,i=((v=window.env)==null?void 0:v.apiPrefix)||"/",_=`${u(i,`/blocklet/logo/${a?"":s.meta.did}`)}${d(s,n)}`,f=`${u(i,`/blocklet/logo-rect/${a?"":s.meta.did}`)}${d(s,r)}`,C=`${u(i,`/blocklet/logo-favicon/${a?"":s.meta.did}`)}${d(s,o)}`;return{logoUrl:_,rectLogoUrl:f,faviconUrl:C}}function E({blocklet:s,style:a,size:n,...r}){const{logoUrl:o}=P({blocklet:s}),{variant:i}=r;return m.jsx(y,{variant:i||"square",style:Object.assign({backgroundColor:"transparent",width:n,height:n,borderRadius:10},a),...r,children:m.jsx("img",{src:o,alt:"",style:{width:n}})})}E.propTypes={blocklet:t.object.isRequired,style:t.object,size:t.oneOfType([t.number,t.string])};E.defaultProps={style:{},size:40};export{E as B,P as u};
1
+ import{bm as A,b as L,a1 as u,d0 as B,bp as $,P as t,j as m,ce as y}from"./index-BlbV7Lbg.js";const d=(s,a)=>{var r;let n="?v=";return a?n+=B(a):n+=`${(r=s==null?void 0:s.meta)==null?void 0:r.version}${$(s==null?void 0:s.status)?"~":""}`,n};function P({blocklet:s}){var p,O,g,v;const{inService:a}=A(),n=(p=((s==null?void 0:s.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:p.value,r=(O=((s==null?void 0:s.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:O.value,o=(g=((s==null?void 0:s.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:g.value,i=((v=window.env)==null?void 0:v.apiPrefix)||"/",_=`${u(i,`/blocklet/logo/${a?"":s.meta.did}`)}${d(s,n)}`,f=`${u(i,`/blocklet/logo-rect/${a?"":s.meta.did}`)}${d(s,r)}`,C=`${u(i,`/blocklet/logo-favicon/${a?"":s.meta.did}`)}${d(s,o)}`;return{logoUrl:_,rectLogoUrl:f,faviconUrl:C}}function E({blocklet:s,style:a,size:n,...r}){const{logoUrl:o}=P({blocklet:s}),{variant:i}=r;return m.jsx(y,{variant:i||"square",style:Object.assign({backgroundColor:"transparent",width:n,height:n,borderRadius:10},a),...r,children:m.jsx("img",{src:o,alt:"",style:{width:n}})})}E.propTypes={blocklet:t.object.isRequired,style:t.object,size:t.oneOfType([t.number,t.string])};E.defaultProps={style:{},size:40};export{E as B,P as u};
@@ -1,4 +1,4 @@
1
- import{bm as N,r as u,j as t,A as I,q as B,C as M,O as b,S as R,n as W,as as E,m as f,N as S,T as O,ft as z,F}from"./index-C1sxwK1q.js";import{c as U,v as D,p as G,s as C,M as Z}from"./index-D-L4Ck2v.js";import{E as H}from"./index-i7GCH6dr.js";import{_ as K}from"./useLocalStorage-02uWRCTE.js";import{F as X,S as q}from"./Select-Bmr7GD2T.js";import{I as J}from"./InputLabel-CExB3j6D.js";import{P as Q}from"./Pagination-Bpr_MZG3.js";import"./LastPage-BlukH42P.js";const V=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,Y=/^[a-zA-Z]:\\/;function ee(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return Y.test(e)?!1:V.test(e)}const te=["http","https"],re=["nofollow"],se={};function ae(e){const r=e||se,o=r.protocols||te,n=U(r.test);return function(p){D(p,"element",function(s,i,c){if(s.tagName==="a"&&typeof s.properties.href=="string"&&n(s,i,c)){const a=s.properties.href;if(ee(a)?o.includes(a.slice(0,a.indexOf(":"))):a.startsWith("//")){const l=x(r.content,s),y=l&&!Array.isArray(l)?[l]:l,g=x(r.rel,s)||re,m=typeof g=="string"?G(g):g,d=x(r.target,s),v=x(r.properties,s);if(v&&Object.assign(s.properties,C(v)),m.length>0&&(s.properties.rel=[...m]),d&&(s.properties.target=d),y){const w=x(r.contentProperties,s)||{};s.children.push({type:"element",tagName:"span",properties:C(w),children:C(y)})}}}})}}function x(e,r){return typeof e=="function"?e(r):e}const k=u.createContext({}),{Provider:oe,Consumer:ve}=k;function ne({children:e,scope:r="",categories:o=[],showScope:n,scopeFormatter:p}){const{api:s,info:i}=N(),[c,a]=u.useState([]),[l,y]=u.useState({total:0,pageSize:20,pageCount:0,page:1}),[g,m]=u.useState(!1),[d,v]=K(`audit-log-category-${r}`,"all"),$=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(j=>o.length?j.value==="all"||o.includes(j.value):!0),L=async({page:j=1,silent:_=!0}={})=>{if(!g){_||m(!0);try{const h=await s.getAuditLogs({input:{paging:{page:j},category:d==="all"?"":d,scope:r}});n&&(h.list||[]).forEach(A=>{A.scope!==i.did&&(A.link=`/blocklets/${A.scope}/components`)}),a(h.list),y(h.paging),m(!1)}catch(h){I.error(h.message),m(!1)}}};u.useEffect(()=>{L({page:1,silent:!1})},[]),u.useEffect(()=>{L({page:1,silent:!1})},[d]);const T={loading:g,fetch:L,filter:{category:d,scope:r},categories:$,setCategory:v,data:c,paging:l,showScope:n,scopeFormatter:p};return t.jsx(oe,{value:{auditLogs:T},children:e})}function P(){const{auditLogs:e}=u.useContext(k);return e}const ie=({log:e,info:r,inService:o})=>o?`${F.WELLKNOWN_BLOCKLET_ADMIN_PATH}/members?did=${e.actor.did}`:e.scope===r.did?`/team/members?did=${e.actor.did}`:`/blocklets/${e.scope}/members?did=${e.actor.did}`;function ce({log:e}){var i,c;const{inService:r,info:o}=N(),{showScope:n,scopeFormatter:p=a=>a}=P();if(!e.actor.did)return null;const s=!["blocklet",""].includes(e.actor.role);return t.jsxs(b,{className:"log-entry","data-cy":"log-entry",children:[t.jsx("div",{className:"log-author",children:s?t.jsx(E,{did:e.actor.did,size:36,shape:"circle"}):t.jsx(E,{did:e.actor.did,size:36})}),t.jsxs("div",{className:"log-body",children:[t.jsxs(f,{className:"log-header",color:"textSecondary",component:"p",gutterBottom:!0,display:"flex",alignItems:"center",children:[n&&t.jsx(S,{to:e.link,children:t.jsx(O,{style:{marginRight:8},children:p(e.scope)})}),s?t.jsxs(S,{to:ie({log:e,inService:r,info:o}),target:"_blank",children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]}):t.jsxs("span",{children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]})," ",t.jsx("span",{style:{margin:"0 4px"},children:"-"})," ",e.action]}),t.jsx(f,{className:"log-content",maxWidth:"lg",color:"textPrimary",component:"div","data-color-mode":"light",gutterBottom:!0,children:t.jsx(Z,{source:e.content,rehypePlugins:[[ae,{target:"_blank"}]]})}),t.jsxs(b,{className:"log-meta",variant:"body2",children:[!!e.ip&&t.jsx(f,{component:"span",color:"textSecondary",children:`IP: ${e.ip}`}),!!((i=e.env.os)!=null&&i.name)&&t.jsxs(f,{component:"span",color:"textSecondary",children:[e.env.os.name,"(",e.env.os.version,")"]}),!!((c=e.env.browser)!=null&&c.name)&&t.jsxs(f,{component:"span",color:"textSecondary",children:[e.env.browser.name,"(",e.env.browser.version,")"]}),t.jsx(f,{component:"span",color:"textSecondary",children:t.jsx(z,{value:e.createdAt})})]})]})]})}function le(){const{t:e}=B(),{data:r,loading:o,paging:n,filter:p,categories:s,setCategory:i,fetch:c}=P();return o?t.jsx("div",{style:{textAlign:"center",marginTop:"50px"},children:t.jsx(M,{})}):t.jsxs(pe,{"data-cy":"audit-logs",children:[t.jsx(b,{className:"log-controls",children:t.jsxs(X,{style:{width:"240px"},variant:"outlined",children:[t.jsx(J,{children:e("common.filter")}),t.jsx(q,{"data-cy":"filter-by-category-trigger",value:p.category,onChange:a=>i(a.target.value),fullWidth:!0,label:e("common.category"),disabled:o,children:s.map(a=>t.jsx(R,{value:a.value,"data-cy":`filter-by-category-${a.value}`,children:t.jsx(b,{children:t.jsx("span",{children:a.label})})},a.label))})]})}),r.length===0&&t.jsx(H,{children:e("common.empty")}),r.length>0&&r.map(a=>t.jsx(ce,{log:a},a.id)),n.pageCount>1&&t.jsx(Q,{page:n.page,count:n.pageCount,onChange:(a,l)=>c({page:l}),showFirstButton:!0,showLastButton:!0})]})}function je({scope:e,categories:r,showScope:o,scopeFormatter:n}){return t.jsx(ne,{scope:e,categories:r,showScope:o,scopeFormatter:n,children:t.jsx(le,{})})}const pe=W.div`
1
+ import{bm as N,r as u,j as t,A as I,q as B,C as M,O as b,S as R,n as W,as as E,m as f,N as S,T as O,fy as z,F}from"./index-BlbV7Lbg.js";import{c as U,v as D,p as G,s as C,M as Z}from"./index-D4GRkcdU.js";import{E as H}from"./index-CxOlUKp-.js";import{_ as K}from"./useLocalStorage-DjVTK9Hv.js";import{F as X,S as q}from"./Select-DM4jz5L4.js";import{I as J}from"./InputLabel-BVacxmju.js";import{P as Q}from"./Pagination-BdwJr2l9.js";import"./LastPage-TCg78JGB.js";const V=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,Y=/^[a-zA-Z]:\\/;function ee(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return Y.test(e)?!1:V.test(e)}const te=["http","https"],re=["nofollow"],se={};function ae(e){const r=e||se,o=r.protocols||te,n=U(r.test);return function(p){D(p,"element",function(s,i,c){if(s.tagName==="a"&&typeof s.properties.href=="string"&&n(s,i,c)){const a=s.properties.href;if(ee(a)?o.includes(a.slice(0,a.indexOf(":"))):a.startsWith("//")){const l=x(r.content,s),y=l&&!Array.isArray(l)?[l]:l,g=x(r.rel,s)||re,m=typeof g=="string"?G(g):g,d=x(r.target,s),v=x(r.properties,s);if(v&&Object.assign(s.properties,C(v)),m.length>0&&(s.properties.rel=[...m]),d&&(s.properties.target=d),y){const w=x(r.contentProperties,s)||{};s.children.push({type:"element",tagName:"span",properties:C(w),children:C(y)})}}}})}}function x(e,r){return typeof e=="function"?e(r):e}const k=u.createContext({}),{Provider:oe,Consumer:ve}=k;function ne({children:e,scope:r="",categories:o=[],showScope:n,scopeFormatter:p}){const{api:s,info:i}=N(),[c,a]=u.useState([]),[l,y]=u.useState({total:0,pageSize:20,pageCount:0,page:1}),[g,m]=u.useState(!1),[d,v]=K(`audit-log-category-${r}`,"all"),$=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(j=>o.length?j.value==="all"||o.includes(j.value):!0),L=async({page:j=1,silent:_=!0}={})=>{if(!g){_||m(!0);try{const h=await s.getAuditLogs({input:{paging:{page:j},category:d==="all"?"":d,scope:r}});n&&(h.list||[]).forEach(A=>{A.scope!==i.did&&(A.link=`/blocklets/${A.scope}/components`)}),a(h.list),y(h.paging),m(!1)}catch(h){I.error(h.message),m(!1)}}};u.useEffect(()=>{L({page:1,silent:!1})},[]),u.useEffect(()=>{L({page:1,silent:!1})},[d]);const T={loading:g,fetch:L,filter:{category:d,scope:r},categories:$,setCategory:v,data:c,paging:l,showScope:n,scopeFormatter:p};return t.jsx(oe,{value:{auditLogs:T},children:e})}function P(){const{auditLogs:e}=u.useContext(k);return e}const ie=({log:e,info:r,inService:o})=>o?`${F.WELLKNOWN_BLOCKLET_ADMIN_PATH}/members?did=${e.actor.did}`:e.scope===r.did?`/team/members?did=${e.actor.did}`:`/blocklets/${e.scope}/members?did=${e.actor.did}`;function ce({log:e}){var i,c;const{inService:r,info:o}=N(),{showScope:n,scopeFormatter:p=a=>a}=P();if(!e.actor.did)return null;const s=!["blocklet",""].includes(e.actor.role);return t.jsxs(b,{className:"log-entry","data-cy":"log-entry",children:[t.jsx("div",{className:"log-author",children:s?t.jsx(E,{did:e.actor.did,size:36,shape:"circle"}):t.jsx(E,{did:e.actor.did,size:36})}),t.jsxs("div",{className:"log-body",children:[t.jsxs(f,{className:"log-header",color:"textSecondary",component:"p",gutterBottom:!0,display:"flex",alignItems:"center",children:[n&&t.jsx(S,{to:e.link,children:t.jsx(O,{style:{marginRight:8},children:p(e.scope)})}),s?t.jsxs(S,{to:ie({log:e,inService:r,info:o}),target:"_blank",children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]}):t.jsxs("span",{children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]})," ",t.jsx("span",{style:{margin:"0 4px"},children:"-"})," ",e.action]}),t.jsx(f,{className:"log-content",maxWidth:"lg",color:"textPrimary",component:"div","data-color-mode":"light",gutterBottom:!0,children:t.jsx(Z,{source:e.content,rehypePlugins:[[ae,{target:"_blank"}]]})}),t.jsxs(b,{className:"log-meta",variant:"body2",children:[!!e.ip&&t.jsx(f,{component:"span",color:"textSecondary",children:`IP: ${e.ip}`}),!!((i=e.env.os)!=null&&i.name)&&t.jsxs(f,{component:"span",color:"textSecondary",children:[e.env.os.name,"(",e.env.os.version,")"]}),!!((c=e.env.browser)!=null&&c.name)&&t.jsxs(f,{component:"span",color:"textSecondary",children:[e.env.browser.name,"(",e.env.browser.version,")"]}),t.jsx(f,{component:"span",color:"textSecondary",children:t.jsx(z,{value:e.createdAt})})]})]})]})}function le(){const{t:e}=B(),{data:r,loading:o,paging:n,filter:p,categories:s,setCategory:i,fetch:c}=P();return o?t.jsx("div",{style:{textAlign:"center",marginTop:"50px"},children:t.jsx(M,{})}):t.jsxs(pe,{"data-cy":"audit-logs",children:[t.jsx(b,{className:"log-controls",children:t.jsxs(X,{style:{width:"240px"},variant:"outlined",children:[t.jsx(J,{children:e("common.filter")}),t.jsx(q,{"data-cy":"filter-by-category-trigger",value:p.category,onChange:a=>i(a.target.value),fullWidth:!0,label:e("common.category"),disabled:o,children:s.map(a=>t.jsx(R,{value:a.value,"data-cy":`filter-by-category-${a.value}`,children:t.jsx(b,{children:t.jsx("span",{children:a.label})})},a.label))})]})}),r.length===0&&t.jsx(H,{children:e("common.empty")}),r.length>0&&r.map(a=>t.jsx(ce,{log:a},a.id)),n.pageCount>1&&t.jsx(Q,{page:n.page,count:n.pageCount,onChange:(a,l)=>c({page:l}),showFirstButton:!0,showLastButton:!0})]})}function je({scope:e,categories:r,showScope:o,scopeFormatter:n}){return t.jsx(ne,{scope:e,categories:r,showScope:o,scopeFormatter:n,children:t.jsx(le,{})})}const pe=W.div`
2
2
  .log-controls {
3
3
  display: flex;
4
4
  justify-content: space-between;
@@ -0,0 +1 @@
1
+ import{r as t}from"./index-BlbV7Lbg.js";const e=t.createContext({});function r(){return t.useContext(e)}export{e as B,r as u};
@@ -1 +1 @@
1
- import{a as I}from"./codemirror.es-BvooWNLt.js";import"./index-Ca4ojQR0.js";import"./index-C1sxwK1q.js";var H=Object.defineProperty,L=(k,m)=>H(k,"name",{value:m,configurable:!0});function j(k,m){return m.forEach(function(e){e&&typeof e!="string"&&!Array.isArray(e)&&Object.keys(e).forEach(function(u){if(u!=="default"&&!(u in k)){var n=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(k,u,n.get?n:{enumerable:!0,get:function(){return e[u]}})}})}),Object.freeze(k)}L(j,"_mergeNamespaces");var F={exports:{}};(function(k,m){(function(e){e(I.exports)})(function(e){function u(n){return function(o,a){var r=a.line,s=o.getLine(r);function c(i){for(var l,v=a.ch,p=0;;){var b=v<=0?-1:s.lastIndexOf(i[0],v-1);if(b==-1){if(p==1)break;p=1,v=s.length;continue}if(p==1&&b<a.ch)break;if(l=o.getTokenTypeAt(e.Pos(r,b+1)),!/^(comment|string)/.test(l))return{ch:b+1,tokenType:l,pair:i};v=b-1}}L(c,"findOpening");function h(i){var l=1,v=o.lastLine(),p,b=i.ch,A;e:for(var d=r;d<=v;++d)for(var T=o.getLine(d),P=d==r?b:0;;){var O=T.indexOf(i.pair[0],P),_=T.indexOf(i.pair[1],P);if(O<0&&(O=T.length),_<0&&(_=T.length),P=Math.min(O,_),P==T.length)break;if(o.getTokenTypeAt(e.Pos(d,P+1))==i.tokenType){if(P==O)++l;else if(!--l){p=d,A=P;break e}}++P}return p==null||r==p?null:{from:e.Pos(r,b),to:e.Pos(p,A)}}L(h,"findRange");for(var f=[],t=0;t<n.length;t++){var g=c(n[t]);g&&f.push(g)}f.sort(function(i,l){return i.ch-l.ch});for(var t=0;t<f.length;t++){var y=h(f[t]);if(y)return y}return null}}L(u,"bracketFolding"),e.registerHelper("fold","brace",u([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",u([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",function(n,o){function a(t){if(t<n.firstLine()||t>n.lastLine())return null;var g=n.getTokenAt(e.Pos(t,1));if(/\S/.test(g.string)||(g=n.getTokenAt(e.Pos(t,g.end+1))),g.type!="keyword"||g.string!="import")return null;for(var y=t,i=Math.min(n.lastLine(),t+10);y<=i;++y){var l=n.getLine(y),v=l.indexOf(";");if(v!=-1)return{startCh:g.end,end:e.Pos(y,v)}}}L(a,"hasImport");var r=o.line,s=a(r),c;if(!s||a(r-1)||(c=a(r-2))&&c.end.line==r-1)return null;for(var h=s.end;;){var f=a(h.line+1);if(f==null)break;h=f.end}return{from:n.clipPos(e.Pos(r,s.startCh+1)),to:h}}),e.registerHelper("fold","include",function(n,o){function a(f){if(f<n.firstLine()||f>n.lastLine())return null;var t=n.getTokenAt(e.Pos(f,1));if(/\S/.test(t.string)||(t=n.getTokenAt(e.Pos(f,t.end+1))),t.type=="meta"&&t.string.slice(0,8)=="#include")return t.start+8}L(a,"hasInclude");var r=o.line,s=a(r);if(s==null||a(r-1)!=null)return null;for(var c=r;;){var h=a(c+1);if(h==null)break;++c}return{from:e.Pos(r,s+1),to:n.clipPos(e.Pos(c))}})})})();var S=F.exports,E=Object.freeze(j({__proto__:null,[Symbol.toStringTag]:"Module",default:S},[F.exports]));export{E as b};
1
+ import{a as I}from"./codemirror.es-DIkx1wNL.js";import"./index-B8SfR5SO.js";import"./index-BlbV7Lbg.js";var H=Object.defineProperty,L=(k,m)=>H(k,"name",{value:m,configurable:!0});function j(k,m){return m.forEach(function(e){e&&typeof e!="string"&&!Array.isArray(e)&&Object.keys(e).forEach(function(u){if(u!=="default"&&!(u in k)){var n=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(k,u,n.get?n:{enumerable:!0,get:function(){return e[u]}})}})}),Object.freeze(k)}L(j,"_mergeNamespaces");var F={exports:{}};(function(k,m){(function(e){e(I.exports)})(function(e){function u(n){return function(o,a){var r=a.line,s=o.getLine(r);function c(i){for(var l,v=a.ch,p=0;;){var b=v<=0?-1:s.lastIndexOf(i[0],v-1);if(b==-1){if(p==1)break;p=1,v=s.length;continue}if(p==1&&b<a.ch)break;if(l=o.getTokenTypeAt(e.Pos(r,b+1)),!/^(comment|string)/.test(l))return{ch:b+1,tokenType:l,pair:i};v=b-1}}L(c,"findOpening");function h(i){var l=1,v=o.lastLine(),p,b=i.ch,A;e:for(var d=r;d<=v;++d)for(var T=o.getLine(d),P=d==r?b:0;;){var O=T.indexOf(i.pair[0],P),_=T.indexOf(i.pair[1],P);if(O<0&&(O=T.length),_<0&&(_=T.length),P=Math.min(O,_),P==T.length)break;if(o.getTokenTypeAt(e.Pos(d,P+1))==i.tokenType){if(P==O)++l;else if(!--l){p=d,A=P;break e}}++P}return p==null||r==p?null:{from:e.Pos(r,b),to:e.Pos(p,A)}}L(h,"findRange");for(var f=[],t=0;t<n.length;t++){var g=c(n[t]);g&&f.push(g)}f.sort(function(i,l){return i.ch-l.ch});for(var t=0;t<f.length;t++){var y=h(f[t]);if(y)return y}return null}}L(u,"bracketFolding"),e.registerHelper("fold","brace",u([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",u([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",function(n,o){function a(t){if(t<n.firstLine()||t>n.lastLine())return null;var g=n.getTokenAt(e.Pos(t,1));if(/\S/.test(g.string)||(g=n.getTokenAt(e.Pos(t,g.end+1))),g.type!="keyword"||g.string!="import")return null;for(var y=t,i=Math.min(n.lastLine(),t+10);y<=i;++y){var l=n.getLine(y),v=l.indexOf(";");if(v!=-1)return{startCh:g.end,end:e.Pos(y,v)}}}L(a,"hasImport");var r=o.line,s=a(r),c;if(!s||a(r-1)||(c=a(r-2))&&c.end.line==r-1)return null;for(var h=s.end;;){var f=a(h.line+1);if(f==null)break;h=f.end}return{from:n.clipPos(e.Pos(r,s.startCh+1)),to:h}}),e.registerHelper("fold","include",function(n,o){function a(f){if(f<n.firstLine()||f>n.lastLine())return null;var t=n.getTokenAt(e.Pos(f,1));if(/\S/.test(t.string)||(t=n.getTokenAt(e.Pos(f,t.end+1))),t.type=="meta"&&t.string.slice(0,8)=="#include")return t.start+8}L(a,"hasInclude");var r=o.line,s=a(r);if(s==null||a(r-1)!=null)return null;for(var c=r;;){var h=a(c+1);if(h==null)break;++c}return{from:e.Pos(r,s+1),to:n.clipPos(e.Pos(c))}})})})();var S=F.exports,E=Object.freeze(j({__proto__:null,[Symbol.toStringTag]:"Module",default:S},[F.exports]));export{E as b};
@@ -0,0 +1 @@
1
+ import{bm as x,bG as v,gx as P,a1 as m,aB as $,F as j,gy as E,j as y,as as h,ce as R,P as r}from"./index-BlbV7Lbg.js";function A({blocklet:s,ancestors:p=[]}){var i;const a=x(),{inService:n}=a,o=v(s==null?void 0:s.status)||P(s==null?void 0:s.status),e=`?v=${(i=s==null?void 0:s.meta)==null?void 0:i.version}${o?"~":""}`;let t=n?`${m(E,j.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${e}`:m(a.imgPrefix,"blocklet.png");if(s.source==="registry"&&s.deployedFrom&&s.meta.logo)t=`${m(s.deployedFrom,$(s.meta.bundleDid,s.meta.logo))}${e}`;else{const u=window.env.apiPrefix||"/",d=p.concat(s),g=n?d.slice(1):d;t=`${m(u,`/blocklet/logo-bundle${g.map(c=>`/${c.meta.did}`).join("")}`)}${e}`}return{logoUrl:t,inService:n}}function f({blocklet:s,style:p,size:a,ancestors:n,...o}){const e=x(),{logoUrl:t,inService:i}=A({blocklet:s,ancestors:n}),{variant:u}=o,d=i?()=>{}:c=>{c.target.src=`${e.imgPrefix}/blocklet.png`};let g=y.jsx("img",{src:t,onError:d,alt:s.meta.name,style:{width:a}});return s.meta.logo||(g=y.jsx(h,{did:s.meta.did||"",responsive:!0})),y.jsx(R,{variant:u||"square",style:Object.assign({backgroundColor:"transparent",width:a,height:a,borderRadius:10},p),...o,children:g})}f.propTypes={blocklet:r.object.isRequired,style:r.object,size:r.oneOfType([r.number,r.string]),ancestors:r.array};f.defaultProps={style:{},size:40,ancestors:[]};export{f as B};
@@ -1,4 +1,4 @@
1
- import{j as u,b3 as H,m as L,O as V,P as a,n as Z,b2 as G,r as j,aO as J,ff as K}from"./index-C1sxwK1q.js";function O(t,e,n,s){return parseFloat((e-s*e/t+n).toFixed(2))}function Q(t){[...t.querySelectorAll("*")].forEach(e=>t.removeChild(e))}function U(t){return t.value}function C(t,e){const n=document.createElementNS("http://www.w3.org/2000/svg",t);for(const s in e)n.setAttribute(s,e[s]);return n}function _(t,e,n){if(Q(t),e.length<=1)return;n=n||{},typeof e[0]=="number"&&(e=e.map(o=>({value:o})));const{onmousemove:s}=n,{onmouseout:d}=n,R="interactive"in n?n.interactive:!!s,f=n.spotRadius||2,i=f*2,A=n.cursorWidth||2,r=parseFloat(t.attributes["stroke-width"].value),F=n.fetch||U,p=e.map(o=>F(o)),y=parseFloat(t.attributes.width.value)-i*2,x=parseFloat(t.attributes.height.value),S=x-r*2-i,g=Math.max(...p)===0?1:Math.max(...p),l=-1e3,w=p.length-1,D=y/w,k=[],N=O(g,S,r+f,p[0]);let E=`M${i} ${N}`;p.forEach((o,m)=>{const c=m*D+i,h=O(g,S,r+f,o);k.push(Object.assign({},e[m],{index:m,x:c,y:h})),E+=` L ${c} ${h}`});const W=C("path",{class:"sparkline--line",d:E,fill:"none"}),M=`${E} V ${x} L ${i} ${x} Z`,X=C("path",{class:"sparkline--fill",d:M,stroke:"none"});if(t.appendChild(X),t.appendChild(W),!R)return;const b=C("line",{class:"sparkline--cursor",x1:l,x2:l,y1:0,y2:x,"stroke-width":A}),$=C("circle",{class:"sparkline--spot",cx:l,cy:l,r:f});t.appendChild(b),t.appendChild($);const T=C("rect",{width:t.attributes.width.value,height:t.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});t.appendChild(T),T.addEventListener("mouseout",o=>{b.setAttribute("x1",l),b.setAttribute("x2",l),$.setAttribute("cx",l),d&&d(o)}),T.addEventListener("mousemove",o=>{const m=o.offsetX;let c=k.find(B=>B.x>=m);c||(c=k[w]);const h=k[k.indexOf(c)-1];let v,I;h?(I=h.x+(c.x-h.x)/2,v=m>=I?c:h):v=c;const{x:P}=v,{y:Y}=v;$.setAttribute("cx",P),$.setAttribute("cy",Y),b.setAttribute("x1",P),b.setAttribute("x2",P),s&&s(o,v)})}function q({style:t,title:e,value:n,graph:s,description:d}){return u.jsx(tt,{children:u.jsxs(H,{style:{...t},children:[u.jsx(L,{sx:{fontSize:14},color:"text.secondary",children:e}),u.jsx(L,{variant:"h5",component:"div",mt:1,children:n}),s,!!d&&u.jsx(V,{display:"flex",sx:{fontSize:12,marginTop:3},color:"text.secondary",children:d})]})})}q.propTypes={style:a.object,title:a.node,value:a.node,graph:a.node,description:a.any};q.defaultProps={style:{},title:null,value:null,graph:null,description:null};const tt=Z(G)`
1
+ import{j as u,b3 as H,m as L,O as V,P as a,n as Z,b2 as G,r as j,aO as J,fk as K}from"./index-BlbV7Lbg.js";function O(t,e,n,s){return parseFloat((e-s*e/t+n).toFixed(2))}function Q(t){[...t.querySelectorAll("*")].forEach(e=>t.removeChild(e))}function U(t){return t.value}function C(t,e){const n=document.createElementNS("http://www.w3.org/2000/svg",t);for(const s in e)n.setAttribute(s,e[s]);return n}function _(t,e,n){if(Q(t),e.length<=1)return;n=n||{},typeof e[0]=="number"&&(e=e.map(o=>({value:o})));const{onmousemove:s}=n,{onmouseout:d}=n,R="interactive"in n?n.interactive:!!s,f=n.spotRadius||2,i=f*2,A=n.cursorWidth||2,r=parseFloat(t.attributes["stroke-width"].value),F=n.fetch||U,p=e.map(o=>F(o)),y=parseFloat(t.attributes.width.value)-i*2,x=parseFloat(t.attributes.height.value),S=x-r*2-i,g=Math.max(...p)===0?1:Math.max(...p),l=-1e3,w=p.length-1,D=y/w,k=[],N=O(g,S,r+f,p[0]);let E=`M${i} ${N}`;p.forEach((o,m)=>{const c=m*D+i,h=O(g,S,r+f,o);k.push(Object.assign({},e[m],{index:m,x:c,y:h})),E+=` L ${c} ${h}`});const W=C("path",{class:"sparkline--line",d:E,fill:"none"}),M=`${E} V ${x} L ${i} ${x} Z`,X=C("path",{class:"sparkline--fill",d:M,stroke:"none"});if(t.appendChild(X),t.appendChild(W),!R)return;const b=C("line",{class:"sparkline--cursor",x1:l,x2:l,y1:0,y2:x,"stroke-width":A}),$=C("circle",{class:"sparkline--spot",cx:l,cy:l,r:f});t.appendChild(b),t.appendChild($);const T=C("rect",{width:t.attributes.width.value,height:t.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});t.appendChild(T),T.addEventListener("mouseout",o=>{b.setAttribute("x1",l),b.setAttribute("x2",l),$.setAttribute("cx",l),d&&d(o)}),T.addEventListener("mousemove",o=>{const m=o.offsetX;let c=k.find(B=>B.x>=m);c||(c=k[w]);const h=k[k.indexOf(c)-1];let v,I;h?(I=h.x+(c.x-h.x)/2,v=m>=I?c:h):v=c;const{x:P}=v,{y:Y}=v;$.setAttribute("cx",P),$.setAttribute("cy",Y),b.setAttribute("x1",P),b.setAttribute("x2",P),s&&s(o,v)})}function q({style:t,title:e,value:n,graph:s,description:d}){return u.jsx(tt,{children:u.jsxs(H,{style:{...t},children:[u.jsx(L,{sx:{fontSize:14},color:"text.secondary",children:e}),u.jsx(L,{variant:"h5",component:"div",mt:1,children:n}),s,!!d&&u.jsx(V,{display:"flex",sx:{fontSize:12,marginTop:3},color:"text.secondary",children:d})]})})}q.propTypes={style:a.object,title:a.node,value:a.node,graph:a.node,description:a.any};q.defaultProps={style:{},title:null,value:null,graph:null,description:null};const tt=Z(G)`
2
2
  .card-content {
3
3
  height: 150px;
4
4
  }
@@ -1 +1 @@
1
- import{r as i,f as s,j as t,dd as r,P as c}from"./index-C1sxwK1q.js";function n({children:p,...e}){const{t:o}=i.useContext(s);return t.jsx(r,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...e,children:p})}n.propTypes={children:c.any.isRequired};export{n as C};
1
+ import{r as i,f as s,j as t,dd as r,P as c}from"./index-BlbV7Lbg.js";function n({children:p,...e}){const{t:o}=i.useContext(s);return t.jsx(r,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...e,children:p})}n.propTypes={children:c.any.isRequired};export{n as C};
@@ -1,2 +1,2 @@
1
- import{a as G}from"./codemirror.es-BvooWNLt.js";import"./index-Ca4ojQR0.js";import"./index-C1sxwK1q.js";var H=Object.defineProperty,h=(O,B)=>H(O,"name",{value:B,configurable:!0});function D(O,B){return B.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(d){if(d!=="default"&&!(d in O)){var o=Object.getOwnPropertyDescriptor(n,d);Object.defineProperty(O,d,o.get?o:{enumerable:!0,get:function(){return n[d]}})}})}),Object.freeze(O)}h(D,"_mergeNamespaces");var q={exports:{}};(function(O,B){(function(n){n(G.exports)})(function(n){var d={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},o=n.Pos;n.defineOption("autoCloseBrackets",!1,function(e,t,a){a&&a!=n.Init&&(e.removeKeyMap(y),e.state.closeBrackets=null),t&&(_(b(t,"pairs")),e.state.closeBrackets=t,e.addKeyMap(y))});function b(e,t){return t=="pairs"&&typeof e=="string"?e:typeof e=="object"&&e[t]!=null?e[t]:d[t]}h(b,"getOption");var y={Backspace:$,Enter:z};function _(e){for(var t=0;t<e.length;t++){var a=e.charAt(t),i="'"+a+"'";y[i]||(y[i]=I(a))}}h(_,"ensureBound"),_(d.pairs+"`");function I(e){return function(t){return K(t,e)}}h(I,"handler");function x(e){var t=e.state.closeBrackets;if(!t||t.override)return t;var a=e.getModeAt(e.getCursor());return a.closeBrackets||t}h(x,"getConfig");function $(e){var t=x(e);if(!t||e.getOption("disableInput"))return n.Pass;for(var a=b(t,"pairs"),i=e.listSelections(),r=0;r<i.length;r++){if(!i[r].empty())return n.Pass;var f=j(e,i[r].head);if(!f||a.indexOf(f)%2!=0)return n.Pass}for(var r=i.length-1;r>=0;r--){var l=i[r].head;e.replaceRange("",o(l.line,l.ch-1),o(l.line,l.ch+1),"+delete")}}h($,"handleBackspace");function z(e){var t=x(e),a=t&&b(t,"explode");if(!a||e.getOption("disableInput"))return n.Pass;for(var i=e.listSelections(),r=0;r<i.length;r++){if(!i[r].empty())return n.Pass;var f=j(e,i[r].head);if(!f||a.indexOf(f)%2!=0)return n.Pass}e.operation(function(){var l=e.lineSeparator()||`
1
+ import{a as G}from"./codemirror.es-DIkx1wNL.js";import"./index-B8SfR5SO.js";import"./index-BlbV7Lbg.js";var H=Object.defineProperty,h=(O,B)=>H(O,"name",{value:B,configurable:!0});function D(O,B){return B.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(d){if(d!=="default"&&!(d in O)){var o=Object.getOwnPropertyDescriptor(n,d);Object.defineProperty(O,d,o.get?o:{enumerable:!0,get:function(){return n[d]}})}})}),Object.freeze(O)}h(D,"_mergeNamespaces");var q={exports:{}};(function(O,B){(function(n){n(G.exports)})(function(n){var d={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},o=n.Pos;n.defineOption("autoCloseBrackets",!1,function(e,t,a){a&&a!=n.Init&&(e.removeKeyMap(y),e.state.closeBrackets=null),t&&(_(b(t,"pairs")),e.state.closeBrackets=t,e.addKeyMap(y))});function b(e,t){return t=="pairs"&&typeof e=="string"?e:typeof e=="object"&&e[t]!=null?e[t]:d[t]}h(b,"getOption");var y={Backspace:$,Enter:z};function _(e){for(var t=0;t<e.length;t++){var a=e.charAt(t),i="'"+a+"'";y[i]||(y[i]=I(a))}}h(_,"ensureBound"),_(d.pairs+"`");function I(e){return function(t){return K(t,e)}}h(I,"handler");function x(e){var t=e.state.closeBrackets;if(!t||t.override)return t;var a=e.getModeAt(e.getCursor());return a.closeBrackets||t}h(x,"getConfig");function $(e){var t=x(e);if(!t||e.getOption("disableInput"))return n.Pass;for(var a=b(t,"pairs"),i=e.listSelections(),r=0;r<i.length;r++){if(!i[r].empty())return n.Pass;var f=j(e,i[r].head);if(!f||a.indexOf(f)%2!=0)return n.Pass}for(var r=i.length-1;r>=0;r--){var l=i[r].head;e.replaceRange("",o(l.line,l.ch-1),o(l.line,l.ch+1),"+delete")}}h($,"handleBackspace");function z(e){var t=x(e),a=t&&b(t,"explode");if(!a||e.getOption("disableInput"))return n.Pass;for(var i=e.listSelections(),r=0;r<i.length;r++){if(!i[r].empty())return n.Pass;var f=j(e,i[r].head);if(!f||a.indexOf(f)%2!=0)return n.Pass}e.operation(function(){var l=e.lineSeparator()||`
2
2
  `;e.replaceSelection(l+l,null),P(e,-1),i=e.listSelections();for(var g=0;g<i.length;g++){var k=i[g].head.line;e.indentLine(k,null,!0),e.indentLine(k+1,null,!0)}})}h(z,"handleEnter");function P(e,t){for(var a=[],i=e.listSelections(),r=0,f=0;f<i.length;f++){var l=i[f];l.head==e.getCursor()&&(r=f);var g=l.head.ch||t>0?{line:l.head.line,ch:l.head.ch+t}:{line:l.head.line-1};a.push({anchor:g,head:g})}e.setSelections(a,r)}h(P,"moveSel");function F(e){var t=n.cmpPos(e.anchor,e.head)>0;return{anchor:new o(e.anchor.line,e.anchor.ch+(t?-1:1)),head:new o(e.head.line,e.head.ch+(t?1:-1))}}h(F,"contractSelection");function K(e,t){var a=x(e);if(!a||e.getOption("disableInput"))return n.Pass;var i=b(a,"pairs"),r=i.indexOf(t);if(r==-1)return n.Pass;for(var f=b(a,"closeBefore"),l=b(a,"triples"),g=i.charAt(r+1)==t,k=e.listSelections(),R=r%2==0,c,E=0;E<k.length;E++){var N=k[E],s=N.head,p,A=e.getRange(s,o(s.line,s.ch+1));if(R&&!N.empty())p="surround";else if((g||!R)&&A==t)g&&L(e,s)?p="both":l.indexOf(t)>=0&&e.getRange(s,o(s.line,s.ch+3))==t+t+t?p="skipThree":p="skip";else if(g&&s.ch>1&&l.indexOf(t)>=0&&e.getRange(o(s.line,s.ch-2),s)==t+t){if(s.ch>2&&/\bstring/.test(e.getTokenTypeAt(o(s.line,s.ch-2))))return n.Pass;p="addFour"}else if(g){var W=s.ch==0?" ":e.getRange(o(s.line,s.ch-1),s);if(!n.isWordChar(A)&&W!=t&&!n.isWordChar(W))p="both";else return n.Pass}else if(R&&(A.length===0||/\s/.test(A)||f.indexOf(A)>-1))p="both";else return n.Pass;if(!c)c=p;else if(c!=p)return n.Pass}var S=r%2?i.charAt(r-1):t,w=r%2?t:i.charAt(r+1);e.operation(function(){if(c=="skip")P(e,1);else if(c=="skipThree")P(e,3);else if(c=="surround"){for(var u=e.getSelections(),v=0;v<u.length;v++)u[v]=S+u[v]+w;e.replaceSelections(u,"around"),u=e.listSelections().slice();for(var v=0;v<u.length;v++)u[v]=F(u[v]);e.setSelections(u)}else c=="both"?(e.replaceSelection(S+w,null),e.triggerElectric(S+w),P(e,-1)):c=="addFour"&&(e.replaceSelection(S+S+S+S,"before"),P(e,1))})}h(K,"handleChar");function j(e,t){var a=e.getRange(o(t.line,t.ch-1),o(t.line,t.ch+1));return a.length==2?a:null}h(j,"charsAround");function L(e,t){var a=e.getTokenAt(o(t.line,t.ch+1));return/\bstring/.test(a.type)&&a.start==t.ch&&(t.ch==0||!/\bstring/.test(e.getTokenTypeAt(t)))}h(L,"stringStartsAfter")})})();var J=q.exports,V=Object.freeze(D({__proto__:null,[Symbol.toStringTag]:"Module",default:J},[q.exports]));export{V as c};
@@ -1,4 +1,4 @@
1
- import{c as su}from"./index-Ca4ojQR0.js";import"./index-C1sxwK1q.js";var uu=Object.defineProperty,u=(ht,ei)=>uu(ht,"name",{value:ei,configurable:!0});function Ks(ht,ei){return ei.forEach(function(z){z&&typeof z!="string"&&!Array.isArray(z)&&Object.keys(z).forEach(function(Ne){if(Ne!=="default"&&!(Ne in ht)){var Ce=Object.getOwnPropertyDescriptor(z,Ne);Object.defineProperty(ht,Ne,Ce.get?Ce:{enumerable:!0,get:function(){return z[Ne]}})}})}),Object.freeze(ht)}u(Ks,"_mergeNamespaces");var Al={exports:{}};(function(ht,ei){(function(z,Ne){ht.exports=Ne()})(su,function(){var z=navigator.userAgent,Ne=navigator.platform,Ce=/gecko\/\d/i.test(z),Ol=/MSIE \d/.test(z),Nl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(z),ti=/Edge\/(\d+)/.exec(z),N=Ol||Nl||ti,I=N&&(Ol?document.documentMode||6:+(ti||Nl)[1]),oe=!ti&&/WebKit\//.test(z),_s=oe&&/Qt\/\d+\.\d+/.test(z),ri=!ti&&/Chrome\//.test(z),Te=/Opera\//.test(z),ii=/Apple Computer/.test(navigator.vendor),Xs=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(z),Ys=/PhantomJS/.test(z),hr=ii&&(/Mobile\/\w+/.test(z)||navigator.maxTouchPoints>2),ni=/Android/.test(z),dr=hr||ni||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(z),Se=hr||/Mac/.test(Ne),qs=/\bCrOS\b/.test(z),Zs=/win/i.test(Ne),dt=Te&&z.match(/Version\/(\d*\.\d*)/);dt&&(dt=Number(dt[1])),dt&&dt>=15&&(Te=!1,oe=!0);var Wl=Se&&(_s||Te&&(dt==null||dt<12.11)),gn=Ce||N&&I>=9;function ct(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}u(ct,"classTest");var pt=u(function(e,t){var i=e.className,r=ct(t).exec(i);if(r){var n=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(n?r[1]+n:"")}},"rmClass");function Be(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}u(Be,"removeChildren");function ve(e,t){return Be(e).appendChild(t)}u(ve,"removeChildrenAndAdd");function T(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),typeof t=="string")n.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)n.appendChild(t[o]);return n}u(T,"elt");function vt(e,t,i,r){var n=T(e,t,i,r);return n.setAttribute("role","presentation"),n}u(vt,"eltP");var gt;document.createRange?gt=u(function(e,t,i,r){var n=document.createRange();return n.setEnd(r||e,i),n.setStart(e,t),n},"range"):gt=u(function(e,t,i){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",i),r.moveStart("character",t),r},"range");function Re(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}u(Re,"contains");function ye(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}u(ye,"activeElt");function Je(e,t){var i=e.className;ct(t).test(i)||(e.className+=(i?" ":"")+t)}u(Je,"addClass");function oi(e,t){for(var i=e.split(" "),r=0;r<i.length;r++)i[r]&&!ct(i[r]).test(t)&&(t+=" "+i[r]);return t}u(oi,"joinClasses");var cr=u(function(e){e.select()},"selectInput");hr?cr=u(function(e){e.selectionStart=0,e.selectionEnd=e.value.length},"selectInput"):N&&(cr=u(function(e){try{e.select()}catch{}},"selectInput"));function li(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}u(li,"bind");function je(e,t,i){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(i!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}u(je,"copyObj");function me(e,t,i,r,n){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=n||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=i-l%i,o=a+1}}u(me,"countColumn");var Ve=u(function(){this.id=null,this.f=null,this.time=0,this.handler=li(this.onTimeout,this)},"Delayed");Ve.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ve.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function ee(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}u(ee,"indexOf");var Hl=50,ai={toString:function(){return"CodeMirror.Pass"}},We={scroll:!1},yn={origin:"*mouse"},pr={origin:"+move"};function si(e,t,i){for(var r=0,n=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||n+l>=t)return r+Math.min(l,t-n);if(n+=o-r,n+=i-n%i,r=o+1,n>=t)return r}}u(si,"findColumn");var ui=[""];function fi(e){for(;ui.length<=e;)ui.push(W(ui)+" ");return ui[e]}u(fi,"spaceStr");function W(e){return e[e.length-1]}u(W,"lst");function vr(e,t){for(var i=[],r=0;r<e.length;r++)i[r]=t(e[r],r);return i}u(vr,"map");function Pl(e,t,i){for(var r=0,n=i(t);r<e.length&&i(e[r])<=n;)r++;e.splice(r,0,t)}u(Pl,"insertSorted");function mn(){}u(mn,"nothing");function bn(e,t){var i;return Object.create?i=Object.create(e):(mn.prototype=e,i=new mn),t&&je(t,i),i}u(bn,"createObj");var Qs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function hi(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Qs.test(e))}u(hi,"isWordCharBasic");function gr(e,t){return t?t.source.indexOf("\\w")>-1&&hi(e)?!0:t.test(e):hi(e)}u(gr,"isWordChar");function xn(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}u(xn,"isEmpty");var Js=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function di(e){return e.charCodeAt(0)>=768&&Js.test(e)}u(di,"isExtendingChar");function Cn(e,t,i){for(;(i<0?t>0:t<e.length)&&di(e.charAt(t));)t+=i;return t}u(Cn,"skipExtendingChars");function Et(e,t,i){for(var r=t>i?-1:1;;){if(t==i)return t;var n=(t+i)/2,o=r<0?Math.ceil(n):Math.floor(n);if(o==t)return e(o)?t:i;e(o)?i=o:t=o+r}}u(Et,"findFirst");function Fl(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var n=!1,o=0;o<e.length;++o){var l=e[o];(l.from<i&&l.to>t||t==i&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,i),l.level==1?"rtl":"ltr",o),n=!0)}n||r(t,i,"ltr")}u(Fl,"iterateBidiSections");var yr=null;function It(e,t,i){var r;yr=null;for(var n=0;n<e.length;++n){var o=e[n];if(o.from<t&&o.to>t)return n;o.to==t&&(o.from!=o.to&&i=="before"?r=n:yr=n),o.from==t&&(o.from!=o.to&&i!="before"?r=n:yr=n)}return r??yr}u(It,"getBidiPartAt");var js=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(f){return f<=247?e.charAt(f):1424<=f&&f<=1524?"R":1536<=f&&f<=1785?t.charAt(f-1536):1774<=f&&f<=2220?"r":8192<=f&&f<=8203?"w":f==8204?"b":"L"}u(i,"charType");var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(f,h,d){this.level=f,this.from=h,this.to=d}return u(s,"BidiSpan"),function(f,h){var d=h=="ltr"?"L":"R";if(f.length==0||h=="ltr"&&!r.test(f))return!1;for(var p=f.length,c=[],v=0;v<p;++v)c.push(i(f.charCodeAt(v)));for(var g=0,m=d;g<p;++g){var b=c[g];b=="m"?c[g]=m:m=b}for(var C=0,x=d;C<p;++C){var S=c[C];S=="1"&&x=="r"?c[C]="n":o.test(S)&&(x=S,S=="r"&&(c[C]="R"))}for(var k=1,L=c[0];k<p-1;++k){var O=c[k];O=="+"&&L=="1"&&c[k+1]=="1"?c[k]="1":O==","&&L==c[k+1]&&(L=="1"||L=="n")&&(c[k]=L),L=O}for(var E=0;E<p;++E){var V=c[E];if(V==",")c[E]="N";else if(V=="%"){var R=void 0;for(R=E+1;R<p&&c[R]=="%";++R);for(var he=E&&c[E-1]=="!"||R<p&&c[R]=="1"?"1":"N",de=E;de<R;++de)c[de]=he;E=R-1}}for(var X=0,ce=d;X<p;++X){var re=c[X];ce=="L"&&re=="1"?c[X]="L":o.test(re)&&(ce=re)}for(var j=0;j<p;++j)if(n.test(c[j])){var Y=void 0;for(Y=j+1;Y<p&&n.test(c[Y]);++Y);for(var G=(j?c[j-1]:d)=="L",pe=(Y<p?c[Y]:d)=="L",ur=G==pe?G?"L":"R":d,ft=j;ft<Y;++ft)c[ft]=ur;j=Y-1}for(var ne=[],Ie,$=0;$<p;)if(l.test(c[$])){var Ml=$;for(++$;$<p&&l.test(c[$]);++$);ne.push(new s(0,Ml,$))}else{var Qe=$,Pt=ne.length,Ft=h=="rtl"?1:0;for(++$;$<p&&c[$]!="L";++$);for(var se=Qe;se<$;)if(a.test(c[se])){Qe<se&&(ne.splice(Pt,0,new s(1,Qe,se)),Pt+=Ft);var fr=se;for(++se;se<$&&a.test(c[se]);++se);ne.splice(Pt,0,new s(2,fr,se)),Pt+=Ft,Qe=se}else++se;Qe<$&&ne.splice(Pt,0,new s(1,Qe,$))}return h=="ltr"&&(ne[0].level==1&&(Ie=f.match(/^\s+/))&&(ne[0].from=Ie[0].length,ne.unshift(new s(0,0,Ie[0].length))),W(ne).level==1&&(Ie=f.match(/\s+$/))&&(W(ne).to-=Ie[0].length,ne.push(new s(0,p-Ie[0].length,p)))),h=="rtl"?ne.reverse():ne}}();function He(e,t){var i=e.order;return i==null&&(i=e.order=js(e.text,t)),i}u(He,"getOrder");var El=[],M=u(function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||El).concat(i)}},"on");function ci(e,t){return e._handlers&&e._handlers[t]||El}u(ci,"getHandlers");function ge(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var r=e._handlers,n=r&&r[t];if(n){var o=ee(n,i);o>-1&&(r[t]=n.slice(0,o).concat(n.slice(o+1)))}}}u(ge,"off");function U(e,t){var i=ci(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n<i.length;++n)i[n].apply(null,r)}u(U,"signal");function q(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),U(e,i||t.type,e,t),pi(t)||t.codemirrorIgnore}u(q,"signalDOMEvent");function Sn(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)ee(i,t[r])==-1&&i.push(t[r])}u(Sn,"signalCursorActivity");function be(e,t){return ci(e,t).length>0}u(be,"hasHandler");function yt(e){e.prototype.on=function(t,i){M(this,t,i)},e.prototype.off=function(t,i){ge(this,t,i)}}u(yt,"eventMixin");function le(e){e.preventDefault?e.preventDefault():e.returnValue=!1}u(le,"e_preventDefault");function wn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}u(wn,"e_stopPropagation");function pi(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}u(pi,"e_defaultPrevented");function Bt(e){le(e),wn(e)}u(Bt,"e_stop");function vi(e){return e.target||e.srcElement}u(vi,"e_target");function Ln(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),Se&&e.ctrlKey&&t==1&&(t=3),t}u(Ln,"e_button");var Vs=function(){if(N&&I<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),kn;function Il(e){if(kn==null){var t=T("span","​");ve(e,T("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(kn=t.offsetWidth<=1&&t.offsetHeight>2&&!(N&&I<8))}var i=kn?T("span","​"):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}u(Il,"zeroWidthElement");var Tn;function Bl(e){if(Tn!=null)return Tn;var t=ve(e,document.createTextNode("AخA")),i=gt(t,0,1).getBoundingClientRect(),r=gt(t,1,2).getBoundingClientRect();return Be(e),!i||i.left==i.right?!1:Tn=r.right-i.right<3}u(Bl,"hasBadBidiRects");var Mn=`
1
+ import{c as su}from"./index-B8SfR5SO.js";import"./index-BlbV7Lbg.js";var uu=Object.defineProperty,u=(ht,ei)=>uu(ht,"name",{value:ei,configurable:!0});function Ks(ht,ei){return ei.forEach(function(z){z&&typeof z!="string"&&!Array.isArray(z)&&Object.keys(z).forEach(function(Ne){if(Ne!=="default"&&!(Ne in ht)){var Ce=Object.getOwnPropertyDescriptor(z,Ne);Object.defineProperty(ht,Ne,Ce.get?Ce:{enumerable:!0,get:function(){return z[Ne]}})}})}),Object.freeze(ht)}u(Ks,"_mergeNamespaces");var Al={exports:{}};(function(ht,ei){(function(z,Ne){ht.exports=Ne()})(su,function(){var z=navigator.userAgent,Ne=navigator.platform,Ce=/gecko\/\d/i.test(z),Ol=/MSIE \d/.test(z),Nl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(z),ti=/Edge\/(\d+)/.exec(z),N=Ol||Nl||ti,I=N&&(Ol?document.documentMode||6:+(ti||Nl)[1]),oe=!ti&&/WebKit\//.test(z),_s=oe&&/Qt\/\d+\.\d+/.test(z),ri=!ti&&/Chrome\//.test(z),Te=/Opera\//.test(z),ii=/Apple Computer/.test(navigator.vendor),Xs=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(z),Ys=/PhantomJS/.test(z),hr=ii&&(/Mobile\/\w+/.test(z)||navigator.maxTouchPoints>2),ni=/Android/.test(z),dr=hr||ni||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(z),Se=hr||/Mac/.test(Ne),qs=/\bCrOS\b/.test(z),Zs=/win/i.test(Ne),dt=Te&&z.match(/Version\/(\d*\.\d*)/);dt&&(dt=Number(dt[1])),dt&&dt>=15&&(Te=!1,oe=!0);var Wl=Se&&(_s||Te&&(dt==null||dt<12.11)),gn=Ce||N&&I>=9;function ct(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}u(ct,"classTest");var pt=u(function(e,t){var i=e.className,r=ct(t).exec(i);if(r){var n=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(n?r[1]+n:"")}},"rmClass");function Be(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}u(Be,"removeChildren");function ve(e,t){return Be(e).appendChild(t)}u(ve,"removeChildrenAndAdd");function T(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),typeof t=="string")n.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)n.appendChild(t[o]);return n}u(T,"elt");function vt(e,t,i,r){var n=T(e,t,i,r);return n.setAttribute("role","presentation"),n}u(vt,"eltP");var gt;document.createRange?gt=u(function(e,t,i,r){var n=document.createRange();return n.setEnd(r||e,i),n.setStart(e,t),n},"range"):gt=u(function(e,t,i){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",i),r.moveStart("character",t),r},"range");function Re(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}u(Re,"contains");function ye(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}u(ye,"activeElt");function Je(e,t){var i=e.className;ct(t).test(i)||(e.className+=(i?" ":"")+t)}u(Je,"addClass");function oi(e,t){for(var i=e.split(" "),r=0;r<i.length;r++)i[r]&&!ct(i[r]).test(t)&&(t+=" "+i[r]);return t}u(oi,"joinClasses");var cr=u(function(e){e.select()},"selectInput");hr?cr=u(function(e){e.selectionStart=0,e.selectionEnd=e.value.length},"selectInput"):N&&(cr=u(function(e){try{e.select()}catch{}},"selectInput"));function li(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}u(li,"bind");function je(e,t,i){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(i!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}u(je,"copyObj");function me(e,t,i,r,n){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=n||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=i-l%i,o=a+1}}u(me,"countColumn");var Ve=u(function(){this.id=null,this.f=null,this.time=0,this.handler=li(this.onTimeout,this)},"Delayed");Ve.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ve.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function ee(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}u(ee,"indexOf");var Hl=50,ai={toString:function(){return"CodeMirror.Pass"}},We={scroll:!1},yn={origin:"*mouse"},pr={origin:"+move"};function si(e,t,i){for(var r=0,n=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||n+l>=t)return r+Math.min(l,t-n);if(n+=o-r,n+=i-n%i,r=o+1,n>=t)return r}}u(si,"findColumn");var ui=[""];function fi(e){for(;ui.length<=e;)ui.push(W(ui)+" ");return ui[e]}u(fi,"spaceStr");function W(e){return e[e.length-1]}u(W,"lst");function vr(e,t){for(var i=[],r=0;r<e.length;r++)i[r]=t(e[r],r);return i}u(vr,"map");function Pl(e,t,i){for(var r=0,n=i(t);r<e.length&&i(e[r])<=n;)r++;e.splice(r,0,t)}u(Pl,"insertSorted");function mn(){}u(mn,"nothing");function bn(e,t){var i;return Object.create?i=Object.create(e):(mn.prototype=e,i=new mn),t&&je(t,i),i}u(bn,"createObj");var Qs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function hi(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Qs.test(e))}u(hi,"isWordCharBasic");function gr(e,t){return t?t.source.indexOf("\\w")>-1&&hi(e)?!0:t.test(e):hi(e)}u(gr,"isWordChar");function xn(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}u(xn,"isEmpty");var Js=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function di(e){return e.charCodeAt(0)>=768&&Js.test(e)}u(di,"isExtendingChar");function Cn(e,t,i){for(;(i<0?t>0:t<e.length)&&di(e.charAt(t));)t+=i;return t}u(Cn,"skipExtendingChars");function Et(e,t,i){for(var r=t>i?-1:1;;){if(t==i)return t;var n=(t+i)/2,o=r<0?Math.ceil(n):Math.floor(n);if(o==t)return e(o)?t:i;e(o)?i=o:t=o+r}}u(Et,"findFirst");function Fl(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var n=!1,o=0;o<e.length;++o){var l=e[o];(l.from<i&&l.to>t||t==i&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,i),l.level==1?"rtl":"ltr",o),n=!0)}n||r(t,i,"ltr")}u(Fl,"iterateBidiSections");var yr=null;function It(e,t,i){var r;yr=null;for(var n=0;n<e.length;++n){var o=e[n];if(o.from<t&&o.to>t)return n;o.to==t&&(o.from!=o.to&&i=="before"?r=n:yr=n),o.from==t&&(o.from!=o.to&&i!="before"?r=n:yr=n)}return r??yr}u(It,"getBidiPartAt");var js=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(f){return f<=247?e.charAt(f):1424<=f&&f<=1524?"R":1536<=f&&f<=1785?t.charAt(f-1536):1774<=f&&f<=2220?"r":8192<=f&&f<=8203?"w":f==8204?"b":"L"}u(i,"charType");var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(f,h,d){this.level=f,this.from=h,this.to=d}return u(s,"BidiSpan"),function(f,h){var d=h=="ltr"?"L":"R";if(f.length==0||h=="ltr"&&!r.test(f))return!1;for(var p=f.length,c=[],v=0;v<p;++v)c.push(i(f.charCodeAt(v)));for(var g=0,m=d;g<p;++g){var b=c[g];b=="m"?c[g]=m:m=b}for(var C=0,x=d;C<p;++C){var S=c[C];S=="1"&&x=="r"?c[C]="n":o.test(S)&&(x=S,S=="r"&&(c[C]="R"))}for(var k=1,L=c[0];k<p-1;++k){var O=c[k];O=="+"&&L=="1"&&c[k+1]=="1"?c[k]="1":O==","&&L==c[k+1]&&(L=="1"||L=="n")&&(c[k]=L),L=O}for(var E=0;E<p;++E){var V=c[E];if(V==",")c[E]="N";else if(V=="%"){var R=void 0;for(R=E+1;R<p&&c[R]=="%";++R);for(var he=E&&c[E-1]=="!"||R<p&&c[R]=="1"?"1":"N",de=E;de<R;++de)c[de]=he;E=R-1}}for(var X=0,ce=d;X<p;++X){var re=c[X];ce=="L"&&re=="1"?c[X]="L":o.test(re)&&(ce=re)}for(var j=0;j<p;++j)if(n.test(c[j])){var Y=void 0;for(Y=j+1;Y<p&&n.test(c[Y]);++Y);for(var G=(j?c[j-1]:d)=="L",pe=(Y<p?c[Y]:d)=="L",ur=G==pe?G?"L":"R":d,ft=j;ft<Y;++ft)c[ft]=ur;j=Y-1}for(var ne=[],Ie,$=0;$<p;)if(l.test(c[$])){var Ml=$;for(++$;$<p&&l.test(c[$]);++$);ne.push(new s(0,Ml,$))}else{var Qe=$,Pt=ne.length,Ft=h=="rtl"?1:0;for(++$;$<p&&c[$]!="L";++$);for(var se=Qe;se<$;)if(a.test(c[se])){Qe<se&&(ne.splice(Pt,0,new s(1,Qe,se)),Pt+=Ft);var fr=se;for(++se;se<$&&a.test(c[se]);++se);ne.splice(Pt,0,new s(2,fr,se)),Pt+=Ft,Qe=se}else++se;Qe<$&&ne.splice(Pt,0,new s(1,Qe,$))}return h=="ltr"&&(ne[0].level==1&&(Ie=f.match(/^\s+/))&&(ne[0].from=Ie[0].length,ne.unshift(new s(0,0,Ie[0].length))),W(ne).level==1&&(Ie=f.match(/\s+$/))&&(W(ne).to-=Ie[0].length,ne.push(new s(0,p-Ie[0].length,p)))),h=="rtl"?ne.reverse():ne}}();function He(e,t){var i=e.order;return i==null&&(i=e.order=js(e.text,t)),i}u(He,"getOrder");var El=[],M=u(function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||El).concat(i)}},"on");function ci(e,t){return e._handlers&&e._handlers[t]||El}u(ci,"getHandlers");function ge(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var r=e._handlers,n=r&&r[t];if(n){var o=ee(n,i);o>-1&&(r[t]=n.slice(0,o).concat(n.slice(o+1)))}}}u(ge,"off");function U(e,t){var i=ci(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n<i.length;++n)i[n].apply(null,r)}u(U,"signal");function q(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),U(e,i||t.type,e,t),pi(t)||t.codemirrorIgnore}u(q,"signalDOMEvent");function Sn(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)ee(i,t[r])==-1&&i.push(t[r])}u(Sn,"signalCursorActivity");function be(e,t){return ci(e,t).length>0}u(be,"hasHandler");function yt(e){e.prototype.on=function(t,i){M(this,t,i)},e.prototype.off=function(t,i){ge(this,t,i)}}u(yt,"eventMixin");function le(e){e.preventDefault?e.preventDefault():e.returnValue=!1}u(le,"e_preventDefault");function wn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}u(wn,"e_stopPropagation");function pi(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}u(pi,"e_defaultPrevented");function Bt(e){le(e),wn(e)}u(Bt,"e_stop");function vi(e){return e.target||e.srcElement}u(vi,"e_target");function Ln(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),Se&&e.ctrlKey&&t==1&&(t=3),t}u(Ln,"e_button");var Vs=function(){if(N&&I<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),kn;function Il(e){if(kn==null){var t=T("span","​");ve(e,T("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(kn=t.offsetWidth<=1&&t.offsetHeight>2&&!(N&&I<8))}var i=kn?T("span","​"):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}u(Il,"zeroWidthElement");var Tn;function Bl(e){if(Tn!=null)return Tn;var t=ve(e,document.createTextNode("AخA")),i=gt(t,0,1).getBoundingClientRect(),r=gt(t,1,2).getBoundingClientRect();return Be(e),!i||i.left==i.right?!1:Tn=r.right-i.right<3}u(Bl,"hasBadBidiRects");var Mn=`
2
2
 
3
3
  b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],r=e.length;t<=r;){var n=e.indexOf(`
4
4
  `,t);n==-1&&(n=e.length);var o=e.slice(t,e.charAt(n-1)=="\r"?n-1:n),l=o.indexOf("\r");l!=-1?(i.push(o.slice(0,l)),t+=l+1):(i.push(o),t=n+1)}return i}:function(e){return e.split(/\r\n?|\n/)},$s=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},eu=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Dn=null;function Rl(e){if(Dn!=null)return Dn;var t=ve(e,T("span","x")),i=t.getBoundingClientRect(),r=gt(t,0,1).getBoundingClientRect();return Dn=Math.abs(i.left-r.left)>1}u(Rl,"hasBadZoomedRects");var An={},Rt={};function zl(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),An[e]=t}u(zl,"defineMode");function Gl(e,t){Rt[e]=t}u(Gl,"defineMIME");function mr(e){if(typeof e=="string"&&Rt.hasOwnProperty(e))e=Rt[e];else if(e&&typeof e.name=="string"&&Rt.hasOwnProperty(e.name)){var t=Rt[e.name];typeof t=="string"&&(t={name:t}),e=bn(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return mr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return mr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}u(mr,"resolveMode");function gi(e,t){t=mr(t);var i=An[t.name];if(!i)return gi(e,"text/plain");var r=i(e,t);if(zt.hasOwnProperty(t.name)){var n=zt[t.name];for(var o in n)n.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=n[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}u(gi,"getMode");var zt={};function Ul(e,t){var i=zt.hasOwnProperty(e)?zt[e]:zt[e]={};je(t,i)}u(Ul,"extendMode");function $e(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var r in t){var n=t[r];n instanceof Array&&(n=n.concat([])),i[r]=n}return i}u($e,"copyState");function yi(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}u(yi,"innerMode");function On(e,t,i){return e.startState?e.startState(t,i):!0}u(On,"startState");var _=u(function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i},"StringStream");_.prototype.eol=function(){return this.pos>=this.string.length},_.prototype.sol=function(){return this.pos==this.lineStart},_.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},_.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},_.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},_.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},_.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},_.prototype.skipToEnd=function(){this.pos=this.string.length},_.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},_.prototype.backUp=function(e){this.pos-=e},_.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=me(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},_.prototype.indentation=function(){return me(this.string,null,this.tabSize)-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},_.prototype.match=function(e,t,i){if(typeof e=="string"){var r=u(function(l){return i?l.toLowerCase():l},"cased"),n=this.string.substr(this.pos,e.length);if(r(n)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},_.prototype.current=function(){return this.string.slice(this.start,this.pos)},_.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},_.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},_.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function w(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var r=0;;++r){var n=i.children[r],o=n.chunkSize();if(t<o){i=n;break}t-=o}return i.lines[t]}u(w,"getLine");function et(e,t,i){var r=[],n=t.line;return e.iter(t.line,i.line+1,function(o){var l=o.text;n==i.line&&(l=l.slice(0,i.ch)),n==t.line&&(l=l.slice(t.ch)),r.push(l),++n}),r}u(et,"getBetween");function mi(e,t,i){var r=[];return e.iter(t,i,function(n){r.push(n.text)}),r}u(mi,"getLines");function Me(e,t){var i=t-e.height;if(i)for(var r=e;r;r=r.parent)r.height+=i}u(Me,"updateLineHeight");function P(e){if(e.parent==null)return null;for(var t=e.parent,i=ee(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var n=0;r.children[n]!=t;++n)i+=r.children[n].chunkSize();return i+t.first}u(P,"lineNo");function tt(e,t){var i=e.first;e:do{for(var r=0;r<e.children.length;++r){var n=e.children[r],o=n.height;if(t<o){e=n;continue e}t-=o,i+=n.chunkSize()}return i}while(!e.lines);for(var l=0;l<e.lines.length;++l){var a=e.lines[l],s=a.height;if(t<s)break;t-=s}return i+l}u(tt,"lineAtHeight");function Gt(e,t){return t>=e.first&&t<e.first+e.size}u(Gt,"isLine");function bi(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}u(bi,"lineNumberFor");function y(e,t,i){if(i===void 0&&(i=null),!(this instanceof y))return new y(e,t,i);this.line=e,this.ch=t,this.sticky=i}u(y,"Pos");function D(e,t){return e.line-t.line||e.ch-t.ch}u(D,"cmp");function xi(e,t){return e.sticky==t.sticky&&D(e,t)==0}u(xi,"equalCursorPos");function Ci(e){return y(e.line,e.ch)}u(Ci,"copyPos");function br(e,t){return D(e,t)<0?t:e}u(br,"maxPos");function xr(e,t){return D(e,t)<0?e:t}u(xr,"minPos");function Nn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}u(Nn,"clipLine");function A(e,t){if(t.line<e.first)return y(e.first,0);var i=e.first+e.size-1;return t.line>i?y(i,w(e,i).text.length):Kl(t,w(e,t.line).text.length)}u(A,"clipPos");function Kl(e,t){var i=e.ch;return i==null||i>t?y(e.line,t):i<0?y(e.line,0):e}u(Kl,"clipToLen");function Wn(e,t){for(var i=[],r=0;r<t.length;r++)i[r]=A(e,t[r]);return i}u(Wn,"clipPosArray");var Si=u(function(e,t){this.state=e,this.lookAhead=t},"SavedContext"),Pe=u(function(e,t,i,r){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1},"Context");Pe.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Pe.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Pe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pe.fromSaved=function(e,t,i){return t instanceof Si?new Pe(e,$e(e.mode,t.state),i,t.lookAhead):new Pe(e,$e(e.mode,t),i)},Pe.prototype.save=function(e){var t=e!==!1?$e(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Si(t,this.maxLookAhead):t};function Hn(e,t,i,r){var n=[e.state.modeGen],o={};Bn(e,t.text,e.doc.mode,i,function(f,h){return n.push(f,h)},o,r);for(var l=i.state,a=u(function(f){i.baseTokens=n;var h=e.state.overlays[f],d=1,p=0;i.state=!0,Bn(e,t.text,h.mode,i,function(c,v){for(var g=d;p<c;){var m=n[d];m>c&&n.splice(d,1,c,n[d+1],m),d+=2,p=Math.min(c,m)}if(v)if(h.opaque)n.splice(g,d-g,c,"overlay "+v),d=g+2;else for(;g<d;g+=2){var b=n[g+1];n[g+1]=(b?b+" ":"")+"overlay "+v}},o),i.state=l,i.baseTokens=null,i.baseTokenPos=1},"loop"),s=0;s<e.state.overlays.length;++s)a(s);return{styles:n,classes:o.bgClass||o.textClass?o:null}}u(Hn,"highlightLine");function Pn(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Ut(e,P(t)),n=t.text.length>e.options.maxHighlightLength&&$e(e.doc.mode,r.state),o=Hn(e,t,r);n&&(r.state=n),t.stateAfter=r.save(!n),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}u(Pn,"getLineStyles");function Ut(e,t,i){var r=e.doc,n=e.display;if(!r.mode.startState)return new Pe(r,!0,t);var o=Xl(e,t,i),l=o>r.first&&w(r,o-1).stateAfter,a=l?Pe.fromSaved(r,l,o):new Pe(r,On(r.mode),o);return r.iter(o,t,function(s){wi(e,s.text,a);var f=a.line;s.stateAfter=f==t-1||f%5==0||f>=n.viewFrom&&f<n.viewTo?a.save():null,a.nextLine()}),i&&(r.modeFrontier=a.line),a}u(Ut,"getContextBefore");function wi(e,t,i,r){var n=e.doc.mode,o=new _(t,e.options.tabSize,i);for(o.start=o.pos=r||0,t==""&&Fn(n,i.state);!o.eol();)Li(n,o,i.state),o.start=o.pos}u(wi,"processLine");function Fn(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var i=yi(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}u(Fn,"callBlankLine");function Li(e,t,i,r){for(var n=0;n<10;n++){r&&(r[0]=yi(e,i).mode);var o=e.token(t,i);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}u(Li,"readToken");var _l=u(function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i},"Token");function En(e,t,i,r){var n=e.doc,o=n.mode,l;t=A(n,t);var a=w(n,t.line),s=Ut(e,t.line,i),f=new _(a.text,e.options.tabSize,s),h;for(r&&(h=[]);(r||f.pos<t.ch)&&!f.eol();)f.start=f.pos,l=Li(o,f,s.state),r&&h.push(new _l(f,l,$e(n.mode,s.state)));return r?h:new _l(f,l,s.state)}u(En,"takeToken");function In(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var r=i[1]?"bgClass":"textClass";t[r]==null?t[r]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+i[2])}return e}u(In,"extractLineClasses");function Bn(e,t,i,r,n,o,l){var a=i.flattenSpans;a==null&&(a=e.options.flattenSpans);var s=0,f=null,h=new _(t,e.options.tabSize,r),d,p=e.options.addModeClass&&[null];for(t==""&&In(Fn(i,r.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(a=!1,l&&wi(e,t,r,h.pos),h.pos=t.length,d=null):d=In(Li(i,h,r.state,p),o),p){var c=p[0].name;c&&(d="m-"+(d?c+" "+d:c))}if(!a||f!=d){for(;s<h.start;)s=Math.min(h.start,s+5e3),n(s,f);f=d}h.start=h.pos}for(;s<h.pos;){var v=Math.min(h.pos,s+5e3);n(v,f),s=v}}u(Bn,"runMode");function Xl(e,t,i){for(var r,n,o=e.doc,l=i?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>l;--a){if(a<=o.first)return o.first;var s=w(o,a-1),f=s.stateAfter;if(f&&(!i||a+(f instanceof Si?f.lookAhead:0)<=o.modeFrontier))return a;var h=me(s.text,null,e.options.tabSize);(n==null||r>h)&&(n=a-1,r=h)}return n}u(Xl,"findStartLine");function Yl(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var i=e.first,r=t-1;r>i;r--){var n=w(e,r).stateAfter;if(n&&(!(n instanceof Si)||r+n.lookAhead<t)){i=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}u(Yl,"retreatFrontier");var ql=!1,ze=!1;function Zl(){ql=!0}u(Zl,"seeReadOnlySpans");function Ql(){ze=!0}u(Ql,"seeCollapsedSpans");function Cr(e,t,i){this.marker=e,this.from=t,this.to=i}u(Cr,"MarkedSpan");function Kt(e,t){if(e)for(var i=0;i<e.length;++i){var r=e[i];if(r.marker==t)return r}}u(Kt,"getMarkedSpanFor");function Jl(e,t){for(var i,r=0;r<e.length;++r)e[r]!=t&&(i||(i=[])).push(e[r]);return i}u(Jl,"removeMarkedSpan");function jl(e,t,i){var r=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}u(jl,"addMarkedSpan");function Vl(e,t,i){var r;if(e)for(var n=0;n<e.length;++n){var o=e[n],l=o.marker,a=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&l.type=="bookmark"&&(!i||!o.marker.insertLeft)){var s=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Cr(l,o.from,s?null:o.to))}}return r}u(Vl,"markedSpansBefore");function $l(e,t,i){var r;if(e)for(var n=0;n<e.length;++n){var o=e[n],l=o.marker,a=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!i||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Cr(l,s?null:o.from-t,o.to==null?null:o.to-t))}}return r}u($l,"markedSpansAfter");function ki(e,t){if(t.full)return null;var i=Gt(e,t.from.line)&&w(e,t.from.line).markedSpans,r=Gt(e,t.to.line)&&w(e,t.to.line).markedSpans;if(!i&&!r)return null;var n=t.from.ch,o=t.to.ch,l=D(t.from,t.to)==0,a=Vl(i,n,l),s=$l(r,o,l),f=t.text.length==1,h=W(t.text).length+(f?n:0);if(a)for(var d=0;d<a.length;++d){var p=a[d];if(p.to==null){var c=Kt(s,p.marker);c?f&&(p.to=c.to==null?null:c.to+h):p.to=n}}if(s)for(var v=0;v<s.length;++v){var g=s[v];if(g.to!=null&&(g.to+=h),g.from==null){var m=Kt(a,g.marker);m||(g.from=h,f&&(a||(a=[])).push(g))}else g.from+=h,f&&(a||(a=[])).push(g)}a&&(a=Rn(a)),s&&s!=a&&(s=Rn(s));var b=[a];if(!f){var C=t.text.length-2,x;if(C>0&&a)for(var S=0;S<a.length;++S)a[S].to==null&&(x||(x=[])).push(new Cr(a[S].marker,null,null));for(var k=0;k<C;++k)b.push(x);b.push(s)}return b}u(ki,"stretchSpansOverChange");function Rn(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}u(Rn,"clearEmptySpans");function ea(e,t,i){var r=null;if(e.iter(t.line,i.line+1,function(c){if(c.markedSpans)for(var v=0;v<c.markedSpans.length;++v){var g=c.markedSpans[v].marker;g.readOnly&&(!r||ee(r,g)==-1)&&(r||(r=[])).push(g)}}),!r)return null;for(var n=[{from:t,to:i}],o=0;o<r.length;++o)for(var l=r[o],a=l.find(0),s=0;s<n.length;++s){var f=n[s];if(!(D(f.to,a.from)<0||D(f.from,a.to)>0)){var h=[s,1],d=D(f.from,a.from),p=D(f.to,a.to);(d<0||!l.inclusiveLeft&&!d)&&h.push({from:f.from,to:a.from}),(p>0||!l.inclusiveRight&&!p)&&h.push({from:a.to,to:f.to}),n.splice.apply(n,h),s+=h.length-3}}return n}u(ea,"removeReadOnlyRanges");function zn(e){var t=e.markedSpans;if(t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}u(zn,"detachMarkedSpans");function Gn(e,t){if(t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}u(Gn,"attachMarkedSpans");function Sr(e){return e.inclusiveLeft?-1:0}u(Sr,"extraLeft");function wr(e){return e.inclusiveRight?1:0}u(wr,"extraRight");function Ti(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var r=e.find(),n=t.find(),o=D(r.from,n.from)||Sr(e)-Sr(t);if(o)return-o;var l=D(r.to,n.to)||wr(e)-wr(t);return l||t.id-e.id}u(Ti,"compareCollapsedMarkers");function Un(e,t){var i=ze&&e.markedSpans,r;if(i)for(var n=void 0,o=0;o<i.length;++o)n=i[o],n.marker.collapsed&&(t?n.from:n.to)==null&&(!r||Ti(r,n.marker)<0)&&(r=n.marker);return r}u(Un,"collapsedSpanAtSide");function Kn(e){return Un(e,!0)}u(Kn,"collapsedSpanAtStart");function Lr(e){return Un(e,!1)}u(Lr,"collapsedSpanAtEnd");function ta(e,t){var i=ze&&e.markedSpans,r;if(i)for(var n=0;n<i.length;++n){var o=i[n];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!r||Ti(r,o.marker)<0)&&(r=o.marker)}return r}u(ta,"collapsedSpanAround");function _n(e,t,i,r,n){var o=w(e,t),l=ze&&o.markedSpans;if(l)for(var a=0;a<l.length;++a){var s=l[a];if(s.marker.collapsed){var f=s.marker.find(0),h=D(f.from,i)||Sr(s.marker)-Sr(n),d=D(f.to,r)||wr(s.marker)-wr(n);if(!(h>=0&&d<=0||h<=0&&d>=0)&&(h<=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?D(f.to,i)>=0:D(f.to,i)>0)||h>=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?D(f.from,r)<=0:D(f.from,r)<0)))return!0}}}u(_n,"conflictingCollapsedRange");function we(e){for(var t;t=Kn(e);)e=t.find(-1,!0).line;return e}u(we,"visualLine");function ra(e){for(var t;t=Lr(e);)e=t.find(1,!0).line;return e}u(ra,"visualLineEnd");function ia(e){for(var t,i;t=Lr(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}u(ia,"visualLineContinued");function Mi(e,t){var i=w(e,t),r=we(i);return i==r?t:P(r)}u(Mi,"visualLineNo");function Xn(e,t){if(t>e.lastLine())return t;var i=w(e,t),r;if(!Ge(e,i))return t;for(;r=Lr(i);)i=r.find(1,!0).line;return P(i)+1}u(Xn,"visualLineEndNo");function Ge(e,t){var i=ze&&t.markedSpans;if(i){for(var r=void 0,n=0;n<i.length;++n)if(r=i[n],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Di(e,t,r))return!0}}}u(Ge,"lineIsHidden");function Di(e,t,i){if(i.to==null){var r=i.marker.find(1,!0);return Di(e,r.line,Kt(r.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var n=void 0,o=0;o<t.markedSpans.length;++o)if(n=t.markedSpans[o],n.marker.collapsed&&!n.marker.widgetNode&&n.from==i.to&&(n.to==null||n.to!=i.from)&&(n.marker.inclusiveLeft||i.marker.inclusiveRight)&&Di(e,t,n))return!0}u(Di,"lineIsHiddenInner");function Fe(e){e=we(e);for(var t=0,i=e.parent,r=0;r<i.lines.length;++r){var n=i.lines[r];if(n==e)break;t+=n.height}for(var o=i.parent;o;i=o,o=i.parent)for(var l=0;l<o.children.length;++l){var a=o.children[l];if(a==i)break;t+=a.height}return t}u(Fe,"heightAtLine");function kr(e){if(e.height==0)return 0;for(var t=e.text.length,i,r=e;i=Kn(r);){var n=i.find(0,!0);r=n.from.line,t+=n.from.ch-n.to.ch}for(r=e;i=Lr(r);){var o=i.find(0,!0);t-=r.text.length-o.from.ch,r=o.to.line,t+=r.text.length-o.to.ch}return t}u(kr,"lineLength");function Ai(e){var t=e.display,i=e.doc;t.maxLine=w(i,i.first),t.maxLineLength=kr(t.maxLine),t.maxLineChanged=!0,i.iter(function(r){var n=kr(r);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=r)})}u(Ai,"findMaxLine");var _t=u(function(e,t,i){this.text=e,Gn(this,t),this.height=i?i(this):1},"Line");_t.prototype.lineNo=function(){return P(this)},yt(_t);function na(e,t,i,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),zn(e),Gn(e,i);var n=r?r(e):1;n!=e.height&&Me(e,n)}u(na,"updateLine");function oa(e){e.parent=null,zn(e)}u(oa,"cleanUpLine");var tu={},ru={};function Yn(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?ru:tu;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}u(Yn,"interpretTokenStyle");function qn(e,t){var i=vt("span",null,null,oe?"padding-right: .1px":null),r={pre:vt("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var n=0;n<=(t.rest?t.rest.length:0);n++){var o=n?t.rest[n-1]:t.line,l=void 0;r.pos=0,r.addToken=aa,Bl(e.display.measure)&&(l=He(o,e.doc.direction))&&(r.addToken=ua(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&P(o);fa(o,r,Pn(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=oi(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=oi(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Il(e.display.measure))),n==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(oe){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return U(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=oi(r.pre.className,r.textClass||"")),r}u(qn,"buildLineContent");function la(e){var t=T("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}u(la,"defaultSpecialCharPlaceholder");function aa(e,t,i,r,n,o,l){if(t){var a=e.splitSpaces?sa(t,e.trailingSpace):t,s=e.cm.state.specialChars,f=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,h),N&&I<9&&(f=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var d=0;;){s.lastIndex=d;var p=s.exec(t),c=p?p.index-d:t.length-d;if(c){var v=document.createTextNode(a.slice(d,d+c));N&&I<9?h.appendChild(T("span",[v])):h.appendChild(v),e.map.push(e.pos,e.pos+c,v),e.col+=c,e.pos+=c}if(!p)break;d+=c+1;var g=void 0;if(p[0]==" "){var m=e.cm.options.tabSize,b=m-e.col%m;g=h.appendChild(T("span",fi(b),"cm-tab")),g.setAttribute("role","presentation"),g.setAttribute("cm-text"," "),e.col+=b}else p[0]=="\r"||p[0]==`
@@ -1,2 +1,2 @@
1
- import{a as G}from"./codemirror.es-BvooWNLt.js";import"./index-Ca4ojQR0.js";import"./index-C1sxwK1q.js";var H=Object.defineProperty,N=(O,A)=>H(O,"name",{value:A,configurable:!0});function q(O,A){return A.forEach(function(s){s&&typeof s!="string"&&!Array.isArray(s)&&Object.keys(s).forEach(function(b){if(b!=="default"&&!(b in O)){var d=Object.getOwnPropertyDescriptor(s,b);Object.defineProperty(O,b,d.get?d:{enumerable:!0,get:function(){return s[b]}})}})}),Object.freeze(O)}N(q,"_mergeNamespaces");var w={exports:{}};(function(O,A){(function(s){s(G.exports)})(function(s){var b={},d=/[^\s\u00a0]/,m=s.Pos,F=s.cmpPos;function P(t){var a=t.search(d);return a==-1?0:a}N(P,"firstNonWS"),s.commands.toggleComment=function(t){t.toggleComment()},s.defineExtension("toggleComment",function(t){t||(t=b);for(var a=this,n=1/0,e=this.listSelections(),g=null,c=e.length-1;c>=0;c--){var l=e[c].from(),r=e[c].to();l.line>=n||(r.line>=n&&(r=m(n,0)),n=l.line,g==null?a.uncomment(l,r,t)?g="un":(a.lineComment(l,r,t),g="line"):g=="un"?a.uncomment(l,r,t):a.lineComment(l,r,t))}});function $(t,a,n){return/\bstring\b/.test(t.getTokenTypeAt(m(a.line,0)))&&!/^[\'\"\`]/.test(n)}N($,"probablyInsideString");function j(t,a){var n=t.getMode();return n.useInnerComments===!1||!n.innerMode?n:t.getModeAt(a)}N(j,"getMode"),s.defineExtension("lineComment",function(t,a,n){n||(n=b);var e=this,g=j(e,t),c=e.getLine(t.line);if(!(c==null||$(e,t,c))){var l=n.lineComment||g.lineComment;if(!l){(n.blockCommentStart||g.blockCommentStart)&&(n.fullLines=!0,e.blockComment(t,a,n));return}var r=Math.min(a.ch!=0||a.line==t.line?a.line+1:a.line,e.lastLine()+1),C=n.padding==null?" ":n.padding,f=n.commentBlankLines||t.line==a.line;e.operation(function(){if(n.indent){for(var v=null,i=t.line;i<r;++i){var u=e.getLine(i),h=u.slice(0,P(u));(v==null||v.length>h.length)&&(v=h)}for(var i=t.line;i<r;++i){var u=e.getLine(i),o=v.length;!f&&!d.test(u)||(u.slice(0,o)!=v&&(o=P(u)),e.replaceRange(v+l+C,m(i,0),m(i,o)))}}else for(var i=t.line;i<r;++i)(f||d.test(e.getLine(i)))&&e.replaceRange(l+C,m(i,0))})}}),s.defineExtension("blockComment",function(t,a,n){n||(n=b);var e=this,g=j(e,t),c=n.blockCommentStart||g.blockCommentStart,l=n.blockCommentEnd||g.blockCommentEnd;if(!c||!l){(n.lineComment||g.lineComment)&&n.fullLines!=!1&&e.lineComment(t,a,n);return}if(!/\bcomment\b/.test(e.getTokenTypeAt(m(t.line,0)))){var r=Math.min(a.line,e.lastLine());r!=t.line&&a.ch==0&&d.test(e.getLine(r))&&--r;var C=n.padding==null?" ":n.padding;t.line>r||e.operation(function(){if(n.fullLines!=!1){var f=d.test(e.getLine(r));e.replaceRange(C+l,m(r)),e.replaceRange(c+C,m(t.line,0));var v=n.blockCommentLead||g.blockCommentLead;if(v!=null)for(var i=t.line+1;i<=r;++i)(i!=r||f)&&e.replaceRange(v+C,m(i,0))}else{var u=F(e.getCursor("to"),a)==0,h=!e.somethingSelected();e.replaceRange(l,a),u&&e.setSelection(h?a:e.getCursor("from"),a),e.replaceRange(c,t)}})}}),s.defineExtension("uncomment",function(t,a,n){n||(n=b);var e=this,g=j(e,t),c=Math.min(a.ch!=0||a.line==t.line?a.line:a.line-1,e.lastLine()),l=Math.min(t.line,c),r=n.lineComment||g.lineComment,C=[],f=n.padding==null?" ":n.padding,v;e:{if(!r)break e;for(var i=l;i<=c;++i){var u=e.getLine(i),h=u.indexOf(r);if(h>-1&&!/comment/.test(e.getTokenTypeAt(m(i,h+1)))&&(h=-1),h==-1&&d.test(u)||h>-1&&d.test(u.slice(0,h)))break e;C.push(u)}if(e.operation(function(){for(var L=l;L<=c;++L){var p=C[L-l],x=p.indexOf(r),k=x+r.length;x<0||(p.slice(k,k+f.length)==f&&(k+=f.length),v=!0,e.replaceRange("",m(L,x),m(L,k)))}}),v)return!0}var o=n.blockCommentStart||g.blockCommentStart,S=n.blockCommentEnd||g.blockCommentEnd;if(!o||!S)return!1;var W=n.blockCommentLead||g.blockCommentLead,E=e.getLine(l),_=E.indexOf(o);if(_==-1)return!1;var I=c==l?E:e.getLine(c),y=I.indexOf(S,c==l?_+o.length:0),z=m(l,_+1),B=m(c,y+1);if(y==-1||!/comment/.test(e.getTokenTypeAt(z))||!/comment/.test(e.getTokenTypeAt(B))||e.getRange(z,B,`
1
+ import{a as G}from"./codemirror.es-DIkx1wNL.js";import"./index-B8SfR5SO.js";import"./index-BlbV7Lbg.js";var H=Object.defineProperty,N=(O,A)=>H(O,"name",{value:A,configurable:!0});function q(O,A){return A.forEach(function(s){s&&typeof s!="string"&&!Array.isArray(s)&&Object.keys(s).forEach(function(b){if(b!=="default"&&!(b in O)){var d=Object.getOwnPropertyDescriptor(s,b);Object.defineProperty(O,b,d.get?d:{enumerable:!0,get:function(){return s[b]}})}})}),Object.freeze(O)}N(q,"_mergeNamespaces");var w={exports:{}};(function(O,A){(function(s){s(G.exports)})(function(s){var b={},d=/[^\s\u00a0]/,m=s.Pos,F=s.cmpPos;function P(t){var a=t.search(d);return a==-1?0:a}N(P,"firstNonWS"),s.commands.toggleComment=function(t){t.toggleComment()},s.defineExtension("toggleComment",function(t){t||(t=b);for(var a=this,n=1/0,e=this.listSelections(),g=null,c=e.length-1;c>=0;c--){var l=e[c].from(),r=e[c].to();l.line>=n||(r.line>=n&&(r=m(n,0)),n=l.line,g==null?a.uncomment(l,r,t)?g="un":(a.lineComment(l,r,t),g="line"):g=="un"?a.uncomment(l,r,t):a.lineComment(l,r,t))}});function $(t,a,n){return/\bstring\b/.test(t.getTokenTypeAt(m(a.line,0)))&&!/^[\'\"\`]/.test(n)}N($,"probablyInsideString");function j(t,a){var n=t.getMode();return n.useInnerComments===!1||!n.innerMode?n:t.getModeAt(a)}N(j,"getMode"),s.defineExtension("lineComment",function(t,a,n){n||(n=b);var e=this,g=j(e,t),c=e.getLine(t.line);if(!(c==null||$(e,t,c))){var l=n.lineComment||g.lineComment;if(!l){(n.blockCommentStart||g.blockCommentStart)&&(n.fullLines=!0,e.blockComment(t,a,n));return}var r=Math.min(a.ch!=0||a.line==t.line?a.line+1:a.line,e.lastLine()+1),C=n.padding==null?" ":n.padding,f=n.commentBlankLines||t.line==a.line;e.operation(function(){if(n.indent){for(var v=null,i=t.line;i<r;++i){var u=e.getLine(i),h=u.slice(0,P(u));(v==null||v.length>h.length)&&(v=h)}for(var i=t.line;i<r;++i){var u=e.getLine(i),o=v.length;!f&&!d.test(u)||(u.slice(0,o)!=v&&(o=P(u)),e.replaceRange(v+l+C,m(i,0),m(i,o)))}}else for(var i=t.line;i<r;++i)(f||d.test(e.getLine(i)))&&e.replaceRange(l+C,m(i,0))})}}),s.defineExtension("blockComment",function(t,a,n){n||(n=b);var e=this,g=j(e,t),c=n.blockCommentStart||g.blockCommentStart,l=n.blockCommentEnd||g.blockCommentEnd;if(!c||!l){(n.lineComment||g.lineComment)&&n.fullLines!=!1&&e.lineComment(t,a,n);return}if(!/\bcomment\b/.test(e.getTokenTypeAt(m(t.line,0)))){var r=Math.min(a.line,e.lastLine());r!=t.line&&a.ch==0&&d.test(e.getLine(r))&&--r;var C=n.padding==null?" ":n.padding;t.line>r||e.operation(function(){if(n.fullLines!=!1){var f=d.test(e.getLine(r));e.replaceRange(C+l,m(r)),e.replaceRange(c+C,m(t.line,0));var v=n.blockCommentLead||g.blockCommentLead;if(v!=null)for(var i=t.line+1;i<=r;++i)(i!=r||f)&&e.replaceRange(v+C,m(i,0))}else{var u=F(e.getCursor("to"),a)==0,h=!e.somethingSelected();e.replaceRange(l,a),u&&e.setSelection(h?a:e.getCursor("from"),a),e.replaceRange(c,t)}})}}),s.defineExtension("uncomment",function(t,a,n){n||(n=b);var e=this,g=j(e,t),c=Math.min(a.ch!=0||a.line==t.line?a.line:a.line-1,e.lastLine()),l=Math.min(t.line,c),r=n.lineComment||g.lineComment,C=[],f=n.padding==null?" ":n.padding,v;e:{if(!r)break e;for(var i=l;i<=c;++i){var u=e.getLine(i),h=u.indexOf(r);if(h>-1&&!/comment/.test(e.getTokenTypeAt(m(i,h+1)))&&(h=-1),h==-1&&d.test(u)||h>-1&&d.test(u.slice(0,h)))break e;C.push(u)}if(e.operation(function(){for(var L=l;L<=c;++L){var p=C[L-l],x=p.indexOf(r),k=x+r.length;x<0||(p.slice(k,k+f.length)==f&&(k+=f.length),v=!0,e.replaceRange("",m(L,x),m(L,k)))}}),v)return!0}var o=n.blockCommentStart||g.blockCommentStart,S=n.blockCommentEnd||g.blockCommentEnd;if(!o||!S)return!1;var W=n.blockCommentLead||g.blockCommentLead,E=e.getLine(l),_=E.indexOf(o);if(_==-1)return!1;var I=c==l?E:e.getLine(c),y=I.indexOf(S,c==l?_+o.length:0),z=m(l,_+1),B=m(c,y+1);if(y==-1||!/comment/.test(e.getTokenTypeAt(z))||!/comment/.test(e.getTokenTypeAt(B))||e.getRange(z,B,`
2
2
  `).indexOf(S)>-1)return!1;var R=E.lastIndexOf(o,t.ch),T=R==-1?-1:E.slice(0,t.ch).indexOf(S,R+o.length);if(R!=-1&&T!=-1&&T+S.length!=t.ch)return!1;T=I.indexOf(S,a.ch);var D=I.slice(a.ch).lastIndexOf(o,T-a.ch);return R=T==-1||D==-1?-1:a.ch+D,T!=-1&&R!=-1&&R!=a.ch?!1:(e.operation(function(){e.replaceRange("",m(c,y-(f&&I.slice(y-f.length,y)==f?f.length:0)),m(c,y+S.length));var L=_+o.length;if(f&&E.slice(L,L+f.length)==f&&(L+=f.length),e.replaceRange("",m(l,_),m(l,L)),W)for(var p=l+1;p<=c;++p){var x=e.getLine(p),k=x.indexOf(W);if(!(k==-1||d.test(x.slice(0,k)))){var M=k+W.length;f&&x.slice(M,M+f.length)==f&&(M+=f.length),e.replaceRange("",m(p,k),m(p,M))}}}),!0)})})})();var J=w.exports,V=Object.freeze(q({__proto__:null,[Symbol.toStringTag]:"Module",default:J},[w.exports]));export{V as c};