@bigduu/lotus-next 2026.9.12

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 (37) hide show
  1. package/README.md +113 -0
  2. package/dist/asset-manifest.json +303 -0
  3. package/dist/assets/CodeBlock-dYUQ9iue.js +2 -0
  4. package/dist/assets/ErrorBoundary-DLCRl4Er.js +1 -0
  5. package/dist/assets/Markdown-DBG0vWxL.js +2 -0
  6. package/dist/assets/MermaidChart-U1Z5JCRh.js +1 -0
  7. package/dist/assets/Root-dWsRRTlH.js +7 -0
  8. package/dist/assets/Settings-BcsRaEDP.js +7 -0
  9. package/dist/assets/StreamdownMarkdown-CiLy0KJD.js +2 -0
  10. package/dist/assets/StreamdownMermaid-J7jSRtO6.js +1 -0
  11. package/dist/assets/bundle-mjs-B_AA55HL.js +1 -0
  12. package/dist/assets/defineProperty-o0OkIQd4.js +1 -0
  13. package/dist/assets/en-US-DOXBXLLy.js +3 -0
  14. package/dist/assets/html2canvas-ChX2ETZ3.js +1 -0
  15. package/dist/assets/index-CjY6eMv8.js +2 -0
  16. package/dist/assets/index-xUf4TnkE.css +2 -0
  17. package/dist/assets/index.es-BpPlqG76.js +5 -0
  18. package/dist/assets/lib-CFLxRXs3.js +1 -0
  19. package/dist/assets/renderPdf-DbvJnEQL.js +111 -0
  20. package/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
  21. package/dist/assets/select-DYBAIyVx.js +131 -0
  22. package/dist/assets/strictConfig-Bf8nyKvx.js +1 -0
  23. package/dist/assets/unsupportedIterableToArray-BTCP7Haa.js +1 -0
  24. package/dist/assets/vendor-highlighter-ClvlgmIK.js +8 -0
  25. package/dist/assets/vendor-markdown-CfSBref-.js +30 -0
  26. package/dist/assets/vendor-mermaid-Da_wWrs4.js +3535 -0
  27. package/dist/assets/vendor-react-CCIEwYL0.js +9 -0
  28. package/dist/assets/vendor-streamdown-BIRX7zKm.js +113 -0
  29. package/dist/assets/vendor-streamdown-CXvuy5h3.css +1 -0
  30. package/dist/assets/vendor-streamdown-code-B6SuuZwa.js +152 -0
  31. package/dist/assets/zh-CN-C4xbZjjC.js +3 -0
  32. package/dist/bundle-ownership.json +597 -0
  33. package/dist/favicon.svg +1 -0
  34. package/dist/icons.svg +24 -0
  35. package/dist/index.html +27 -0
  36. package/dist/lotus-next-manifest.json +181 -0
  37. package/package.json +94 -0
