alistgo-alist-web 3.57.0 → 3.58.0

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 (212) hide show
  1. package/dist/assets/{2fa-81569bc9.js → 2fa-6af218a3.js} +1 -1
  2. package/dist/assets/{2fa-legacy.6e1ab4fe.js → 2fa-legacy.907b4543.js} +1 -1
  3. package/dist/assets/{About-de904a92.js → About-a77d8d20.js} +1 -1
  4. package/dist/assets/{About-legacy.511d0183.js → About-legacy.faf2735b.js} +1 -1
  5. package/dist/assets/{AddLabelDialog-1993c9a3.js → AddLabelDialog-cfd2cf2e.js} +1 -1
  6. package/dist/assets/{AddLabelDialog-legacy.4db59173.js → AddLabelDialog-legacy.fefaa5a7.js} +1 -1
  7. package/dist/assets/{AddOrEdit-0c492484.js → AddOrEdit-4ff0efa1.js} +1 -1
  8. package/dist/assets/{AddOrEdit-9d8adc68.js → AddOrEdit-5e5ab894.js} +1 -1
  9. package/dist/assets/{AddOrEdit-c2ad44de.js → AddOrEdit-8aefb31c.js} +1 -1
  10. package/dist/assets/{AddOrEdit-338222b0.js → AddOrEdit-c19402e7.js} +1 -1
  11. package/dist/assets/{AddOrEdit-legacy.88bc961a.js → AddOrEdit-legacy.464f7017.js} +1 -1
  12. package/dist/assets/{AddOrEdit-legacy.9c08ba50.js → AddOrEdit-legacy.784d4721.js} +1 -1
  13. package/dist/assets/{AddOrEdit-legacy.50a35112.js → AddOrEdit-legacy.b4375806.js} +1 -1
  14. package/dist/assets/{AddOrEdit-legacy.a81f6a3f.js → AddOrEdit-legacy.fd09620e.js} +1 -1
  15. package/dist/assets/Common-69a0fb8a.js +1 -0
  16. package/dist/assets/{Common-legacy.3981f53b.js → Common-legacy.9f60f3ff.js} +1 -1
  17. package/dist/assets/{Copy-c3e7cfdb.js → Copy-b2ebb023.js} +1 -1
  18. package/dist/assets/{Copy-legacy.93ed40b4.js → Copy-legacy.9aa68355.js} +1 -1
  19. package/dist/assets/{Decompress-1754c1b7.js → Decompress-c3a4d3ba.js} +1 -1
  20. package/dist/assets/{Decompress-legacy.3d4c9796.js → Decompress-legacy.7613de66.js} +1 -1
  21. package/dist/assets/DeletePopover-2fb0138c.js +1 -0
  22. package/dist/assets/DeletePopover-legacy.3bef252d.js +1 -0
  23. package/dist/assets/{EditLabelDialog-7e35e2b1.js → EditLabelDialog-f8fe6c1e.js} +1 -1
  24. package/dist/assets/{EditLabelDialog-legacy.92e2d7e6.js → EditLabelDialog-legacy.d78db030.js} +1 -1
  25. package/dist/assets/{File-900651af.js → File-b3d6c366.js} +6 -6
  26. package/dist/assets/{File-legacy.a4df28ab.js → File-legacy.d850788a.js} +1 -1
  27. package/dist/assets/{Folder-5a6fe1bf.js → Folder-732f0c1c.js} +15 -15
  28. package/dist/assets/Folder-legacy.e17aec55.js +29 -0
  29. package/dist/assets/{FolderTree-f683f6a4.js → FolderTree-3887d06d.js} +1 -1
  30. package/dist/assets/{FolderTree-legacy.be5dcfc5.js → FolderTree-legacy.5e170387.js} +1 -1
  31. package/dist/assets/Grid-a9dd5e14.js +1 -0
  32. package/dist/assets/{Grid-legacy.8369e962.js → Grid-legacy.d85788e8.js} +1 -1
  33. package/dist/assets/{GridItem-c9fd1b55.js → GridItem-5727336e.js} +1 -1
  34. package/dist/assets/{GridItem-legacy.197976c2.js → GridItem-legacy.5c1e5d23.js} +1 -1
  35. package/dist/assets/{ImageWithError-15a2a914.js → ImageWithError-99f355a5.js} +1 -1
  36. package/dist/assets/{ImageWithError-legacy.2ccf62f5.js → ImageWithError-legacy.fd49b607.js} +1 -1
  37. package/dist/assets/{Images-f36a9102.js → Images-7f43bcbb.js} +1 -1
  38. package/dist/assets/{Images-legacy.523488a0.js → Images-legacy.b59e53c9.js} +1 -1
  39. package/dist/assets/{Layout-5174ed39.js → Layout-8a0a2c68.js} +6 -6
  40. package/dist/assets/Layout-legacy.53b536f3.js +1 -0
  41. package/dist/assets/{List-20370fd1.js → List-2c510900.js} +2 -2
  42. package/dist/assets/{List-legacy.cad93f30.js → List-legacy.024b493f.js} +1 -1
  43. package/dist/assets/{Messenger-03f6b10e.js → Messenger-e8b40e7b.js} +1 -1
  44. package/dist/assets/{Messenger-legacy.6cc4f09b.js → Messenger-legacy.04676d0d.js} +1 -1
  45. package/dist/assets/Metas-3d43d367.js +1 -0
  46. package/dist/assets/{Metas-legacy.aa98c42a.js → Metas-legacy.2f0fcedf.js} +1 -1
  47. package/dist/assets/{Other-eda90693.js → Other-8551d8de.js} +1 -1
  48. package/dist/assets/{Other-legacy.17cb3c2c.js → Other-legacy.20edfa68.js} +1 -1
  49. package/dist/assets/{PackageDownload-6e056638.js → PackageDownload-8e4c014c.js} +1 -1
  50. package/dist/assets/{PackageDownload-legacy.050f68de.js → PackageDownload-legacy.31cacc88.js} +1 -1
  51. package/dist/assets/{Paginator-12852f15.js → Paginator-7e0484cf.js} +1 -1
  52. package/dist/assets/Paginator-legacy.99dfcb34.js +1 -0
  53. package/dist/assets/{Password-157c126d.js → Password-7af2ddb0.js} +1 -1
  54. package/dist/assets/{Password-legacy.83cde265.js → Password-legacy.7429d55d.js} +1 -1
  55. package/dist/assets/{PermissionForm-a9f04f21.js → PermissionForm-dbcae6ec.js} +1 -1
  56. package/dist/assets/{PermissionForm-legacy.8c831c17.js → PermissionForm-legacy.387c533f.js} +1 -1
  57. package/dist/assets/{Profile-df7c130d.js → Profile-5a1c61a3.js} +1 -1
  58. package/dist/assets/{Profile-legacy.7b4853cf.js → Profile-legacy.9bc82314.js} +1 -1
  59. package/dist/assets/ResponsiveGrid-31af9f08.js +1 -0
  60. package/dist/assets/{ResponsiveGrid-legacy.4fdab710.js → ResponsiveGrid-legacy.4a47f200.js} +1 -1
  61. package/dist/assets/{Role-5f1a4eb3.js → Role-a9b5b6ce.js} +1 -1
  62. package/dist/assets/{Role-legacy.50104cdf.js → Role-legacy.ddf3de28.js} +1 -1
  63. package/dist/assets/{S3-0588b3ce.js → S3-0309c7f4.js} +1 -1
  64. package/dist/assets/{S3-legacy.57edc3ec.js → S3-legacy.bc65e94c.js} +1 -1
  65. package/dist/assets/{S3Transition-c9ba279b.js → S3Transition-b63e2297.js} +1 -1
  66. package/dist/assets/{S3Transition-legacy.55808a63.js → S3Transition-legacy.5529517f.js} +1 -1
  67. package/dist/assets/{SettingItem-1e8deefd.js → SettingItem-e66b06f6.js} +1 -1
  68. package/dist/assets/{SettingItem-legacy.22b5b6ee.js → SettingItem-legacy.4f3189c6.js} +1 -1
  69. package/dist/assets/{Storages-2cc12cff.js → Storages-82415e4f.js} +1 -1
  70. package/dist/assets/{Storages-legacy.fce35774.js → Storages-legacy.098951ce.js} +1 -1
  71. package/dist/assets/{Tag-c201fe66.js → Tag-5a3c9435.js} +1 -1
  72. package/dist/assets/{Tag-legacy.d9f377a0.js → Tag-legacy.f31f0280.js} +1 -1
  73. package/dist/assets/{Tasks-2f81c157.js → Tasks-db5b0556.js} +1 -1
  74. package/dist/assets/{Tasks-legacy.b3d674cb.js → Tasks-legacy.812cc101.js} +1 -1
  75. package/dist/assets/Upload-4dd9ff2b.js +1 -0
  76. package/dist/assets/{Upload-500c97aa.js → Upload-ecc1eabc.js} +1 -1
  77. package/dist/assets/{Upload-legacy.70a9822f.js → Upload-legacy.44ea25f0.js} +1 -1
  78. package/dist/assets/{Upload-legacy.ad3f89ca.js → Upload-legacy.8eff8935.js} +1 -1
  79. package/dist/assets/{Users-509d6261.js → Users-9d91e932.js} +1 -1
  80. package/dist/assets/{Users-legacy.6c76571d.js → Users-legacy.3eb1dc56.js} +1 -1
  81. package/dist/assets/{Wether-fe8556b6.js → Wether-2b2bf57f.js} +1 -1
  82. package/dist/assets/{Wether-legacy.000f5990.js → Wether-legacy.13620d74.js} +1 -1
  83. package/dist/assets/{aliyun_office-de1df605.js → aliyun_office-697a57a5.js} +1 -1
  84. package/dist/assets/{aliyun_office-legacy.1d333b27.js → aliyun_office-legacy.e6722692.js} +1 -1
  85. package/dist/assets/{aliyun_video-b6cb63b5.js → aliyun_video-c27cf614.js} +1 -1
  86. package/dist/assets/{aliyun_video-legacy.437b2540.js → aliyun_video-legacy.abcde17f.js} +1 -1
  87. package/dist/assets/{archive-c1548ac5.js → archive-b2690360.js} +1 -1
  88. package/dist/assets/{archive-legacy.b12e3f39.js → archive-legacy.8dacbbc3.js} +1 -1
  89. package/dist/assets/{asciinema-e46fe2d8.js → asciinema-064c7ff1.js} +1 -1
  90. package/dist/assets/{asciinema-legacy.152dce14.js → asciinema-legacy.c13c9614.js} +1 -1
  91. package/dist/assets/{audio-644c5027.js → audio-55f6bc9a.js} +1 -1
  92. package/dist/assets/{audio-legacy.83b0d2e7.js → audio-legacy.db05eda2.js} +1 -1
  93. package/dist/assets/{backup-restore-e885a23c.js → backup-restore-58c314b3.js} +1 -1
  94. package/dist/assets/{backup-restore-legacy.b72cb6e9.js → backup-restore-legacy.499894c2.js} +1 -1
  95. package/dist/assets/{doubao-e42c4e10.js → doubao-c88f8d6b.js} +1 -1
  96. package/dist/assets/{doubao-legacy.241af2be.js → doubao-legacy.16698426.js} +1 -1
  97. package/dist/assets/entry-10574124.js +5 -0
  98. package/dist/assets/entry-28a4dcf8.js +5 -0
  99. package/dist/assets/entry-4d116535.js +5 -0
  100. package/dist/assets/entry-66cc462c.js +6 -0
  101. package/dist/assets/entry-7bc57540.js +5 -0
  102. package/dist/assets/entry-80f7b791.js +8 -0
  103. package/dist/assets/entry-b68756c5.js +9 -0
  104. package/dist/assets/entry-c1e55c5f.js +5 -0
  105. package/dist/assets/entry-eb7f297b.js +5 -0
  106. package/dist/assets/entry-effbda2b.js +5 -0
  107. package/dist/assets/entry-legacy.7f16caac.js +1 -0
  108. package/dist/assets/entry-legacy.8df6d0e2.js +1 -0
  109. package/dist/assets/entry-legacy.9c292a2e.js +1 -0
  110. package/dist/assets/entry-legacy.c2bb158f.js +1 -0
  111. package/dist/assets/entry-legacy.c93f93c0.js +1 -0
  112. package/dist/assets/entry-legacy.cc0709cb.js +1 -0
  113. package/dist/assets/entry-legacy.cd069a40.js +1 -0
  114. package/dist/assets/entry-legacy.cdc0c87c.js +1 -0
  115. package/dist/assets/entry-legacy.d65c09d6.js +1 -0
  116. package/dist/assets/entry-legacy.faa972f5.js +1 -0
  117. package/dist/assets/{helper-5404c336.js → helper-18247784.js} +1 -1
  118. package/dist/assets/{helper-0bfe9aea.js → helper-699382d8.js} +1 -1
  119. package/dist/assets/{helper-legacy.e45b04db.js → helper-legacy.91469451.js} +1 -1
  120. package/dist/assets/{helper-legacy.5690434a.js → helper-legacy.fbbd18fe.js} +1 -1
  121. package/dist/assets/{hls-9e0679fb.js → hls-bddce1bf.js} +1 -1
  122. package/dist/assets/{hls-legacy.21c5e3a3.js → hls-legacy.4d1b84ea.js} +1 -1
  123. package/dist/assets/html-13d85ff2.js +1 -0
  124. package/dist/assets/{html-legacy.11c48957.js → html-legacy.f5fc062e.js} +1 -1
  125. package/dist/assets/{image-f1fa4d95.js → image-28b6515c.js} +1 -1
  126. package/dist/assets/{image-legacy.e505d723.js → image-legacy.e92b8aa4.js} +1 -1
  127. package/dist/assets/{index-4acf76ed.js → index-06a2e1d1.js} +1 -1
  128. package/dist/assets/{index-901660e1.js → index-0ac33e44.js} +43 -43
  129. package/dist/assets/{index-a86d482d.js → index-0fbb7175.js} +1 -1
  130. package/dist/assets/{index-64d885aa.js → index-22c5d5df.js} +1 -1
  131. package/dist/assets/{index-5c69ade1.js → index-2a7c71fa.js} +1 -1
  132. package/dist/assets/{index-e16afa82.js → index-62f37b04.js} +1 -1
  133. package/dist/assets/{index-ba477707.js → index-904bdd79.js} +1 -1
  134. package/dist/assets/{index-3b1eca38.js → index-d1b62002.js} +3 -3
  135. package/dist/assets/{index-2101fc52.js → index-fc7cec23.js} +1 -1
  136. package/dist/assets/{index-legacy.82dff40f.js → index-legacy.03386895.js} +1 -1
  137. package/dist/assets/{index-legacy.18b68c8f.js → index-legacy.143be82f.js} +1 -1
  138. package/dist/assets/{index-legacy.c85de8a8.js → index-legacy.2a3d5492.js} +1 -1
  139. package/dist/assets/{index-legacy.9524cbd7.js → index-legacy.2ff748cd.js} +3 -3
  140. package/dist/assets/{index-legacy.bf8649f2.js → index-legacy.854fefde.js} +1 -1
  141. package/dist/assets/{index-legacy.565bc8c2.js → index-legacy.b4a7f69e.js} +1 -1
  142. package/dist/assets/{index-legacy.2c47035c.js → index-legacy.bf3a5b10.js} +1 -1
  143. package/dist/assets/{index-legacy.7de89ac7.js → index-legacy.eace8bff.js} +3 -3
  144. package/dist/assets/{index-legacy.b6a8a799.js → index-legacy.f9a28a3c.js} +1 -1
  145. package/dist/assets/{indexes-e3be59a5.js → indexes-3cfa432d.js} +2 -2
  146. package/dist/assets/{indexes-legacy.72d2b378.js → indexes-legacy.8515e724.js} +1 -1
  147. package/dist/assets/{ipa-c742a713.js → ipa-3f466a03.js} +1 -1
  148. package/dist/assets/{ipa-legacy.e340c0bf.js → ipa-legacy.16744579.js} +1 -1
  149. package/dist/assets/{management-cc3fcc2c.js → management-b892a416.js} +1 -1
  150. package/dist/assets/{management-legacy.69f59048.js → management-legacy.f1e9aecd.js} +1 -1
  151. package/dist/assets/{markdown-dcd76f05.js → markdown-92c0c4f2.js} +1 -1
  152. package/dist/assets/{markdown-legacy.f9c72cca.js → markdown-legacy.04b5a6ef.js} +1 -1
  153. package/dist/assets/markdown_with_word_wrap-bfe8724f.js +1 -0
  154. package/dist/assets/{markdown_with_word_wrap-legacy.06f4999e.js → markdown_with_word_wrap-legacy.d3e14b82.js} +1 -1
  155. package/dist/assets/mySession-7d61c8ce.js +1 -0
  156. package/dist/assets/{mySession-legacy.0e826afc.js → mySession-legacy.abcecfb8.js} +1 -1
  157. package/dist/assets/{offline_download-db12c750.js → offline_download-551ee1f9.js} +1 -1
  158. package/dist/assets/{offline_download-legacy.10a2fd58.js → offline_download-legacy.92950672.js} +1 -1
  159. package/dist/assets/{plist-5251b23c.js → plist-1c039eca.js} +1 -1
  160. package/dist/assets/{plist-legacy.2cdcadc2.js → plist-legacy.ee94fbae.js} +1 -1
  161. package/dist/assets/{polyfills-legacy.a939e489.js → polyfills-legacy.4a227757.js} +1 -1
  162. package/dist/assets/{style-a3a6e7df.js → style-f5d5f2e6.js} +1 -1
  163. package/dist/assets/{style-legacy.707b7c63.js → style-legacy.070d5172.js} +1 -1
  164. package/dist/assets/{text-editor-4d5d662d.js → text-editor-42221068.js} +1 -1
  165. package/dist/assets/{text-editor-legacy.499134a2.js → text-editor-legacy.bd233d8f.js} +1 -1
  166. package/dist/assets/url-c75f0407.js +1 -0
  167. package/dist/assets/url-legacy.6a4f78af.js +1 -0
  168. package/dist/assets/{useTitle-515e3802.js → useTitle-98cd4016.js} +1 -1
  169. package/dist/assets/{useTitle-legacy.f53151a3.js → useTitle-legacy.80f4343f.js} +1 -1
  170. package/dist/assets/{video-9972d0a6.js → video-84ddfc5a.js} +1 -1
  171. package/dist/assets/{video-legacy.ac450ba3.js → video-legacy.08f07630.js} +1 -1
  172. package/dist/assets/{video360-586aec37.js → video360-2b96e18e.js} +1 -1
  173. package/dist/assets/{video360-legacy.67295403.js → video360-legacy.185dac77.js} +1 -1
  174. package/dist/assets/{video_box-ff9d5550.js → video_box-fa1e5e08.js} +1 -1
  175. package/dist/assets/{video_box-legacy.b87e2f03.js → video_box-legacy.b500b361.js} +1 -1
  176. package/dist/index.html +3 -3
  177. package/package.json +1 -1
  178. package/dist/assets/Common-4f423de7.js +0 -1
  179. package/dist/assets/DeletePopover-832ac966.js +0 -1
  180. package/dist/assets/DeletePopover-legacy.7e293f65.js +0 -1
  181. package/dist/assets/Folder-legacy.96f8d181.js +0 -29
  182. package/dist/assets/Grid-a891ce83.js +0 -1
  183. package/dist/assets/Layout-legacy.d9f69fa2.js +0 -1
  184. package/dist/assets/Metas-0f4e66ac.js +0 -1
  185. package/dist/assets/Paginator-legacy.97dc251e.js +0 -1
  186. package/dist/assets/ResponsiveGrid-b85a35ec.js +0 -1
  187. package/dist/assets/Upload-08127fb4.js +0 -1
  188. package/dist/assets/entry-0dfd7613.js +0 -5
  189. package/dist/assets/entry-2f00f0d3.js +0 -5
  190. package/dist/assets/entry-30c2fff7.js +0 -5
  191. package/dist/assets/entry-5a285ba0.js +0 -9
  192. package/dist/assets/entry-704bc0bb.js +0 -5
  193. package/dist/assets/entry-74912352.js +0 -5
  194. package/dist/assets/entry-96aa03fa.js +0 -5
  195. package/dist/assets/entry-96b90ef3.js +0 -6
  196. package/dist/assets/entry-c18ab04f.js +0 -8
  197. package/dist/assets/entry-f4b3ec7d.js +0 -5
  198. package/dist/assets/entry-legacy.316d59d7.js +0 -1
  199. package/dist/assets/entry-legacy.51aeae06.js +0 -1
  200. package/dist/assets/entry-legacy.6b206c19.js +0 -1
  201. package/dist/assets/entry-legacy.7f24b1a8.js +0 -1
  202. package/dist/assets/entry-legacy.83883032.js +0 -1
  203. package/dist/assets/entry-legacy.ac7fc7db.js +0 -1
  204. package/dist/assets/entry-legacy.b0173216.js +0 -1
  205. package/dist/assets/entry-legacy.d9d384d6.js +0 -1
  206. package/dist/assets/entry-legacy.ddc1c78f.js +0 -1
  207. package/dist/assets/entry-legacy.f5301e0c.js +0 -1
  208. package/dist/assets/html-305de758.js +0 -1
  209. package/dist/assets/markdown_with_word_wrap-9b5c6009.js +0 -1
  210. package/dist/assets/mySession-9ff4f61b.js +0 -1
  211. package/dist/assets/url-01cb764f.js +0 -1
  212. package/dist/assets/url-legacy.aa83e139.js +0 -1
@@ -1 +1 @@
1
- !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return n};var n={},r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),u=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return $()}for(n.method=i,n.arg=o;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var a=f(t,e,n);if("normal"===a.type){if(r=n.done?"completed":"suspendedYield",a.arg===h)continue;return{value:a.arg,done:n.done}}"throw"===a.type&&(r="completed",n.method="throw",n.arg=a.arg)}}}(t,n,u),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}n.wrap=l;var h={};function d(){}function p(){}function g(){}var y={};s(y,u,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(j([])));m&&m!==r&&i.call(m,u)&&(y=m);var _=g.prototype=d.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(e,n){function r(o,u,c,a){var s=f(e[o],e,u);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==t(h)&&i.call(h,"__await")?n.resolve(h.__await).then((function(t){r("next",t,c,a)}),(function(t){r("throw",t,c,a)})):n.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,a)}))}a(s.arg)}var o;this._invoke=function(t,e){function i(){return new n((function(n,i){r(t,e,n,i)}))}return o=o?o.then(i,i):i()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function j(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:$}}function $(){return{value:void 0,done:!0}}return p.prototype=g,s(_,"constructor",g),s(g,"constructor",p),p.displayName=s(g,a,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s(t,a,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},w(k.prototype),s(k.prototype,c,(function(){return this})),n.AsyncIterator=k,n.async=function(t,e,r,i,o){void 0===o&&(o=Promise);var u=new k(l(t,e,r,i),o);return n.isGeneratorFunction(e)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},w(_),s(_,a,"Generator"),s(_,u,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},n.values=j,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return u.type="throw",u.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],u=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),a=i.call(o,"finallyLoc");if(c&&a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:j(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},n}function n(t,e,n,r,i,o,u){try{var c=t[o](u),a=c.value}catch(s){return void n(s)}c.done?e(a):Promise.resolve(a).then(r,i)}function r(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var u=t.apply(e,r);function c(t){n(u,i,o,c,a,"next",t)}function a(t){n(u,i,o,c,a,"throw",t)}c(void 0)}))}}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],u=!0,c=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);u=!0);}catch(a){c=!0,i=a}finally{try{u||null==n.return||n.return()}finally{if(c)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}System.register(["./index-legacy.7de89ac7.js","./FolderTree-legacy.be5dcfc5.js","./useTitle-legacy.f53151a3.js","./index-legacy.18b68c8f.js","./SettingItem-legacy.22b5b6ee.js","./index-legacy.b6a8a799.js","./index-legacy.2c47035c.js","./item_type-legacy.1b6076a1.js"],(function(t,n){"use strict";var o,u,c,a,s,l,f,h,d,p,g,y,v,m,_,w,k,x,b,L,E;return{setters:[function(t){o=t.b,u=t.B,c=t.be,a=t.bv,s=t.dO,l=t.x,f=t.c2,h=t.dA,d=t.V,p=t.Q,g=t.bw,y=t.n,v=t.bW,m=t.bJ,_=t.L,w=t.av,k=t.ap},function(t){x=t.a},function(t){b=t.b},function(t){L=t.G},function(t){E=t.I},null,null,null],execute:function(){t("default",(function(){var t=o();b("manage.sidemenu.other");var n=i(u(""),2),j=n[0],$=n[1],S=i(u(""),2),C=S[0],O=S[1],I=i(u(""),2),A=I[0],G=I[1],N=i(u(""),2),q=N[0],P=N[1],T=i(u(""),2),F=T[0],D=T[1],Y=i(u(""),2),B=Y[0],J=Y[1],M=i(u(""),2),Q=M[0],R=M[1],U=i(u(""),2),V=U[0],W=U[1],z=i(u(""),2),H=z[0],K=z[1],X=i(u(""),2),Z=X[0],tt=X[1],et=i(u([]),2),nt=et[0],rt=et[1],it=i(c((function(){return a.get("/admin/setting/list?groups=".concat(L.ARIA2,",").concat(L.SINGLE))})),2),ot=it[0],ut=it[1],ct=i(c((function(){return a.post("/admin/setting/set_aria2",{uri:j(),secret:C()})})),2),at=ct[0],st=ct[1],lt=i(c((function(){return a.post("/admin/setting/set_qbit",{url:A(),seedtime:q()})})),2),ft=lt[0],ht=lt[1],dt=i(c((function(){return a.post("/admin/setting/set_transmission",{uri:F(),seedtime:B()})})),2),pt=dt[0],gt=dt[1],yt=i(c((function(){return a.post("/admin/setting/set_115",{temp_dir:Q()})})),2),vt=yt[0],mt=yt[1],_t=i(c((function(){return a.post("/admin/setting/set_pikpak",{temp_dir:V()})})),2),wt=_t[0],kt=_t[1],xt=i(c((function(){return a.post("/admin/setting/set_thunder",{temp_dir:H()})})),2),bt=xt[0],Lt=xt[1],Et=i(c((function(){return a.post("/admin/setting/set_token",{token:Z()})})),2),jt=Et[0],$t=Et[1],St=function(){var t=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ut();case 2:n=t.sent,g(n,(function(t){var e,n,r,i,o,u,c,a,s,l;$((null===(e=t.find((function(t){return"aria2_uri"===t.key})))||void 0===e?void 0:e.value)||""),O((null===(n=t.find((function(t){return"aria2_secret"===t.key})))||void 0===n?void 0:n.value)||""),tt((null===(r=t.find((function(t){return"token"===t.key})))||void 0===r?void 0:r.value)||""),G((null===(i=t.find((function(t){return"qbittorrent_url"===t.key})))||void 0===i?void 0:i.value)||""),P((null===(o=t.find((function(t){return"qbittorrent_seedtime"===t.key})))||void 0===o?void 0:o.value)||""),D((null===(u=t.find((function(t){return"transmission_uri"===t.key})))||void 0===u?void 0:u.value)||""),J((null===(c=t.find((function(t){return"transmission_seedtime"===t.key})))||void 0===c?void 0:c.value)||""),R((null===(a=t.find((function(t){return"115_temp_dir"===t.key})))||void 0===a?void 0:a.value)||""),W((null===(s=t.find((function(t){return"pikpak_temp_dir"===t.key})))||void 0===s?void 0:s.value)||""),K((null===(l=t.find((function(t){return"thunder_temp_dir"===t.key})))||void 0===l?void 0:l.value)||""),rt(t)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();St();var Ct=i(c((function(){return a.post("/admin/setting/reset_token")})),2),Ot=Ct[0],It=Ct[1],At=s().copy;return l(k,{get loading(){return ot()},get children(){return[l(f,{mb:"$2",get children(){return t("settings_other.aria2")}}),l(h,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[l(E,d((function(){return nt().find((function(t){return"aria2_uri"===t.key}))}),{get value(){return j()},onChange:function(t){return $(t)}})),l(E,d((function(){return nt().find((function(t){return"aria2_secret"===t.key}))}),{get value(){return C()},onChange:function(t){return O(t)}}))]}}),l(p,{my:"$2",get loading(){return at()},onClick:(a=r(e().mark((function n(){var r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st();case 2:r=e.sent,g(r,(function(e){y.success("".concat(t("settings_other.aria2_version")," ").concat(e))}));case 4:case"end":return e.stop()}}),n)}))),function(){return a.apply(this,arguments)}),get children(){return t("settings_other.set_aria2")}}),l(f,{my:"$2",get children(){return t("settings_other.qbittorrent")}}),l(h,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[l(E,d((function(){return nt().find((function(t){return"qbittorrent_url"===t.key}))}),{get value(){return A()},onChange:function(t){return G(t)}})),l(E,d((function(){return nt().find((function(t){return"qbittorrent_seedtime"===t.key}))}),{get value(){return q()},onChange:function(t){return P(t)}}))]}}),l(p,{my:"$2",get loading(){return ft()},onClick:(c=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ht();case 2:n=t.sent,g(n,(function(t){y.success(t)}));case 4:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)}),get children(){return t("settings_other.set_qbit")}}),l(f,{my:"$2",get children(){return t("settings_other.transmission")}}),l(h,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[l(E,d((function(){return nt().find((function(t){return"transmission_uri"===t.key}))}),{get value(){return F()},onChange:function(t){return D(t)}})),l(E,d((function(){return nt().find((function(t){return"transmission_seedtime"===t.key}))}),{get value(){return B()},onChange:function(t){return J(t)}}))]}}),l(p,{my:"$2",get loading(){return pt()},onClick:(u=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,gt();case 2:n=t.sent,g(n,(function(t){y.success(t)}));case 4:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)}),get children(){return t("settings_other.set_transmission")}}),l(f,{my:"$2",get children(){return t("settings_other.115")}}),l(v,{w:"$full",display:"flex",flexDirection:"column",get children(){return[l(m,{for:"115_temp_dir",display:"flex",alignItems:"center",get children(){return t("settings.115_temp_dir")}}),l(x,{id:"115_temp_dir",get value(){return Q()},onChange:function(t){return R(t)}})]}}),l(p,{my:"$2",get loading(){return vt()},onClick:(o=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mt();case 2:n=t.sent,g(n,(function(t){y.success(t)}));case 4:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)}),get children(){return t("settings_other.set_115")}}),l(f,{my:"$2",get children(){return t("settings_other.pikpak")}}),l(v,{w:"$full",display:"flex",flexDirection:"column",get children(){return[l(m,{for:"pikpak_temp_dir",display:"flex",alignItems:"center",get children(){return t("settings.pikpak_temp_dir")}}),l(x,{id:"pikpak_temp_dir",get value(){return V()},onChange:function(t){return W(t)}})]}}),l(p,{my:"$2",get loading(){return wt()},onClick:(i=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,kt();case 2:n=t.sent,g(n,(function(t){y.success(t)}));case 4:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)}),get children(){return t("settings_other.set_pikpak")}}),l(f,{my:"$2",get children(){return t("settings_other.thunder")}}),l(v,{w:"$full",display:"flex",flexDirection:"column",get children(){return[l(m,{for:"thunder_temp_dir",display:"flex",alignItems:"center",get children(){return t("settings.thunder_temp_dir")}}),l(x,{id:"thunder_temp_dir",get value(){return H()},onChange:function(t){return K(t)}})]}}),l(p,{my:"$2",get loading(){return bt()},onClick:(n=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt();case 2:n=t.sent,g(n,(function(t){y.success(t)}));case 4:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)}),get children(){return t("settings_other.set_thunder")}}),l(f,{my:"$2",get children(){return t("settings.token")}}),l(_,{get value(){return Z()},onInput:function(t){return tt(t.target.value)}}),l(w,{my:"$2",spacing:"$2",get children(){return[l(p,{onClick:function(){At(Z())},get children(){return t("settings_other.copy_token")}}),l(p,{get loading(){return jt()},onClick:(i=r(e().mark((function n(){var r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$t();case 2:r=e.sent,g(r,(function(e){y.success(t("settings_other.set_token_success")),tt(e)}));case 4:case"end":return e.stop()}}),n)}))),function(){return i.apply(this,arguments)}),get children(){return t("settings_other.set_token")}}),l(p,{colorScheme:"danger",get loading(){return Ot()},onClick:(n=r(e().mark((function n(){var r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,It();case 2:r=e.sent,g(r,(function(e){y.success(t("settings_other.reset_token_success")),tt(e)}));case 4:case"end":return e.stop()}}),n)}))),function(){return n.apply(this,arguments)}),get children(){return t("settings_other.reset_token")}})];var n,i}})];var n,i,o,u,c,a}})}))}}}))}();
1
+ !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return n};var n={},r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(S){s=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),u=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return $()}for(n.method=i,n.arg=o;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var a=f(t,e,n);if("normal"===a.type){if(r=n.done?"completed":"suspendedYield",a.arg===h)continue;return{value:a.arg,done:n.done}}"throw"===a.type&&(r="completed",n.method="throw",n.arg=a.arg)}}}(t,n,u),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}n.wrap=l;var h={};function d(){}function p(){}function g(){}var y={};s(y,u,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(j([])));m&&m!==r&&i.call(m,u)&&(y=m);var _=g.prototype=d.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(e,n){function r(o,u,c,a){var s=f(e[o],e,u);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==t(h)&&i.call(h,"__await")?n.resolve(h.__await).then((function(t){r("next",t,c,a)}),(function(t){r("throw",t,c,a)})):n.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,a)}))}a(s.arg)}var o;this._invoke=function(t,e){function i(){return new n((function(n,i){r(t,e,n,i)}))}return o=o?o.then(i,i):i()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function j(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:$}}function $(){return{value:void 0,done:!0}}return p.prototype=g,s(_,"constructor",g),s(g,"constructor",p),p.displayName=s(g,a,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s(t,a,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},w(k.prototype),s(k.prototype,c,(function(){return this})),n.AsyncIterator=k,n.async=function(t,e,r,i,o){void 0===o&&(o=Promise);var u=new k(l(t,e,r,i),o);return n.isGeneratorFunction(e)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},w(_),s(_,a,"Generator"),s(_,u,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},n.values=j,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return u.type="throw",u.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],u=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),a=i.call(o,"finallyLoc");if(c&&a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:j(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},n}function n(t,e,n,r,i,o,u){try{var c=t[o](u),a=c.value}catch(s){return void n(s)}c.done?e(a):Promise.resolve(a).then(r,i)}function r(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var u=t.apply(e,r);function c(t){n(u,i,o,c,a,"next",t)}function a(t){n(u,i,o,c,a,"throw",t)}c(void 0)}))}}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],u=!0,c=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);u=!0);}catch(a){c=!0,i=a}finally{try{u||null==n.return||n.return()}finally{if(c)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}System.register(["./index-legacy.eace8bff.js","./FolderTree-legacy.5e170387.js","./useTitle-legacy.80f4343f.js","./index-legacy.143be82f.js","./SettingItem-legacy.4f3189c6.js","./index-legacy.f9a28a3c.js","./index-legacy.bf3a5b10.js","./item_type-legacy.1b6076a1.js"],(function(t,n){"use strict";var o,u,c,a,s,l,f,h,d,p,g,y,v,m,_,w,k,x,b,L,E;return{setters:[function(t){o=t.b,u=t.B,c=t.be,a=t.bv,s=t.dQ,l=t.x,f=t.c2,h=t.dC,d=t.V,p=t.Q,g=t.bw,y=t.n,v=t.bW,m=t.bJ,_=t.L,w=t.av,k=t.ap},function(t){x=t.a},function(t){b=t.b},function(t){L=t.G},function(t){E=t.I},null,null,null],execute:function(){t("default",(function(){var t=o();b("manage.sidemenu.other");var n=i(u(""),2),j=n[0],$=n[1],S=i(u(""),2),C=S[0],I=S[1],O=i(u(""),2),A=O[0],G=O[1],N=i(u(""),2),q=N[0],P=N[1],T=i(u(""),2),F=T[0],D=T[1],Q=i(u(""),2),Y=Q[0],B=Q[1],J=i(u(""),2),M=J[0],R=J[1],U=i(u(""),2),V=U[0],W=U[1],z=i(u(""),2),H=z[0],K=z[1],X=i(u(""),2),Z=X[0],tt=X[1],et=i(u([]),2),nt=et[0],rt=et[1],it=i(c((function(){return a.get("/admin/setting/list?groups=".concat(L.ARIA2,",").concat(L.SINGLE))})),2),ot=it[0],ut=it[1],ct=i(c((function(){return a.post("/admin/setting/set_aria2",{uri:j(),secret:C()})})),2),at=ct[0],st=ct[1],lt=i(c((function(){return a.post("/admin/setting/set_qbit",{url:A(),seedtime:q()})})),2),ft=lt[0],ht=lt[1],dt=i(c((function(){return a.post("/admin/setting/set_transmission",{uri:F(),seedtime:Y()})})),2),pt=dt[0],gt=dt[1],yt=i(c((function(){return a.post("/admin/setting/set_115",{temp_dir:M()})})),2),vt=yt[0],mt=yt[1],_t=i(c((function(){return a.post("/admin/setting/set_pikpak",{temp_dir:V()})})),2),wt=_t[0],kt=_t[1],xt=i(c((function(){return a.post("/admin/setting/set_thunder",{temp_dir:H()})})),2),bt=xt[0],Lt=xt[1],Et=i(c((function(){return a.post("/admin/setting/set_token",{token:Z()})})),2),jt=Et[0],$t=Et[1],St=function(){var t=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ut();case 2:n=t.sent,g(n,(function(t){var e,n,r,i,o,u,c,a,s,l;$((null===(e=t.find((function(t){return"aria2_uri"===t.key})))||void 0===e?void 0:e.value)||""),I((null===(n=t.find((function(t){return"aria2_secret"===t.key})))||void 0===n?void 0:n.value)||""),tt((null===(r=t.find((function(t){return"token"===t.key})))||void 0===r?void 0:r.value)||""),G((null===(i=t.find((function(t){return"qbittorrent_url"===t.key})))||void 0===i?void 0:i.value)||""),P((null===(o=t.find((function(t){return"qbittorrent_seedtime"===t.key})))||void 0===o?void 0:o.value)||""),D((null===(u=t.find((function(t){return"transmission_uri"===t.key})))||void 0===u?void 0:u.value)||""),B((null===(c=t.find((function(t){return"transmission_seedtime"===t.key})))||void 0===c?void 0:c.value)||""),R((null===(a=t.find((function(t){return"115_temp_dir"===t.key})))||void 0===a?void 0:a.value)||""),W((null===(s=t.find((function(t){return"pikpak_temp_dir"===t.key})))||void 0===s?void 0:s.value)||""),K((null===(l=t.find((function(t){return"thunder_temp_dir"===t.key})))||void 0===l?void 0:l.value)||""),rt(t)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();St();var Ct=i(c((function(){return a.post("/admin/setting/reset_token")})),2),It=Ct[0],Ot=Ct[1],At=s().copy;return l(k,{get loading(){return ot()},get children(){return[l(f,{mb:"$2",get children(){return t("settings_other.aria2")}}),l(h,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[l(E,d((function(){return nt().find((function(t){return"aria2_uri"===t.key}))}),{get value(){return j()},onChange:function(t){return $(t)}})),l(E,d((function(){return nt().find((function(t){return"aria2_secret"===t.key}))}),{get value(){return C()},onChange:function(t){return I(t)}}))]}}),l(p,{my:"$2",get loading(){return at()},onClick:(a=r(e().mark((function n(){var r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,st();case 2:r=e.sent,g(r,(function(e){y.success("".concat(t("settings_other.aria2_version")," ").concat(e))}));case 4:case"end":return e.stop()}}),n)}))),function(){return a.apply(this,arguments)}),get children(){return t("settings_other.set_aria2")}}),l(f,{my:"$2",get children(){return t("settings_other.qbittorrent")}}),l(h,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[l(E,d((function(){return nt().find((function(t){return"qbittorrent_url"===t.key}))}),{get value(){return A()},onChange:function(t){return G(t)}})),l(E,d((function(){return nt().find((function(t){return"qbittorrent_seedtime"===t.key}))}),{get value(){return q()},onChange:function(t){return P(t)}}))]}}),l(p,{my:"$2",get loading(){return ft()},onClick:(c=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ht();case 2:n=t.sent,g(n,(function(t){y.success(t)}));case 4:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)}),get children(){return t("settings_other.set_qbit")}}),l(f,{my:"$2",get children(){return t("settings_other.transmission")}}),l(h,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[l(E,d((function(){return nt().find((function(t){return"transmission_uri"===t.key}))}),{get value(){return F()},onChange:function(t){return D(t)}})),l(E,d((function(){return nt().find((function(t){return"transmission_seedtime"===t.key}))}),{get value(){return Y()},onChange:function(t){return B(t)}}))]}}),l(p,{my:"$2",get loading(){return pt()},onClick:(u=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,gt();case 2:n=t.sent,g(n,(function(t){y.success(t)}));case 4:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)}),get children(){return t("settings_other.set_transmission")}}),l(f,{my:"$2",get children(){return t("settings_other.115")}}),l(v,{w:"$full",display:"flex",flexDirection:"column",get children(){return[l(m,{for:"115_temp_dir",display:"flex",alignItems:"center",get children(){return t("settings.115_temp_dir")}}),l(x,{id:"115_temp_dir",get value(){return M()},onChange:function(t){return R(t)}})]}}),l(p,{my:"$2",get loading(){return vt()},onClick:(o=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mt();case 2:n=t.sent,g(n,(function(t){y.success(t)}));case 4:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)}),get children(){return t("settings_other.set_115")}}),l(f,{my:"$2",get children(){return t("settings_other.pikpak")}}),l(v,{w:"$full",display:"flex",flexDirection:"column",get children(){return[l(m,{for:"pikpak_temp_dir",display:"flex",alignItems:"center",get children(){return t("settings.pikpak_temp_dir")}}),l(x,{id:"pikpak_temp_dir",get value(){return V()},onChange:function(t){return W(t)}})]}}),l(p,{my:"$2",get loading(){return wt()},onClick:(i=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,kt();case 2:n=t.sent,g(n,(function(t){y.success(t)}));case 4:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)}),get children(){return t("settings_other.set_pikpak")}}),l(f,{my:"$2",get children(){return t("settings_other.thunder")}}),l(v,{w:"$full",display:"flex",flexDirection:"column",get children(){return[l(m,{for:"thunder_temp_dir",display:"flex",alignItems:"center",get children(){return t("settings.thunder_temp_dir")}}),l(x,{id:"thunder_temp_dir",get value(){return H()},onChange:function(t){return K(t)}})]}}),l(p,{my:"$2",get loading(){return bt()},onClick:(n=r(e().mark((function t(){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt();case 2:n=t.sent,g(n,(function(t){y.success(t)}));case 4:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)}),get children(){return t("settings_other.set_thunder")}}),l(f,{my:"$2",get children(){return t("settings.token")}}),l(_,{get value(){return Z()},onInput:function(t){return tt(t.target.value)}}),l(w,{my:"$2",spacing:"$2",get children(){return[l(p,{onClick:function(){At(Z())},get children(){return t("settings_other.copy_token")}}),l(p,{get loading(){return jt()},onClick:(i=r(e().mark((function n(){var r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$t();case 2:r=e.sent,g(r,(function(e){y.success(t("settings_other.set_token_success")),tt(e)}));case 4:case"end":return e.stop()}}),n)}))),function(){return i.apply(this,arguments)}),get children(){return t("settings_other.set_token")}}),l(p,{colorScheme:"danger",get loading(){return It()},onClick:(n=r(e().mark((function n(){var r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ot();case 2:r=e.sent,g(r,(function(e){y.success(t("settings_other.reset_token_success")),tt(e)}));case 4:case"end":return e.stop()}}),n)}))),function(){return n.apply(this,arguments)}),get children(){return t("settings_other.reset_token")}})];var n,i}})];var n,i,o,u,c,a}})}))}}}))}();
@@ -1 +1 @@
1
- import{d8 as R,b as j,B as W,d as A,e as H,x as S,ai as I,c2 as Z,am as k,W as z,ah as O,K as N,O as K,Q as V,S as J,i as Q,j as L,k as Y,l as G,_ as X}from"./index-901660e1.js";class D{constructor(){this.crc=-1}append(n){for(var a=this.crc|0,f=this.table,h=0,g=n.length|0;h<g;h++)a=a>>>8^f[(a^n[h])&255];this.crc=a}get(){return~this.crc}}D.prototype.table=(()=>{var c,n,a,f=[];for(c=0;c<256;c++){for(a=c,n=0;n<8;n++)a=a&1?a>>>1^3988292384:a>>>1;f[c]=a}return f})();const T=c=>{var n=new Uint8Array(c);return{array:n,view:new DataView(n.buffer)}},ee=c=>c.reader.read().then(n=>{if(n.done)return c.writeFooter();const a=n.value;c.crc.append(a),c.uncompressedLength+=a.length,c.compressedLength+=a.length,c.ctrl.enqueue(a)});function te(c){const n=Object.create(null),a=[],f=new TextEncoder;let h=0,g=0,p,l,v;function w(){g++,l=n[a[g]],l?u():v&&C()}var y={enqueue(d){if(v)throw new TypeError("Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed");let r=d.name.trim();const t=new Date(typeof d.lastModified>"u"?Date.now():d.lastModified);if(d.directory&&!r.endsWith("/")&&(r+="/"),n[r])throw new Error("File already exists.");const s=f.encode(r);a.push(r);const e=n[r]={level:0,ctrl:p,directory:!!d.directory,nameBuf:s,comment:f.encode(d.comment||""),compressedLength:0,uncompressedLength:0,writeHeader(){var i=T(26),o=T(30+s.length);e.offset=h,e.header=i,e.level!==0&&!e.directory&&i.view.setUint16(4,2048),i.view.setUint32(0,335546376),i.view.setUint16(6,(t.getHours()<<6|t.getMinutes())<<5|t.getSeconds()/2,!0),i.view.setUint16(8,(t.getFullYear()-1980<<4|t.getMonth()+1)<<5|t.getDate(),!0),i.view.setUint16(22,s.length,!0),o.view.setUint32(0,1347093252),o.array.set(i.array,4),o.array.set(s,30),h+=o.array.length,p.enqueue(o.array)},writeFooter(){var i=T(16);i.view.setUint32(0,1347094280),e.crc&&(e.header.view.setUint32(10,e.crc.get(),!0),e.header.view.setUint32(14,e.compressedLength,!0),e.header.view.setUint32(18,e.uncompressedLength,!0),i.view.setUint32(4,e.crc.get(),!0),i.view.setUint32(8,e.compressedLength,!0),i.view.setUint32(12,e.uncompressedLength,!0)),p.enqueue(i.array),h+=e.compressedLength+16,w()},fileLike:d};l||(l=e,u())},close(){if(v)throw new TypeError("Cannot close a readable stream that has already been requested to be closed");l||C(),v=!0}};function C(){var d=0,r=0,t,s;for(t=0;t<a.length;t++)s=n[a[t]],d+=46+s.nameBuf.length+s.comment.length;const e=T(d+22);for(t=0;t<a.length;t++)s=n[a[t]],e.view.setUint32(r,1347092738),e.view.setUint16(r+4,5120),e.array.set(s.header.array,r+6),e.view.setUint16(r+32,s.comment.length,!0),s.directory&&e.view.setUint8(r+38,16),e.view.setUint32(r+42,s.offset,!0),e.array.set(s.nameBuf,r+46),e.array.set(s.comment,r+46+s.nameBuf.length),r+=46+s.nameBuf.length+s.comment.length;e.view.setUint32(r,1347093766),e.view.setUint16(r+8,a.length,!0),e.view.setUint16(r+10,a.length,!0),e.view.setUint32(r+12,d,!0),e.view.setUint32(r+16,h,!0),p.enqueue(e.array),p.close()}function u(){if(l){if(l.directory)return l.writeFooter(l.writeHeader());if(l.reader)return ee(l);l.fileLike.stream?(l.crc=new D,l.reader=l.fileLike.stream.getReader(),l.writeHeader()):w()}}return new ReadableStream({start:d=>{p=d,c.start&&Promise.resolve(c.start(y))},pull(){return u()||c.pull&&Promise.resolve(c.pull(y))}})}window.ZIP=te;var P={exports:{}};/*! streamsaver. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */(function(c){((n,a)=>{c.exports=a()})("streamSaver",()=>{const n=typeof window=="object"?window:this;n.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let a=null,f=!1;const h=r=>{try{r()}catch{}},g=n.WebStreamsPolyfill||{},p=n.isSecureContext;let l=/constructor/i.test(n.HTMLElement)||!!n.safari||!!n.WebKitPoint;const v=p||"MozAppearance"in document.documentElement.style?"iframe":"navigate",w={createWriteStream:d,WritableStream:n.WritableStream||g.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function y(r){if(!r)throw new Error("meh");const t=document.createElement("iframe");return t.hidden=!0,t.src=r,t.loaded=!1,t.name="iframe",t.isIframe=!0,t.postMessage=(...s)=>t.contentWindow.postMessage(...s),t.addEventListener("load",()=>{t.loaded=!0},{once:!0}),document.body.appendChild(t),t}function C(r){const t="width=200,height=100",s=document.createDocumentFragment(),e={frame:n.open(r,"popup",t),loaded:!1,isIframe:!1,isPopup:!0,remove(){e.frame.close()},addEventListener(...o){s.addEventListener(...o)},dispatchEvent(...o){s.dispatchEvent(...o)},removeEventListener(...o){s.removeEventListener(...o)},postMessage(...o){e.frame.postMessage(...o)}},i=o=>{o.source===e.frame&&(e.loaded=!0,n.removeEventListener("message",i),e.dispatchEvent(new Event("load")))};return n.addEventListener("message",i),e}try{new Response(new ReadableStream),p&&!("serviceWorker"in navigator)&&(l=!0)}catch{l=!0}h(()=>{const{readable:r}=new TransformStream,t=new MessageChannel;t.port1.postMessage(r,[r]),t.port1.close(),t.port2.close(),f=!0,Object.defineProperty(w,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})});function u(){a||(a=p?y(w.mitm):C(w.mitm))}function d(r,t,s){let e={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},i=0,o=null,m=null,x=null;if(Number.isFinite(t)?([s,t]=[t,s],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),e.size=s,e.writableStrategy=t):t&&t.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),e.size=s,e.writableStrategy=t):e=t||{},!l){u(),m=new MessageChannel,r=encodeURIComponent(r.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const b={transferringReadable:f,pathname:e.pathname||Math.random().toString().slice(-6)+"/"+r,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+r}};e.size&&(b.headers["Content-Length"]=e.size);const M=[b,"*",[m.port2]];if(f){const U=v==="iframe"?void 0:{transform(F,q){if(!(F instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");i+=F.length,q.enqueue(F),o&&(location.href=o,o=null)},flush(){o&&(location.href=o)}};x=new w.TransformStream(U,e.writableStrategy,e.readableStrategy);const _=x.readable;m.port1.postMessage({readableStream:_},[_])}m.port1.onmessage=U=>{U.data.download?v==="navigate"?(a.remove(),a=null,i?location.href=U.data.download:o=U.data.download):(a.isPopup&&(a.remove(),a=null,v==="iframe"&&y(w.mitm)),y(U.data.download)):U.data.abort&&(E=[],m.port1.postMessage("abort"),m.port1.onmessage=null,m.port1.close(),m.port2.close(),m=null)},a.loaded?a.postMessage(...M):a.addEventListener("load",()=>{a.postMessage(...M)},{once:!0})}let E=[];return!l&&x&&x.writable||new w.WritableStream({write(b){if(!(b instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");if(l){E.push(b);return}m.port1.postMessage(b),i+=b.length,o&&(location.href=o,o=null)},close(){if(l){const b=new Blob(E,{type:"application/octet-stream; charset=utf-8"}),M=document.createElement("a");M.href=URL.createObjectURL(b),M.download=r,M.click()}else m.port1.postMessage("end")},abort(){E=[],m.port1.postMessage("abort"),m.port1.onmessage=null,m.port1.close(),m.port2.close(),m=null}},e.writableStrategy)}return w})})(P);var re=P.exports;const $=R(re);$.mitm="/streamer/mitm.html";const ae=c=>c.replace(/^\/+|\/+$/g,"");let B=0;const se=c=>{const n=j(),[a,f]=W(n("home.package_download.initializing")),[h,g]=W(0),{pathname:p}=A(),l=H(),v=async(u,d)=>{if(d.is_dir){const r=await G(L(p(),u,d.name),X());if(r.code!==200)return r.message;const t=[];for(const s of r.data.content??[]){const e=await v(L(u,d.name),s);if(typeof e=="string")return e;t.push(...e)}return t}else return B+=d.size,[{path:L(u,d.name),url:Y(L(p(),u),d,"direct",!0)}]},[w,y]=W([]);return(async()=>{let u=Q(p());l.length===1&&(u=l[0].name),u||(u=n("manage.sidemenu.home"));let d=$.createWriteStream(`${u}.zip`,{size:B});f(n("home.package_download.fetching_struct")),g(2);const r=[];for(const e of l){const i=await v("",e);if(typeof i=="string")return f(`${n("home.package_download.fetching_struct_failed")}: ${i}`),g(1),i;r.push(...i)}f(n("home.package_download.downloading")),g(3);let t=r.values(),s=new window.ZIP({pull(e){const i=t.next();if(i.done)e.close();else{let o=ae(i.value.path);l.length===1&&(o=o.replace(`${u}/`,""));const m=i.value.url;return fetch(m).then(x=>{y(E=>[...E,o]),e.enqueue({name:o,stream:x.body})})}}});if(window.WritableStream&&s.pipeTo)return s.pipeTo(d).then(()=>{f(`${n("home.package_download.success")}`),g(4)}).catch(e=>{f(`${n("home.package_download.failed")}: ${e}`),g(1)})})(),[S(N,{get children(){return S(I,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[S(Z,{get children(){return[k(()=>n("home.package_download.current_status")),": ",k(()=>a())]}}),S(z,{get each(){return w()},children:u=>S(O,{css:{wordBreak:"break-all"},get children(){return["Fetching: ",u]}})})]}})}}),S(J,{get when(){return[1,4].includes(h())},get children(){return S(K,{get children(){return S(V,{colorScheme:"info",get onClick(){return c.onClose},get children(){return n("global.close")}})}})}})]};export{se as default};
1
+ import{da as R,b as j,B as W,d as A,e as H,x as S,ai as I,c2 as Z,am as k,W as z,ah as O,K as N,O as K,Q as V,S as J,i as Q,j as L,k as Y,l as G,_ as X}from"./index-0ac33e44.js";class D{constructor(){this.crc=-1}append(n){for(var a=this.crc|0,f=this.table,h=0,g=n.length|0;h<g;h++)a=a>>>8^f[(a^n[h])&255];this.crc=a}get(){return~this.crc}}D.prototype.table=(()=>{var c,n,a,f=[];for(c=0;c<256;c++){for(a=c,n=0;n<8;n++)a=a&1?a>>>1^3988292384:a>>>1;f[c]=a}return f})();const T=c=>{var n=new Uint8Array(c);return{array:n,view:new DataView(n.buffer)}},ee=c=>c.reader.read().then(n=>{if(n.done)return c.writeFooter();const a=n.value;c.crc.append(a),c.uncompressedLength+=a.length,c.compressedLength+=a.length,c.ctrl.enqueue(a)});function te(c){const n=Object.create(null),a=[],f=new TextEncoder;let h=0,g=0,p,l,v;function w(){g++,l=n[a[g]],l?u():v&&C()}var y={enqueue(d){if(v)throw new TypeError("Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed");let r=d.name.trim();const t=new Date(typeof d.lastModified>"u"?Date.now():d.lastModified);if(d.directory&&!r.endsWith("/")&&(r+="/"),n[r])throw new Error("File already exists.");const s=f.encode(r);a.push(r);const e=n[r]={level:0,ctrl:p,directory:!!d.directory,nameBuf:s,comment:f.encode(d.comment||""),compressedLength:0,uncompressedLength:0,writeHeader(){var i=T(26),o=T(30+s.length);e.offset=h,e.header=i,e.level!==0&&!e.directory&&i.view.setUint16(4,2048),i.view.setUint32(0,335546376),i.view.setUint16(6,(t.getHours()<<6|t.getMinutes())<<5|t.getSeconds()/2,!0),i.view.setUint16(8,(t.getFullYear()-1980<<4|t.getMonth()+1)<<5|t.getDate(),!0),i.view.setUint16(22,s.length,!0),o.view.setUint32(0,1347093252),o.array.set(i.array,4),o.array.set(s,30),h+=o.array.length,p.enqueue(o.array)},writeFooter(){var i=T(16);i.view.setUint32(0,1347094280),e.crc&&(e.header.view.setUint32(10,e.crc.get(),!0),e.header.view.setUint32(14,e.compressedLength,!0),e.header.view.setUint32(18,e.uncompressedLength,!0),i.view.setUint32(4,e.crc.get(),!0),i.view.setUint32(8,e.compressedLength,!0),i.view.setUint32(12,e.uncompressedLength,!0)),p.enqueue(i.array),h+=e.compressedLength+16,w()},fileLike:d};l||(l=e,u())},close(){if(v)throw new TypeError("Cannot close a readable stream that has already been requested to be closed");l||C(),v=!0}};function C(){var d=0,r=0,t,s;for(t=0;t<a.length;t++)s=n[a[t]],d+=46+s.nameBuf.length+s.comment.length;const e=T(d+22);for(t=0;t<a.length;t++)s=n[a[t]],e.view.setUint32(r,1347092738),e.view.setUint16(r+4,5120),e.array.set(s.header.array,r+6),e.view.setUint16(r+32,s.comment.length,!0),s.directory&&e.view.setUint8(r+38,16),e.view.setUint32(r+42,s.offset,!0),e.array.set(s.nameBuf,r+46),e.array.set(s.comment,r+46+s.nameBuf.length),r+=46+s.nameBuf.length+s.comment.length;e.view.setUint32(r,1347093766),e.view.setUint16(r+8,a.length,!0),e.view.setUint16(r+10,a.length,!0),e.view.setUint32(r+12,d,!0),e.view.setUint32(r+16,h,!0),p.enqueue(e.array),p.close()}function u(){if(l){if(l.directory)return l.writeFooter(l.writeHeader());if(l.reader)return ee(l);l.fileLike.stream?(l.crc=new D,l.reader=l.fileLike.stream.getReader(),l.writeHeader()):w()}}return new ReadableStream({start:d=>{p=d,c.start&&Promise.resolve(c.start(y))},pull(){return u()||c.pull&&Promise.resolve(c.pull(y))}})}window.ZIP=te;var P={exports:{}};/*! streamsaver. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */(function(c){((n,a)=>{c.exports=a()})("streamSaver",()=>{const n=typeof window=="object"?window:this;n.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let a=null,f=!1;const h=r=>{try{r()}catch{}},g=n.WebStreamsPolyfill||{},p=n.isSecureContext;let l=/constructor/i.test(n.HTMLElement)||!!n.safari||!!n.WebKitPoint;const v=p||"MozAppearance"in document.documentElement.style?"iframe":"navigate",w={createWriteStream:d,WritableStream:n.WritableStream||g.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function y(r){if(!r)throw new Error("meh");const t=document.createElement("iframe");return t.hidden=!0,t.src=r,t.loaded=!1,t.name="iframe",t.isIframe=!0,t.postMessage=(...s)=>t.contentWindow.postMessage(...s),t.addEventListener("load",()=>{t.loaded=!0},{once:!0}),document.body.appendChild(t),t}function C(r){const t="width=200,height=100",s=document.createDocumentFragment(),e={frame:n.open(r,"popup",t),loaded:!1,isIframe:!1,isPopup:!0,remove(){e.frame.close()},addEventListener(...o){s.addEventListener(...o)},dispatchEvent(...o){s.dispatchEvent(...o)},removeEventListener(...o){s.removeEventListener(...o)},postMessage(...o){e.frame.postMessage(...o)}},i=o=>{o.source===e.frame&&(e.loaded=!0,n.removeEventListener("message",i),e.dispatchEvent(new Event("load")))};return n.addEventListener("message",i),e}try{new Response(new ReadableStream),p&&!("serviceWorker"in navigator)&&(l=!0)}catch{l=!0}h(()=>{const{readable:r}=new TransformStream,t=new MessageChannel;t.port1.postMessage(r,[r]),t.port1.close(),t.port2.close(),f=!0,Object.defineProperty(w,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})});function u(){a||(a=p?y(w.mitm):C(w.mitm))}function d(r,t,s){let e={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},i=0,o=null,m=null,x=null;if(Number.isFinite(t)?([s,t]=[t,s],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),e.size=s,e.writableStrategy=t):t&&t.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),e.size=s,e.writableStrategy=t):e=t||{},!l){u(),m=new MessageChannel,r=encodeURIComponent(r.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const b={transferringReadable:f,pathname:e.pathname||Math.random().toString().slice(-6)+"/"+r,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+r}};e.size&&(b.headers["Content-Length"]=e.size);const M=[b,"*",[m.port2]];if(f){const U=v==="iframe"?void 0:{transform(F,q){if(!(F instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");i+=F.length,q.enqueue(F),o&&(location.href=o,o=null)},flush(){o&&(location.href=o)}};x=new w.TransformStream(U,e.writableStrategy,e.readableStrategy);const _=x.readable;m.port1.postMessage({readableStream:_},[_])}m.port1.onmessage=U=>{U.data.download?v==="navigate"?(a.remove(),a=null,i?location.href=U.data.download:o=U.data.download):(a.isPopup&&(a.remove(),a=null,v==="iframe"&&y(w.mitm)),y(U.data.download)):U.data.abort&&(E=[],m.port1.postMessage("abort"),m.port1.onmessage=null,m.port1.close(),m.port2.close(),m=null)},a.loaded?a.postMessage(...M):a.addEventListener("load",()=>{a.postMessage(...M)},{once:!0})}let E=[];return!l&&x&&x.writable||new w.WritableStream({write(b){if(!(b instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");if(l){E.push(b);return}m.port1.postMessage(b),i+=b.length,o&&(location.href=o,o=null)},close(){if(l){const b=new Blob(E,{type:"application/octet-stream; charset=utf-8"}),M=document.createElement("a");M.href=URL.createObjectURL(b),M.download=r,M.click()}else m.port1.postMessage("end")},abort(){E=[],m.port1.postMessage("abort"),m.port1.onmessage=null,m.port1.close(),m.port2.close(),m=null}},e.writableStrategy)}return w})})(P);var re=P.exports;const $=R(re);$.mitm="/streamer/mitm.html";const ae=c=>c.replace(/^\/+|\/+$/g,"");let B=0;const se=c=>{const n=j(),[a,f]=W(n("home.package_download.initializing")),[h,g]=W(0),{pathname:p}=A(),l=H(),v=async(u,d)=>{if(d.is_dir){const r=await G(L(p(),u,d.name),X());if(r.code!==200)return r.message;const t=[];for(const s of r.data.content??[]){const e=await v(L(u,d.name),s);if(typeof e=="string")return e;t.push(...e)}return t}else return B+=d.size,[{path:L(u,d.name),url:Y(L(p(),u),d,"direct",!0)}]},[w,y]=W([]);return(async()=>{let u=Q(p());l.length===1&&(u=l[0].name),u||(u=n("manage.sidemenu.home"));let d=$.createWriteStream(`${u}.zip`,{size:B});f(n("home.package_download.fetching_struct")),g(2);const r=[];for(const e of l){const i=await v("",e);if(typeof i=="string")return f(`${n("home.package_download.fetching_struct_failed")}: ${i}`),g(1),i;r.push(...i)}f(n("home.package_download.downloading")),g(3);let t=r.values(),s=new window.ZIP({pull(e){const i=t.next();if(i.done)e.close();else{let o=ae(i.value.path);l.length===1&&(o=o.replace(`${u}/`,""));const m=i.value.url;return fetch(m).then(x=>{y(E=>[...E,o]),e.enqueue({name:o,stream:x.body})})}}});if(window.WritableStream&&s.pipeTo)return s.pipeTo(d).then(()=>{f(`${n("home.package_download.success")}`),g(4)}).catch(e=>{f(`${n("home.package_download.failed")}: ${e}`),g(1)})})(),[S(N,{get children(){return S(I,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[S(Z,{get children(){return[k(()=>n("home.package_download.current_status")),": ",k(()=>a())]}}),S(z,{get each(){return w()},children:u=>S(O,{css:{wordBreak:"break-all"},get children(){return["Fetching: ",u]}})})]}})}}),S(J,{get when(){return[1,4].includes(h())},get children(){return S(K,{get children(){return S(V,{colorScheme:"info",get onClick(){return c.onClose},get children(){return n("global.close")}})}})}})]};export{se as default};
@@ -1 +1 @@
1
- !function(){function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(_){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),i=new k(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return j()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,i),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(_){return{type:"throw",arg:_}}}t.wrap=l;var h={};function d(){}function p(){}function m(){}var v={};s(v,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(U([])));g&&g!==r&&n.call(g,a)&&(v=g);var w=m.prototype=d.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(o,a,i,c){var s=f(e[o],e,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(h).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,c)}))}c(s.arg)}var o;this._invoke=function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,h;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function U(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=m,s(w,"constructor",m),s(m,"constructor",p),p.displayName=s(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},b(S.prototype),s(S.prototype,i,(function(){return this})),t.AsyncIterator=S,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new S(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(w),s(w,c,"Generator"),s(w,a,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=U,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:U(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function t(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,a=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}function n(e,t,r,n,o,a,i){try{var c=e[a](i),u=c.value}catch(s){return void r(s)}c.done?t(u):Promise.resolve(u).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function c(e){n(i,o,a,c,u,"next",e)}function u(e){n(i,o,a,c,u,"throw",e)}c(void 0)}))}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(u){c=!0,o=u}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}System.register(["./index-legacy.7de89ac7.js"],(function(n,i){"use strict";var c,l,f,h,d,p,m,v,y,g,w,b,S,x,L,E,k,U,j,_;return{setters:[function(e){c=e.d8,l=e.b,f=e.B,h=e.d,d=e.e,p=e.x,m=e.ai,v=e.c2,y=e.am,g=e.W,w=e.ah,b=e.K,S=e.O,x=e.Q,L=e.S,E=e.i,k=e.j,U=e.k,j=e.l,_=e._}],execute:function(){var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.crc=-1}var t,r,n;return t=e,(r=[{key:"append",value:function(e){for(var t=0|this.crc,r=this.table,n=0,o=0|e.length;n<o;n++)t=t>>>8^r[255&(t^e[n])];this.crc=t}},{key:"get",value:function(){return~this.crc}}])&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();i.prototype.table=function(){var e,t,r,n=[];for(e=0;e<256;e++){for(r=e,t=0;t<8;t++)r=1&r?r>>>1^3988292384:r>>>1;n[e]=r}return n}();var M=function(e){var t=new Uint8Array(e);return{array:t,view:new DataView(t.buffer)}};window.ZIP=function(e){var t,r,n,o=Object.create(null),a=[],c=new TextEncoder,u=0,s=0;function l(){s++,(r=o[a[s]])?d():n&&h()}var f={enqueue:function(e){if(n)throw new TypeError("Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed");var i=e.name.trim(),s=new Date(void 0===e.lastModified?Date.now():e.lastModified);if(e.directory&&!i.endsWith("/")&&(i+="/"),o[i])throw new Error("File already exists.");var f=c.encode(i);a.push(i);var h=o[i]={level:0,ctrl:t,directory:!!e.directory,nameBuf:f,comment:c.encode(e.comment||""),compressedLength:0,uncompressedLength:0,writeHeader:function(){var e=M(26),r=M(30+f.length);h.offset=u,h.header=e,0===h.level||h.directory||e.view.setUint16(4,2048),e.view.setUint32(0,335546376),e.view.setUint16(6,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2,!0),e.view.setUint16(8,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate(),!0),e.view.setUint16(22,f.length,!0),r.view.setUint32(0,1347093252),r.array.set(e.array,4),r.array.set(f,30),u+=r.array.length,t.enqueue(r.array)},writeFooter:function(){var e=M(16);e.view.setUint32(0,1347094280),h.crc&&(h.header.view.setUint32(10,h.crc.get(),!0),h.header.view.setUint32(14,h.compressedLength,!0),h.header.view.setUint32(18,h.uncompressedLength,!0),e.view.setUint32(4,h.crc.get(),!0),e.view.setUint32(8,h.compressedLength,!0),e.view.setUint32(12,h.uncompressedLength,!0)),t.enqueue(e.array),u+=h.compressedLength+16,l()},fileLike:e};r||(r=h,d())},close:function(){if(n)throw new TypeError("Cannot close a readable stream that has already been requested to be closed");r||h(),n=!0}};function h(){var e,r,n=0,i=0;for(e=0;e<a.length;e++)n+=46+(r=o[a[e]]).nameBuf.length+r.comment.length;var c=M(n+22);for(e=0;e<a.length;e++)r=o[a[e]],c.view.setUint32(i,1347092738),c.view.setUint16(i+4,5120),c.array.set(r.header.array,i+6),c.view.setUint16(i+32,r.comment.length,!0),r.directory&&c.view.setUint8(i+38,16),c.view.setUint32(i+42,r.offset,!0),c.array.set(r.nameBuf,i+46),c.array.set(r.comment,i+46+r.nameBuf.length),i+=46+r.nameBuf.length+r.comment.length;c.view.setUint32(i,1347093766),c.view.setUint16(i+8,a.length,!0),c.view.setUint16(i+10,a.length,!0),c.view.setUint32(i+12,n,!0),c.view.setUint32(i+16,u,!0),t.enqueue(c.array),t.close()}function d(){var e;if(r)return r.directory?r.writeFooter(r.writeHeader()):r.reader?(e=r).reader.read().then((function(t){if(t.done)return e.writeFooter();var r=t.value;e.crc.append(r),e.uncompressedLength+=r.length,e.compressedLength+=r.length,e.ctrl.enqueue(r)})):void(r.fileLike.stream?(r.crc=new i,r.reader=r.fileLike.stream.getReader(),r.writeHeader()):l())}return new ReadableStream({start:function(r){t=r,e.start&&Promise.resolve(e.start(f))},pull:function(){return d()||e.pull&&Promise.resolve(e.pull(f))}})};var T={exports:{}};/*! streamsaver. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */!function(e){var t=this;e.exports=function(){var e="object"===("undefined"==typeof window?"undefined":u(window))?window:t;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");var r=null,n=!1,o=function(e){try{e()}catch(t){}},a=e.WebStreamsPolyfill||{},i=e.isSecureContext,c=/constructor/i.test(e.HTMLElement)||!!e.safari||!!e.WebKitPoint,s=i||"MozAppearance"in document.documentElement.style?"iframe":"navigate",l={createWriteStream:p,WritableStream:e.WritableStream||a.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function f(e){if(!e)throw new Error("meh");var t=document.createElement("iframe");return t.hidden=!0,t.src=e,t.loaded=!1,t.name="iframe",t.isIframe=!0,t.postMessage=function(){var e;return(e=t.contentWindow).postMessage.apply(e,arguments)},t.addEventListener("load",(function(){t.loaded=!0}),{once:!0}),document.body.appendChild(t),t}function h(t){var r="width=200,height=100",n=document.createDocumentFragment(),o={frame:e.open(t,"popup",r),loaded:!1,isIframe:!1,isPopup:!0,remove:function(){o.frame.close()},addEventListener:function(){n.addEventListener.apply(n,arguments)},dispatchEvent:function(){n.dispatchEvent.apply(n,arguments)},removeEventListener:function(){n.removeEventListener.apply(n,arguments)},postMessage:function(){var e;(e=o.frame).postMessage.apply(e,arguments)}},a=function t(r){r.source===o.frame&&(o.loaded=!0,e.removeEventListener("message",t),o.dispatchEvent(new Event("load")))};return e.addEventListener("message",a),o}try{new Response(new ReadableStream),i&&!("serviceWorker"in navigator)&&(c=!0)}catch(m){c=!0}function d(){r||(r=i?f(l.mitm):h(l.mitm))}function p(e,t,o){var a={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},i=0,u=null,h=null,p=null;if(Number.isFinite(t)){var m=[t,o];o=m[0],t=m[1],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),a.size=o,a.writableStrategy=t}else t&&t.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),a.size=o,a.writableStrategy=t):a=t||{};if(!c){d(),h=new MessageChannel,e=encodeURIComponent(e.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");var v={transferringReadable:n,pathname:a.pathname||Math.random().toString().slice(-6)+"/"+e,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+e}};a.size&&(v.headers["Content-Length"]=a.size);var y,g=[v,"*",[h.port2]];if(n){var w="iframe"===s?void 0:{transform:function(e,t){if(!(e instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");i+=e.length,t.enqueue(e),u&&(location.href=u,u=null)},flush:function(){u&&(location.href=u)}},b=(p=new l.TransformStream(w,a.writableStrategy,a.readableStrategy)).readable;h.port1.postMessage({readableStream:b},[b])}h.port1.onmessage=function(e){e.data.download?"navigate"===s?(r.remove(),r=null,i?location.href=e.data.download:u=e.data.download):(r.isPopup&&(r.remove(),r=null,"iframe"===s&&f(l.mitm)),f(e.data.download)):e.data.abort&&(S=[],h.port1.postMessage("abort"),h.port1.onmessage=null,h.port1.close(),h.port2.close(),h=null)},r.loaded?(y=r).postMessage.apply(y,g):r.addEventListener("load",(function(){var e;(e=r).postMessage.apply(e,g)}),{once:!0})}var S=[];return!c&&p&&p.writable||new l.WritableStream({write:function(e){if(!(e instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");c?S.push(e):(h.port1.postMessage(e),i+=e.length,u&&(location.href=u,u=null))},close:function(){if(c){var t=new Blob(S,{type:"application/octet-stream; charset=utf-8"}),r=document.createElement("a");r.href=URL.createObjectURL(t),r.download=e,r.click()}else h.port1.postMessage("end")},abort:function(){S=[],h.port1.postMessage("abort"),h.port1.onmessage=null,h.port1.close(),h.port2.close(),h=null}},a.writableStrategy)}return o((function(){var e=(new TransformStream).readable,t=new MessageChannel;t.port1.postMessage(e,[e]),t.port1.close(),t.port2.close(),n=!0,Object.defineProperty(l,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})})),l}()}(T);var A=c(T.exports);A.mitm="/streamer/mitm.html";var O=0;n("default",(function(n){var i=l(),c=a(f(i("home.package_download.initializing")),2),u=c[0],s=c[1],M=a(f(0),2),T=M[0],P=M[1],C=h().pathname,I=d(),F=function(){var n=o(e().mark((function n(o,a){var i,c,u,s,l,f,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.is_dir){e.next=5;break}return O+=a.size,e.abrupt("return",[{path:k(o,a.name),url:U(k(C(),o),a,"direct",!0)}]);case 5:return e.next=7,j(k(C(),o,a.name),_());case 7:if(200===(c=e.sent).code){e.next=10;break}return e.abrupt("return",c.message);case 10:u=[],s=r(null!==(i=c.data.content)&&void 0!==i?i:[]),e.prev=12,s.s();case 14:if((l=s.n()).done){e.next=26;break}return f=l.value,e.next=18,F(k(o,a.name),f);case 18:if("string"!=typeof(h=e.sent)){e.next=23;break}return e.abrupt("return",h);case 23:u.push.apply(u,t(h));case 24:e.next=14;break;case 26:e.next=31;break;case 28:e.prev=28,e.t0=e.catch(12),s.e(e.t0);case 31:return e.prev=31,s.f(),e.finish(31);case 34:return e.abrupt("return",u);case 35:case"end":return e.stop()}}),n,null,[[12,28,31,34]])})));return function(e,t){return n.apply(this,arguments)}}(),W=a(f([]),2),q=W[0],z=W[1],N=function(){var n=o(e().mark((function n(){var o,a,c,u,l,f,h,d,p;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=E(C()),1===I.length&&(o=I[0].name),o||(o=i("manage.sidemenu.home")),a=A.createWriteStream("".concat(o,".zip"),{size:O}),s(i("home.package_download.fetching_struct")),P(2),c=[],u=r(I),e.prev=8,u.s();case 10:if((l=u.n()).done){e.next=24;break}return f=l.value,e.next=14,F("",f);case 14:if("string"!=typeof(h=e.sent)){e.next=21;break}return s("".concat(i("home.package_download.fetching_struct_failed"),": ").concat(h)),P(1),e.abrupt("return",h);case 21:c.push.apply(c,t(h));case 22:e.next=10;break;case 24:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(8),u.e(e.t0);case 29:return e.prev=29,u.f(),e.finish(29);case 32:if(s(i("home.package_download.downloading")),P(3),d=c.values(),p=new window.ZIP({pull:function(e){var r=d.next();if(!r.done){var n=r.value.path.replace(/^\/+|\/+$/g,"");1===I.length&&(n=n.replace("".concat(o,"/"),""));var a=r.value.url;return fetch(a).then((function(r){z((function(e){return[].concat(t(e),[n])})),e.enqueue({name:n,stream:r.body})}))}e.close()}}),!window.WritableStream||!p.pipeTo){e.next=38;break}return e.abrupt("return",p.pipeTo(a).then((function(){s("".concat(i("home.package_download.success"))),P(4)})).catch((function(e){s("".concat(i("home.package_download.failed"),": ").concat(e)),P(1)})));case 38:case"end":return e.stop()}}),n,null,[[8,26,29,32]])})));return function(){return n.apply(this,arguments)}}();return N(),[p(b,{get children(){return p(m,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[p(v,{get children(){return[y((function(){return i("home.package_download.current_status")})),": ",y((function(){return u()}))]}}),p(g,{get each(){return q()},children:function(e){return p(w,{css:{wordBreak:"break-all"},get children(){return["Fetching: ",e]}})}})]}})}}),p(L,{get when(){return[1,4].includes(T())},get children(){return p(S,{get children(){return p(x,{colorScheme:"info",get onClick(){return n.onClose},get children(){return i("global.close")}})}})}})]}))}}}))}();
1
+ !function(){function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(_){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),i=new k(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return j()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,i),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(_){return{type:"throw",arg:_}}}t.wrap=l;var h={};function d(){}function p(){}function m(){}var v={};s(v,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(U([])));g&&g!==r&&n.call(g,a)&&(v=g);var w=m.prototype=d.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(o,a,i,c){var s=f(e[o],e,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(h).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,c)}))}c(s.arg)}var o;this._invoke=function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,h;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function U(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=m,s(w,"constructor",m),s(m,"constructor",p),p.displayName=s(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},b(S.prototype),s(S.prototype,i,(function(){return this})),t.AsyncIterator=S,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new S(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(w),s(w,c,"Generator"),s(w,a,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=U,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:U(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function t(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,a=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}function n(e,t,r,n,o,a,i){try{var c=e[a](i),u=c.value}catch(s){return void r(s)}c.done?t(u):Promise.resolve(u).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function c(e){n(i,o,a,c,u,"next",e)}function u(e){n(i,o,a,c,u,"throw",e)}c(void 0)}))}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(u){c=!0,o=u}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}System.register(["./index-legacy.eace8bff.js"],(function(n,i){"use strict";var c,l,f,h,d,p,m,v,y,g,w,b,S,x,L,E,k,U,j,_;return{setters:[function(e){c=e.da,l=e.b,f=e.B,h=e.d,d=e.e,p=e.x,m=e.ai,v=e.c2,y=e.am,g=e.W,w=e.ah,b=e.K,S=e.O,x=e.Q,L=e.S,E=e.i,k=e.j,U=e.k,j=e.l,_=e._}],execute:function(){var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.crc=-1}var t,r,n;return t=e,(r=[{key:"append",value:function(e){for(var t=0|this.crc,r=this.table,n=0,o=0|e.length;n<o;n++)t=t>>>8^r[255&(t^e[n])];this.crc=t}},{key:"get",value:function(){return~this.crc}}])&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();i.prototype.table=function(){var e,t,r,n=[];for(e=0;e<256;e++){for(r=e,t=0;t<8;t++)r=1&r?r>>>1^3988292384:r>>>1;n[e]=r}return n}();var M=function(e){var t=new Uint8Array(e);return{array:t,view:new DataView(t.buffer)}};window.ZIP=function(e){var t,r,n,o=Object.create(null),a=[],c=new TextEncoder,u=0,s=0;function l(){s++,(r=o[a[s]])?d():n&&h()}var f={enqueue:function(e){if(n)throw new TypeError("Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed");var i=e.name.trim(),s=new Date(void 0===e.lastModified?Date.now():e.lastModified);if(e.directory&&!i.endsWith("/")&&(i+="/"),o[i])throw new Error("File already exists.");var f=c.encode(i);a.push(i);var h=o[i]={level:0,ctrl:t,directory:!!e.directory,nameBuf:f,comment:c.encode(e.comment||""),compressedLength:0,uncompressedLength:0,writeHeader:function(){var e=M(26),r=M(30+f.length);h.offset=u,h.header=e,0===h.level||h.directory||e.view.setUint16(4,2048),e.view.setUint32(0,335546376),e.view.setUint16(6,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2,!0),e.view.setUint16(8,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate(),!0),e.view.setUint16(22,f.length,!0),r.view.setUint32(0,1347093252),r.array.set(e.array,4),r.array.set(f,30),u+=r.array.length,t.enqueue(r.array)},writeFooter:function(){var e=M(16);e.view.setUint32(0,1347094280),h.crc&&(h.header.view.setUint32(10,h.crc.get(),!0),h.header.view.setUint32(14,h.compressedLength,!0),h.header.view.setUint32(18,h.uncompressedLength,!0),e.view.setUint32(4,h.crc.get(),!0),e.view.setUint32(8,h.compressedLength,!0),e.view.setUint32(12,h.uncompressedLength,!0)),t.enqueue(e.array),u+=h.compressedLength+16,l()},fileLike:e};r||(r=h,d())},close:function(){if(n)throw new TypeError("Cannot close a readable stream that has already been requested to be closed");r||h(),n=!0}};function h(){var e,r,n=0,i=0;for(e=0;e<a.length;e++)n+=46+(r=o[a[e]]).nameBuf.length+r.comment.length;var c=M(n+22);for(e=0;e<a.length;e++)r=o[a[e]],c.view.setUint32(i,1347092738),c.view.setUint16(i+4,5120),c.array.set(r.header.array,i+6),c.view.setUint16(i+32,r.comment.length,!0),r.directory&&c.view.setUint8(i+38,16),c.view.setUint32(i+42,r.offset,!0),c.array.set(r.nameBuf,i+46),c.array.set(r.comment,i+46+r.nameBuf.length),i+=46+r.nameBuf.length+r.comment.length;c.view.setUint32(i,1347093766),c.view.setUint16(i+8,a.length,!0),c.view.setUint16(i+10,a.length,!0),c.view.setUint32(i+12,n,!0),c.view.setUint32(i+16,u,!0),t.enqueue(c.array),t.close()}function d(){var e;if(r)return r.directory?r.writeFooter(r.writeHeader()):r.reader?(e=r).reader.read().then((function(t){if(t.done)return e.writeFooter();var r=t.value;e.crc.append(r),e.uncompressedLength+=r.length,e.compressedLength+=r.length,e.ctrl.enqueue(r)})):void(r.fileLike.stream?(r.crc=new i,r.reader=r.fileLike.stream.getReader(),r.writeHeader()):l())}return new ReadableStream({start:function(r){t=r,e.start&&Promise.resolve(e.start(f))},pull:function(){return d()||e.pull&&Promise.resolve(e.pull(f))}})};var T={exports:{}};/*! streamsaver. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */!function(e){var t=this;e.exports=function(){var e="object"===("undefined"==typeof window?"undefined":u(window))?window:t;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");var r=null,n=!1,o=function(e){try{e()}catch(t){}},a=e.WebStreamsPolyfill||{},i=e.isSecureContext,c=/constructor/i.test(e.HTMLElement)||!!e.safari||!!e.WebKitPoint,s=i||"MozAppearance"in document.documentElement.style?"iframe":"navigate",l={createWriteStream:p,WritableStream:e.WritableStream||a.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function f(e){if(!e)throw new Error("meh");var t=document.createElement("iframe");return t.hidden=!0,t.src=e,t.loaded=!1,t.name="iframe",t.isIframe=!0,t.postMessage=function(){var e;return(e=t.contentWindow).postMessage.apply(e,arguments)},t.addEventListener("load",(function(){t.loaded=!0}),{once:!0}),document.body.appendChild(t),t}function h(t){var r="width=200,height=100",n=document.createDocumentFragment(),o={frame:e.open(t,"popup",r),loaded:!1,isIframe:!1,isPopup:!0,remove:function(){o.frame.close()},addEventListener:function(){n.addEventListener.apply(n,arguments)},dispatchEvent:function(){n.dispatchEvent.apply(n,arguments)},removeEventListener:function(){n.removeEventListener.apply(n,arguments)},postMessage:function(){var e;(e=o.frame).postMessage.apply(e,arguments)}},a=function t(r){r.source===o.frame&&(o.loaded=!0,e.removeEventListener("message",t),o.dispatchEvent(new Event("load")))};return e.addEventListener("message",a),o}try{new Response(new ReadableStream),i&&!("serviceWorker"in navigator)&&(c=!0)}catch(m){c=!0}function d(){r||(r=i?f(l.mitm):h(l.mitm))}function p(e,t,o){var a={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},i=0,u=null,h=null,p=null;if(Number.isFinite(t)){var m=[t,o];o=m[0],t=m[1],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),a.size=o,a.writableStrategy=t}else t&&t.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),a.size=o,a.writableStrategy=t):a=t||{};if(!c){d(),h=new MessageChannel,e=encodeURIComponent(e.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");var v={transferringReadable:n,pathname:a.pathname||Math.random().toString().slice(-6)+"/"+e,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+e}};a.size&&(v.headers["Content-Length"]=a.size);var y,g=[v,"*",[h.port2]];if(n){var w="iframe"===s?void 0:{transform:function(e,t){if(!(e instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");i+=e.length,t.enqueue(e),u&&(location.href=u,u=null)},flush:function(){u&&(location.href=u)}},b=(p=new l.TransformStream(w,a.writableStrategy,a.readableStrategy)).readable;h.port1.postMessage({readableStream:b},[b])}h.port1.onmessage=function(e){e.data.download?"navigate"===s?(r.remove(),r=null,i?location.href=e.data.download:u=e.data.download):(r.isPopup&&(r.remove(),r=null,"iframe"===s&&f(l.mitm)),f(e.data.download)):e.data.abort&&(S=[],h.port1.postMessage("abort"),h.port1.onmessage=null,h.port1.close(),h.port2.close(),h=null)},r.loaded?(y=r).postMessage.apply(y,g):r.addEventListener("load",(function(){var e;(e=r).postMessage.apply(e,g)}),{once:!0})}var S=[];return!c&&p&&p.writable||new l.WritableStream({write:function(e){if(!(e instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");c?S.push(e):(h.port1.postMessage(e),i+=e.length,u&&(location.href=u,u=null))},close:function(){if(c){var t=new Blob(S,{type:"application/octet-stream; charset=utf-8"}),r=document.createElement("a");r.href=URL.createObjectURL(t),r.download=e,r.click()}else h.port1.postMessage("end")},abort:function(){S=[],h.port1.postMessage("abort"),h.port1.onmessage=null,h.port1.close(),h.port2.close(),h=null}},a.writableStrategy)}return o((function(){var e=(new TransformStream).readable,t=new MessageChannel;t.port1.postMessage(e,[e]),t.port1.close(),t.port2.close(),n=!0,Object.defineProperty(l,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})})),l}()}(T);var A=c(T.exports);A.mitm="/streamer/mitm.html";var O=0;n("default",(function(n){var i=l(),c=a(f(i("home.package_download.initializing")),2),u=c[0],s=c[1],M=a(f(0),2),T=M[0],P=M[1],C=h().pathname,I=d(),F=function(){var n=o(e().mark((function n(o,a){var i,c,u,s,l,f,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.is_dir){e.next=5;break}return O+=a.size,e.abrupt("return",[{path:k(o,a.name),url:U(k(C(),o),a,"direct",!0)}]);case 5:return e.next=7,j(k(C(),o,a.name),_());case 7:if(200===(c=e.sent).code){e.next=10;break}return e.abrupt("return",c.message);case 10:u=[],s=r(null!==(i=c.data.content)&&void 0!==i?i:[]),e.prev=12,s.s();case 14:if((l=s.n()).done){e.next=26;break}return f=l.value,e.next=18,F(k(o,a.name),f);case 18:if("string"!=typeof(h=e.sent)){e.next=23;break}return e.abrupt("return",h);case 23:u.push.apply(u,t(h));case 24:e.next=14;break;case 26:e.next=31;break;case 28:e.prev=28,e.t0=e.catch(12),s.e(e.t0);case 31:return e.prev=31,s.f(),e.finish(31);case 34:return e.abrupt("return",u);case 35:case"end":return e.stop()}}),n,null,[[12,28,31,34]])})));return function(e,t){return n.apply(this,arguments)}}(),W=a(f([]),2),q=W[0],z=W[1],N=function(){var n=o(e().mark((function n(){var o,a,c,u,l,f,h,d,p;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=E(C()),1===I.length&&(o=I[0].name),o||(o=i("manage.sidemenu.home")),a=A.createWriteStream("".concat(o,".zip"),{size:O}),s(i("home.package_download.fetching_struct")),P(2),c=[],u=r(I),e.prev=8,u.s();case 10:if((l=u.n()).done){e.next=24;break}return f=l.value,e.next=14,F("",f);case 14:if("string"!=typeof(h=e.sent)){e.next=21;break}return s("".concat(i("home.package_download.fetching_struct_failed"),": ").concat(h)),P(1),e.abrupt("return",h);case 21:c.push.apply(c,t(h));case 22:e.next=10;break;case 24:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(8),u.e(e.t0);case 29:return e.prev=29,u.f(),e.finish(29);case 32:if(s(i("home.package_download.downloading")),P(3),d=c.values(),p=new window.ZIP({pull:function(e){var r=d.next();if(!r.done){var n=r.value.path.replace(/^\/+|\/+$/g,"");1===I.length&&(n=n.replace("".concat(o,"/"),""));var a=r.value.url;return fetch(a).then((function(r){z((function(e){return[].concat(t(e),[n])})),e.enqueue({name:n,stream:r.body})}))}e.close()}}),!window.WritableStream||!p.pipeTo){e.next=38;break}return e.abrupt("return",p.pipeTo(a).then((function(){s("".concat(i("home.package_download.success"))),P(4)})).catch((function(e){s("".concat(i("home.package_download.failed"),": ").concat(e)),P(1)})));case 38:case"end":return e.stop()}}),n,null,[[8,26,29,32]])})));return function(){return n.apply(this,arguments)}}();return N(),[p(b,{get children(){return p(m,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[p(v,{get children(){return[y((function(){return i("home.package_download.current_status")})),": ",y((function(){return u()}))]}}),p(g,{get each(){return q()},children:function(e){return p(w,{css:{wordBreak:"break-all"},get children(){return["Fetching: ",e]}})}})]}})}}),p(L,{get when(){return[1,4].includes(T())},get children(){return p(S,{get children(){return p(x,{colorScheme:"info",get onClick(){return n.onClose},get children(){return i("global.close")}})}})}})]}))}}}))}();
@@ -1 +1 @@
1
- import{V as z,cW as $,A as u,x as r,av as b,S as h,Q as i,aB as d,dY as w,W as g,bL as k,bM as M,ao as _,bQ as A,bR as v,bS as y,bT as B,dZ as O}from"./index-901660e1.js";import{s as T}from"./index-4acf76ed.js";const R=x=>{var m;const t=z({maxShowPage:4,defaultPageSize:30,defaultCurrent:1,hideOnSinglePage:!0},x),[n,S]=$({pageSize:t.defaultPageSize,current:t.defaultCurrent});(m=t.setResetCallback)==null||m.call(t,()=>{S("current",t.defaultCurrent)});const a=u(()=>Math.ceil(t.total/n.pageSize)),f=u(()=>{const e=n.current,c=Math.max(2,e-Math.floor(t.maxShowPage/2));return Array.from({length:e-c},(P,s)=>c+s)}),p=u(()=>{const e=n.current,c=Math.min(a()-1,e+Math.floor(t.maxShowPage/2));return Array.from({length:c-e},(P,s)=>e+1+s)}),C=u(()=>Array.from({length:a()},(e,c)=>1+c)),o={"@initial":"sm","@md":"md"},l=e=>{var c;S("current",e),(c=t.onChange)==null||c.call(t,e)};return r(h,{get when(){return!t.hideOnSinglePage||a()>1},get children(){return r(b,{spacing:"$1",get children(){return[r(h,{get when(){return n.current!==1},get children(){return[r(i,{size:o,get colorScheme(){return t.colorScheme},onClick:()=>{l(1)},px:"$3",children:"1"}),r(d,{size:o,get icon(){return r(w,{})},"aria-label":"Previous",get colorScheme(){return t.colorScheme},onClick:()=>{l(n.current-1)},w:"2rem !important"})]}}),r(g,{get each(){return f()},children:e=>r(i,{size:o,get colorScheme(){return t.colorScheme},onClick:()=>{l(e)},px:e>10?"$2_5":"$3",children:e})}),r(k,{size:o,variant:"unstyled",get defaultValue(){return n.current},onChange:e=>{l(+e)},get children(){return[r(M,{as:i,size:o,width:"auto",px:"$1",variant:"solid",get colorScheme(){return t.colorScheme},get children(){return[r(_,{get px(){return n.current>10?"$1_5":"$2"},get children(){return n.current}}),r(T,{})]}}),r(A,{minW:"80px",get children(){return r(v,{get children(){return r(g,{get each(){return C()},children:e=>r(y,{value:e,get children(){return r(B,{px:"$2",children:e})}})})}})}})]}}),r(g,{get each(){return p()},children:e=>r(i,{size:o,get colorScheme(){return t.colorScheme},onClick:()=>{l(e)},px:e>10?"$2_5":"$3",children:e})}),r(h,{get when(){return n.current!==a()},get children(){return[r(d,{size:o,get icon(){return r(O,{})},"aria-label":"Next",get colorScheme(){return t.colorScheme},onClick:()=>{l(n.current+1)},w:"2rem !important"}),r(i,{size:o,get colorScheme(){return t.colorScheme},onClick:()=>{l(a())},get px(){return a()>10?"$2_5":"$3"},get children(){return a()}})]}})]}})}})};export{R as P};
1
+ import{V as z,cW as $,A as u,x as r,av as b,S as s,Q as i,aB as d,d_ as w,W as g,bL as k,bM as _,ao as M,bQ as A,bR as v,bS as y,bT as B,d$ as O}from"./index-0ac33e44.js";import{q as T}from"./index-06a2e1d1.js";const R=x=>{var m;const t=z({maxShowPage:4,defaultPageSize:30,defaultCurrent:1,hideOnSinglePage:!0},x),[n,S]=$({pageSize:t.defaultPageSize,current:t.defaultCurrent});(m=t.setResetCallback)==null||m.call(t,()=>{S("current",t.defaultCurrent)});const a=u(()=>Math.ceil(t.total/n.pageSize)),f=u(()=>{const e=n.current,c=Math.max(2,e-Math.floor(t.maxShowPage/2));return Array.from({length:e-c},(P,h)=>c+h)}),p=u(()=>{const e=n.current,c=Math.min(a()-1,e+Math.floor(t.maxShowPage/2));return Array.from({length:c-e},(P,h)=>e+1+h)}),C=u(()=>Array.from({length:a()},(e,c)=>1+c)),o={"@initial":"sm","@md":"md"},l=e=>{var c;S("current",e),(c=t.onChange)==null||c.call(t,e)};return r(s,{get when(){return!t.hideOnSinglePage||a()>1},get children(){return r(b,{spacing:"$1",get children(){return[r(s,{get when(){return n.current!==1},get children(){return[r(i,{size:o,get colorScheme(){return t.colorScheme},onClick:()=>{l(1)},px:"$3",children:"1"}),r(d,{size:o,get icon(){return r(w,{})},"aria-label":"Previous",get colorScheme(){return t.colorScheme},onClick:()=>{l(n.current-1)},w:"2rem !important"})]}}),r(g,{get each(){return f()},children:e=>r(i,{size:o,get colorScheme(){return t.colorScheme},onClick:()=>{l(e)},px:e>10?"$2_5":"$3",children:e})}),r(k,{size:o,variant:"unstyled",get defaultValue(){return n.current},onChange:e=>{l(+e)},get children(){return[r(_,{as:i,size:o,width:"auto",px:"$1",variant:"solid",get colorScheme(){return t.colorScheme},get children(){return[r(M,{get px(){return n.current>10?"$1_5":"$2"},get children(){return n.current}}),r(T,{})]}}),r(A,{minW:"80px",get children(){return r(v,{get children(){return r(g,{get each(){return C()},children:e=>r(y,{value:e,get children(){return r(B,{px:"$2",children:e})}})})}})}})]}}),r(g,{get each(){return p()},children:e=>r(i,{size:o,get colorScheme(){return t.colorScheme},onClick:()=>{l(e)},px:e>10?"$2_5":"$3",children:e})}),r(s,{get when(){return n.current!==a()},get children(){return[r(d,{size:o,get icon(){return r(O,{})},"aria-label":"Next",get colorScheme(){return t.colorScheme},onClick:()=>{l(n.current+1)},w:"2rem !important"}),r(i,{size:o,get colorScheme(){return t.colorScheme},onClick:()=>{l(a())},get px(){return a()>10?"$2_5":"$3"},get children(){return a()}})]}})]}})}})};export{R as P};
@@ -0,0 +1 @@
1
+ !function(){function e(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var t,u,c=[],i=!0,o=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(c.push(t.value),!r||c.length!==r);i=!0);}catch(l){o=!0,u=l}finally{try{i||null==n.return||n.return()}finally{if(o)throw u}}return c}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return r(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}System.register(["./index-legacy.eace8bff.js","./index-legacy.f9a28a3c.js"],(function(r,n){"use strict";var t,u,c,i,o,l,a,h,f,g,d,m,s,S,y,p,v,b,x;return{setters:[function(e){t=e.V,u=e.cW,c=e.A,i=e.x,o=e.av,l=e.S,a=e.Q,h=e.aB,f=e.d_,g=e.W,d=e.bL,m=e.bM,s=e.ao,S=e.bQ,y=e.bR,p=e.bS,v=e.bT,b=e.d$},function(e){x=e.q}],execute:function(){r("P",(function(r){var n,$=t({maxShowPage:4,defaultPageSize:30,defaultCurrent:1,hideOnSinglePage:!0},r),w=e(u({pageSize:$.defaultPageSize,current:$.defaultCurrent}),2),C=w[0],z=w[1];null===(n=$.setResetCallback)||void 0===n||n.call($,(function(){z("current",$.defaultCurrent)}));var A=c((function(){return Math.ceil($.total/C.pageSize)})),P=c((function(){var e=C.current,r=Math.max(2,e-Math.floor($.maxShowPage/2));return Array.from({length:e-r},(function(e,n){return r+n}))})),k=c((function(){var e=C.current,r=Math.min(A()-1,e+Math.floor($.maxShowPage/2));return Array.from({length:r-e},(function(r,n){return e+1+n}))})),M=c((function(){return Array.from({length:A()},(function(e,r){return 1+r}))})),j={"@initial":"sm","@md":"md"},_=function(e){var r;z("current",e),null===(r=$.onChange)||void 0===r||r.call($,e)};return i(l,{get when(){return!$.hideOnSinglePage||A()>1},get children(){return i(o,{spacing:"$1",get children(){return[i(l,{get when(){return 1!==C.current},get children(){return[i(a,{size:j,get colorScheme(){return $.colorScheme},onClick:function(){_(1)},px:"$3",children:"1"}),i(h,{size:j,get icon(){return i(f,{})},"aria-label":"Previous",get colorScheme(){return $.colorScheme},onClick:function(){_(C.current-1)},w:"2rem !important"})]}}),i(g,{get each(){return P()},children:function(e){return i(a,{size:j,get colorScheme(){return $.colorScheme},onClick:function(){_(e)},px:e>10?"$2_5":"$3",children:e})}}),i(d,{size:j,variant:"unstyled",get defaultValue(){return C.current},onChange:function(e){_(+e)},get children(){return[i(m,{as:a,size:j,width:"auto",px:"$1",variant:"solid",get colorScheme(){return $.colorScheme},get children(){return[i(s,{get px(){return C.current>10?"$1_5":"$2"},get children(){return C.current}}),i(x,{})]}}),i(S,{minW:"80px",get children(){return i(y,{get children(){return i(g,{get each(){return M()},children:function(e){return i(p,{value:e,get children(){return i(v,{px:"$2",children:e})}})}})}})}})]}}),i(g,{get each(){return k()},children:function(e){return i(a,{size:j,get colorScheme(){return $.colorScheme},onClick:function(){_(e)},px:e>10?"$2_5":"$3",children:e})}}),i(l,{get when(){return C.current!==A()},get children(){return[i(h,{size:j,get icon(){return i(b,{})},"aria-label":"Next",get colorScheme(){return $.colorScheme},onClick:function(){_(C.current+1)},w:"2rem !important"}),i(a,{size:j,get colorScheme(){return $.colorScheme},onClick:function(){_(A())},get px(){return A()>10?"$2_5":"$3"},get children(){return A()}})]}})]}})}})}))}}}))}();
@@ -1 +1 @@
1
- import{b as u,d as o,x as e,c2 as s,L as i,a7 as d,av as a,c3 as g,Q as l,ai as k}from"./index-901660e1.js";const m=t=>{const r=u(),{back:c}=o();return e(k,{w:{"@initial":"$full","@md":"$lg"},p:"$8",spacing:"$3",alignItems:"start",get children(){return[e(s,{get children(){return t.title}}),e(i,{type:"password",get value(){return t.password()},get background(){return d("$neutral3","$neutral2")()},onKeyDown:n=>{n.key==="Enter"&&t.enterCallback()},onInput:n=>t.setPassword(n.currentTarget.value)}),e(a,{w:"$full",justifyContent:"space-between",get children(){return[e(g,{fontSize:"$sm",color:"$neutral10",direction:{"@initial":"column","@sm":"row"},columnGap:"$1",get children(){return t.children}}),e(a,{spacing:"$2",get children(){return[e(l,{colorScheme:"neutral",onClick:c,get children(){return r("global.back")}}),e(l,{onClick:()=>t.enterCallback(),get children(){return r("global.ok")}})]}})]}})]}})};export{m as default};
1
+ import{b as u,d as o,x as e,c2 as s,L as i,a7 as d,av as a,c3 as g,Q as l,ai as k}from"./index-0ac33e44.js";const m=t=>{const r=u(),{back:c}=o();return e(k,{w:{"@initial":"$full","@md":"$lg"},p:"$8",spacing:"$3",alignItems:"start",get children(){return[e(s,{get children(){return t.title}}),e(i,{type:"password",get value(){return t.password()},get background(){return d("$neutral3","$neutral2")()},onKeyDown:n=>{n.key==="Enter"&&t.enterCallback()},onInput:n=>t.setPassword(n.currentTarget.value)}),e(a,{w:"$full",justifyContent:"space-between",get children(){return[e(g,{fontSize:"$sm",color:"$neutral10",direction:{"@initial":"column","@sm":"row"},columnGap:"$1",get children(){return t.children}}),e(a,{spacing:"$2",get children(){return[e(l,{colorScheme:"neutral",onClick:c,get children(){return r("global.back")}}),e(l,{onClick:()=>t.enterCallback(),get children(){return r("global.ok")}})]}})]}})]}})};export{m as default};
@@ -1 +1 @@
1
- System.register(["./index-legacy.7de89ac7.js"],(function(e,n){"use strict";var t,r,l,c,u,i,a,o,s,g;return{setters:[function(e){t=e.b,r=e.d,l=e.x,c=e.c2,u=e.L,i=e.a7,a=e.av,o=e.c3,s=e.Q,g=e.ai}],execute:function(){e("default",(function(e){var n=t(),d=r().back;return l(g,{w:{"@initial":"$full","@md":"$lg"},p:"$8",spacing:"$3",alignItems:"start",get children(){return[l(c,{get children(){return e.title}}),l(u,{type:"password",get value(){return e.password()},get background(){return i("$neutral3","$neutral2")()},onKeyDown:function(n){"Enter"===n.key&&e.enterCallback()},onInput:function(n){return e.setPassword(n.currentTarget.value)}}),l(a,{w:"$full",justifyContent:"space-between",get children(){return[l(o,{fontSize:"$sm",color:"$neutral10",direction:{"@initial":"column","@sm":"row"},columnGap:"$1",get children(){return e.children}}),l(a,{spacing:"$2",get children(){return[l(s,{colorScheme:"neutral",onClick:d,get children(){return n("global.back")}}),l(s,{onClick:function(){return e.enterCallback()},get children(){return n("global.ok")}})]}})]}})]}})}))}}}));
1
+ System.register(["./index-legacy.eace8bff.js"],(function(e,n){"use strict";var t,r,l,c,u,i,a,o,s,g;return{setters:[function(e){t=e.b,r=e.d,l=e.x,c=e.c2,u=e.L,i=e.a7,a=e.av,o=e.c3,s=e.Q,g=e.ai}],execute:function(){e("default",(function(e){var n=t(),d=r().back;return l(g,{w:{"@initial":"$full","@md":"$lg"},p:"$8",spacing:"$3",alignItems:"start",get children(){return[l(c,{get children(){return e.title}}),l(u,{type:"password",get value(){return e.password()},get background(){return i("$neutral3","$neutral2")()},onKeyDown:function(n){"Enter"===n.key&&e.enterCallback()},onInput:function(n){return e.setPassword(n.currentTarget.value)}}),l(a,{w:"$full",justifyContent:"space-between",get children(){return[l(o,{fontSize:"$sm",color:"$neutral10",direction:{"@initial":"column","@sm":"row"},columnGap:"$1",get children(){return e.children}}),l(a,{spacing:"$2",get children(){return[l(s,{colorScheme:"neutral",onClick:d,get children(){return n("global.back")}}),l(s,{onClick:function(){return e.enterCallback()},get children(){return n("global.ok")}})]}})]}})]}})}))}}}));
@@ -1 +1 @@
1
- import{b as q,d as O,cW as W,be as d,eg as z,q as B,eh as H,ei as M,x as e,c2 as R,ap as D,ai as m,bW as l,bJ as c,L as h,bL as Q,bM as j,ao as J,S as b,bN as N,W as f,dp as $,dq as S,dr as U,aY as u,am as V,bQ as Y,bR as A,bS as E,av as k,bg as G,bT as K,Q as v,bw as x,n as P}from"./index-901660e1.js";const Z=()=>{const n=q(),{params:C,back:g}=O(),{id:i}=C,[s,o]=W({name:"",description:"",permission:0,path_pattern:"/**"}),[w,y]=d(()=>z(parseInt(i))),_=async()=>{if(i){const r=await y();x(r,t=>{o({name:t.name,description:t.description,permission:t.permission,path_pattern:t.path_pattern})})}};B(()=>{_()});const T=()=>s.name.trim()?!0:(P.error(n("permissions.config.permissions_name")+n("global.required")),!1),[I,L]=d(async()=>T()?i?H({...s,id:parseInt(i)}):M(s):Promise.reject()),a=()=>u.filter((r,t)=>(s.permission>>t&1)===1),p=r=>{const t=1<<r;o("permission",s.permission^t)};return e(m,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(R,{get children(){return n(i?"global.edit":"global.add")}}),e(D,{get loading(){return w()},get children(){return e(m,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(l,{required:!0,get children(){return[e(c,{get children(){return n("permissions.config.permissions_name")}}),e(h,{get value(){return s.name},onInput:r=>o("name",r.currentTarget.value)})]}}),e(l,{get children(){return[e(c,{get children(){return n("permissions.config.permissions_description")}}),e(h,{get value(){return s.description},onInput:r=>o("description",r.currentTarget.value)})]}}),e(l,{required:!0,get children(){return[e(c,{get children(){return n("permissions.config.permissions_permissions")}}),e(Q,{multiple:!0,get value(){return a()},get children(){return[e(j,{get children(){return e(J,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return e(b,{get when(){return a().length>0},get fallback(){return e(N,{get children(){return n("permissions.config.select_permissions")}})},get children(){return[e(f,{get each(){return a().slice(0,3)},children:(r,t)=>e($,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[e(S,{get children(){return n(`users.permissions.${r}`)}}),e(U,{onClick:F=>{F.stopPropagation(),p(u.indexOf(r))}})]}})}),e(b,{get when(){return a().length>3},get children(){return e($,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return e(S,{get children(){return["+",V(()=>a().length-3)]}})}})}})]}})}})}}),e(Y,{get children(){return e(A,{get children(){return e(f,{each:u,children:(r,t)=>e(E,{value:r,onClick:()=>p(t()),get children(){return e(k,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[e(G,{get checked(){return(s.permission>>t()&1)===1},readOnly:!0}),e(K,{get children(){return n(`users.permissions.${r}`)}})]}})}})})}})}})]}})]}}),e(k,{spacing:"$2",get children(){return[e(v,{get loading(){return I()},onClick:async()=>{const r=await L();x(r,()=>{P.success(n("global.save_success")),g()})},get children(){return n("global.save")}}),e(v,{colorScheme:"accent",onClick:()=>g(),get children(){return n("global.back")}})]}})]}})}})]}})};export{Z as default};
1
+ import{b as q,d as O,cW as W,be as d,ei as z,q as B,ej as H,ek as M,x as e,c2 as R,ap as j,ai as m,bW as l,bJ as c,L as h,bL as D,bM as Q,ao as J,S as b,bN as N,W as f,dr as $,ds as S,dt as U,aY as u,am as V,bQ as Y,bR as A,bS as E,av as k,bg as G,bT as K,Q as v,bw as x,n as P}from"./index-0ac33e44.js";const Z=()=>{const n=q(),{params:C,back:g}=O(),{id:i}=C,[s,o]=W({name:"",description:"",permission:0,path_pattern:"/**"}),[w,y]=d(()=>z(parseInt(i))),_=async()=>{if(i){const r=await y();x(r,t=>{o({name:t.name,description:t.description,permission:t.permission,path_pattern:t.path_pattern})})}};B(()=>{_()});const T=()=>s.name.trim()?!0:(P.error(n("permissions.config.permissions_name")+n("global.required")),!1),[I,L]=d(async()=>T()?i?H({...s,id:parseInt(i)}):M(s):Promise.reject()),a=()=>u.filter((r,t)=>(s.permission>>t&1)===1),p=r=>{const t=1<<r;o("permission",s.permission^t)};return e(m,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(R,{get children(){return n(i?"global.edit":"global.add")}}),e(j,{get loading(){return w()},get children(){return e(m,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(l,{required:!0,get children(){return[e(c,{get children(){return n("permissions.config.permissions_name")}}),e(h,{get value(){return s.name},onInput:r=>o("name",r.currentTarget.value)})]}}),e(l,{get children(){return[e(c,{get children(){return n("permissions.config.permissions_description")}}),e(h,{get value(){return s.description},onInput:r=>o("description",r.currentTarget.value)})]}}),e(l,{required:!0,get children(){return[e(c,{get children(){return n("permissions.config.permissions_permissions")}}),e(D,{multiple:!0,get value(){return a()},get children(){return[e(Q,{get children(){return e(J,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return e(b,{get when(){return a().length>0},get fallback(){return e(N,{get children(){return n("permissions.config.select_permissions")}})},get children(){return[e(f,{get each(){return a().slice(0,3)},children:(r,t)=>e($,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[e(S,{get children(){return n(`users.permissions.${r}`)}}),e(U,{onClick:F=>{F.stopPropagation(),p(u.indexOf(r))}})]}})}),e(b,{get when(){return a().length>3},get children(){return e($,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return e(S,{get children(){return["+",V(()=>a().length-3)]}})}})}})]}})}})}}),e(Y,{get children(){return e(A,{get children(){return e(f,{each:u,children:(r,t)=>e(E,{value:r,onClick:()=>p(t()),get children(){return e(k,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[e(G,{get checked(){return(s.permission>>t()&1)===1},readOnly:!0}),e(K,{get children(){return n(`users.permissions.${r}`)}})]}})}})})}})}})]}})]}}),e(k,{spacing:"$2",get children(){return[e(v,{get loading(){return I()},onClick:async()=>{const r=await L();x(r,()=>{P.success(n("global.save_success")),g()})},get children(){return n("global.save")}}),e(v,{colorScheme:"accent",onClick:()=>g(),get children(){return n("global.back")}})]}})]}})}})]}})};export{Z as default};
@@ -1 +1 @@
1
- !function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function e(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?r(Object(o),!0).forEach((function(r){n(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))}))}return t}function n(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return r};var r={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(k){s=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof p?r:p,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=O(a,e);if(c){if(c===h)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=f(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(k){return{type:"throw",arg:k}}}r.wrap=l;var h={};function p(){}function d(){}function g(){}var y={};s(y,a,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==e&&n.call(m,a)&&(y=m);var b=g.prototype=p.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(r){s(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function o(i,a,c,u){var s=f(r[i],r,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==t(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):e.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return o("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}}function O(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,O(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function j(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function S(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,o=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return d.prototype=g,s(b,"constructor",g),s(g,"constructor",d),d.displayName=s(g,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===d||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,c,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),s(b,u,"Generator"),s(b,a,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=S,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),j(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;j(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:S(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}function i(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void e(s)}c.done?r(u):Promise.resolve(u).then(n,o)}function a(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var a=t.apply(r,e);function c(t){i(a,n,o,c,u,"next",t)}function u(t){i(a,n,o,c,u,"throw",t)}c(void 0)}))}}function c(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var n,o,i=[],a=!0,c=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return i}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return u(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return u(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}System.register(["./index-legacy.7de89ac7.js"],(function(t,r){"use strict";var n,i,u,s,l,f,h,p,d,g,y,v,m,b,w,x,O,L,j,E,S,_,k,$,P,I,N,T,A,G,C,q,F,D,W;return{setters:[function(t){n=t.b,i=t.d,u=t.cW,s=t.be,l=t.eg,f=t.q,h=t.eh,p=t.ei,d=t.x,g=t.c2,y=t.ap,v=t.ai,m=t.bW,b=t.bJ,w=t.L,x=t.bL,O=t.bM,L=t.ao,j=t.S,E=t.bN,S=t.W,_=t.dp,k=t.dq,$=t.dr,P=t.aY,I=t.am,N=t.bQ,T=t.bR,A=t.bS,G=t.av,C=t.bg,q=t.bT,F=t.Q,D=t.bw,W=t.n}],execute:function(){t("default",(function(){var t=n(),r=i(),z=r.params,Y=r.back,M=z.id,Q=c(u({name:"",description:"",permission:0,path_pattern:"/**"}),2),H=Q[0],J=Q[1],R=c(s((function(){return l(parseInt(M))})),2),U=R[0],B=R[1],K=function(){var t=a(o().mark((function t(){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!M){t.next=5;break}return t.next=3,B();case 3:r=t.sent,D(r,(function(t){J({name:t.name,description:t.description,permission:t.permission,path_pattern:t.path_pattern})}));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();f((function(){K()}));var V=c(s(a(o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(H.name.trim()||(W.error(t("permissions.config.permissions_name")+t("global.required")),0)){r.next=2;break}return r.abrupt("return",Promise.reject());case 2:if(!M){r.next=4;break}return r.abrupt("return",h(e(e({},H),{},{id:parseInt(M)})));case 4:return r.abrupt("return",p(H));case 5:case"end":return r.stop()}}),r)})))),2),X=V[0],Z=V[1],tt=function(){return P.filter((function(t,r){return 1==(H.permission>>r&1)}))},rt=function(t){var r=1<<t;J("permission",H.permission^r)};return d(v,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[d(g,{get children(){return t(M?"global.edit":"global.add")}}),d(y,{get loading(){return U()},get children(){return d(v,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[d(m,{required:!0,get children(){return[d(b,{get children(){return t("permissions.config.permissions_name")}}),d(w,{get value(){return H.name},onInput:function(t){return J("name",t.currentTarget.value)}})]}}),d(m,{get children(){return[d(b,{get children(){return t("permissions.config.permissions_description")}}),d(w,{get value(){return H.description},onInput:function(t){return J("description",t.currentTarget.value)}})]}}),d(m,{required:!0,get children(){return[d(b,{get children(){return t("permissions.config.permissions_permissions")}}),d(x,{multiple:!0,get value(){return tt()},get children(){return[d(O,{get children(){return d(L,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return d(j,{get when(){return tt().length>0},get fallback(){return d(E,{get children(){return t("permissions.config.select_permissions")}})},get children(){return[d(S,{get each(){return tt().slice(0,3)},children:function(r,e){return d(_,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[d(k,{get children(){return t("users.permissions.".concat(r))}}),d($,{onClick:function(t){t.stopPropagation(),rt(P.indexOf(r))}})]}})}}),d(j,{get when(){return tt().length>3},get children(){return d(_,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return d(k,{get children(){return["+",I((function(){return tt().length-3}))]}})}})}})]}})}})}}),d(N,{get children(){return d(T,{get children(){return d(S,{each:P,children:function(r,e){return d(A,{value:r,onClick:function(){return rt(e())},get children(){return d(G,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[d(C,{get checked(){return 1==(H.permission>>e()&1)},readOnly:!0}),d(q,{get children(){return t("users.permissions.".concat(r))}})]}})}})}})}})}})]}})]}}),d(G,{spacing:"$2",get children(){return[d(F,{get loading(){return X()},onClick:(r=a(o().mark((function r(){var e;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Z();case 2:e=r.sent,D(e,(function(){W.success(t("global.save_success")),Y()}));case 4:case"end":return r.stop()}}),r)}))),function(){return r.apply(this,arguments)}),get children(){return t("global.save")}}),d(F,{colorScheme:"accent",onClick:function(){return Y()},get children(){return t("global.back")}})];var r}})]}})}})]}})}))}}}))}();
1
+ !function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function e(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?r(Object(o),!0).forEach((function(r){n(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))}))}return t}function n(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return r};var r={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(_){s=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof p?r:p,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=O(a,e);if(c){if(c===h)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=f(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(_){return{type:"throw",arg:_}}}r.wrap=l;var h={};function p(){}function d(){}function g(){}var y={};s(y,a,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(k([])));m&&m!==e&&n.call(m,a)&&(y=m);var b=g.prototype=p.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(r){s(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function o(i,a,c,u){var s=f(r[i],r,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==t(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):e.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return o("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}}function O(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,O(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function j(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function k(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,o=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=g,s(b,"constructor",g),s(g,"constructor",d),d.displayName=s(g,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===d||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,c,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),s(b,u,"Generator"),s(b,a,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=k,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),j(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;j(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:k(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}function i(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void e(s)}c.done?r(u):Promise.resolve(u).then(n,o)}function a(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var a=t.apply(r,e);function c(t){i(a,n,o,c,u,"next",t)}function u(t){i(a,n,o,c,u,"throw",t)}c(void 0)}))}}function c(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var n,o,i=[],a=!0,c=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return i}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return u(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return u(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}System.register(["./index-legacy.eace8bff.js"],(function(t,r){"use strict";var n,i,u,s,l,f,h,p,d,g,y,v,m,b,w,x,O,L,j,E,k,S,_,$,P,I,N,T,A,G,C,F,q,D,W;return{setters:[function(t){n=t.b,i=t.d,u=t.cW,s=t.be,l=t.ei,f=t.q,h=t.ej,p=t.ek,d=t.x,g=t.c2,y=t.ap,v=t.ai,m=t.bW,b=t.bJ,w=t.L,x=t.bL,O=t.bM,L=t.ao,j=t.S,E=t.bN,k=t.W,S=t.dr,_=t.ds,$=t.dt,P=t.aY,I=t.am,N=t.bQ,T=t.bR,A=t.bS,G=t.av,C=t.bg,F=t.bT,q=t.Q,D=t.bw,W=t.n}],execute:function(){t("default",(function(){var t=n(),r=i(),z=r.params,Y=r.back,M=z.id,Q=c(u({name:"",description:"",permission:0,path_pattern:"/**"}),2),H=Q[0],J=Q[1],R=c(s((function(){return l(parseInt(M))})),2),U=R[0],B=R[1],K=function(){var t=a(o().mark((function t(){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!M){t.next=5;break}return t.next=3,B();case 3:r=t.sent,D(r,(function(t){J({name:t.name,description:t.description,permission:t.permission,path_pattern:t.path_pattern})}));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();f((function(){K()}));var V=c(s(a(o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(H.name.trim()||(W.error(t("permissions.config.permissions_name")+t("global.required")),0)){r.next=2;break}return r.abrupt("return",Promise.reject());case 2:if(!M){r.next=4;break}return r.abrupt("return",h(e(e({},H),{},{id:parseInt(M)})));case 4:return r.abrupt("return",p(H));case 5:case"end":return r.stop()}}),r)})))),2),X=V[0],Z=V[1],tt=function(){return P.filter((function(t,r){return 1==(H.permission>>r&1)}))},rt=function(t){var r=1<<t;J("permission",H.permission^r)};return d(v,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[d(g,{get children(){return t(M?"global.edit":"global.add")}}),d(y,{get loading(){return U()},get children(){return d(v,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[d(m,{required:!0,get children(){return[d(b,{get children(){return t("permissions.config.permissions_name")}}),d(w,{get value(){return H.name},onInput:function(t){return J("name",t.currentTarget.value)}})]}}),d(m,{get children(){return[d(b,{get children(){return t("permissions.config.permissions_description")}}),d(w,{get value(){return H.description},onInput:function(t){return J("description",t.currentTarget.value)}})]}}),d(m,{required:!0,get children(){return[d(b,{get children(){return t("permissions.config.permissions_permissions")}}),d(x,{multiple:!0,get value(){return tt()},get children(){return[d(O,{get children(){return d(L,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return d(j,{get when(){return tt().length>0},get fallback(){return d(E,{get children(){return t("permissions.config.select_permissions")}})},get children(){return[d(k,{get each(){return tt().slice(0,3)},children:function(r,e){return d(S,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[d(_,{get children(){return t("users.permissions.".concat(r))}}),d($,{onClick:function(t){t.stopPropagation(),rt(P.indexOf(r))}})]}})}}),d(j,{get when(){return tt().length>3},get children(){return d(S,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return d(_,{get children(){return["+",I((function(){return tt().length-3}))]}})}})}})]}})}})}}),d(N,{get children(){return d(T,{get children(){return d(k,{each:P,children:function(r,e){return d(A,{value:r,onClick:function(){return rt(e())},get children(){return d(G,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[d(C,{get checked(){return 1==(H.permission>>e()&1)},readOnly:!0}),d(F,{get children(){return t("users.permissions.".concat(r))}})]}})}})}})}})}})]}})]}}),d(G,{spacing:"$2",get children(){return[d(q,{get loading(){return X()},onClick:(r=a(o().mark((function r(){var e;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Z();case 2:e=r.sent,D(e,(function(){W.success(t("global.save_success")),Y()}));case 4:case"end":return r.stop()}}),r)}))),function(){return r.apply(this,arguments)}),get children(){return t("global.save")}}),d(q,{colorScheme:"accent",onClick:function(){return Y()},get children(){return t("global.back")}})];var r}})]}})}})]}})}))}}}))}();
@@ -1 +1 @@
1
- import{b as O,be as h,bv as g,B as b,x as e,dt as q,ai as z,c2 as x,Q as w,bw as k,n as $,S as f,av as y,ah as _,c3 as G,du as Q,cW as se,a$ as ae,R as ie,M as oe,I as le,bz as ce,J as ue,K as de,bW as M,bJ as A,L as D,T as ge,O as he,V as v,am as J,d as me,ay as a,dv as F,r as pe,ax as C,an as R,dw as we,dx as fe,dy as _e,dz as $e,dA as X,N as V,ap as ye,W as Y,aY as be,cX as ke,cL as Se}from"./index-901660e1.js";import{b as xe}from"./useTitle-515e3802.js";import{L as ve}from"./index-4acf76ed.js";import{s as j,c as Ce,b as Me}from"./webauthn-json.browser-ponyfill-f2f06d6e.js";const Ae=t=>{const n=O(),[c,u]=h(()=>g.post("/authn/delete_authn",{id:t.id})),[m,l]=b(!1);return e(f,{get when(){return!m()},get children(){return e(q,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[e(z,{w:"$full",alignItems:"start",spacing:"$1",get children(){return e(x,{color:"$info9",css:{wordBreak:"break-all"},get children(){return"Fingerprint: "+t.fingerprint+" ID: "+t.id}})}}),e(q,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return e(w,{colorScheme:"danger",get loading(){return c()},onClick:async()=>{const i=await u();k(i,()=>{$.success(n("global.delete_success")),l(!0)})},get children(){return n("global.delete")}})}})]}})}})},Ie=t=>{const n=t.getFullYear().toString(),c=(t.getMonth()+1).toString().padStart(2,"0"),u=t.getDate().toString().padStart(2,"0"),m=t.getHours().toString().padStart(2,"0"),l=t.getMinutes().toString().padStart(2,"0"),i=t.getSeconds().toString().padStart(2,"0");return`${n}/${c}/${u} ${m}:${l}:${i}`},s=[{name:"title",textAlign:"left",w:"calc(35% - 110px)"},{name:"fingerprint",textAlign:"left",w:"calc(65% - 110px)"},{name:"last_used",textAlign:"right",w:"140px"},{name:"operation",textAlign:"right",w:"80px"}],Pe=t=>{const n=O(),[c,u]=b(!1),[m,l]=t.isMine?h(()=>g.post(`/me/sshkey/delete?id=${t.id}`)):h(()=>g.post(`/admin/user/sshkey/delete?uid=${t.userId}&id=${t.id}`)),i={whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"};return e(f,{get when(){return!c()},get children(){return e(y,{w:"$full",p:"$2",get children(){return[e(x,{get w(){return s[0].w},size:"sm",get textAlign(){return s[0].textAlign},css:i,get children(){return t.title}}),e(_,{get w(){return s[1].w},size:"sm",get textAlign(){return s[1].textAlign},css:i,get children(){return t.fingerprint}}),e(_,{get w(){return s[2].w},size:"sm",get textAlign(){return s[2].textAlign},css:i,get children(){return Ie(new Date(t.last_used_time))}}),e(G,{get w(){return s[3].w},gap:"$1",get children(){return[e(Q,{}),e(w,{size:"sm",colorScheme:"danger",get loading(){return m()},onClick:async()=>{const p=await l();k(p,()=>{$.success(n("global.delete_success")),u(!0)})},get children(){return n("global.delete")}})]}})]}})}})},Te=t=>{const n=O(),[c,u]=b([]),[m,l]=t.isMine?h(()=>g.get("/me/sshkey/list")):h(()=>g.get(`/admin/user/sshkey/list?uid=${t.userId}`)),[i,p]=se({title:"",key:""}),[W,E]=h(()=>g.post("/me/sshkey/add",i)),{isOpen:I,onOpen:U,onClose:P}=ae(),T=async()=>{const o=await l();k(o,H=>{u(H.content)})};T();const S=o=>({fontWeight:"bold",fontSize:"$sm",color:"$neutral11",textAlign:o.textAlign});return e(z,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[e(G,{w:"$full",get children(){return[e(x,{get children(){return n("users.ssh_keys.heading")}}),e(f,{get when(){return t.isMine},get children(){return[e(Q,{}),e(w,{get loading(){return m()},onClick:U,get children(){return n("global.add")}}),e(ie,{get opened(){return I()},onClose:P,scrollBehavior:"inside",get children(){return[e(oe,{}),e(le,{get children(){return[e(ce,{}),e(ue,{get children(){return n("users.ssh_keys.add_heading")}}),e(de,{get children(){return[e(M,{mb:"$4",get children(){return[e(A,{for:"add_title",get children(){return n("users.ssh_keys.title")}}),e(D,{id:"add_title",get value(){return i.title},onInput:o=>p("title",o.currentTarget.value)})]}}),e(M,{get children(){return[e(A,{for:"add_key",get children(){return n("users.ssh_keys.key")}}),e(ge,{id:"add_key",get value(){return i.key},onInput:o=>p("key",o.currentTarget.value)})]}})]}}),e(he,{get children(){return e(w,{get loading(){return W()},onClick:async()=>{const o=await E();k(o,()=>{p("title",""),p("key",""),T(),P()})},get children(){return n("global.add")}})}})]}})]}})]}})]}}),e(z,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",spacing:"$1",p:"$1",get children(){return[e(y,{class:"title",w:"$full",p:"$2",get children(){return[e(_,v({get w(){return s[0].w}},()=>S(s[0]),{get children(){return n(`users.ssh_keys.${s[0].name}`)}})),e(_,v({get w(){return s[1].w}},()=>S(s[1]),{get children(){return n(`users.ssh_keys.${s[1].name}`)}})),e(_,v({get w(){return s[2].w}},()=>S(s[2]),{get children(){return n(`users.ssh_keys.${s[2].name}`)}})),e(_,v({get w(){return s[3].w}},()=>S(s[3]),{get children(){return n(`users.ssh_keys.${s[3].name}`)}}))]}}),J(()=>c().map(o=>e(Pe,v(t,o))))]}})]}})},Le=t=>e(ke,{get colorScheme(){return t.can?"success":"danger"},get children(){return t.children}}),ze=()=>{const t=O();xe("manage.sidemenu.profile");const{searchParams:n,to:c}=me(),[u,m]=b(a().username),[l,i]=b(""),[p,W]=b(""),E=R("sso_compatibility_mode"),[I,U]=h(r=>g.post("/me/update",{username:r?a().username:u(),password:r?"":l(),sso_id:a().sso_id})),[P,T]=h(()=>g.get("/authn/getcredentials")),[,S]=h(()=>g.get("/authn/webauthn_begin_registration")),[o,H]=h((r,d)=>g.post("/authn/webauthn_finish_registration",JSON.stringify(d),{headers:{session:r}})),L=async r=>{if(l()&&l()!==p()){$.warning(t("users.confirm_password_not_same"));return}const d=await U(r);k(d,()=>{F({...a(),username:u()}),r?c(""):($.success(t("users.update_profile_success")),c(`/@login?redirect=${encodeURIComponent(location.pathname)}`))})},K=n.sso_id;K&&(F({...a(),sso_id:K}),L(!0));function N(r){const d=r.data;d.sso_id&&(F({...a(),sso_id:d.sso_id}),L(!0))}window.addEventListener("message",N),pe(()=>{window.removeEventListener("message",N)});const[Z,ee]=b([]),te=async()=>{const r=await T();Se(r,ee)};return j()&&!C.is_guest(a())&&R("webauthn_login_enabled")&&te(),e(z,{w:"$full",spacing:"$4",alignItems:"start",get children(){return[e(f,{get when(){return!C.is_guest(a())},get fallback(){return[e(we,{status:"warning",flexDirection:{"@initial":"column","@lg":"row"},get children(){return[e(fe,{mr:"$2_5"}),e(_e,{mr:"$2_5",get children(){return t("users.guest-tips")}}),e($e,{get children(){return t("users.modify_nothing")}})]}}),e(y,{spacing:"$2",get children(){return[e(_,{get children(){return t("global.have_account")}}),e(_,{color:"$info9",as:ve,get href(){return`/@login?redirect=${encodeURIComponent(location.pathname)}`},get children(){return t("global.go_login")}})]}})]},get children(){return[e(x,{get children(){return t("users.update_profile")}}),e(X,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return e(M,{get children(){return[e(A,{for:"username",get children(){return t("users.change_username")}}),e(D,{id:"username",get value(){return u()},onInput:r=>{m(r.currentTarget.value)}})]}})}}),e(X,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[e(M,{get children(){return[e(A,{for:"password",get children(){return t("users.change_password")}}),e(D,{id:"password",type:"password",placeholder:"********",get value(){return l()},onInput:r=>{i(r.currentTarget.value)}}),e(V,{get children(){return t("users.change_password-tips")}})]}}),e(M,{get children(){return[e(A,{for:"confirm-password",get children(){return t("users.confirm_password")}}),e(D,{id:"confirm-password",type:"password",placeholder:"********",get value(){return p()},onInput:r=>{W(r.currentTarget.value)}}),e(V,{get children(){return t("users.confirm_password-tips")}})]}})]}}),e(y,{spacing:"$2",get children(){return[e(w,{get loading(){return I()},onClick:[L,!1],get children(){return t("global.save")}}),e(f,{get when(){return!a().otp},get children(){return e(w,{colorScheme:"accent",onClick:()=>{c("/@manage/2fa")},get children(){return t("users.enable_2fa")}})}})]}})]}}),e(f,{get when(){return J(()=>!!R("sso_login_enabled"),!0)()&&!C.is_guest(a())},get children(){return[e(x,{get children(){return t("users.sso_login")}}),e(y,{spacing:"$2",get children(){return e(f,{get when(){return a().sso_id},get fallback(){return e(w,{onClick:()=>{const r=g.getUri()+"/auth/sso?method=get_sso_id";if(E){window.location.href=r;return}window.open(r,"authPopup","width=500,height=600")},get children(){return t("users.connect_sso")}})},get children(){return e(w,{colorScheme:"danger",get loading(){return I()},onClick:()=>{F({...a(),sso_id:""}),L(!0)},get children(){return t("users.disconnect_sso")}})}})}})]}}),e(f,{get when(){return J(()=>!C.is_guest(a()),!0)()&&R("webauthn_login_enabled")},get children(){return[e(x,{get children(){return t("users.webauthn")}}),e(y,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return e(ye,{get loading(){return P()},get children(){return e(Y,{get each(){return Z()},children:r=>e(Ae,{get id(){return r.id},get fingerprint(){return r.fingerprint}})})}})}}),e(w,{get loading(){return o()},onClick:async()=>{if(!j()){$.error(t("users.webauthn_not_supported"));return}const r=await S();k(r,async d=>{const re=Ce(d.options),ne=d.session;try{const B=await Me(re);k(await H(ne,B),()=>{$.success(t("users.add_webauthn_success"))})}catch(B){B instanceof Error&&$.error(B.message)}})},get children(){return t("users.add_webauthn")}})]}}),e(y,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return e(Y,{each:be,children:(r,d)=>e(Le,{get can(){return C.can(a(),d())},get children(){return t(`users.permissions.${r}`)}})})}}),e(Te,{isMine:!0,get userId(){return a().id}})]}})};export{ze as default};
1
+ import{b as O,be as h,bv as g,B as b,x as e,dv as q,ai as z,c2 as x,Q as w,bw as k,n as $,S as f,av as y,ah as _,c3 as G,dw as Q,cW as se,a$ as ae,R as ie,M as oe,I as le,bz as ce,J as ue,K as de,bW as M,bJ as A,L as D,T as ge,O as he,V as v,am as J,d as me,ay as a,dx as F,r as pe,ax as C,an as R,dy as we,dz as fe,dA as _e,dB as $e,dC as X,N as V,ap as ye,W as Y,aY as be,cX as ke,cL as Se}from"./index-0ac33e44.js";import{b as xe}from"./useTitle-98cd4016.js";import{L as ve}from"./index-06a2e1d1.js";import{s as j,c as Ce,b as Me}from"./webauthn-json.browser-ponyfill-f2f06d6e.js";const Ae=t=>{const n=O(),[c,u]=h(()=>g.post("/authn/delete_authn",{id:t.id})),[m,l]=b(!1);return e(f,{get when(){return!m()},get children(){return e(q,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[e(z,{w:"$full",alignItems:"start",spacing:"$1",get children(){return e(x,{color:"$info9",css:{wordBreak:"break-all"},get children(){return"Fingerprint: "+t.fingerprint+" ID: "+t.id}})}}),e(q,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return e(w,{colorScheme:"danger",get loading(){return c()},onClick:async()=>{const i=await u();k(i,()=>{$.success(n("global.delete_success")),l(!0)})},get children(){return n("global.delete")}})}})]}})}})},Ie=t=>{const n=t.getFullYear().toString(),c=(t.getMonth()+1).toString().padStart(2,"0"),u=t.getDate().toString().padStart(2,"0"),m=t.getHours().toString().padStart(2,"0"),l=t.getMinutes().toString().padStart(2,"0"),i=t.getSeconds().toString().padStart(2,"0");return`${n}/${c}/${u} ${m}:${l}:${i}`},s=[{name:"title",textAlign:"left",w:"calc(35% - 110px)"},{name:"fingerprint",textAlign:"left",w:"calc(65% - 110px)"},{name:"last_used",textAlign:"right",w:"140px"},{name:"operation",textAlign:"right",w:"80px"}],Pe=t=>{const n=O(),[c,u]=b(!1),[m,l]=t.isMine?h(()=>g.post(`/me/sshkey/delete?id=${t.id}`)):h(()=>g.post(`/admin/user/sshkey/delete?uid=${t.userId}&id=${t.id}`)),i={whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"};return e(f,{get when(){return!c()},get children(){return e(y,{w:"$full",p:"$2",get children(){return[e(x,{get w(){return s[0].w},size:"sm",get textAlign(){return s[0].textAlign},css:i,get children(){return t.title}}),e(_,{get w(){return s[1].w},size:"sm",get textAlign(){return s[1].textAlign},css:i,get children(){return t.fingerprint}}),e(_,{get w(){return s[2].w},size:"sm",get textAlign(){return s[2].textAlign},css:i,get children(){return Ie(new Date(t.last_used_time))}}),e(G,{get w(){return s[3].w},gap:"$1",get children(){return[e(Q,{}),e(w,{size:"sm",colorScheme:"danger",get loading(){return m()},onClick:async()=>{const p=await l();k(p,()=>{$.success(n("global.delete_success")),u(!0)})},get children(){return n("global.delete")}})]}})]}})}})},Te=t=>{const n=O(),[c,u]=b([]),[m,l]=t.isMine?h(()=>g.get("/me/sshkey/list")):h(()=>g.get(`/admin/user/sshkey/list?uid=${t.userId}`)),[i,p]=se({title:"",key:""}),[W,E]=h(()=>g.post("/me/sshkey/add",i)),{isOpen:I,onOpen:U,onClose:P}=ae(),T=async()=>{const o=await l();k(o,H=>{u(H.content)})};T();const S=o=>({fontWeight:"bold",fontSize:"$sm",color:"$neutral11",textAlign:o.textAlign});return e(z,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[e(G,{w:"$full",get children(){return[e(x,{get children(){return n("users.ssh_keys.heading")}}),e(f,{get when(){return t.isMine},get children(){return[e(Q,{}),e(w,{get loading(){return m()},onClick:U,get children(){return n("global.add")}}),e(ie,{get opened(){return I()},onClose:P,scrollBehavior:"inside",get children(){return[e(oe,{}),e(le,{get children(){return[e(ce,{}),e(ue,{get children(){return n("users.ssh_keys.add_heading")}}),e(de,{get children(){return[e(M,{mb:"$4",get children(){return[e(A,{for:"add_title",get children(){return n("users.ssh_keys.title")}}),e(D,{id:"add_title",get value(){return i.title},onInput:o=>p("title",o.currentTarget.value)})]}}),e(M,{get children(){return[e(A,{for:"add_key",get children(){return n("users.ssh_keys.key")}}),e(ge,{id:"add_key",get value(){return i.key},onInput:o=>p("key",o.currentTarget.value)})]}})]}}),e(he,{get children(){return e(w,{get loading(){return W()},onClick:async()=>{const o=await E();k(o,()=>{p("title",""),p("key",""),T(),P()})},get children(){return n("global.add")}})}})]}})]}})]}})]}}),e(z,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",spacing:"$1",p:"$1",get children(){return[e(y,{class:"title",w:"$full",p:"$2",get children(){return[e(_,v({get w(){return s[0].w}},()=>S(s[0]),{get children(){return n(`users.ssh_keys.${s[0].name}`)}})),e(_,v({get w(){return s[1].w}},()=>S(s[1]),{get children(){return n(`users.ssh_keys.${s[1].name}`)}})),e(_,v({get w(){return s[2].w}},()=>S(s[2]),{get children(){return n(`users.ssh_keys.${s[2].name}`)}})),e(_,v({get w(){return s[3].w}},()=>S(s[3]),{get children(){return n(`users.ssh_keys.${s[3].name}`)}}))]}}),J(()=>c().map(o=>e(Pe,v(t,o))))]}})]}})},Be=t=>e(ke,{get colorScheme(){return t.can?"success":"danger"},get children(){return t.children}}),ze=()=>{const t=O();xe("manage.sidemenu.profile");const{searchParams:n,to:c}=me(),[u,m]=b(a().username),[l,i]=b(""),[p,W]=b(""),E=R("sso_compatibility_mode"),[I,U]=h(r=>g.post("/me/update",{username:r?a().username:u(),password:r?"":l(),sso_id:a().sso_id})),[P,T]=h(()=>g.get("/authn/getcredentials")),[,S]=h(()=>g.get("/authn/webauthn_begin_registration")),[o,H]=h((r,d)=>g.post("/authn/webauthn_finish_registration",JSON.stringify(d),{headers:{session:r}})),B=async r=>{if(l()&&l()!==p()){$.warning(t("users.confirm_password_not_same"));return}const d=await U(r);k(d,()=>{F({...a(),username:u()}),r?c(""):($.success(t("users.update_profile_success")),c(`/@login?redirect=${encodeURIComponent(location.pathname)}`))})},K=n.sso_id;K&&(F({...a(),sso_id:K}),B(!0));function N(r){const d=r.data;d.sso_id&&(F({...a(),sso_id:d.sso_id}),B(!0))}window.addEventListener("message",N),pe(()=>{window.removeEventListener("message",N)});const[Z,ee]=b([]),te=async()=>{const r=await T();Se(r,ee)};return j()&&!C.is_guest(a())&&R("webauthn_login_enabled")&&te(),e(z,{w:"$full",spacing:"$4",alignItems:"start",get children(){return[e(f,{get when(){return!C.is_guest(a())},get fallback(){return[e(we,{status:"warning",flexDirection:{"@initial":"column","@lg":"row"},get children(){return[e(fe,{mr:"$2_5"}),e(_e,{mr:"$2_5",get children(){return t("users.guest-tips")}}),e($e,{get children(){return t("users.modify_nothing")}})]}}),e(y,{spacing:"$2",get children(){return[e(_,{get children(){return t("global.have_account")}}),e(_,{color:"$info9",as:ve,get href(){return`/@login?redirect=${encodeURIComponent(location.pathname)}`},get children(){return t("global.go_login")}})]}})]},get children(){return[e(x,{get children(){return t("users.update_profile")}}),e(X,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return e(M,{get children(){return[e(A,{for:"username",get children(){return t("users.change_username")}}),e(D,{id:"username",get value(){return u()},onInput:r=>{m(r.currentTarget.value)}})]}})}}),e(X,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[e(M,{get children(){return[e(A,{for:"password",get children(){return t("users.change_password")}}),e(D,{id:"password",type:"password",placeholder:"********",get value(){return l()},onInput:r=>{i(r.currentTarget.value)}}),e(V,{get children(){return t("users.change_password-tips")}})]}}),e(M,{get children(){return[e(A,{for:"confirm-password",get children(){return t("users.confirm_password")}}),e(D,{id:"confirm-password",type:"password",placeholder:"********",get value(){return p()},onInput:r=>{W(r.currentTarget.value)}}),e(V,{get children(){return t("users.confirm_password-tips")}})]}})]}}),e(y,{spacing:"$2",get children(){return[e(w,{get loading(){return I()},onClick:[B,!1],get children(){return t("global.save")}}),e(f,{get when(){return!a().otp},get children(){return e(w,{colorScheme:"accent",onClick:()=>{c("/@manage/2fa")},get children(){return t("users.enable_2fa")}})}})]}})]}}),e(f,{get when(){return J(()=>!!R("sso_login_enabled"),!0)()&&!C.is_guest(a())},get children(){return[e(x,{get children(){return t("users.sso_login")}}),e(y,{spacing:"$2",get children(){return e(f,{get when(){return a().sso_id},get fallback(){return e(w,{onClick:()=>{const r=g.getUri()+"/auth/sso?method=get_sso_id";if(E){window.location.href=r;return}window.open(r,"authPopup","width=500,height=600")},get children(){return t("users.connect_sso")}})},get children(){return e(w,{colorScheme:"danger",get loading(){return I()},onClick:()=>{F({...a(),sso_id:""}),B(!0)},get children(){return t("users.disconnect_sso")}})}})}})]}}),e(f,{get when(){return J(()=>!C.is_guest(a()),!0)()&&R("webauthn_login_enabled")},get children(){return[e(x,{get children(){return t("users.webauthn")}}),e(y,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return e(ye,{get loading(){return P()},get children(){return e(Y,{get each(){return Z()},children:r=>e(Ae,{get id(){return r.id},get fingerprint(){return r.fingerprint}})})}})}}),e(w,{get loading(){return o()},onClick:async()=>{if(!j()){$.error(t("users.webauthn_not_supported"));return}const r=await S();k(r,async d=>{const re=Ce(d.options),ne=d.session;try{const L=await Me(re);k(await H(ne,L),()=>{$.success(t("users.add_webauthn_success"))})}catch(L){L instanceof Error&&$.error(L.message)}})},get children(){return t("users.add_webauthn")}})]}}),e(y,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return e(Y,{each:be,children:(r,d)=>e(Be,{get can(){return C.can(a(),d())},get children(){return t(`users.permissions.${r}`)}})})}}),e(Te,{isMine:!0,get userId(){return a().id}})]}})};export{ze as default};
@@ -1 +1 @@
1
- !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(j){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),u=new $(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return L()}for(r.method=i,r.arg=o;;){var u=r.delegate;if(u){var a=x(u,r);if(a){if(a===h)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=d(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,u),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(j){return{type:"throw",arg:j}}}t.wrap=l;var h={};function f(){}function g(){}function p(){}var y={};s(y,u,(function(){return this}));var w=Object.getPrototypeOf,v=w&&w(w(O([])));v&&v!==r&&n.call(v,u)&&(y=v);var m=p.prototype=f.prototype=Object.create(y);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(t,r){function i(o,u,a,c){var s=d(t[o],t,u);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==e(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(e){i("next",e,a,c)}),(function(e){i("throw",e,a,c)})):r.resolve(h).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,c)}))}c(s.arg)}var o;this._invoke=function(e,t){function n(){return new r((function(r,n){i(e,t,r,n)}))}return o=o?o.then(n,n):n()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,h;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function O(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return g.prototype=p,s(m,"constructor",p),s(p,"constructor",g),g.displayName=s(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,c,"GeneratorFunction")),e.prototype=Object.create(m),e},t.awrap=function(e){return{__await:e}},b(_.prototype),s(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var u=new _(l(e,r,n,i),o);return t.isGeneratorFunction(r)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},b(m),s(m,c,"Generator"),s(m,u,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,$.prototype={constructor:$,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return u.type="throw",u.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],u=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function o(e,t,r,n,i,o,u){try{var a=e[o](u),c=a.value}catch(s){return void r(s)}a.done?t(c):Promise.resolve(c).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var u=e.apply(t,r);function a(e){o(u,n,i,a,c,"next",e)}function c(e){o(u,n,i,a,c,"throw",e)}a(void 0)}))}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],u=!0,a=!1;try{for(r=r.call(e);!(u=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);u=!0);}catch(c){a=!0,i=c}finally{try{u||null==r.return||r.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}System.register(["./index-legacy.7de89ac7.js","./useTitle-legacy.f53151a3.js","./index-legacy.b6a8a799.js","./webauthn-json.browser-ponyfill-legacy.1eb8248a.js"],(function(e,t){"use strict";var n,o,c,s,l,d,h,f,g,p,y,w,v,m,b,_,x,k,S,$,O,L,j,E,A,I,P,C,T,N,D,G,M,z,F,U,W,Y,B,J,R,X,V,q,H,K,Q,Z,ee,te,re,ne,ie;return{setters:[function(e){n=e.b,o=e.be,c=e.bv,s=e.B,l=e.x,d=e.dt,h=e.ai,f=e.c2,g=e.Q,p=e.bw,y=e.n,w=e.S,v=e.av,m=e.ah,b=e.c3,_=e.du,x=e.cW,k=e.a$,S=e.R,$=e.M,O=e.I,L=e.bz,j=e.J,E=e.K,A=e.bW,I=e.bJ,P=e.L,C=e.T,T=e.O,N=e.V,D=e.am,G=e.d,M=e.ay,z=e.dv,F=e.r,U=e.ax,W=e.an,Y=e.dw,B=e.dx,J=e.dy,R=e.dz,X=e.dA,V=e.N,q=e.ap,H=e.W,K=e.aY,Q=e.cX,Z=e.cL},function(e){ee=e.b},function(e){te=e.L},function(e){re=e.s,ne=e.c,ie=e.b}],execute:function(){var t=function(e){var t=n(),r=a(o((function(){return c.post("/authn/delete_authn",{id:e.id})})),2),v=r[0],m=r[1],b=a(s(!1),2),_=b[0],x=b[1];return l(w,{get when(){return!_()},get children(){return l(d,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[l(h,{w:"$full",alignItems:"start",spacing:"$1",get children(){return l(f,{color:"$info9",css:{wordBreak:"break-all"},get children(){return"Fingerprint: "+e.fingerprint+"\tID: "+e.id}})}}),l(d,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return l(g,{colorScheme:"danger",get loading(){return v()},onClick:(e=u(i().mark((function e(){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m();case 2:r=e.sent,p(r,(function(){y.success(t("global.delete_success")),x(!0)}));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),get children(){return t("global.delete")}});var e}})]}})}})},oe=[{name:"title",textAlign:"left",w:"calc(35% - 110px)"},{name:"fingerprint",textAlign:"left",w:"calc(65% - 110px)"},{name:"last_used",textAlign:"right",w:"140px"},{name:"operation",textAlign:"right",w:"80px"}],ue=function(e){var t=n(),r=a(s(!1),2),d=r[0],h=r[1],x=a(e.isMine?o((function(){return c.post("/me/sshkey/delete?id=".concat(e.id))})):o((function(){return c.post("/admin/user/sshkey/delete?uid=".concat(e.userId,"&id=").concat(e.id))})),2),k=x[0],S=x[1],$={whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"};return l(w,{get when(){return!d()},get children(){return l(v,{w:"$full",p:"$2",get children(){return[l(f,{get w(){return oe[0].w},size:"sm",get textAlign(){return oe[0].textAlign},css:$,get children(){return e.title}}),l(m,{get w(){return oe[1].w},size:"sm",get textAlign(){return oe[1].textAlign},css:$,get children(){return e.fingerprint}}),l(m,{get w(){return oe[2].w},size:"sm",get textAlign(){return oe[2].textAlign},css:$,get children(){return t=new Date(e.last_used_time),r=t.getFullYear().toString(),n=(t.getMonth()+1).toString().padStart(2,"0"),i=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),u=t.getMinutes().toString().padStart(2,"0"),a=t.getSeconds().toString().padStart(2,"0"),"".concat(r,"/").concat(n,"/").concat(i," ").concat(o,":").concat(u,":").concat(a);var t,r,n,i,o,u,a}}),l(b,{get w(){return oe[3].w},gap:"$1",get children(){return[l(_,{}),l(g,{size:"sm",colorScheme:"danger",get loading(){return k()},onClick:(e=u(i().mark((function e(){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S();case 2:r=e.sent,p(r,(function(){y.success(t("global.delete_success")),h(!0)}));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),get children(){return t("global.delete")}})];var e}})]}})}})},ae=function(e){var t=n(),r=a(s([]),2),d=r[0],y=r[1],G=a(e.isMine?o((function(){return c.get("/me/sshkey/list")})):o((function(){return c.get("/admin/user/sshkey/list?uid=".concat(e.userId))})),2),M=G[0],z=G[1],F=a(x({title:"",key:""}),2),U=F[0],W=F[1],Y=a(o((function(){return c.post("/me/sshkey/add",U)})),2),B=Y[0],J=Y[1],R=k(),X=R.isOpen,V=R.onOpen,q=R.onClose,H=function(){var e=u(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z();case 2:t=e.sent,p(t,(function(e){y(e.content)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();H();var K=function(e){return{fontWeight:"bold",fontSize:"$sm",color:"$neutral11",textAlign:e.textAlign}};return l(h,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[l(b,{w:"$full",get children(){return[l(f,{get children(){return t("users.ssh_keys.heading")}}),l(w,{get when(){return e.isMine},get children(){return[l(_,{}),l(g,{get loading(){return M()},onClick:V,get children(){return t("global.add")}}),l(S,{get opened(){return X()},onClose:q,scrollBehavior:"inside",get children(){return[l($,{}),l(O,{get children(){return[l(L,{}),l(j,{get children(){return t("users.ssh_keys.add_heading")}}),l(E,{get children(){return[l(A,{mb:"$4",get children(){return[l(I,{for:"add_title",get children(){return t("users.ssh_keys.title")}}),l(P,{id:"add_title",get value(){return U.title},onInput:function(e){return W("title",e.currentTarget.value)}})]}}),l(A,{get children(){return[l(I,{for:"add_key",get children(){return t("users.ssh_keys.key")}}),l(C,{id:"add_key",get value(){return U.key},onInput:function(e){return W("key",e.currentTarget.value)}})]}})]}}),l(T,{get children(){return l(g,{get loading(){return B()},onClick:(e=u(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,J();case 2:t=e.sent,p(t,(function(){W("title",""),W("key",""),H(),q()}));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),get children(){return t("global.add")}});var e}})]}})]}})]}})]}}),l(h,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",spacing:"$1",p:"$1",get children(){return[l(v,{class:"title",w:"$full",p:"$2",get children(){return[l(m,N({get w(){return oe[0].w}},(function(){return K(oe[0])}),{get children(){return t("users.ssh_keys.".concat(oe[0].name))}})),l(m,N({get w(){return oe[1].w}},(function(){return K(oe[1])}),{get children(){return t("users.ssh_keys.".concat(oe[1].name))}})),l(m,N({get w(){return oe[2].w}},(function(){return K(oe[2])}),{get children(){return t("users.ssh_keys.".concat(oe[2].name))}})),l(m,N({get w(){return oe[3].w}},(function(){return K(oe[3])}),{get children(){return t("users.ssh_keys.".concat(oe[3].name))}}))]}}),D((function(){return d().map((function(t){return l(ue,N(e,t))}))}))]}})]}})},ce=function(e){return l(Q,{get colorScheme(){return e.can?"success":"danger"},get children(){return e.children}})};e("default",(function(){var e=n();ee("manage.sidemenu.profile");var d=G(),b=d.searchParams,_=d.to,x=a(s(M().username),2),k=x[0],S=x[1],$=a(s(""),2),O=$[0],L=$[1],j=a(s(""),2),E=j[0],C=j[1],T=W("sso_compatibility_mode"),N=o((function(e){return c.post("/me/update",{username:e?M().username:k(),password:e?"":O(),sso_id:M().sso_id})})),Q=a(N,2),oe=Q[0],ue=Q[1],se=a(o((function(){return c.get("/authn/getcredentials")})),2),le=se[0],de=se[1],he=a(o((function(){return c.get("/authn/webauthn_begin_registration")})),2)[1],fe=o((function(e,t){return c.post("/authn/webauthn_finish_registration",JSON.stringify(t),{headers:{session:e}})})),ge=a(fe,2),pe=ge[0],ye=ge[1],we=function(){var t=u(i().mark((function t(n){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!O()||O()===E()){t.next=3;break}return y.warning(e("users.confirm_password_not_same")),t.abrupt("return");case 3:return t.next=5,ue(n);case 5:o=t.sent,p(o,(function(){z(r(r({},M()),{},{username:k()})),n?_(""):(y.success(e("users.update_profile_success")),_("/@login?redirect=".concat(encodeURIComponent(location.pathname))))}));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ve=b.sso_id;function me(e){var t=e.data;t.sso_id&&(z(r(r({},M()),{},{sso_id:t.sso_id})),we(!0))}ve&&(z(r(r({},M()),{},{sso_id:ve})),we(!0)),window.addEventListener("message",me),F((function(){window.removeEventListener("message",me)}));var be=a(s([]),2),_e=be[0],xe=be[1],ke=function(){var e=u(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,de();case 2:t=e.sent,Z(t,xe);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return re()&&!U.is_guest(M())&&W("webauthn_login_enabled")&&ke(),l(h,{w:"$full",spacing:"$4",alignItems:"start",get children(){return[l(w,{get when(){return!U.is_guest(M())},get fallback(){return[l(Y,{status:"warning",flexDirection:{"@initial":"column","@lg":"row"},get children(){return[l(B,{mr:"$2_5"}),l(J,{mr:"$2_5",get children(){return e("users.guest-tips")}}),l(R,{get children(){return e("users.modify_nothing")}})]}}),l(v,{spacing:"$2",get children(){return[l(m,{get children(){return e("global.have_account")}}),l(m,{color:"$info9",as:te,get href(){return"/@login?redirect=".concat(encodeURIComponent(location.pathname))},get children(){return e("global.go_login")}})]}})]},get children(){return[l(f,{get children(){return e("users.update_profile")}}),l(X,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return l(A,{get children(){return[l(I,{for:"username",get children(){return e("users.change_username")}}),l(P,{id:"username",get value(){return k()},onInput:function(e){S(e.currentTarget.value)}})]}})}}),l(X,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[l(A,{get children(){return[l(I,{for:"password",get children(){return e("users.change_password")}}),l(P,{id:"password",type:"password",placeholder:"********",get value(){return O()},onInput:function(e){L(e.currentTarget.value)}}),l(V,{get children(){return e("users.change_password-tips")}})]}}),l(A,{get children(){return[l(I,{for:"confirm-password",get children(){return e("users.confirm_password")}}),l(P,{id:"confirm-password",type:"password",placeholder:"********",get value(){return E()},onInput:function(e){C(e.currentTarget.value)}}),l(V,{get children(){return e("users.confirm_password-tips")}})]}})]}}),l(v,{spacing:"$2",get children(){return[l(g,{get loading(){return oe()},onClick:[we,!1],get children(){return e("global.save")}}),l(w,{get when(){return!M().otp},get children(){return l(g,{colorScheme:"accent",onClick:function(){_("/@manage/2fa")},get children(){return e("users.enable_2fa")}})}})]}})]}}),l(w,{get when(){return D((function(){return!!W("sso_login_enabled")}),!0)()&&!U.is_guest(M())},get children(){return[l(f,{get children(){return e("users.sso_login")}}),l(v,{spacing:"$2",get children(){return l(w,{get when(){return M().sso_id},get fallback(){return l(g,{onClick:function(){var e=c.getUri()+"/auth/sso?method=get_sso_id";T?window.location.href=e:window.open(e,"authPopup","width=500,height=600")},get children(){return e("users.connect_sso")}})},get children(){return l(g,{colorScheme:"danger",get loading(){return oe()},onClick:function(){z(r(r({},M()),{},{sso_id:""})),we(!0)},get children(){return e("users.disconnect_sso")}})}})}})]}}),l(w,{get when(){return D((function(){return!U.is_guest(M())}),!0)()&&W("webauthn_login_enabled")},get children(){return[l(f,{get children(){return e("users.webauthn")}}),l(v,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return l(q,{get loading(){return le()},get children(){return l(H,{get each(){return _e()},children:function(e){return l(t,{get id(){return e.id},get fingerprint(){return e.fingerprint}})}})}})}}),l(g,{get loading(){return pe()},onClick:(r=u(i().mark((function t(){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(re()){t.next=3;break}return y.error(e("users.webauthn_not_supported")),t.abrupt("return");case 3:return t.next=5,he();case 5:r=t.sent,p(r,function(){var t=u(i().mark((function t(r){var n,o,u;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=ne(r.options),o=r.session,t.prev=2,t.next=5,ie(n);case 5:return u=t.sent,t.t0=p,t.next=9,ye(o,u);case 9:t.t1=t.sent,t.t2=function(){y.success(e("users.add_webauthn_success"))},(0,t.t0)(t.t1,t.t2),t.next=17;break;case 14:t.prev=14,t.t3=t.catch(2),t.t3 instanceof Error&&y.error(t.t3.message);case 17:case"end":return t.stop()}}),t,null,[[2,14]])})));return function(e){return t.apply(this,arguments)}}());case 7:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)}),get children(){return e("users.add_webauthn")}})];var r}}),l(v,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return l(H,{each:K,children:function(t,r){return l(ce,{get can(){return U.can(M(),r())},get children(){return e("users.permissions.".concat(t))}})}})}}),l(ae,{isMine:!0,get userId(){return M().id}})]}})}))}}}))}();
1
+ !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(j){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),u=new $(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return L()}for(r.method=i,r.arg=o;;){var u=r.delegate;if(u){var a=x(u,r);if(a){if(a===h)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=d(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,u),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(j){return{type:"throw",arg:j}}}t.wrap=l;var h={};function f(){}function g(){}function p(){}var y={};s(y,u,(function(){return this}));var w=Object.getPrototypeOf,v=w&&w(w(O([])));v&&v!==r&&n.call(v,u)&&(y=v);var m=p.prototype=f.prototype=Object.create(y);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(t,r){function i(o,u,a,c){var s=d(t[o],t,u);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==e(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(e){i("next",e,a,c)}),(function(e){i("throw",e,a,c)})):r.resolve(h).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,c)}))}c(s.arg)}var o;this._invoke=function(e,t){function n(){return new r((function(r,n){i(e,t,r,n)}))}return o=o?o.then(n,n):n()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,h;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function O(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return g.prototype=p,s(m,"constructor",p),s(p,"constructor",g),g.displayName=s(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,c,"GeneratorFunction")),e.prototype=Object.create(m),e},t.awrap=function(e){return{__await:e}},b(_.prototype),s(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var u=new _(l(e,r,n,i),o);return t.isGeneratorFunction(r)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},b(m),s(m,c,"Generator"),s(m,u,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,$.prototype={constructor:$,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return u.type="throw",u.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],u=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function o(e,t,r,n,i,o,u){try{var a=e[o](u),c=a.value}catch(s){return void r(s)}a.done?t(c):Promise.resolve(c).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var u=e.apply(t,r);function a(e){o(u,n,i,a,c,"next",e)}function c(e){o(u,n,i,a,c,"throw",e)}a(void 0)}))}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],u=!0,a=!1;try{for(r=r.call(e);!(u=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);u=!0);}catch(c){a=!0,i=c}finally{try{u||null==r.return||r.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}System.register(["./index-legacy.eace8bff.js","./useTitle-legacy.80f4343f.js","./index-legacy.f9a28a3c.js","./webauthn-json.browser-ponyfill-legacy.1eb8248a.js"],(function(e,t){"use strict";var n,o,c,s,l,d,h,f,g,p,y,w,v,m,b,_,x,k,S,$,O,L,j,E,A,I,P,C,T,N,D,G,M,z,F,B,U,W,Y,J,R,X,V,q,H,K,Q,Z,ee,te,re,ne,ie;return{setters:[function(e){n=e.b,o=e.be,c=e.bv,s=e.B,l=e.x,d=e.dv,h=e.ai,f=e.c2,g=e.Q,p=e.bw,y=e.n,w=e.S,v=e.av,m=e.ah,b=e.c3,_=e.dw,x=e.cW,k=e.a$,S=e.R,$=e.M,O=e.I,L=e.bz,j=e.J,E=e.K,A=e.bW,I=e.bJ,P=e.L,C=e.T,T=e.O,N=e.V,D=e.am,G=e.d,M=e.ay,z=e.dx,F=e.r,B=e.ax,U=e.an,W=e.dy,Y=e.dz,J=e.dA,R=e.dB,X=e.dC,V=e.N,q=e.ap,H=e.W,K=e.aY,Q=e.cX,Z=e.cL},function(e){ee=e.b},function(e){te=e.L},function(e){re=e.s,ne=e.c,ie=e.b}],execute:function(){var t=function(e){var t=n(),r=a(o((function(){return c.post("/authn/delete_authn",{id:e.id})})),2),v=r[0],m=r[1],b=a(s(!1),2),_=b[0],x=b[1];return l(w,{get when(){return!_()},get children(){return l(d,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[l(h,{w:"$full",alignItems:"start",spacing:"$1",get children(){return l(f,{color:"$info9",css:{wordBreak:"break-all"},get children(){return"Fingerprint: "+e.fingerprint+"\tID: "+e.id}})}}),l(d,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return l(g,{colorScheme:"danger",get loading(){return v()},onClick:(e=u(i().mark((function e(){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m();case 2:r=e.sent,p(r,(function(){y.success(t("global.delete_success")),x(!0)}));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),get children(){return t("global.delete")}});var e}})]}})}})},oe=[{name:"title",textAlign:"left",w:"calc(35% - 110px)"},{name:"fingerprint",textAlign:"left",w:"calc(65% - 110px)"},{name:"last_used",textAlign:"right",w:"140px"},{name:"operation",textAlign:"right",w:"80px"}],ue=function(e){var t=n(),r=a(s(!1),2),d=r[0],h=r[1],x=a(e.isMine?o((function(){return c.post("/me/sshkey/delete?id=".concat(e.id))})):o((function(){return c.post("/admin/user/sshkey/delete?uid=".concat(e.userId,"&id=").concat(e.id))})),2),k=x[0],S=x[1],$={whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"};return l(w,{get when(){return!d()},get children(){return l(v,{w:"$full",p:"$2",get children(){return[l(f,{get w(){return oe[0].w},size:"sm",get textAlign(){return oe[0].textAlign},css:$,get children(){return e.title}}),l(m,{get w(){return oe[1].w},size:"sm",get textAlign(){return oe[1].textAlign},css:$,get children(){return e.fingerprint}}),l(m,{get w(){return oe[2].w},size:"sm",get textAlign(){return oe[2].textAlign},css:$,get children(){return t=new Date(e.last_used_time),r=t.getFullYear().toString(),n=(t.getMonth()+1).toString().padStart(2,"0"),i=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),u=t.getMinutes().toString().padStart(2,"0"),a=t.getSeconds().toString().padStart(2,"0"),"".concat(r,"/").concat(n,"/").concat(i," ").concat(o,":").concat(u,":").concat(a);var t,r,n,i,o,u,a}}),l(b,{get w(){return oe[3].w},gap:"$1",get children(){return[l(_,{}),l(g,{size:"sm",colorScheme:"danger",get loading(){return k()},onClick:(e=u(i().mark((function e(){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S();case 2:r=e.sent,p(r,(function(){y.success(t("global.delete_success")),h(!0)}));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),get children(){return t("global.delete")}})];var e}})]}})}})},ae=function(e){var t=n(),r=a(s([]),2),d=r[0],y=r[1],G=a(e.isMine?o((function(){return c.get("/me/sshkey/list")})):o((function(){return c.get("/admin/user/sshkey/list?uid=".concat(e.userId))})),2),M=G[0],z=G[1],F=a(x({title:"",key:""}),2),B=F[0],U=F[1],W=a(o((function(){return c.post("/me/sshkey/add",B)})),2),Y=W[0],J=W[1],R=k(),X=R.isOpen,V=R.onOpen,q=R.onClose,H=function(){var e=u(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z();case 2:t=e.sent,p(t,(function(e){y(e.content)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();H();var K=function(e){return{fontWeight:"bold",fontSize:"$sm",color:"$neutral11",textAlign:e.textAlign}};return l(h,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[l(b,{w:"$full",get children(){return[l(f,{get children(){return t("users.ssh_keys.heading")}}),l(w,{get when(){return e.isMine},get children(){return[l(_,{}),l(g,{get loading(){return M()},onClick:V,get children(){return t("global.add")}}),l(S,{get opened(){return X()},onClose:q,scrollBehavior:"inside",get children(){return[l($,{}),l(O,{get children(){return[l(L,{}),l(j,{get children(){return t("users.ssh_keys.add_heading")}}),l(E,{get children(){return[l(A,{mb:"$4",get children(){return[l(I,{for:"add_title",get children(){return t("users.ssh_keys.title")}}),l(P,{id:"add_title",get value(){return B.title},onInput:function(e){return U("title",e.currentTarget.value)}})]}}),l(A,{get children(){return[l(I,{for:"add_key",get children(){return t("users.ssh_keys.key")}}),l(C,{id:"add_key",get value(){return B.key},onInput:function(e){return U("key",e.currentTarget.value)}})]}})]}}),l(T,{get children(){return l(g,{get loading(){return Y()},onClick:(e=u(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,J();case 2:t=e.sent,p(t,(function(){U("title",""),U("key",""),H(),q()}));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),get children(){return t("global.add")}});var e}})]}})]}})]}})]}}),l(h,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",spacing:"$1",p:"$1",get children(){return[l(v,{class:"title",w:"$full",p:"$2",get children(){return[l(m,N({get w(){return oe[0].w}},(function(){return K(oe[0])}),{get children(){return t("users.ssh_keys.".concat(oe[0].name))}})),l(m,N({get w(){return oe[1].w}},(function(){return K(oe[1])}),{get children(){return t("users.ssh_keys.".concat(oe[1].name))}})),l(m,N({get w(){return oe[2].w}},(function(){return K(oe[2])}),{get children(){return t("users.ssh_keys.".concat(oe[2].name))}})),l(m,N({get w(){return oe[3].w}},(function(){return K(oe[3])}),{get children(){return t("users.ssh_keys.".concat(oe[3].name))}}))]}}),D((function(){return d().map((function(t){return l(ue,N(e,t))}))}))]}})]}})},ce=function(e){return l(Q,{get colorScheme(){return e.can?"success":"danger"},get children(){return e.children}})};e("default",(function(){var e=n();ee("manage.sidemenu.profile");var d=G(),b=d.searchParams,_=d.to,x=a(s(M().username),2),k=x[0],S=x[1],$=a(s(""),2),O=$[0],L=$[1],j=a(s(""),2),E=j[0],C=j[1],T=U("sso_compatibility_mode"),N=o((function(e){return c.post("/me/update",{username:e?M().username:k(),password:e?"":O(),sso_id:M().sso_id})})),Q=a(N,2),oe=Q[0],ue=Q[1],se=a(o((function(){return c.get("/authn/getcredentials")})),2),le=se[0],de=se[1],he=a(o((function(){return c.get("/authn/webauthn_begin_registration")})),2)[1],fe=o((function(e,t){return c.post("/authn/webauthn_finish_registration",JSON.stringify(t),{headers:{session:e}})})),ge=a(fe,2),pe=ge[0],ye=ge[1],we=function(){var t=u(i().mark((function t(n){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!O()||O()===E()){t.next=3;break}return y.warning(e("users.confirm_password_not_same")),t.abrupt("return");case 3:return t.next=5,ue(n);case 5:o=t.sent,p(o,(function(){z(r(r({},M()),{},{username:k()})),n?_(""):(y.success(e("users.update_profile_success")),_("/@login?redirect=".concat(encodeURIComponent(location.pathname))))}));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ve=b.sso_id;function me(e){var t=e.data;t.sso_id&&(z(r(r({},M()),{},{sso_id:t.sso_id})),we(!0))}ve&&(z(r(r({},M()),{},{sso_id:ve})),we(!0)),window.addEventListener("message",me),F((function(){window.removeEventListener("message",me)}));var be=a(s([]),2),_e=be[0],xe=be[1],ke=function(){var e=u(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,de();case 2:t=e.sent,Z(t,xe);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return re()&&!B.is_guest(M())&&U("webauthn_login_enabled")&&ke(),l(h,{w:"$full",spacing:"$4",alignItems:"start",get children(){return[l(w,{get when(){return!B.is_guest(M())},get fallback(){return[l(W,{status:"warning",flexDirection:{"@initial":"column","@lg":"row"},get children(){return[l(Y,{mr:"$2_5"}),l(J,{mr:"$2_5",get children(){return e("users.guest-tips")}}),l(R,{get children(){return e("users.modify_nothing")}})]}}),l(v,{spacing:"$2",get children(){return[l(m,{get children(){return e("global.have_account")}}),l(m,{color:"$info9",as:te,get href(){return"/@login?redirect=".concat(encodeURIComponent(location.pathname))},get children(){return e("global.go_login")}})]}})]},get children(){return[l(f,{get children(){return e("users.update_profile")}}),l(X,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return l(A,{get children(){return[l(I,{for:"username",get children(){return e("users.change_username")}}),l(P,{id:"username",get value(){return k()},onInput:function(e){S(e.currentTarget.value)}})]}})}}),l(X,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[l(A,{get children(){return[l(I,{for:"password",get children(){return e("users.change_password")}}),l(P,{id:"password",type:"password",placeholder:"********",get value(){return O()},onInput:function(e){L(e.currentTarget.value)}}),l(V,{get children(){return e("users.change_password-tips")}})]}}),l(A,{get children(){return[l(I,{for:"confirm-password",get children(){return e("users.confirm_password")}}),l(P,{id:"confirm-password",type:"password",placeholder:"********",get value(){return E()},onInput:function(e){C(e.currentTarget.value)}}),l(V,{get children(){return e("users.confirm_password-tips")}})]}})]}}),l(v,{spacing:"$2",get children(){return[l(g,{get loading(){return oe()},onClick:[we,!1],get children(){return e("global.save")}}),l(w,{get when(){return!M().otp},get children(){return l(g,{colorScheme:"accent",onClick:function(){_("/@manage/2fa")},get children(){return e("users.enable_2fa")}})}})]}})]}}),l(w,{get when(){return D((function(){return!!U("sso_login_enabled")}),!0)()&&!B.is_guest(M())},get children(){return[l(f,{get children(){return e("users.sso_login")}}),l(v,{spacing:"$2",get children(){return l(w,{get when(){return M().sso_id},get fallback(){return l(g,{onClick:function(){var e=c.getUri()+"/auth/sso?method=get_sso_id";T?window.location.href=e:window.open(e,"authPopup","width=500,height=600")},get children(){return e("users.connect_sso")}})},get children(){return l(g,{colorScheme:"danger",get loading(){return oe()},onClick:function(){z(r(r({},M()),{},{sso_id:""})),we(!0)},get children(){return e("users.disconnect_sso")}})}})}})]}}),l(w,{get when(){return D((function(){return!B.is_guest(M())}),!0)()&&U("webauthn_login_enabled")},get children(){return[l(f,{get children(){return e("users.webauthn")}}),l(v,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return l(q,{get loading(){return le()},get children(){return l(H,{get each(){return _e()},children:function(e){return l(t,{get id(){return e.id},get fingerprint(){return e.fingerprint}})}})}})}}),l(g,{get loading(){return pe()},onClick:(r=u(i().mark((function t(){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(re()){t.next=3;break}return y.error(e("users.webauthn_not_supported")),t.abrupt("return");case 3:return t.next=5,he();case 5:r=t.sent,p(r,function(){var t=u(i().mark((function t(r){var n,o,u;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=ne(r.options),o=r.session,t.prev=2,t.next=5,ie(n);case 5:return u=t.sent,t.t0=p,t.next=9,ye(o,u);case 9:t.t1=t.sent,t.t2=function(){y.success(e("users.add_webauthn_success"))},(0,t.t0)(t.t1,t.t2),t.next=17;break;case 14:t.prev=14,t.t3=t.catch(2),t.t3 instanceof Error&&y.error(t.t3.message);case 17:case"end":return t.stop()}}),t,null,[[2,14]])})));return function(e){return t.apply(this,arguments)}}());case 7:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)}),get children(){return e("users.add_webauthn")}})];var r}}),l(v,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return l(H,{each:K,children:function(t,r){return l(ce,{get can(){return B.can(M(),r())},get children(){return e("users.permissions.".concat(t))}})}})}}),l(ae,{isMine:!0,get userId(){return M().id}})]}})}))}}}))}();
@@ -0,0 +1 @@
1
+ import{a4 as i,x as n,e0 as a}from"./index-0ac33e44.js";const o=t=>{const r=i("settings_layout");let e;return r==="responsive"&&(e="repeat(auto-fill, minmax(424px, 1fr))"),n(a,{w:"$full",gap:"$2",templateColumns:{"@initial":"1fr","@lg":e},get children(){return t.children}})};export{o as R};
@@ -1 +1 @@
1
- System.register(["./index-legacy.7de89ac7.js"],(function(e,t){"use strict";var n,r,i;return{setters:[function(e){n=e.a4,r=e.x,i=e.d_}],execute:function(){e("R",(function(e){var t;return"responsive"===n("settings_layout")&&(t="repeat(auto-fill, minmax(424px, 1fr))"),r(i,{w:"$full",gap:"$2",templateColumns:{"@initial":"1fr","@lg":t},get children(){return e.children}})}))}}}));
1
+ System.register(["./index-legacy.eace8bff.js"],(function(e,t){"use strict";var n,r,i;return{setters:[function(e){n=e.a4,r=e.x,i=e.e0}],execute:function(){e("R",(function(e){var t;return"responsive"===n("settings_layout")&&(t="repeat(auto-fill, minmax(424px, 1fr))"),r(i,{w:"$full",gap:"$2",templateColumns:{"@initial":"1fr","@lg":t},get children(){return e.children}})}))}}}));