@abtnode/webapp 1.16.31 → 1.16.32-beta-04a5da00

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 (200) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{Add-YuGHCX93.js → Add-DAhuXmJ1.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-Dq_r4Xqb.js → ArrowDropDown-C-N10Amf.js} +1 -1
  5. package/dist/assets/{Autocomplete-BVeL1Yo7.js → Autocomplete-CAASvyWi.js} +1 -1
  6. package/dist/assets/{Breadcrumbs-CMvJXPnU.js → Breadcrumbs-UBhuabmW.js} +1 -1
  7. package/dist/assets/{ButtonGroup-Dk1mLt3h.js → ButtonGroup-BCRFvUIs.js} +1 -1
  8. package/dist/assets/{CheckCircle-Cn-sNTZK.js → CheckCircle-B1OfEs-V.js} +1 -1
  9. package/dist/assets/{ChevronLeft-CGibP5P0.js → ChevronLeft-aad23IwV.js} +1 -1
  10. package/dist/assets/{ChevronRight-DakQosJn.js → ChevronRight-BUIMq7Nq.js} +1 -1
  11. package/dist/assets/{Close-DpmK9wKZ.js → Close-BVLxGhqf.js} +1 -1
  12. package/dist/assets/{Delete-ukzbwUp3.js → Delete-BRWePean.js} +1 -1
  13. package/dist/assets/{DeleteOutline-DWR_h5F3.js → DeleteOutline-BNzcbICD.js} +1 -1
  14. package/dist/assets/{Done-CvSFHISO.js → Done-5TItrtsm.js} +1 -1
  15. package/dist/assets/{Edit-qncNJ4F1.js → Edit-nWZYAw8W.js} +1 -1
  16. package/dist/assets/{EditIcon-BU_hSrvO.js → EditIcon-BDQYGQAE.js} +1 -1
  17. package/dist/assets/{ExpandMore-BzXUe6hQ.js → ExpandMore-Xg-kLmr9.js} +1 -1
  18. package/dist/assets/{FilterList-B3q8z3Ai.js → FilterList-BdP9J-wV.js} +1 -1
  19. package/dist/assets/{Google-BFCcXFWg.js → Google-C6UiHFa0.js} +1 -1
  20. package/dist/assets/{Https-c9HUx4_F.js → Https-CgyGFjQZ.js} +1 -1
  21. package/dist/assets/{InputAdornment-CmItI7-a.js → InputAdornment-CLNpGzfL.js} +1 -1
  22. package/dist/assets/{InputLabel-DiJjRX8c.js → InputLabel-DS6GLy5V.js} +1 -1
  23. package/dist/assets/{LastPage-BVKCAcZd.js → LastPage-CwzRxQNH.js} +1 -1
  24. package/dist/assets/{Launch-ixFhPrIJ.js → Launch-qR9d30uC.js} +1 -1
  25. package/dist/assets/{Link-D21zoGLh.js → Link-BI5l28az.js} +1 -1
  26. package/dist/assets/{LoadingButton-C-VdleqP.js → LoadingButton-BfHt3xng.js} +1 -1
  27. package/dist/assets/{LockIcon-DWwaclI2.js → LockIcon-DK1BOt7K.js} +1 -1
  28. package/dist/assets/{Loop-cNToB-Hw.js → Loop-Dt_-Q4IM.js} +1 -1
  29. package/dist/assets/{MoreHoriz-BlJZBfL5.js → MoreHoriz-DcAnQoa0.js} +1 -1
  30. package/dist/assets/{MoreVert-72FLA6F7.js → MoreVert-DIRoN8EP.js} +1 -1
  31. package/dist/assets/{Pagination-BE1Nzv5c.js → Pagination-DtpYqViF.js} +1 -1
  32. package/dist/assets/{Public-DwfXfE3x.js → Public-AVxa4I55.js} +1 -1
  33. package/dist/assets/{SchemaReference.es-DSZJxlJs.js → SchemaReference.es-VhNWmDRq.js} +1 -1
  34. package/dist/assets/{Search-DPoHYjEM.js → Search-BkXnaF-1.js} +1 -1
  35. package/dist/assets/{Select-CZslLkS9.js → Select-_CZTaseY.js} +1 -1
  36. package/dist/assets/{Skeleton-BRE8g3Nr.js → Skeleton-CvnVrBp6.js} +1 -1
  37. package/dist/assets/{Slider-BXYbXQK6.js → Slider-C9M3KOKF.js} +1 -1
  38. package/dist/assets/{Stepper-C2cskkxs.js → Stepper-BPCzoss2.js} +1 -1
  39. package/dist/assets/{TextField-FjVpB8_i.js → TextField-s3PjFgNL.js} +1 -1
  40. package/dist/assets/{ToggleButtonGroup-BLKzb8eH.js → ToggleButtonGroup-uTYhFmax.js} +1 -1
  41. package/dist/assets/{ViewList-BWR6vvRA.js → ViewList-BX_F3ewn.js} +1 -1
  42. package/dist/assets/{actions-DMatOIO9.js → actions-C-KjbqKb.js} +1 -1
  43. package/dist/assets/{actions-DI7j7zyh.js → actions-DvtkfsBD.js} +1 -1
  44. package/dist/assets/{agreement-CLCrNvvc.js → agreement-BlHdQOu0.js} +1 -1
  45. package/dist/assets/api-6dUIEDVl.js +1 -0
  46. package/dist/assets/{app-avatar-Dp7pMuua.js → app-avatar-DaU2r4-K.js} +1 -1
  47. package/dist/assets/ar-BSACs5SN.js +1 -0
  48. package/dist/assets/{audit-logs-BmIfy96g.js → audit-logs-BowEovBa.js} +1 -1
  49. package/dist/assets/blocklet-CjG3S1lO.js +1 -0
  50. package/dist/assets/{brace-fold.es-CjpHnqaJ.js → brace-fold.es-DwwFaaS_.js} +1 -1
  51. package/dist/assets/{bundle-avatar-BOdLBYt_.js → bundle-avatar-DwSCgSDH.js} +1 -1
  52. package/dist/assets/{chart-ChpsdZ5w.js → chart-CWyf6SJc.js} +1 -1
  53. package/dist/assets/{click-to-copy-qnXvH47O.js → click-to-copy-DLb2KMQf.js} +1 -1
  54. package/dist/assets/{closebrackets.es-BAkyQEkz.js → closebrackets.es-oyoaS3zK.js} +1 -1
  55. package/dist/assets/{codemirror.es-DyYoQOkc.js → codemirror.es-g-VpeCS8.js} +1 -1
  56. package/dist/assets/{comment.es-B0snLVGE.js → comment.es-BzEi7FX2.js} +1 -1
  57. package/dist/assets/{config-navigation-qB3p7zP-.js → config-navigation-BXlcxf9z.js} +1 -1
  58. package/dist/assets/de-9vHBMa7b.js +1 -0
  59. package/dist/assets/{delete-confirm-BG1I5J0u.js → delete-confirm-lfp_3VFJ.js} +1 -1
  60. package/dist/assets/{detail-DHBrhfaQ.js → detail-BCfiAWgS.js} +3 -3
  61. package/dist/assets/{dialog.es-C9szbcAW.js → dialog.es-i4ZxISO3.js} +1 -1
  62. package/dist/assets/{download-CIK2Rd3G.js → download-tPUJmguR.js} +1 -1
  63. package/dist/assets/es-Bk9E9Gbf.js +1 -0
  64. package/dist/assets/{foldgutter.es-B7n9tC8r.js → foldgutter.es-CAmpFR3u.js} +1 -1
  65. package/dist/assets/fr-C5fh5fdm.js +1 -0
  66. package/dist/assets/getValidReactChildren-DDuHQUQL.js +1 -0
  67. package/dist/assets/hi-HiGtGtUs.js +1 -0
  68. package/dist/assets/{hint.es-CBGKcJ0H.js → hint.es-RD7Abd4q.js} +1 -1
  69. package/dist/assets/{hint.es2-9eR9yDN0.js → hint.es2-Cdlixz2r.js} +1 -1
  70. package/dist/assets/id-CirrqXGd.js +1 -0
  71. package/dist/assets/{iframe-DeTHfFVQ.js → iframe-CQaZXCQF.js} +1 -1
  72. package/dist/assets/{index-BjH9WeIg.js → index-2urvy1x8.js} +5 -5
  73. package/dist/assets/{index-oVy0lmae.js → index-9rj31wlW.js} +1 -1
  74. package/dist/assets/{index-DJs7uyCT.js → index-AH6-CvHc.js} +1 -1
  75. package/dist/assets/{index-l9RwTjEt.js → index-B1OmL87T.js} +1 -1
  76. package/dist/assets/{index-Dpawm4Ki.js → index-B1ahK-2I.js} +9 -9
  77. package/dist/assets/{index-BZQ6Sdlq.js → index-BBDmvM0V.js} +1 -1
  78. package/dist/assets/{index-Ct2fXBsa.js → index-BE_-Llg6.js} +1 -1
  79. package/dist/assets/{index-DP0iPBNh.js → index-BMAP1AB4.js} +1 -1
  80. package/dist/assets/{index-DDRhCg0G.js → index-BMLIhSHw.js} +1 -1
  81. package/dist/assets/{index-DnBiGZ_C.js → index-BQhzyzVs.js} +1 -1
  82. package/dist/assets/{index-CupkOe8N.js → index-BTZLTyBO.js} +1 -1
  83. package/dist/assets/{index-ClNOtPm5.js → index-BUOXYT7X.js} +3 -3
  84. package/dist/assets/{index-6UQZCJ9z.js → index-BeUG4zog.js} +1 -1
  85. package/dist/assets/{index-KENXSHGT.js → index-BlTu0Z2Q.js} +1 -1
  86. package/dist/assets/{index-qm1NSTqx.js → index-BvofXJ2V.js} +1 -1
  87. package/dist/assets/{index-D3y-Mq0t.js → index-C5X9a7cc.js} +1 -1
  88. package/dist/assets/{index-9o5SBOBg.js → index-CE2nv6FG.js} +1 -1
  89. package/dist/assets/{index-CD-UcGPr.js → index-CGLq3fFG.js} +1 -1
  90. package/dist/assets/{index-y0r_CDsH.js → index-CKq30dWL.js} +1 -1
  91. package/dist/assets/{index-04gl6pO4.js → index-COlbopzU.js} +1 -1
  92. package/dist/assets/{index-TMoSb8Hc.js → index-CTZJ4N-O.js} +1 -1
  93. package/dist/assets/{index-C7m9dmdb.js → index-CYRsRd2j.js} +1 -1
  94. package/dist/assets/{index-CoOBWTGS.js → index-Cb_bB7kh.js} +1 -1
  95. package/dist/assets/index-Ch5YEO2u.js +302 -0
  96. package/dist/assets/{index-TFGhlmJg.js → index-CrPqLlr1.js} +1 -1
  97. package/dist/assets/{index-MRb9RAJK.js → index-CuXg_ZaK.js} +1 -1
  98. package/dist/assets/{index-BIUglsRs.js → index-Cx9r7Bw-.js} +1 -1
  99. package/dist/assets/{index-DNivFScD.js → index-CxZjc-gj.js} +1 -1
  100. package/dist/assets/{index-BuNJbfxi.js → index-DGLsN6jA.js} +1 -1
  101. package/dist/assets/{index-vxqr_A7H.js → index-DGuKpTxy.js} +1 -1
  102. package/dist/assets/{index-3regrC4H.js → index-DHYjjr2A.js} +1 -1
  103. package/dist/assets/{index-7aCT4zwx.js → index-DSc5Ifom.js} +1 -1
  104. package/dist/assets/{index-CJeF5ewa.js → index-DXp6uQcX.js} +1 -1
  105. package/dist/assets/{index-D8rh69R2.js → index-DfSHgbPL.js} +1 -1
  106. package/dist/assets/{index-CG4MmDuK.js → index-DtiWySTZ.js} +1 -1
  107. package/dist/assets/{index-B4nATnEq.js → index-Dw0vqdTl.js} +1 -1
  108. package/dist/assets/{index-DmdQsIN9.js → index-DzfRFxAA.js} +1 -1
  109. package/dist/assets/{index-BwAMNnCK.js → index-GdO1eONN.js} +3 -3
  110. package/dist/assets/{index-CANtQh-8.js → index-JdHcWmyW.js} +1 -1
  111. package/dist/assets/{index-CUnYmZv8.js → index-SR8pTZR1.js} +1 -1
  112. package/dist/assets/{index-BtcEDL3C.js → index-_8dyjhUy.js} +1 -1
  113. package/dist/assets/{index-15yTTSQp.js → index-cJ5JnE9Y.js} +1 -1
  114. package/dist/assets/{index-WbFA75dB.js → index-enOTN9ar.js} +1 -1
  115. package/dist/assets/{index.es-iY0s9qTe.js → index.es-BLLlydG4.js} +1 -1
  116. package/dist/assets/{index.esm-Lol3I37E.js → index.esm-Dn548FrI.js} +1 -1
  117. package/dist/assets/{info-addon.es-U5Ih2Oar.js → info-addon.es-CitM4bMJ.js} +1 -1
  118. package/dist/assets/{info.es-B24BQRjf.js → info.es-U16lfRIu.js} +1 -1
  119. package/dist/assets/{install-from-url-DrOGJntu.js → install-from-url-De3qslJe.js} +1 -1
  120. package/dist/assets/{invitation-B4r3Uuqv.js → invitation-BL8ckd5a.js} +1 -1
  121. package/dist/assets/{is-path-prefix-equal-BsUunwOH.js → is-path-prefix-equal-C7ZHgYDw.js} +1 -1
  122. package/dist/assets/{isEqual-DvDsjofF.js → isEqual-CsmMcSuc.js} +1 -1
  123. package/dist/assets/{item-BQ-lq0dH.js → item-COR877Y7.js} +3 -3
  124. package/dist/assets/ja-BOs7uPqI.js +1 -0
  125. package/dist/assets/{javascript.es-DmenNz71.js → javascript.es-aiCWKHMT.js} +1 -1
  126. package/dist/assets/{jump-to-line.es-BT9o4hFe.js → jump-to-line.es-B57loqaV.js} +1 -1
  127. package/dist/assets/{jump.es-BJH_IFbo.js → jump.es-DN7DQdT-.js} +1 -1
  128. package/dist/assets/ko-D1G4UvNg.js +1 -0
  129. package/dist/assets/{line-C7Ytimyk.js → line-BbyRx9SO.js} +3 -3
  130. package/dist/assets/{lint.es-BsdVLYYK.js → lint.es-BjRh9GWD.js} +1 -1
  131. package/dist/assets/{lint.es2-CT9E8RI5.js → lint.es2-BE-_vzHy.js} +1 -1
  132. package/dist/assets/{lint.es3-CjbW7OcU.js → lint.es3-CLLx2W8W.js} +1 -1
  133. package/dist/assets/{list-header-C1ycqwNT.js → list-header-C7QBrUa7.js} +1 -1
  134. package/dist/assets/{log-CrPoPCZq.js → log-BEbnTZZk.js} +1 -1
  135. package/dist/assets/{lottie-E7kaZ5f2.js → lottie-CtZDSDCx.js} +1 -1
  136. package/dist/assets/{matchbrackets.es-Bdv2zR-T.js → matchbrackets.es--bW5AU6Z.js} +1 -1
  137. package/dist/assets/{memory-Br7PUWs3.js → memory-CLAyz0qg.js} +1 -1
  138. package/dist/assets/{mode.es-C0DC5igF.js → mode.es-DfELLuC7.js} +1 -1
  139. package/dist/assets/{mode.es2-BvMpbvGY.js → mode.es2-BSqgBS-A.js} +1 -1
  140. package/dist/assets/{mode.es3-BzN1VyV9.js → mode.es3-CkjBPJwA.js} +1 -1
  141. package/dist/assets/{onlineParser.es-DhWzlYWG.js → onlineParser.es-CjDm9qzw.js} +1 -1
  142. package/dist/assets/{overview-RRUNlHLn.js → overview-D6hkcgGB.js} +1 -1
  143. package/dist/assets/pt-CcFeyma6.js +1 -0
  144. package/dist/assets/{react-Cw_CkYN1.js → react-BID-V9dy.js} +20 -20
  145. package/dist/assets/{redux-B9BtMJgi.js → redux-_AC4VJGq.js} +1 -1
  146. package/dist/assets/{resource-dialog-0uswwg4x.js → resource-dialog-3h3yAvkC.js} +1 -1
  147. package/dist/assets/ru-OymXgLUI.js +1 -0
  148. package/dist/assets/{runtime-C6dWdPqY.js → runtime-Bb4UUdI0.js} +1 -1
  149. package/dist/assets/{schema-rBztjvAB.js → schema-BY5sl2-H.js} +1 -1
  150. package/dist/assets/sdk-DWrnJTtv.js +1 -0
  151. package/dist/assets/{search.es-lkmhiqmF.js → search.es-DFzVaahw.js} +1 -1
  152. package/dist/assets/{searchcursor.es-CyKx0v-U.js → searchcursor.es-B6izKcHD.js} +1 -1
  153. package/dist/assets/service-DUfhniW5.js +1 -0
  154. package/dist/assets/{shorten-label-MAGXebJW.js → shorten-label-BVjBo-Di.js} +1 -1
  155. package/dist/assets/{show-hint.es-DiObn3_W.js → show-hint.es-8Vjxa886.js} +1 -1
  156. package/dist/assets/{slicedToArray-Cd-fJo2i.js → slicedToArray-9D5F9PAz.js} +1 -1
  157. package/dist/assets/{spaces-q5OlP__P.js → spaces-oE7wS1Bm.js} +1 -1
  158. package/dist/assets/{status-93gUV3__.js → status-Ca8qwT5I.js} +1 -1
  159. package/dist/assets/{sublime.es-CaUPtnXc.js → sublime.es-s81PLoJW.js} +1 -1
  160. package/dist/assets/{switch-control-Dd1suGf_.js → switch-control-B71IvTSN.js} +1 -1
  161. package/dist/assets/{table-icons-BuE8hjls.js → table-icons-Y18_UHJP.js} +1 -1
  162. package/dist/assets/{team-B75Qqpfx.js → team-B91lHyZ2.js} +1 -1
  163. package/dist/assets/th-CZbdb5PZ.js +1 -0
  164. package/dist/assets/{toUpper-BPjfk0vW.js → toUpper-Ci7HX04C.js} +1 -1
  165. package/dist/assets/{traffic-Dm5MXy9S.js → traffic-DwUZrFe9.js} +1 -1
  166. package/dist/assets/{url-evaluation-BfNZVzn8.js → url-evaluation-D1BRyZ9U.js} +1 -1
  167. package/dist/assets/{url-join-uVmSvxHB.js → url-join-sQxThqCr.js} +1 -1
  168. package/dist/assets/{use-blocklet-info-for-connect-did-spaces--c0ZcRNe.js → use-blocklet-info-for-connect-did-spaces-ChleEcCM.js} +1 -1
  169. package/dist/assets/{useLocalStorage-C-9FT6wS.js → useLocalStorage-BE8pQq9o.js} +1 -1
  170. package/dist/assets/{useThemeProps-D2picXH9.js → useThemeProps-BXhGf-7k.js} +1 -1
  171. package/dist/assets/{util-B3g0jIJB.js → util-BJBtVSNx.js} +1 -1
  172. package/dist/assets/vi-DhjQx2Z1.js +1 -0
  173. package/dist/assets/{wait-container-CS2sL203.js → wait-container-mOzU7w1w.js} +1 -1
  174. package/dist/assets/{withStyles-D9ls3p7Y.js → withStyles-iFEvNGyW.js} +1 -1
  175. package/dist/assets/wrap-locale-P1NWYJW8.js +1 -0
  176. package/dist/assets/{zh-DfGqeTts.js → zh-jGK5FFL0.js} +1 -1
  177. package/dist/assets/zh-tw-DnmwTx49.js +1 -0
  178. package/dist/index.html +1 -1
  179. package/dist/service-worker.js +1 -1
  180. package/package.json +1 -1
  181. package/dist/assets/api-BxXFuqVr.js +0 -1
  182. package/dist/assets/ar-2JePd-i1.js +0 -1
  183. package/dist/assets/blocklet-xgPL6JoP.js +0 -1
  184. package/dist/assets/de-DFRVy5eA.js +0 -1
  185. package/dist/assets/es-D3TLX5Mb.js +0 -1
  186. package/dist/assets/fr-B2p5dLWr.js +0 -1
  187. package/dist/assets/getValidReactChildren-anMSyFv4.js +0 -1
  188. package/dist/assets/hi-DmXVnjfE.js +0 -1
  189. package/dist/assets/id-BPCkzz44.js +0 -1
  190. package/dist/assets/index-CLbWUy8O.js +0 -302
  191. package/dist/assets/ja-DdBhyqmR.js +0 -1
  192. package/dist/assets/ko-DagkAgw5.js +0 -1
  193. package/dist/assets/pt-DTmAqAWs.js +0 -1
  194. package/dist/assets/ru-BZQlsXeO.js +0 -1
  195. package/dist/assets/sdk-B77IQB17.js +0 -1
  196. package/dist/assets/service-DumyHxMs.js +0 -1
  197. package/dist/assets/th-DSRLorcE.js +0 -1
  198. package/dist/assets/vi-dE7BhTCc.js +0 -1
  199. package/dist/assets/wrap-locale-CJcLTW-n.js +0 -1
  200. package/dist/assets/zh-tw-COZAaB9V.js +0 -1
