@nocobase/plugin-multi-app-manager 2.1.0-alpha.1 → 2.1.0-alpha.11

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 (146) hide show
  1. package/LICENSE +201 -661
  2. package/README.md +79 -10
  3. package/dist/client/Migrate.d.ts +10 -0
  4. package/dist/client/e9551d3b66931c0a.js +10 -0
  5. package/dist/client/index.js +1 -1
  6. package/dist/externalVersion.js +7 -7
  7. package/dist/locale/en-US.json +3 -2
  8. package/dist/locale/zh-CN.json +3 -2
  9. package/dist/node_modules/p-queue/dist/index.d.ts +101 -0
  10. package/dist/node_modules/p-queue/dist/index.js +1 -0
  11. package/dist/node_modules/p-queue/dist/lower-bound.d.ts +1 -0
  12. package/dist/node_modules/p-queue/dist/lower-bound.js +21 -0
  13. package/dist/node_modules/p-queue/dist/options.d.ts +64 -0
  14. package/dist/node_modules/p-queue/dist/options.js +2 -0
  15. package/dist/node_modules/p-queue/dist/priority-queue.d.ts +12 -0
  16. package/dist/node_modules/p-queue/dist/priority-queue.js +32 -0
  17. package/dist/node_modules/p-queue/dist/queue.d.ts +7 -0
  18. package/dist/node_modules/p-queue/dist/queue.js +2 -0
  19. package/dist/node_modules/p-queue/license +9 -0
  20. package/dist/node_modules/p-queue/node_modules/eventemitter3/index.d.ts +134 -0
  21. package/dist/node_modules/p-queue/node_modules/eventemitter3/index.js +336 -0
  22. package/dist/node_modules/p-queue/node_modules/eventemitter3/package.json +56 -0
  23. package/dist/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.js +340 -0
  24. package/dist/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.min.js +1 -0
  25. package/dist/node_modules/p-queue/package.json +1 -0
  26. package/dist/server/adapters/legacy-adapter.d.ts +43 -0
  27. package/dist/server/adapters/legacy-adapter.js +207 -0
  28. package/dist/server/server.d.ts +4 -6
  29. package/dist/server/server.js +38 -191
  30. package/package.json +3 -3
  31. package/dist/client/db3a142b120d6553.js +0 -10
  32. package/dist/node_modules/mariadb/LICENSE +0 -502
  33. package/dist/node_modules/mariadb/callback.js +0 -41
  34. package/dist/node_modules/mariadb/lib/cmd/batch-bulk.js +0 -278
  35. package/dist/node_modules/mariadb/lib/cmd/batch-rewrite.js +0 -372
  36. package/dist/node_modules/mariadb/lib/cmd/change-user.js +0 -149
  37. package/dist/node_modules/mariadb/lib/cmd/class/ok-packet.js +0 -17
  38. package/dist/node_modules/mariadb/lib/cmd/column-definition.js +0 -102
  39. package/dist/node_modules/mariadb/lib/cmd/command.js +0 -168
  40. package/dist/node_modules/mariadb/lib/cmd/common-binary-cmd.js +0 -327
  41. package/dist/node_modules/mariadb/lib/cmd/common-text-cmd.js +0 -427
  42. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/caching-sha2-password-auth.js +0 -168
  43. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/clear-password-auth.js +0 -23
  44. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/ed25519-password-auth.js +0 -761
  45. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/native-password-auth.js +0 -55
  46. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/pam-password-auth.js +0 -58
  47. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/plugin-auth.js +0 -19
  48. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/sha256-password-auth.js +0 -142
  49. package/dist/node_modules/mariadb/lib/cmd/handshake/client-capabilities.js +0 -74
  50. package/dist/node_modules/mariadb/lib/cmd/handshake/client-handshake-response.js +0 -126
  51. package/dist/node_modules/mariadb/lib/cmd/handshake/handshake.js +0 -292
  52. package/dist/node_modules/mariadb/lib/cmd/handshake/initial-handshake.js +0 -74
  53. package/dist/node_modules/mariadb/lib/cmd/handshake/ssl-request.js +0 -29
  54. package/dist/node_modules/mariadb/lib/cmd/ping.js +0 -52
  55. package/dist/node_modules/mariadb/lib/cmd/query.js +0 -255
  56. package/dist/node_modules/mariadb/lib/cmd/quit.js +0 -28
  57. package/dist/node_modules/mariadb/lib/cmd/reset.js +0 -54
  58. package/dist/node_modules/mariadb/lib/cmd/resultset.js +0 -607
  59. package/dist/node_modules/mariadb/lib/cmd/stream.js +0 -45
  60. package/dist/node_modules/mariadb/lib/config/connection-options.js +0 -258
  61. package/dist/node_modules/mariadb/lib/config/pool-cluster-options.js +0 -19
  62. package/dist/node_modules/mariadb/lib/config/pool-options.js +0 -47
  63. package/dist/node_modules/mariadb/lib/connection-callback.js +0 -160
  64. package/dist/node_modules/mariadb/lib/connection.js +0 -1460
  65. package/dist/node_modules/mariadb/lib/const/capabilities.js +0 -64
  66. package/dist/node_modules/mariadb/lib/const/collations.js +0 -473
  67. package/dist/node_modules/mariadb/lib/const/connection_status.js +0 -13
  68. package/dist/node_modules/mariadb/lib/const/error-code.js +0 -1282
  69. package/dist/node_modules/mariadb/lib/const/field-detail.js +0 -35
  70. package/dist/node_modules/mariadb/lib/const/field-type.js +0 -71
  71. package/dist/node_modules/mariadb/lib/const/server-status.js +0 -30
  72. package/dist/node_modules/mariadb/lib/const/state-change.js +0 -12
  73. package/dist/node_modules/mariadb/lib/filtered-pool-cluster.js +0 -81
  74. package/dist/node_modules/mariadb/lib/io/bulk-packet.js +0 -590
  75. package/dist/node_modules/mariadb/lib/io/compression-input-stream.js +0 -141
  76. package/dist/node_modules/mariadb/lib/io/compression-output-stream.js +0 -171
  77. package/dist/node_modules/mariadb/lib/io/packet-input-stream.js +0 -193
  78. package/dist/node_modules/mariadb/lib/io/packet-node-encoded.js +0 -36
  79. package/dist/node_modules/mariadb/lib/io/packet-node-iconv.js +0 -37
  80. package/dist/node_modules/mariadb/lib/io/packet-output-stream.js +0 -502
  81. package/dist/node_modules/mariadb/lib/io/packet.js +0 -515
  82. package/dist/node_modules/mariadb/lib/io/rewrite-packet.js +0 -481
  83. package/dist/node_modules/mariadb/lib/misc/connection-information.js +0 -96
  84. package/dist/node_modules/mariadb/lib/misc/errors.js +0 -123
  85. package/dist/node_modules/mariadb/lib/misc/parse.js +0 -1033
  86. package/dist/node_modules/mariadb/lib/misc/utils.js +0 -298
  87. package/dist/node_modules/mariadb/lib/pool-base.js +0 -611
  88. package/dist/node_modules/mariadb/lib/pool-callback.js +0 -202
  89. package/dist/node_modules/mariadb/lib/pool-cluster-callback.js +0 -66
  90. package/dist/node_modules/mariadb/lib/pool-cluster.js +0 -407
  91. package/dist/node_modules/mariadb/lib/pool-promise.js +0 -108
  92. package/dist/node_modules/mariadb/node_modules/@types/node/assert/strict.d.ts +0 -8
  93. package/dist/node_modules/mariadb/node_modules/@types/node/assert.d.ts +0 -912
  94. package/dist/node_modules/mariadb/node_modules/@types/node/async_hooks.d.ts +0 -501
  95. package/dist/node_modules/mariadb/node_modules/@types/node/buffer.d.ts +0 -2232
  96. package/dist/node_modules/mariadb/node_modules/@types/node/child_process.d.ts +0 -1366
  97. package/dist/node_modules/mariadb/node_modules/@types/node/cluster.d.ts +0 -414
  98. package/dist/node_modules/mariadb/node_modules/@types/node/console.d.ts +0 -412
  99. package/dist/node_modules/mariadb/node_modules/@types/node/constants.d.ts +0 -18
  100. package/dist/node_modules/mariadb/node_modules/@types/node/crypto.d.ts +0 -3338
  101. package/dist/node_modules/mariadb/node_modules/@types/node/dgram.d.ts +0 -545
  102. package/dist/node_modules/mariadb/node_modules/@types/node/diagnostics_channel.d.ts +0 -152
  103. package/dist/node_modules/mariadb/node_modules/@types/node/dns/promises.d.ts +0 -370
  104. package/dist/node_modules/mariadb/node_modules/@types/node/dns.d.ts +0 -659
  105. package/dist/node_modules/mariadb/node_modules/@types/node/domain.d.ts +0 -169
  106. package/dist/node_modules/mariadb/node_modules/@types/node/events.d.ts +0 -651
  107. package/dist/node_modules/mariadb/node_modules/@types/node/fs/promises.d.ts +0 -1091
  108. package/dist/node_modules/mariadb/node_modules/@types/node/fs.d.ts +0 -3869
  109. package/dist/node_modules/mariadb/node_modules/@types/node/globals.d.ts +0 -294
  110. package/dist/node_modules/mariadb/node_modules/@types/node/globals.global.d.ts +0 -1
  111. package/dist/node_modules/mariadb/node_modules/@types/node/http.d.ts +0 -1396
  112. package/dist/node_modules/mariadb/node_modules/@types/node/http2.d.ts +0 -2101
  113. package/dist/node_modules/mariadb/node_modules/@types/node/https.d.ts +0 -391
  114. package/dist/node_modules/mariadb/node_modules/@types/node/index.d.ts +0 -129
  115. package/dist/node_modules/mariadb/node_modules/@types/node/inspector.d.ts +0 -2744
  116. package/dist/node_modules/mariadb/node_modules/@types/node/module.d.ts +0 -114
  117. package/dist/node_modules/mariadb/node_modules/@types/node/net.d.ts +0 -791
  118. package/dist/node_modules/mariadb/node_modules/@types/node/os.d.ts +0 -455
  119. package/dist/node_modules/mariadb/node_modules/@types/node/package.json +0 -220
  120. package/dist/node_modules/mariadb/node_modules/@types/node/path.d.ts +0 -180
  121. package/dist/node_modules/mariadb/node_modules/@types/node/perf_hooks.d.ts +0 -557
  122. package/dist/node_modules/mariadb/node_modules/@types/node/process.d.ts +0 -1481
  123. package/dist/node_modules/mariadb/node_modules/@types/node/punycode.d.ts +0 -117
  124. package/dist/node_modules/mariadb/node_modules/@types/node/querystring.d.ts +0 -131
  125. package/dist/node_modules/mariadb/node_modules/@types/node/readline.d.ts +0 -650
  126. package/dist/node_modules/mariadb/node_modules/@types/node/repl.d.ts +0 -424
  127. package/dist/node_modules/mariadb/node_modules/@types/node/stream/consumers.d.ts +0 -24
  128. package/dist/node_modules/mariadb/node_modules/@types/node/stream/promises.d.ts +0 -42
  129. package/dist/node_modules/mariadb/node_modules/@types/node/stream/web.d.ts +0 -330
  130. package/dist/node_modules/mariadb/node_modules/@types/node/stream.d.ts +0 -1249
  131. package/dist/node_modules/mariadb/node_modules/@types/node/string_decoder.d.ts +0 -67
  132. package/dist/node_modules/mariadb/node_modules/@types/node/timers/promises.d.ts +0 -68
  133. package/dist/node_modules/mariadb/node_modules/@types/node/timers.d.ts +0 -94
  134. package/dist/node_modules/mariadb/node_modules/@types/node/tls.d.ts +0 -1020
  135. package/dist/node_modules/mariadb/node_modules/@types/node/trace_events.d.ts +0 -161
  136. package/dist/node_modules/mariadb/node_modules/@types/node/tty.d.ts +0 -204
  137. package/dist/node_modules/mariadb/node_modules/@types/node/url.d.ts +0 -891
  138. package/dist/node_modules/mariadb/node_modules/@types/node/util.d.ts +0 -1594
  139. package/dist/node_modules/mariadb/node_modules/@types/node/v8.d.ts +0 -378
  140. package/dist/node_modules/mariadb/node_modules/@types/node/vm.d.ts +0 -507
  141. package/dist/node_modules/mariadb/node_modules/@types/node/wasi.d.ts +0 -158
  142. package/dist/node_modules/mariadb/node_modules/@types/node/worker_threads.d.ts +0 -649
  143. package/dist/node_modules/mariadb/node_modules/@types/node/zlib.d.ts +0 -517
  144. package/dist/node_modules/mariadb/package.json +0 -1
  145. package/dist/node_modules/mariadb/promise.js +0 -34
  146. package/dist/node_modules/mariadb/types/index.d.ts +0 -870