package/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # lotus-next
2
+
3
+ An experimental, ground-up rebuild of the [Lotus](https://github.com/bigduu/Lotus) web frontend for the Bamboo agent runtime. It uses React 19, TypeScript, Vite, Tailwind CSS v4, and hand-written components built on Radix primitives.
4
+
5
+ Lotus Next is the canonical forward-development target. Production cutover is tracked in [issue #11](https://github.com/bigduu/lotus-next/issues/11); the legacy Ant Design frontend remains only as the current production and rollback baseline while that migration is incomplete.
6
+
7
+ This repository documents the implementation that exists here today. It does not yet claim feature parity with Lotus or production readiness.
8
+
9
+ ## Quick start
10
+
11
+ Run a Bamboo server on `127.0.0.1:9562`, then start the frontend:
12
+
13
+ ```bash
14
+ npm ci
15
+ npm run dev
16
+ ```
17
+
18
+ Vite listens on port `9563` and proxies `/api` and `/v2` to Bamboo on port
19
+ `9562`. Lotus Next sends every Bamboo-native REST request through the single
20
+ canonical `/api/v1` client; the historical `/v1` alias is deliberately not a
21
+ frontend proxy or fallback.
22
+
23
+ `VITE_BACKEND_BASE_URL` and newly persisted browser overrides accept a bare
24
+ HTTP(S) origin or exact `/api/v1`. New `/v1` input fails closed. During the
25
+ migration window, `src/runtime/browserRuntime.ts` alone may read the legacy
26
+ `copilot_backend_base_url` key, write and verify
27
+ `lotus_next_backend_endpoint_v1`, and only then delete the legacy value. That
28
+ reader is removed after every default consumer has run an artifact containing
29
+ the migration and its declared rollback window has ended.
30
+
31
+ ## Implemented surface
32
+
33
+ - Chat over one shared `/v2/stream` WebSocket, using JSON by default and opt-in MessagePack negotiation.
34
+ - Streaming messages, reasoning, tools, tasks, budgets, sub-agents, Markdown, syntax highlighting, Mermaid, images, and approval or question dialogs.
35
+ - Session navigation, live account reconciliation, drafts, pending-question restoration, Markdown/PDF export, and a desktop split view with a second interactive chat pane.
36
+ - Responsive desktop and mobile layouts, light/dark/system themes, simple/advanced modes, and a graphics-safe mode for constrained environments.
37
+ - Fifteen settings tabs: General, Providers, MCP, Plugins, Skills, Permissions, Environment, Schedules, Notifications, Masking, Prompts, Workflows, Clusters, Metrics, and System.
38
+
39
+ ## Internationalization
40
+
41
+ The i18next runtime currently registers six locales: `en-US`, `zh-CN`, `zh-TW`, `fr-FR`, `ja-JP`, and `hi-IN`. Locale resources load on demand, with `en-US` as the fallback.
42
+
43
+ Translation coverage is not complete: parts of the newer application shell and settings UI still contain hard-coded Chinese strings. The locale list therefore describes the implemented runtime and resources, not complete localization of every screen.
44
+
45
+ ## Production gates
46
+
47
+ Run the same checks locally that CI runs for pull requests and `main`:
48
+
49
+ ```bash
50
+ npm ci
51
+ npx playwright install chromium
52
+ npm run verify
53
+ npm run test:e2e:built
54
+ ```
55
+
56
+ `npm run verify` produces the production artifact after the type, lint, unit,
57
+ architecture, bundle, and package checks. `npm run test:e2e:built` then exercises
58
+ that exact output in Chromium at desktop, tablet, and phone viewports. Use
59
+ `npm run test:e2e` as the standalone convenience command when you need it to
60
+ build first. The browser suite checks standalone, secure remote, and nested
61
+ embedded hosting while enforcing the canonical `/api/v1` and `/v2/stream`
62
+ runtime contract. CI retains its HTML report, trace, screenshot, video, and
63
+ runtime observations when a case fails.
64
+
65
+ The real-runtime gate is intentionally separate from that deterministic matrix.
66
+ It builds a clean checkout of Bamboo revision
67
+ `2171e406a18c9f48509f1372560ef6e8c1749eca` into an isolated Docker image,
68
+ serves the production Lotus Next artifact from that Bamboo process, and drives
69
+ one complete chat turn through the visible desktop UI and a local deterministic
70
+ OpenAI-compatible provider. It requires the `auth.ws_hello_ack.v1` bootstrap
71
+ capability and records one ordered, bidirectional WebSocket timeline for both
72
+ the initial page and a fresh browser context, proving that exact `hello` is
73
+ acknowledged by exact `welcome` before any subscription is sent. The provider
74
+ shares Bamboo's test-owned network
75
+ namespace and listens only on that namespace's loopback interface; only Bamboo's
76
+ HTTP listener is published on a random host-loopback port. The provider writes
77
+ redacted observations atomically to a test-owned bind mount instead of exposing
78
+ its own API to the host.
79
+ Both Bamboo data and its Jiandu home stay inside a separate
80
+ test-owned temporary `/data` mount, so the lane never reads the workstation's
81
+ live Bamboo or Jiandu state. To run it locally, provide the absolute path to a
82
+ clean checkout at that exact revision:
83
+
84
+ ```bash
85
+ BAMBOO_E2E_SOURCE_DIR=/absolute/path/to/bamboo \
86
+ npm run test:e2e:real-bamboo
87
+ ```
88
+
89
+ Docker and Chromium are required. The runner rejects a different or dirty
90
+ Bamboo checkout and never accepts a live Bamboo URL. Normal completion, setup
91
+ failure, `SIGINT`, and `SIGTERM` share one exact-resource teardown for the two
92
+ containers, private network, temporary image, observation mount, and data root
93
+ it created. CI runs this single desktop lane once on Node 22; it does not repeat
94
+ it across the mock suite's viewport/runtime matrix.
95
+
96
+ `npm run pack:check` rebuilds the app, asks npm for the exact dry-run tarball
97
+ manifest, and rejects anything outside `dist/` plus npm's required package
98
+ metadata. Every build also writes `dist/lotus-next-manifest.json`. That
99
+ versioned universal-web manifest binds the package name/version, exact source
100
+ revision and dirty state, relative `index.html` entrypoint, and every other
101
+ regular `dist/` resource by portable path, byte size, and SHA-256. Its combined
102
+ digest is deterministic for one resource set. Consumers must verify this file
103
+ before serving or staging an artifact; a dirty source manifest is never a
104
+ release artifact.
105
+
106
+ The committed package version remains the `0.0.0` source placeholder. The
107
+ manual publication workflow accepts one explicit SemVer, verifies the complete
108
+ Node 22/24 and real-Bamboo gates from a clean `main` commit, packs without a
109
+ second build, verifies the tarball, publishes with npm provenance, then
110
+ downloads and verifies the registry copy. Publishing does not switch any
111
+ Bamboo, Bodhi, or Zenith consumer.
112
+
113
+ The initial bundle-size baseline is recorded in [`docs/bundle-baseline.md`](docs/bundle-baseline.md). It is an observation gate, not a size-budget change.
@@ -0,0 +1,303 @@
1
+ {
2
+ "_ErrorBoundary-DLCRl4Er.js": {
3
+ "file": "assets/ErrorBoundary-DLCRl4Er.js",
4
+ "name": "ErrorBoundary",
5
+ "imports": [
6
+ "_rolldown-runtime-QTnfLwEv.js",
7
+ "_vendor-react-CCIEwYL0.js",
8
+ "_bundle-mjs-B_AA55HL.js"
9
+ ]
10
+ },
11
+ "_bundle-mjs-B_AA55HL.js": {
12
+ "file": "assets/bundle-mjs-B_AA55HL.js",
13
+ "name": "bundle-mjs"
14
+ },
15
+ "_defineProperty-o0OkIQd4.js": {
16
+ "file": "assets/defineProperty-o0OkIQd4.js",
17
+ "name": "defineProperty",
18
+ "imports": [
19
+ "_unsupportedIterableToArray-BTCP7Haa.js"
20
+ ]
21
+ },
22
+ "_lib-CFLxRXs3.js": {
23
+ "file": "assets/lib-CFLxRXs3.js",
24
+ "name": "lib"
25
+ },
26
+ "_rolldown-runtime-QTnfLwEv.js": {
27
+ "file": "assets/rolldown-runtime-QTnfLwEv.js",
28
+ "name": "rolldown-runtime"
29
+ },
30
+ "_select-DYBAIyVx.js": {
31
+ "file": "assets/select-DYBAIyVx.js",
32
+ "name": "select",
33
+ "imports": [
34
+ "_rolldown-runtime-QTnfLwEv.js",
35
+ "_vendor-react-CCIEwYL0.js",
36
+ "index.html",
37
+ "_ErrorBoundary-DLCRl4Er.js"
38
+ ],
39
+ "dynamicImports": [
40
+ "src/shared/i18n/resources/en-US.ts",
41
+ "src/shared/i18n/resources/zh-CN.ts"
42
+ ]
43
+ },
44
+ "_strictConfig-Bf8nyKvx.js": {
45
+ "file": "assets/strictConfig-Bf8nyKvx.js",
46
+ "name": "strictConfig",
47
+ "imports": [
48
+ "_vendor-mermaid-Da_wWrs4.js"
49
+ ]
50
+ },
51
+ "_unsupportedIterableToArray-BTCP7Haa.js": {
52
+ "file": "assets/unsupportedIterableToArray-BTCP7Haa.js",
53
+ "name": "unsupportedIterableToArray"
54
+ },
55
+ "_vendor-highlighter-ClvlgmIK.js": {
56
+ "file": "assets/vendor-highlighter-ClvlgmIK.js",
57
+ "name": "vendor-highlighter",
58
+ "imports": [
59
+ "_rolldown-runtime-QTnfLwEv.js",
60
+ "_vendor-react-CCIEwYL0.js",
61
+ "index.html",
62
+ "_vendor-markdown-CfSBref-.js",
63
+ "_defineProperty-o0OkIQd4.js",
64
+ "src/components/chat/CodeBlock.tsx"
65
+ ],
66
+ "dynamicImports": [
67
+ "_vendor-highlighter-ClvlgmIK.js"
68
+ ]
69
+ },
70
+ "_vendor-markdown-CfSBref-.js": {
71
+ "file": "assets/vendor-markdown-CfSBref-.js",
72
+ "name": "vendor-markdown",
73
+ "imports": [
74
+ "_rolldown-runtime-QTnfLwEv.js",
75
+ "_vendor-react-CCIEwYL0.js",
76
+ "_lib-CFLxRXs3.js"
77
+ ]
78
+ },
79
+ "_vendor-mermaid-Da_wWrs4.js": {
80
+ "file": "assets/vendor-mermaid-Da_wWrs4.js",
81
+ "name": "vendor-mermaid",
82
+ "imports": [
83
+ "_rolldown-runtime-QTnfLwEv.js",
84
+ "index.html"
85
+ ],
86
+ "dynamicImports": [
87
+ "_vendor-mermaid-Da_wWrs4.js"
88
+ ]
89
+ },
90
+ "_vendor-react-CCIEwYL0.js": {
91
+ "file": "assets/vendor-react-CCIEwYL0.js",
92
+ "name": "vendor-react",
93
+ "imports": [
94
+ "_rolldown-runtime-QTnfLwEv.js"
95
+ ]
96
+ },
97
+ "_vendor-streamdown-BIRX7zKm.js": {
98
+ "file": "assets/vendor-streamdown-BIRX7zKm.js",
99
+ "name": "vendor-streamdown",
100
+ "imports": [
101
+ "_rolldown-runtime-QTnfLwEv.js",
102
+ "_vendor-react-CCIEwYL0.js",
103
+ "index.html",
104
+ "_vendor-markdown-CfSBref-.js",
105
+ "_bundle-mjs-B_AA55HL.js",
106
+ "_lib-CFLxRXs3.js"
107
+ ],
108
+ "dynamicImports": [
109
+ "_vendor-streamdown-BIRX7zKm.js"
110
+ ],
111
+ "css": [
112
+ "assets/vendor-streamdown-CXvuy5h3.css"
113
+ ]
114
+ },
115
+ "_vendor-streamdown-CXvuy5h3.css": {
116
+ "file": "assets/vendor-streamdown-CXvuy5h3.css",
117
+ "src": "_vendor-streamdown-CXvuy5h3.css"
118
+ },
119
+ "_vendor-streamdown-code-B6SuuZwa.js": {
120
+ "file": "assets/vendor-streamdown-code-B6SuuZwa.js",
121
+ "name": "vendor-streamdown-code",
122
+ "imports": [
123
+ "_rolldown-runtime-QTnfLwEv.js",
124
+ "index.html",
125
+ "_vendor-markdown-CfSBref-.js"
126
+ ],
127
+ "dynamicImports": [
128
+ "_vendor-streamdown-code-B6SuuZwa.js"
129
+ ]
130
+ },
131
+ "index.html": {
132
+ "file": "assets/index-CjY6eMv8.js",
133
+ "name": "index",
134
+ "src": "index.html",
135
+ "isEntry": true,
136
+ "imports": [
137
+ "_rolldown-runtime-QTnfLwEv.js",
138
+ "_vendor-react-CCIEwYL0.js"
139
+ ],
140
+ "dynamicImports": [
141
+ "src/Root.tsx",
142
+ "_ErrorBoundary-DLCRl4Er.js"
143
+ ],
144
+ "css": [
145
+ "assets/index-xUf4TnkE.css"
146
+ ]
147
+ },
148
+ "node_modules/canvg/lib/index.es.js": {
149
+ "file": "assets/index.es-BpPlqG76.js",
150
+ "name": "index.es",
151
+ "src": "node_modules/canvg/lib/index.es.js",
152
+ "isDynamicEntry": true,
153
+ "imports": [
154
+ "_rolldown-runtime-QTnfLwEv.js",
155
+ "_defineProperty-o0OkIQd4.js"
156
+ ]
157
+ },
158
+ "node_modules/html2canvas/dist/html2canvas.js": {
159
+ "file": "assets/html2canvas-ChX2ETZ3.js",
160
+ "name": "html2canvas",
161
+ "src": "node_modules/html2canvas/dist/html2canvas.js",
162
+ "isDynamicEntry": true,
163
+ "imports": [
164
+ "src/lib/export/renderPdf.tsx"
165
+ ]
166
+ },
167
+ "src/Root.tsx": {
168
+ "file": "assets/Root-dWsRRTlH.js",
169
+ "name": "Root",
170
+ "src": "src/Root.tsx",
171
+ "isDynamicEntry": true,
172
+ "imports": [
173
+ "_rolldown-runtime-QTnfLwEv.js",
174
+ "_vendor-react-CCIEwYL0.js",
175
+ "index.html",
176
+ "_ErrorBoundary-DLCRl4Er.js",
177
+ "_select-DYBAIyVx.js"
178
+ ],
179
+ "dynamicImports": [
180
+ "src/components/chat/Settings.tsx",
181
+ "src/lib/export/renderPdf.tsx",
182
+ "src/components/chat/StreamdownMarkdown.tsx",
183
+ "src/components/chat/Markdown.tsx"
184
+ ]
185
+ },
186
+ "src/components/chat/CodeBlock.tsx": {
187
+ "file": "assets/CodeBlock-dYUQ9iue.js",
188
+ "name": "CodeBlock",
189
+ "src": "src/components/chat/CodeBlock.tsx",
190
+ "isDynamicEntry": true,
191
+ "imports": [
192
+ "_rolldown-runtime-QTnfLwEv.js",
193
+ "_vendor-react-CCIEwYL0.js",
194
+ "_defineProperty-o0OkIQd4.js",
195
+ "_unsupportedIterableToArray-BTCP7Haa.js",
196
+ "_vendor-highlighter-ClvlgmIK.js"
197
+ ]
198
+ },
199
+ "src/components/chat/Markdown.tsx": {
200
+ "file": "assets/Markdown-DBG0vWxL.js",
201
+ "name": "Markdown",
202
+ "src": "src/components/chat/Markdown.tsx",
203
+ "isDynamicEntry": true,
204
+ "imports": [
205
+ "_rolldown-runtime-QTnfLwEv.js",
206
+ "_vendor-react-CCIEwYL0.js",
207
+ "index.html",
208
+ "_vendor-markdown-CfSBref-.js",
209
+ "_ErrorBoundary-DLCRl4Er.js"
210
+ ],
211
+ "dynamicImports": [
212
+ "src/components/chat/CodeBlock.tsx",
213
+ "src/components/chat/MermaidChart.tsx"
214
+ ]
215
+ },
216
+ "src/components/chat/MermaidChart.tsx": {
217
+ "file": "assets/MermaidChart-U1Z5JCRh.js",
218
+ "name": "MermaidChart",
219
+ "src": "src/components/chat/MermaidChart.tsx",
220
+ "isDynamicEntry": true,
221
+ "imports": [
222
+ "_rolldown-runtime-QTnfLwEv.js",
223
+ "_vendor-react-CCIEwYL0.js",
224
+ "_vendor-mermaid-Da_wWrs4.js",
225
+ "_strictConfig-Bf8nyKvx.js"
226
+ ]
227
+ },
228
+ "src/components/chat/Settings.tsx": {
229
+ "file": "assets/Settings-BcsRaEDP.js",
230
+ "name": "Settings",
231
+ "src": "src/components/chat/Settings.tsx",
232
+ "isDynamicEntry": true,
233
+ "imports": [
234
+ "_rolldown-runtime-QTnfLwEv.js",
235
+ "_vendor-react-CCIEwYL0.js",
236
+ "index.html",
237
+ "_ErrorBoundary-DLCRl4Er.js",
238
+ "_select-DYBAIyVx.js"
239
+ ]
240
+ },
241
+ "src/components/chat/StreamdownMarkdown.tsx": {
242
+ "file": "assets/StreamdownMarkdown-CiLy0KJD.js",
243
+ "name": "StreamdownMarkdown",
244
+ "src": "src/components/chat/StreamdownMarkdown.tsx",
245
+ "isDynamicEntry": true,
246
+ "imports": [
247
+ "_rolldown-runtime-QTnfLwEv.js",
248
+ "_vendor-react-CCIEwYL0.js",
249
+ "index.html",
250
+ "_vendor-markdown-CfSBref-.js",
251
+ "_vendor-streamdown-BIRX7zKm.js",
252
+ "_ErrorBoundary-DLCRl4Er.js"
253
+ ],
254
+ "dynamicImports": [
255
+ "_vendor-streamdown-code-B6SuuZwa.js",
256
+ "src/components/chat/StreamdownMermaid.tsx"
257
+ ]
258
+ },
259
+ "src/components/chat/StreamdownMermaid.tsx": {
260
+ "file": "assets/StreamdownMermaid-J7jSRtO6.js",
261
+ "name": "StreamdownMermaid",
262
+ "src": "src/components/chat/StreamdownMermaid.tsx",
263
+ "isDynamicEntry": true,
264
+ "imports": [
265
+ "_rolldown-runtime-QTnfLwEv.js",
266
+ "_vendor-react-CCIEwYL0.js",
267
+ "_vendor-mermaid-Da_wWrs4.js",
268
+ "_strictConfig-Bf8nyKvx.js"
269
+ ]
270
+ },
271
+ "src/lib/export/renderPdf.tsx": {
272
+ "file": "assets/renderPdf-DbvJnEQL.js",
273
+ "name": "renderPdf",
274
+ "src": "src/lib/export/renderPdf.tsx",
275
+ "isDynamicEntry": true,
276
+ "imports": [
277
+ "_rolldown-runtime-QTnfLwEv.js",
278
+ "_vendor-react-CCIEwYL0.js",
279
+ "index.html",
280
+ "_vendor-mermaid-Da_wWrs4.js",
281
+ "_vendor-markdown-CfSBref-.js",
282
+ "_unsupportedIterableToArray-BTCP7Haa.js",
283
+ "_strictConfig-Bf8nyKvx.js"
284
+ ],
285
+ "dynamicImports": [
286
+ "src/lib/export/renderPdf.tsx",
287
+ "_vendor-mermaid-Da_wWrs4.js",
288
+ "node_modules/canvg/lib/index.es.js"
289
+ ]
290
+ },
291
+ "src/shared/i18n/resources/en-US.ts": {
292
+ "file": "assets/en-US-DOXBXLLy.js",
293
+ "name": "en-US",
294
+ "src": "src/shared/i18n/resources/en-US.ts",
295
+ "isDynamicEntry": true
296
+ },
297
+ "src/shared/i18n/resources/zh-CN.ts": {
298
+ "file": "assets/zh-CN-C4xbZjjC.js",
299
+ "name": "zh-CN",
300
+ "src": "src/shared/i18n/resources/zh-CN.ts",
301
+ "isDynamicEntry": true
302
+ }
303
+ }
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./vendor-react-CCIEwYL0.js";import{n}from"./defineProperty-o0OkIQd4.js";import{n as r,r as i,t as a}from"./unsupportedIterableToArray-BTCP7Haa.js";import{n as o,t as s}from"./vendor-highlighter-ClvlgmIK.js";function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(null,arguments)}function l(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function u(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}function d(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function p(e,t){if(t&&(i(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return f(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function g(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}var _=e(((e,t)=>{function n(e,t){this.v=e,this.k=t}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),v=e(((e,t)=>{function n(e,r,i,a){var o=Object.defineProperty;try{o({},``,{})}catch{o=0}t.exports=n=function(e,t,r,i){function a(t,r){n(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[t]=r:(a(`next`,0),a(`throw`,1),a(`return`,2))},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r,i,a)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),y=e(((e,t)=>{var n=v();function r(){var e,i,a=typeof Symbol==`function`?Symbol:{},o=a.iterator||`@@iterator`,s=a.toStringTag||`@@toStringTag`;function c(t,r,a,o){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return n(c,`_invoke`,function(t,n,r){var a,o,s,c=0,u=r||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,o=0,s=e,f.n=n,l}};function p(t,n){for(o=t,s=n,i=0;!d&&c&&!r&&i<u.length;i++){var r,a=u[i],p=f.p,m=a[2];t>3?(r=m===n)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=p&&((r=t<2&&p<a[1])?(o=0,f.v=n,f.n=a[1]):p<m&&(r=t<3||a[0]>n||n>m)&&(a[4]=t,a[5]=n,f.n=m,o=0))}if(r||t>1)return l;throw d=!0,n}return function(r,u,m){if(c>1)throw TypeError(`Generator is already running`);for(d&&u===1&&p(u,m),o=u,s=m;(i=o<2?e:s)||!d;){a||(o?o<3?(o>1&&(f.n=-1),p(o,s)):f.n=s:f.v=s);try{if(c=2,a){if(o||(r=`next`),i=a[r]){if(!(i=i.call(a,s)))throw TypeError(`iterator result is not an object`);if(!i.done)return i;s=i.value,o<2&&(o=0)}else o===1&&(i=a.return)&&i.call(a),o<2&&(s=TypeError(`The iterator does not provide a '`+r+`' method`),o=1);a=e}else if((i=(d=f.n<0)?s:t.call(n,f))!==l)break}catch(t){a=e,o=1,s=t}finally{c=1}}return{value:i,done:d}}}(t,a,o),!0),c}var l={};function u(){}function d(){}function f(){}i=Object.getPrototypeOf;var p=[][o]?i(i([][o]())):(n(i={},o,function(){return this}),i),m=f.prototype=u.prototype=Object.create(p);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,n(e,s,`GeneratorFunction`)),e.prototype=Object.create(m),e}return d.prototype=f,n(m,`constructor`,f),n(f,`constructor`,d),d.displayName=`GeneratorFunction`,n(f,s,`GeneratorFunction`),n(m),n(m,s,`Generator`),n(m,o,function(){return this}),n(m,`toString`,function(){return`[object Generator]`}),(t.exports=r=function(){return{w:c,m:h}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})),b=e(((e,t)=>{var n=_(),r=v();function i(e,t){function a(r,i,o,s){try{var c=e[r](i),l=c.value;return l instanceof n?t.resolve(l.v).then(function(e){a(`next`,e,o,s)},function(e){a(`throw`,e,o,s)}):t.resolve(l).then(function(e){c.value=e,o(c)},function(e){return a(`throw`,e,o,s)})}catch(e){s(e)}}var o;this.next||(r(i.prototype),r(i.prototype,typeof Symbol==`function`&&Symbol.asyncIterator||`@asyncIterator`,function(){return this})),r(this,`_invoke`,function(e,n,r){function i(){return new t(function(t,n){a(e,r,t,n)})}return o=o?o.then(i,i):i()},!0)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports})),x=e(((e,t)=>{var n=y(),r=b();function i(e,t,i,a,o){return new r(n().w(e,t,i,a),o||Promise)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports})),S=e(((e,t)=>{var n=x();function r(e,t,r,i,a){var o=n(e,t,r,i,a);return o.next().then(function(e){return e.done?e.value:o.next()})}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})),C=e(((e,t)=>{function n(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),w=e(((e,t)=>{function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),T=e(((e,t)=>{var n=w().default;function r(e){if(e!=null){var t=e[typeof Symbol==`function`&&Symbol.iterator||`@@iterator`],r=0;if(t)return t.call(e);if(typeof e.next==`function`)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw TypeError(n(e)+` is not iterable`)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})),E=e(((e,t)=>{var n=_(),r=y(),i=S(),a=x(),o=b(),s=C(),c=T();function l(){var e=r(),u=e.m(l),d=(Object.getPrototypeOf?Object.getPrototypeOf(u):u.__proto__).constructor;function f(e){var t=typeof e==`function`&&e.constructor;return!!t&&(t===d||(t.displayName||t.name)===`GeneratorFunction`)}var p={throw:1,return:2,break:3,continue:3};function m(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,p[e],t)},delegateYield:function(e,i,a){return t.resultName=i,n(r.d,c(e),a)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(t.exports=l=function(){return{wrap:function(t,n,r,i){return e.w(m(t),n,r,i&&i.reverse())},isGeneratorFunction:f,mark:e.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:o,async:function(e,t,n,r,o){return(f(t)?a:i)(m(e),t,n,r,o)},keys:s,values:c}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports})),D=e(((e,t)=>{var n=E()();t.exports=n;try{regeneratorRuntime=n}catch{typeof globalThis==`object`?globalThis.regeneratorRuntime=n:Function(`r`,`regeneratorRuntime = r`)(n)}}));function O(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function k(e,t){if(e==null)return{};var n,r,i=O(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function A(e){if(Array.isArray(e))return r(e)}function j(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function M(){throw TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(e){return A(e)||j(e)||a(e)||M()}var P=t();function F({language:e,value:t}){return(0,P.jsx)(o,{language:e,style:s,PreTag:`div`,customStyle:{margin:0,background:`transparent`,padding:`0.75rem`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,overflowWrap:`anywhere`},wrapLongLines:!0,codeTagProps:{style:{fontSize:`inherit`,whiteSpace:`pre-wrap`}},children:t})}export{m as a,l as c,F as default,g as i,c as l,k as n,p as o,D as r,d as s,N as t};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./rolldown-runtime-QTnfLwEv.js";import{i as n,t as r}from"./vendor-react-CCIEwYL0.js";import{n as i,t as a}from"./bundle-mjs-B_AA55HL.js";var o=t(n(),1),s=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),c=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),l=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),u=e=>{let t=l(e);return t.charAt(0).toUpperCase()+t.slice(1)},d={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},f=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},p=(0,o.createContext)({}),m=()=>(0,o.useContext)(p),h=(0,o.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:c,...l},u)=>{let{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,color:_=`currentColor`,className:v=``}=m()??{},y=r??g?Number(n??h)*24/Number(t??p):n??h;return(0,o.createElement)(`svg`,{ref:u,...d,width:t??p??d.width,height:t??p??d.height,stroke:e??_,strokeWidth:y,className:s(`lucide`,v,i),...!a&&!f(l)&&{"aria-hidden":`true`},...l},[...c.map(([e,t])=>(0,o.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),g=(e,t)=>{let n=(0,o.forwardRef)(({className:n,...r},i)=>(0,o.createElement)(h,{ref:i,iconNode:t,className:s(`lucide-${c(u(e))}`,`lucide-${e}`,n),...r}));return n.displayName=u(e),n},_=g(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),v=g(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]);function y(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function b(...e){return t=>{let n=!1,r=e.map(e=>{let r=y(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():y(e[t],null)}}}}function x(...e){return o.useCallback(b(...e),e)}function S(e){let t=o.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,s=!1,c=[];A(r)&&typeof P==`function`&&(r=P(r._payload)),o.Children.forEach(r,e=>{if(O(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;A(n)&&typeof P==`function`&&(n=P(n._payload)),a=T(t,n),c.push(a?.props?.children)}else c.push(e)}),a?a=o.cloneElement(a,void 0,c):!s&&o.Children.count(r)===1&&o.isValidElement(r)&&(a=r);let l=a?D(a):void 0,u=x(n,l);if(!a){if(r||r===0)throw Error(s?N(e):M(e));return r}let d=E(i,a.props??{});return a.type!==o.Fragment&&(d.ref=n?u:l),o.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}var C=S(`Slot`),w=Symbol.for(`radix.slottable`),T=(e,t)=>{if(`child`in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null};function E(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function D(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function O(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===w}var k=Symbol.for(`react.lazy`);function A(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===k&&`_payload`in e&&j(e._payload)}function j(e){return typeof e==`object`&&!!e&&`then`in e}var M=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,N=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,P=o.use,F=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,I=i,L=(e,t)=>n=>{if(t?.variants==null)return I(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=F(t)||F(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return I(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};function R(...e){return a(i(e))}var z=r(),B=L(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 active:scale-[0.98]`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-white shadow-xs hover:bg-destructive/90`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function V({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,z.jsx)(r?C:`button`,{"data-slot":`button`,className:R(B({variant:t,size:n,className:e})),...i})}var H=e({ErrorBoundary:()=>U,default:()=>U}),U=class extends o.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){let n=this.props.name??`ErrorBoundary`;console.error(`[${n}] Uncaught error:`,e,t),this.props.onError?.(e,t)}handleReset=()=>{this.setState({hasError:!1,error:null})};render(){if(!this.state.hasError)return this.props.children;let{fallback:e}=this.props,t=this.state.error;return typeof e==`function`?e(t,this.handleReset):e===void 0?(0,z.jsx)(W,{error:t,onReset:this.handleReset}):e}};function W({error:e,onReset:t}){let[n,r]=(0,o.useState)(!1);return(0,z.jsxs)(`div`,{role:`alert`,className:`flex min-h-[200px] flex-col items-center justify-center gap-3 p-6 text-center`,children:[(0,z.jsx)(_,{className:`size-9 text-amber-500`}),(0,z.jsx)(`div`,{className:`text-base font-semibold`,children:`页面出错了`}),(0,z.jsx)(`p`,{className:`max-w-md text-sm text-muted-foreground`,children:`这个区域渲染时发生了异常。你可以重试;若持续出错,请刷新页面。`}),(0,z.jsxs)(`div`,{className:`mt-1 flex gap-2`,children:[(0,z.jsxs)(V,{size:`sm`,onClick:t,children:[(0,z.jsx)(v,{className:`size-4`}),`重试`]}),(0,z.jsx)(V,{size:`sm`,variant:`ghost`,onClick:()=>r(e=>!e),"aria-expanded":n,children:n?`隐藏详情`:`显示详情`})]}),n&&(0,z.jsxs)(`pre`,{className:`mt-2 max-h-[200px] w-full max-w-xl overflow-auto rounded-md bg-muted p-3 text-left text-xs`,children:[e.message,e.stack?`\n\n${e.stack}`:``]})]})}export{L as a,b as c,_ as d,g as f,R as i,x as l,H as n,C as o,V as r,S as s,U as t,v as u};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CodeBlock-dYUQ9iue.js","./rolldown-runtime-QTnfLwEv.js","./vendor-react-CCIEwYL0.js","./defineProperty-o0OkIQd4.js","./unsupportedIterableToArray-BTCP7Haa.js","./vendor-highlighter-ClvlgmIK.js","./index-CjY6eMv8.js","./index-xUf4TnkE.css","./vendor-markdown-CfSBref-.js","./lib-CFLxRXs3.js","./MermaidChart-U1Z5JCRh.js","./vendor-mermaid-Da_wWrs4.js","./strictConfig-Bf8nyKvx.js"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./vendor-react-CCIEwYL0.js";import{t as r}from"./index-CjY6eMv8.js";import{a as i,d as a,u as o}from"./vendor-markdown-CfSBref-.js";import{i as s}from"./ErrorBoundary-DLCRl4Er.js";var c=e(t(),1),l=n(),u=(0,c.lazy)(()=>r(()=>import(`./CodeBlock-dYUQ9iue.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url)),d=(0,c.lazy)(()=>r(()=>import(`./MermaidChart-U1Z5JCRh.js`),__vite__mapDeps([10,1,2,11,6,7,12]),import.meta.url)),f={pre:({children:e})=>(0,l.jsx)(`div`,{className:`my-2 overflow-hidden rounded-lg border text-xs [&>code]:block [&>code]:whitespace-pre-wrap [&>code]:break-words [&>code]:rounded-none [&>code]:bg-transparent [&>code]:p-3 [&>code]:[overflow-wrap:anywhere]`,children:e}),code(e){let{children:t,className:n}=e,r=/language-(\w+)/.exec(n||``),i=String(t).replace(/\n$/,``);return r?r[1]===`mermaid`?(0,l.jsx)(c.Suspense,{fallback:(0,l.jsx)(`pre`,{className:`overflow-x-auto p-3 font-mono text-xs`,children:i}),children:(0,l.jsx)(d,{code:i})}):(0,l.jsx)(c.Suspense,{fallback:(0,l.jsx)(`pre`,{className:`overflow-x-auto p-3 font-mono text-xs`,children:i}),children:(0,l.jsx)(u,{language:r[1],value:i})}):(0,l.jsx)(`code`,{className:`rounded bg-background/70 px-1 py-0.5 text-[0.85em] [overflow-wrap:anywhere]`,children:t})},table:({children:e})=>(0,l.jsx)(`div`,{className:`my-2 w-full overflow-x-auto rounded-lg border`,children:(0,l.jsx)(`table`,{className:`w-full border-collapse text-xs`,children:e})}),thead:({children:e})=>(0,l.jsx)(`thead`,{className:`bg-muted/50`,children:e}),th:({children:e})=>(0,l.jsx)(`th`,{className:`border-b px-3 py-2 text-left align-top font-medium [overflow-wrap:break-word]`,children:e}),td:({children:e})=>(0,l.jsx)(`td`,{className:`border-b border-border/40 px-3 py-2 align-top [overflow-wrap:break-word]`,children:e})};function p({children:e,className:t}){return(0,l.jsx)(`div`,{className:s(`prose prose-sm dark:prose-invert max-w-none [overflow-wrap:anywhere]`,`prose-p:my-2 prose-headings:mt-3 prose-headings:mb-1.5`,`prose-pre:my-0 prose-pre:bg-transparent prose-pre:p-0`,`prose-a:text-primary prose-li:my-0.5`,t),children:(0,l.jsx)(i,{remarkPlugins:[o],rehypePlugins:[a],components:f,children:e})})}var m=(0,c.memo)(p);export{m as Markdown};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./vendor-react-CCIEwYL0.js";import{n as r}from"./vendor-mermaid-Da_wWrs4.js";import{n as i}from"./strictConfig-Bf8nyKvx.js";var a=e(t(),1),o=n(),s=!1;function c(){s||=(i(`app`),!0)}var l=0;function u({code:e}){let t=(0,a.useRef)(null),[n,i]=(0,a.useState)(null);return(0,a.useEffect)(()=>{let n=!1;c();let a=`mmd-${l++}`;return r.render(a,e).then(({svg:e})=>{!n&&t.current&&(t.current.innerHTML=e)}).catch(e=>{n||i(e instanceof Error?e.message:String(e))}),()=>{n=!0}},[e]),n?(0,o.jsx)(`pre`,{className:`overflow-x-auto p-3 font-mono text-xs text-muted-foreground`,children:e}):(0,o.jsx)(`div`,{ref:t,className:`flex justify-center overflow-x-auto py-2 [&_svg]:max-w-full`})}export{u as default};