@customize-agent/server 3.0.5 → 3.0.6

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 (169) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +114 -89
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/routes-manifest.json +6 -0
  5. package/.next/server/chunks/2583.js +1 -0
  6. package/.next/server/chunks/3445.js +3 -0
  7. package/.next/server/chunks/{76.js → 5076.js} +3 -3
  8. package/.next/server/chunks/6352.js +1 -0
  9. package/.next/server/chunks/8204.js +1 -0
  10. package/.next/server/chunks/{580.js → 9199.js} +1 -1
  11. package/.next/server/chunks/9270.js +1 -0
  12. package/.next/server/chunks/{301.js → 9301.js} +1 -1
  13. package/.next/server/chunks/9705.js +1 -0
  14. package/.next/server/middleware-build-manifest.js +1 -1
  15. package/.next/server/pages/404.html +1 -1
  16. package/.next/server/pages/500.html +1 -1
  17. package/.next/server/pages/_app.js +1 -1
  18. package/.next/server/pages/_app.js.nft.json +1 -1
  19. package/.next/server/pages/_document.js +1 -1
  20. package/.next/server/pages/_document.js.nft.json +1 -1
  21. package/.next/server/pages/_error.js +1 -1
  22. package/.next/server/pages/_error.js.nft.json +1 -1
  23. package/.next/server/pages/api/config/embedding/healthCheck.js +1 -0
  24. package/.next/server/pages/api/config/embedding/healthCheck.js.nft.json +1 -0
  25. package/.next/server/pages/api/config/embedding.js +1 -0
  26. package/.next/server/pages/api/config/embedding.js.nft.json +1 -0
  27. package/.next/server/pages/api/config/healthCheck.js +1 -1
  28. package/.next/server/pages/api/config/healthCheck.js.nft.json +1 -1
  29. package/.next/server/pages/api/config/models.js +1 -1
  30. package/.next/server/pages/api/config/models.js.nft.json +1 -1
  31. package/.next/server/pages/api/config/providers/[provider].js +1 -1
  32. package/.next/server/pages/api/config/providers/[provider].js.nft.json +1 -1
  33. package/.next/server/pages/api/config/providers.js +1 -1
  34. package/.next/server/pages/api/config/providers.js.nft.json +1 -1
  35. package/.next/server/pages/api/context.js +1 -1
  36. package/.next/server/pages/api/context.js.nft.json +1 -1
  37. package/.next/server/pages/api/documents/chapter/regenerate.js +1 -0
  38. package/.next/server/pages/api/documents/chapter/regenerate.js.nft.json +1 -0
  39. package/.next/server/pages/api/documents/drafts.js +1 -0
  40. package/.next/server/pages/api/documents/drafts.js.nft.json +1 -0
  41. package/.next/server/pages/api/documents/export.js +1 -0
  42. package/.next/server/pages/api/documents/export.js.nft.json +1 -0
  43. package/.next/server/pages/api/documents/generate.js +1 -0
  44. package/.next/server/pages/api/documents/generate.js.nft.json +1 -0
  45. package/.next/server/pages/api/documents/templates.js +1 -0
  46. package/.next/server/pages/api/documents/templates.js.nft.json +1 -0
  47. package/.next/server/pages/api/health.js +1 -1
  48. package/.next/server/pages/api/health.js.nft.json +1 -1
  49. package/.next/server/pages/api/kb/categories.js +1 -1
  50. package/.next/server/pages/api/kb/categories.js.nft.json +1 -1
  51. package/.next/server/pages/api/kb/duplicates.js +1 -1
  52. package/.next/server/pages/api/kb/duplicates.js.nft.json +1 -1
  53. package/.next/server/pages/api/kb/features.js +1 -1
  54. package/.next/server/pages/api/kb/features.js.nft.json +1 -1
  55. package/.next/server/pages/api/kb/files/detail.js +1 -1
  56. package/.next/server/pages/api/kb/files/detail.js.nft.json +1 -1
  57. package/.next/server/pages/api/kb/files/open.js +1 -1
  58. package/.next/server/pages/api/kb/files/open.js.nft.json +1 -1
  59. package/.next/server/pages/api/kb/files/preview-pdf-page.js +1 -1
  60. package/.next/server/pages/api/kb/files/preview-pdf-page.js.nft.json +1 -1
  61. package/.next/server/pages/api/kb/files/reindex.js +1 -1
  62. package/.next/server/pages/api/kb/files/reindex.js.nft.json +1 -1
  63. package/.next/server/pages/api/kb/files.js +2 -2
  64. package/.next/server/pages/api/kb/files.js.nft.json +1 -1
  65. package/.next/server/pages/api/kb/ignore.js +1 -1
  66. package/.next/server/pages/api/kb/ignore.js.nft.json +1 -1
  67. package/.next/server/pages/api/kb/operations.js +2 -2
  68. package/.next/server/pages/api/kb/operations.js.nft.json +1 -1
  69. package/.next/server/pages/api/kb/reindex.js +1 -1
  70. package/.next/server/pages/api/kb/reindex.js.nft.json +1 -1
  71. package/.next/server/pages/api/kb/search.js +1 -1
  72. package/.next/server/pages/api/kb/search.js.nft.json +1 -1
  73. package/.next/server/pages/api/kb/stats.js +1 -1
  74. package/.next/server/pages/api/kb/stats.js.nft.json +1 -1
  75. package/.next/server/pages/api/kb/tags.js +1 -1
  76. package/.next/server/pages/api/kb/tags.js.nft.json +1 -1
  77. package/.next/server/pages/api/kb/upload/progress.js +1 -1
  78. package/.next/server/pages/api/kb/upload/progress.js.nft.json +1 -1
  79. package/.next/server/pages/api/kb/upload.js +2 -2
  80. package/.next/server/pages/api/kb/upload.js.nft.json +1 -1
  81. package/.next/server/pages/api/prompt.js +1 -1
  82. package/.next/server/pages/api/prompt.js.nft.json +1 -1
  83. package/.next/server/pages/api/system/stats.js +1 -1
  84. package/.next/server/pages/api/system/stats.js.nft.json +1 -1
  85. package/.next/server/pages/context/long-term.html +1 -1
  86. package/.next/server/pages/context/long-term.js.nft.json +1 -1
  87. package/.next/server/pages/context/short-term.html +1 -1
  88. package/.next/server/pages/context/short-term.js.nft.json +1 -1
  89. package/.next/server/pages/documents.html +1 -0
  90. package/.next/server/pages/documents.js.nft.json +1 -0
  91. package/.next/server/pages/index.html +1 -1
  92. package/.next/server/pages/index.js.nft.json +1 -1
  93. package/.next/server/pages/knowledge/file-detail.html +1 -1
  94. package/.next/server/pages/knowledge/file-detail.js.nft.json +1 -1
  95. package/.next/server/pages/knowledge/files.html +1 -1
  96. package/.next/server/pages/knowledge/files.js.nft.json +1 -1
  97. package/.next/server/pages/knowledge/manage.html +1 -1
  98. package/.next/server/pages/knowledge/manage.js.nft.json +1 -1
  99. package/.next/server/pages/knowledge/search.html +1 -1
  100. package/.next/server/pages/knowledge/search.js.nft.json +1 -1
  101. package/.next/server/pages/knowledge.html +1 -1
  102. package/.next/server/pages/knowledge.js.nft.json +1 -1
  103. package/.next/server/pages/models.html +1 -1
  104. package/.next/server/pages/models.js.nft.json +1 -1
  105. package/.next/server/pages/overview.html +1 -1
  106. package/.next/server/pages/overview.js.nft.json +1 -1
  107. package/.next/server/pages/prompt.html +1 -1
  108. package/.next/server/pages/prompt.js.nft.json +1 -1
  109. package/.next/server/pages/settings.html +1 -1
  110. package/.next/server/pages/settings.js.nft.json +1 -1
  111. package/.next/server/pages-manifest.json +20 -12
  112. package/.next/server/webpack-api-runtime.js +1 -1
  113. package/.next/server/webpack-runtime.js +1 -1
  114. package/.next/static/chunks/{15-fed70feebb38d5ae.js → 15-c0cd098235feea60.js} +2 -2
  115. package/.next/static/chunks/174-002febc1c103bc03.js +10 -0
  116. package/.next/static/chunks/{227-eb562f29334fcb34.js → 227-5d0e79ce4e00983e.js} +1 -1
  117. package/.next/static/chunks/{257-c71f52e4adae1e38.js → 257-43a44acbd7b6e330.js} +1 -1
  118. package/.next/static/chunks/{260-03f19eaee776f7fa.js → 260-b4f5be8cad9d5eb8.js} +4 -4
  119. package/.next/static/chunks/292-a1cc113f5092109b.js +16 -0
  120. package/.next/static/chunks/400-f85b695e54242828.js +78 -0
  121. package/.next/static/chunks/{425-feceb6e39a2b417d.js → 425-fe4960449c1faceb.js} +2 -2
  122. package/.next/static/chunks/{446-3bb2f94b52176cb1.js → 446-c2604ca982998533.js} +1 -1
  123. package/.next/static/chunks/455-3fed2dde34ca1eef.js +6 -0
  124. package/.next/static/chunks/{492-5245cad2f8d60d8d.js → 492-764fcf49f0c198bc.js} +1 -1
  125. package/.next/static/chunks/{544-fba84f8cd64c79ed.js → 544-b1e7fb125bd5ba92.js} +1 -1
  126. package/.next/static/chunks/{668-db7413b6a8481a6b.js → 668-ff3d8f8bff59e606.js} +2 -2
  127. package/.next/static/chunks/740-2d2619c22f2573ad.js +16 -0
  128. package/.next/static/chunks/883-76858084c93bf1c6.js +1 -0
  129. package/.next/static/chunks/{891-fde3ad128ccf30dc.js → 891-ff3efd43c148bd2c.js} +1 -1
  130. package/.next/static/chunks/958-ed6bd7651b040ee8.js +1 -0
  131. package/.next/static/chunks/969-7ca2307001c18a53.js +1 -0
  132. package/.next/static/chunks/992-52509d4b96af607f.js +1 -0
  133. package/.next/static/chunks/pages/{_app-52fa1fa291b60bee.js → _app-d9d9adbf0172510f.js} +9 -9
  134. package/.next/static/chunks/pages/context/long-term-60c9b8da1fd821a9.js +1 -0
  135. package/.next/static/chunks/pages/context/short-term-1067b9478401973f.js +1 -0
  136. package/.next/static/chunks/pages/documents-a5a4df40a6ff152d.js +1 -0
  137. package/.next/static/chunks/pages/knowledge/file-detail-761346f946ea02fd.js +1 -0
  138. package/.next/static/chunks/pages/knowledge/files-28f36c822a6efa78.js +1 -0
  139. package/.next/static/chunks/pages/knowledge/manage-3703b1829d1901da.js +1 -0
  140. package/.next/static/chunks/pages/knowledge/search-03f3c606937fd44e.js +1 -0
  141. package/.next/static/chunks/pages/knowledge-81fd1e907a6fcb84.js +1 -0
  142. package/.next/static/chunks/pages/models-0a223f1f7c826b49.js +1 -0
  143. package/.next/static/chunks/pages/overview-6088b235c99ccb83.js +1 -0
  144. package/.next/static/chunks/pages/{prompt-b3dd1eeaf8e1c72e.js → prompt-80e3d275c7f9d63b.js} +1 -1
  145. package/.next/static/chunks/pages/{settings-e6a894618727eec3.js → settings-daf6d46ceb1dbd41.js} +1 -1
  146. package/.next/static/k4Jthqz4KZmSXtMBuRWer/_buildManifest.js +1 -0
  147. package/package.json +8 -3
  148. package/.next/server/chunks/204.js +0 -1
  149. package/.next/server/chunks/270.js +0 -1
  150. package/.next/server/chunks/352.js +0 -1
  151. package/.next/server/chunks/583.js +0 -1
  152. package/.next/server/chunks/705.js +0 -1
  153. package/.next/static/5G3hi1he-iERgAflQ5C6N/_buildManifest.js +0 -1
  154. package/.next/static/chunks/455-d2aca155a3032ee0.js +0 -6
  155. package/.next/static/chunks/584-69cdccc7c09c47c9.js +0 -87
  156. package/.next/static/chunks/740-450a37b8ca6fe1c6.js +0 -16
  157. package/.next/static/chunks/840-717f0706d50fcb82.js +0 -16
  158. package/.next/static/chunks/958-0f3a960f8ebe421b.js +0 -1
  159. package/.next/static/chunks/992-6e67409e97fe9b6b.js +0 -1
  160. package/.next/static/chunks/pages/context/long-term-c26d658c17b69f42.js +0 -1
  161. package/.next/static/chunks/pages/context/short-term-4413a02c8d732c22.js +0 -1
  162. package/.next/static/chunks/pages/knowledge/file-detail-2ec816e3794317ae.js +0 -1
  163. package/.next/static/chunks/pages/knowledge/files-392fd049e0ccc02a.js +0 -1
  164. package/.next/static/chunks/pages/knowledge/manage-8fbcfeac89571725.js +0 -1
  165. package/.next/static/chunks/pages/knowledge/search-cdf2ef5d3b41e487.js +0 -1
  166. package/.next/static/chunks/pages/knowledge-b3ef77e79801287c.js +0 -1
  167. package/.next/static/chunks/pages/models-3ee0a169fc9e741e.js +0 -1
  168. package/.next/static/chunks/pages/overview-756ea4a035f2d997.js +0 -1
  169. /package/.next/static/{5G3hi1he-iERgAflQ5C6N → k4Jthqz4KZmSXtMBuRWer}/_ssgManifest.js +0 -0