package/README.md CHANGED
@@ -1,17 +1,24 @@
1
1
  # NocoBase
2
2
 
3
3
  <video width="100%" controls>
4
- <source src="https://static-docs.nocobase.com/NocoBase0510.mp4" type="video/mp4">
4
+ <source src="https://github.com/user-attachments/assets/4d11a87b-00e2-48f3-9bf7-389d21072d13" type="video/mp4">
5
5
  </video>
6
6
 
7
+ <p align="center">
8
+ <a href="https://trendshift.io/repositories/4112" target="_blank"><img src="https://trendshift.io/api/badge/repositories/4112" alt="nocobase%2Fnocobase | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
9
+ <a href="https://www.producthunt.com/posts/nocobase?embed=true&utm_source=badge-top-post-topic-badge&utm_medium=badge&utm_souce=badge-nocobase" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=456520&theme=light&period=weekly&topic_id=267" alt="NocoBase - Scalability&#0045;first&#0044;&#0032;open&#0045;source&#0032;no&#0045;code&#0032;platform | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
10
+ </p>
7
11
 
8
12
  ## What is NocoBase
9
13
 
10
- NocoBase is a scalability-first, open-source no-code development platform.
11
- Instead of investing years of time and millions of dollars in research and development, deploy NocoBase in a few minutes and you'll have a private, controllable, and extremely scalable no-code development platform!
14
+ NocoBase is the most extensible AI-powered no-code platform.
15
+ Total control. Infinite extensibility. AI collaboration.
16
+ Enable your team to adapt quickly and cut costs dramatically.
17
+ No years of development. No millions wasted.
18
+ Deploy NocoBase in minutes — and take control of everything.
12
19
 
13
20
  Homepage:
14
- https://www.nocobase.com/
21
+ https://www.nocobase.com/
15
22
 
16
23
  Online Demo:
17
24
  https://demo.nocobase.com/new
@@ -19,12 +26,74 @@ https://demo.nocobase.com/new
19
26
  Documents:
20
27
  https://docs.nocobase.com/
21
28
 
22
- Commericial license & plugins:
23
- https://www.nocobase.com/en/commercial
29
+ Forum:
30
+ https://forum.nocobase.com/
24
31
 
25
- License agreement:
26
- https://www.nocobase.com/en/agreement
32
+ Use Cases:
33
+ https://www.nocobase.com/en/blog/tags/customer-stories
27
34
 
35
+ ## Release Notes
28
36
 