@@ -1 +1 @@
1
- import{P as U,j as m,dB as Bt,cN as P,dC as Ht,H as Gt,dD as Ft,b as Wt,Q as qt,dE as Kt,bl as Vt,v as zt,r as D,t as Yt,N as Xt,W as Jt,m as Qt,D as Zt,B as ft,C as pt,x as kt,K as te,y as ee,bm as ie,M as re}from"./index-Dpawm4Ki.js";import{W as ne}from"./url-evaluation-BfNZVzn8.js";import{s as Et,n as se}from"./schema-rBztjvAB.js";import{I as mt}from"./index-CUnYmZv8.js";import{T as oe}from"./TextField-FjVpB8_i.js";import{S as ae,a as le,b as he}from"./Stepper-C2cskkxs.js";function ce({mode:t,...e}){return t==="development"?m.jsx(ne,{type:"primary",...e,children:"DEV"}):null}ce.propTypes={mode:U.string.isRequired};var _t={},ht={exports:{}},jt={exports:{}},X=jt.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(t){return"file-"+St(t)}}},gt={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:St};Object.keys(X).forEach(function(t){Object.keys(gt).forEach(function(e){X[t][e]||(X[t][e]=gt[e])}),X[t].protocols_re=RegExp("^("+X[t].protocols.map(function(e){return e.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function St(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var Ct=jt.exports,dt=Ct,q=Object.assign||function(e,i){if(i===null||typeof i!="object")return e;const r=Object.keys(i);let s=r.length;for(;s--;)e[r[s]]=i[r[s]];return e},ue=j;function j(t,e,i,r,s,a,p){var c=this;c.type=t,Object.keys(dt[t]).forEach(function(g){c[g]=dt[t][g]}),c.user=e,c.auth=i,c.project=r,c.committish=s,c.default=a,c.opts=p||{}}j.prototype.hash=function(){return this.committish?"#"+this.committish:""};j.prototype._fill=function(t,e){if(t){var i=q({},e);i.path=i.path?i.path.replace(/^[/]+/g,""):"",e=q(q({},this.opts),e);var r=this;Object.keys(this).forEach(function(f){r[f]!=null&&i[f]==null&&(i[f]=r[f])});var s=i.auth,a=i.committish,p=i.fragment,c=i.path,g=i.project;Object.keys(i).forEach(function(f){var S=i[f];(f==="path"||f==="project")&&typeof S=="string"?i[f]=S.split("/").map(function(h){return encodeURIComponent(h)}).join("/"):f!=="domain"&&(i[f]=encodeURIComponent(S))}),i["auth@"]=s?s+"@":"",i["#fragment"]=p?"#"+this.hashformat(p):"",i.fragment=i.fragment?i.fragment:"",i["#path"]=c?"#"+this.hashformat(c):"",i["/path"]=i.path?"/"+i.path:"",i.projectPath=g.split("/").map(encodeURIComponent).join("/"),e.noCommittish?(i["#committish"]="",i["/tree/committish"]="",i["/committish"]="",i.committish=""):(i["#committish"]=a?"#"+a:"",i["/tree/committish"]=i.committish?"/"+i.treepath+"/"+i.committish:"",i["/committish"]=i.committish?"/"+i.committish:"",i.committish=i.committish||"master");var x=t;return Object.keys(i).forEach(function(f){x=x.replace(new RegExp("[{]"+f+"[}]","g"),i[f])}),e.noGitPlus?x.replace(/^git[+]/,""):x}};j.prototype.ssh=function(t){return this._fill(this.sshtemplate,t)};j.prototype.sshurl=function(t){return this._fill(this.sshurltemplate,t)};j.prototype.browse=function(t,e,i){return typeof t=="string"?(typeof e!="string"&&(i=e,e=null),this._fill(this.browsefiletemplate,q({fragment:e,path:t},i))):this._fill(this.browsetemplate,t)};j.prototype.docs=function(t){return this._fill(this.docstemplate,t)};j.prototype.bugs=function(t){return this._fill(this.bugstemplate,t)};j.prototype.https=function(t){return this._fill(this.httpstemplate,t)};j.prototype.git=function(t){return this._fill(this.gittemplate,t)};j.prototype.shortcut=function(t){return this._fill(this.shortcuttemplate,t)};j.prototype.path=function(t){return this._fill(this.pathtemplate,t)};j.prototype.tarball=function(t){var e=q({},t,{noCommittish:!1});return this._fill(this.tarballtemplate,e)};j.prototype.file=function(t,e){return this._fill(this.filetemplate,q({path:t},e))};j.prototype.getDefaultRepresentation=function(){return this.default};j.prototype.toString=function(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)};var nt,vt;function fe(){return vt||(vt=1,nt=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),nt}var pe=l;l.Node=$;l.create=l;function l(t){var e=this;if(e instanceof l||(e=new l),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var i=0,r=arguments.length;i<r;i++)e.push(arguments[i]);return e}l.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,i=t.prev;return e&&(e.prev=i),i&&(i.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,e};l.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};l.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};l.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)ge(this,arguments[t]);return this.length};l.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)de(this,arguments[t]);return this.length};l.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};l.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};l.prototype.forEach=function(t,e){e=e||this;for(var i=this.head,r=0;i!==null;r++)t.call(e,i.value,r,this),i=i.next};l.prototype.forEachReverse=function(t,e){e=e||this;for(var i=this.tail,r=this.length-1;i!==null;r--)t.call(e,i.value,r,this),i=i.prev};l.prototype.get=function(t){for(var e=0,i=this.head;i!==null&&e<t;e++)i=i.next;if(e===t&&i!==null)return i.value};l.prototype.getReverse=function(t){for(var e=0,i=this.tail;i!==null&&e<t;e++)i=i.prev;if(e===t&&i!==null)return i.value};l.prototype.map=function(t,e){e=e||this;for(var i=new l,r=this.head;r!==null;)i.push(t.call(e,r.value,this)),r=r.next;return i};l.prototype.mapReverse=function(t,e){e=e||this;for(var i=new l,r=this.tail;r!==null;)i.push(t.call(e,r.value,this)),r=r.prev;return i};l.prototype.reduce=function(t,e){var i,r=this.head;if(arguments.length>1)i=e;else if(this.head)r=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;r!==null;s++)i=t(i,r.value,s),r=r.next;return i};l.prototype.reduceReverse=function(t,e){var i,r=this.tail;if(arguments.length>1)i=e;else if(this.tail)r=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;r!==null;s--)i=t(i,r.value,s),r=r.prev;return i};l.prototype.toArray=function(){for(var t=new Array(this.length),e=0,i=this.head;i!==null;e++)t[e]=i.value,i=i.next;return t};l.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,i=this.tail;i!==null;e++)t[e]=i.value,i=i.prev;return t};l.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(;s!==null&&r<e;r++,s=s.next)i.push(s.value);return i};l.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=this.length,s=this.tail;s!==null&&r>e;r--)s=s.prev;for(;s!==null&&r>t;r--,s=s.prev)i.push(s.value);return i};l.prototype.splice=function(t,e,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(var a=[],r=0;s&&r<e;r++)a.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var r=0;r<i.length;r++)s=me(this,s,i[r]);return a};l.prototype.reverse=function(){for(var t=this.head,e=this.tail,i=t;i!==null;i=i.prev){var r=i.prev;i.prev=i.next,i.next=r}return this.head=e,this.tail=t,this};function me(t,e,i){var r=e===t.head?new $(i,null,e,t):new $(i,e,e.next,t);return r.next===null&&(t.tail=r),r.prev===null&&(t.head=r),t.length++,r}function ge(t,e){t.tail=new $(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function de(t,e){t.head=new $(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function $(t,e,i,r){if(!(this instanceof $))return new $(t,e,i,r);this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}try{fe()(l)}catch{}const ve=pe,M=Symbol("max"),O=Symbol("length"),F=Symbol("lengthCalculator"),Q=Symbol("allowStale"),N=Symbol("maxAge"),I=Symbol("dispose"),yt=Symbol("noDisposeOnSet"),b=Symbol("lruList"),w=Symbol("cache"),At=Symbol("updateAgeOnGet"),st=()=>1;class ye{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[M]=e.max||1/0;const i=e.length||st;if(this[F]=typeof i!="function"?st:i,this[Q]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[N]=e.maxAge||0,this[I]=e.dispose,this[yt]=e.noDisposeOnSet||!1,this[At]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[M]=e||1/0,J(this)}get max(){return this[M]}set allowStale(e){this[Q]=!!e}get allowStale(){return this[Q]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[N]=e,J(this)}get maxAge(){return this[N]}set lengthCalculator(e){typeof e!="function"&&(e=st),e!==this[F]&&(this[F]=e,this[O]=0,this[b].forEach(i=>{i.length=this[F](i.value,i.key),this[O]+=i.length})),J(this)}get lengthCalculator(){return this[F]}get length(){return this[O]}get itemCount(){return this[b].length}rforEach(e,i){i=i||this;for(let r=this[b].tail;r!==null;){const s=r.prev;bt(this,e,r,i),r=s}}forEach(e,i){i=i||this;for(let r=this[b].head;r!==null;){const s=r.next;bt(this,e,r,i),r=s}}keys(){return this[b].toArray().map(e=>e.key)}values(){return this[b].toArray().map(e=>e.value)}reset(){this[I]&&this[b]&&this[b].length&&this[b].forEach(e=>this[I](e.key,e.value)),this[w]=new Map,this[b]=new ve,this[O]=0}dump(){return this[b].map(e=>k(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[b]}set(e,i,r){if(r=r||this[N],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0,a=this[F](i,e);if(this[w].has(e)){if(a>this[M])return K(this,this[w].get(e)),!1;const g=this[w].get(e).value;return this[I]&&(this[yt]||this[I](e,g.value)),g.now=s,g.maxAge=r,g.value=i,this[O]+=a-g.length,g.length=a,this.get(e),J(this),!0}const p=new be(e,i,a,s,r);return p.length>this[M]?(this[I]&&this[I](e,i),!1):(this[O]+=p.length,this[b].unshift(p),this[w].set(e,this[b].head),J(this),!0)}has(e){if(!this[w].has(e))return!1;const i=this[w].get(e).value;return!k(this,i)}get(e){return ot(this,e,!0)}peek(e){return ot(this,e,!1)}pop(){const e=this[b].tail;return e?(K(this,e),e.value):null}del(e){K(this,this[w].get(e))}load(e){this.reset();const i=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],a=s.e||0;if(a===0)this.set(s.k,s.v);else{const p=a-i;p>0&&this.set(s.k,s.v,p)}}}prune(){this[w].forEach((e,i)=>ot(this,i,!1))}}const ot=(t,e,i)=>{const r=t[w].get(e);if(r){const s=r.value;if(k(t,s)){if(K(t,r),!t[Q])return}else i&&(t[At]&&(r.value.now=Date.now()),t[b].unshiftNode(r));return s.value}},k=(t,e)=>{if(!e||!e.maxAge&&!t[N])return!1;const i=Date.now()-e.now;return e.maxAge?i>e.maxAge:t[N]&&i>t[N]},J=t=>{if(t[O]>t[M])for(let e=t[b].tail;t[O]>t[M]&&e!==null;){const i=e.prev;K(t,e),e=i}},K=(t,e)=>{if(e){const i=e.value;t[I]&&t[I](i.key,i.value),t[O]-=i.length,t[w].delete(i.key),t[b].removeNode(e)}};class be{constructor(e,i,r,s,a){this.key=e,this.value=i,this.length=r,this.now=s,this.maxAge=a||0}}const bt=(t,e,i,r)=>{let s=i.value;k(t,s)&&(K(t,i),t[Q]||(s=void 0)),s&&e.call(r,s.value,s.key,t)};var xe=ye,lt=Bt,xt=Ct,Ee=ht.exports=ue,_e=xe,at=new _e({max:1e3}),je={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function Se(t){return je[t]||t.slice(0,-1)}var Ce={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};ht.exports.fromUrl=function(t,e){if(typeof t=="string"){var i=t+JSON.stringify(e||{});return at.has(i)||at.set(i,Ae(t,e)),at.get(i)}};function Ae(t,e){if(!(t==null||t==="")){var i=Re(we(t)?"github:"+t:t),r=Pe(i),s=i.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),a=Object.keys(xt).map(function(p){try{var c=xt[p],g=null;r.auth&&Ce[r.protocol]&&(g=r.auth);var x=r.hash?decodeURIComponent(r.hash.substr(1)):null,f=null,S=null,h=null;if(s&&s[1]===p)f=s[2]&&decodeURIComponent(s[2]),S=decodeURIComponent(s[3].replace(/\.git$/,"")),h="shortcut";else{if(r.host&&r.host!==c.domain&&r.host.replace(/^www[.]/,"")!==c.domain||!c.protocols_re.test(r.protocol)||!r.path)return;var H=c.pathmatch,C=r.path.match(H);if(!C)return;C[1]!==null&&C[1]!==void 0&&(f=decodeURIComponent(C[1].replace(/^:/,""))),S=decodeURIComponent(C[2]),h=Se(r.protocol)}return new Ee(p,f,g,S,x,h,e)}catch(A){if(!(A instanceof URIError))throw A}}).filter(function(p){return p});if(a.length===1)return a[0]}}function we(t){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(t)}function Re(t){var e=lt.parse(t);return e.protocol==="gist:"&&e.host&&!e.path?e.protocol+"/"+e.host:t}function Pe(t){var e=t.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!e){var i=lt.parse(t);if(i.auth){const s=t.match(/[^@]+@[^:/]+/);if(s){var r=new lt.URL(s[0]);i.auth=r.username||"",r.password&&(i.auth+=":"+r.password)}}return i}return{protocol:"git+ssh:",slashes:!0,auth:e[1],host:e[2],port:null,hostname:e[2],hash:e[4],search:null,query:null,pathname:"/"+e[3],path:"/"+e[3],href:"git+ssh://"+e[1]+"@"+e[2]+"/"+e[3]+(e[4]||"")}}var Ie=ht.exports,B={},R={},wt=P&&P.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(R,"__esModule",{value:!0});R.setService=R.findService=R.getDefaultServiceConfig=R.getServiceConfig=void 0;const Ue=wt(Ht),Oe=wt(Gt),Te=Et,{NODE_SERVICES:W}=Oe.default,Z={},ct=t=>{Z[t.name]={validate:t.schema.validate.bind(t.schema),defaultConfig:t.default}};R.setService=ct;ct({name:"auth",schema:Te.authConfigSchema,default:{}});Z[W.AUTH_SERVICE]={...Z[W.AUTH],meta:{...Z[W.AUTH].meta,name:W.AUTH_SERVICE}};const Rt=t=>{if(!t)throw new Error("service name should not be empty");const e=Z[t];if(!e)throw new Error(`service ${t} does not exist`);return e},Pt=(t,e,{validate:i}={})=>{const r=Rt(t),s=(0,Ue.default)(e||{}),{value:a,error:p}=r.validate(s);if(i&&p)throw new Error(`Invalid blocklet service config: ${p.details.map(c=>c.message).join(", ")}`);return a};R.getServiceConfig=Pt;const It=t=>{const{defaultConfig:e}=Rt(t);return e};R.getDefaultServiceConfig=It;const Ut=(t,e)=>{const i=[e];return e===W.AUTH&&i.push(W.AUTH_SERVICE),(t||[]).find(r=>i.includes(r.name))};R.findService=Ut;R.default={getServiceConfig:Pt,getDefaultServiceConfig:It,findService:Ut,setService:ct};Object.defineProperty(B,"__esModule",{value:!0});B.fixAndValidateService=B.validateMeta=void 0;const De=Et,Le=R,Me=t=>(!t.interfaces||!t.interfaces.length||t.interfaces.forEach(e=>{e.services&&e.services.length&&e.services.forEach(i=>{i.config=(0,Le.getServiceConfig)(i.name,i.config,{validate:!0})})}),t);B.fixAndValidateService=Me;const Ot=(t,{ensureFiles:e=!1,ensureDist:i=!1,ensureComponentStore:r=!0,ensureName:s=!1,skipValidateDidName:a=!1,schemaOptions:p={}}={})=>{const c=(0,De.createBlockletSchema)(null,{ensureFiles:e,ensureDist:i,ensureComponentStore:r,ensureName:s,skipValidateDidName:a,...p}),{value:g,error:x}=c.validate(t);if(x)throw new Error(`Invalid blocklet meta: ${x.details.map(f=>f.message).join(", ")}`);return g};B.validateMeta=Ot;B.default=Ot;(function(t){var e=P&&P.__createBinding||(Object.create?function(n,o,d,_){_===void 0&&(_=d);var v=Object.getOwnPropertyDescriptor(o,d);(!v||("get"in v?!o.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return o[d]}}),Object.defineProperty(n,_,v)}:function(n,o,d,_){_===void 0&&(_=d),n[_]=o[d]}),i=P&&P.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),r=P&&P.__importStar||function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var d in n)d!=="default"&&Object.prototype.hasOwnProperty.call(n,d)&&e(o,n,d);return i(o,n),o},s=P&&P.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixService=t.fixInterfaces=t.parsePerson=t.formatPerson=t.fixName=t.fixTags=t.fixPerson=t.fixKeywords=t.fixFiles=t.fixRepository=t.fixRequired=void 0;const a=s(Ft),p=r(Ie),c=Wt,g=B;Object.defineProperty(t,"fixService",{enumerable:!0,get:function(){return g.fixAndValidateService}});const x=se,f=(n,o)=>{n.description||(n.description=`Blocklet from ${o}`),n.version||(n.version=c.BLOCKLET_DEFAULT_VERSION)};t.fixRequired=f;const S=n=>{if(n.repository&&(typeof n.repository=="string"&&(n.repository={type:"git",url:n.repository}),n.repository.url)){const o=p.fromUrl(n.repository.url);o&&(n.repository.url=o.getDefaultRepresentation()==="shortcut"?o.https():o.toString())}};t.fixRepository=S;const h=n=>{Array.isArray(n.files)?n.files&&(n.files=n.files.filter(o=>!(!o||typeof o!="string"))):delete n.files};t.fixFiles=h;const H=n=>{typeof n.keywords=="string"&&(n.keywords=n.keywords.split(/,\s+/)),n.keywords&&!Array.isArray(n.keywords)?delete n.keywords:n.keywords&&(n.keywords=n.keywords.filter(o=>!(typeof o!="string"||!o)))};t.fixKeywords=H;const C=n=>{typeof n.tags=="string"&&(n.tags=n.tags.split(/,\s+/)),n.tags&&!Array.isArray(n.tags)?delete n.tags:n.tags&&(n.tags=n.tags.filter(o=>!(typeof o!="string"||!o)))};t.fixTags=C;const A=(n,o)=>(n.author&&(n.author=o(n.author)),["maintainers","contributors"].forEach(d=>{Array.isArray(n[d])&&(n[d]=n[d].map(o))}),n),V=n=>{if(!n)return"";if(typeof n=="string")return n;const o=n.name||"",d=n.url||n.web,_=d?` (${d})`:"",v=n.email||n.mail,y=v?` <${v}>`:"";return o+y+_};t.formatPerson=V;const T=n=>{if(typeof n!="string")return n;const o=n.match(/^([^(<]+)/),d=n.match(/\(([^)]+)\)/),_=n.match(/<([^>]+)>/),v={};return o&&o[0].trim()&&(v.name=o[0].trim()),_&&([,v.email]=_),d&&([,v.url]=d),v};t.parsePerson=T;const G=n=>(A(n,V),A(n,T),n);t.fixPerson=G;const E=(n,o=!0)=>{if(Array.isArray(n.interfaces)||(n.interfaces=[]),n.interfaces.length)return n.interfaces.forEach(y=>{y.type===c.BLOCKLET_INTERFACE_TYPE_WEB&&(y.protocol="http")}),n;const _=(0,a.default)(n,"capabilities.dynamicPathPrefix",!0)?c.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",v=({type:y="web",name:Y,path:tt="/",protocol:et="http",port:it=c.BLOCKLET_DEFAULT_PORT_NAME})=>{n.interfaces.push({type:y,name:Y,path:tt,prefix:_,port:it,protocol:et})};return[c.BLOCKLET_INTERFACE_PUBLIC].forEach(y=>{n[y]&&v({name:y,path:n[y]})}),Array.isArray(n.exposeServices)&&n.exposeServices.forEach(y=>{v({type:"service",name:y.protocol,protocol:y.protocol,port:{internal:`BLOCKLET_${y.protocol}_PORT`.toUpperCase(),external:y.port}})}),o&&(delete n.publicUrl,delete n.adminUrl,delete n.configUrl,delete n.docUrl,delete n.exposeServices,n.capabilities&&delete n.capabilities.dynamicPathPrefix),n};t.fixInterfaces=E;const z=n=>{const{did:o}=n;try{(0,x.validateNewDid)(o),n.name=o}catch{}return n};t.fixName=z,t.default={fixRequired:f,fixRepository:S,fixFiles:h,fixKeywords:H,fixPerson:G,fixTags:C,fixName:z,formatPerson:V,parsePerson:T,fixInterfaces:E,fixService:g.fixAndValidateService}})(_t);function Tt({owner:t,locale:e}){return m.jsxs(qt,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.fullName,t.did?m.jsx(Kt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:t.did,compact:!0,size:14,locale:e}):null]})}Tt.propTypes={owner:U.object.isRequired,locale:U.string.isRequired};function Dt({defaultUrl:t,onCancel:e,onSuccess:i,onError:r,mode:s,handleText:a}){const{api:p}=Vt(),{api:c}=zt(),[g,x]=D.useState(!1),[f,S]=D.useState(""),{t:h,locale:H}=Yt(),C={dist:{}},[A,V]=D.useState(t),[T,G]=D.useState(t?1:0),[E,z]=D.useState(C),[n,o]=D.useState(!1),[d,_]=D.useState({}),v=s==="component",y=v?!0:!t,Y=async()=>{z(C),S(null),x(!0);try{const u=decodeURIComponent(A.trim());try{new URL(u)}catch{throw new Error("Invalid URL")}const{meta:rt,inStore:Nt,registryUrl:$t}=await p.getBlockletMetaFromUrl({input:{url:u}});z(rt),_({inStore:Nt,registryUrl:$t,inputUrl:A.trim()})}catch(u){console.error(u);const rt=`Blocklet Install failed: ${re(u)}`;S(rt),r(u)}finally{x(!1)}},tt=()=>{if(v){i({meta:E,...d}),e();return}x(!0),o(!0)},et=()=>{x(!1),o(!1),i({meta:E,...d}),e()},it=()=>{x(!1),o(!1)};D.useEffect(()=>{t&&Y()},[t]);const Lt=[{name:h("common.name"),value:Xt.getDisplayName({meta:E},!0)},{name:h("common.version"),value:E.version},{name:h("common.did"),value:m.jsx(Jt,{did:E.did})},{name:h("common.author"),value:E.owner?m.jsx(Tt,{owner:E.owner,locale:H}):_t.formatPerson(E.author)},{name:h("blocklet.dist.downloadLink"),value:E.dist.tarball}],Mt=()=>g?m.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:m.jsx(pt,{})}):E.did?m.jsx("div",{style:{paddingLeft:"10%"},children:Lt.map(u=>u.name===h("common.did")?m.jsx(mt,{valueComponent:"div",nameWidth:120,name:u.name,nameFormatter:()=>h("common.did"),children:u.value},u.name):m.jsx(mt,{valueComponent:"div",nameWidth:120,name:u.name,children:u.value},u.name))}):null,ut=[{label:h("blocklet.fromUrl.step0"),body:m.jsx(Qt,{component:"div",children:m.jsx(oe,{label:h("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:h("blocklet.fromUrl.description"),value:A,onChange:u=>{S(null),V(u.target.value)},disabled:g,onKeyPress:u=>{u.key==="Enter"&&(u.preventDefault(),Y(),G(1))}})}),cancel:h("common.cancel"),confirm:h("common.next"),onCancel:e,onConfirm:()=>{Y(),G(1)}},{label:h("blocklet.fromUrl.step1"),body:Mt(),cancel:h(y?"common.pre":"common.cancel"),confirm:(a==null?void 0:a.confirm)||h("blocklet.fromUrl.confirm"),onCancel:()=>{y?G(u=>u-1):e()},onConfirm:()=>{tt()}}],L=ut[T];return m.jsxs(m.Fragment,{children:[m.jsxs(Zt,{title:(a==null?void 0:a.title)||h("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>L.onCancel(),showCloseButton:T===0,disableEscapeKeyDown:!0,open:!0,actions:m.jsxs(m.Fragment,{children:[L.cancel&&m.jsx(ft,{onClick:u=>{u.stopPropagation(),S(null),L.onCancel()},color:"inherit",children:L.cancel||h("common.cancel")}),m.jsxs(ft,{onClick:u=>{u.stopPropagation(),L.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:g||!A||f,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[g&&T===0&&m.jsx(pt,{size:16}),L.confirm]})]}),children:[y&&m.jsx(ae,{alternativeLabel:!0,activeStep:T,children:ut.map(({label:u})=>m.jsx(le,{children:m.jsx(he,{children:u})},u))}),m.jsx(kt,{component:"div",style:{marginTop:24},children:L.body}),!!f&&m.jsx(te,{severity:"error",style:{width:"100%",marginTop:8},children:f})]}),E&&n&&m.jsx(ee,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:c.get,checkTimeout:5*60*1e3,onSuccess:et,extraParams:{title:E.title,wt:ie(E),blockletMetaUrl:decodeURIComponent(A.trim())},messages:{title:h("setup.keyPair.title"),scan:h("setup.keyPair.scan"),confirm:h("setup.keyPair.confirm"),success:h("setup.keyPair.success")},onClose:it})]})}Dt.propTypes={defaultUrl:U.string,onCancel:U.func.isRequired,onSuccess:U.func.isRequired,onError:U.func,mode:U.oneOf(["install","component"]),handleText:U.object};Dt.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{ce as B,Dt as I,Tt as a,_t as f};
1
+ import{P as U,j as m,dB as Bt,cN as P,dC as Ht,H as Gt,dD as Ft,b as Wt,Q as qt,dE as Kt,bl as Vt,v as zt,r as D,t as Yt,N as Xt,W as Jt,m as Qt,D as Zt,B as ft,C as pt,x as kt,K as te,y as ee,bm as ie,M as re}from"./index-B1ahK-2I.js";import{W as ne}from"./url-evaluation-D1BRyZ9U.js";import{s as Et,n as se}from"./schema-BY5sl2-H.js";import{I as mt}from"./index-SR8pTZR1.js";import{T as oe}from"./TextField-s3PjFgNL.js";import{S as ae,a as le,b as he}from"./Stepper-BPCzoss2.js";function ce({mode:t,...e}){return t==="development"?m.jsx(ne,{type:"primary",...e,children:"DEV"}):null}ce.propTypes={mode:U.string.isRequired};var _t={},ht={exports:{}},jt={exports:{}},X=jt.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(t){return"file-"+St(t)}}},gt={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:St};Object.keys(X).forEach(function(t){Object.keys(gt).forEach(function(e){X[t][e]||(X[t][e]=gt[e])}),X[t].protocols_re=RegExp("^("+X[t].protocols.map(function(e){return e.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function St(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var Ct=jt.exports,dt=Ct,q=Object.assign||function(e,i){if(i===null||typeof i!="object")return e;const r=Object.keys(i);let s=r.length;for(;s--;)e[r[s]]=i[r[s]];return e},ue=j;function j(t,e,i,r,s,a,p){var c=this;c.type=t,Object.keys(dt[t]).forEach(function(g){c[g]=dt[t][g]}),c.user=e,c.auth=i,c.project=r,c.committish=s,c.default=a,c.opts=p||{}}j.prototype.hash=function(){return this.committish?"#"+this.committish:""};j.prototype._fill=function(t,e){if(t){var i=q({},e);i.path=i.path?i.path.replace(/^[/]+/g,""):"",e=q(q({},this.opts),e);var r=this;Object.keys(this).forEach(function(f){r[f]!=null&&i[f]==null&&(i[f]=r[f])});var s=i.auth,a=i.committish,p=i.fragment,c=i.path,g=i.project;Object.keys(i).forEach(function(f){var S=i[f];(f==="path"||f==="project")&&typeof S=="string"?i[f]=S.split("/").map(function(h){return encodeURIComponent(h)}).join("/"):f!=="domain"&&(i[f]=encodeURIComponent(S))}),i["auth@"]=s?s+"@":"",i["#fragment"]=p?"#"+this.hashformat(p):"",i.fragment=i.fragment?i.fragment:"",i["#path"]=c?"#"+this.hashformat(c):"",i["/path"]=i.path?"/"+i.path:"",i.projectPath=g.split("/").map(encodeURIComponent).join("/"),e.noCommittish?(i["#committish"]="",i["/tree/committish"]="",i["/committish"]="",i.committish=""):(i["#committish"]=a?"#"+a:"",i["/tree/committish"]=i.committish?"/"+i.treepath+"/"+i.committish:"",i["/committish"]=i.committish?"/"+i.committish:"",i.committish=i.committish||"master");var x=t;return Object.keys(i).forEach(function(f){x=x.replace(new RegExp("[{]"+f+"[}]","g"),i[f])}),e.noGitPlus?x.replace(/^git[+]/,""):x}};j.prototype.ssh=function(t){return this._fill(this.sshtemplate,t)};j.prototype.sshurl=function(t){return this._fill(this.sshurltemplate,t)};j.prototype.browse=function(t,e,i){return typeof t=="string"?(typeof e!="string"&&(i=e,e=null),this._fill(this.browsefiletemplate,q({fragment:e,path:t},i))):this._fill(this.browsetemplate,t)};j.prototype.docs=function(t){return this._fill(this.docstemplate,t)};j.prototype.bugs=function(t){return this._fill(this.bugstemplate,t)};j.prototype.https=function(t){return this._fill(this.httpstemplate,t)};j.prototype.git=function(t){return this._fill(this.gittemplate,t)};j.prototype.shortcut=function(t){return this._fill(this.shortcuttemplate,t)};j.prototype.path=function(t){return this._fill(this.pathtemplate,t)};j.prototype.tarball=function(t){var e=q({},t,{noCommittish:!1});return this._fill(this.tarballtemplate,e)};j.prototype.file=function(t,e){return this._fill(this.filetemplate,q({path:t},e))};j.prototype.getDefaultRepresentation=function(){return this.default};j.prototype.toString=function(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)};var nt,vt;function fe(){return vt||(vt=1,nt=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),nt}var pe=l;l.Node=$;l.create=l;function l(t){var e=this;if(e instanceof l||(e=new l),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var i=0,r=arguments.length;i<r;i++)e.push(arguments[i]);return e}l.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,i=t.prev;return e&&(e.prev=i),i&&(i.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,e};l.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};l.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};l.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)ge(this,arguments[t]);return this.length};l.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)de(this,arguments[t]);return this.length};l.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};l.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};l.prototype.forEach=function(t,e){e=e||this;for(var i=this.head,r=0;i!==null;r++)t.call(e,i.value,r,this),i=i.next};l.prototype.forEachReverse=function(t,e){e=e||this;for(var i=this.tail,r=this.length-1;i!==null;r--)t.call(e,i.value,r,this),i=i.prev};l.prototype.get=function(t){for(var e=0,i=this.head;i!==null&&e<t;e++)i=i.next;if(e===t&&i!==null)return i.value};l.prototype.getReverse=function(t){for(var e=0,i=this.tail;i!==null&&e<t;e++)i=i.prev;if(e===t&&i!==null)return i.value};l.prototype.map=function(t,e){e=e||this;for(var i=new l,r=this.head;r!==null;)i.push(t.call(e,r.value,this)),r=r.next;return i};l.prototype.mapReverse=function(t,e){e=e||this;for(var i=new l,r=this.tail;r!==null;)i.push(t.call(e,r.value,this)),r=r.prev;return i};l.prototype.reduce=function(t,e){var i,r=this.head;if(arguments.length>1)i=e;else if(this.head)r=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;r!==null;s++)i=t(i,r.value,s),r=r.next;return i};l.prototype.reduceReverse=function(t,e){var i,r=this.tail;if(arguments.length>1)i=e;else if(this.tail)r=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;r!==null;s--)i=t(i,r.value,s),r=r.prev;return i};l.prototype.toArray=function(){for(var t=new Array(this.length),e=0,i=this.head;i!==null;e++)t[e]=i.value,i=i.next;return t};l.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,i=this.tail;i!==null;e++)t[e]=i.value,i=i.prev;return t};l.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(;s!==null&&r<e;r++,s=s.next)i.push(s.value);return i};l.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=this.length,s=this.tail;s!==null&&r>e;r--)s=s.prev;for(;s!==null&&r>t;r--,s=s.prev)i.push(s.value);return i};l.prototype.splice=function(t,e,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(var a=[],r=0;s&&r<e;r++)a.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var r=0;r<i.length;r++)s=me(this,s,i[r]);return a};l.prototype.reverse=function(){for(var t=this.head,e=this.tail,i=t;i!==null;i=i.prev){var r=i.prev;i.prev=i.next,i.next=r}return this.head=e,this.tail=t,this};function me(t,e,i){var r=e===t.head?new $(i,null,e,t):new $(i,e,e.next,t);return r.next===null&&(t.tail=r),r.prev===null&&(t.head=r),t.length++,r}function ge(t,e){t.tail=new $(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function de(t,e){t.head=new $(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function $(t,e,i,r){if(!(this instanceof $))return new $(t,e,i,r);this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}try{fe()(l)}catch{}const ve=pe,M=Symbol("max"),O=Symbol("length"),F=Symbol("lengthCalculator"),Q=Symbol("allowStale"),N=Symbol("maxAge"),I=Symbol("dispose"),yt=Symbol("noDisposeOnSet"),b=Symbol("lruList"),w=Symbol("cache"),At=Symbol("updateAgeOnGet"),st=()=>1;class ye{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[M]=e.max||1/0;const i=e.length||st;if(this[F]=typeof i!="function"?st:i,this[Q]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[N]=e.maxAge||0,this[I]=e.dispose,this[yt]=e.noDisposeOnSet||!1,this[At]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[M]=e||1/0,J(this)}get max(){return this[M]}set allowStale(e){this[Q]=!!e}get allowStale(){return this[Q]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[N]=e,J(this)}get maxAge(){return this[N]}set lengthCalculator(e){typeof e!="function"&&(e=st),e!==this[F]&&(this[F]=e,this[O]=0,this[b].forEach(i=>{i.length=this[F](i.value,i.key),this[O]+=i.length})),J(this)}get lengthCalculator(){return this[F]}get length(){return this[O]}get itemCount(){return this[b].length}rforEach(e,i){i=i||this;for(let r=this[b].tail;r!==null;){const s=r.prev;bt(this,e,r,i),r=s}}forEach(e,i){i=i||this;for(let r=this[b].head;r!==null;){const s=r.next;bt(this,e,r,i),r=s}}keys(){return this[b].toArray().map(e=>e.key)}values(){return this[b].toArray().map(e=>e.value)}reset(){this[I]&&this[b]&&this[b].length&&this[b].forEach(e=>this[I](e.key,e.value)),this[w]=new Map,this[b]=new ve,this[O]=0}dump(){return this[b].map(e=>k(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[b]}set(e,i,r){if(r=r||this[N],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0,a=this[F](i,e);if(this[w].has(e)){if(a>this[M])return K(this,this[w].get(e)),!1;const g=this[w].get(e).value;return this[I]&&(this[yt]||this[I](e,g.value)),g.now=s,g.maxAge=r,g.value=i,this[O]+=a-g.length,g.length=a,this.get(e),J(this),!0}const p=new be(e,i,a,s,r);return p.length>this[M]?(this[I]&&this[I](e,i),!1):(this[O]+=p.length,this[b].unshift(p),this[w].set(e,this[b].head),J(this),!0)}has(e){if(!this[w].has(e))return!1;const i=this[w].get(e).value;return!k(this,i)}get(e){return ot(this,e,!0)}peek(e){return ot(this,e,!1)}pop(){const e=this[b].tail;return e?(K(this,e),e.value):null}del(e){K(this,this[w].get(e))}load(e){this.reset();const i=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],a=s.e||0;if(a===0)this.set(s.k,s.v);else{const p=a-i;p>0&&this.set(s.k,s.v,p)}}}prune(){this[w].forEach((e,i)=>ot(this,i,!1))}}const ot=(t,e,i)=>{const r=t[w].get(e);if(r){const s=r.value;if(k(t,s)){if(K(t,r),!t[Q])return}else i&&(t[At]&&(r.value.now=Date.now()),t[b].unshiftNode(r));return s.value}},k=(t,e)=>{if(!e||!e.maxAge&&!t[N])return!1;const i=Date.now()-e.now;return e.maxAge?i>e.maxAge:t[N]&&i>t[N]},J=t=>{if(t[O]>t[M])for(let e=t[b].tail;t[O]>t[M]&&e!==null;){const i=e.prev;K(t,e),e=i}},K=(t,e)=>{if(e){const i=e.value;t[I]&&t[I](i.key,i.value),t[O]-=i.length,t[w].delete(i.key),t[b].removeNode(e)}};class be{constructor(e,i,r,s,a){this.key=e,this.value=i,this.length=r,this.now=s,this.maxAge=a||0}}const bt=(t,e,i,r)=>{let s=i.value;k(t,s)&&(K(t,i),t[Q]||(s=void 0)),s&&e.call(r,s.value,s.key,t)};var xe=ye,lt=Bt,xt=Ct,Ee=ht.exports=ue,_e=xe,at=new _e({max:1e3}),je={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function Se(t){return je[t]||t.slice(0,-1)}var Ce={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};ht.exports.fromUrl=function(t,e){if(typeof t=="string"){var i=t+JSON.stringify(e||{});return at.has(i)||at.set(i,Ae(t,e)),at.get(i)}};function Ae(t,e){if(!(t==null||t==="")){var i=Re(we(t)?"github:"+t:t),r=Pe(i),s=i.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),a=Object.keys(xt).map(function(p){try{var c=xt[p],g=null;r.auth&&Ce[r.protocol]&&(g=r.auth);var x=r.hash?decodeURIComponent(r.hash.substr(1)):null,f=null,S=null,h=null;if(s&&s[1]===p)f=s[2]&&decodeURIComponent(s[2]),S=decodeURIComponent(s[3].replace(/\.git$/,"")),h="shortcut";else{if(r.host&&r.host!==c.domain&&r.host.replace(/^www[.]/,"")!==c.domain||!c.protocols_re.test(r.protocol)||!r.path)return;var H=c.pathmatch,C=r.path.match(H);if(!C)return;C[1]!==null&&C[1]!==void 0&&(f=decodeURIComponent(C[1].replace(/^:/,""))),S=decodeURIComponent(C[2]),h=Se(r.protocol)}return new Ee(p,f,g,S,x,h,e)}catch(A){if(!(A instanceof URIError))throw A}}).filter(function(p){return p});if(a.length===1)return a[0]}}function we(t){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(t)}function Re(t){var e=lt.parse(t);return e.protocol==="gist:"&&e.host&&!e.path?e.protocol+"/"+e.host:t}function Pe(t){var e=t.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!e){var i=lt.parse(t);if(i.auth){const s=t.match(/[^@]+@[^:/]+/);if(s){var r=new lt.URL(s[0]);i.auth=r.username||"",r.password&&(i.auth+=":"+r.password)}}return i}return{protocol:"git+ssh:",slashes:!0,auth:e[1],host:e[2],port:null,hostname:e[2],hash:e[4],search:null,query:null,pathname:"/"+e[3],path:"/"+e[3],href:"git+ssh://"+e[1]+"@"+e[2]+"/"+e[3]+(e[4]||"")}}var Ie=ht.exports,B={},R={},wt=P&&P.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(R,"__esModule",{value:!0});R.setService=R.findService=R.getDefaultServiceConfig=R.getServiceConfig=void 0;const Ue=wt(Ht),Oe=wt(Gt),Te=Et,{NODE_SERVICES:W}=Oe.default,Z={},ct=t=>{Z[t.name]={validate:t.schema.validate.bind(t.schema),defaultConfig:t.default}};R.setService=ct;ct({name:"auth",schema:Te.authConfigSchema,default:{}});Z[W.AUTH_SERVICE]={...Z[W.AUTH],meta:{...Z[W.AUTH].meta,name:W.AUTH_SERVICE}};const Rt=t=>{if(!t)throw new Error("service name should not be empty");const e=Z[t];if(!e)throw new Error(`service ${t} does not exist`);return e},Pt=(t,e,{validate:i}={})=>{const r=Rt(t),s=(0,Ue.default)(e||{}),{value:a,error:p}=r.validate(s);if(i&&p)throw new Error(`Invalid blocklet service config: ${p.details.map(c=>c.message).join(", ")}`);return a};R.getServiceConfig=Pt;const It=t=>{const{defaultConfig:e}=Rt(t);return e};R.getDefaultServiceConfig=It;const Ut=(t,e)=>{const i=[e];return e===W.AUTH&&i.push(W.AUTH_SERVICE),(t||[]).find(r=>i.includes(r.name))};R.findService=Ut;R.default={getServiceConfig:Pt,getDefaultServiceConfig:It,findService:Ut,setService:ct};Object.defineProperty(B,"__esModule",{value:!0});B.fixAndValidateService=B.validateMeta=void 0;const De=Et,Le=R,Me=t=>(!t.interfaces||!t.interfaces.length||t.interfaces.forEach(e=>{e.services&&e.services.length&&e.services.forEach(i=>{i.config=(0,Le.getServiceConfig)(i.name,i.config,{validate:!0})})}),t);B.fixAndValidateService=Me;const Ot=(t,{ensureFiles:e=!1,ensureDist:i=!1,ensureComponentStore:r=!0,ensureName:s=!1,skipValidateDidName:a=!1,schemaOptions:p={}}={})=>{const c=(0,De.createBlockletSchema)(null,{ensureFiles:e,ensureDist:i,ensureComponentStore:r,ensureName:s,skipValidateDidName:a,...p}),{value:g,error:x}=c.validate(t);if(x)throw new Error(`Invalid blocklet meta: ${x.details.map(f=>f.message).join(", ")}`);return g};B.validateMeta=Ot;B.default=Ot;(function(t){var e=P&&P.__createBinding||(Object.create?function(n,o,d,_){_===void 0&&(_=d);var v=Object.getOwnPropertyDescriptor(o,d);(!v||("get"in v?!o.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return o[d]}}),Object.defineProperty(n,_,v)}:function(n,o,d,_){_===void 0&&(_=d),n[_]=o[d]}),i=P&&P.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),r=P&&P.__importStar||function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var d in n)d!=="default"&&Object.prototype.hasOwnProperty.call(n,d)&&e(o,n,d);return i(o,n),o},s=P&&P.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixService=t.fixInterfaces=t.parsePerson=t.formatPerson=t.fixName=t.fixTags=t.fixPerson=t.fixKeywords=t.fixFiles=t.fixRepository=t.fixRequired=void 0;const a=s(Ft),p=r(Ie),c=Wt,g=B;Object.defineProperty(t,"fixService",{enumerable:!0,get:function(){return g.fixAndValidateService}});const x=se,f=(n,o)=>{n.description||(n.description=`Blocklet from ${o}`),n.version||(n.version=c.BLOCKLET_DEFAULT_VERSION)};t.fixRequired=f;const S=n=>{if(n.repository&&(typeof n.repository=="string"&&(n.repository={type:"git",url:n.repository}),n.repository.url)){const o=p.fromUrl(n.repository.url);o&&(n.repository.url=o.getDefaultRepresentation()==="shortcut"?o.https():o.toString())}};t.fixRepository=S;const h=n=>{Array.isArray(n.files)?n.files&&(n.files=n.files.filter(o=>!(!o||typeof o!="string"))):delete n.files};t.fixFiles=h;const H=n=>{typeof n.keywords=="string"&&(n.keywords=n.keywords.split(/,\s+/)),n.keywords&&!Array.isArray(n.keywords)?delete n.keywords:n.keywords&&(n.keywords=n.keywords.filter(o=>!(typeof o!="string"||!o)))};t.fixKeywords=H;const C=n=>{typeof n.tags=="string"&&(n.tags=n.tags.split(/,\s+/)),n.tags&&!Array.isArray(n.tags)?delete n.tags:n.tags&&(n.tags=n.tags.filter(o=>!(typeof o!="string"||!o)))};t.fixTags=C;const A=(n,o)=>(n.author&&(n.author=o(n.author)),["maintainers","contributors"].forEach(d=>{Array.isArray(n[d])&&(n[d]=n[d].map(o))}),n),V=n=>{if(!n)return"";if(typeof n=="string")return n;const o=n.name||"",d=n.url||n.web,_=d?` (${d})`:"",v=n.email||n.mail,y=v?` <${v}>`:"";return o+y+_};t.formatPerson=V;const T=n=>{if(typeof n!="string")return n;const o=n.match(/^([^(<]+)/),d=n.match(/\(([^)]+)\)/),_=n.match(/<([^>]+)>/),v={};return o&&o[0].trim()&&(v.name=o[0].trim()),_&&([,v.email]=_),d&&([,v.url]=d),v};t.parsePerson=T;const G=n=>(A(n,V),A(n,T),n);t.fixPerson=G;const E=(n,o=!0)=>{if(Array.isArray(n.interfaces)||(n.interfaces=[]),n.interfaces.length)return n.interfaces.forEach(y=>{y.type===c.BLOCKLET_INTERFACE_TYPE_WEB&&(y.protocol="http")}),n;const _=(0,a.default)(n,"capabilities.dynamicPathPrefix",!0)?c.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",v=({type:y="web",name:Y,path:tt="/",protocol:et="http",port:it=c.BLOCKLET_DEFAULT_PORT_NAME})=>{n.interfaces.push({type:y,name:Y,path:tt,prefix:_,port:it,protocol:et})};return[c.BLOCKLET_INTERFACE_PUBLIC].forEach(y=>{n[y]&&v({name:y,path:n[y]})}),Array.isArray(n.exposeServices)&&n.exposeServices.forEach(y=>{v({type:"service",name:y.protocol,protocol:y.protocol,port:{internal:`BLOCKLET_${y.protocol}_PORT`.toUpperCase(),external:y.port}})}),o&&(delete n.publicUrl,delete n.adminUrl,delete n.configUrl,delete n.docUrl,delete n.exposeServices,n.capabilities&&delete n.capabilities.dynamicPathPrefix),n};t.fixInterfaces=E;const z=n=>{const{did:o}=n;try{(0,x.validateNewDid)(o),n.name=o}catch{}return n};t.fixName=z,t.default={fixRequired:f,fixRepository:S,fixFiles:h,fixKeywords:H,fixPerson:G,fixTags:C,fixName:z,formatPerson:V,parsePerson:T,fixInterfaces:E,fixService:g.fixAndValidateService}})(_t);function Tt({owner:t,locale:e}){return m.jsxs(qt,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.fullName,t.did?m.jsx(Kt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:t.did,compact:!0,size:14,locale:e}):null]})}Tt.propTypes={owner:U.object.isRequired,locale:U.string.isRequired};function Dt({defaultUrl:t,onCancel:e,onSuccess:i,onError:r,mode:s,handleText:a}){const{api:p}=Vt(),{api:c}=zt(),[g,x]=D.useState(!1),[f,S]=D.useState(""),{t:h,locale:H}=Yt(),C={dist:{}},[A,V]=D.useState(t),[T,G]=D.useState(t?1:0),[E,z]=D.useState(C),[n,o]=D.useState(!1),[d,_]=D.useState({}),v=s==="component",y=v?!0:!t,Y=async()=>{z(C),S(null),x(!0);try{const u=decodeURIComponent(A.trim());try{new URL(u)}catch{throw new Error("Invalid URL")}const{meta:rt,inStore:Nt,registryUrl:$t}=await p.getBlockletMetaFromUrl({input:{url:u}});z(rt),_({inStore:Nt,registryUrl:$t,inputUrl:A.trim()})}catch(u){console.error(u);const rt=`Blocklet Install failed: ${re(u)}`;S(rt),r(u)}finally{x(!1)}},tt=()=>{if(v){i({meta:E,...d}),e();return}x(!0),o(!0)},et=()=>{x(!1),o(!1),i({meta:E,...d}),e()},it=()=>{x(!1),o(!1)};D.useEffect(()=>{t&&Y()},[t]);const Lt=[{name:h("common.name"),value:Xt.getDisplayName({meta:E},!0)},{name:h("common.version"),value:E.version},{name:h("common.did"),value:m.jsx(Jt,{did:E.did})},{name:h("common.author"),value:E.owner?m.jsx(Tt,{owner:E.owner,locale:H}):_t.formatPerson(E.author)},{name:h("blocklet.dist.downloadLink"),value:E.dist.tarball}],Mt=()=>g?m.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:m.jsx(pt,{})}):E.did?m.jsx("div",{style:{paddingLeft:"10%"},children:Lt.map(u=>u.name===h("common.did")?m.jsx(mt,{valueComponent:"div",nameWidth:120,name:u.name,nameFormatter:()=>h("common.did"),children:u.value},u.name):m.jsx(mt,{valueComponent:"div",nameWidth:120,name:u.name,children:u.value},u.name))}):null,ut=[{label:h("blocklet.fromUrl.step0"),body:m.jsx(Qt,{component:"div",children:m.jsx(oe,{label:h("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:h("blocklet.fromUrl.description"),value:A,onChange:u=>{S(null),V(u.target.value)},disabled:g,onKeyPress:u=>{u.key==="Enter"&&(u.preventDefault(),Y(),G(1))}})}),cancel:h("common.cancel"),confirm:h("common.next"),onCancel:e,onConfirm:()=>{Y(),G(1)}},{label:h("blocklet.fromUrl.step1"),body:Mt(),cancel:h(y?"common.pre":"common.cancel"),confirm:(a==null?void 0:a.confirm)||h("blocklet.fromUrl.confirm"),onCancel:()=>{y?G(u=>u-1):e()},onConfirm:()=>{tt()}}],L=ut[T];return m.jsxs(m.Fragment,{children:[m.jsxs(Zt,{title:(a==null?void 0:a.title)||h("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>L.onCancel(),showCloseButton:T===0,disableEscapeKeyDown:!0,open:!0,actions:m.jsxs(m.Fragment,{children:[L.cancel&&m.jsx(ft,{onClick:u=>{u.stopPropagation(),S(null),L.onCancel()},color:"inherit",children:L.cancel||h("common.cancel")}),m.jsxs(ft,{onClick:u=>{u.stopPropagation(),L.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:g||!A||f,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[g&&T===0&&m.jsx(pt,{size:16}),L.confirm]})]}),children:[y&&m.jsx(ae,{alternativeLabel:!0,activeStep:T,children:ut.map(({label:u})=>m.jsx(le,{children:m.jsx(he,{children:u})},u))}),m.jsx(kt,{component:"div",style:{marginTop:24},children:L.body}),!!f&&m.jsx(te,{severity:"error",style:{width:"100%",marginTop:8},children:f})]}),E&&n&&m.jsx(ee,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:c.get,checkTimeout:5*60*1e3,onSuccess:et,extraParams:{title:E.title,wt:ie(E),blockletMetaUrl:decodeURIComponent(A.trim())},messages:{title:h("setup.keyPair.title"),scan:h("setup.keyPair.scan"),confirm:h("setup.keyPair.confirm"),success:h("setup.keyPair.success")},onClose:it})]})}Dt.propTypes={defaultUrl:U.string,onCancel:U.func.isRequired,onSuccess:U.func.isRequired,onError:U.func,mode:U.oneOf(["install","component"]),handleText:U.object};Dt.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{ce as B,Dt as I,Tt as a,_t as f};
@@ -1,4 +1,4 @@
1
- import{bJ as $,j as i,P as r,n as f,r as m,f as q,D as H,t as j,v as U,aO as E,cz as F,ch as P,q as M,cA as O,cB as B,cC as V,cp as J,cD as S,cE as N,as as z,Q as L,cg as W,C as X}from"./index-Dpawm4Ki.js";import{R as Q}from"./index-CoOBWTGS.js";import{C as A}from"./index-D3y-Mq0t.js";import{b as Y}from"./sdk-B77IQB17.js";import{d as G}from"./CheckCircle-Cn-sNTZK.js";import{w as K}from"./wrap-locale-CJcLTW-n.js";const Z=$(i.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function b({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext(q),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),s=m.useCallback(()=>{o(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx(ee,{children:i.jsx("div",{className:"invite-passport__card",onClick:x,children:i.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})})}),i.jsx(H,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:s,children:e.role.permissions&&e.role.permissions.length>0?i.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>i.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):i.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[i.jsx(Z,{style:{width:"30px",height:"30px"}}),i.jsx("div",{children:t("invite.emptyPermission")})]})})]})}b.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};b.defaultProps={passportColor:"auto"};const ee=f.div`
1
+ import{bJ as $,j as i,P as r,n as f,r as m,f as q,D as H,t as j,v as U,aO as E,cz as F,ch as P,q as M,cA as O,cB as B,cC as V,cp as J,cD as S,cE as N,as as z,Q as L,cg as W,C as X}from"./index-B1ahK-2I.js";import{R as Q}from"./index-Cb_bB7kh.js";import{C as A}from"./index-C5X9a7cc.js";import{b as Y}from"./sdk-DWrnJTtv.js";import{d as G}from"./CheckCircle-B1OfEs-V.js";import{w as K}from"./wrap-locale-P1NWYJW8.js";const Z=$(i.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function b({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext(q),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),s=m.useCallback(()=>{o(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx(ee,{children:i.jsx("div",{className:"invite-passport__card",onClick:x,children:i.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})})}),i.jsx(H,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:s,children:e.role.permissions&&e.role.permissions.length>0?i.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>i.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):i.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[i.jsx(Z,{style:{width:"30px",height:"30px"}}),i.jsx("div",{children:t("invite.emptyPermission")})]})})]})}b.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};b.defaultProps={passportColor:"auto"};const ee=f.div`
2
2
  display: flex;