package/.next/BUILD_ID CHANGED
@@ -1 +1 @@
1
- 5G3hi1he-iERgAflQ5C6N
1
+ k4Jthqz4KZmSXtMBuRWer
@@ -5,8 +5,8 @@
5
5
  "devFiles": [],
6
6
  "ampDevFiles": [],
7
7
  "lowPriorityFiles": [
8
- "static/5G3hi1he-iERgAflQ5C6N/_buildManifest.js",
9
- "static/5G3hi1he-iERgAflQ5C6N/_ssgManifest.js"
8
+ "static/k4Jthqz4KZmSXtMBuRWer/_buildManifest.js",
9
+ "static/k4Jthqz4KZmSXtMBuRWer/_ssgManifest.js"
10
10
  ],
11
11
  "rootMainFiles": [],
12
12
  "rootMainFilesTree": {},
@@ -22,7 +22,7 @@
22
22
  "static/chunks/framework-b5223c1542334872.js",
23
23
  "static/chunks/main-1a03005b3754c708.js",
24
24
  "static/css/5237c5e3358f3282.css",
25
- "static/chunks/pages/_app-52fa1fa291b60bee.js"
25
+ "static/chunks/pages/_app-d9d9adbf0172510f.js"
26
26
  ],
27
27
  "/_error": [
28
28
  "static/chunks/webpack-77d10b4726f13aa5.js",
@@ -34,148 +34,173 @@
34
34
  "static/chunks/webpack-77d10b4726f13aa5.js",
35
35
  "static/chunks/framework-b5223c1542334872.js",
36
36
  "static/chunks/main-1a03005b3754c708.js",
37
- "static/chunks/260-03f19eaee776f7fa.js",
38
- "static/chunks/544-fba84f8cd64c79ed.js",
39
- "static/chunks/425-feceb6e39a2b417d.js",
40
- "static/chunks/668-db7413b6a8481a6b.js",
41
- "static/chunks/227-eb562f29334fcb34.js",
42
- "static/chunks/740-450a37b8ca6fe1c6.js",
43
- "static/chunks/446-3bb2f94b52176cb1.js",
44
- "static/chunks/584-69cdccc7c09c47c9.js",
45
- "static/chunks/492-5245cad2f8d60d8d.js",
46
- "static/chunks/455-d2aca155a3032ee0.js",
47
- "static/chunks/257-c71f52e4adae1e38.js",
48
- "static/chunks/pages/context/long-term-c26d658c17b69f42.js"
37
+ "static/chunks/260-b4f5be8cad9d5eb8.js",
38
+ "static/chunks/544-b1e7fb125bd5ba92.js",
39
+ "static/chunks/425-fe4960449c1faceb.js",
40
+ "static/chunks/668-ff3d8f8bff59e606.js",
41
+ "static/chunks/227-5d0e79ce4e00983e.js",
42
+ "static/chunks/740-2d2619c22f2573ad.js",
43
+ "static/chunks/174-002febc1c103bc03.js",
44
+ "static/chunks/446-c2604ca982998533.js",
45
+ "static/chunks/400-f85b695e54242828.js",
46
+ "static/chunks/492-764fcf49f0c198bc.js",
47
+ "static/chunks/455-3fed2dde34ca1eef.js",
48
+ "static/chunks/257-43a44acbd7b6e330.js",
49
+ "static/chunks/pages/context/long-term-60c9b8da1fd821a9.js"
49
50
  ],
50
51
  "/context/short-term": [
51
52
  "static/chunks/webpack-77d10b4726f13aa5.js",
52
53
  "static/chunks/framework-b5223c1542334872.js",
53
54
  "static/chunks/main-1a03005b3754c708.js",
54
- "static/chunks/260-03f19eaee776f7fa.js",
55
- "static/chunks/544-fba84f8cd64c79ed.js",
56
- "static/chunks/425-feceb6e39a2b417d.js",
57
- "static/chunks/668-db7413b6a8481a6b.js",
58
- "static/chunks/227-eb562f29334fcb34.js",
59
- "static/chunks/740-450a37b8ca6fe1c6.js",
60
- "static/chunks/446-3bb2f94b52176cb1.js",
61
- "static/chunks/584-69cdccc7c09c47c9.js",
62
- "static/chunks/492-5245cad2f8d60d8d.js",
63
- "static/chunks/455-d2aca155a3032ee0.js",
64
- "static/chunks/257-c71f52e4adae1e38.js",
65
- "static/chunks/pages/context/short-term-4413a02c8d732c22.js"
55
+ "static/chunks/260-b4f5be8cad9d5eb8.js",
56
+ "static/chunks/544-b1e7fb125bd5ba92.js",
57
+ "static/chunks/425-fe4960449c1faceb.js",
58
+ "static/chunks/668-ff3d8f8bff59e606.js",
59
+ "static/chunks/227-5d0e79ce4e00983e.js",
60
+ "static/chunks/740-2d2619c22f2573ad.js",
61
+ "static/chunks/174-002febc1c103bc03.js",
62
+ "static/chunks/446-c2604ca982998533.js",
63
+ "static/chunks/400-f85b695e54242828.js",
64
+ "static/chunks/492-764fcf49f0c198bc.js",
65
+ "static/chunks/455-3fed2dde34ca1eef.js",
66
+ "static/chunks/257-43a44acbd7b6e330.js",
67
+ "static/chunks/pages/context/short-term-1067b9478401973f.js"
68
+ ],
69
+ "/documents": [
70
+ "static/chunks/webpack-77d10b4726f13aa5.js",
71
+ "static/chunks/framework-b5223c1542334872.js",
72
+ "static/chunks/main-1a03005b3754c708.js",
73
+ "static/chunks/260-b4f5be8cad9d5eb8.js",
74
+ "static/chunks/544-b1e7fb125bd5ba92.js",
75
+ "static/chunks/425-fe4960449c1faceb.js",
76
+ "static/chunks/668-ff3d8f8bff59e606.js",
77
+ "static/chunks/227-5d0e79ce4e00983e.js",
78
+ "static/chunks/740-2d2619c22f2573ad.js",
79
+ "static/chunks/174-002febc1c103bc03.js",
80
+ "static/chunks/492-764fcf49f0c198bc.js",
81
+ "static/chunks/455-3fed2dde34ca1eef.js",
82
+ "static/chunks/292-a1cc113f5092109b.js",
83
+ "static/chunks/883-76858084c93bf1c6.js",
84
+ "static/chunks/pages/documents-a5a4df40a6ff152d.js"
66
85
  ],
67
86
  "/knowledge": [
68
87
  "static/chunks/webpack-77d10b4726f13aa5.js",
69
88
  "static/chunks/framework-b5223c1542334872.js",
70
89
  "static/chunks/main-1a03005b3754c708.js",
71
- "static/chunks/pages/knowledge-b3ef77e79801287c.js"
90
+ "static/chunks/pages/knowledge-81fd1e907a6fcb84.js"
72
91
  ],
73
92
  "/knowledge/file-detail": [
74
93
  "static/chunks/webpack-77d10b4726f13aa5.js",
75
94
  "static/chunks/framework-b5223c1542334872.js",
76
95
  "static/chunks/main-1a03005b3754c708.js",
77
- "static/chunks/260-03f19eaee776f7fa.js",
78
- "static/chunks/544-fba84f8cd64c79ed.js",
79
- "static/chunks/425-feceb6e39a2b417d.js",
80
- "static/chunks/668-db7413b6a8481a6b.js",
81
- "static/chunks/227-eb562f29334fcb34.js",
82
- "static/chunks/740-450a37b8ca6fe1c6.js",
83
- "static/chunks/446-3bb2f94b52176cb1.js",
84
- "static/chunks/584-69cdccc7c09c47c9.js",
85
- "static/chunks/840-717f0706d50fcb82.js",
96
+ "static/chunks/260-b4f5be8cad9d5eb8.js",
97
+ "static/chunks/544-b1e7fb125bd5ba92.js",
98
+ "static/chunks/425-fe4960449c1faceb.js",
99
+ "static/chunks/668-ff3d8f8bff59e606.js",
100
+ "static/chunks/227-5d0e79ce4e00983e.js",
101
+ "static/chunks/740-2d2619c22f2573ad.js",
102
+ "static/chunks/174-002febc1c103bc03.js",
103
+ "static/chunks/446-c2604ca982998533.js",
104
+ "static/chunks/400-f85b695e54242828.js",
105
+ "static/chunks/292-a1cc113f5092109b.js",
106
+ "static/chunks/969-7ca2307001c18a53.js",
86
107
  "static/chunks/517-c6a8c0e680dafa46.js",
87
108
  "static/css/d284a7454d6f6b06.css",
88
- "static/chunks/pages/knowledge/file-detail-2ec816e3794317ae.js"
109
+ "static/chunks/pages/knowledge/file-detail-761346f946ea02fd.js"
89
110
  ],
90
111
  "/knowledge/files": [
91
112
  "static/chunks/webpack-77d10b4726f13aa5.js",
92
113
  "static/chunks/framework-b5223c1542334872.js",
93
114
  "static/chunks/main-1a03005b3754c708.js",
94
- "static/chunks/260-03f19eaee776f7fa.js",
95
- "static/chunks/544-fba84f8cd64c79ed.js",
96
- "static/chunks/425-feceb6e39a2b417d.js",
97
- "static/chunks/668-db7413b6a8481a6b.js",
98
- "static/chunks/227-eb562f29334fcb34.js",
99
- "static/chunks/740-450a37b8ca6fe1c6.js",
100
- "static/chunks/446-3bb2f94b52176cb1.js",
101
- "static/chunks/584-69cdccc7c09c47c9.js",
102
- "static/chunks/15-fed70feebb38d5ae.js",
115
+ "static/chunks/260-b4f5be8cad9d5eb8.js",
116
+ "static/chunks/544-b1e7fb125bd5ba92.js",
117
+ "static/chunks/425-fe4960449c1faceb.js",
118
+ "static/chunks/668-ff3d8f8bff59e606.js",
119
+ "static/chunks/227-5d0e79ce4e00983e.js",
120
+ "static/chunks/740-2d2619c22f2573ad.js",
121
+ "static/chunks/174-002febc1c103bc03.js",
122
+ "static/chunks/446-c2604ca982998533.js",
123
+ "static/chunks/400-f85b695e54242828.js",
124
+ "static/chunks/15-c0cd098235feea60.js",
103
125
  "static/css/d284a7454d6f6b06.css",
104
- "static/chunks/pages/knowledge/files-392fd049e0ccc02a.js"
126
+ "static/chunks/pages/knowledge/files-28f36c822a6efa78.js"
105
127
  ],