29
- ## Contact Us:
30
- hello@nocobase.com
37
+ Our [blog](https://www.nocobase.com/en/blog/timeline) is regularly updated with release notes and provides a weekly summary.
38
+
39
+ ## Distinctive features
40
+
41
+ ### 1. Data model-driven, not form/table–driven
42
+
43
+ Instead of being constrained by forms or tables, NocoBase adopts a data model–driven approach, separating data structure from user interface to unlock unlimited possibilities.
44
+
45
+ - UI and data structure are fully decoupled
46
+ - Multiple blocks and actions can be created for the same table or record in any quantity or form
47
+ - Supports the main database, external databases, and third-party APIs as data sources
48
+
49
+ ![model](https://static-docs.nocobase.com/model.png)
50
+
51
+ ### 2. AI employees, integrated into your business systems
52
+ Unlike standalone AI demos, NocoBase allows you to embed AI capabilities seamlessly into your interfaces, workflows, and data context, making AI truly useful in real business scenarios.
53
+
54
+ - Define AI employees for roles such as translator, analyst, researcher, or assistant
55
+ - Seamless AI–human collaboration in interfaces and workflows
56
+ - Ensure AI usage is secure, transparent, and customizable for your business needs
57
+
58
+ ![AI-employee](https://static-docs.nocobase.com/ai-employee-home.png)
59
+
60
+ ### 3. What you see is what you get, incredibly easy to use
61
+
62
+ While enabling the development of complex business systems, NocoBase keeps the experience simple and intuitive.
63
+
64
+ - One-click switch between usage mode and configuration mode
65
+ - Pages serve as a canvas to arrange blocks and actions, similar to Notion
66
+ - Configuration mode is designed for ordinary users, not just programmers
67
+
68
+ ![wysiwyg](https://static-docs.nocobase.com/wysiwyg.gif)
69
+
70
+ ### 4. Everything is a plugin, designed for extension
71
+ Adding more no-code features will never cover every business case. NocoBase is built for extension through its plugin-based microkernel architecture.
72
+
73
+ - All functionalities are plugins, similar to WordPress
74
+ - Plugins are ready to use upon installation
75
+ - Pages, blocks, actions, APIs, and data sources can all be extended through custom plugins
76
+
77
+ ![plugins](https://static-docs.nocobase.com/plugins.png)
78
+
79
+ ## Installation
80
+
81
+ NocoBase supports three installation methods:
82
+
83
+ - <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/docker-compose">Installing With Docker (👍Recommended)</a>
84
+
85
+ Suitable for no-code scenarios, no code to write. When upgrading, just download the latest image and reboot.
86
+
87
+ - <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/create-nocobase-app">Installing from create-nocobase-app CLI</a>
88
+
89
+ The business code of the project is completely independent and supports low-code development.
90
+
91
+ - <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/git-clone">Installing from Git source code</a>
92
+
93
+ If you want to experience the latest unreleased version, or want to participate in the contribution, you need to make changes and debug on the source code, it is recommended to choose this installation method, which requires a high level of development skills, and if the code has been updated, you can git pull the latest code.
94
+
95
+ ## How NocoBase works
96
+
97
+ <video width="100%" controls>
98
+ <source src="https://github.com/user-attachments/assets/8d183b44-9bb5-4792-b08f-bc08fe8dfaaf" type="video/mp4">
99
+ </video>
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const Migrate: React.FC;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_multi_app_manager=self.webpackChunk_nocobase_plugin_multi_app_manager||[]).push([["347"],{4030:function(e,n,t){t.r(n),t.d(n,{AppManager:function(){return d}});var a=t(3342),c=t(2059),r=t(9155),o=t.n(r),u=t(7197),i=t(124),p=t(166),l=function(e){var n=e.value,t=e.onChange,a=(0,i.A)().t;return o().createElement(c.Checkbox,{onChange:function(e){e.target.checked?t("".concat((0,p.uid)()).concat((0,p.uid)()).concat((0,p.uid)()).concat((0,p.uid)())):t("")},checked:!!n},a("Automatically generate a JWT secret"))},m=function(){var e=(0,a.useRecord)(),n=(0,a.useApp)();return e.cname?"//".concat(e.cname):n.getRouteUrl("/apps/".concat(e.name,"/admin/"))},s=function(){var e=(0,i.A)().t,n=m();return o().createElement("a",{href:n,target:"_blank",rel:"noreferrer"},e("View",{ns:"client"}))},d=function(){return o().createElement(c.Card,{bordered:!1},o().createElement(a.SchemaComponent,{schema:(0,u._w)(),components:{AppVisitor:s,JwtSecretInput:l}}))}}}]);
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-i18next"),require("react-router-dom"),require("react"),require("@formily/react"),require("@nocobase/utils/client"),require("antd-style"),require("@formily/shared"),require("antd"),require("@nocobase/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-multi-app-manager",["react-i18next","react-router-dom","react","@formily/react","@nocobase/utils/client","antd-style","@formily/shared","antd","@nocobase/client"],e):"object"==typeof exports?exports["@nocobase/plugin-multi-app-manager"]=e(require("react-i18next"),require("react-router-dom"),require("react"),require("@formily/react"),require("@nocobase/utils/client"),require("antd-style"),require("@formily/shared"),require("antd"),require("@nocobase/client")):t["@nocobase/plugin-multi-app-manager"]=e(t["react-i18next"],t["react-router-dom"],t.react,t["@formily/react"],t["@nocobase/utils/client"],t["antd-style"],t["@formily/shared"],t.antd,t["@nocobase/client"])}(self,function(t,e,n,r,o,i,a,u,c){return function(){var s,p,l,f,d,m,y={9570:function(t,e,n){"use strict";n.d(e,{J1:function(){return w},kn:function(){return _},vh:function(){return A}});var r=n(8875),o=n(3772),i=n(7584),a=n(2721),u=n(8156),c=n.n(u),s=n(3784),p=n(2785);function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){n(t);return}u.done?e(c):Promise.resolve(c).then(r,o)}function d(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){f(i,r,o,a,u,"next",t)}function u(t){f(i,r,o,a,u,"throw",t)}a(void 0)})}}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){m(t,e,n[e])})}return t}function v(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n})(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}function b(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var c=[i,u];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var h={name:"applications",targetKey:"name",fields:[{type:"uid",name:"name",primaryKey:!0,prefix:"a",interface:"input",uiSchema:{type:"string",title:(0,p.W)("App ID"),required:!0,"x-component":"Input","x-validator":"uid"}},{type:"string",name:"displayName",interface:"input",uiSchema:{type:"string",title:(0,p.W)("App display name"),required:!0,"x-component":"Input"}},{type:"string",name:"pinned",interface:"checkbox",uiSchema:{type:"boolean","x-content":(0,p.W)("Pin to menu"),"x-component":"Checkbox"}},{type:"string",name:"status",interface:"radioGroup",defaultValue:"pending",uiSchema:{type:"string",title:(0,p.W)("App status"),enum:[{label:"Preparing",value:"preparing"},{label:"Initializing",value:"initializing"},{label:"Initialized",value:"initialized"},{label:"Running",value:"running"},{label:"Commanding",value:"commanding"},{label:"Stopped",value:"stopped"},{label:"Error",value:"error"},{label:"Not found",value:"not_found"}],"x-component":"Radio.Group"}}]},x=function(){var t=(0,o.useResourceActionContext)(),e=t.state,n=t.setState,r=t.refresh,i=(0,o.useResourceContext)().resource;return{run:function(){return d(function(){return b(this,function(t){switch(t.label){case 0:return[4,i.destroy({filterByTk:(null==e?void 0:e.selectedRowKeys)||[]})];case 1:return t.sent(),null==n||n({selectedRowKeys:[]}),r(),[2]}})})()}}},g=function(){(0,o.useResourceActionContext)().refresh,(0,o.useResourceContext)().resource,c().useRef();var t,e=(0,o.useAPIClient)(),n=(0,p.g)().t,r=(t=a.Form.useForm(),function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n,r,o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var i=[],a=!0,u=!1;try{for(o=o.call(t);!(a=(n=o.next()).done)&&(i.push(n.value),i.length!==e);a=!0);}catch(t){u=!0,r=t}finally{try{a||null==o.return||o.return()}finally{if(u)throw r}}return i}}(t,1)||function(t,e){if(t){if("string"==typeof t)return l(t,1);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}}(t,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return{run:function(){return d(function(){return b(this,function(t){switch(t.label){case 0:return r.resetFields(),[4,a.Modal.confirm({title:n("Migrate data"),content:c().createElement(a.Form,{form:r},c().createElement(a.Form.Item,{label:n("Port"),tooltip:n("When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate."),rules:[{required:!0,message:n("Port is required")}],name:"port"},c().createElement(a.InputNumber,{style:{width:"100%"},min:1}))),onOk:d(function(){var t,o,i;return b(this,function(u){switch(u.label){case 0:return[4,e.resource("pm").get({filterByTk:"multi-app"})];case 1:if(!(null==(o=u.sent().data)||null==(t=o.data)?void 0:t.enabled))return a.message.error(n("Multi-app is not enabled, please enable it first")),[2];return[4,r.validateFields()];case 2:return i=u.sent(),[4,e.request({url:"multiApplications:importFromMultiappManager",method:"post",data:{port:i.port}})];case 3:return u.sent(),a.message.success(n("Migrate successfully")),[2]}})})})];case 1:return t.sent(),[2]}})})()}}},_={type:"void","x-component":"div",properties:{displayName:{"x-component":"CollectionField","x-decorator":"FormItem"},name:{"x-component":"CollectionField","x-decorator":"FormItem","x-disabled":"{{ !createOnly }}"},"options.autoStart":{title:(0,i.tval)("Start mode",{ns:"@nocobase/plugin-multi-app-manager"}),"x-component":"Radio.Group","x-decorator":"FormItem",default:!1,enum:[{label:(0,i.tval)("Start on first visit",{ns:"@nocobase/plugin-multi-app-manager"}),value:!1},{label:(0,i.tval)("Start with main application",{ns:"@nocobase/plugin-multi-app-manager"}),value:!0}]},cname:{title:(0,p.W)("Custom domain"),"x-component":"Input","x-decorator":"FormItem"},pinned:{"x-component":"CollectionField","x-decorator":"FormItem"},"options.authManager":{type:"object","x-decorator":"FormItem","x-component":"Fieldset",title:'{{t("Authentication options", { ns: "'.concat(s.A,'" })}}'),properties:{"jwt.secret":{type:"string",title:'{{t("JWT secret", { ns: "'.concat(s.A,'" })}}'),description:'{{t("An independent JWT secret ensures data and session isolation from other applications.", { ns: "'.concat(s.A,'" })}}'),"x-decorator":"FormItem","x-component":"JwtSecretInput"}}}}},A={properties:{start:{type:"void",title:'{{ t("Start") }}',"x-component":"Action.Link","x-component-props":{useAction:function(){var t=(0,o.useResourceActionContext)().refresh,e=(0,o.useResourceContext)(),n=e.resource,r=e.targetKey,i=(0,o.useRecord)()[r];return{run:function(){return d(function(){return b(this,function(e){switch(e.label){case 0:return[4,n.start({filterByTk:i})];case 1:return e.sent(),t(),[2]}})})()}}}}},stop:{type:"void",title:'{{ t("Stop") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Stop')}}",content:"{{t('Are you sure you want to stop it?')}}"},useAction:function(){var t=(0,o.useResourceActionContext)().refresh,e=(0,o.useResourceContext)(),n=e.resource,r=e.targetKey,i=(0,o.useRecord)()[r];return{run:function(){return d(function(){return b(this,function(e){switch(e.label){case 0:return[4,n.stop({filterByTk:i})];case 1:return e.sent(),t(),[2]}})})()}}}}},view:{type:"void","x-component":"AppVisitor","x-component-props":{}},update:{type:"void",title:'{{t("Edit")}}',"x-component":"Action.Link","x-component-props":{},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:"{{ cm.useValuesFromRecord }}"},title:'{{t("Edit")}}',properties:{formSchema:_,footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useUpdateAction }}"}}}}}}}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"},useAction:"{{cm.useDestroyAction}}"}}}},j=function(){var t,e,n=(0,o.useResourceContext)().collection,r=(0,o.useFilterFieldOptions)(n.fields),i=(0,o.useResourceActionContext)();return(0,o.useFilterFieldProps)({options:r,params:(null==(e=i.state)||null==(t=e.params)?void 0:t[0])||i.params,service:i})};function w(){return{type:"object",properties:m({},(0,r.uid)(),{type:"void","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:h,resourceName:"applications",request:{resource:"applications",action:"list",params:{pageSize:50,sort:["-createdAt"],appends:[]}}},"x-component":"CollectionProvider_deprecated","x-component-props":{collection:h},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{filter:{"x-component":"Filter.Action","x-use-component-props":j,default:{$and:[{displayName:{$includes:""}},{name:{$includes:""}}]},title:"{{t('Filter')}}","x-component-props":{icon:"FilterOutlined"},"x-align":"left"},migrateData:{type:"void",title:'{{ t("Migrate data to new multi-app", { ns: "'.concat(s.A,'" }) }}'),"x-component":"Action","x-component-props":{icon:"DeliveredProcedureOutlined",useAction:g}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action","x-component-props":{icon:"DeleteOutlined",useAction:x,confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},create:{type:"void",title:'{{t("Add new")}}',"x-decorator":function(t){return c().createElement(o.SchemaComponentOptions,v(y({},t),{scope:{createOnly:!0}}))},"x-component":"Action","x-component-props":{type:"primary",icon:"PlusOutlined"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:function(t){var e=(0,o.useActionContext)();return(0,o.useRequest)(function(){return Promise.resolve({data:{name:"a_".concat((0,r.uid)())}})},v(y({},t),{refreshDeps:[e.visible]}))}},title:'{{t("Add new")}}',properties:{formSchema:_,footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useCreateAction }}"}}}}}}}}}},table:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{rowKey:"name",rowSelection:{type:"checkbox"},useDataSource:"{{ cm.useDataSourceFromRAC }}"},properties:{displayName:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{displayName:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},name:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{name:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},pinned:{type:"void",title:(0,p.W)("Pin to menu"),"x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{pinned:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},status:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{status:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"Table.Column",properties:{actions:y({type:"void","x-component":"Space","x-component-props":{split:"|"}},A)}}}}}})}}},2785:function(t,e,n){"use strict";n.d(e,{W:function(){return i},g:function(){return o}});var r=n(3238),o=function(){return{t:(0,r.useTranslation)("multi-app-manager").t}},i=function(t){return'{{t("'.concat(t,"\", { ns: 'multi-app-manager' })}}")}},3784:function(t,e,n){"use strict";n.d(e,{A:function(){return r}});var r="multi-app-manager"},7973:function(t,e,n){var r=n(1783),o=n(1012),i=n(9900),a=n(6691),u=n(2018);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},2768:function(t,e,n){var r=n(9896),o=n(2473),i=n(4678),a=n(1240),u=n(4296);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},1725:function(t,e,n){t.exports=n(6369)(n(5031),"Map")},736:function(t,e,n){var r=n(6660),o=n(8472),i=n(5637),a=n(9389),u=n(9804);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},5382:function(t,e,n){var r=n(2768),o=n(3533),i=n(7064),a=n(9955),u=n(6087),c=n(3990);function s(t){var e=this.__data__=new r(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=u,s.prototype.set=c,t.exports=s},5869:function(t,e,n){t.exports=n(5031).Symbol},8930:function(t,e,n){t.exports=n(5031).Uint8Array},7485:function(t){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},4505:function(t,e,n){var r=n(1650),o=n(8497),i=n(6227),a=n(939),u=n(3501),c=n(2855),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),p=!n&&o(t),l=!n&&!p&&a(t),f=!n&&!p&&!l&&c(t),d=n||p||l||f,m=d?r(t.length,String):[],y=m.length;for(var v in t)(e||s.call(t,v))&&!(d&&("length"==v||l&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||u(v,y)))&&m.push(v);return m}},3153:function(t,e,n){var r=n(2544),o=n(3947);t.exports=function(t,e,n){(void 0===n||o(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},5699:function(t,e,n){var r=n(2544),o=n(3947),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},8746:function(t,e,n){var r=n(3947);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return -1}},2544:function(t,e,n){var r=n(6554);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},1315:function(t,e,n){var r=n(2917),o=Object.create;t.exports=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}()},3627:function(t,e,n){t.exports=n(3179)()},4365:function(t,e,n){var r=n(5869),o=n(7043),i=n(5283),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},8719:function(t,e,n){var r=n(4365),o=n(5620);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},9930:function(t,e,n){var r=n(3098),o=n(8754),i=n(2917),a=n(1304),u=/^\[object .+?Constructor\]$/,c=Object.prototype,s=Function.prototype.toString,p=c.hasOwnProperty,l=RegExp("^"+s.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?l:u).test(a(t))}},7707:function(t,e,n){var r=n(4365),o=n(6613),i=n(5620),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},3352:function(t,e,n){var r=n(2917),o=n(2947),i=n(5753),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=o(t),n=[];for(var u in t)"constructor"==u&&(e||!a.call(t,u))||n.push(u);return n}},5580:function(t,e,n){var r=n(5382),o=n(3153),i=n(3627),a=n(2669),u=n(2917),c=n(9403),s=n(9341);t.exports=function t(e,n,p,l,f){e!==n&&i(n,function(i,c){if(f||(f=new r),u(i))a(e,n,c,p,t,l,f);else{var d=l?l(s(e,c),i,c+"",e,n,f):void 0;void 0===d&&(d=i),o(e,c,d)}},c)}},2669:function(t,e,n){var r=n(3153),o=n(6550),i=n(7173),a=n(3096),u=n(1931),c=n(8497),s=n(6227),p=n(5559),l=n(939),f=n(3098),d=n(2917),m=n(4087),y=n(2855),v=n(9341),b=n(5079);t.exports=function(t,e,n,h,x,g,_){var A=v(t,n),j=v(e,n),w=_.get(j);if(w)return void r(t,n,w);var O=g?g(A,j,n+"",t,e,_):void 0,S=void 0===O;if(S){var P=s(j),C=!P&&l(j),k=!P&&!C&&y(j);O=j,P||C||k?s(A)?O=A:p(A)?O=a(A):C?(S=!1,O=o(j,!0)):k?(S=!1,O=i(j,!0)):O=[]:m(j)||c(j)?(O=A,c(A)?O=b(A):(!d(A)||f(A))&&(O=u(j))):S=!1}S&&(_.set(j,O),x(O,j,h,g,_),_.delete(j)),r(t,n,O)}},1229:function(t,e,n){var r=n(9974),o=n(2478),i=n(8286);t.exports=function(t,e){return i(o(t,e,r),t+"")}},1792:function(t,e,n){var r=n(6710),o=n(6554),i=n(9974);t.exports=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i},1650:function(t){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},8611:function(t){t.exports=function(t){return function(e){return t(e)}}},2658:function(t,e,n){var r=n(8930);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},6550:function(t,e,n){t=n.nmd(t);var r=n(5031),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}},7173:function(t,e,n){var r=n(2658);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},3096:function(t){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},6734:function(t,e,n){var r=n(5699),o=n(2544);t.exports=function(t,e,n,i){var a=!n;n||(n={});for(var u=-1,c=e.length;++u<c;){var s=e[u],p=i?i(n[s],t[s],s,n,t):void 0;void 0===p&&(p=t[s]),a?o(n,s,p):r(n,s,p)}return n}},3823:function(t,e,n){t.exports=n(5031)["__core-js_shared__"]},9354:function(t,e,n){var r=n(1229),o=n(9131);t.exports=function(t){return r(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}},3179:function(t){t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===n(i[c],c,i))break}return e}}},6554:function(t,e,n){var r=n(6369);t.exports=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},5274:function(t,e,n){t.exports="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},9623:function(t,e,n){var r=n(9005);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},6369:function(t,e,n){var r=n(9930),o=n(4502);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},5918:function(t,e,n){t.exports=n(6942)(Object.getPrototypeOf,Object)},7043:function(t,e,n){var r=n(5869),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}},4502:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},1783:function(t,e,n){var r=n(8163);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},1012:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=+!!e,e}},9900:function(t,e,n){var r=n(8163),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},6691:function(t,e,n){var r=n(8163),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},2018:function(t,e,n){var r=n(8163);t.exports=function(t,e){var n=this.__data__;return this.size+=+!this.has(t),n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},1931:function(t,e,n){var r=n(1315),o=n(5918),i=n(2947);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:r(o(t))}},3501:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?0x1fffffffffffff:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},9131:function(t,e,n){var r=n(3947),o=n(654),i=n(3501),a=n(2917);t.exports=function(t,e,n){if(!a(n))return!1;var u=typeof e;return("number"==u?!!(o(n)&&i(e,n.length)):"string"==u&&e in n)&&r(n[e],t)}},9005:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},8754:function(t,e,n){var r,o=n(3823),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},2947:function(t){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},9896:function(t){t.exports=function(){this.__data__=[],this.size=0}},2473:function(t,e,n){var r=n(8746),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},4678:function(t,e,n){var r=n(8746);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},1240:function(t,e,n){var r=n(8746);t.exports=function(t){return r(this.__data__,t)>-1}},4296:function(t,e,n){var r=n(8746);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},6660:function(t,e,n){var r=n(7973),o=n(2768),i=n(1725);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},8472:function(t,e,n){var r=n(9623);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=+!!e,e}},5637:function(t,e,n){var r=n(9623);t.exports=function(t){return r(this,t).get(t)}},9389:function(t,e,n){var r=n(9623);t.exports=function(t){return r(this,t).has(t)}},9804:function(t,e,n){var r=n(9623);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=+(n.size!=o),this}},8163:function(t,e,n){t.exports=n(6369)(Object,"create")},5753:function(t){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},1378:function(t,e,n){t=n.nmd(t);var r=n(5274),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,u=function(){try{var t=i&&i.require&&i.require("util").types;if(t)return t;return a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u},5283:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},6942:function(t){t.exports=function(t,e){return function(n){return t(e(n))}}},2478:function(t,e,n){var r=n(7485),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),c=Array(u);++a<u;)c[a]=i[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=i[a];return s[e]=n(c),r(t,this,s)}}},5031:function(t,e,n){var r=n(5274),o="object"==typeof self&&self&&self.Object===Object&&self;t.exports=r||o||Function("return this")()},9341:function(t){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},8286:function(t,e,n){var r=n(1792);t.exports=n(1358)(r)},1358:function(t){var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},3533:function(t,e,n){var r=n(2768);t.exports=function(){this.__data__=new r,this.size=0}},7064:function(t){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},9955:function(t){t.exports=function(t){return this.__data__.get(t)}},6087:function(t){t.exports=function(t){return this.__data__.has(t)}},3990:function(t,e,n){var r=n(2768),o=n(1725),i=n(736);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},1304:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},6710:function(t){t.exports=function(t){return function(){return t}}},3947:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},9974:function(t){t.exports=function(t){return t}},8497:function(t,e,n){var r=n(8719),o=n(5620),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable;t.exports=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!u.call(t,"callee")}},6227:function(t){t.exports=Array.isArray},654:function(t,e,n){var r=n(3098),o=n(6613);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},5559:function(t,e,n){var r=n(654),o=n(5620);t.exports=function(t){return o(t)&&r(t)}},939:function(t,e,n){t=n.nmd(t);var r=n(5031),o=n(3863),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,u=a&&a.exports===i?r.Buffer:void 0,c=u?u.isBuffer:void 0;t.exports=c||o},3098:function(t,e,n){var r=n(4365),o=n(2917);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},6613:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}},2917:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},5620:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},4087:function(t,e,n){var r=n(4365),o=n(5918),i=n(5620),a=Object.prototype,u=Function.prototype.toString,c=a.hasOwnProperty,s=u.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==s}},2855:function(t,e,n){var r=n(7707),o=n(8611),i=n(1378),a=i&&i.isTypedArray;t.exports=a?o(a):r},9403:function(t,e,n){var r=n(4505),o=n(3352),i=n(654);t.exports=function(t){return i(t)?r(t,!0):o(t)}},9782:function(t,e,n){var r=n(5580);t.exports=n(9354)(function(t,e,n){r(t,e,n)})},3863:function(t){t.exports=function(){return!1}},5079:function(t,e,n){var r=n(6734),o=n(9403);t.exports=function(t){return r(t,o(t))}},3581:function(t){t.exports=function(t,e){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(t,e),e}},3505:function(t){"use strict";t.exports=r},8875:function(t){"use strict";t.exports=a},3772:function(t){"use strict";t.exports=c},7584:function(t){"use strict";t.exports=o},2721:function(t){"use strict";t.exports=u},8202:function(t){"use strict";t.exports=i},8156:function(t){"use strict";t.exports=n},3238:function(e){"use strict";e.exports=t},6128:function(t){"use strict";t.exports=e}},v={};function b(t){var e=v[t];if(void 0!==e)return e.exports;var n=v[t]={id:t,loaded:!1,exports:{}};return y[t](n,n.exports,b),n.loaded=!0,n.exports}b.m=y,b.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return b.d(e,{a:e}),e},b.d=function(t,e){for(var n in e)b.o(e,n)&&!b.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},b.f={},b.e=function(t){return Promise.all(Object.keys(b.f).reduce(function(e,n){return b.f[n](t,e),e},[]))},b.u=function(t){return"db3a142b120d6553.js"},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}}(),b.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s={},p="@nocobase/plugin-multi-app-manager:",b.l=function(t,e,n,r){if(s[t])return void s[t].push(e);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var c=a[u];if(c.getAttribute("src")==t||c.getAttribute("data-webpack")==p+n){o=c;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,b.nc&&o.setAttribute("nonce",b.nc),o.setAttribute("data-webpack",p+n),o.src=t),s[t]=[e];var l=function(e,n){o.onerror=o.onload=null,clearTimeout(f);var r=s[t];if(delete s[t],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(t){return t(n)}),e)return e(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},b.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},b.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},(l=window.__nocobase_public_path__||"/").endsWith("/")||(l+="/"),b.p=l+"static/plugins/@nocobase/plugin-multi-app-manager/dist/client/",f={909:0},b.f.j=function(t,e){var n=b.o(f,t)?f[t]:void 0;if(0!==n)if(n)e.push(n[2]);else{var r=new Promise(function(e,r){n=f[t]=[e,r]});e.push(n[2]=r);var o=b.p+b.u(t),i=Error();b.l(o,function(e){if(b.o(f,t)&&(0!==(n=f[t])&&(f[t]=void 0),n)){var r=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src;i.message="Loading chunk "+t+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+t,t)}},d=function(t,e){var n,r,o=e[0],i=e[1],a=e[2],u=0;if(o.some(function(t){return 0!==f[t]})){for(n in i)b.o(i,n)&&(b.m[n]=i[n]);a&&a(b)}for(t&&t(e);u<o.length;u++)r=o[u],b.o(f,r)&&f[r]&&f[r][0](),f[r]=0},(m=self.webpackChunk_nocobase_plugin_multi_app_manager=self.webpackChunk_nocobase_plugin_multi_app_manager||[]).forEach(d.bind(null,0)),m.push=d.bind(null,m.push.bind(m));var h={};return!function(){"use strict";b.r(h),b.d(h,{PluginMultiAppManagerClient:function(){return S},formSchema:function(){return f.kn},default:function(){return P},tableActionColumnSchema:function(){return f.vh}});var t=b(3772),e=b(2721),n=b(8156),r=b.n(n),o=b(6128),i=b(3505),a=(0,i.connect)(e.Input,(0,i.mapReadPretty)(function(e){var n=(0,t.useApp)(),o=e.value&&r().createElement("a",{target:"_blank",href:n.getRouteUrl("/apps/".concat(e.value,"/admin")),rel:"noreferrer"},e.value);return r().createElement("div",{style:e.style},e.addonBefore,e.prefix,o,e.suffix,e.addonAfter)})),u=(0,b(8202).createStyles)(function(t){return{button:{color:t.token.colorTextHeaderMenu+" !important"}}}),c=b(2785);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var p=function(){var n,i=u().styles,a=(0,t.useRequest)({resource:"applications",action:"listPinned"},{manual:!0}),p=a.data,l=a.run,f=(0,c.g)().t,d=(0,t.useApp)(),m=((function(t){if(Array.isArray(t))return s(t)})(n=((null==p?void 0:p.data)||[]).map(function(t){var e=d.getRouteUrl("/apps/".concat(t.name,"/admin/"));return t.cname&&(e="//".concat(t.cname)),{key:t.name,label:r().createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},t.displayName||t.name)}}))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return s(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([{key:".manager",label:r().createElement(o.Link,{to:d.pluginSettingsManager.getRoutePath("multi-app-manager")},f("Manage applications"))}]);return r().createElement(e.Dropdown,{onOpenChange:function(t){l()},menu:{items:m}},r().createElement(e.Button,{className:i.button,title:"Apps",icon:r().createElement(t.Icon,{type:"AppstoreOutlined"})}))},l=function(e){return r().createElement(t.PinnedPluginListProvider,{items:{}},r().createElement(t.SchemaComponentOptions,{components:{MultiAppManager:p,AppNameInput:a}},e.children))},f=b(9570),d=b(9782),m=b.n(d),y=b(3784),v=b(3581);function x(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){n(t);return}u.done?e(c):Promise.resolve(c).then(r,o)}function g(t,e,n){return(g=w()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&A(o,n.prototype),o}).apply(null,arguments)}function _(t){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function A(t,e){return(A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function j(t){var e="function"==typeof Map?new Map:void 0;return(j=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return g(t,arguments,_(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),A(n,t)})(t)}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(w=function(){return!!t})()}var O=(0,t.lazy)(function(){return v("imported_-2qibu4_component",b.e("959").then(b.bind(b,7101)))},"AppManager").AppManager,S=function(t){var e;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function n(){var t,e;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,e=arguments,t=_(t),function(t,e){var n;if(e&&("object"==((n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof e))return e;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(this,w()?Reflect.construct(t,e||[],_(this).constructor):t.apply(this,e))}return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&A(n,t),e=[{key:"load",value:function(){var t,e=this;return(t=function(){return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var c=[i,u];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){return e.app.use(l),e.app.pluginSettingsManager.add(y.A,{title:'{{t("Multi-app manager (deprecated)", { ns: "'.concat(y.A,'" })}}'),icon:"AppstoreOutlined",Component:O,sort:1e3,aclSnippet:"pm.multi-app-manager.applications"}),[2]})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){x(i,r,o,a,u,"next",t)}function u(t){x(i,r,o,a,u,"throw",t)}a(void 0)})})()}},{key:"extendFormSchema",value:function(t){m()(f.kn,t)}}],function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,e),n}(j(t.Plugin)),P=S}(),h}()});
10
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@ant-design/icons"),require("react"),require("antd"),require("antd-style"),require("@nocobase/utils/client"),require("@formily/react"),require("react-router-dom"),require("@formily/shared"),require("react-i18next"),require("@nocobase/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-multi-app-manager",["@ant-design/icons","react","antd","antd-style","@nocobase/utils/client","@formily/react","react-router-dom","@formily/shared","react-i18next","@nocobase/client"],e):"object"==typeof exports?exports["@nocobase/plugin-multi-app-manager"]=e(require("@ant-design/icons"),require("react"),require("antd"),require("antd-style"),require("@nocobase/utils/client"),require("@formily/react"),require("react-router-dom"),require("@formily/shared"),require("react-i18next"),require("@nocobase/client")):t["@nocobase/plugin-multi-app-manager"]=e(t["@ant-design/icons"],t.react,t.antd,t["antd-style"],t["@nocobase/utils/client"],t["@formily/react"],t["react-router-dom"],t["@formily/shared"],t["react-i18next"],t["@nocobase/client"])}(self,function(t,e,n,r,o,i,a,u,c,s){return function(){var l,p,f,d={5072:function(t,e,n){var r=n(9763),o=n(3879),i=n(8150),a=n(7106),u=n(938);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},5332:function(t,e,n){var r=n(3023),o=n(4747),i=n(9978),a=n(6734),u=n(4710);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},16:function(t,e,n){t.exports=n(3789)(n(5036),"Map")},1708:function(t,e,n){var r=n(615),o=n(9859),i=n(5170),a=n(8470),u=n(7646);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},9310:function(t,e,n){var r=n(5332),o=n(9333),i=n(1893),a=n(9676),u=n(6536),c=n(3336);function s(t){var e=this.__data__=new r(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=u,s.prototype.set=c,t.exports=s},7432:function(t,e,n){t.exports=n(5036).Symbol},181:function(t,e,n){t.exports=n(5036).Uint8Array},9822:function(t){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},6272:function(t,e,n){var r=n(8355),o=n(7933),i=n(9464),a=n(8609),u=n(1574),c=n(264),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),l=!n&&o(t),p=!n&&!l&&a(t),f=!n&&!l&&!p&&c(t),d=n||l||p||f,m=d?r(t.length,String):[],y=m.length;for(var v in t)(e||s.call(t,v))&&!(d&&("length"==v||p&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||u(v,y)))&&m.push(v);return m}},3688:function(t,e,n){var r=n(6571),o=n(9679);t.exports=function(t,e,n){(void 0===n||o(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},6312:function(t,e,n){var r=n(6571),o=n(9679),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},5096:function(t,e,n){var r=n(9679);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return -1}},6571:function(t,e,n){var r=n(6514);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},6309:function(t,e,n){var r=n(6130),o=Object.create;t.exports=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}()},4350:function(t,e,n){t.exports=n(2294)()},6077:function(t,e,n){var r=n(7432),o=n(4444),i=n(3371),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},5301:function(t,e,n){var r=n(6077),o=n(4189);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},9950:function(t,e,n){var r=n(6553),o=n(3909),i=n(6130),a=n(2760),u=/^\[object .+?Constructor\]$/,c=Object.prototype,s=Function.prototype.toString,l=c.hasOwnProperty,p=RegExp("^"+s.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:u).test(a(t))}},8912:function(t,e,n){var r=n(6077),o=n(5841),i=n(4189),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},9262:function(t,e,n){var r=n(6130),o=n(2632),i=n(312),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=o(t),n=[];for(var u in t)"constructor"==u&&(e||!a.call(t,u))||n.push(u);return n}},7745:function(t,e,n){var r=n(9310),o=n(3688),i=n(4350),a=n(5243),u=n(6130),c=n(7798),s=n(8837);t.exports=function t(e,n,l,p,f){e!==n&&i(n,function(i,c){if(f||(f=new r),u(i))a(e,n,c,l,t,p,f);else{var d=p?p(s(e,c),i,c+"",e,n,f):void 0;void 0===d&&(d=i),o(e,c,d)}},c)}},5243:function(t,e,n){var r=n(3688),o=n(1733),i=n(1058),a=n(5240),u=n(6082),c=n(7933),s=n(9464),l=n(8796),p=n(8609),f=n(6553),d=n(6130),m=n(6446),y=n(264),v=n(8837),b=n(1941);t.exports=function(t,e,n,h,x,g,_){var w=v(t,n),j=v(e,n),A=_.get(j);if(A)return void r(t,n,A);var O=g?g(w,j,n+"",t,e,_):void 0,S=void 0===O;if(S){var C=s(j),P=!C&&p(j),k=!C&&!P&&y(j);O=j,C||P||k?s(w)?O=w:l(w)?O=a(w):P?(S=!1,O=o(j,!0)):k?(S=!1,O=i(j,!0)):O=[]:m(j)||c(j)?(O=w,c(w)?O=b(w):(!d(w)||f(w))&&(O=u(j))):S=!1}S&&(_.set(j,O),x(O,j,h,g,_),_.delete(j)),r(t,n,O)}},8339:function(t,e,n){var r=n(515),o=n(4088),i=n(6218);t.exports=function(t,e){return i(o(t,e,r),t+"")}},5193:function(t,e,n){var r=n(4961),o=n(6514),i=n(515);t.exports=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i},8355:function(t){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},7746:function(t){t.exports=function(t){return function(e){return t(e)}}},5752:function(t,e,n){var r=n(181);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},1733:function(t,e,n){t=n.nmd(t);var r=n(5036),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}},1058:function(t,e,n){var r=n(5752);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},5240:function(t){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},5634:function(t,e,n){var r=n(6312),o=n(6571);t.exports=function(t,e,n,i){var a=!n;n||(n={});for(var u=-1,c=e.length;++u<c;){var s=e[u],l=i?i(n[s],t[s],s,n,t):void 0;void 0===l&&(l=t[s]),a?o(n,s,l):r(n,s,l)}return n}},4780:function(t,e,n){t.exports=n(5036)["__core-js_shared__"]},1094:function(t,e,n){var r=n(8339),o=n(4661);t.exports=function(t){return r(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}},2294:function(t){t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===n(i[c],c,i))break}return e}}},6514:function(t,e,n){var r=n(3789);t.exports=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},8565:function(t,e,n){t.exports="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},5930:function(t,e,n){var r=n(29);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},3789:function(t,e,n){var r=n(9950),o=n(8869);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},4754:function(t,e,n){t.exports=n(2344)(Object.getPrototypeOf,Object)},4444:function(t,e,n){var r=n(7432),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}},8869:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},9763:function(t,e,n){var r=n(267);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},3879:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=!!e,e}},8150:function(t,e,n){var r=n(267),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},7106:function(t,e,n){var r=n(267),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},938:function(t,e,n){var r=n(267);t.exports=function(t,e){var n=this.__data__;return this.size+=+!this.has(t),n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},6082:function(t,e,n){var r=n(6309),o=n(4754),i=n(2632);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:r(o(t))}},1574:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?0x1fffffffffffff:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},4661:function(t,e,n){var r=n(9679),o=n(623),i=n(1574),a=n(6130);t.exports=function(t,e,n){if(!a(n))return!1;var u=typeof e;return("number"==u?!!(o(n)&&i(e,n.length)):"string"==u&&e in n)&&r(n[e],t)}},29:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},3909:function(t,e,n){var r,o=n(4780),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},2632:function(t){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},3023:function(t){t.exports=function(){this.__data__=[],this.size=0}},4747:function(t,e,n){var r=n(5096),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},9978:function(t,e,n){var r=n(5096);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},6734:function(t,e,n){var r=n(5096);t.exports=function(t){return r(this.__data__,t)>-1}},4710:function(t,e,n){var r=n(5096);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},615:function(t,e,n){var r=n(5072),o=n(5332),i=n(16);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},9859:function(t,e,n){var r=n(5930);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=!!e,e}},5170:function(t,e,n){var r=n(5930);t.exports=function(t){return r(this,t).get(t)}},8470:function(t,e,n){var r=n(5930);t.exports=function(t){return r(this,t).has(t)}},7646:function(t,e,n){var r=n(5930);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=+(n.size!=o),this}},267:function(t,e,n){t.exports=n(3789)(Object,"create")},312:function(t){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},1172:function(t,e,n){t=n.nmd(t);var r=n(8565),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,u=function(){try{var t=i&&i.require&&i.require("util").types;if(t)return t;return a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u},3371:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},2344:function(t){t.exports=function(t,e){return function(n){return t(e(n))}}},4088:function(t,e,n){var r=n(9822),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),c=Array(u);++a<u;)c[a]=i[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=i[a];return s[e]=n(c),r(t,this,s)}}},5036:function(t,e,n){var r=n(8565),o="object"==typeof self&&self&&self.Object===Object&&self;t.exports=r||o||Function("return this")()},8837:function(t){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},6218:function(t,e,n){var r=n(5193);t.exports=n(5366)(r)},5366:function(t){var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},9333:function(t,e,n){var r=n(5332);t.exports=function(){this.__data__=new r,this.size=0}},1893:function(t){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},9676:function(t){t.exports=function(t){return this.__data__.get(t)}},6536:function(t){t.exports=function(t){return this.__data__.has(t)}},3336:function(t,e,n){var r=n(5332),o=n(16),i=n(1708);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},2760:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},4961:function(t){t.exports=function(t){return function(){return t}}},9679:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},515:function(t){t.exports=function(t){return t}},7933:function(t,e,n){var r=n(5301),o=n(4189),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable;t.exports=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!u.call(t,"callee")}},9464:function(t){t.exports=Array.isArray},623:function(t,e,n){var r=n(6553),o=n(5841);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},8796:function(t,e,n){var r=n(623),o=n(4189);t.exports=function(t){return o(t)&&r(t)}},8609:function(t,e,n){t=n.nmd(t);var r=n(5036),o=n(8042),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,u=a&&a.exports===i?r.Buffer:void 0,c=u?u.isBuffer:void 0;t.exports=c||o},6553:function(t,e,n){var r=n(6077),o=n(6130);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5841:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}},6130:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},4189:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},6446:function(t,e,n){var r=n(6077),o=n(4754),i=n(4189),a=Object.prototype,u=Function.prototype.toString,c=a.hasOwnProperty,s=u.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==s}},264:function(t,e,n){var r=n(8912),o=n(7746),i=n(1172),a=i&&i.isTypedArray;t.exports=a?o(a):r},7798:function(t,e,n){var r=n(6272),o=n(9262),i=n(623);t.exports=function(t){return i(t)?r(t,!0):o(t)}},6265:function(t,e,n){var r=n(7745);t.exports=n(1094)(function(t,e,n){r(t,e,n)})},8042:function(t){t.exports=function(){return!1}},1941:function(t,e,n){var r=n(5634),o=n(7798);t.exports=function(t){return r(t,o(t))}},7197:function(t,e,n){"use strict";n.d(e,{_w:function(){return E},E$:function(){return C},sX:function(){return P}});var r=n(166),o=n(3342),i=n(7768),a=n(2059),u=n(9155),c=n.n(u),s=n(6944),l=n(124),p=n(7375);function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){n(t);return}u.done?e(c):Promise.resolve(c).then(r,o)}function m(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){d(i,r,o,a,u,"next",t)}function u(t){d(i,r,o,a,u,"throw",t)}a(void 0)})}}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n,r,o=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var i=[],a=!0,u=!1;try{for(o=o.call(t);!(a=(n=o.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,r=t}finally{try{a||null==o.return||o.return()}finally{if(u)throw r}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}}(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var s=[u,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}}var b=function(t){var e=t.open,n=t.setOpen,r=y(a.Form.useForm(),1)[0],i=(0,l.A)().t,s=(0,o.useAPIClient)(),p=(0,o.useResourceActionContext)(),f=p.state,d=p.setState,b=y((0,u.useState)([]),2),h=b[0],x=b[1],g=y((0,u.useState)(!1),2),_=g[0],w=g[1];return(0,o.useRequest)(function(){return s.request({url:"appEnvironments:list"}).then(function(t){var e;return(null==(e=t.data)?void 0:e.data)||[]})},{onSuccess:function(t){var e=t.filter(function(t){return t.available});e.length&&x(e.map(function(t){var e=t.name;return{value:e,label:e}}))}}),c().createElement(a.Modal,{title:i("Migrate to app supervisor"),closable:!0,open:e,footer:[c().createElement(a.Button,{key:"cancel",onClick:function(){n(!1)}},i("Cancel")),c().createElement(a.Button,{key:"submit",type:"primary",loading:_,onClick:function(){return m(function(){var t;return v(this,function(e){switch(e.label){case 0:if(!(null==f||null==(t=f.selectedRowKeys)?void 0:t.length))return[2,a.message.error(i("Please select the records you want to migrate"))];return w(!0),[4,r.validateFields()];case 1:e.sent(),e.label=2;case 2:return e.trys.push([2,,4,5]),[4,s.resource("apps").migrate({values:{appNames:null==f?void 0:f.selectedRowKeys,environments:r.getFieldValue("environments")}})];case 3:return e.sent(),[3,5];case 4:return null==d||d({selectedRowKeys:[]}),n(!1),w(!1),[7];case 5:return[2]}})})()}},i("Submit"))]},c().createElement(a.Form,{form:r,layout:"vertical",colon:!0},c().createElement(a.Form.Item,{label:i("Environments"),name:"environments",rules:[{required:!0}]},c().createElement(a.Select,{options:h,mode:"multiple"}))))},h=function(){var t=(0,l.A)().t,e=(0,o.useAPIClient)(),n=(0,o.useResourceActionContext)().state,r=y((0,u.useState)(!1),2),i=r[0],s=r[1],f=(0,o.useRequest)(function(){return e.silent().resource("pm").get({filterByTk:"app-supervisor"}).then(function(t){var e;return null==t||null==(e=t.data)?void 0:e.data})}),d=f.loading,h=f.data;return!d&&(null==h?void 0:h.enabled)?c().createElement(c().Fragment,null,c().createElement(a.Button,{icon:c().createElement(p.CloudSyncOutlined,null),onClick:function(){return m(function(){var e;return v(this,function(r){return(null==n||null==(e=n.selectedRowKeys)?void 0:e.length)?(s(!0),[2]):[2,a.message.error(t("Please select the records you want to migrate"))]})})()}},t("Migrate to app supervisor")),c().createElement(b,{open:i,setOpen:s})):null};function x(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){n(t);return}u.done?e(c):Promise.resolve(c).then(r,o)}function g(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){x(i,r,o,a,u,"next",t)}function u(t){x(i,r,o,a,u,"throw",t)}a(void 0)})}}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){_(t,e,n[e])})}return t}function j(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(t){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e.push.apply(e,n)}return e})(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}function A(t,e){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var s=[u,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}}var O={name:"applications",targetKey:"name",fields:[{type:"uid",name:"name",primaryKey:!0,prefix:"a",interface:"input",uiSchema:{type:"string",title:(0,l.Q)("App ID"),required:!0,"x-component":"Input","x-validator":"uid"}},{type:"string",name:"displayName",interface:"input",uiSchema:{type:"string",title:(0,l.Q)("App display name"),required:!0,"x-component":"Input"}},{type:"string",name:"pinned",interface:"checkbox",uiSchema:{type:"boolean","x-content":(0,l.Q)("Pin to menu"),"x-component":"Checkbox"}},{type:"string",name:"status",interface:"radioGroup",defaultValue:"pending",uiSchema:{type:"string",title:(0,l.Q)("App status"),enum:[{label:"Preparing",value:"preparing"},{label:"Initializing",value:"initializing"},{label:"Initialized",value:"initialized"},{label:"Running",value:"running"},{label:"Commanding",value:"commanding"},{label:"Stopped",value:"stopped"},{label:"Error",value:"error"},{label:"Not found",value:"not_found"}],"x-component":"Radio.Group"}}]},S=function(){var t=(0,o.useResourceActionContext)(),e=t.state,n=t.setState,r=t.refresh,i=(0,o.useResourceContext)().resource;return{run:function(){return g(function(){return A(this,function(t){switch(t.label){case 0:return[4,i.destroy({filterByTk:(null==e?void 0:e.selectedRowKeys)||[]})];case 1:return t.sent(),null==n||n({selectedRowKeys:[]}),r(),[2]}})})()}}},C={type:"void","x-component":"div",properties:{displayName:{"x-component":"CollectionField","x-decorator":"FormItem"},name:{"x-component":"CollectionField","x-decorator":"FormItem","x-disabled":"{{ !createOnly }}"},"options.autoStart":{title:(0,i.tval)("Start mode",{ns:"@nocobase/plugin-multi-app-manager"}),"x-component":"Radio.Group","x-decorator":"FormItem",default:!1,enum:[{label:(0,i.tval)("Start on first visit",{ns:"@nocobase/plugin-multi-app-manager"}),value:!1},{label:(0,i.tval)("Start with main application",{ns:"@nocobase/plugin-multi-app-manager"}),value:!0}]},cname:{title:(0,l.Q)("Custom domain"),"x-component":"Input","x-decorator":"FormItem"},pinned:{"x-component":"CollectionField","x-decorator":"FormItem"},"options.authManager":{type:"object","x-decorator":"FormItem","x-component":"Fieldset",title:'{{t("Authentication options", { ns: "'.concat(s.C,'" })}}'),properties:{"jwt.secret":{type:"string",title:'{{t("JWT secret", { ns: "'.concat(s.C,'" })}}'),description:'{{t("An independent JWT secret ensures data and session isolation from other applications.", { ns: "'.concat(s.C,'" })}}'),"x-decorator":"FormItem","x-component":"JwtSecretInput"}}}}},P={properties:{start:{type:"void",title:'{{ t("Start") }}',"x-component":"Action.Link","x-component-props":{useAction:function(){var t=(0,o.useResourceActionContext)().refresh,e=(0,o.useResourceContext)(),n=e.resource,r=e.targetKey,i=(0,o.useRecord)()[r];return{run:function(){return g(function(){return A(this,function(e){switch(e.label){case 0:return[4,n.start({filterByTk:i})];case 1:return e.sent(),t(),[2]}})})()}}}}},stop:{type:"void",title:'{{ t("Stop") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Stop')}}",content:"{{t('Are you sure you want to stop it?')}}"},useAction:function(){var t=(0,o.useResourceActionContext)().refresh,e=(0,o.useResourceContext)(),n=e.resource,r=e.targetKey,i=(0,o.useRecord)()[r];return{run:function(){return g(function(){return A(this,function(e){switch(e.label){case 0:return[4,n.stop({filterByTk:i})];case 1:return e.sent(),t(),[2]}})})()}}}}},view:{type:"void","x-component":"AppVisitor","x-component-props":{}},update:{type:"void",title:'{{t("Edit")}}',"x-component":"Action.Link","x-component-props":{},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:"{{ cm.useValuesFromRecord }}"},title:'{{t("Edit")}}',properties:{formSchema:C,footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useUpdateAction }}"}}}}}}}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"},useAction:"{{cm.useDestroyAction}}"}}}},k=function(){var t,e,n=(0,o.useResourceContext)().collection,r=(0,o.useFilterFieldOptions)(n.fields),i=(0,o.useResourceActionContext)();return(0,o.useFilterFieldProps)({options:r,params:(null==(e=i.state)||null==(t=e.params)?void 0:t[0])||i.params,service:i})};function E(){return{type:"object",properties:_({},(0,r.uid)(),{type:"void","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:O,resourceName:"applications",request:{resource:"applications",action:"list",params:{pageSize:50,sort:["-createdAt"],appends:[]}}},"x-component":"CollectionProvider_deprecated","x-component-props":{collection:O},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{filter:{"x-component":"Filter.Action","x-use-component-props":k,default:{$and:[{displayName:{$includes:""}},{name:{$includes:""}}]},title:"{{t('Filter')}}","x-component-props":{icon:"FilterOutlined"},"x-align":"left"},migrate:{type:"void","x-component":h},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action","x-component-props":{icon:"DeleteOutlined",useAction:S,confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},create:{type:"void",title:'{{t("Add new")}}',"x-decorator":function(t){return c().createElement(o.SchemaComponentOptions,j(w({},t),{scope:{createOnly:!0}}))},"x-component":"Action","x-component-props":{type:"primary",icon:"PlusOutlined"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:function(t){var e=(0,o.useActionContext)();return(0,o.useRequest)(function(){return Promise.resolve({data:{name:"a_".concat((0,r.uid)())}})},j(w({},t),{refreshDeps:[e.visible]}))}},title:'{{t("Add new")}}',properties:{formSchema:C,footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useCreateAction }}"}}}}}}}}}},table:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{rowKey:"name",rowSelection:{type:"checkbox"},useDataSource:"{{ cm.useDataSourceFromRAC }}"},properties:{displayName:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{displayName:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},name:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{name:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},pinned:{type:"void",title:(0,l.Q)("Pin to menu"),"x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{pinned:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},status:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{status:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"Table.Column",properties:{actions:w({type:"void","x-component":"Space","x-component-props":{split:"|"}},P)}}}}}})}}},124:function(t,e,n){"use strict";n.d(e,{A:function(){return o},Q:function(){return i}});var r=n(5953),o=function(){return{t:(0,r.useTranslation)("multi-app-manager").t}},i=function(t){return'{{t("'.concat(t,"\", { ns: 'multi-app-manager' })}}")}},6944:function(t,e,n){"use strict";n.d(e,{C:function(){return r}});var r="multi-app-manager"},7375:function(e){"use strict";e.exports=t},5230:function(t){"use strict";t.exports=i},166:function(t){"use strict";t.exports=u},3342:function(t){"use strict";t.exports=s},7768:function(t){"use strict";t.exports=o},2059:function(t){"use strict";t.exports=n},3235:function(t){"use strict";t.exports=r},9155:function(t){"use strict";t.exports=e},5953:function(t){"use strict";t.exports=c},4442:function(t){"use strict";t.exports=a}},m={};function y(t){var e=m[t];if(void 0!==e)return e.exports;var n=m[t]={id:t,loaded:!1,exports:{}};return d[t](n,n.exports,y),n.loaded=!0,n.exports}y.m=d,y.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return y.d(e,{a:e}),e},y.d=function(t,e){for(var n in e)y.o(e,n)&&!y.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},y.f={},y.e=function(t){return Promise.all(Object.keys(y.f).reduce(function(e,n){return y.f[n](t,e),e},[]))},y.u=function(t){return"e9551d3b66931c0a.js"},y.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}}(),y.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},v={},y.l=function(t,e,n,r){if(v[t])return void v[t].push(e);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var c=a[u];if(c.getAttribute("src")==t||c.getAttribute("data-rspack")=="@nocobase/plugin-multi-app-manager:"+n){o=c;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,y.nc&&o.setAttribute("nonce",y.nc),o.setAttribute("data-rspack","@nocobase/plugin-multi-app-manager:"+n),o.src=t),v[t]=[e];var s=function(e,n){o.onerror=o.onload=null,clearTimeout(l);var r=v[t];if(delete v[t],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(t){return t(n)}),e)return e(n)},l=setTimeout(s.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=s.bind(null,o.onerror),o.onload=s.bind(null,o.onload),i&&document.head.appendChild(o)},y.r=function(t){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},y.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},y.g.importScripts&&(b=y.g.location+"");var v,b,h=y.g.document;if(!b&&h&&(h.currentScript&&"SCRIPT"===h.currentScript.tagName.toUpperCase()&&(b=h.currentScript.src),!b)){var x=h.getElementsByTagName("script");if(x.length)for(var g=x.length-1;g>-1&&(!b||!/^http(s?):/.test(b));)b=x[g--].src}if(!b)throw Error("Automatic publicPath is not supported in this browser");y.p=b.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l={889:0},y.f.j=function(t,e){var n=y.o(l,t)?l[t]:void 0;if(0!==n)if(n)e.push(n[2]);else{var r=new Promise(function(e,r){n=l[t]=[e,r]});e.push(n[2]=r);var o=y.p+y.u(t),i=Error();y.l(o,function(e){if(y.o(l,t)&&(0!==(n=l[t])&&(l[t]=void 0),n)){var r=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src;i.message="Loading chunk "+t+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+t,t)}},p=function(t,e){var n,r,o=e[0],i=e[1],a=e[2],u=0;if(o.some(function(t){return 0!==l[t]})){for(n in i)y.o(i,n)&&(y.m[n]=i[n]);a&&a(y)}for(t&&t(e);u<o.length;u++)r=o[u],y.o(l,r)&&l[r]&&l[r][0](),l[r]=0},(f=self.webpackChunk_nocobase_plugin_multi_app_manager=self.webpackChunk_nocobase_plugin_multi_app_manager||[]).forEach(p.bind(null,0)),f.push=p.bind(null,f.push.bind(f));var _={};return!function(){"use strict";var t=window.__nocobase_public_path__||"";if(!t&&window.location&&window.location.pathname){var e=window.location.pathname||"/",n=e.indexOf("/v2/");t=n>=0?e.slice(0,n+1):"/"}t&&(t=t.replace(/\/v2\/?$/,"/")),t||(t="/"),"/"!==t.charAt(t.length-1)&&(t+="/"),y.p=t+"static/plugins/@nocobase/plugin-multi-app-manager/dist/client/"}(),!function(){"use strict";y.r(_),y.d(_,{formSchema:function(){return f.E$},PluginMultiAppManagerClient:function(){return O},default:function(){return S},tableActionColumnSchema:function(){return f.sX}});var t=y(3342),e=y(2059),n=y(9155),r=y.n(n),o=y(4442),i=y(5230),a=(0,i.connect)(e.Input,(0,i.mapReadPretty)(function(e){var n=(0,t.useApp)(),o=e.value&&r().createElement("a",{target:"_blank",href:n.getRouteUrl("/apps/".concat(e.value,"/admin")),rel:"noreferrer"},e.value);return r().createElement("div",{style:e.style},e.addonBefore,e.prefix,o,e.suffix,e.addonAfter)})),u=(0,y(3235).createStyles)(function(t){return{button:{color:t.token.colorTextHeaderMenu+" !important"}}}),c=y(124);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var l=function(){var n,i=u().styles,a=(0,t.useRequest)({resource:"applications",action:"listPinned"},{manual:!0}),l=a.data,p=a.run,f=(0,c.A)().t,d=(0,t.useApp)(),m=((function(t){if(Array.isArray(t))return s(t)})(n=((null==l?void 0:l.data)||[]).map(function(t){var e=d.getRouteUrl("/apps/".concat(t.name,"/admin/"));return t.cname&&(e="//".concat(t.cname)),{key:t.name,label:r().createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},t.displayName||t.name)}}))||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t){if(t){if("string"==typeof t)return s(t,void 0);var e=Object.prototype.toString.call(t).slice(8,-1);if("Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return s(t,void 0)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([{key:".manager",label:r().createElement(o.Link,{to:d.pluginSettingsManager.getRoutePath("multi-app-manager")},f("Manage applications"))}]);return r().createElement(e.Dropdown,{onOpenChange:function(t){p()},menu:{items:m}},r().createElement(e.Button,{className:i.button,title:"Apps",icon:r().createElement(t.Icon,{type:"AppstoreOutlined"})}))},p=function(e){return r().createElement(t.PinnedPluginListProvider,{items:{}},r().createElement(t.SchemaComponentOptions,{components:{MultiAppManager:l,AppNameInput:a}},e.children))},f=y(7197),d=y(6265),m=y.n(d),v=y(6944);function b(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){n(t);return}u.done?e(c):Promise.resolve(c).then(r,o)}function h(t,e,n){return(h=j()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&g(o,n.prototype),o}).apply(null,arguments)}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function w(t){var e="function"==typeof Map?new Map:void 0;return(w=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return h(t,arguments,x(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),g(n,t)})(t)}function j(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(j=function(){return!!t})()}var A=(0,t.lazy)(function(){return y.e("347").then(y.bind(y,4030))},"AppManager").AppManager,O=function(t){var e;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function n(){var t,e;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,e=arguments,t=x(t),function(t,e){var n;if(e&&("object"==((n=e)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof e))return e;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(this,j()?Reflect.construct(t,e||[],x(this).constructor):t.apply(this,e))}return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&g(n,t),e=[{key:"load",value:function(){var t;return(t=function(){return function(t,e){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var s=[u,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}}(this,function(t){return this.app.use(p),this.app.pluginSettingsManager.add(v.C,{title:'{{t("Multi-app manager (deprecated)", { ns: "'.concat(v.C,'" })}}'),icon:"AppstoreOutlined",Component:A,sort:1e3,aclSnippet:"pm.multi-app-manager.applications"}),[2]})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){b(i,r,o,a,u,"next",t)}function u(t){b(i,r,o,a,u,"throw",t)}a(void 0)})}).call(this)}},{key:"extendFormSchema",value:function(t){m()(f.E$,t)}}],function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,e),n}(w(t.Plugin)),S=O}(),_}()});
@@ -8,19 +8,19 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.0-alpha.1",
11
+ "@nocobase/client": "2.1.0-alpha.11",
12
12
  "antd": "5.24.2",
13
13
  "react": "18.2.0",
14
14
  "@formily/react": "2.3.7",
15
15
  "@formily/shared": "2.3.7",
16
+ "@ant-design/icons": "5.6.1",
16
17
  "antd-style": "3.7.1",
17
18
  "react-router-dom": "6.30.1",
18
19
  "lodash": "4.17.21",
19
20
  "react-i18next": "11.18.6",
20
- "@nocobase/database": "2.1.0-alpha.1",
21
- "@nocobase/server": "2.1.0-alpha.1",
22
- "@nocobase/telemetry": "2.1.0-alpha.1",
23
- "mysql2": "3.11.0",
24
- "pg": "8.11.3",
25
- "@nocobase/utils": "2.1.0-alpha.1"
21
+ "@nocobase/database": "2.1.0-alpha.11",
22
+ "@nocobase/server": "2.1.0-alpha.11",
23
+ "@nocobase/telemetry": "2.1.0-alpha.11",
24
+ "async-mutex": "0.5.0",
25
+ "@nocobase/utils": "2.1.0-alpha.11"
26
26
  };
@@ -22,5 +22,6 @@
22
22
  "Start mode": "Start mode",
23
23
  "Start on first visit": "Start on first visit",
24
24
  "Start with main application": "Start with main application",
25
- "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate."
26
- }
25
+ "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.",
26
+ "Migrate to app supervisor": "Migrate to app supervisor"
27
+ }
@@ -22,5 +22,6 @@
22
22
  "Start mode": "启动方式",