3
3
  max-width: 350px;
4
4
  margin: 30px auto;
@@ -1 +1 @@
1
- import{aK as i,aL as o,j as s,g as u,fl as f}from"./index-Dpawm4Ki.js";var e={},l=o;Object.defineProperty(e,"__esModule",{value:!0});var n=e.default=void 0,v=l(i()),d=s;n=e.default=(0,v.default)((0,d.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");const a=f;var x=(t,r)=>a(t)===a(r);const h=u(x);export{n as d,h as i};
1
+ import{aK as i,aL as o,j as s,g as u,fl as f}from"./index-B1ahK-2I.js";var e={},l=o;Object.defineProperty(e,"__esModule",{value:!0});var n=e.default=void 0,v=l(i()),d=s;n=e.default=(0,v.default)((0,d.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");const a=f;var x=(t,r)=>a(t)===a(r);const h=u(x);export{n as d,h as i};
@@ -1 +1 @@
1
- import{g as r,eS as t}from"./index-Dpawm4Ki.js";var u=t;function e(a,s){return u(a,s)}var o=e;const l=r(o);export{o as a,l as i};
1
+ import{g as r,eS as t}from"./index-B1ahK-2I.js";var u=t;function e(a,s){return u(a,s)}var o=e;const l=r(o);export{o as a,l as i};
@@ -1,4 +1,4 @@
1
- import{bM as ie,f2 as ci,f3 as ui,r as j,f4 as fi,f5 as pi,bO as nr,j as u,bT as or,dK as di,eW as mi,bU as hi,bQ as vi,bK as gi,bR as yi,cj as $e,cg as Un,b8 as bi,ch as Re,f6 as wi,f7 as Si,f8 as Oi,f9 as Ot,b9 as Pi,bh as Pt,a4 as Ht,cU as xi,aK as fe,aL as pe,g as Wn,fa as ji,fb as Ii,cF as Wr,P as y,s as Y,C as se,ai as bt,ar as Vn,an as Gn,av as _i,aO as Qn,dM as ce,dP as $i,fc as Ci,J as wr,fd as Ei,cz as Ai,fe as ki,Q as V,e$ as Vr,az as Ti,aA as Jn,aS as Ri,ez as Yn,m as J,R as Di,eT as Mi,dQ as Ni,d9 as Bi,dN as Fi,dO as Li,U as ir,D as Xn,ff as qi,fg as zi,q as Ie,fh as Ki,cx as Hi,as as Ui,B as Mt,t as Le,a6 as Wi,a7 as Zn,aD as Vi,fi as Gr,a8 as Gi,bl as Sr,x as Qi,K as Ji,cu as Yi,M as Ue,E as Pe,b as Xi,v as Zi,a$ as ea,ac as ta,dw as eo,H as ra,cd as na,eM as oa,W as ia,ax as aa}from"./index-Dpawm4Ki.js";import{s as la}from"./index-3regrC4H.js";import{E as sa}from"./index-DDRhCg0G.js";import{d as ca}from"./Search-DPoHYjEM.js";import{S as ua}from"./index-TFGhlmJg.js";import{O as fa}from"./Select-CZslLkS9.js";import{I as Qr}from"./InputAdornment-CmItI7-a.js";import{_ as pa,k as da,B as ma}from"./preact.module-DJUF--8d.js";import{d as ha}from"./Add-YuGHCX93.js";import{T as va}from"./TextField-FjVpB8_i.js";import{d as to}from"./Launch-ixFhPrIJ.js";import{d as ga}from"./Done-CvSFHISO.js";import{d as ro}from"./DeleteOutline-DWR_h5F3.js";import{C as ya}from"./delete-confirm-BG1I5J0u.js";import{u as ba}from"./blocklet-xgPL6JoP.js";import{d as wa}from"./MoreVert-72FLA6F7.js";import{B as Jr}from"./ButtonGroup-Dk1mLt3h.js";const Sa=(e,t)=>e.filter(r=>t.includes(r)),qe=(e,t,r)=>{const n=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{r((a,l)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,l):a[e.up(e.keys[i])]=l)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:Sa(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.indexOf(i)!==-1){const a=t[i];a!==void 0&&r((l,s)=>{n===i?Object.assign(l,s):l[e.up(i)]=s},a)}}):(typeof t=="number"||typeof t=="string")&&r((o,i)=>{Object.assign(o,i)},t)};function ue(e){return e?`Level${e}`:""}function wt(e){return e.unstable_level>0&&e.container}function no(e){return function(r){return`var(--Grid-${r}Spacing${ue(e.unstable_level)})`}}function Or(e){return function(r){return e.unstable_level===0?`var(--Grid-${r}Spacing)`:`var(--Grid-${r}Spacing${ue(e.unstable_level-1)})`}}function Pr(e){return e.unstable_level===0?"var(--Grid-columns)":`var(--Grid-columns${ue(e.unstable_level-1)})`}const Oa=({theme:e,ownerState:t})=>{const r=no(t),n={};return qe(e.breakpoints,t.gridSize,(o,i)=>{let a={};i===!0&&(a={flexBasis:0,flexGrow:1,maxWidth:"100%"}),i==="auto"&&(a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof i=="number"&&(a={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${i} / ${Pr(t)}${wt(t)?` + ${r("column")}`:""})`}),o(n,a)}),n},Pa=({theme:e,ownerState:t})=>{const r={};return qe(e.breakpoints,t.gridOffset,(n,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / ${Pr(t)})`}),n(r,i)}),r},xa=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=wt(t)?{[`--Grid-columns${ue(t.unstable_level)}`]:Pr(t)}:{"--Grid-columns":12};return qe(e.breakpoints,t.columns,(n,o)=>{n(r,{[`--Grid-columns${ue(t.unstable_level)}`]:o})}),r},ja=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Or(t),n=wt(t)?{[`--Grid-rowSpacing${ue(t.unstable_level)}`]:r("row")}:{};return qe(e.breakpoints,t.rowSpacing,(o,i)=>{var a;o(n,{[`--Grid-rowSpacing${ue(t.unstable_level)}`]:typeof i=="string"?i:(a=e.spacing)==null?void 0:a.call(e,i)})}),n},Ia=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Or(t),n=wt(t)?{[`--Grid-columnSpacing${ue(t.unstable_level)}`]:r("column")}:{};return qe(e.breakpoints,t.columnSpacing,(o,i)=>{var a;o(n,{[`--Grid-columnSpacing${ue(t.unstable_level)}`]:typeof i=="string"?i:(a=e.spacing)==null?void 0:a.call(e,i)})}),n},_a=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return qe(e.breakpoints,t.direction,(n,o)=>{n(r,{flexDirection:o})}),r},$a=({ownerState:e})=>{const t=no(e),r=Or(e);return ie({minWidth:0,boxSizing:"border-box"},e.container&&ie({display:"flex",flexWrap:"wrap"},e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||wt(e))&&ie({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},Ca=e=>{const t=[];return Object.entries(e).forEach(([r,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${r}-${String(n)}`)}),t},Ea=(e,t="xs")=>{function r(n){return n===void 0?!1:typeof n=="string"&&!Number.isNaN(Number(n))||typeof n=="number"&&n>0}if(r(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const n=[];return Object.entries(e).forEach(([o,i])=>{r(i)&&n.push(`spacing-${o}-${String(i)}`)}),n}return[]},Aa=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,r])=>`direction-${t}-${r}`):[`direction-xs-${String(e)}`],ka=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],Ta=ci(),Ra=ui("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function Da(e){return mi({props:e,name:"MuiGrid",defaultTheme:Ta})}function Ma(e={}){const{createStyledComponent:t=Ra,useThemeProps:r=Da,componentName:n="MuiGrid"}=e,o=j.createContext(void 0),i=(s,c)=>{const{container:p,direction:f,spacing:d,wrap:v,gridSize:m}=s,h={root:["root",p&&"container",v!=="wrap"&&`wrap-xs-${String(v)}`,...Aa(f),...Ca(m),...p?Ea(d,c.breakpoints.keys[0]):[]]};return hi(h,w=>vi(n,w),{})},a=t(xa,Ia,ja,Oa,_a,$a,Pa),l=j.forwardRef(function(c,p){var f,d,v,m,h,w,b,g;const S=fi(),O=r(c),P=pi(O),C=j.useContext(o),{className:$,children:E,columns:A=12,container:x=!1,component:k="div",direction:M="row",wrap:q="wrap",spacing:G=0,rowSpacing:T=G,columnSpacing:N=G,disableEqualOverflow:Q,unstable_level:I=0}=P,D=nr(P,ka);let F=Q;I&&Q!==void 0&&(F=c.disableEqualOverflow);const X={},ye={},Hr={};Object.entries(D).forEach(([ne,_e])=>{S.breakpoints.values[ne]!==void 0?X[ne]=_e:S.breakpoints.values[ne.replace("Offset","")]!==void 0?ye[ne.replace("Offset","")]=_e:Hr[ne]=_e});const oi=(f=c.columns)!=null?f:I?void 0:A,ii=(d=c.spacing)!=null?d:I?void 0:G,ai=(v=(m=c.rowSpacing)!=null?m:c.spacing)!=null?v:I?void 0:T,li=(h=(w=c.columnSpacing)!=null?w:c.spacing)!=null?h:I?void 0:N,Ur=ie({},P,{level:I,columns:oi,container:x,direction:M,wrap:q,spacing:ii,rowSpacing:ai,columnSpacing:li,gridSize:X,gridOffset:ye,disableEqualOverflow:(b=(g=F)!=null?g:C)!=null?b:!1,parentDisableEqualOverflow:C}),si=i(Ur,S);let Vt=u.jsx(a,ie({ref:p,as:k,ownerState:Ur,className:or(si.root,$)},Hr,{children:j.Children.map(E,ne=>{if(j.isValidElement(ne)&&di(ne,["Grid"])){var _e;return j.cloneElement(ne,{unstable_level:(_e=ne.props.unstable_level)!=null?_e:I+1})}return ne})}));return F!==void 0&&F!==(C??!1)&&(Vt=u.jsx(o.Provider,{value:F,children:Vt})),Vt});return l.muiName="Grid",l}const Gt=Ma({createStyledComponent:gi("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>yi({props:e,name:"MuiGrid2"})});var Na=function(e){return e===document||e===document.documentElement||e===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):e.scrollTop},Ba=function(e){return e.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)},Fa=function(e){return e.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)},La=function(e,t){t===void 0&&(t={});var r=t.target,n=t.isNoMore,o=t.threshold,i=o===void 0?100:o,a=t.reloadDeps,l=a===void 0?[]:a,s=t.manual,c=t.onBefore,p=t.onSuccess,f=t.onError,d=t.onFinally,v=$e(j.useState(),2),m=v[0],h=v[1],w=$e(j.useState(!1),2),b=w[0],g=w[1],S=j.useMemo(function(){return n?n(m):!1},[m]),O=Un(function(T){return bi(void 0,void 0,void 0,function(){var N,Q,I;return Pi(this,function(D){switch(D.label){case 0:return[4,e(T)];case 1:return N=D.sent(),h(T?Pt(Pt({},N),{list:Ot(Ot([],$e((I=T.list)!==null&&I!==void 0?I:[]),!1),$e(N.list),!1)}):Pt(Pt({},N),{list:Ot([],$e((Q=N.list)!==null&&Q!==void 0?Q:[]),!1)})),[2,N]}})})},{manual:s,onFinally:function(T,N,Q){g(!1),d==null||d(N,Q)},onBefore:function(){return c==null?void 0:c()},onSuccess:function(T){setTimeout(function(){G()}),p==null||p(T)},onError:function(T){return f==null?void 0:f(T)}}),P=O.loading,C=O.error,$=O.run,E=O.runAsync,A=O.cancel,x=Re(function(){S||(g(!0),$(m))}),k=Re(function(){return S?Promise.reject():(g(!0),E(m))}),M=function(){return g(!1),$()},q=function(){return g(!1),E()},G=function(){var T=wi(r);if(T){T=T===document?document.documentElement:T;var N=Na(T),Q=Ba(T),I=Fa(T);Q-N<=I+i&&x()}};return Si("scroll",function(){P||b||G()},{target:r}),Oi(function(){$()},Ot([],$e(l),!1)),{data:m,loading:!b&&P,error:C,loadingMore:b,noMore:S,loadMore:x,loadMoreAsync:k,reload:Re(M),reloadAsync:Re(q),mutate:h,cancel:A}};const qa=["name"],za=["children","className","clone","component"];function Ka(e,t){const r={};return Object.keys(e).forEach(n=>{t.indexOf(n)===-1&&(r[n]=e[n])}),r}function Ha(e){return(r,n={})=>{const{name:o}=n,i=nr(n,qa);let a=o;const s=Ht(typeof r=="function"?f=>({root:d=>r(ie({theme:f},d))}):{root:r},ie({Component:e,name:o||e.displayName,classNamePrefix:a},i));let c;r.filterProps&&(c=r.filterProps,delete r.filterProps),r.propTypes&&(r.propTypes,delete r.propTypes);const p=j.forwardRef(function(d,v){const{children:m,className:h,clone:w,component:b}=d,g=nr(d,za),S=s(d),O=or(S.root,h);let P=g;if(c&&(P=Ka(P,c)),w)return j.cloneElement(m,ie({className:or(m.props.className,O)},P));if(typeof m=="function")return m(ie({className:O},P));const C=b||e;return u.jsx(C,ie({ref:v,className:O},P,{children:m}))});return xi(p,e),p}}const Xp="blocklet-add-component-registry",Zp="server-add-registry";var xr={},Ua=pe;Object.defineProperty(xr,"__esModule",{value:!0});var oo=xr.default=void 0,Wa=Ua(fe()),Va=u;oo=xr.default=(0,Wa.default)((0,Va.jsx)("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"Sort");var jr={},Ga=pe;Object.defineProperty(jr,"__esModule",{value:!0});var io=jr.default=void 0,Qa=Ga(fe()),Ja=u;io=jr.default=(0,Qa.default)((0,Ja.jsx)("path",{d:"M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25m6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8"}),"Face");var Ya=ji,Yr=Ii;function Xa(e,t,r,n){return e==null?[]:(Yr(t)||(t=t==null?[]:[t]),r=n?void 0:r,Yr(r)||(r=r==null?[]:[r]),Ya(e,t,r))}var Za=Xa;const el=Wn(Za);var ao={exports:{}},lo={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},so={exports:{}},tl=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},rl=tl,nl=Array.prototype.concat,ol=Array.prototype.slice,Xr=so.exports=function(t){for(var r=[],n=0,o=t.length;n<o;n++){var i=t[n];rl(i)?r=nl.call(r,ol.call(i)):r.push(i)}return r};Xr.wrap=function(e){return function(){return e(Xr(arguments))}};var il=so.exports,We=lo,St=il,co=Object.hasOwnProperty,uo=Object.create(null);for(var Qt in We)co.call(We,Qt)&&(uo[We[Qt]]=Qt);var ee=ao.exports={to:{},get:{}};ee.get=function(e){var t=e.substring(0,3).toLowerCase(),r,n;switch(t){case"hsl":r=ee.get.hsl(e),n="hsl";break;case"hwb":r=ee.get.hwb(e),n="hwb";break;default:r=ee.get.rgb(e),n="rgb";break}return r?{model:n,value:r}:null};ee.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^(\w+)$/,a=[0,0,0,1],l,s,c;if(l=e.match(r)){for(c=l[2],l=l[1],s=0;s<3;s++){var p=s*2;a[s]=parseInt(l.slice(p,p+2),16)}c&&(a[3]=parseInt(c,16)/255)}else if(l=e.match(t)){for(l=l[1],c=l[3],s=0;s<3;s++)a[s]=parseInt(l[s]+l[s],16);c&&(a[3]=parseInt(c+c,16)/255)}else if(l=e.match(n)){for(s=0;s<3;s++)a[s]=parseInt(l[s+1],0);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else if(l=e.match(o)){for(s=0;s<3;s++)a[s]=Math.round(parseFloat(l[s+1])*2.55);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else return(l=e.match(i))?l[1]==="transparent"?[0,0,0,0]:co.call(We,l[1])?(a=We[l[1]],a[3]=1,a):null:null;for(s=0;s<3;s++)a[s]=ve(a[s],0,255);return a[3]=ve(a[3],0,1),a};ee.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var n=parseFloat(r[4]),o=(parseFloat(r[1])%360+360)%360,i=ve(parseFloat(r[2]),0,100),a=ve(parseFloat(r[3]),0,100),l=ve(isNaN(n)?1:n,0,1);return[o,i,a,l]}return null};ee.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var n=parseFloat(r[4]),o=(parseFloat(r[1])%360+360)%360,i=ve(parseFloat(r[2]),0,100),a=ve(parseFloat(r[3]),0,100),l=ve(isNaN(n)?1:n,0,1);return[o,i,a,l]}return null};ee.to.hex=function(){var e=St(arguments);return"#"+xt(e[0])+xt(e[1])+xt(e[2])+(e[3]<1?xt(Math.round(e[3]*255)):"")};ee.to.rgb=function(){var e=St(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};ee.to.rgb.percent=function(){var e=St(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"};ee.to.hsl=function(){var e=St(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};ee.to.hwb=function(){var e=St(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};ee.to.keyword=function(e){return uo[e.slice(0,3)]};function ve(e,t,r){return Math.min(Math.max(t,e),r)}function xt(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var al=ao.exports;const Ge=lo,fo={};for(const e of Object.keys(Ge))fo[Ge[e]]=e;const _={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var po=_;for(const e of Object.keys(_)){if(!("channels"in _[e]))throw new Error("missing channels property: "+e);if(!("labels"in _[e]))throw new Error("missing channel labels property: "+e);if(_[e].labels.length!==_[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=_[e];delete _[e].channels,delete _[e].labels,Object.defineProperty(_[e],"channels",{value:t}),Object.defineProperty(_[e],"labels",{value:r})}_.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=i-o;let l,s;i===o?l=0:t===i?l=(r-n)/a:r===i?l=2+(n-t)/a:n===i&&(l=4+(t-r)/a),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+i)/2;return i===o?s=0:c<=.5?s=a/(i+o):s=a/(2-i-o),[l,s*100,c*100]};_.rgb.hsv=function(e){let t,r,n,o,i;const a=e[0]/255,l=e[1]/255,s=e[2]/255,c=Math.max(a,l,s),p=c-Math.min(a,l,s),f=function(d){return(c-d)/6/p+1/2};return p===0?(o=0,i=0):(i=p/c,t=f(a),r=f(l),n=f(s),a===c?o=n-r:l===c?o=1/3+t-n:s===c&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[o*360,i*100,c*100]};_.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const o=_.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[o,i*100,n*100]};_.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n),i=(1-t-o)/(1-o)||0,a=(1-r-o)/(1-o)||0,l=(1-n-o)/(1-o)||0;return[i*100,a*100,l*100,o*100]};function ll(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}_.rgb.keyword=function(e){const t=fo[e];if(t)return t;let r=1/0,n;for(const o of Object.keys(Ge)){const i=Ge[o],a=ll(e,i);a<r&&(r=a,n=o)}return n};_.keyword.rgb=function(e){return Ge[e]};_.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;const o=t*.4124+r*.3576+n*.1805,i=t*.2126+r*.7152+n*.0722,a=t*.0193+r*.1192+n*.9505;return[o*100,i*100,a*100]};_.rgb.lab=function(e){const t=_.rgb.xyz(e);let r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const i=116*n-16,a=500*(r-n),l=200*(n-o);return[i,a,l]};_.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let o,i,a;if(r===0)return a=n*255,[a,a,a];n<.5?o=n*(1+r):o=n+r-n*r;const l=2*n-o,s=[0,0,0];for(let c=0;c<3;c++)i=t+1/3*-(c-1),i<0&&i++,i>1&&i--,6*i<1?a=l+(o-l)*6*i:2*i<1?a=o:3*i<2?a=l+(o-l)*(2/3-i)*6:a=l,s[c]=a*255;return s};_.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,o=r;const i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;const a=(n+r)/2,l=n===0?2*o/(i+o):2*r/(n+r);return[t,l*100,a*100]};_.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),a=255*n*(1-r),l=255*n*(1-r*i),s=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,s,a];case 1:return[l,n,a];case 2:return[a,n,s];case 3:return[a,l,n];case 4:return[s,a,n];case 5:return[n,a,l]}};_.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01);let i,a;a=(2-r)*n;const l=(2-r)*o;return i=r*o,i/=l<=1?l:2-l,i=i||0,a/=2,[t,i*100,a*100]};_.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const o=r+n;let i;o>1&&(r/=o,n/=o);const a=Math.floor(6*t),l=1-n;i=6*t-a,a&1&&(i=1-i);const s=r+i*(l-r);let c,p,f;switch(a){default:case 6:case 0:c=l,p=s,f=r;break;case 1:c=s,p=l,f=r;break;case 2:c=r,p=l,f=s;break;case 3:c=r,p=s,f=l;break;case 4:c=s,p=r,f=l;break;case 5:c=l,p=r,f=s;break}return[c*255,p*255,f*255]};_.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100,i=1-Math.min(1,t*(1-o)+o),a=1-Math.min(1,r*(1-o)+o),l=1-Math.min(1,n*(1-o)+o);return[i*255,a*255,l*255]};_.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let o,i,a;return o=t*3.2406+r*-1.5372+n*-.4986,i=t*-.9689+r*1.8758+n*.0415,a=t*.0557+r*-.204+n*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[o*255,i*255,a*255]};_.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;const o=116*r-16,i=500*(t-r),a=200*(r-n);return[o,i,a]};_.lab.xyz=function(e){const t=e[0],r=e[1],n=e[2];let o,i,a;i=(t+16)/116,o=r/500+i,a=i-n/200;const l=i**3,s=o**3,c=a**3;return i=l>.008856?l:(i-16/116)/7.787,o=s>.008856?s:(o-16/116)/7.787,a=c>.008856?c:(a-16/116)/7.787,o*=95.047,i*=100,a*=108.883,[o,i,a]};_.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let o;o=Math.atan2(n,r)*360/2/Math.PI,o<0&&(o+=360);const a=Math.sqrt(r*r+n*n);return[t,a,o]};_.lch.lab=function(e){const t=e[0],r=e[1],o=e[2]/360*2*Math.PI,i=r*Math.cos(o),a=r*Math.sin(o);return[t,i,a]};_.rgb.ansi16=function(e,t=null){const[r,n,o]=e;let i=t===null?_.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let a=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return i===2&&(a+=60),a};_.hsv.ansi16=function(e){return _.rgb.ansi16(_.hsv.rgb(e),e[2])};_.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};_.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=(~~(e>50)+1)*.5,n=(t&1)*r*255,o=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,o,i]};_.ansi256.rgb=function(e){if(e>=232){const i=(e-232)*10+8;return[i,i,i]}e-=16;let t;const r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,n,o]};_.rgb.hex=function(e){const r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};_.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(l=>l+l).join(""));const n=parseInt(r,16),o=n>>16&255,i=n>>8&255,a=n&255;return[o,i,a]};_.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),a=o-i;let l,s;return a<1?l=i/(1-a):l=0,a<=0?s=0:o===t?s=(r-n)/a%6:o===r?s=2+(n-t)/a:s=4+(t-r)/a,s/=6,s%=1,[s*360,a*100,l*100]};_.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],n*100,o*100]};_.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],n*100,o*100]};_.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];const o=[0,0,0],i=t%1*6,a=i%1,l=1-a;let s=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return s=(1-r)*n,[(r*o[0]+s)*255,(r*o[1]+s)*255,(r*o[2]+s)*255]};_.hcg.hsv=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);let o=0;return n>0&&(o=t/n),[e[0],o*100,n*100]};_.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let o=0;return n>0&&n<.5?o=t/(2*n):n>=.5&&n<1&&(o=t/(2*(1-n))),[e[0],o*100,n*100]};_.hcg.hwb=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};_.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,o=n-t;let i=0;return o<1&&(i=(n-o)/(1-o)),[e[0],o*100,i*100]};_.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};_.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};_.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};_.gray.hsl=function(e){return[0,0,e[0]]};_.gray.hsv=_.gray.hsl;_.gray.hwb=function(e){return[0,100,e[0]]};_.gray.cmyk=function(e){return[0,0,0,e[0]]};_.gray.lab=function(e){return[e[0],0,0]};_.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};_.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Nt=po;function sl(){const e={},t=Object.keys(Nt);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function cl(e){const t=sl(),r=[e];for(t[e].distance=0;r.length;){const n=r.pop(),o=Object.keys(Nt[n]);for(let i=o.length,a=0;a<i;a++){const l=o[a],s=t[l];s.distance===-1&&(s.distance=t[n].distance+1,s.parent=n,r.unshift(l))}}return t}function ul(e,t){return function(r){return t(e(r))}}function fl(e,t){const r=[t[e].parent,e];let n=Nt[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)r.unshift(t[o].parent),n=ul(Nt[t[o].parent][o],n),o=t[o].parent;return n.conversion=r,n}var pl=function(e){const t=cl(e),r={},n=Object.keys(t);for(let o=n.length,i=0;i<o;i++){const a=n[i];t[a].parent!==null&&(r[a]=fl(a,t))}return r};const ar=po,dl=pl,ke={},ml=Object.keys(ar);function hl(e){const t=function(...r){const n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function vl(e){const t=function(...r){const n=r[0];if(n==null)return n;n.length>1&&(r=n);const o=e(r);if(typeof o=="object")for(let i=o.length,a=0;a<i;a++)o[a]=Math.round(o[a]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}ml.forEach(e=>{ke[e]={},Object.defineProperty(ke[e],"channels",{value:ar[e].channels}),Object.defineProperty(ke[e],"labels",{value:ar[e].labels});const t=dl(e);Object.keys(t).forEach(n=>{const o=t[n];ke[e][n]=vl(o),ke[e][n].raw=hl(o)})});var gl=ke;const Te=al,Z=gl,mo=["keyword","gray","hex"],lr={};for(const e of Object.keys(Z))lr[[...Z[e].labels].sort().join("")]=e;const Bt={};function H(e,t){if(!(this instanceof H))return new H(e,t);if(t&&t in mo&&(t=null),t&&!(t in Z))throw new Error("Unknown model: "+t);let r,n;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof H)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const o=Te.get(e);if(o===null)throw new Error("Unable to parse color from string: "+e);this.model=o.model,n=Z[this.model].channels,this.color=o.value.slice(0,n),this.valpha=typeof o.value[n]=="number"?o.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=Z[this.model].channels;const o=Array.prototype.slice.call(e,0,n);this.color=sr(o,n),this.valpha=typeof e[n]=="number"?e[n]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const o=Object.keys(e);"alpha"in e&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const i=o.sort().join("");if(!(i in lr))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=lr[i];const{labels:a}=Z[this.model],l=[];for(r=0;r<a.length;r++)l.push(e[a[r]]);this.color=sr(l)}if(Bt[this.model])for(n=Z[this.model].channels,r=0;r<n;r++){const o=Bt[this.model][r];o&&(this.color[r]=o(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}H.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Te.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);const r=t.valpha===1?t.color:[...t.color,this.valpha];return Te.to[t.model](r)},percentString(e){const t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Te.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=Z[this.model],{labels:r}=Z[this.model];for(let n=0;n<t;n++)e[r[n]]=this.color[n];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new H([...this.color.map(bl(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new H([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:L("rgb",0,K(255)),green:L("rgb",1,K(255)),blue:L("rgb",2,K(255)),hue:L(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:L("hsl",1,K(100)),lightness:L("hsl",2,K(100)),saturationv:L("hsv",1,K(100)),value:L("hsv",2,K(100)),chroma:L("hcg",1,K(100)),gray:L("hcg",2,K(100)),white:L("hwb",1,K(100)),wblack:L("hwb",2,K(100)),cyan:L("cmyk",0,K(100)),magenta:L("cmyk",1,K(100)),yellow:L("cmyk",2,K(100)),black:L("cmyk",3,K(100)),x:L("xyz",0,K(95.047)),y:L("xyz",1,K(100)),z:L("xyz",2,K(108.833)),l:L("lab",0,K(100)),a:L("lab",1),b:L("lab",2),keyword(e){return e!==void 0?new H(e):Z[this.model].keyword(this.color)},hex(e){return e!==void 0?new H(e):Te.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new H(e);const t=this.rgb().round().color;let r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Te.to.hex(t)+r},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[r,n]of e.entries()){const o=n/255;t[r]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return H.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const r=e.rgb(),n=this.rgb(),o=t===void 0?.5:t,i=2*o-1,a=r.alpha()-n.alpha(),l=((i*a===-1?i:(i+a)/(1+i*a))+1)/2,s=1-l;return H.rgb(l*r.red()+s*n.red(),l*r.green()+s*n.green(),l*r.blue()+s*n.blue(),r.alpha()*o+n.alpha()*(1-o))}};for(const e of Object.keys(Z)){if(mo.includes(e))continue;const{channels:t}=Z[e];H.prototype[e]=function(...r){return this.model===e?new H(this):r.length>0?new H(r,e):new H([...wl(Z[this.model][e].raw(this.color)),this.valpha],e)},H[e]=function(...r){let n=r[0];return typeof n=="number"&&(n=sr(r,t)),new H(n,e)}}function yl(e,t){return Number(e.toFixed(t))}function bl(e){return function(t){return yl(t,e)}}function L(e,t,r){e=Array.isArray(e)?e:[e];for(const n of e)(Bt[n]||(Bt[n]=[]))[t]=r;return e=e[0],function(n){let o;return n!==void 0?(r&&(n=r(n)),o=this[e](),o.color[t]=n,o):(o=this[e]().color[t],r&&(o=r(o)),o)}}function K(e){return function(t){return Math.max(0,Math.min(e,t))}}function wl(e){return Array.isArray(e)?e:[e]}function sr(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}var Sl=H;const Ol=Wn(Sl);var Ir={},Pl=pe;Object.defineProperty(Ir,"__esModule",{value:!0});var ho=Ir.default=void 0,xl=Pl(fe()),jl=u;ho=Ir.default=(0,xl.default)((0,jl.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var _r={},Il=pe;Object.defineProperty(_r,"__esModule",{value:!0});var vo=_r.default=void 0,_l=Il(fe()),$l=u;vo=_r.default=(0,_l.default)((0,$l.jsx)("path",{d:"M7 6h10l-5.01 6.3zm-2.75-.39C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAltOutlined");function Cl(){var e=new Map;function t(r){var n=r.root,o=r.rootMargin,i=r.threshold,a=e.get(n);a||(a=new Map,e.set(n,a));var l=JSON.stringify({rootMargin:o,threshold:i}),s=a.get(l);if(!s){var c=new Map,p=new IntersectionObserver(function(f){f.forEach(function(d){var v=c.get(d.target);v==null||v(d)})},{root:n,rootMargin:o,threshold:i});s={observer:p,entryCallbacks:c},a.set(l,s)}return{observe:function(d,v){var m,h;(m=s)==null||m.entryCallbacks.set(d,v),(h=s)==null||h.observer.observe(d)},unobserve:function(d){var v,m;(v=s)==null||v.entryCallbacks.delete(d),(m=s)==null||m.observer.unobserve(d)}}}return{getObserver:t}}var El="0px",Al=[0],kl=Cl();function Tl(e){var t,r,n=(t=e==null?void 0:e.rootMargin)!=null?t:El,o=(r=e==null?void 0:e.threshold)!=null?r:Al,i=j.useRef(null),a=j.useRef(null),l=j.useRef(null),s=j.useState(),c=s[0],p=s[1],f=j.useCallback(function(){var h=i.current;if(!h){p(void 0);return}var w=kl.getObserver({root:a.current,rootMargin:n,threshold:o});w.observe(h,function(b){p(b)}),l.current=w},[n,o]),d=j.useCallback(function(){var h=l.current,w=i.current;w&&(h==null||h.unobserve(w)),l.current=null},[]),v=j.useCallback(function(h){d(),i.current=h,f()},[f,d]),m=j.useCallback(function(h){d(),a.current=h,f()},[f,d]);return[v,{entry:c,rootRef:m}]}function cr(){return cr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cr.apply(this,arguments)}function Rl(e){var t,r=Tl(e),n=r[0],o=r[1],i=!!((t=o.entry)!=null&&t.isIntersecting),a=j.useState(i),l=a[0],s=a[1];return i&&!l&&s(!0),[n,cr({},o,{isVisible:i,wasEverVisible:l})]}var Dl=100;function Ml(e){var t=e.loading,r=e.hasNextPage,n=e.onLoadMore,o=e.rootMargin,i=e.disabled,a=e.delayInMs,l=a===void 0?Dl:a,s=Rl({rootMargin:o}),c=s[0],p=s[1],f=p.rootRef,d=p.isVisible,v=!i&&!t&&d&&r;return j.useEffect(function(){if(v){var m=setTimeout(function(){n()},l);return function(){clearTimeout(m)}}},[n,v,l]),[c,{rootRef:f}]}function He(e){return{current:e}}function Ft(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];r&&clearTimeout(r),r=setTimeout(function(){return e.apply(void 0,o)},t)}}function Qe(e){return e.reduce(function(t,r){return t.concat(r)},[])}var Nl=0;function go(){return"autocomplete-".concat(Nl++)}function Lt(e,t){return t.reduce(function(r,n){return r&&r[n]},e)}function Je(e){return e.collections.length===0?0:e.collections.reduce(function(t,r){return t+r.items.length},0)}function Zr(e){return e!==Object(e)}function yo(e,t){if(e===t)return!0;if(Zr(e)||Zr(t)||typeof e=="function"||typeof t=="function")return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];if(!(o in t)||!yo(e[o],t[o]))return!1}return!0}var qt=function(){};function Bl(e){if(typeof window<"u")return e({window})}var bo="1.17.4",Fl=[{segment:"autocomplete-core",version:bo}];function en(e){var t=e.item,r=e.items,n=r===void 0?[]:r;return{index:t.__autocomplete_indexName,items:[t],positions:[1+n.findIndex(function(o){return o.objectID===t.objectID})],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function Ll(e,t){return Hl(e)||Kl(e,t)||zl(e,t)||ql()}function ql(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bM as ie,f2 as ci,f3 as ui,r as j,f4 as fi,f5 as pi,bO as nr,j as u,bT as or,dK as di,eW as mi,bU as hi,bQ as vi,bK as gi,bR as yi,cj as $e,cg as Un,b8 as bi,ch as Re,f6 as wi,f7 as Si,f8 as Oi,f9 as Ot,b9 as Pi,bh as Pt,a4 as Ht,cU as xi,aK as fe,aL as pe,g as Wn,fa as ji,fb as Ii,cF as Wr,P as y,s as Y,C as se,ai as bt,ar as Vn,an as Gn,av as _i,aO as Qn,dM as ce,dP as $i,fc as Ci,J as wr,fd as Ei,cz as Ai,fe as ki,Q as V,e$ as Vr,az as Ti,aA as Jn,aS as Ri,ez as Yn,m as J,R as Di,eT as Mi,dQ as Ni,d9 as Bi,dN as Fi,dO as Li,U as ir,D as Xn,ff as qi,fg as zi,q as Ie,fh as Ki,cx as Hi,as as Ui,B as Mt,t as Le,a6 as Wi,a7 as Zn,aD as Vi,fi as Gr,a8 as Gi,bl as Sr,x as Qi,K as Ji,cu as Yi,M as Ue,E as Pe,b as Xi,v as Zi,a$ as ea,ac as ta,dw as eo,H as ra,cd as na,eM as oa,W as ia,ax as aa}from"./index-B1ahK-2I.js";import{s as la}from"./index-DHYjjr2A.js";import{E as sa}from"./index-BMLIhSHw.js";import{d as ca}from"./Search-BkXnaF-1.js";import{S as ua}from"./index-CrPqLlr1.js";import{O as fa}from"./Select-_CZTaseY.js";import{I as Qr}from"./InputAdornment-CLNpGzfL.js";import{_ as pa,k as da,B as ma}from"./preact.module-DJUF--8d.js";import{d as ha}from"./Add-DAhuXmJ1.js";import{T as va}from"./TextField-s3PjFgNL.js";import{d as to}from"./Launch-qR9d30uC.js";import{d as ga}from"./Done-5TItrtsm.js";import{d as ro}from"./DeleteOutline-BNzcbICD.js";import{C as ya}from"./delete-confirm-lfp_3VFJ.js";import{u as ba}from"./blocklet-CjG3S1lO.js";import{d as wa}from"./MoreVert-DIRoN8EP.js";import{B as Jr}from"./ButtonGroup-BCRFvUIs.js";const Sa=(e,t)=>e.filter(r=>t.includes(r)),qe=(e,t,r)=>{const n=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{r((a,l)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,l):a[e.up(e.keys[i])]=l)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:Sa(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.indexOf(i)!==-1){const a=t[i];a!==void 0&&r((l,s)=>{n===i?Object.assign(l,s):l[e.up(i)]=s},a)}}):(typeof t=="number"||typeof t=="string")&&r((o,i)=>{Object.assign(o,i)},t)};function ue(e){return e?`Level${e}`:""}function wt(e){return e.unstable_level>0&&e.container}function no(e){return function(r){return`var(--Grid-${r}Spacing${ue(e.unstable_level)})`}}function Or(e){return function(r){return e.unstable_level===0?`var(--Grid-${r}Spacing)`:`var(--Grid-${r}Spacing${ue(e.unstable_level-1)})`}}function Pr(e){return e.unstable_level===0?"var(--Grid-columns)":`var(--Grid-columns${ue(e.unstable_level-1)})`}const Oa=({theme:e,ownerState:t})=>{const r=no(t),n={};return qe(e.breakpoints,t.gridSize,(o,i)=>{let a={};i===!0&&(a={flexBasis:0,flexGrow:1,maxWidth:"100%"}),i==="auto"&&(a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof i=="number"&&(a={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${i} / ${Pr(t)}${wt(t)?` + ${r("column")}`:""})`}),o(n,a)}),n},Pa=({theme:e,ownerState:t})=>{const r={};return qe(e.breakpoints,t.gridOffset,(n,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / ${Pr(t)})`}),n(r,i)}),r},xa=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=wt(t)?{[`--Grid-columns${ue(t.unstable_level)}`]:Pr(t)}:{"--Grid-columns":12};return qe(e.breakpoints,t.columns,(n,o)=>{n(r,{[`--Grid-columns${ue(t.unstable_level)}`]:o})}),r},ja=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Or(t),n=wt(t)?{[`--Grid-rowSpacing${ue(t.unstable_level)}`]:r("row")}:{};return qe(e.breakpoints,t.rowSpacing,(o,i)=>{var a;o(n,{[`--Grid-rowSpacing${ue(t.unstable_level)}`]:typeof i=="string"?i:(a=e.spacing)==null?void 0:a.call(e,i)})}),n},Ia=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Or(t),n=wt(t)?{[`--Grid-columnSpacing${ue(t.unstable_level)}`]:r("column")}:{};return qe(e.breakpoints,t.columnSpacing,(o,i)=>{var a;o(n,{[`--Grid-columnSpacing${ue(t.unstable_level)}`]:typeof i=="string"?i:(a=e.spacing)==null?void 0:a.call(e,i)})}),n},_a=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return qe(e.breakpoints,t.direction,(n,o)=>{n(r,{flexDirection:o})}),r},$a=({ownerState:e})=>{const t=no(e),r=Or(e);return ie({minWidth:0,boxSizing:"border-box"},e.container&&ie({display:"flex",flexWrap:"wrap"},e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||wt(e))&&ie({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},Ca=e=>{const t=[];return Object.entries(e).forEach(([r,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${r}-${String(n)}`)}),t},Ea=(e,t="xs")=>{function r(n){return n===void 0?!1:typeof n=="string"&&!Number.isNaN(Number(n))||typeof n=="number"&&n>0}if(r(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const n=[];return Object.entries(e).forEach(([o,i])=>{r(i)&&n.push(`spacing-${o}-${String(i)}`)}),n}return[]},Aa=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,r])=>`direction-${t}-${r}`):[`direction-xs-${String(e)}`],ka=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],Ta=ci(),Ra=ui("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function Da(e){return mi({props:e,name:"MuiGrid",defaultTheme:Ta})}function Ma(e={}){const{createStyledComponent:t=Ra,useThemeProps:r=Da,componentName:n="MuiGrid"}=e,o=j.createContext(void 0),i=(s,c)=>{const{container:p,direction:f,spacing:d,wrap:v,gridSize:m}=s,h={root:["root",p&&"container",v!=="wrap"&&`wrap-xs-${String(v)}`,...Aa(f),...Ca(m),...p?Ea(d,c.breakpoints.keys[0]):[]]};return hi(h,w=>vi(n,w),{})},a=t(xa,Ia,ja,Oa,_a,$a,Pa),l=j.forwardRef(function(c,p){var f,d,v,m,h,w,b,g;const S=fi(),O=r(c),P=pi(O),C=j.useContext(o),{className:$,children:E,columns:A=12,container:x=!1,component:k="div",direction:M="row",wrap:q="wrap",spacing:G=0,rowSpacing:T=G,columnSpacing:N=G,disableEqualOverflow:Q,unstable_level:I=0}=P,D=nr(P,ka);let F=Q;I&&Q!==void 0&&(F=c.disableEqualOverflow);const X={},ye={},Hr={};Object.entries(D).forEach(([ne,_e])=>{S.breakpoints.values[ne]!==void 0?X[ne]=_e:S.breakpoints.values[ne.replace("Offset","")]!==void 0?ye[ne.replace("Offset","")]=_e:Hr[ne]=_e});const oi=(f=c.columns)!=null?f:I?void 0:A,ii=(d=c.spacing)!=null?d:I?void 0:G,ai=(v=(m=c.rowSpacing)!=null?m:c.spacing)!=null?v:I?void 0:T,li=(h=(w=c.columnSpacing)!=null?w:c.spacing)!=null?h:I?void 0:N,Ur=ie({},P,{level:I,columns:oi,container:x,direction:M,wrap:q,spacing:ii,rowSpacing:ai,columnSpacing:li,gridSize:X,gridOffset:ye,disableEqualOverflow:(b=(g=F)!=null?g:C)!=null?b:!1,parentDisableEqualOverflow:C}),si=i(Ur,S);let Vt=u.jsx(a,ie({ref:p,as:k,ownerState:Ur,className:or(si.root,$)},Hr,{children:j.Children.map(E,ne=>{if(j.isValidElement(ne)&&di(ne,["Grid"])){var _e;return j.cloneElement(ne,{unstable_level:(_e=ne.props.unstable_level)!=null?_e:I+1})}return ne})}));return F!==void 0&&F!==(C??!1)&&(Vt=u.jsx(o.Provider,{value:F,children:Vt})),Vt});return l.muiName="Grid",l}const Gt=Ma({createStyledComponent:gi("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>yi({props:e,name:"MuiGrid2"})});var Na=function(e){return e===document||e===document.documentElement||e===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):e.scrollTop},Ba=function(e){return e.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)},Fa=function(e){return e.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)},La=function(e,t){t===void 0&&(t={});var r=t.target,n=t.isNoMore,o=t.threshold,i=o===void 0?100:o,a=t.reloadDeps,l=a===void 0?[]:a,s=t.manual,c=t.onBefore,p=t.onSuccess,f=t.onError,d=t.onFinally,v=$e(j.useState(),2),m=v[0],h=v[1],w=$e(j.useState(!1),2),b=w[0],g=w[1],S=j.useMemo(function(){return n?n(m):!1},[m]),O=Un(function(T){return bi(void 0,void 0,void 0,function(){var N,Q,I;return Pi(this,function(D){switch(D.label){case 0:return[4,e(T)];case 1:return N=D.sent(),h(T?Pt(Pt({},N),{list:Ot(Ot([],$e((I=T.list)!==null&&I!==void 0?I:[]),!1),$e(N.list),!1)}):Pt(Pt({},N),{list:Ot([],$e((Q=N.list)!==null&&Q!==void 0?Q:[]),!1)})),[2,N]}})})},{manual:s,onFinally:function(T,N,Q){g(!1),d==null||d(N,Q)},onBefore:function(){return c==null?void 0:c()},onSuccess:function(T){setTimeout(function(){G()}),p==null||p(T)},onError:function(T){return f==null?void 0:f(T)}}),P=O.loading,C=O.error,$=O.run,E=O.runAsync,A=O.cancel,x=Re(function(){S||(g(!0),$(m))}),k=Re(function(){return S?Promise.reject():(g(!0),E(m))}),M=function(){return g(!1),$()},q=function(){return g(!1),E()},G=function(){var T=wi(r);if(T){T=T===document?document.documentElement:T;var N=Na(T),Q=Ba(T),I=Fa(T);Q-N<=I+i&&x()}};return Si("scroll",function(){P||b||G()},{target:r}),Oi(function(){$()},Ot([],$e(l),!1)),{data:m,loading:!b&&P,error:C,loadingMore:b,noMore:S,loadMore:x,loadMoreAsync:k,reload:Re(M),reloadAsync:Re(q),mutate:h,cancel:A}};const qa=["name"],za=["children","className","clone","component"];function Ka(e,t){const r={};return Object.keys(e).forEach(n=>{t.indexOf(n)===-1&&(r[n]=e[n])}),r}function Ha(e){return(r,n={})=>{const{name:o}=n,i=nr(n,qa);let a=o;const s=Ht(typeof r=="function"?f=>({root:d=>r(ie({theme:f},d))}):{root:r},ie({Component:e,name:o||e.displayName,classNamePrefix:a},i));let c;r.filterProps&&(c=r.filterProps,delete r.filterProps),r.propTypes&&(r.propTypes,delete r.propTypes);const p=j.forwardRef(function(d,v){const{children:m,className:h,clone:w,component:b}=d,g=nr(d,za),S=s(d),O=or(S.root,h);let P=g;if(c&&(P=Ka(P,c)),w)return j.cloneElement(m,ie({className:or(m.props.className,O)},P));if(typeof m=="function")return m(ie({className:O},P));const C=b||e;return u.jsx(C,ie({ref:v,className:O},P,{children:m}))});return xi(p,e),p}}const Xp="blocklet-add-component-registry",Zp="server-add-registry";var xr={},Ua=pe;Object.defineProperty(xr,"__esModule",{value:!0});var oo=xr.default=void 0,Wa=Ua(fe()),Va=u;oo=xr.default=(0,Wa.default)((0,Va.jsx)("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"Sort");var jr={},Ga=pe;Object.defineProperty(jr,"__esModule",{value:!0});var io=jr.default=void 0,Qa=Ga(fe()),Ja=u;io=jr.default=(0,Qa.default)((0,Ja.jsx)("path",{d:"M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25m6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8"}),"Face");var Ya=ji,Yr=Ii;function Xa(e,t,r,n){return e==null?[]:(Yr(t)||(t=t==null?[]:[t]),r=n?void 0:r,Yr(r)||(r=r==null?[]:[r]),Ya(e,t,r))}var Za=Xa;const el=Wn(Za);var ao={exports:{}},lo={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},so={exports:{}},tl=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},rl=tl,nl=Array.prototype.concat,ol=Array.prototype.slice,Xr=so.exports=function(t){for(var r=[],n=0,o=t.length;n<o;n++){var i=t[n];rl(i)?r=nl.call(r,ol.call(i)):r.push(i)}return r};Xr.wrap=function(e){return function(){return e(Xr(arguments))}};var il=so.exports,We=lo,St=il,co=Object.hasOwnProperty,uo=Object.create(null);for(var Qt in We)co.call(We,Qt)&&(uo[We[Qt]]=Qt);var ee=ao.exports={to:{},get:{}};ee.get=function(e){var t=e.substring(0,3).toLowerCase(),r,n;switch(t){case"hsl":r=ee.get.hsl(e),n="hsl";break;case"hwb":r=ee.get.hwb(e),n="hwb";break;default:r=ee.get.rgb(e),n="rgb";break}return r?{model:n,value:r}:null};ee.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^(\w+)$/,a=[0,0,0,1],l,s,c;if(l=e.match(r)){for(c=l[2],l=l[1],s=0;s<3;s++){var p=s*2;a[s]=parseInt(l.slice(p,p+2),16)}c&&(a[3]=parseInt(c,16)/255)}else if(l=e.match(t)){for(l=l[1],c=l[3],s=0;s<3;s++)a[s]=parseInt(l[s]+l[s],16);c&&(a[3]=parseInt(c+c,16)/255)}else if(l=e.match(n)){for(s=0;s<3;s++)a[s]=parseInt(l[s+1],0);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else if(l=e.match(o)){for(s=0;s<3;s++)a[s]=Math.round(parseFloat(l[s+1])*2.55);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else return(l=e.match(i))?l[1]==="transparent"?[0,0,0,0]:co.call(We,l[1])?(a=We[l[1]],a[3]=1,a):null:null;for(s=0;s<3;s++)a[s]=ve(a[s],0,255);return a[3]=ve(a[3],0,1),a};ee.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var n=parseFloat(r[4]),o=(parseFloat(r[1])%360+360)%360,i=ve(parseFloat(r[2]),0,100),a=ve(parseFloat(r[3]),0,100),l=ve(isNaN(n)?1:n,0,1);return[o,i,a,l]}return null};ee.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var n=parseFloat(r[4]),o=(parseFloat(r[1])%360+360)%360,i=ve(parseFloat(r[2]),0,100),a=ve(parseFloat(r[3]),0,100),l=ve(isNaN(n)?1:n,0,1);return[o,i,a,l]}return null};ee.to.hex=function(){var e=St(arguments);return"#"+xt(e[0])+xt(e[1])+xt(e[2])+(e[3]<1?xt(Math.round(e[3]*255)):"")};ee.to.rgb=function(){var e=St(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};ee.to.rgb.percent=function(){var e=St(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"};ee.to.hsl=function(){var e=St(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};ee.to.hwb=function(){var e=St(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};ee.to.keyword=function(e){return uo[e.slice(0,3)]};function ve(e,t,r){return Math.min(Math.max(t,e),r)}function xt(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var al=ao.exports;const Ge=lo,fo={};for(const e of Object.keys(Ge))fo[Ge[e]]=e;const _={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var po=_;for(const e of Object.keys(_)){if(!("channels"in _[e]))throw new Error("missing channels property: "+e);if(!("labels"in _[e]))throw new Error("missing channel labels property: "+e);if(_[e].labels.length!==_[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=_[e];delete _[e].channels,delete _[e].labels,Object.defineProperty(_[e],"channels",{value:t}),Object.defineProperty(_[e],"labels",{value:r})}_.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=i-o;let l,s;i===o?l=0:t===i?l=(r-n)/a:r===i?l=2+(n-t)/a:n===i&&(l=4+(t-r)/a),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+i)/2;return i===o?s=0:c<=.5?s=a/(i+o):s=a/(2-i-o),[l,s*100,c*100]};_.rgb.hsv=function(e){let t,r,n,o,i;const a=e[0]/255,l=e[1]/255,s=e[2]/255,c=Math.max(a,l,s),p=c-Math.min(a,l,s),f=function(d){return(c-d)/6/p+1/2};return p===0?(o=0,i=0):(i=p/c,t=f(a),r=f(l),n=f(s),a===c?o=n-r:l===c?o=1/3+t-n:s===c&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[o*360,i*100,c*100]};_.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const o=_.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[o,i*100,n*100]};_.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n),i=(1-t-o)/(1-o)||0,a=(1-r-o)/(1-o)||0,l=(1-n-o)/(1-o)||0;return[i*100,a*100,l*100,o*100]};function ll(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}_.rgb.keyword=function(e){const t=fo[e];if(t)return t;let r=1/0,n;for(const o of Object.keys(Ge)){const i=Ge[o],a=ll(e,i);a<r&&(r=a,n=o)}return n};_.keyword.rgb=function(e){return Ge[e]};_.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;const o=t*.4124+r*.3576+n*.1805,i=t*.2126+r*.7152+n*.0722,a=t*.0193+r*.1192+n*.9505;return[o*100,i*100,a*100]};_.rgb.lab=function(e){const t=_.rgb.xyz(e);let r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const i=116*n-16,a=500*(r-n),l=200*(n-o);return[i,a,l]};_.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let o,i,a;if(r===0)return a=n*255,[a,a,a];n<.5?o=n*(1+r):o=n+r-n*r;const l=2*n-o,s=[0,0,0];for(let c=0;c<3;c++)i=t+1/3*-(c-1),i<0&&i++,i>1&&i--,6*i<1?a=l+(o-l)*6*i:2*i<1?a=o:3*i<2?a=l+(o-l)*(2/3-i)*6:a=l,s[c]=a*255;return s};_.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,o=r;const i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;const a=(n+r)/2,l=n===0?2*o/(i+o):2*r/(n+r);return[t,l*100,a*100]};_.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),a=255*n*(1-r),l=255*n*(1-r*i),s=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,s,a];case 1:return[l,n,a];case 2:return[a,n,s];case 3:return[a,l,n];case 4:return[s,a,n];case 5:return[n,a,l]}};_.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01);let i,a;a=(2-r)*n;const l=(2-r)*o;return i=r*o,i/=l<=1?l:2-l,i=i||0,a/=2,[t,i*100,a*100]};_.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const o=r+n;let i;o>1&&(r/=o,n/=o);const a=Math.floor(6*t),l=1-n;i=6*t-a,a&1&&(i=1-i);const s=r+i*(l-r);let c,p,f;switch(a){default:case 6:case 0:c=l,p=s,f=r;break;case 1:c=s,p=l,f=r;break;case 2:c=r,p=l,f=s;break;case 3:c=r,p=s,f=l;break;case 4:c=s,p=r,f=l;break;case 5:c=l,p=r,f=s;break}return[c*255,p*255,f*255]};_.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100,i=1-Math.min(1,t*(1-o)+o),a=1-Math.min(1,r*(1-o)+o),l=1-Math.min(1,n*(1-o)+o);return[i*255,a*255,l*255]};_.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let o,i,a;return o=t*3.2406+r*-1.5372+n*-.4986,i=t*-.9689+r*1.8758+n*.0415,a=t*.0557+r*-.204+n*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[o*255,i*255,a*255]};_.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;const o=116*r-16,i=500*(t-r),a=200*(r-n);return[o,i,a]};_.lab.xyz=function(e){const t=e[0],r=e[1],n=e[2];let o,i,a;i=(t+16)/116,o=r/500+i,a=i-n/200;const l=i**3,s=o**3,c=a**3;return i=l>.008856?l:(i-16/116)/7.787,o=s>.008856?s:(o-16/116)/7.787,a=c>.008856?c:(a-16/116)/7.787,o*=95.047,i*=100,a*=108.883,[o,i,a]};_.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let o;o=Math.atan2(n,r)*360/2/Math.PI,o<0&&(o+=360);const a=Math.sqrt(r*r+n*n);return[t,a,o]};_.lch.lab=function(e){const t=e[0],r=e[1],o=e[2]/360*2*Math.PI,i=r*Math.cos(o),a=r*Math.sin(o);return[t,i,a]};_.rgb.ansi16=function(e,t=null){const[r,n,o]=e;let i=t===null?_.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let a=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return i===2&&(a+=60),a};_.hsv.ansi16=function(e){return _.rgb.ansi16(_.hsv.rgb(e),e[2])};_.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};_.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=(~~(e>50)+1)*.5,n=(t&1)*r*255,o=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,o,i]};_.ansi256.rgb=function(e){if(e>=232){const i=(e-232)*10+8;return[i,i,i]}e-=16;let t;const r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,n,o]};_.rgb.hex=function(e){const r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};_.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(l=>l+l).join(""));const n=parseInt(r,16),o=n>>16&255,i=n>>8&255,a=n&255;return[o,i,a]};_.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),a=o-i;let l,s;return a<1?l=i/(1-a):l=0,a<=0?s=0:o===t?s=(r-n)/a%6:o===r?s=2+(n-t)/a:s=4+(t-r)/a,s/=6,s%=1,[s*360,a*100,l*100]};_.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],n*100,o*100]};_.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],n*100,o*100]};_.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];const o=[0,0,0],i=t%1*6,a=i%1,l=1-a;let s=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return s=(1-r)*n,[(r*o[0]+s)*255,(r*o[1]+s)*255,(r*o[2]+s)*255]};_.hcg.hsv=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);let o=0;return n>0&&(o=t/n),[e[0],o*100,n*100]};_.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let o=0;return n>0&&n<.5?o=t/(2*n):n>=.5&&n<1&&(o=t/(2*(1-n))),[e[0],o*100,n*100]};_.hcg.hwb=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};_.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,o=n-t;let i=0;return o<1&&(i=(n-o)/(1-o)),[e[0],o*100,i*100]};_.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};_.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};_.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};_.gray.hsl=function(e){return[0,0,e[0]]};_.gray.hsv=_.gray.hsl;_.gray.hwb=function(e){return[0,100,e[0]]};_.gray.cmyk=function(e){return[0,0,0,e[0]]};_.gray.lab=function(e){return[e[0],0,0]};_.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};_.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Nt=po;function sl(){const e={},t=Object.keys(Nt);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function cl(e){const t=sl(),r=[e];for(t[e].distance=0;r.length;){const n=r.pop(),o=Object.keys(Nt[n]);for(let i=o.length,a=0;a<i;a++){const l=o[a],s=t[l];s.distance===-1&&(s.distance=t[n].distance+1,s.parent=n,r.unshift(l))}}return t}function ul(e,t){return function(r){return t(e(r))}}function fl(e,t){const r=[t[e].parent,e];let n=Nt[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)r.unshift(t[o].parent),n=ul(Nt[t[o].parent][o],n),o=t[o].parent;return n.conversion=r,n}var pl=function(e){const t=cl(e),r={},n=Object.keys(t);for(let o=n.length,i=0;i<o;i++){const a=n[i];t[a].parent!==null&&(r[a]=fl(a,t))}return r};const ar=po,dl=pl,ke={},ml=Object.keys(ar);function hl(e){const t=function(...r){const n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function vl(e){const t=function(...r){const n=r[0];if(n==null)return n;n.length>1&&(r=n);const o=e(r);if(typeof o=="object")for(let i=o.length,a=0;a<i;a++)o[a]=Math.round(o[a]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}ml.forEach(e=>{ke[e]={},Object.defineProperty(ke[e],"channels",{value:ar[e].channels}),Object.defineProperty(ke[e],"labels",{value:ar[e].labels});const t=dl(e);Object.keys(t).forEach(n=>{const o=t[n];ke[e][n]=vl(o),ke[e][n].raw=hl(o)})});var gl=ke;const Te=al,Z=gl,mo=["keyword","gray","hex"],lr={};for(const e of Object.keys(Z))lr[[...Z[e].labels].sort().join("")]=e;const Bt={};function H(e,t){if(!(this instanceof H))return new H(e,t);if(t&&t in mo&&(t=null),t&&!(t in Z))throw new Error("Unknown model: "+t);let r,n;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof H)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const o=Te.get(e);if(o===null)throw new Error("Unable to parse color from string: "+e);this.model=o.model,n=Z[this.model].channels,this.color=o.value.slice(0,n),this.valpha=typeof o.value[n]=="number"?o.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=Z[this.model].channels;const o=Array.prototype.slice.call(e,0,n);this.color=sr(o,n),this.valpha=typeof e[n]=="number"?e[n]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const o=Object.keys(e);"alpha"in e&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const i=o.sort().join("");if(!(i in lr))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=lr[i];const{labels:a}=Z[this.model],l=[];for(r=0;r<a.length;r++)l.push(e[a[r]]);this.color=sr(l)}if(Bt[this.model])for(n=Z[this.model].channels,r=0;r<n;r++){const o=Bt[this.model][r];o&&(this.color[r]=o(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}H.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Te.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);const r=t.valpha===1?t.color:[...t.color,this.valpha];return Te.to[t.model](r)},percentString(e){const t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Te.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=Z[this.model],{labels:r}=Z[this.model];for(let n=0;n<t;n++)e[r[n]]=this.color[n];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new H([...this.color.map(bl(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new H([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:L("rgb",0,K(255)),green:L("rgb",1,K(255)),blue:L("rgb",2,K(255)),hue:L(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:L("hsl",1,K(100)),lightness:L("hsl",2,K(100)),saturationv:L("hsv",1,K(100)),value:L("hsv",2,K(100)),chroma:L("hcg",1,K(100)),gray:L("hcg",2,K(100)),white:L("hwb",1,K(100)),wblack:L("hwb",2,K(100)),cyan:L("cmyk",0,K(100)),magenta:L("cmyk",1,K(100)),yellow:L("cmyk",2,K(100)),black:L("cmyk",3,K(100)),x:L("xyz",0,K(95.047)),y:L("xyz",1,K(100)),z:L("xyz",2,K(108.833)),l:L("lab",0,K(100)),a:L("lab",1),b:L("lab",2),keyword(e){return e!==void 0?new H(e):Z[this.model].keyword(this.color)},hex(e){return e!==void 0?new H(e):Te.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new H(e);const t=this.rgb().round().color;let r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Te.to.hex(t)+r},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[r,n]of e.entries()){const o=n/255;t[r]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return H.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const r=e.rgb(),n=this.rgb(),o=t===void 0?.5:t,i=2*o-1,a=r.alpha()-n.alpha(),l=((i*a===-1?i:(i+a)/(1+i*a))+1)/2,s=1-l;return H.rgb(l*r.red()+s*n.red(),l*r.green()+s*n.green(),l*r.blue()+s*n.blue(),r.alpha()*o+n.alpha()*(1-o))}};for(const e of Object.keys(Z)){if(mo.includes(e))continue;const{channels:t}=Z[e];H.prototype[e]=function(...r){return this.model===e?new H(this):r.length>0?new H(r,e):new H([...wl(Z[this.model][e].raw(this.color)),this.valpha],e)},H[e]=function(...r){let n=r[0];return typeof n=="number"&&(n=sr(r,t)),new H(n,e)}}function yl(e,t){return Number(e.toFixed(t))}function bl(e){return function(t){return yl(t,e)}}function L(e,t,r){e=Array.isArray(e)?e:[e];for(const n of e)(Bt[n]||(Bt[n]=[]))[t]=r;return e=e[0],function(n){let o;return n!==void 0?(r&&(n=r(n)),o=this[e](),o.color[t]=n,o):(o=this[e]().color[t],r&&(o=r(o)),o)}}function K(e){return function(t){return Math.max(0,Math.min(e,t))}}function wl(e){return Array.isArray(e)?e:[e]}function sr(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}var Sl=H;const Ol=Wn(Sl);var Ir={},Pl=pe;Object.defineProperty(Ir,"__esModule",{value:!0});var ho=Ir.default=void 0,xl=Pl(fe()),jl=u;ho=Ir.default=(0,xl.default)((0,jl.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var _r={},Il=pe;Object.defineProperty(_r,"__esModule",{value:!0});var vo=_r.default=void 0,_l=Il(fe()),$l=u;vo=_r.default=(0,_l.default)((0,$l.jsx)("path",{d:"M7 6h10l-5.01 6.3zm-2.75-.39C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAltOutlined");function Cl(){var e=new Map;function t(r){var n=r.root,o=r.rootMargin,i=r.threshold,a=e.get(n);a||(a=new Map,e.set(n,a));var l=JSON.stringify({rootMargin:o,threshold:i}),s=a.get(l);if(!s){var c=new Map,p=new IntersectionObserver(function(f){f.forEach(function(d){var v=c.get(d.target);v==null||v(d)})},{root:n,rootMargin:o,threshold:i});s={observer:p,entryCallbacks:c},a.set(l,s)}return{observe:function(d,v){var m,h;(m=s)==null||m.entryCallbacks.set(d,v),(h=s)==null||h.observer.observe(d)},unobserve:function(d){var v,m;(v=s)==null||v.entryCallbacks.delete(d),(m=s)==null||m.observer.unobserve(d)}}}return{getObserver:t}}var El="0px",Al=[0],kl=Cl();function Tl(e){var t,r,n=(t=e==null?void 0:e.rootMargin)!=null?t:El,o=(r=e==null?void 0:e.threshold)!=null?r:Al,i=j.useRef(null),a=j.useRef(null),l=j.useRef(null),s=j.useState(),c=s[0],p=s[1],f=j.useCallback(function(){var h=i.current;if(!h){p(void 0);return}var w=kl.getObserver({root:a.current,rootMargin:n,threshold:o});w.observe(h,function(b){p(b)}),l.current=w},[n,o]),d=j.useCallback(function(){var h=l.current,w=i.current;w&&(h==null||h.unobserve(w)),l.current=null},[]),v=j.useCallback(function(h){d(),i.current=h,f()},[f,d]),m=j.useCallback(function(h){d(),a.current=h,f()},[f,d]);return[v,{entry:c,rootRef:m}]}function cr(){return cr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cr.apply(this,arguments)}function Rl(e){var t,r=Tl(e),n=r[0],o=r[1],i=!!((t=o.entry)!=null&&t.isIntersecting),a=j.useState(i),l=a[0],s=a[1];return i&&!l&&s(!0),[n,cr({},o,{isVisible:i,wasEverVisible:l})]}var Dl=100;function Ml(e){var t=e.loading,r=e.hasNextPage,n=e.onLoadMore,o=e.rootMargin,i=e.disabled,a=e.delayInMs,l=a===void 0?Dl:a,s=Rl({rootMargin:o}),c=s[0],p=s[1],f=p.rootRef,d=p.isVisible,v=!i&&!t&&d&&r;return j.useEffect(function(){if(v){var m=setTimeout(function(){n()},l);return function(){clearTimeout(m)}}},[n,v,l]),[c,{rootRef:f}]}function He(e){return{current:e}}function Ft(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];r&&clearTimeout(r),r=setTimeout(function(){return e.apply(void 0,o)},t)}}function Qe(e){return e.reduce(function(t,r){return t.concat(r)},[])}var Nl=0;function go(){return"autocomplete-".concat(Nl++)}function Lt(e,t){return t.reduce(function(r,n){return r&&r[n]},e)}function Je(e){return e.collections.length===0?0:e.collections.reduce(function(t,r){return t+r.items.length},0)}function Zr(e){return e!==Object(e)}function yo(e,t){if(e===t)return!0;if(Zr(e)||Zr(t)||typeof e=="function"||typeof t=="function")return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];if(!(o in t)||!yo(e[o],t[o]))return!1}return!0}var qt=function(){};function Bl(e){if(typeof window<"u")return e({window})}var bo="1.17.4",Fl=[{segment:"autocomplete-core",version:bo}];function en(e){var t=e.item,r=e.items,n=r===void 0?[]:r;return{index:t.__autocomplete_indexName,items:[t],positions:[1+n.findIndex(function(o){return o.objectID===t.objectID})],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function Ll(e,t){return Hl(e)||Kl(e,t)||zl(e,t)||ql()}function ql(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zl(e,t){if(e){if(typeof e=="string")return tn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tn(e,t)}}function tn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kl(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(p){c=!0,o=p}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}function Hl(e){if(Array.isArray(e))return e}function Ul(e){var t=(e.version||"").split(".").map(Number),r=Ll(t,2),n=r[0],o=r[1],i=n>=3,a=n===2&&o>=4,l=n===1&&o>=10;return i||a||l}var Wl=["items"],Vl=["items"];function Ye(e){"@babel/helpers - typeof";return Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ye(e)}function jt(e){return Yl(e)||Jl(e)||Ql(e)||Gl()}function Gl(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ql(e,t){if(e){if(typeof e=="string")return ur(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ur(e,t)}}function Jl(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yl(e){if(Array.isArray(e))return ur(e)}function ur(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wo(e,t){if(e==null)return{};var r=Xl(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Xl(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function rn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rn(Object(r),!0).forEach(function(n){Zl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zl(e,t,r){return t=es(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function es(e){var t=ts(e,"string");return Ye(t)==="symbol"?t:String(t)}function ts(e,t){if(Ye(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ye(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rs(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,r=[],n=0;n<e.objectIDs.length;n+=t)r.push(Ne(Ne({},e),{},{objectIDs:e.objectIDs.slice(n,n+t)}));return r}function It(e){return e.map(function(t){var r=t.items,n=wo(t,Wl);return Ne(Ne({},n),{},{objectIDs:(r==null?void 0:r.map(function(o){var i=o.objectID;return i}))||n.objectIDs})})}function ns(e){var t=Ul(e);function r(n,o,i){if(t&&typeof i<"u"){var a=i[0].__autocomplete_algoliaCredentials,l=a.appId,s=a.apiKey,c={"X-Algolia-Application-Id":l,"X-Algolia-API-Key":s};e.apply(void 0,[n].concat(jt(o),[{headers:c}]))}else e.apply(void 0,[n].concat(jt(o)))}return{init:function(o,i){e("init",{appId:o,apiKey:i})},setAuthenticatedUserToken:function(o){e("setAuthenticatedUserToken",o)},setUserToken:function(o){e("setUserToken",o)},clickedObjectIDsAfterSearch:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&r("clickedObjectIDsAfterSearch",It(i),i[0].items)},clickedObjectIDs:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&r("clickedObjectIDs",It(i),i[0].items)},clickedFilters:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&e.apply(void 0,["clickedFilters"].concat(i))},convertedObjectIDsAfterSearch:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&r("convertedObjectIDsAfterSearch",It(i),i[0].items)},convertedObjectIDs:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&r("convertedObjectIDs",It(i),i[0].items)},convertedFilters:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&e.apply(void 0,["convertedFilters"].concat(i))},viewedObjectIDs:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&i.reduce(function(l,s){var c=s.items,p=wo(s,Vl);return[].concat(jt(l),jt(rs(Ne(Ne({},p),{},{objectIDs:(c==null?void 0:c.map(function(f){var d=f.objectID;return d}))||p.objectIDs})).map(function(f){return{items:c,payload:f}})))},[]).forEach(function(l){var s=l.items,c=l.payload;return r("viewedObjectIDs",[c],s)})},viewedFilters:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&e.apply(void 0,["viewedFilters"].concat(i))}}}function os(e){var t=e.items,r=t.reduce(function(n,o){var i;return n[o.__autocomplete_indexName]=((i=n[o.__autocomplete_indexName])!==null&&i!==void 0?i:[]).concat(o),n},{});return Object.keys(r).map(function(n){var o=r[n];return{index:n,items:o,algoliaSource:["autocomplete"]}})}function ze(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function Xe(e){"@babel/helpers - typeof";return Xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xe(e)}function Be(e){return ss(e)||ls(e)||as(e)||is()}function is(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function as(e,t){if(e){if(typeof e=="string")return fr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fr(e,t)}}function ls(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ss(e){if(Array.isArray(e))return fr(e)}function fr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nn(Object(r),!0).forEach(function(n){cs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cs(e,t,r){return t=us(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function us(e){var t=fs(e,"string");return Xe(t)==="symbol"?t:String(t)}function fs(e,t){if(Xe(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ps=400,So="2.15.0",ds="https://cdn.jsdelivr.net/npm/search-insights@".concat(So,"/dist/search-insights.min.js"),ms=Ft(function(e){var t=e.onItemsChange,r=e.items,n=e.insights,o=e.state;t({insights:n,insightsEvents:os({items:r}).map(function(i){return oe({eventName:"Items Viewed"},i)}),state:o})},ps);function on(e){var t=hs(e),r=t.insightsClient,n=t.insightsInitParams,o=t.onItemsChange,i=t.onSelect,a=t.onActive,l=t.__autocomplete_clickAnalytics,s=r;if(r||Bl(function(d){var v=d.window,m=v.AlgoliaAnalyticsObject||"aa";typeof m=="string"&&(s=v[m]),s||(v.AlgoliaAnalyticsObject=m,v[m]||(v[m]=function(){v[m].queue||(v[m].queue=[]);for(var h=arguments.length,w=new Array(h),b=0;b<h;b++)w[b]=arguments[b];v[m].queue.push(w)}),v[m].version=So,s=v[m],vs(v))}),!s)return{};n&&s("init",oe({partial:!0},n));var c=ns(s),p=He([]),f=Ft(function(d){var v=d.state;if(v.isOpen){var m=v.collections.reduce(function(h,w){return[].concat(Be(h),Be(w.items))},[]).filter(ze);yo(p.current.map(function(h){return h.objectID}),m.map(function(h){return h.objectID}))||(p.current=m,m.length>0&&ms({onItemsChange:o,items:m,insights:c,state:v}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(v){var m=v.setContext,h=v.onSelect,w=v.onActive,b=!1;function g(S){m({algoliaInsightsPlugin:{__algoliaSearchParameters:oe(oe({},l?{clickAnalytics:!0}:{}),S?{userToken:gs(S)}:{}),insights:c}})}s("addAlgoliaAgent","insights-plugin"),g(),s("onUserTokenChange",function(S){b||g(S)}),s("getUserToken",null,function(S,O){b||g(O)}),s("onAuthenticatedUserTokenChange",function(S){S?(b=!0,g(S)):(b=!1,s("getUserToken",null,function(O,P){return g(P)}))}),s("getAuthenticatedUserToken",null,function(S,O){O&&(b=!0,g(O))}),h(function(S){var O=S.item,P=S.state,C=S.event,$=S.source;ze(O)&&i({state:P,event:C,insights:c,item:O,insightsEvents:[oe({eventName:"Item Selected"},en({item:O,items:$.getItems().filter(ze)}))]})}),w(function(S){var O=S.item,P=S.source,C=S.state,$=S.event;ze(O)&&a({state:C,event:$,insights:c,item:O,insightsEvents:[oe({eventName:"Item Active"},en({item:O,items:P.getItems().filter(ze)}))]})})},onStateChange:function(v){var m=v.state;f({state:m})},__autocomplete_pluginOptions:e}}function an(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;return[].concat(Be(t),["autocomplete-internal"],Be((e=r.algoliaInsightsPlugin)!==null&&e!==void 0&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function hs(e){return oe({onItemsChange:function(r){var n=r.insights,o=r.insightsEvents,i=r.state;n.viewedObjectIDs.apply(n,Be(o.map(function(a){return oe(oe({},a),{},{algoliaSource:an(a.algoliaSource,i.context)})})))},onSelect:function(r){var n=r.insights,o=r.insightsEvents,i=r.state;n.clickedObjectIDsAfterSearch.apply(n,Be(o.map(function(a){return oe(oe({},a),{},{algoliaSource:an(a.algoliaSource,i.context)})})))},onActive:qt,__autocomplete_clickAnalytics:!0},e)}function vs(e){var t="[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete";try{var r=e.document.createElement("script");r.async=!0,r.src=ds,r.onerror=function(){console.error(t)},document.body.appendChild(r)}catch{console.error(t)}}function gs(e){return typeof e=="number"?e.toString():e}function Rt(e,t){var r=t;return{then:function(o,i){return Rt(e.then(_t(o,r,e),_t(i,r,e)),r)},catch:function(o){return Rt(e.catch(_t(o,r,e)),r)},finally:function(o){return o&&r.onCancelList.push(o),Rt(e.finally(_t(o&&function(){return r.onCancelList=[],o()},r,e)),r)},cancel:function(){r.isCanceled=!0;var o=r.onCancelList;r.onCancelList=[],o.forEach(function(i){i()})},isCanceled:function(){return r.isCanceled===!0}}}function ln(e){return Rt(e,{isCanceled:!1,onCancelList:[]})}function _t(e,t,r){return e?function(o){return t.isCanceled?o:e(o)}:r}function ys(){var e=[];return{add:function(r){return e.push(r),r.finally(function(){e=e.filter(function(n){return n!==r})})},cancelAll:function(){e.forEach(function(r){return r.cancel()})},isEmpty:function(){return e.length===0}}}function bs(){var e=-1,t=-1,r=void 0;return function(o){e++;var i=e;return Promise.resolve(o).then(function(a){return r&&i<t?r:(t=i,r=a,a)})}}function sn(e,t,r,n){if(!r)return null;if(e<0&&(t===null||n!==null&&t===0))return r+e;var o=(t===null?-1:t)+e;return o<=-1||o>=r?n===null?null:0:o}function cn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function un(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cn(Object(r),!0).forEach(function(n){ws(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ws(e,t,r){return t=Ss(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ss(e){var t=Os(e,"string");return Ze(t)==="symbol"?t:String(t)}function Os(e,t){if(Ze(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ze(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ze(e){"@babel/helpers - typeof";return Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(e)}function Ps(e,t){var r=[];return Promise.resolve(e(t)).then(function(n){return Promise.all(n.filter(function(o){return!!o}).map(function(o){if(o.sourceId,r.includes(o.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(o.sourceId)," is not unique."));r.push(o.sourceId);var i={getItemInputValue:function(s){var c=s.state;return c.query},getItemUrl:function(){},onSelect:function(s){var c=s.setIsOpen;c(!1)},onActive:qt,onResolve:qt};Object.keys(i).forEach(function(l){i[l].__default=!0});var a=un(un({},i),o);return Promise.resolve(a)}))})}function xs(e){var t=e.collections.map(function(n){return n.items.length}).reduce(function(n,o,i){var a=n[i-1]||0,l=a+o;return n.push(l),n},[]),r=t.reduce(function(n,o){return o<=e.activeItemId?n+1:n},0);return e.collections[r]}function js(e){for(var t=e.state,r=e.collection,n=!1,o=0,i=0;n===!1;){var a=t.collections[o];if(a===r){n=!0;break}i+=a.items.length,o++}return t.activeItemId-i}function je(e){var t=xs(e);if(!t)return null;var r=t.items[js({state:e,collection:t})],n=t.source,o=n.getItemInputValue({item:r,state:e}),i=n.getItemUrl({item:r,state:e});return{item:r,itemInputValue:o,itemUrl:i,source:n}}function re(e,t,r){return[e,r==null?void 0:r.sourceId,t].filter(Boolean).join("-").replace(/\s/g,"")}function Is(e,t){return e===t||e.contains(t)}var _s=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function $s(e){return!!(e&&e.match(_s))}function Cs(e){return{results:e,hits:e.map(function(t){return t.hits}).filter(Boolean),facetHits:e.map(function(t){var r;return(r=t.facetHits)===null||r===void 0?void 0:r.map(function(n){return{label:n.value,count:n.count,_highlightResult:{label:{value:n.highlighted}}}})}).filter(Boolean)}}function fn(e){return e.nativeEvent||e}function et(e){"@babel/helpers - typeof";return et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(e)}function pn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pn(Object(r),!0).forEach(function(n){As(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function As(e,t,r){return t=ks(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ks(e){var t=Ts(e,"string");return et(t)==="symbol"?t:String(t)}function Ts(e,t){if(et(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(et(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rs(e,t,r){var n=t.initialState;return{getState:function(){return n},dispatch:function(i,a){var l=Es({},n);n=e(n,{type:i,props:t,payload:a}),r({state:n,prevState:l})},pendingRequests:ys()}}function tt(e){"@babel/helpers - typeof";return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(e)}function dn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function $t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dn(Object(r),!0).forEach(function(n){Ds(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ds(e,t,r){return t=Ms(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ms(e){var t=Ns(e,"string");return tt(t)==="symbol"?t:String(t)}function Ns(e,t){if(tt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bs(e){var t=e.store,r=function(c){t.dispatch("setActiveItemId",c)},n=function(c){t.dispatch("setQuery",c)},o=function(c){var p=0,f=c.map(function(d){return $t($t({},d),{},{items:Qe(d.items).map(function(v){return $t($t({},v),{},{__autocomplete_id:p++})})})});t.dispatch("setCollections",f)},i=function(c){t.dispatch("setIsOpen",c)},a=function(c){t.dispatch("setStatus",c)},l=function(c){t.dispatch("setContext",c)};return{setActiveItemId:r,setQuery:n,setCollections:o,setIsOpen:i,setStatus:a,setContext:l}}function rt(e){"@babel/helpers - typeof";return rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rt(e)}function Fs(e){return Ks(e)||zs(e)||qs(e)||Ls()}function Ls(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
@@ -167,13 +167,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
167
167
  color: ${e=>e.theme.palette.grey[500]};
168
168
  font-size: 16px;
169
169
  cursor: pointer;
170
- `;function Mr({onSelect:e,wrapChildren:t}){const r=j.useRef(null),n=j.useRef(null),o=j.useRef(null),{storeApi:i,blockletRender:a,filters:l,endpoint:s,handleKeyword:c,t:p}=de(),f=async w=>{const{data:b}=await i.get(le.blockletsPath,{params:w}),g=b.dataList||[];return g.length>0&&g.unshift({type:"more-result",total:b.total||0}),g},d=w=>{c(w.state.query),w.setIsOpen(!1)},v=()=>{r.current&&setTimeout(()=>{const w=r.current.querySelector("input.bl-autocomplete-input");w&&w.focus()})},m=w=>{w.setIsOpen(!1),v()},h=({prevState:w,state:b})=>{w.query!==b.query&&(b.query||c())};return Lf("ctrl + k, command + k",w=>(w.stopPropagation(),w.preventDefault(),v(),!1),{enableOnTags:["INPUT"]}),j.useEffect(()=>{v()},[s]),j.useEffect(()=>{if(!r.current)return;const w=$f({container:r.current,renderer:{createElement:j.createElement,Fragment:j.Fragment,render:()=>{}},render({children:b},g){var S;(!n.current||o.current!==g)&&(o.current=g,(S=n.current)==null||S.unmount(),n.current=zi(g)),n.current.render(t(b))},autoFocus:!0,openOnFocus:!1,classNames:{panel:"bl-autocomplete-panel",label:"bl-autocomplete-label",form:"bl-autocomplete-form",input:"bl-autocomplete-input",clearButton:"bl-autocomplete-clear",detachedCancelButton:"bl-autocomplete-detached-cancel",detachedContainer:"bl-autocomplete-detached-container"},translations:{clearButtonTitle:p("common.clear"),detachedCancelButtonText:p("common.cancel"),submitButtonTitle:p("common.search"),detachedSearchButtonTitle:p("common.search")},placeholder:p("common.searchStore"),initialState:{query:l.keyword},onStateChange(b){h(b)},onSubmit:d,onReset(b){m(b)},getSources({query:b,state:g,...S}){const O={...l,sortBy:le[l.sortBy],page:1,pageSize:10,keyword:b};return Gf([{sourceId:"blocklets",getItems(){return f(O)},getItemInputValue({item:P}){return P.type==="more-result"?b:P.title},onSelect({event:P,item:C}){return C.type==="more-result"?(S.setIsOpen(!1),c(b)):P.type==="keydown"?c(C.title):e({blocklet:C,detailUrl:Ie(s,"/blocklets",C.did),storeUrl:s})},templates:{item({item:P}){return P.type==="more-result"?u.jsx("div",{children:p("autocomplete.expandResult",{name:b,number:P.total.toLocaleString()})}):a({blocklet:P,autocompleteSetters:S})},noResults(){return p("blocklet.noResults")}}}])}});return()=>{w.destroy()}},[l,a]),u.jsxs(u.Fragment,{children:[u.jsx(Gn,{styles:Vn`
170
+ `;function Mr({onSelect:e,wrapChildren:t}){const r=j.useRef(null),n=j.useRef(null),o=j.useRef(null),{storeApi:i,blockletRender:a,filters:l,endpoint:s,handleKeyword:c,t:p}=de(),f=async w=>{const{data:b}=await i.get(le.blockletsPath,{params:w}),g=b.dataList||[];return g.length>0&&g.unshift({type:"more-result",total:b.total||0}),g},d=w=>{c(w.state.query),w.setIsOpen(!1)},v=()=>{r.current&&setTimeout(()=>{const w=r.current.querySelector("input.bl-autocomplete-input");w&&w.focus()})},m=w=>{w.setIsOpen(!1),v()},h=({prevState:w,state:b})=>{w.query!==b.query&&(b.query||(c(),v()))};return Lf("ctrl + k, command + k",w=>(w.stopPropagation(),w.preventDefault(),v(),!1),{enableOnTags:["INPUT"]}),j.useEffect(()=>{v()},[s]),j.useEffect(()=>{if(!r.current)return;const w=$f({container:r.current,renderer:{createElement:j.createElement,Fragment:j.Fragment,render:()=>{}},render({children:b},g){var S;(!n.current||o.current!==g)&&(o.current=g,(S=n.current)==null||S.unmount(),n.current=zi(g)),n.current.render(t(b))},autoFocus:!0,openOnFocus:!1,classNames:{panel:"bl-autocomplete-panel",label:"bl-autocomplete-label",form:"bl-autocomplete-form",input:"bl-autocomplete-input",clearButton:"bl-autocomplete-clear",detachedCancelButton:"bl-autocomplete-detached-cancel",detachedContainer:"bl-autocomplete-detached-container"},translations:{clearButtonTitle:p("common.clear"),detachedCancelButtonText:p("common.cancel"),submitButtonTitle:p("common.search"),detachedSearchButtonTitle:p("common.search")},placeholder:p("common.searchStore"),initialState:{query:l.keyword},onStateChange(b){h(b)},onSubmit:d,onReset(b){m(b)},getSources({query:b,state:g,...S}){const O={...l,sortBy:le[l.sortBy],page:1,pageSize:10,keyword:b};return Gf([{sourceId:"blocklets",getItems(){return f(O)},getItemInputValue({item:P}){return P.type==="more-result"?b:P.title},onSelect({event:P,item:C}){return C.type==="more-result"?(S.setIsOpen(!1),c(b)):P.type==="keydown"?c(C.title):e({blocklet:C,detailUrl:Ie(s,"/blocklets",C.did),storeUrl:s})},templates:{item({item:P}){return P.type==="more-result"?u.jsx("div",{children:p("autocomplete.expandResult",{name:b,number:P.total.toLocaleString()})}):a({blocklet:P,autocompleteSetters:S})},noResults(){return p("blocklet.noResults")}}}])}});return()=>{w.destroy()}},[l,a]),u.jsxs(u.Fragment,{children:[u.jsx(Gn,{styles:Vn`
171
171
  .bl-autocomplete-detached-container {
172
172
  .bl-autocomplete-detached-cancel {
173
173
  white-space: nowrap;
174
174
  }
175
175
  }
176
- `}),u.jsx("div",{className:"bl-search-container",ref:r})]})}Mr.propTypes={onSelect:y.func.isRequired,wrapChildren:y.func};Mr.defaultProps={wrapChildren:e=>e};function Nr({t:e}){const{filters:t,handleSwitchShowResources:r}=de(),n=()=>{t.showResources=!t.showResources,r()};return u.jsx(ua,{checked:t.showResources,onChange:n,labelProps:{label:u.jsx(J,{marginLeft:"8px",fontSize:"small",children:u.jsx("span",{children:e("common.showResources")})})}})}Nr.propTypes={t:y.func.isRequired};Nr.defaultProps={};function cp(){var e,t;const{handleDeveloper:r,blockletList:n,filters:o,developerName:i,handleSort:a,handleCategory:l,handlePrice:s,handleSearchSelect:c,t:p,getCategoryLocale:f,priceOptions:d,wrapChildren:v,showResourcesSwitch:m,showCategory:h,baseSearch:w,onFilterChange:b,tagFilters:g}=de(),S=qf(p),O=((e=S.find(T=>T.value===o.sortBy))==null?void 0:e.name)||p("sort.sort"),P=f(o.category),{resourceType:C}=o||{},$=(t=d.find(T=>T.value===o.price))==null?void 0:t.name,[E,A]=j.useState(!1),x=bt(),k=wr(()=>x.breakpoints.down("md")),M=Qn({chooseTagId:""}),q=Re(T=>{M.chooseTagId=T.id,["category","resourceType","resourceDid"].forEach(N=>{typeof T.params[N]>"u"?delete o[N]:o[N]=T.params[N]}),b(o)}),G=Ei(()=>g.find(T=>T.id===M.chooseTagId),[M.chooseTagId]);return Ai(()=>{const T=ki(window.location.search),N=g.find(Q=>{const I=Q.params;return I?Object.keys(I).every(D=>T[D]===I[D]):!1});N?q(N):g.length>0&&q(g[0])}),u.jsxs(V,{display:"flex",alignItems:"flex-start",height:"100%",children:[h?u.jsx(Vr,{mdDown:!0,children:u.jsx(Rr,{})}):null,u.jsxs(up,{children:[u.jsxs(fp,{children:[u.jsxs(V,{className:"filter-bar",sx:{display:"flex",flexDirection:{lg:"row",md:m?"column":"row"},alignItems:{lg:"center",md:m?"flex-start":"center"},gap:1},children:[h?u.jsx(Vr,{mdUp:!0,children:u.jsx(kr,{})}):null,u.jsx("form",{className:"search-form",style:{flex:1,width:"100%"},onSubmit:T=>{T.preventDefault(),T.stopPropagation()},onFocus:()=>{A(!0)},onBlur:()=>{A(!1)},children:w?u.jsx(Dr,{className:"bl-search-container",placeholder:p("common.searchStore")}):u.jsx(Mr,{onSelect:c,wrapChildren:v})}),u.jsxs(V,{className:"filter-container",display:"flex",alignItems:"center",children:[!k&&m&&u.jsx(V,{ml:1,mr:1,children:u.jsx(Nr,{t:p})}),u.jsx(Ar,{value:o.sortBy,options:S,title:O,icon:u.jsx(oo,{}),onChange:T=>{a(T)}})]})]}),h?u.jsxs(V,{display:"flex",flexWrap:"wrap",alignItems:"center",mb:"16px",children:[u.jsx(Me,{label:i,icon:u.jsx(io,{}),onDelete:()=>{r(null)}}),u.jsx(Me,{label:P,onDelete:()=>{l(null)}}),u.jsx(Me,{label:$,onDelete:()=>{s(null)}}),C&&u.jsx(Me,{label:`${p("common.resourceType")}: ${C}`})]}):null]}),u.jsx(Ti,{FallbackComponent:Jn,children:u.jsxs(V,{sx:{position:"relative",flex:1,overflow:"auto"},children:[(g==null?void 0:g.length)>0?u.jsxs(u.Fragment,{children:[u.jsx(Ri,{my:1,direction:"row",spacing:1.5,useFlexGap:!0,flexWrap:"wrap",justifyContent:"flex-start",children:g.map(T=>u.jsx(Yn,{label:T.title,size:"small",variant:M.chooseTagId===T.id?"contained":"outlined",onClick:()=>q(T),color:M.chooseTagId===T.id?"primary":"default"},T.id))}),G?u.jsx(V,{mb:2,children:G.description?u.jsx(J,{variant:"body1",children:G.description}):null}):null]}):null,u.jsx(Tr,{blocklets:n})]})})]})]})}const up=Y("main")`
176
+ `}),u.jsx("div",{className:"bl-search-container",ref:r})]})}Mr.propTypes={onSelect:y.func.isRequired,wrapChildren:y.func};Mr.defaultProps={wrapChildren:e=>e};function Nr({t:e}){const{filters:t,handleSwitchShowResources:r}=de(),n=()=>{t.showResources=!t.showResources,r()};return u.jsx(ua,{checked:t.showResources,onChange:n,labelProps:{label:u.jsx(J,{marginLeft:"8px",fontSize:"small",children:u.jsx("span",{children:e("common.showResources")})})}})}Nr.propTypes={t:y.func.isRequired};Nr.defaultProps={};function cp(){var e,t;const{handleDeveloper:r,blockletList:n,filters:o,developerName:i,handleSort:a,handleCategory:l,handlePrice:s,handleSearchSelect:c,t:p,getCategoryLocale:f,priceOptions:d,wrapChildren:v,showResourcesSwitch:m,showCategory:h,baseSearch:w,onFilterChange:b,tagFilters:g}=de(),S=qf(p),O=((e=S.find(T=>T.value===o.sortBy))==null?void 0:e.name)||p("sort.sort"),P=f(o.category),{resourceType:C}=o||{},$=(t=d.find(T=>T.value===o.price))==null?void 0:t.name,[E,A]=j.useState(!1),x=bt(),k=wr(()=>x.breakpoints.down("md")),M=Qn({chooseTagId:""}),q=Re(T=>{M.chooseTagId=T.id,["category","resourceType","resourceDid"].forEach(N=>{typeof T.params[N]>"u"?delete o[N]:o[N]=T.params[N]}),b(o)}),G=Ei(()=>g.find(T=>T.id===M.chooseTagId),[M.chooseTagId]);return Ai(()=>{const T=ki(window.location.search),N=g.find(Q=>{const I=Q.params;return I?Object.keys(I).every(D=>T[D]===I[D]):!1});N?q(N):g.length>0&&q(g[0])}),u.jsxs(V,{display:"flex",alignItems:"flex-start",height:"100%",children:[h?u.jsx(Vr,{mdDown:!0,children:u.jsx(Rr,{})}):null,u.jsxs(up,{children:[u.jsxs(fp,{children:[u.jsxs(V,{className:"filter-bar",sx:{display:"flex",flexDirection:{lg:"row",md:m?"column":"row"},alignItems:{lg:"center",md:m?"flex-start":"center",xs:"center"},gap:1},children:[h?u.jsx(Vr,{mdUp:!0,children:u.jsx(kr,{})}):null,u.jsx("form",{className:"search-form",style:{flex:1,width:"100%"},onSubmit:T=>{T.preventDefault(),T.stopPropagation()},onFocus:()=>{A(!0)},onBlur:()=>{A(!1)},children:w?u.jsx(Dr,{className:"bl-search-container",placeholder:p("common.searchStore")}):u.jsx(Mr,{onSelect:c,wrapChildren:v})}),u.jsxs(V,{className:"filter-container",display:"flex",alignItems:"center",children:[!k&&m&&u.jsx(V,{ml:1,mr:1,children:u.jsx(Nr,{t:p})}),u.jsx(Ar,{value:o.sortBy,options:S,title:O,icon:u.jsx(oo,{}),onChange:T=>{a(T)}})]})]}),h?u.jsxs(V,{display:"flex",flexWrap:"wrap",alignItems:"center",mb:"16px",children:[u.jsx(Me,{label:i,icon:u.jsx(io,{}),onDelete:()=>{r(null)}}),u.jsx(Me,{label:P,onDelete:()=>{l(null)}}),u.jsx(Me,{label:$,onDelete:()=>{s(null)}}),C&&u.jsx(Me,{label:`${p("common.resourceType")}: ${C}`})]}):null]}),u.jsx(Ti,{FallbackComponent:Jn,children:u.jsxs(V,{sx:{position:"relative",flex:1,overflow:"auto"},children:[(g==null?void 0:g.length)>0?u.jsxs(u.Fragment,{children:[u.jsx(Ri,{my:1,direction:"row",spacing:1.5,useFlexGap:!0,flexWrap:"wrap",justifyContent:"flex-start",children:g.map(T=>u.jsx(Yn,{label:T.title,size:"small",variant:M.chooseTagId===T.id?"contained":"outlined",onClick:()=>q(T),color:M.chooseTagId===T.id?"primary":"default"},T.id))}),G?u.jsx(V,{mb:2,children:G.description?u.jsx(J,{variant:"body1",children:G.description}):null}):null]}):null,u.jsx(Tr,{blocklets:n})]})})]})]})}const up=Y("main")`
177
177
  display: flex;
178
178
  flex-direction: column;
179
179
  flex: 1;