106
128
  "/knowledge/manage": [
107
129
  "static/chunks/webpack-77d10b4726f13aa5.js",
108
130
  "static/chunks/framework-b5223c1542334872.js",
109
131
  "static/chunks/main-1a03005b3754c708.js",
110
- "static/chunks/260-03f19eaee776f7fa.js",
111
- "static/chunks/544-fba84f8cd64c79ed.js",
112
- "static/chunks/425-feceb6e39a2b417d.js",
113
- "static/chunks/227-eb562f29334fcb34.js",
114
- "static/chunks/740-450a37b8ca6fe1c6.js",
115
- "static/chunks/446-3bb2f94b52176cb1.js",
116
- "static/chunks/584-69cdccc7c09c47c9.js",
117
- "static/chunks/958-0f3a960f8ebe421b.js",
118
- "static/chunks/891-fde3ad128ccf30dc.js",
119
- "static/chunks/pages/knowledge/manage-8fbcfeac89571725.js"
132
+ "static/chunks/260-b4f5be8cad9d5eb8.js",
133
+ "static/chunks/544-b1e7fb125bd5ba92.js",
134
+ "static/chunks/425-fe4960449c1faceb.js",
135
+ "static/chunks/227-5d0e79ce4e00983e.js",
136
+ "static/chunks/740-2d2619c22f2573ad.js",
137
+ "static/chunks/174-002febc1c103bc03.js",
138
+ "static/chunks/446-c2604ca982998533.js",
139
+ "static/chunks/400-f85b695e54242828.js",
140
+ "static/chunks/958-ed6bd7651b040ee8.js",
141
+ "static/chunks/891-ff3efd43c148bd2c.js",
142
+ "static/chunks/pages/knowledge/manage-3703b1829d1901da.js"
120
143
  ],
121
144
  "/knowledge/search": [
122
145
  "static/chunks/webpack-77d10b4726f13aa5.js",
123
146
  "static/chunks/framework-b5223c1542334872.js",
124
147
  "static/chunks/main-1a03005b3754c708.js",
125
- "static/chunks/260-03f19eaee776f7fa.js",
126
- "static/chunks/544-fba84f8cd64c79ed.js",
127
- "static/chunks/425-feceb6e39a2b417d.js",
128
- "static/chunks/668-db7413b6a8481a6b.js",
129
- "static/chunks/227-eb562f29334fcb34.js",
130
- "static/chunks/840-717f0706d50fcb82.js",
131
- "static/chunks/992-6e67409e97fe9b6b.js",
148
+ "static/chunks/260-b4f5be8cad9d5eb8.js",
149
+ "static/chunks/544-b1e7fb125bd5ba92.js",
150
+ "static/chunks/425-fe4960449c1faceb.js",
151
+ "static/chunks/668-ff3d8f8bff59e606.js",
152
+ "static/chunks/227-5d0e79ce4e00983e.js",
153
+ "static/chunks/292-a1cc113f5092109b.js",
154
+ "static/chunks/992-52509d4b96af607f.js",
155
+ "static/chunks/969-7ca2307001c18a53.js",
132
156
  "static/css/d284a7454d6f6b06.css",
133
- "static/chunks/pages/knowledge/search-cdf2ef5d3b41e487.js"
157
+ "static/chunks/pages/knowledge/search-03f3c606937fd44e.js"
134
158
  ],
135
159
  "/models": [
136
160
  "static/chunks/webpack-77d10b4726f13aa5.js",
137
161
  "static/chunks/framework-b5223c1542334872.js",
138
162
  "static/chunks/main-1a03005b3754c708.js",
139
- "static/chunks/260-03f19eaee776f7fa.js",
140
- "static/chunks/544-fba84f8cd64c79ed.js",
141
- "static/chunks/425-feceb6e39a2b417d.js",
142
- "static/chunks/668-db7413b6a8481a6b.js",
143
- "static/chunks/740-450a37b8ca6fe1c6.js",
144
- "static/chunks/492-5245cad2f8d60d8d.js",
145
- "static/chunks/455-d2aca155a3032ee0.js",
163
+ "static/chunks/260-b4f5be8cad9d5eb8.js",
164
+ "static/chunks/544-b1e7fb125bd5ba92.js",
165
+ "static/chunks/425-fe4960449c1faceb.js",
166
+ "static/chunks/668-ff3d8f8bff59e606.js",
167
+ "static/chunks/740-2d2619c22f2573ad.js",
168
+ "static/chunks/492-764fcf49f0c198bc.js",
169
+ "static/chunks/455-3fed2dde34ca1eef.js",
170
+ "static/chunks/992-52509d4b96af607f.js",
146
171
  "static/css/0e153583d22cc52e.css",
147
- "static/chunks/pages/models-3ee0a169fc9e741e.js"
172
+ "static/chunks/pages/models-0a223f1f7c826b49.js"
148
173
  ],
149
174
  "/overview": [
150
175
  "static/chunks/webpack-77d10b4726f13aa5.js",
151
176
  "static/chunks/framework-b5223c1542334872.js",
152
177
  "static/chunks/main-1a03005b3754c708.js",
153
- "static/chunks/260-03f19eaee776f7fa.js",
154
- "static/chunks/544-fba84f8cd64c79ed.js",
155
- "static/chunks/227-eb562f29334fcb34.js",
156
- "static/chunks/15-fed70feebb38d5ae.js",
157
- "static/chunks/958-0f3a960f8ebe421b.js",
158
- "static/chunks/pages/overview-756ea4a035f2d997.js"
178
+ "static/chunks/260-b4f5be8cad9d5eb8.js",
179
+ "static/chunks/544-b1e7fb125bd5ba92.js",
180
+ "static/chunks/227-5d0e79ce4e00983e.js",
181
+ "static/chunks/15-c0cd098235feea60.js",
182
+ "static/chunks/958-ed6bd7651b040ee8.js",
183
+ "static/chunks/pages/overview-6088b235c99ccb83.js"
159
184
  ],
160
185
  "/prompt": [
161
186
  "static/chunks/webpack-77d10b4726f13aa5.js",
162
187
  "static/chunks/framework-b5223c1542334872.js",
163
188
  "static/chunks/main-1a03005b3754c708.js",
164
- "static/chunks/260-03f19eaee776f7fa.js",
165
- "static/chunks/544-fba84f8cd64c79ed.js",
166
- "static/chunks/425-feceb6e39a2b417d.js",
167
- "static/chunks/668-db7413b6a8481a6b.js",
168
- "static/chunks/446-3bb2f94b52176cb1.js",
169
- "static/chunks/492-5245cad2f8d60d8d.js",
170
- "static/chunks/pages/prompt-b3dd1eeaf8e1c72e.js"
189
+ "static/chunks/260-b4f5be8cad9d5eb8.js",
190
+ "static/chunks/544-b1e7fb125bd5ba92.js",
191
+ "static/chunks/425-fe4960449c1faceb.js",
192
+ "static/chunks/668-ff3d8f8bff59e606.js",
193
+ "static/chunks/446-c2604ca982998533.js",
194
+ "static/chunks/492-764fcf49f0c198bc.js",
195
+ "static/chunks/pages/prompt-80e3d275c7f9d63b.js"
171
196
  ],
172
197
  "/settings": [
173
198
  "static/chunks/webpack-77d10b4726f13aa5.js",
174
199
  "static/chunks/framework-b5223c1542334872.js",
175
200
  "static/chunks/main-1a03005b3754c708.js",
176
- "static/chunks/260-03f19eaee776f7fa.js",
201
+ "static/chunks/260-b4f5be8cad9d5eb8.js",
177
202
  "static/css/82b6ddff0ef364fe.css",
178
- "static/chunks/pages/settings-e6a894618727eec3.js"
203
+ "static/chunks/pages/settings-daf6d46ceb1dbd41.js"
179
204
  ]
180
205
  },
181
206
  "ampFirstPages": []
@@ -3,9 +3,9 @@
3
3
  "routes": {},
4
4
  "dynamicRoutes": {},
5
5
  "preview": {
6
- "previewModeId": "1ec392421e94466b86cee671bf34ef51",
7
- "previewModeSigningKey": "348d4081c31e4a7dcdd4ae5fc953a061d90cb4d5b5ce703f4fddba968cb18986",
8
- "previewModeEncryptionKey": "aa407895dd8e9b08f9f2a47fd6e9b7bebf5b07f938231f35782646afc4e89441"
6
+ "previewModeId": "328216401862c2b0508ade2dbb1ce372",
7
+ "previewModeSigningKey": "a3e1376925f8f99123052812d59ba5c3a63be8980f18486fbfa5f44d9e4e42f6",
8
+ "previewModeEncryptionKey": "a2b794c14752cbb41b3d43ed886b63e10559ccefebdddb2cf321c70df0b84ec6"
9
9
  },
10
10
  "notFoundRoutes": []
11
11
  }
@@ -92,6 +92,12 @@
92
92
  "routeKeys": {},
93
93
  "namedRegex": "^/context/short\\-term(?:/)?$"
94
94
  },
95
+ {
96
+ "page": "/documents",
97
+ "regex": "^/documents(?:/)?$",
98
+ "routeKeys": {},
99
+ "namedRegex": "^/documents(?:/)?$"
100
+ },
95
101
  {
96
102
  "page": "/knowledge",
97
103
  "regex": "^/knowledge(?:/)?$",
@@ -0,0 +1 @@
1
+ exports.id=2583,exports.ids=[2583],exports.modules={6936:(a,b)=>{"use strict";function c(a){return"/api"===a||!!(null==a?void 0:a.startsWith("/api/"))}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isAPIRoute",{enumerable:!0,get:function(){return c}})},9897:(a,b,c)=>{"use strict";a.exports=c(3999).vendored.contexts.HeadManagerContext},14061:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{createKey:function(){return R},default:function(){return U},matchesMiddleware:function(){return J}});let d=c(2403),e=c(12742),f=c(56001),g=c(63935),h=c(94532),i=e._(c(71702)),j=c(9612),k=c(57241),l=d._(c(78661)),m=c(8423),n=c(8844),o=c(97238),p=c(43438),q=c(16889),r=c(82865);c(88123);let s=c(84495),t=c(56902),u=c(67305),v=c(18884),w=c(72141),x=c(5652),y=c(79348),z=c(6936),A=c(13712),B=c(26975),C=c(89704),D=c(56402);c(84580);let E=c(35987),F=c(37018),G=c(91831),H=c(47274);function I(){return Object.assign(Object.defineProperty(Error("Route Cancelled"),"__NEXT_ERROR_CODE",{value:"E315",enumerable:!1,configurable:!0}),{cancelled:!0})}async function J(a){let b=await Promise.resolve(a.router.pageLoader.getMiddleware());if(!b)return!1;let{pathname:c}=(0,s.parsePath)(a.asPath),d=(0,x.hasBasePath)(c)?(0,v.removeBasePath)(c):c,e=(0,w.addBasePath)((0,t.addLocale)(d,a.locale));return b.some(a=>new RegExp(a.regexp).test(e))}function K(a){let b=(0,m.getLocationOrigin)();return a.startsWith(b)?a.substring(b.length):a}function L(a,b,c){let[d,e]=(0,y.resolveHref)(a,b,!0),f=(0,m.getLocationOrigin)(),g=d.startsWith(f),h=e&&e.startsWith(f);d=K(d),e=e?K(e):e;let i=g?d:(0,w.addBasePath)(d),j=c?K((0,y.resolveHref)(a,c)):e||d;return{url:i,as:h?j:(0,w.addBasePath)(j)}}function M(a,b){let c=(0,f.removeTrailingSlash)((0,j.denormalizePagePath)(a));return"/404"===c||"/_error"===c?a:(b.includes(c)||b.some(b=>{if((0,n.isDynamicRoute)(b)&&(0,q.getRouteRegex)(b).re.test(c))return a=b,!0}),(0,f.removeTrailingSlash)(a))}async function N(a){if(!await J(a)||!a.fetchData)return null;let b=await a.fetchData(),c=await function(a,b,c){let d={basePath:c.router.basePath,i18n:{locales:c.router.locales},trailingSlash:!1},e=b.headers.get("x-nextjs-rewrite"),h=e||b.headers.get("x-nextjs-matched-path"),i=b.headers.get(H.MATCHED_PATH_HEADER);if(!i||h||i.includes("__next_data_catchall")||i.includes("/_error")||i.includes("/404")||(h=i),h){if(h.startsWith("/")){let b=(0,o.parseRelativeUrl)(h),i=(0,A.getNextPathnameInfo)(b.pathname,{nextConfig:d,parseData:!0}),j=(0,f.removeTrailingSlash)(i.pathname);return Promise.all([c.router.pageLoader.getPageList(),(0,g.getClientBuildManifest)()]).then(f=>{let[g,{__rewrites:h}]=f,l=(0,t.addLocale)(i.pathname,i.locale);if((0,n.isDynamicRoute)(l)||!e&&g.includes((0,k.normalizeLocalePath)((0,v.removeBasePath)(l),c.router.locales).pathname)){let c=(0,A.getNextPathnameInfo)((0,o.parseRelativeUrl)(a).pathname,{nextConfig:d,parseData:!0});b.pathname=l=(0,w.addBasePath)(c.pathname)}if(!g.includes(j)){let a=M(j,g);a!==j&&(j=a)}let m=g.includes(j)?j:M((0,k.normalizeLocalePath)((0,v.removeBasePath)(b.pathname),c.router.locales).pathname,g);if((0,n.isDynamicRoute)(m)){let a=(0,p.getRouteMatcher)((0,q.getRouteRegex)(m))(l);Object.assign(b.query,a||{})}return{type:"rewrite",parsedAs:b,resolvedHref:m}})}let b=(0,s.parsePath)(a);return Promise.resolve({type:"redirect-external",destination:""+(0,B.formatNextPathnameInfo)({...(0,A.getNextPathnameInfo)(b.pathname,{nextConfig:d,parseData:!0}),defaultLocale:c.router.defaultLocale,buildId:""})+b.query+b.hash})}let j=b.headers.get("x-nextjs-redirect");if(j){if(j.startsWith("/")){let a=(0,s.parsePath)(j),b=(0,B.formatNextPathnameInfo)({...(0,A.getNextPathnameInfo)(a.pathname,{nextConfig:d,parseData:!0}),defaultLocale:c.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+b+a.query+a.hash,newUrl:""+b+a.query+a.hash})}return Promise.resolve({type:"redirect-external",destination:j})}return Promise.resolve({type:"next"})}(b.dataHref,b.response,a);return{dataHref:b.dataHref,json:b.json,response:b.response,text:b.text,cacheKey:b.cacheKey,effect:c}}let O=Symbol("SSG_DATA_NOT_FOUND");function P(a){try{return JSON.parse(a)}catch(a){return null}}function Q(a){let{dataHref:b,inflightCache:c,isPrefetch:d,hasMiddleware:e,isServerRender:f,parseJSON:h,persistCache:i,isBackground:j,unstable_skipClientCache:k}=a,{href:l}=new URL(b,window.location.href),m=a=>{var j;return(function a(b,c,d){return fetch(b,{credentials:"same-origin",method:d.method||"GET",headers:Object.assign({},d.headers,{"x-nextjs-data":"1"})}).then(e=>!e.ok&&c>1&&e.status>=500?a(b,c-1,d):e)})(b,f?3:1,{headers:Object.assign({},d?{purpose:"prefetch"}:{},d&&e?{"x-middleware-prefetch":"1"}:{},{}),method:null!=(j=null==a?void 0:a.method)?j:"GET"}).then(c=>c.ok&&(null==a?void 0:a.method)==="HEAD"?{dataHref:b,response:c,text:"",json:{},cacheKey:l}:c.text().then(a=>{if(!c.ok){if(e&&[301,302,307,308].includes(c.status))return{dataHref:b,response:c,text:a,json:{},cacheKey:l};if(404===c.status){var d;if(null==(d=P(a))?void 0:d.notFound)return{dataHref:b,json:{notFound:O},response:c,text:a,cacheKey:l}}let h=Object.defineProperty(Error("Failed to load static props"),"__NEXT_ERROR_CODE",{value:"E124",enumerable:!1,configurable:!0});throw f||(0,g.markAssetError)(h),h}return{dataHref:b,json:h?P(a):null,response:c,text:a,cacheKey:l}})).then(a=>(i&&"no-cache"!==a.response.headers.get("x-middleware-cache")||delete c[l],a)).catch(a=>{throw k||delete c[l],("Failed to fetch"===a.message||"NetworkError when attempting to fetch resource."===a.message||"Load failed"===a.message)&&(0,g.markAssetError)(a),a})};return k&&i?m({}).then(a=>("no-cache"!==a.response.headers.get("x-middleware-cache")&&(c[l]=Promise.resolve(a)),a)):void 0!==c[l]?c[l]:c[l]=m(j?{method:"HEAD"}:{})}function R(){return Math.random().toString(36).slice(2,10)}function S(a){let{url:b,router:c}=a;if(b===(0,w.addBasePath)((0,t.addLocale)(c.asPath,c.locale)))throw Object.defineProperty(Error("Invariant: attempted to hard navigate to the same URL "+b+" "+location.href),"__NEXT_ERROR_CODE",{value:"E282",enumerable:!1,configurable:!0});window.location.href=b}let T=a=>{let{route:b,router:c}=a,d=!1,e=c.clc=()=>{d=!0};return()=>{if(d){let a=Object.defineProperty(Error('Abort fetching component for route: "'+b+'"'),"__NEXT_ERROR_CODE",{value:"E483",enumerable:!1,configurable:!0});throw a.cancelled=!0,a}e===c.clc&&(c.clc=null)}};class U{reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(a,b,c){return void 0===c&&(c={}),{url:a,as:b}=L(this,a,b),this.change("pushState",a,b,c)}replace(a,b,c){return void 0===c&&(c={}),{url:a,as:b}=L(this,a,b),this.change("replaceState",a,b,c)}async _bfl(a,b,d,e){{if(!this._bfl_s&&!this._bfl_d){let b,f,{BloomFilter:h}=c(40404);try{({__routerFilterStatic:b,__routerFilterDynamic:f}=await (0,g.getClientBuildManifest)())}catch(b){if(console.error(b),e)return!0;return S({url:(0,w.addBasePath)((0,t.addLocale)(a,d||this.locale,this.defaultLocale)),router:this}),new Promise(()=>{})}(null==b?void 0:b.numHashes)&&(this._bfl_s=new h(b.numItems,b.errorRate),this._bfl_s.import(b)),(null==f?void 0:f.numHashes)&&(this._bfl_d=new h(f.numItems,f.errorRate),this._bfl_d.import(f))}let k=!1,l=!1;for(let{as:c,allowMatchCurrent:g}of[{as:a},{as:b}])if(c){let b=(0,f.removeTrailingSlash)(new URL(c,"http://n").pathname),m=(0,w.addBasePath)((0,t.addLocale)(b,d||this.locale));if(g||b!==(0,f.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var h,i,j;for(let a of(k=k||!!(null==(h=this._bfl_s)?void 0:h.contains(b))||!!(null==(i=this._bfl_s)?void 0:i.contains(m)),[b,m])){let b=a.split("/");for(let a=0;!l&&a<b.length+1;a++){let c=b.slice(0,a).join("/");if(c&&(null==(j=this._bfl_d)?void 0:j.contains(c))){l=!0;break}}}if(k||l){if(e)return!0;return S({url:(0,w.addBasePath)((0,t.addLocale)(a,d||this.locale,this.defaultLocale)),router:this}),new Promise(()=>{})}}}}return!1}async change(a,b,c,d,e){var j,k,l,y,z,A,B,G,H;let K,N;if(!(0,D.isLocalURL)(b))return S({url:b,router:this}),!1;let P=1===d._h;P||d.shallow||await this._bfl(c,void 0,d.locale);let Q=P||d._shouldResolveHref||(0,s.parsePath)(b).pathname===(0,s.parsePath)(c).pathname,R={...this.state},T=!0!==this.isReady;this.isReady=!0;let V=this.isSsr;if(P||(this.isSsr=!1),P&&this.clc)return!1;let W=R.locale;m.ST&&performance.mark("routeChange");let{shallow:X=!1,scroll:Y=!0}=d,Z={shallow:X};this._inFlightRoute&&this.clc&&(V||U.events.emit("routeChangeError",I(),this._inFlightRoute,Z),this.clc(),this.clc=null),c=(0,w.addBasePath)((0,t.addLocale)((0,x.hasBasePath)(c)?(0,v.removeBasePath)(c):c,d.locale,this.defaultLocale));let $=(0,u.removeLocale)((0,x.hasBasePath)(c)?(0,v.removeBasePath)(c):c,R.locale);this._inFlightRoute=c;let _=W!==R.locale;if(!P&&this.onlyAHashChange($)&&!_){R.asPath=$,U.events.emit("hashChangeStart",c,Z),this.changeState(a,b,c,{...d,scroll:!1}),Y&&this.scrollToHash($);try{await this.set(R,this.components[R.route],null)}catch(a){throw(0,i.default)(a)&&a.cancelled&&U.events.emit("routeChangeError",a,$,Z),a}return U.events.emit("hashChangeComplete",c,Z),!0}let aa=(0,o.parseRelativeUrl)(b),{pathname:ab,query:ac}=aa;try{[K,{__rewrites:N}]=await Promise.all([this.pageLoader.getPageList(),(0,g.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(a){return S({url:c,router:this}),!1}this.urlIsNew($)||_||(a="replaceState");let ad=c;ab=ab?(0,f.removeTrailingSlash)((0,v.removeBasePath)(ab)):ab;let ae=(0,f.removeTrailingSlash)(ab),af=c.startsWith("/")&&(0,o.parseRelativeUrl)(c).pathname;if(null==(j=this.components[ab])?void 0:j.__appRouter)return S({url:c,router:this}),new Promise(()=>{});let ag=!!(af&&ae!==af&&(!(0,n.isDynamicRoute)(ae)||!(0,p.getRouteMatcher)((0,q.getRouteRegex)(ae))(af))),ah=!d.shallow&&await J({asPath:c,locale:R.locale,router:this});if(P&&ah&&(Q=!1),Q&&"/_error"!==ab&&(d._shouldResolveHref=!0,aa.pathname=M(ab,K),aa.pathname!==ab&&(ab=aa.pathname,aa.pathname=(0,w.addBasePath)(ab),ah||(b=(0,r.formatWithValidation)(aa)))),!(0,D.isLocalURL)(c))return S({url:c,router:this}),!1;ad=(0,u.removeLocale)((0,v.removeBasePath)(ad),R.locale),ae=(0,f.removeTrailingSlash)(ab);let ai=!1;if((0,n.isDynamicRoute)(ae)){let a=(0,o.parseRelativeUrl)(ad),d=a.pathname,e=(0,q.getRouteRegex)(ae);ai=(0,p.getRouteMatcher)(e)(d);let f=ae===d,g=f?(0,F.interpolateAs)(ae,d,ac):{};if(ai&&(!f||g.result))f?c=(0,r.formatWithValidation)(Object.assign({},a,{pathname:g.result,query:(0,E.omit)(ac,g.params)})):Object.assign(ac,ai);else{let a=Object.keys(e.groups).filter(a=>!ac[a]&&!e.groups[a].optional);if(a.length>0&&!ah)throw Object.defineProperty(Error((f?"The provided `href` ("+b+") value is missing query values ("+a.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+d+") is incompatible with the `href` value ("+ae+"). ")+"Read more: https://nextjs.org/docs/messages/"+(f?"href-interpolation-failed":"incompatible-href-as")),"__NEXT_ERROR_CODE",{value:"E344",enumerable:!1,configurable:!0})}}P||U.events.emit("routeChangeStart",c,Z);let aj="/404"===this.pathname||"/_error"===this.pathname;try{let f=await this.getRouteInfo({route:ae,pathname:ab,query:ac,as:c,resolvedAs:ad,routeProps:Z,locale:R.locale,isPreview:R.isPreview,hasMiddleware:ah,unstable_skipClientCache:d.unstable_skipClientCache,isQueryUpdating:P&&!this.isFallback,isMiddlewareRewrite:ag});if(P||d.shallow||await this._bfl(c,"resolvedAs"in f?f.resolvedAs:void 0,R.locale),"route"in f&&ah){ae=ab=f.route||ae,Z.shallow||(ac=Object.assign({},f.query||{},ac));let a=(0,x.hasBasePath)(aa.pathname)?(0,v.removeBasePath)(aa.pathname):aa.pathname;if(ai&&ab!==a&&Object.keys(ai).forEach(a=>{ai&&ac[a]===ai[a]&&delete ac[a]}),(0,n.isDynamicRoute)(ab)){let a=!Z.shallow&&f.resolvedAs?f.resolvedAs:(0,w.addBasePath)((0,t.addLocale)(new URL(c,location.href).pathname,R.locale),!0);(0,x.hasBasePath)(a)&&(a=(0,v.removeBasePath)(a));let b=(0,q.getRouteRegex)(ab),d=(0,p.getRouteMatcher)(b)(new URL(a,location.href).pathname);d&&Object.assign(ac,d)}}if("type"in f)if("redirect-internal"===f.type)return this.change(a,f.newUrl,f.newAs,d);else return S({url:f.destination,router:this}),new Promise(()=>{});let g=f.Component;if(g&&g.unstable_scriptLoader&&[].concat(g.unstable_scriptLoader()).forEach(a=>{(0,h.handleClientScriptLoad)(a.props)}),(f.__N_SSG||f.__N_SSP)&&f.props){if(f.props.pageProps&&f.props.pageProps.__N_REDIRECT){d.locale=!1;let b=f.props.pageProps.__N_REDIRECT;if(b.startsWith("/")&&!1!==f.props.pageProps.__N_REDIRECT_BASE_PATH){let c=(0,o.parseRelativeUrl)(b);c.pathname=M(c.pathname,K);let{url:e,as:f}=L(this,b,b);return this.change(a,e,f,d)}return S({url:b,router:this}),new Promise(()=>{})}if(R.isPreview=!!f.props.__N_PREVIEW,f.props.notFound===O){let a;try{await this.fetchComponent("/404"),a="/404"}catch(b){a="/_error"}if(f=await this.getRouteInfo({route:a,pathname:a,query:ac,as:c,resolvedAs:ad,routeProps:{shallow:!1},locale:R.locale,isPreview:R.isPreview,isNotFound:!0}),"type"in f)throw Object.defineProperty(Error("Unexpected middleware effect on /404"),"__NEXT_ERROR_CODE",{value:"E158",enumerable:!1,configurable:!0})}}P&&"/_error"===this.pathname&&(null==(l=self.__NEXT_DATA__.props)||null==(k=l.pageProps)?void 0:k.statusCode)===500&&(null==(y=f.props)?void 0:y.pageProps)&&(f.props.pageProps.statusCode=500);let j=d.shallow&&R.route===(null!=(z=f.route)?z:ae),m=null!=(A=d.scroll)?A:!P&&!j,r=null!=e?e:m?{x:0,y:0}:null,s={...R,route:ae,pathname:ab,query:ac,asPath:$,isFallback:!1};if(P&&aj){if(f=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:ac,as:c,resolvedAs:ad,routeProps:{shallow:!1},locale:R.locale,isPreview:R.isPreview,isQueryUpdating:P&&!this.isFallback}),"type"in f)throw Object.defineProperty(Error("Unexpected middleware effect on "+this.pathname),"__NEXT_ERROR_CODE",{value:"E225",enumerable:!1,configurable:!0});"/_error"===this.pathname&&(null==(G=self.__NEXT_DATA__.props)||null==(B=G.pageProps)?void 0:B.statusCode)===500&&(null==(H=f.props)?void 0:H.pageProps)&&(f.props.pageProps.statusCode=500);try{await this.set(s,f,r)}catch(a){throw(0,i.default)(a)&&a.cancelled&&U.events.emit("routeChangeError",a,$,Z),a}return!0}if(U.events.emit("beforeHistoryChange",c,Z),this.changeState(a,b,c,d),!(P&&!r&&!T&&!_&&(0,C.compareRouterStates)(s,this.state))){try{await this.set(s,f,r)}catch(a){if(a.cancelled)f.error=f.error||a;else throw a}if(f.error)throw P||U.events.emit("routeChangeError",f.error,$,Z),f.error;P||U.events.emit("routeChangeComplete",c,Z),m&&/#.+$/.test(c)&&this.scrollToHash(c)}return!0}catch(a){if((0,i.default)(a)&&a.cancelled)return!1;throw a}}changeState(a,b,c,d){void 0===d&&(d={}),("pushState"!==a||(0,m.getURL)()!==c)&&(this._shallow=d.shallow,window.history[a]({url:b,as:c,options:d,__N:!0,key:this._key="pushState"!==a?this._key:R()},"",c))}async handleRouteInfoError(a,b,c,d,e,f){if(a.cancelled)throw a;if((0,g.isAssetError)(a)||f)throw U.events.emit("routeChangeError",a,d,e),S({url:d,router:this}),I();console.error(a);try{let d,{page:e,styleSheets:f}=await this.fetchComponent("/_error"),g={props:d,Component:e,styleSheets:f,err:a,error:a};if(!g.props)try{g.props=await this.getInitialProps(e,{err:a,pathname:b,query:c})}catch(a){console.error("Error in error page `getInitialProps`: ",a),g.props={}}return g}catch(a){return this.handleRouteInfoError((0,i.default)(a)?a:Object.defineProperty(Error(a+""),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),b,c,d,e,!0)}}async getRouteInfo(a){let{route:b,pathname:c,query:d,as:e,resolvedAs:g,routeProps:h,locale:j,hasMiddleware:l,isPreview:m,unstable_skipClientCache:n,isQueryUpdating:o,isMiddlewareRewrite:p,isNotFound:q}=a,s=b;try{var t,u,w,x;let a=this.components[s];if(h.shallow&&a&&this.route===s)return a;let b=T({route:s,router:this});l&&(a=void 0);let i=!a||"initial"in a?void 0:a,y={dataHref:this.pageLoader.getDataHref({href:(0,r.formatWithValidation)({pathname:c,query:d}),skipInterpolation:!0,asPath:q?"/404":g,locale:j}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:o?this.sbc:this.sdc,persistCache:!m,isPrefetch:!1,unstable_skipClientCache:n,isBackground:o},A=o&&!p?null:await N({fetchData:()=>Q(y),asPath:q?"/404":g,locale:j,router:this}).catch(a=>{if(o)return null;throw a});if(A&&("/_error"===c||"/404"===c)&&(A.effect=void 0),o&&(A?A.json=self.__NEXT_DATA__.props:A={json:self.__NEXT_DATA__.props}),b(),(null==A||null==(t=A.effect)?void 0:t.type)==="redirect-internal"||(null==A||null==(u=A.effect)?void 0:u.type)==="redirect-external")return A.effect;if((null==A||null==(w=A.effect)?void 0:w.type)==="rewrite"){let b=(0,f.removeTrailingSlash)(A.effect.resolvedHref),e=await this.pageLoader.getPageList();if((!o||e.includes(b))&&(s=b,c=A.effect.resolvedHref,d={...d,...A.effect.parsedAs.query},g=(0,v.removeBasePath)((0,k.normalizeLocalePath)(A.effect.parsedAs.pathname,this.locales).pathname),a=this.components[s],h.shallow&&a&&this.route===s&&!l))return{...a,route:s}}if((0,z.isAPIRoute)(s))return S({url:e,router:this}),new Promise(()=>{});let B=i||await this.fetchComponent(s).then(a=>({Component:a.page,styleSheets:a.styleSheets,__N_SSG:a.mod.__N_SSG,__N_SSP:a.mod.__N_SSP})),C=null==A||null==(x=A.response)?void 0:x.headers.get("x-middleware-skip"),D=B.__N_SSG||B.__N_SSP;C&&(null==A?void 0:A.dataHref)&&delete this.sdc[A.dataHref];let{props:E,cacheKey:F}=await this._getData(async()=>{if(D){if((null==A?void 0:A.json)&&!C)return{cacheKey:A.cacheKey,props:A.json};let a=(null==A?void 0:A.dataHref)?A.dataHref:this.pageLoader.getDataHref({href:(0,r.formatWithValidation)({pathname:c,query:d}),asPath:g,locale:j}),b=await Q({dataHref:a,isServerRender:this.isSsr,parseJSON:!0,inflightCache:C?{}:this.sdc,persistCache:!m,isPrefetch:!1,unstable_skipClientCache:n});return{cacheKey:b.cacheKey,props:b.json||{}}}return{headers:{},props:await this.getInitialProps(B.Component,{pathname:c,query:d,asPath:e,locale:j,locales:this.locales,defaultLocale:this.defaultLocale})}});return B.__N_SSP&&y.dataHref&&F&&delete this.sdc[F],this.isPreview||!B.__N_SSG||o||Q(Object.assign({},y,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),E.pageProps=Object.assign({},E.pageProps),B.props=E,B.route=s,B.query=d,B.resolvedAs=g,this.components[s]=B,B}catch(a){return this.handleRouteInfoError((0,i.getProperError)(a),c,d,e,h)}}set(a,b,c){return this.state=a,this.sub(b,this.components["/_app"].Component,c)}beforePopState(a){this._bps=a}onlyAHashChange(a){if(!this.asPath)return!1;let[b,c]=this.asPath.split("#",2),[d,e]=a.split("#",2);return!!e&&b===d&&c===e||b===d&&c!==e}scrollToHash(a){let[,b=""]=a.split("#",2);(0,G.disableSmoothScrollDuringRouteTransition)(()=>{if(""===b||"top"===b)return void window.scrollTo(0,0);let a=decodeURIComponent(b),c=document.getElementById(a);if(c)return void c.scrollIntoView();let d=document.getElementsByName(a)[0];d&&d.scrollIntoView()},{onlyHashChange:this.onlyAHashChange(a)})}urlIsNew(a){return this.asPath!==a}async prefetch(a,b,c){void 0===b&&(b=a),void 0===c&&(c={});let d=(0,o.parseRelativeUrl)(a),e=d.pathname,{pathname:g,query:h}=d,i=g,j=await this.pageLoader.getPageList(),k=b,l=void 0!==c.locale?c.locale||void 0:this.locale,m=await J({asPath:b,locale:l,router:this});d.pathname=M(d.pathname,j),(0,n.isDynamicRoute)(d.pathname)&&(g=d.pathname,d.pathname=g,Object.assign(h,(0,p.getRouteMatcher)((0,q.getRouteRegex)(d.pathname))((0,s.parsePath)(b).pathname)||{}),m||(a=(0,r.formatWithValidation)(d)));let t=await N({fetchData:()=>Q({dataHref:this.pageLoader.getDataHref({href:(0,r.formatWithValidation)({pathname:i,query:h}),skipInterpolation:!0,asPath:k,locale:l}),hasMiddleware:!0,isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:b,locale:l,router:this});if((null==t?void 0:t.effect.type)==="rewrite"&&(d.pathname=t.effect.resolvedHref,g=t.effect.resolvedHref,h={...h,...t.effect.parsedAs.query},k=t.effect.parsedAs.pathname,a=(0,r.formatWithValidation)(d)),(null==t?void 0:t.effect.type)==="redirect-external")return;let u=(0,f.removeTrailingSlash)(g);await this._bfl(b,k,c.locale,!0)&&(this.components[e]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(u).then(b=>!!b&&Q({dataHref:(null==t?void 0:t.json)?null==t?void 0:t.dataHref:this.pageLoader.getDataHref({href:a,asPath:k,locale:l}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:c.unstable_skipClientCache||c.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[c.priority?"loadPage":"prefetch"](u)])}async fetchComponent(a){let b=T({route:a,router:this});try{let c=await this.pageLoader.loadPage(a);return b(),c}catch(a){throw b(),a}}_getData(a){let b=!1,c=()=>{b=!0};return this.clc=c,a().then(a=>{if(c===this.clc&&(this.clc=null),b){let a=Object.defineProperty(Error("Loading initial props cancelled"),"__NEXT_ERROR_CODE",{value:"E405",enumerable:!1,configurable:!0});throw a.cancelled=!0,a}return a})}getInitialProps(a,b){let{Component:c}=this.components["/_app"],d=this._wrapApp(c);return b.AppTree=d,(0,m.loadGetInitialProps)(c,{AppTree:d,Component:a,router:this,ctx:b})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(a,b,c,{initialProps:d,pageLoader:e,App:g,wrapApp:h,Component:i,err:j,subscription:k,isFallback:l,locale:p,locales:q,defaultLocale:s,domainLocales:t,isPreview:u}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=R(),this.onPopState=a=>{let b,{isFirstPopStateEvent:c}=this;this.isFirstPopStateEvent=!1;let d=a.state;if(!d){let{pathname:a,query:b}=this;this.changeState("replaceState",(0,r.formatWithValidation)({pathname:(0,w.addBasePath)(a),query:b}),(0,m.getURL)());return}if(d.__NA)return void window.location.reload();if(!d.__N||c&&this.locale===d.options.locale&&d.as===this.asPath)return;let{url:e,as:f,options:g,key:h}=d;this._key=h;let{pathname:i}=(0,o.parseRelativeUrl)(e);(!this.isSsr||f!==(0,w.addBasePath)(this.asPath)||i!==(0,w.addBasePath)(this.pathname))&&(!this._bps||this._bps(d))&&this.change("replaceState",e,f,Object.assign({},g,{shallow:g.shallow&&this._shallow,locale:g.locale||this.defaultLocale,_h:0}),b)};let v=(0,f.removeTrailingSlash)(a);this.components={},"/_error"!==a&&(this.components[v]={Component:i,initial:!0,props:d,err:j,__N_SSG:d&&d.__N_SSG,__N_SSP:d&&d.__N_SSP}),this.components["/_app"]={Component:g,styleSheets:[]},this.events=U.events,this.pageLoader=e;let x=(0,n.isDynamicRoute)(a)&&self.__NEXT_DATA__.autoExport;this.basePath="",this.sub=k,this.clc=null,this._wrapApp=h,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.isExperimentalCompile||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!x&&!self.location.search),this.state={route:v,pathname:a,query:b,asPath:x?a:c,isPreview:!!u,locale:void 0,isFallback:l},this._initialMatchesMiddlewarePromise=Promise.resolve(!1)}}U.events=(0,l.default)()},18884:(a,b,c)=>{"use strict";function d(a){return a}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"removeBasePath",{enumerable:!0,get:function(){return d}}),c(5652),("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},21364:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"setAttributesFromProps",{enumerable:!0,get:function(){return f}});let c={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"},d=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"];function e(a){return["async","defer","noModule"].includes(a)}function f(a,b){for(let[f,g]of Object.entries(b)){if(!b.hasOwnProperty(f)||d.includes(f)||void 0===g)continue;let h=c[f]||f.toLowerCase();"SCRIPT"===a.tagName&&e(h)?a[h]=!!g:a.setAttribute(h,String(g)),(!1===g||"SCRIPT"===a.tagName&&e(h)&&(!g||"false"===g))&&(a.setAttribute(h,""),a.removeAttribute(h))}}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},28032:(a,b,c)=>{(()=>{var b={154:(a,b,c)=>{var d=c(781),e=["write","end","destroy"],f=["resume","pause"],g=["data","close"],h=Array.prototype.slice;function i(a,b){if(a.forEach)return a.forEach(b);for(var c=0;c<a.length;c++)b(a[c],c)}a.exports=function(a,b){var c=new d,j=!1;return i(e,function(b){c[b]=function(){return a[b].apply(a,arguments)}}),i(f,function(a){c[a]=function(){c.emit(a);var d=b[a];if(d)return d.apply(b,arguments);b.emit(a)}}),i(g,function(a){b.on(a,function(){var b=h.call(arguments);b.unshift(a),c.emit.apply(c,b)})}),b.on("end",function(){if(!j){j=!0;var a=h.call(arguments);a.unshift("end"),c.emit.apply(c,a)}}),a.on("drain",function(){c.emit("drain")}),a.on("error",k),b.on("error",k),c.writable=a.writable,c.readable=b.readable,c;function k(a){c.emit("error",a)}}},349:(a,b,c)=>{"use strict";let d=c(147),e=c(781),f=c(796),g=c(154),h=c(530),i=a=>Object.assign({level:9},a);a.exports=(a,b)=>a?h(f.gzip)(a,i(b)).then(a=>a.length).catch(a=>0):Promise.resolve(0),a.exports.sync=(a,b)=>f.gzipSync(a,i(b)).length,a.exports.stream=a=>{let b=new e.PassThrough,c=new e.PassThrough,d=g(b,c),h=0,j=f.createGzip(i(a)).on("data",a=>{h+=a.length}).on("error",()=>{d.gzipSize=0}).on("end",()=>{d.gzipSize=h,d.emit("gzip-size",h),c.end()});return b.pipe(j),b.pipe(c,{end:!1}),d},a.exports.file=(b,c)=>new Promise((e,f)=>{let g=d.createReadStream(b);g.on("error",f);let h=g.pipe(a.exports.stream(c));h.on("error",f),h.on("gzip-size",e)}),a.exports.fileSync=(b,c)=>a.exports.sync(d.readFileSync(b),c)},530:a=>{"use strict";let b=(a,b)=>function(...c){return new b.promiseModule((d,e)=>{b.multiArgs?c.push((...a)=>{b.errorFirst?a[0]?e(a):(a.shift(),d(a)):d(a)}):b.errorFirst?c.push((a,b)=>{a?e(a):d(b)}):c.push(d),a.apply(this,c)})};a.exports=(a,c)=>{let d;c=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},c);let e=typeof a;if(null===a||"object"!==e&&"function"!==e)throw TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===a?"null":e}\``);let f=a=>{let b=b=>"string"==typeof b?a===b:b.test(a);return c.include?c.include.some(b):!c.exclude.some(b)};for(let g in d="function"===e?function(...d){return c.excludeMain?a(...d):b(a,c).apply(this,d)}:Object.create(Object.getPrototypeOf(a)),a){let e=a[g];d[g]="function"==typeof e&&f(g)?b(e,c):e}return d}},147:a=>{"use strict";a.exports=c(29021)},781:a=>{"use strict";a.exports=c(27910)},796:a=>{"use strict";a.exports=c(74075)}},d={};function e(a){var c=d[a];if(void 0!==c)return c.exports;var f=d[a]={exports:{}},g=!0;try{b[a](f,f.exports,e),g=!1}finally{g&&delete d[a]}return f.exports}e.ab=__dirname+"/",a.exports=e(349)})()},32538:(a,b)=>{"use strict";function c(a,b){return void 0===b&&(b=""),("/"===a?"/index":/^\/index(\/|$)/.test(a)?"/index"+a:a)+b}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return c}})},32784:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return f}}),c(2403);let d=c(8732);c(82015);let e=c(50749);function f(a){function b(b){return(0,d.jsx)(a,{router:(0,e.useRouter)(),...b})}return b.getInitialProps=a.getInitialProps,b.origGetInitialProps=a.origGetInitialProps,b}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},37808:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"warnOnce",{enumerable:!0,get:function(){return c}});let c=a=>{}},40375:(a,b)=>{"use strict";let c;function d(a){return(null==c?void 0:c.createScriptURL(a))||a}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return d}}),("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},40404:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"BloomFilter",{enumerable:!0,get:function(){return d}});class d{static from(a,b){void 0===b&&(b=1e-4);let c=new d(a.length,b);for(let b of a)c.add(b);return c}export(){let a={numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray};if(this.errorRate<1e-4){let b=JSON.stringify(a),d=c(28032).sync(b);d>1024&&console.warn("Creating filter with error rate less than 0.1% (0.001) can increase the size dramatically proceed with caution. Received error rate "+this.errorRate+" resulted in size "+b.length+" bytes, "+d+" bytes (gzip)")}return a}import(a){this.numItems=a.numItems,this.errorRate=a.errorRate,this.numBits=a.numBits,this.numHashes=a.numHashes,this.bitArray=a.bitArray}add(a){this.getHashValues(a).forEach(a=>{this.bitArray[a]=1})}contains(a){return this.getHashValues(a).every(a=>this.bitArray[a])}getHashValues(a){let b=[];for(let c=1;c<=this.numHashes;c++){let d=function(a){let b=0;for(let c=0;c<a.length;c++)b=Math.imul(b^a.charCodeAt(c),0x5bd1e995),b^=b>>>13,b=Math.imul(b,0x5bd1e995);return b>>>0}(""+a+c)%this.numBits;b.push(d)}return b}constructor(a,b=1e-4){this.numItems=a,this.errorRate=b,this.numBits=Math.ceil(-(a*Math.log(b))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/a*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},42583:(a,b,c)=>{a.exports=c(50749)},50749:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{Router:function(){return f.default},createRouter:function(){return p},default:function(){return n},makePublicRouterInstance:function(){return q},useRouter:function(){return o},withRouter:function(){return i.default}});let d=c(2403),e=d._(c(82015)),f=d._(c(14061)),g=c(28062),h=d._(c(71702)),i=d._(c(32784)),j={router:null,readyCallbacks:[],ready(a){if(this.router)return a()}},k=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],l=["push","replace","reload","back","prefetch","beforePopState"];function m(){if(!j.router)throw Object.defineProperty(Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n'),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return j.router}Object.defineProperty(j,"events",{get:()=>f.default.events}),k.forEach(a=>{Object.defineProperty(j,a,{get:()=>m()[a]})}),l.forEach(a=>{j[a]=function(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];return m()[a](...c)}}),["routeChangeStart","beforeHistoryChange","routeChangeComplete","routeChangeError","hashChangeStart","hashChangeComplete"].forEach(a=>{j.ready(()=>{f.default.events.on(a,function(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];let e="on"+a.charAt(0).toUpperCase()+a.substring(1);if(j[e])try{j[e](...c)}catch(a){console.error("Error when running the Router event: "+e),console.error((0,h.default)(a)?a.message+"\n"+a.stack:a+"")}})})});let n=j;function o(){let a=e.default.useContext(g.RouterContext);if(!a)throw Object.defineProperty(Error("NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted"),"__NEXT_ERROR_CODE",{value:"E509",enumerable:!1,configurable:!0});return a}function p(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return j.router=new f.default(...b),j.readyCallbacks.forEach(a=>a()),j.readyCallbacks=[],j.router}function q(a){let b={};for(let c of k){if("object"==typeof a[c]){b[c]=Object.assign(Array.isArray(a[c])?[]:{},a[c]);continue}b[c]=a[c]}return b.events=f.default.events,l.forEach(c=>{b[c]=function(){for(var b=arguments.length,d=Array(b),e=0;e<b;e++)d[e]=arguments[e];return a[c](...d)}}),b}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},63935:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{createRouteLoader:function(){return q},getClientBuildManifest:function(){return o},isAssetError:function(){return k},markAssetError:function(){return j}}),c(2403),c(32538);let d=c(40375),e=c(27160),f=c(93865),g=c(95825);function h(a,b,c){let d,e=b.get(a);if(e)return"future"in e?e.future:Promise.resolve(e);let f=new Promise(a=>{d=a});return b.set(a,{resolve:d,future:f}),c?c().then(a=>(d(a),a)).catch(c=>{throw b.delete(a),c}):f}let i=Symbol("ASSET_LOAD_ERROR");function j(a){return Object.defineProperty(a,i,{})}function k(a){return a&&i in a}let l=function(a){try{return a=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||a.relList.supports("prefetch")}catch(a){return!1}}(),m=()=>(0,f.getDeploymentIdQueryOrEmptyString)();function n(a,b,c){return new Promise((d,f)=>{let g=!1;a.then(a=>{g=!0,d(a)}).catch(f),(0,e.requestIdleCallback)(()=>setTimeout(()=>{g||f(c)},b))})}function o(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):n(new Promise(a=>{let b=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{a(self.__BUILD_MANIFEST),b&&b()}}),3800,j(Object.defineProperty(Error("Failed to load client build manifest"),"__NEXT_ERROR_CODE",{value:"E273",enumerable:!1,configurable:!0})))}function p(a,b){return o().then(c=>{if(!(b in c))throw j(Object.defineProperty(Error("Failed to lookup route: "+b),"__NEXT_ERROR_CODE",{value:"E446",enumerable:!1,configurable:!0}));let e=c[b].map(b=>a+"/_next/"+(0,g.encodeURIPath)(b));return{scripts:e.filter(a=>a.endsWith(".js")).map(a=>(0,d.__unsafeCreateTrustedScriptURL)(a)+m()),css:e.filter(a=>a.endsWith(".css")).map(a=>a+m())}})}function q(a){let b=new Map,c=new Map,d=new Map,f=new Map;function g(a){{var b;let d=c.get(a.toString());return d?d:document.querySelector('script[src^="'+a+'"]')?Promise.resolve():(c.set(a.toString(),d=new Promise((c,d)=>{(b=document.createElement("script")).onload=c,b.onerror=()=>d(j(Object.defineProperty(Error("Failed to load script: "+a),"__NEXT_ERROR_CODE",{value:"E74",enumerable:!1,configurable:!0}))),b.crossOrigin=void 0,b.src=a,document.body.appendChild(b)})),d)}}function i(a){let b=d.get(a);return b||d.set(a,b=fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw Object.defineProperty(Error("Failed to load stylesheet: "+a),"__NEXT_ERROR_CODE",{value:"E189",enumerable:!1,configurable:!0});return b.text().then(b=>({href:a,content:b}))}).catch(a=>{throw j(a)})),b}return{whenEntrypoint:a=>h(a,b),onEntrypoint(a,c){(c?Promise.resolve().then(()=>c()).then(a=>({component:a&&a.default||a,exports:a}),a=>({error:a})):Promise.resolve(void 0)).then(c=>{let d=b.get(a);d&&"resolve"in d?c&&(b.set(a,c),d.resolve(c)):(c?b.set(a,c):b.delete(a),f.delete(a))})},loadRoute(c,d){return h(c,f,()=>{let e;return n(p(a,c).then(a=>{let{scripts:d,css:e}=a;return Promise.all([b.has(c)?[]:Promise.all(d.map(g)),Promise.all(e.map(i))])}).then(a=>this.whenEntrypoint(c).then(b=>({entrypoint:b,styles:a[1]}))),3800,j(Object.defineProperty(Error("Route did not complete loading: "+c),"__NEXT_ERROR_CODE",{value:"E12",enumerable:!1,configurable:!0}))).then(a=>{let{entrypoint:b,styles:c}=a,d=Object.assign({styles:c},b);return"error"in b?b:d}).catch(a=>{if(d)throw a;return{error:a}}).finally(()=>null==e?void 0:e())})},prefetch(b){let c;return(c=navigator.connection)&&(c.saveData||/2g/.test(c.effectiveType))?Promise.resolve():p(a,b).then(a=>Promise.all(l?a.scripts.map(a=>{var b,c,d;return b=a.toString(),c="script",new Promise((a,e)=>{let f='\n link[rel="prefetch"][href^="'+b+'"],\n link[rel="preload"][href^="'+b+'"],\n script[src^="'+b+'"]';if(document.querySelector(f))return a();d=document.createElement("link"),c&&(d.as=c),d.rel="prefetch",d.crossOrigin=void 0,d.onload=a,d.onerror=()=>e(j(Object.defineProperty(Error("Failed to prefetch: "+b),"__NEXT_ERROR_CODE",{value:"E268",enumerable:!1,configurable:!0}))),d.href=b,document.head.appendChild(d)})}):[])).then(()=>{(0,e.requestIdleCallback)(()=>this.loadRoute(b,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},67305:(a,b,c)=>{"use strict";function d(a,b){return a}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"removeLocale",{enumerable:!0,get:function(){return d}}),c(84495),("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},78661:(a,b)=>{"use strict";function c(){let a=Object.create(null);return{on(b,c){(a[b]||(a[b]=[])).push(c)},off(b,c){a[b]&&a[b].splice(a[b].indexOf(c)>>>0,1)},emit(b){for(var c=arguments.length,d=Array(c>1?c-1:0),e=1;e<c;e++)d[e-1]=arguments[e];(a[b]||[]).slice().map(a=>{a(...d)})}}}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return c}})},88123:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"detectDomainLocale",{enumerable:!0,get:function(){return c}});let c=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c]};("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},89704:(a,b)=>{"use strict";function c(a,b){let c=Object.keys(a);if(c.length!==Object.keys(b).length)return!1;for(let d=c.length;d--;){let e=c[d];if("query"===e){let c=Object.keys(a.query);if(c.length!==Object.keys(b.query).length)return!1;for(let d=c.length;d--;){let e=c[d];if(!b.query.hasOwnProperty(e)||a.query[e]!==b.query[e])return!1}}else if(!b.hasOwnProperty(e)||a[e]!==b[e])return!1}return!0}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"compareRouterStates",{enumerable:!0,get:function(){return c}})},91831:(a,b,c)=>{"use strict";function d(a,b){if(void 0===b&&(b={}),b.onlyHashChange)return void a();let c=document.documentElement;c.dataset.scrollBehavior;let d=c.style.scrollBehavior;c.style.scrollBehavior="auto",b.dontForceLayout||c.getClientRects(),a(),c.style.scrollBehavior=d}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return d}}),c(37808)},93865:(a,b)=>{"use strict";function c(){return""}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return c}})},94532:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{default:function(){return s},handleClientScriptLoad:function(){return p},initScriptLoader:function(){return q}});let d=c(2403),e=c(12742),f=c(8732),g=d._(c(22326)),h=e._(c(82015)),i=c(9897),j=c(21364),k=c(27160),l=c(5982),m=new Map,n=new Set,o=a=>{let{src:b,id:c,onLoad:d=()=>{},onReady:e=null,dangerouslySetInnerHTML:f,children:h="",strategy:i="afterInteractive",onError:k,stylesheets:l}=a,o=c||b;if(o&&n.has(o))return;if(m.has(b)){n.add(o),m.get(b).then(d,k);return}let p=()=>{e&&e(),n.add(o)},q=document.createElement("script"),r=new Promise((a,b)=>{q.addEventListener("load",function(b){a(),d&&d.call(this,b),p()}),q.addEventListener("error",function(a){b(a)})}).catch(function(a){k&&k(a)});f?(q.innerHTML=f.__html||"",p()):h?(q.textContent="string"==typeof h?h:Array.isArray(h)?h.join(""):"",p()):b&&(q.src=b,m.set(b,r)),(0,j.setAttributesFromProps)(q,a),"worker"===i&&q.setAttribute("type","text/partytown"),q.setAttribute("data-nscript",i),l&&(a=>{if(g.default.preinit)return a.forEach(a=>{g.default.preinit(a,{as:"style"})})})(l),document.body.appendChild(q)};function p(a){let{strategy:b="afterInteractive"}=a;"lazyOnload"===b?window.addEventListener("load",()=>{(0,k.requestIdleCallback)(()=>o(a))}):o(a)}function q(a){a.forEach(p),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(a=>{let b=a.id||a.getAttribute("src");n.add(b)})}function r(a){let{id:b,src:c="",onLoad:d=()=>{},onReady:e=null,strategy:j="afterInteractive",onError:m,stylesheets:p,...q}=a,{updateScripts:r,scripts:s,getIsSsr:t,appDir:u,nonce:v}=(0,h.useContext)(i.HeadManagerContext);v=q.nonce||v;let w=(0,h.useRef)(!1);(0,h.useEffect)(()=>{let a=b||c;w.current||(e&&a&&n.has(a)&&e(),w.current=!0)},[e,b,c]);let x=(0,h.useRef)(!1);if((0,h.useEffect)(()=>{if(!x.current){if("afterInteractive"===j)o(a);else"lazyOnload"===j&&("complete"===document.readyState?(0,k.requestIdleCallback)(()=>o(a)):window.addEventListener("load",()=>{(0,k.requestIdleCallback)(()=>o(a))}));x.current=!0}},[a,j]),("beforeInteractive"===j||"worker"===j)&&(r?(s[j]=(s[j]||[]).concat([{id:b,src:c,onLoad:d,onReady:e,onError:m,...q,nonce:v}]),r(s)):t&&t()?n.add(b||c):t&&!t()&&o({...a,nonce:v})),u){if(p&&p.forEach(a=>{g.default.preinit(a,{as:"style"})}),"beforeInteractive"===j)if(!c)return q.dangerouslySetInnerHTML&&(q.children=q.dangerouslySetInnerHTML.__html,delete q.dangerouslySetInnerHTML),(0,f.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+(0,l.htmlEscapeJsonString)(JSON.stringify([0,{...q,id:b}]))+")"}});else return g.default.preload(c,q.integrity?{as:"script",integrity:q.integrity,nonce:v,crossOrigin:q.crossOrigin}:{as:"script",nonce:v,crossOrigin:q.crossOrigin}),(0,f.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+(0,l.htmlEscapeJsonString)(JSON.stringify([c,{...q,id:b}]))+")"}});"afterInteractive"===j&&c&&g.default.preload(c,q.integrity?{as:"script",integrity:q.integrity,nonce:v,crossOrigin:q.crossOrigin}:{as:"script",nonce:v,crossOrigin:q.crossOrigin})}return null}Object.defineProperty(r,"__nextScript",{value:!0});let s=r;("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},97238:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"parseRelativeUrl",{enumerable:!0,get:function(){return e}}),c(8423);let d=c(98975);function e(a,b,c){void 0===c&&(c=!0);let e=new URL("http://n"),f=b?new URL(b,e):a.startsWith(".")?new URL("http://n"):e,{pathname:g,searchParams:h,search:i,hash:j,href:k,origin:l}=new URL(a,f);if(l!==e.origin)throw Object.defineProperty(Error("invariant: invalid relative URL, router received "+a),"__NEXT_ERROR_CODE",{value:"E159",enumerable:!1,configurable:!0});return{pathname:g,query:c?(0,d.searchParamsToUrlQuery)(h):void 0,search:i,hash:j,href:k.slice(l.length),slashes:void 0}}}};
@@ -0,0 +1,3 @@
1
+ "use strict";exports.id=3445,exports.ids=[3445],exports.modules={23328:(a,b,c)=>{c.d(b,{Qh:()=>k,aY:()=>m});var d=c(19898),e=c(87550),f=c.n(e),g=c(33873),h=c(21820),i=c(29021);let j=null;function k(){return j||(j=new d.MultiProjectManager),j}function l(a){let b=g.resolve(a);return b===g.resolve(g.join(h.homedir(),".customize-agent"))||b.includes(`${g.sep}.customize-agent${g.sep}`)||b.endsWith(`${g.sep}apps${g.sep}server`)||b.endsWith(`${g.sep}apps${g.sep}cli`)}function m(a=!1){let b=process.env.CUSTOMIZE_PROJECT_ROOT??process.env.INIT_CWD;if(b&&i.existsSync(b)&&!l(b))return g.resolve(b);let c=function(){let a=g.join(h.homedir(),".customize-agent","projects","registry.db");if(!i.existsSync(a))return[];let b=new(f())(a,{readonly:!0});try{return b.prepare("SELECT project_root FROM project_registry ORDER BY last_opened_at DESC").all().map(a=>g.resolve(a.project_root)).filter(a=>!l(a))}finally{b.close()}}();return c.length>0?c[0]:a&&!l(process.cwd())?process.cwd():""}},73445:(a,b,c)=>{c.d(b,{Bh:()=>p,OX:()=>u,R1:()=>v,bV:()=>r,h0:()=>q,jG:()=>n});var d=c(73024),e=c(76760),f=c(48161),g=c(23328);let h=[{id:"construction-organization-design",name:"施工组织设计",description:"根据招标文件、图纸、清单、表格和项目资料生成施工组织设计草稿。",category:"工程建设",outputTitle:"施工组织设计",chapters:[{id:"basis",title:"第一章 编制依据",purpose:"整理招标文件、图纸、规范和编制说明。",requiredFacts:["招标文件","图纸","规范标准"],queries:["招标文件 编制依据 技术规范 标准 图纸 合同","规范 标准 图纸 招标文件"]},{id:"overview",title:"第二章 工程概况",purpose:"提取工程名称、地点、规模、范围和建设条件。",requiredFacts:["工程名称","工程地点","工程规模","施工范围"],queries:["工程名称 工程地点 建设单位 工程规模 建筑面积 结构类型","工程概况 招标范围 项目规模"]},{id:"deployment",title:"第三章 施工部署",purpose:"形成项目组织、施工区段和总体部署。",requiredFacts:["施工部署","组织机构","施工段"],queries:["施工部署 项目组织机构 施工段划分 总体安排","施工组织 施工顺序 施工流水"]},{id:"schedule",title:"第四章 施工进度计划及保证措施",purpose:"提取工期、节点、进度要求并形成保证措施。",requiredFacts:["工期要求","节点工期"],queries:["工期要求 开工 竣工 进度计划 节点工期","工期 进度 保证措施"]},{id:"preparation",title:"第五章 施工准备",purpose:"整理技术、现场、材料、机械和劳动力准备。",requiredFacts:["技术准备","现场准备","材料准备"],queries:["施工准备 技术准备 现场准备 材料准备 机械准备","临设 水电 进场 准备"]},{id:"methods",title:"第六章 主要分部分项工程施工方案",purpose:"依据工程范围生成主要施工方法。",requiredFacts:["主要分部分项工程","施工工艺"],queries:["土方 基础 主体 砌体 装饰 安装 道路 管线 主要施工方法","分部分项 施工工艺 技术措施"]},{id:"quality",title:"第七章 质量保证体系及措施",purpose:"形成质量目标、体系和保证措施。",requiredFacts:["质量目标","质量标准"],queries:["质量目标 质量标准 验收规范 质量保证措施","质量管理 检验 试验"]},{id:"safety",title:"第八章 安全生产管理体系及措施",purpose:"形成安全目标、风险控制和应急管理。",requiredFacts:["安全目标","安全要求"],queries:["安全目标 安全文明施工 安全管理 危险源 应急预案","安全生产 风险 防护"]},{id:"civilized",title:"第九章 文明施工及环境保护措施",purpose:"整理文明施工、扬尘、噪声、污水和固废措施。",requiredFacts:["文明施工","环境保护"],queries:["文明施工 环境保护 扬尘 噪声 污水 固废","绿色施工 环保 控制措施"]},{id:"resources",title:"第十章 劳动力、材料、机械设备投入计划",purpose:"提取资源计划和相关表格。",requiredFacts:["劳动力计划","材料计划","机械设备计划"],queries:["劳动力计划 材料计划 机械设备计划 主要设备 表格","资源投入 机械 劳动力 材料"]},{id:"layout",title:"第十一章 施工总平面布置",purpose:"整理临设、道路、水电、堆场和平面布置要求。",requiredFacts:["施工总平面布置"],queries:["施工平面布置 临时设施 道路 水电 堆场","总平面布置 临时用地"]},{id:"season",title:"第十二章 季节性施工措施",purpose:"形成雨季、冬季、高温、防汛等措施。",requiredFacts:["季节性施工要求"],queries:["雨季施工 冬季施工 高温施工 台风 防汛","季节性施工 措施"]},{id:"emergency",title:"第十三章 应急预案",purpose:"形成风险、组织、响应和救援措施。",requiredFacts:["应急预案"],queries:["应急预案 风险 应急组织 救援措施","事故 应急 响应"]},{id:"appendix",title:"第十四章 附表及附件",purpose:"汇总附件、表格、图纸和来源清单。",requiredFacts:["附表","附件"],queries:["附表 计划表 机械表 劳动力表 进度表","附件 表格 清单 图纸"]}],builtIn:!0}];function i(){let a=e.join(f.homedir(),".customize-agent");return d.mkdirSync(a,{recursive:!0}),a}function j(){return e.join(i(),"document-templates.json")}function k(a){return{...a,id:a.id.replace(/[^a-zA-Z0-9_-]/gu,"-").slice(0,80)||`template-${Date.now()}`,name:a.name||"未命名模板",description:a.description||"",category:a.category||"自定义",outputTitle:a.outputTitle||a.name||"业务文档",chapters:Array.isArray(a.chapters)&&a.chapters.length>0?a.chapters.map((a,b)=>({id:(a.id||`chapter-${b+1}`).replace(/[^a-zA-Z0-9_-]/gu,"-").slice(0,80),title:a.title||`第 ${b+1} 章`,purpose:a.purpose||"",queries:Array.isArray(a.queries)?a.queries.filter(Boolean):[],requiredFacts:Array.isArray(a.requiredFacts)?a.requiredFacts.filter(Boolean):[]})):[{id:"document",title:a.outputTitle||a.name||"业务文档",purpose:a.description||"",queries:[],requiredFacts:[]}],promptIds:Array.isArray(a.promptIds)?a.promptIds.filter(Boolean):[],boundFilePaths:Array.isArray(a.boundFilePaths)?a.boundFilePaths.filter(Boolean):[],builtIn:!1}}function l(){try{let a=j();if(!d.existsSync(a))return[];return JSON.parse(d.readFileSync(a,"utf-8")).map(k)}catch{return[]}}function m(a){d.writeFileSync(j(),JSON.stringify(a.map(k),null,2),"utf-8")}function n(){return[...h,...l()]}function o(a){return n().find(b=>b.id===a)}function p(a){let b=k(a);if(h.some(a=>a.id===b.id))throw Error("Built-in template cannot be overwritten");let c=l().filter(a=>a.id!==b.id);return c.push(b),m(c),b}function q(a){if(h.some(b=>b.id===a))throw Error("Built-in template cannot be deleted");m(l().filter(b=>b.id!==a))}function r(a){let b=o(a);if(!b)throw Error("Document template not found");let c=k({...b,id:`${b.id}-copy-${Date.now()}`,name:`${b.name} Copy`,builtIn:!1}),d=l();return d.push(c),m(d),c}function s(a,b){let c=new Set;return a.sort((a,b)=>b.score-a.score).filter(a=>{let b=`${a.filePath}:${a.content.slice(0,100)}`;return!c.has(b)&&(c.add(b),!0)}).slice(0,b)}function t(a){return`- ${a.filePath}(score=${a.score.toFixed(3)}):${a.content.replace(/\s+/gu," ").slice(0,260)}`}async function u(a){let b=o(a.templateId);if(!b)throw Error("Document template not found");let c=a.projectRoot||(0,g.aY)();if(!c)throw Error("No knowledge base project found");let f=(0,g.Qh)(),h=Math.max(5,Math.min(30,a.maxEvidencePerChapter??12)),j=(function(a=[]){let b;if(0===a.length)return[];let c=[];try{let a=JSON.parse(d.readFileSync(e.join(i(),"prompts.json"),"utf-8"));b=Array.isArray(a.customPrompts)?a.customPrompts:[]}catch{b=[]}for(let f of a){if(f.startsWith("custom:")){let a=b.find(a=>a.id===f);a&&c.push({id:f,name:a.name,content:a.content});continue}if(f.startsWith("file:")){let a=f.slice(5);d.existsSync(a)&&c.push({id:f,name:e.basename(e.dirname(a))||a,content:d.readFileSync(a,"utf-8")})}}return c})(b.promptIds).map(a=>`## ${a.name}
2
+ ${a.content}`).join("\n\n"),k=new Set(b.boundFilePaths??[]),l=await f.getProject(c);await l.incrementalIndex();let m=[],n=[],p=[];for(let a of b.chapters){let d=[];for(let e of a.queries.length>0?a.queries:[b.name,b.outputTitle,a.title,...b.boundFilePaths??[]]){let b=await f.search(c,e,{scope:"project",limit:Math.max(h,k.size>0?30:h),weights:{keyword:.4,vector:.45,rewrite:.75,hybridBonus:.15}});d.push(...b.results.filter(a=>0===k.size||k.has(a.filePath)).map(b=>({chapterId:a.id,filePath:b.filePath,score:b.score,content:b.content,sectionTitle:b.sectionTitle,source:b.source})))}for(let b of k){let c=l.getFileDetail(b);c&&d.push(...c.chunks.slice(0,Math.max(h,20)).map(b=>({chapterId:a.id,filePath:c.file.relativePath,score:1,content:b.content,sectionTitle:b.sectionTitle,source:"bound-file"})))}let e=s(d,h);n.push(...e);let g=a.requiredFacts.filter(a=>!e.some(b=>b.content.includes(a.replace(/要求|计划|目标|标准/gu,""))||b.content.includes(a)));for(let b of(0===e.length&&p.push(`${a.title}:未检索到明确资料依据`),g))p.push(`${a.title}:${b} 未检索到明确依据`);let i=[`## ${a.title}`,"",j?`### 模板绑定提示词规则
3
+ ${j.slice(0,3e3)}`:"","",e.length>0?`本章根据模板绑定资料围绕“${a.purpose||b.description}”整理。`:"模板绑定资料未检索到明确内容,需进一步确认。","",e.length>0?"### 资料依据":"",...e.map(t),"",g.length>0?"### 待确认事项":"",...g.map(a=>`- ${a}:资料未提供,需进一步确认。`)].filter(Boolean).join("\n");m.push({id:a.id,title:a.title,content:i,evidence:e,missingFacts:g})}let q=function(a,b){let c={};for(let d of[...new Set(a.chapters.flatMap(a=>a.requiredFacts))]){let a=b.find(a=>a.content.includes(d.replace(/要求|计划|目标|标准/gu,""))||a.content.includes(d));a&&(c[d]=`${a.content.replace(/\s+/gu," ").slice(0,180)}(来源:${a.filePath})`)}return c}(b,n),r=new Map;for(let a of n)r.set(a.filePath,(r.get(a.filePath)??0)+1);let u=[...r.entries()].sort((a,b)=>b[1]-a[1]).map(([a,b])=>({filePath:a,count:b})),v=function(a,b){let c=[],d=[];for(let b of a)0===b.evidence.length&&c.push(`${b.title} 未检索到资料证据`),b.content.length<80&&c.push(`${b.title} 内容较短,建议人工补充或重新生成`);for(let a of["工程名称","工期要求","质量目标","施工范围"])b[a]||c.push(`${a} 未形成明确事实,请人工确认`);return{passed:0===d.length,warnings:c,errors:d}}(m,q),w={templateId:b.id,templateName:b.name,title:b.outputTitle,requirement:a.requirement||(b.promptIds?.length?`使用模板绑定提示词:${b.promptIds.join(", ")}`:""),facts:q,chapters:m,sources:u,missingItems:[...new Set(p)],validation:v,generatedAt:Date.now()};return{...w,markdown:[`# ${w.title}`,"",`> 生成要求:${w.requirement||"未填写"}`,"","## 资料事实表","",Object.keys(w.facts).length>0?["| 事实项 | 依据 |","|---|---|",...Object.entries(w.facts).map(([a,b])=>`| ${a} | ${b.replace(/\|/gu," ")} |`)].join("\n"):"未抽取到明确事实,需人工确认。","",...w.chapters.flatMap(a=>[a.content,""]),"## 资料来源清单","","| 文件 | 引用次数 |","|---|---:|",...w.sources.map(a=>`| ${a.filePath} | ${a.count} |`),"","## 缺失项与需确认事项","",...w.missingItems.length>0?w.missingItems.map(a=>`- ${a}`):["- 暂未发现完全缺失章节;仍需人工复核关键数据。"],"","## 校验结果","",...w.validation.warnings.map(a=>`- 警告:${a}`),...w.validation.errors.map(a=>`- 错误:${a}`)].join("\n")}}async function v(a){let b=o(a.templateId);if(!b)throw Error("Document template not found");let c=b.chapters.find(b=>b.id===a.chapterId);if(!c)throw Error("Document chapter not found");let d=a.projectRoot||(0,g.aY)();if(!d)throw Error("No knowledge base project found");let e=(0,g.Qh)(),f=Math.max(5,Math.min(30,a.maxEvidencePerChapter??12)),h=[];for(let a of c.queries){let b=await e.search(d,a,{scope:"project",limit:f,weights:{keyword:.4,vector:.45,rewrite:.75,hybridBonus:.15}});h.push(...b.results.map(a=>({chapterId:c.id,filePath:a.filePath,score:a.score,content:a.content,sectionTitle:a.sectionTitle,source:a.source})))}let i=s(h,f),j=c.requiredFacts.filter(a=>!i.some(b=>b.content.includes(a.replace(/要求|计划|目标|标准/gu,""))||b.content.includes(a))),k=[`## ${c.title}`,"",a.requirement?`> 生成要求:${a.requirement}`:"",i.length>0?`本章根据知识库资料围绕“${c.purpose}”重新整理。`:"资料未提供,需进一步确认。","",i.length>0?"### 资料依据":"",...i.map(t),"",j.length>0?"### 待确认事项":"",...j.map(a=>`- ${a}:资料未提供,需进一步确认。`)].filter(Boolean).join("\n");return{id:c.id,title:c.title,content:k,evidence:i,missingFacts:j}}}};