23
23
  "Start on first visit": "首次访问时启动",
24
24
  "Start with main application": "随主应用一同启动",
25
- "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "迁移数据时,系统会基于该端口号自动为每个应用分配一个递增的端口号,您也可以在迁移后手动修改。"
26
- }
25
+ "When migrate data, the system automatically assigns an incrementing port number to each application based on this port number. You can also manually modify port number after the migrate.": "迁移数据时,系统会基于该端口号自动为每个应用分配一个递增的端口号,您也可以在迁移后手动修改。",
26
+ "Migrate to app supervisor": "迁移到应用监管器"
27
+ }
@@ -0,0 +1,101 @@
1
+ import EventEmitter = require('eventemitter3');
2
+ import { Queue, RunFunction } from './queue';
3
+ import PriorityQueue from './priority-queue';
4
+ import { QueueAddOptions, DefaultAddOptions, Options } from './options';
5
+ declare type Task<TaskResultType> = (() => PromiseLike<TaskResultType>) | (() => TaskResultType);
6
+ /**
7
+ Promise queue with concurrency control.
8
+ */
9
+ export default class PQueue<QueueType extends Queue<RunFunction, EnqueueOptionsType> = PriorityQueue, EnqueueOptionsType extends QueueAddOptions = DefaultAddOptions> extends EventEmitter<'active' | 'idle' | 'add' | 'next'> {
10
+ private readonly _carryoverConcurrencyCount;
11
+ private readonly _isIntervalIgnored;
12
+ private _intervalCount;
13
+ private readonly _intervalCap;
14
+ private readonly _interval;
15
+ private _intervalEnd;
16
+ private _intervalId?;
17
+ private _timeoutId?;
18
+ private _queue;
19
+ private readonly _queueClass;
20
+ private _pendingCount;
21
+ private _concurrency;
22
+ private _isPaused;
23
+ private _resolveEmpty;
24
+ private _resolveIdle;
25
+ private _timeout?;
26
+ private readonly _throwOnTimeout;
27
+ constructor(options?: Options<QueueType, EnqueueOptionsType>);
28
+ private get _doesIntervalAllowAnother();
29
+ private get _doesConcurrentAllowAnother();
30
+ private _next;
31
+ private _resolvePromises;
32
+ private _onResumeInterval;
33
+ private _isIntervalPaused;
34
+ private _tryToStartAnother;
35
+ private _initializeIntervalIfNeeded;
36
+ private _onInterval;
37
+ /**
38
+ Executes all queued functions until it reaches the limit.
39
+ */
40
+ private _processQueue;
41
+ get concurrency(): number;
42
+ set concurrency(newConcurrency: number);
43
+ /**
44
+ Adds a sync or async task to the queue. Always returns a promise.
45
+ */
46
+ add<TaskResultType>(fn: Task<TaskResultType>, options?: Partial<EnqueueOptionsType>): Promise<TaskResultType>;
47
+ /**
48
+ Same as `.add()`, but accepts an array of sync or async functions.
49
+
50
+ @returns A promise that resolves when all functions are resolved.
51
+ */
52
+ addAll<TaskResultsType>(functions: ReadonlyArray<Task<TaskResultsType>>, options?: EnqueueOptionsType): Promise<TaskResultsType[]>;
53
+ /**
54
+ Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)
55
+ */
56
+ start(): this;
57
+ /**
58
+ Put queue execution on hold.
59
+ */
60
+ pause(): void;
61
+ /**
62
+ Clear the queue.
63
+ */
64
+ clear(): void;
65
+ /**
66
+ Can be called multiple times. Useful if you for example add additional items at a later time.
67
+
68
+ @returns A promise that settles when the queue becomes empty.
69
+ */
70
+ onEmpty(): Promise<void>;
71
+ /**
72
+ The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.
73
+
74
+ @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
75
+ */
76
+ onIdle(): Promise<void>;
77
+ /**
78
+ Size of the queue.
79
+ */
80
+ get size(): number;
81
+ /**
82
+ Size of the queue, filtered by the given options.
83
+
84
+ For example, this can be used to find the number of items remaining in the queue with a specific priority level.
85
+ */
86
+ sizeBy(options: Readonly<Partial<EnqueueOptionsType>>): number;
87
+ /**
88
+ Number of pending promises.
89
+ */
90
+ get pending(): number;
91
+ /**
92
+ Whether the queue is currently paused.
93
+ */
94
+ get isPaused(): boolean;
95
+ get timeout(): number | undefined;
96
+ /**
97
+ Set the timeout for future operations.
98
+ */
99
+ set timeout(milliseconds: number | undefined);
100
+ }
101
+ export { Queue, QueueAddOptions, DefaultAddOptions, Options };
@@ -0,0 +1 @@
1
+ (function(){"use strict";var e={330:function(e){e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},291:function(e,t){Object.defineProperty(t,"__esModule",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t["default"]=lowerBound},492:function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});const r=n(291);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t["default"]=PriorityQueue},924:function(e){var t=Object.prototype.hasOwnProperty,n="~";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!=="function"){throw new TypeError("The listener must be a function")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i<s;i++){o[i]=r[i].fn}return o};EventEmitter.prototype.listenerCount=function listenerCount(e){var t=n?n+e:e,r=this._events[t];if(!r)return 0;if(r.fn)return 1;return r.length};EventEmitter.prototype.emit=function emit(e,t,r,i,s,o){var u=n?n+e:e;if(!this._events[u])return false;var a=this._events[u],l=arguments.length,c,h;if(a.fn){if(a.once)this.removeListener(e,a.fn,undefined,true);switch(l){case 1:return a.fn.call(a.context),true;case 2:return a.fn.call(a.context,t),true;case 3:return a.fn.call(a.context,t,r),true;case 4:return a.fn.call(a.context,t,r,i),true;case 5:return a.fn.call(a.context,t,r,i,s),true;case 6:return a.fn.call(a.context,t,r,i,s,o),true}for(h=1,c=new Array(l-1);h<l;h++){c[h-1]=arguments[h]}a.fn.apply(a.context,c)}else{var _=a.length,f;for(h=0;h<_;h++){if(a[h].once)this.removeListener(e,a[h].fn,undefined,true);switch(l){case 1:a[h].fn.call(a[h].context);break;case 2:a[h].fn.call(a[h].context,t);break;case 3:a[h].fn.call(a[h].context,t,r);break;case 4:a[h].fn.call(a[h].context,t,r,i);break;default:if(!c)for(f=1,c=new Array(l-1);f<l;f++){c[f-1]=arguments[f]}a[h].fn.apply(a[h].context,c)}}}return true};EventEmitter.prototype.on=function on(e,t,n){return addListener(this,e,t,n,false)};EventEmitter.prototype.once=function once(e,t,n){return addListener(this,e,t,n,true)};EventEmitter.prototype.removeListener=function removeListener(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t){clearEvent(this,s);return this}var o=this._events[s];if(o.fn){if(o.fn===t&&(!i||o.once)&&(!r||o.context===r)){clearEvent(this,s)}}else{for(var u=0,a=[],l=o.length;u<l;u++){if(o[u].fn!==t||i&&!o[u].once||r&&o[u].context!==r){a.push(o[u])}}if(a.length)this._events[s]=a.length===1?a[0]:a;else clearEvent(this,s)}return this};EventEmitter.prototype.removeAllListeners=function removeAllListeners(e){var t;if(e){t=n?n+e:e;if(this._events[t])clearEvent(this,t)}else{this._events=new Events;this._eventsCount=0}return this};EventEmitter.prototype.off=EventEmitter.prototype.removeListener;EventEmitter.prototype.addListener=EventEmitter.prototype.on;EventEmitter.prefixed=n;EventEmitter.EventEmitter=EventEmitter;if(true){e.exports=EventEmitter}},424:function(e,t,n){const r=n(330);class TimeoutError extends Error{constructor(e){super(e);this.name="TimeoutError"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!=="number"||t<0){throw new TypeError("Expected `milliseconds` to be a positive number")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n==="function"){try{i(n())}catch(e){s(e)}return}const r=typeof n==="string"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel==="function"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports["default"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};!function(){var e=n;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(924);const r=__nccwpck_require__(424);const i=__nccwpck_require__(492);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap==="number"&&e.intervalCap>=1)){throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:""}\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:""}\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--;this._tryToStartAnother();this.emit("next")}_resolvePromises(){this._resolveEmpty();this._resolveEmpty=empty;if(this._pendingCount===0){this._resolveIdle();this._resolveIdle=empty;this.emit("idle")}}_onResumeInterval(){this._onInterval();this._initializeIntervalIfNeeded();this._timeoutId=undefined}_isIntervalPaused(){const e=Date.now();if(this._intervalId===undefined){const t=this._intervalEnd-e;if(t<0){this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}else{if(this._timeoutId===undefined){this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit("active");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e==="number"&&e>=1)){throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e["default"]=PQueue}();module.exports=n})();
@@ -0,0 +1 @@
1
+ export default function lowerBound<T>(array: readonly T[], value: T, comparator: (a: T, b: T) => number): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound
4
+ // Used to compute insertion index to keep queue sorted after insertion
5
+ function lowerBound(array, value, comparator) {
6
+ let first = 0;
7
+ let count = array.length;
8
+ while (count > 0) {
9
+ const step = (count / 2) | 0;
10
+ let it = first + step;
11
+ if (comparator(array[it], value) <= 0) {
12
+ first = ++it;
13
+ count -= step + 1;
14
+ }
15
+ else {
16
+ count = step;
17
+ }
18
+ }
19
+ return first;
20
+ }
21
+ exports.default = lowerBound;
@@ -0,0 +1,64 @@
1
+ import { Queue, RunFunction } from './queue';
2
+ export interface QueueAddOptions {
3
+ readonly [key: string]: unknown;
4
+ }
5
+ export interface Options<QueueType extends Queue<RunFunction, QueueOptions>, QueueOptions extends QueueAddOptions> {
6
+ /**
7
+ Concurrency limit.
8
+
9
+ Minimum: `1`.
10
+
11
+ @default Infinity
12
+ */
13
+ readonly concurrency?: number;
14
+ /**
15
+ Whether queue tasks within concurrency limit, are auto-executed as soon as they're added.
16
+
17
+ @default true
18
+ */
19
+ readonly autoStart?: boolean;
20
+ /**
21
+ Class with a `enqueue` and `dequeue` method, and a `size` getter. See the [Custom QueueClass](https://github.com/sindresorhus/p-queue#custom-queueclass) section.
22
+ */
23
+ readonly queueClass?: new () => QueueType;
24
+ /**
25
+ The max number of runs in the given interval of time.
26
+
27
+ Minimum: `1`.
28
+
29
+ @default Infinity
30
+ */
31
+ readonly intervalCap?: number;
32
+ /**
33
+ The length of time in milliseconds before the interval count resets. Must be finite.
34
+
35
+ Minimum: `0`.
36
+
37
+ @default 0
38
+ */
39
+ readonly interval?: number;
40
+ /**
41
+ Whether the task must finish in the given interval or will be carried over into the next interval count.
42
+
43
+ @default false
44
+ */
45
+ readonly carryoverConcurrencyCount?: boolean;
46
+ /**
47
+ Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
48
+ */
49
+ timeout?: number;
50
+ /**
51
+ Whether or not a timeout is considered an exception.
52
+
53
+ @default false
54
+ */
55
+ throwOnTimeout?: boolean;
56
+ }
57
+ export interface DefaultAddOptions extends QueueAddOptions {
58
+ /**
59
+ Priority of operation. Operations with greater priority will be scheduled first.
60
+
61
+ @default 0
62
+ */
63
+ readonly priority?: number;
64
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });