@undefineds.co/xpod 0.4.15 → 0.4.17

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 (861) hide show
  1. package/config/components-ignore.json +13 -8
  2. package/dist/api/ai-gateway/auth/CallerPodAccess.d.ts +17 -1
  3. package/dist/api/ai-gateway/auth/CallerPodAccess.js +23 -7
  4. package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js +9 -3
  5. package/dist/api/ai-gateway/pod/OwnerPodAccess.d.ts +61 -18
  6. package/dist/api/ai-gateway/pod/OwnerPodAccess.js +49 -99
  7. package/dist/api/ai-gateway/pod/PodInterfaceKeyStore.d.ts +2 -0
  8. package/dist/api/ai-gateway/pod/PodInterfaceKeyStore.js +5 -0
  9. package/dist/api/auth/ClientCredentialsAuthenticator.d.ts +5 -22
  10. package/dist/api/auth/ClientCredentialsAuthenticator.js +21 -89
  11. package/dist/api/auth/SolidSessionFactory.d.ts +81 -0
  12. package/dist/api/auth/SolidSessionFactory.js +184 -0
  13. package/dist/api/background-service-supervisor.d.ts +63 -0
  14. package/dist/api/background-service-supervisor.js +144 -0
  15. package/dist/api/chatkit/pod-store.d.ts +4 -0
  16. package/dist/api/chatkit/pod-store.js +10 -83
  17. package/dist/api/container/common.js +48 -6
  18. package/dist/api/container/index.d.ts +8 -0
  19. package/dist/api/container/index.js +23 -6
  20. package/dist/api/container/routes.js +24 -5
  21. package/dist/api/container/types.d.ts +32 -0
  22. package/dist/api/handlers/AiGatewayManagementHandler.d.ts +4 -4
  23. package/dist/api/handlers/AiGatewayManagementHandler.js +8 -10
  24. package/dist/api/handlers/ChatKitHandler.js +5 -0
  25. package/dist/api/handlers/ChatKitV1Handler.js +9 -8
  26. package/dist/api/handlers/NetworkSettingsHandler.d.ts +31 -1
  27. package/dist/api/handlers/NetworkSettingsHandler.js +76 -3
  28. package/dist/api/handlers/PodAccessFailureResponse.d.ts +24 -0
  29. package/dist/api/handlers/PodAccessFailureResponse.js +59 -0
  30. package/dist/api/handlers/PodSettingsHandler.d.ts +9 -1
  31. package/dist/api/handlers/PodSettingsHandler.js +3 -3
  32. package/dist/api/handlers/ReachabilityHandler.js +5 -0
  33. package/dist/api/handlers/TaskCredentialHandler.d.ts +19 -0
  34. package/dist/api/handlers/TaskCredentialHandler.js +198 -0
  35. package/dist/api/network/EndpointReachabilityProbe.d.ts +40 -0
  36. package/dist/api/network/EndpointReachabilityProbe.js +129 -0
  37. package/dist/api/runtime.d.ts +2 -0
  38. package/dist/api/runtime.js +70 -23
  39. package/dist/api/tasks/PodInterfaceKeyMigration.d.ts +27 -0
  40. package/dist/api/tasks/PodInterfaceKeyMigration.js +53 -0
  41. package/dist/api/tasks/TaskAuthBinding.d.ts +22 -0
  42. package/dist/api/tasks/TaskAuthBinding.js +57 -0
  43. package/dist/api/tasks/TaskCredentialDatabase.d.ts +23 -0
  44. package/dist/api/tasks/TaskCredentialDatabase.js +82 -0
  45. package/dist/api/tasks/TaskCredentialSchema.d.ts +471 -0
  46. package/dist/api/tasks/TaskCredentialSchema.js +92 -0
  47. package/dist/api/tasks/TaskCredentialStore.d.ts +129 -0
  48. package/dist/api/tasks/TaskCredentialStore.js +341 -0
  49. package/dist/api/tasks/index.d.ts +3 -0
  50. package/dist/api/tasks/index.js +17 -1
  51. package/dist/cli/commands/start.d.ts +11 -18
  52. package/dist/cli/commands/start.js +42 -38
  53. package/dist/cli/commands/stop.js +7 -1
  54. package/dist/components/components.jsonld +1 -0
  55. package/dist/components/context.jsonld +60 -0
  56. package/dist/dns/cloudflare/CloudflareDnsProvider.d.ts +10 -1
  57. package/dist/dns/cloudflare/CloudflareDnsProvider.js +59 -28
  58. package/dist/edge/EdgeNodeAgent.d.ts +5 -0
  59. package/dist/edge/EdgeNodeAgent.js +8 -0
  60. package/dist/edge/acme/AcmeCertificateManager.d.ts +24 -0
  61. package/dist/edge/acme/AcmeCertificateManager.js +75 -7
  62. package/dist/edge/acme/AcmeCertificateManager.jsonld +24 -0
  63. package/dist/edge/acme/CertificateRenewalScheduler.d.ts +67 -0
  64. package/dist/edge/acme/CertificateRenewalScheduler.js +116 -0
  65. package/dist/edge/frp/FrpcProcessManager.d.ts +16 -0
  66. package/dist/edge/frp/FrpcProcessManager.js +73 -13
  67. package/dist/edge/reachability/ManagedClientFetch.d.ts +2 -0
  68. package/dist/edge/reachability/ManagedClientFetch.js +24 -12
  69. package/dist/edge/reachability/ManagedClientFetch.jsonld +4 -0
  70. package/dist/edge/reachability/ManagedRouteSelector.d.ts +2 -0
  71. package/dist/edge/reachability/ManagedRouteSelector.js +7 -6
  72. package/dist/edge/reachability/ManagedRouteSelector.jsonld +4 -0
  73. package/dist/edge/reachability/P2PDataPlane.d.ts +67 -4
  74. package/dist/edge/reachability/P2PDataPlane.js +156 -15
  75. package/dist/edge/reachability/P2PDataPlane.jsonld +64 -0
  76. package/dist/edge/reachability/P2PDataPlaneCrypto.d.ts +42 -0
  77. package/dist/edge/reachability/P2PDataPlaneCrypto.js +113 -0
  78. package/dist/edge/reachability/P2PDataPlaneCrypto.jsonld +69 -0
  79. package/dist/edge/reachability/P2PSignalingClient.d.ts +2 -0
  80. package/dist/edge/reachability/P2PSignalingClient.js +1 -0
  81. package/dist/edge/reachability/P2PSignalingClient.jsonld +4 -0
  82. package/dist/edge/reachability/ReachabilitySessionService.d.ts +19 -0
  83. package/dist/edge/reachability/ReachabilitySessionService.js +122 -52
  84. package/dist/edge/reachability/ReachabilitySessionService.jsonld +26 -0
  85. package/dist/edge/reachability/RouteValidation.d.ts +29 -0
  86. package/dist/edge/reachability/RouteValidation.js +58 -0
  87. package/dist/edge/reachability/TcpP2PDataPlaneTransport.d.ts +28 -4
  88. package/dist/edge/reachability/TcpP2PDataPlaneTransport.js +540 -32
  89. package/dist/edge/reachability/TcpP2PDataPlaneTransport.jsonld +51 -0
  90. package/dist/edge/reachability/TcpP2PSignalingSession.d.ts +7 -0
  91. package/dist/edge/reachability/TcpP2PSignalingSession.js +25 -1
  92. package/dist/edge/reachability/TcpP2PSignalingSession.jsonld +12 -0
  93. package/dist/edge/reachability/index.d.ts +1 -0
  94. package/dist/edge/reachability/index.js +1 -0
  95. package/dist/edge/reachability/types.d.ts +8 -0
  96. package/dist/edge/reachability/types.jsonld +8 -0
  97. package/dist/identity/drizzle/EdgeNodeRepository.d.ts +12 -0
  98. package/dist/identity/drizzle/EdgeNodeRepository.js +37 -0
  99. package/dist/identity/drizzle/PodInterfaceKeyRepository.d.ts +3 -0
  100. package/dist/identity/drizzle/PodInterfaceKeyRepository.js +11 -0
  101. package/dist/identity/drizzle/db.d.ts +8 -0
  102. package/dist/identity/drizzle/db.js +17 -0
  103. package/dist/runtime/GatewayAdminProxyAuth.d.ts +2 -2
  104. package/dist/runtime/Proxy.js +5 -2
  105. package/dist/runtime/css-process.d.ts +3 -3
  106. package/dist/runtime/index.d.ts +7 -1
  107. package/dist/runtime/index.js +21 -1
  108. package/dist/runtime/ingress-occupant.d.ts +39 -0
  109. package/dist/runtime/ingress-occupant.js +111 -0
  110. package/dist/runtime/ingress-port.d.ts +89 -0
  111. package/dist/runtime/ingress-port.js +165 -0
  112. package/dist/runtime/oidc-issuer.d.ts +9 -0
  113. package/dist/runtime/oidc-issuer.js +23 -0
  114. package/dist/runtime/port-finder.d.ts +27 -3
  115. package/dist/runtime/port-finder.js +52 -22
  116. package/dist/runtime/port-reservations.d.ts +86 -0
  117. package/dist/runtime/port-reservations.js +183 -0
  118. package/dist/runtime/safe-env.d.ts +1 -1
  119. package/dist/runtime/user-env.d.ts +2 -2
  120. package/dist/supervisor/Supervisor.d.ts +26 -3
  121. package/dist/supervisor/Supervisor.js +130 -23
  122. package/dist/supervisor/types.d.ts +14 -1
  123. package/dist/test-utils/local-managed-client-p2p-e2e-smoke.js +15 -0
  124. package/dist/tunnel/LocalTunnelProvider.d.ts +7 -0
  125. package/dist/tunnel/LocalTunnelProvider.js +11 -3
  126. package/dist/tunnel/LocalTunnelProvider.jsonld +39 -0
  127. package/dist/tunnel/NgrokTunnelProvider.d.ts +2 -0
  128. package/dist/tunnel/NgrokTunnelProvider.js +3 -1
  129. package/dist/tunnel/NgrokTunnelProvider.jsonld +39 -0
  130. package/dist/tunnel/SakuraFrpTunnelProvider.d.ts +3 -1
  131. package/dist/tunnel/SakuraFrpTunnelProvider.js +7 -3
  132. package/dist/tunnel/TunnelClientManager.d.ts +73 -0
  133. package/dist/tunnel/TunnelClientManager.js +181 -0
  134. package/dist/tunnel/TunnelClientResolver.d.ts +56 -0
  135. package/dist/tunnel/TunnelClientResolver.js +135 -0
  136. package/dist/tunnel/TunnelDeclaredOrigin.d.ts +78 -0
  137. package/dist/tunnel/TunnelDeclaredOrigin.js +185 -0
  138. package/dist/tunnel/TunnelLifecycle.d.ts +9 -1
  139. package/dist/tunnel/TunnelLifecycle.js +24 -3
  140. package/dist/tunnel/TunnelProviderCatalog.d.ts +32 -0
  141. package/dist/tunnel/TunnelProviderCatalog.js +43 -0
  142. package/node_modules/@undefineds.co/extensions/dist-cjs/adapters/langchain.js +49 -0
  143. package/node_modules/@undefineds.co/extensions/dist-cjs/adapters/llamaindex.js +54 -0
  144. package/node_modules/@undefineds.co/extensions/dist-cjs/index.js +22 -0
  145. package/node_modules/@undefineds.co/extensions/dist-cjs/package.json +3 -0
  146. package/node_modules/@undefineds.co/extensions/dist-cjs/paddleocr.js +304 -0
  147. package/node_modules/@undefineds.co/extensions/dist-cjs/reader.js +44 -0
  148. package/node_modules/@undefineds.co/extensions/dist-cjs/registry.js +99 -0
  149. package/node_modules/@undefineds.co/extensions/dist-cjs/types.js +2 -0
  150. package/node_modules/openid-client/types/index.d.ts +623 -0
  151. package/package.json +3 -2
  152. package/static/dashboard/assets/{AiConfigContext-rWx4TyiH.js → AiConfigContext-BedwuLTE.js} +1 -1
  153. package/static/dashboard/assets/{AiConfigPage-StVJpDFT.js → AiConfigPage-hNTayf8G.js} +1 -1
  154. package/static/dashboard/assets/{DocumentProcessingPanel-DJ5yul2O.js → DocumentProcessingPanel-BSb_vOj7.js} +1 -1
  155. package/static/dashboard/assets/IndexLifecyclePanel-DAHx-PBG.js +1 -0
  156. package/static/dashboard/assets/{IndexSubjectPanel-BVKcot1_.js → IndexSubjectPanel-Bv97-ouZ.js} +1 -1
  157. package/static/dashboard/assets/ModelAssignmentsPanel-CEJZs9At.js +1 -0
  158. package/static/dashboard/assets/{ModelsPage-CECBwmeO.js → ModelsPage-DkBVXmKT.js} +11 -11
  159. package/static/dashboard/assets/NetworkPage-BDqKgRZQ.js +2 -0
  160. package/static/dashboard/assets/{PaneListHeader-DIPe8pS6.js → PaneListHeader-ByqK_C6i.js} +1 -1
  161. package/static/dashboard/assets/{SearchIndexingPanel-lalFJ3c8.js → SearchIndexingPanel-M-WYaQP3.js} +1 -1
  162. package/static/dashboard/assets/{StatusSubjectPanel-CpY_KU-G.js → StatusSubjectPanel-DPegcFpA.js} +1 -1
  163. package/static/dashboard/assets/{StatusWorkspace-BwWCii3A.js → StatusWorkspace-CPIkjO9S.js} +1 -1
  164. package/static/dashboard/assets/{SystemSettingsPage-BKZxX-_n.js → SystemSettingsPage-LyXmd6uP.js} +1 -1
  165. package/static/dashboard/assets/{SystemSettingsSubjectPanel-BZrqb2C5.js → SystemSettingsSubjectPanel-CYHqNIn2.js} +1 -1
  166. package/static/dashboard/assets/{XpodAiConnectionsPodStore-Bbpx9dTN.js → XpodAiConnectionsPodStore-DXNERI2-.js} +1 -1
  167. package/static/dashboard/assets/{activity-BJ15TLVP.js → activity-BwRbcTha.js} +1 -1
  168. package/static/dashboard/assets/{ai-connections-GG6qkTJt.js → ai-connections-Dr4-rSzX.js} +1 -1
  169. package/static/dashboard/assets/{badge-BBX5FlaB.js → badge-BbRb9MsQ.js} +1 -1
  170. package/static/dashboard/assets/{collection-runtime-UBbHBzdf.js → collection-runtime-BRfZD5oS.js} +1 -1
  171. package/static/dashboard/assets/{dashboard-7Y6BHyV9.js → dashboard-D2ozrATv.js} +73 -73
  172. package/static/dashboard/assets/{dialog-QrOJ-hB0.js → dialog-BbRbILBP.js} +1 -1
  173. package/static/dashboard/assets/{download-DK9x-VOP.js → download-SIHe8Y5t.js} +1 -1
  174. package/static/dashboard/assets/{external-link-Cnkn87mJ.js → external-link-CiYw5Q4U.js} +1 -1
  175. package/static/dashboard/assets/{index-cIa8_efI.js → index-CExLoewO.js} +1 -1
  176. package/static/dashboard/assets/{index-B1z84it5.js → index-CTgU8YW1.js} +1 -1
  177. package/static/dashboard/assets/{index-DzjauX3N.js → index-DC1jRaVA.js} +1 -1
  178. package/static/dashboard/assets/{key-round-BoS6UqKz.js → key-round-nKtxP6pb.js} +1 -1
  179. package/static/dashboard/assets/{rotate-ccw-BeWV76i0.js → rotate-ccw-CQm5hHMN.js} +1 -1
  180. package/static/dashboard/assets/{skeleton-CypcJL07.js → skeleton-TKyLbiPs.js} +1 -1
  181. package/static/dashboard/assets/{waypoints-zHOOqfhi.js → waypoints-BQS9t0ky.js} +1 -1
  182. package/static/dashboard/assets/{workspace-layout-DZ9JuxnM.js → workspace-layout-Csbbr3vZ.js} +1 -1
  183. package/static/dashboard/dashboard.html +1 -1
  184. package/static/settings/assets/AiConfigContext-eLRkXFtH.js +1 -0
  185. package/static/settings/assets/AiConfigPage-BMO-ytdK.js +1 -0
  186. package/static/settings/assets/DocumentProcessingPanel-CH-HBRzQ.js +1 -0
  187. package/static/settings/assets/IndexLifecyclePanel-ChEMn9D8.js +1 -0
  188. package/static/settings/assets/IndexSubjectPanel-DT0c11VQ.js +1 -0
  189. package/static/settings/assets/ModelAssignmentsPanel-T59L_wOk.js +1 -0
  190. package/static/{auth-callback/assets/ModelsPage-Cim7cubp.js → settings/assets/ModelsPage-m_SP4PdE.js} +7 -7
  191. package/static/settings/assets/NetworkPage-D50kdbEu.js +2 -0
  192. package/static/settings/assets/PaneListHeader-Da5jZFvG.js +1 -0
  193. package/static/settings/assets/SearchIndexingPanel-DQQd3-Jw.js +1 -0
  194. package/static/settings/assets/StatusSubjectPanel-Upqqlvon.js +1 -0
  195. package/static/settings/assets/StatusWorkspace-CPB49bGd.js +1 -0
  196. package/static/settings/assets/{SystemSettingsPage-ChKvOioO.js → SystemSettingsPage-C0wrxcNw.js} +1 -1
  197. package/static/settings/assets/{SystemSettingsSubjectPanel-DyTpOnD2.js → SystemSettingsSubjectPanel-BOm7tUH1.js} +3 -3
  198. package/static/settings/assets/XpodAiConnectionsPodStore-nFgD_usD.js +3 -0
  199. package/static/settings/assets/activity-CWy1W2W0.js +1 -0
  200. package/static/settings/assets/auth-callback-HhgEuohz.js +1 -0
  201. package/static/settings/assets/badge-v30yFaaj.js +1 -0
  202. package/static/settings/assets/collection-runtime-B7oomxic.js +1 -0
  203. package/static/settings/assets/dialog-BAe7moyL.js +1 -0
  204. package/static/settings/assets/download-C3Dzb60R.js +1 -0
  205. package/static/settings/assets/external-link-DnkJGKNc.js +1 -0
  206. package/static/{auth-callback/assets/auth-callback-Ds-c62W3.js → settings/assets/global-B_WO-aYY.js} +95 -95
  207. package/static/settings/assets/{index-DOiwLF4B.js → index-B51ot_m_.js} +1 -1
  208. package/static/settings/assets/index-CHBQVfuZ.js +41 -0
  209. package/static/{auth-callback/assets/index-DwIlrIDG.js → settings/assets/index-DbqRFton.js} +1 -1
  210. package/static/settings/assets/{index-browser-DFFWN3Kr.js → index-browser-DzhsXZHm.js} +1 -1
  211. package/static/settings/assets/key-round-DoDbsLae.js +1 -0
  212. package/static/settings/assets/rotate-ccw-DNR_R3oT.js +1 -0
  213. package/static/settings/assets/settings-BOznrBjy.js +1 -0
  214. package/static/settings/assets/skeleton-BjHhu9qI.js +1 -0
  215. package/static/settings/assets/waypoints-BXNph9Fd.js +1 -0
  216. package/static/settings/assets/workspace-layout-TZ7fteel.js +1 -0
  217. package/static/settings/auth-callback.html +15 -0
  218. package/static/settings/settings.html +3 -2
  219. package/node_modules/@solid/access-token-verifier/node_modules/n3/browser/n3.min.js +0 -1
  220. package/node_modules/@solid/community-server/node_modules/n3/browser/n3.min.js +0 -1
  221. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/aggregates.d.ts +0 -19
  222. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/ast-to-sparql.d.ts +0 -66
  223. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/compile-time-types.d.ts +0 -40
  224. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/comunica-patch.d.ts +0 -2
  225. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/conflict-resolution.d.ts +0 -110
  226. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/discovery/composite-discovery.d.ts +0 -18
  227. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/discovery/index.d.ts +0 -7
  228. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/discovery/interop-discovery.d.ts +0 -36
  229. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/discovery/interop-tables.d.ts +0 -37
  230. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/discovery/interop-types.d.ts +0 -36
  231. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/discovery/provider-cache.d.ts +0 -99
  232. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/discovery/typeindex-discovery.d.ts +0 -32
  233. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/discovery/types.d.ts +0 -132
  234. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/exact-records.d.ts +0 -21
  235. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/index.d.ts +0 -14
  236. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/ldp-executor.d.ts +0 -76
  237. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/ldp-strategy.d.ts +0 -53
  238. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/pod-executor-types.d.ts +0 -9
  239. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/pod-executor.d.ts +0 -73
  240. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/sparql-strategy.d.ts +0 -31
  241. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/strategy-factory.d.ts +0 -42
  242. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/types.d.ts +0 -85
  243. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/expressions.d.ts +0 -40
  244. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/federated/executor.d.ts +0 -98
  245. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/federated/index.d.ts +0 -3
  246. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/federated/types.d.ts +0 -69
  247. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/notifications/channels/base-channel.d.ts +0 -29
  248. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/notifications/channels/index.d.ts +0 -4
  249. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/notifications/channels/sse-channel.d.ts +0 -50
  250. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/notifications/channels/websocket-channel.d.ts +0 -16
  251. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/notifications/index.d.ts +0 -3
  252. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/notifications/notifications-client.d.ts +0 -88
  253. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/notifications/types.d.ts +0 -228
  254. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/order-by.d.ts +0 -9
  255. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/pod-database.d.ts +0 -548
  256. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/pod-dialect.d.ts +0 -324
  257. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/pod-discovery.d.ts +0 -20
  258. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/pod-session.d.ts +0 -52
  259. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/profile-manager.d.ts +0 -90
  260. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/default-id-template.d.ts +0 -10
  261. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/delete-query-builder.d.ts +0 -31
  262. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/helpers.d.ts +0 -11
  263. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/index.d.ts +0 -7
  264. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/insert-query-builder.d.ts +0 -37
  265. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/select-query-builder.d.ts +0 -150
  266. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/types.d.ts +0 -40
  267. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/update-query-builder.d.ts +0 -34
  268. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-conditions.d.ts +0 -60
  269. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-where-policy.d.ts +0 -8
  270. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/rdf-constants.d.ts +0 -16
  271. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/rdf-schema-parser.d.ts +0 -34
  272. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/repository.d.ts +0 -78
  273. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/resource-reference.d.ts +0 -31
  274. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/resource-resolver/base-resolver.d.ts +0 -141
  275. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/resource-resolver/document-resolver.d.ts +0 -36
  276. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/resource-resolver/factory.d.ts +0 -27
  277. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/resource-resolver/fragment-resolver.d.ts +0 -34
  278. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/resource-resolver/index.d.ts +0 -11
  279. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/resource-resolver/types.d.ts +0 -57
  280. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/runtime/pod-runtime.d.ts +0 -60
  281. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/schema/columns.d.ts +0 -74
  282. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/schema/defs.d.ts +0 -101
  283. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/schema/factories.d.ts +0 -29
  284. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/schema/index.d.ts +0 -9
  285. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/schema/pod-table.d.ts +0 -118
  286. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/schema/relations.d.ts +0 -26
  287. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/schema/solid-schema.d.ts +0 -22
  288. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/schema/types.d.ts +0 -45
  289. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/schema/utils.d.ts +0 -15
  290. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/select-plan.d.ts +0 -50
  291. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/services/pod-services.d.ts +0 -43
  292. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/shape/generator.d.ts +0 -12
  293. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/shape/index.d.ts +0 -4
  294. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/shape/manager.d.ts +0 -45
  295. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/shape/shacl-parser.d.ts +0 -19
  296. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/shape/shacl.d.ts +0 -11
  297. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/shape/types.d.ts +0 -149
  298. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/shape/validator.d.ts +0 -11
  299. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/solid-n3-client.d.ts +0 -86
  300. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql/builder/expression-builder.d.ts +0 -56
  301. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql/builder/select-builder.d.ts +0 -44
  302. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql/builder/update-builder.d.ts +0 -33
  303. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql/helpers.d.ts +0 -19
  304. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql/types.d.ts +0 -10
  305. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql-engine.d.ts +0 -16
  306. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql-executor.d.ts +0 -40
  307. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/subject/index.d.ts +0 -29
  308. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/subject/resolver.d.ts +0 -116
  309. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/subject/types.d.ts +0 -97
  310. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/builder.d.ts +0 -86
  311. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/handlers/array.d.ts +0 -23
  312. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/handlers/default.d.ts +0 -20
  313. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/handlers/index.d.ts +0 -35
  314. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/handlers/inline.d.ts +0 -35
  315. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/handlers/inverse.d.ts +0 -26
  316. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/handlers/uri.d.ts +0 -28
  317. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/index.d.ts +0 -9
  318. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/types.d.ts +0 -156
  319. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/typeindex-manager.d.ts +0 -130
  320. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/types.d.ts +0 -57
  321. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/uri/index.d.ts +0 -8
  322. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/uri/resolver.d.ts +0 -153
  323. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/uri/types.d.ts +0 -154
  324. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/utils/debug-logger.d.ts +0 -19
  325. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/utils/origin-auth.d.ts +0 -28
  326. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/utils/pod-root.d.ts +0 -15
  327. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/zod-integration.d.ts +0 -97
  328. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/driver.d.ts +0 -60
  329. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/index.d.ts +0 -31
  330. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/pod.d.ts +0 -140
  331. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/solid.d.ts +0 -21
  332. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/test-utils/real-test-helpers.d.ts +0 -5
  333. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/types/sparql-types.d.ts +0 -27
  334. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/utils/find-by-iri.d.ts +0 -11
  335. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/utils/helpers.d.ts +0 -17
  336. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/utils/namespace.d.ts +0 -4
  337. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/utils/rdf-helpers.d.ts +0 -17
  338. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/utils/rdf-validation.d.ts +0 -27
  339. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/utils/thing-operations.d.ts +0 -28
  340. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/utils/webid-resolver.d.ts +0 -23
  341. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/index.ts +0 -4
  342. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/locales/index.ts +0 -1
  343. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/mini/index.ts +0 -3
  344. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/ZodError.ts +0 -330
  345. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  346. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  347. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  348. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  349. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  350. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  351. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  352. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  353. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  354. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/errors.ts +0 -13
  355. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/external.ts +0 -6
  356. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  357. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  358. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  359. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  360. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  361. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/helpers/util.ts +0 -224
  362. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/index.ts +0 -4
  363. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/locales/en.ts +0 -124
  364. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/standard-schema.ts +0 -113
  365. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  366. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  367. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  368. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  369. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  370. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  371. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  372. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  373. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  374. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  375. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  376. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
  377. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  378. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  379. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  380. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  381. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  382. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  383. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  384. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/error.test.ts +0 -551
  385. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  386. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  387. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/function.test.ts +0 -261
  388. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  389. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  390. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
  391. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  392. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
  393. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  394. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  395. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  396. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  397. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
  398. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  399. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  400. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  401. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  402. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  403. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/object.test.ts +0 -434
  404. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  405. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  406. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  407. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  408. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  409. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  410. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  411. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  412. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  413. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
  414. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  415. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  416. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  417. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  418. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  419. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  420. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/string.test.ts +0 -916
  421. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  422. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  423. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  424. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  425. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  426. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v3/types.ts +0 -5138
  427. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/checks.ts +0 -32
  428. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  429. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/compat.ts +0 -70
  430. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/errors.ts +0 -82
  431. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/external.ts +0 -52
  432. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -659
  433. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/index.ts +0 -5
  434. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/iso.ts +0 -90
  435. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/parse.ts +0 -82
  436. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/schemas.ts +0 -2672
  437. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  438. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -59
  439. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
  440. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -216
  441. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  442. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  443. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  444. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
  445. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
  446. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -326
  447. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  448. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -573
  449. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -703
  450. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  451. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
  452. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  453. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -62
  454. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -302
  455. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -409
  456. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
  457. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  458. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +0 -197
  459. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -694
  460. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
  461. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -807
  462. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
  463. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
  464. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
  465. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
  466. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -895
  467. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -360
  468. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  469. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/global-config.test.ts +0 -39
  470. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -68
  471. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -939
  472. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -60
  473. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -198
  474. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +0 -46
  475. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
  476. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
  477. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -117
  478. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +0 -29
  479. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +0 -24
  480. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -330
  481. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  482. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  483. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
  484. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  485. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -325
  486. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -717
  487. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -333
  488. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -450
  489. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
  490. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
  491. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -74
  492. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +0 -26
  493. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -351
  494. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  495. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  496. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  497. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
  498. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -717
  499. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -631
  500. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -633
  501. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
  502. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -181
  503. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -134
  504. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
  505. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1224
  506. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -106
  507. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -771
  508. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
  509. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -3125
  510. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -378
  511. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -496
  512. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -273
  513. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
  514. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  515. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  516. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/api.ts +0 -1823
  517. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/checks.ts +0 -1293
  518. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/config.ts +0 -15
  519. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/core.ts +0 -153
  520. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/doc.ts +0 -44
  521. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/errors.ts +0 -455
  522. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/index.ts +0 -16
  523. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -126
  524. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -666
  525. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/json-schema.ts +0 -147
  526. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/parse.ts +0 -195
  527. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/regexes.ts +0 -190
  528. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/registries.ts +0 -105
  529. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/schemas.ts +0 -4730
  530. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
  531. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
  532. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  533. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  534. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/locales/el.test.ts +0 -215
  535. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  536. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -181
  537. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +0 -72
  538. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
  539. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +0 -163
  540. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
  541. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  542. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  543. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -105
  544. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -125
  545. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
  546. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/to-json-schema.ts +0 -622
  547. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/util.ts +0 -983
  548. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/versions.ts +0 -5
  549. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/core/zsf.ts +0 -323
  550. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/index.ts +0 -4
  551. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ar.ts +0 -115
  552. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/az.ts +0 -111
  553. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/be.ts +0 -176
  554. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/bg.ts +0 -128
  555. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ca.ts +0 -116
  556. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/cs.ts +0 -118
  557. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/da.ts +0 -123
  558. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/de.ts +0 -116
  559. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/el.ts +0 -121
  560. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/en.ts +0 -123
  561. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/eo.ts +0 -118
  562. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/es.ts +0 -141
  563. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/fa.ts +0 -126
  564. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/fi.ts +0 -121
  565. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/fr-CA.ts +0 -116
  566. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/fr.ts +0 -132
  567. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/he.ts +0 -246
  568. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/hr.ts +0 -131
  569. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/hu.ts +0 -117
  570. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/hy.ts +0 -164
  571. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/id.ts +0 -115
  572. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/index.ts +0 -52
  573. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/is.ts +0 -119
  574. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/it.ts +0 -116
  575. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ja.ts +0 -114
  576. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ka.ts +0 -123
  577. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/kh.ts +0 -7
  578. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/km.ts +0 -119
  579. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ko.ts +0 -121
  580. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/lt.ts +0 -239
  581. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/mk.ts +0 -118
  582. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ms.ts +0 -115
  583. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/nl.ts +0 -121
  584. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/no.ts +0 -116
  585. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ota.ts +0 -117
  586. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/pl.ts +0 -118
  587. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ps.ts +0 -126
  588. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/pt.ts +0 -116
  589. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ro.ts +0 -129
  590. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ru.ts +0 -176
  591. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/sl.ts +0 -118
  592. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/sv.ts +0 -119
  593. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ta.ts +0 -118
  594. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/th.ts +0 -119
  595. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/tr.ts +0 -111
  596. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ua.ts +0 -7
  597. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/uk.ts +0 -117
  598. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/ur.ts +0 -119
  599. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/uz.ts +0 -117
  600. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/vi.ts +0 -117
  601. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/yo.ts +0 -124
  602. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/zh-CN.ts +0 -116
  603. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/locales/zh-TW.ts +0 -115
  604. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/checks.ts +0 -32
  605. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/coerce.ts +0 -27
  606. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/external.ts +0 -41
  607. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/index.ts +0 -3
  608. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/iso.ts +0 -66
  609. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/parse.ts +0 -14
  610. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/schemas.ts +0 -1947
  611. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -24
  612. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
  613. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
  614. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
  615. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -548
  616. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
  617. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
  618. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -5
  619. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -993
  620. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
  621. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -227
  622. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  623. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -325
  624. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
  625. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -352
  626. package/node_modules/@undefineds.co/drizzle-solid/node_modules/zod/src/v4-mini/index.ts +0 -3
  627. package/node_modules/@undefineds.co/models/node_modules/n3/browser/n3.min.js +0 -1
  628. package/node_modules/jose/dist/browser/index.js +0 -30
  629. package/node_modules/jose/dist/browser/jwe/compact/decrypt.js +0 -27
  630. package/node_modules/jose/dist/browser/jwe/compact/encrypt.js +0 -26
  631. package/node_modules/jose/dist/browser/jwe/flattened/decrypt.js +0 -161
  632. package/node_modules/jose/dist/browser/jwe/flattened/encrypt.js +0 -153
  633. package/node_modules/jose/dist/browser/jwe/general/decrypt.js +0 -31
  634. package/node_modules/jose/dist/browser/jwe/general/encrypt.js +0 -174
  635. package/node_modules/jose/dist/browser/jwk/embedded.js +0 -17
  636. package/node_modules/jose/dist/browser/jwk/thumbprint.js +0 -53
  637. package/node_modules/jose/dist/browser/jwks/local.js +0 -124
  638. package/node_modules/jose/dist/browser/jwks/remote.js +0 -139
  639. package/node_modules/jose/dist/browser/jws/compact/sign.js +0 -17
  640. package/node_modules/jose/dist/browser/jws/compact/verify.js +0 -21
  641. package/node_modules/jose/dist/browser/jws/flattened/sign.js +0 -81
  642. package/node_modules/jose/dist/browser/jws/flattened/verify.js +0 -122
  643. package/node_modules/jose/dist/browser/jws/general/sign.js +0 -67
  644. package/node_modules/jose/dist/browser/jws/general/verify.js +0 -24
  645. package/node_modules/jose/dist/browser/jwt/decrypt.js +0 -23
  646. package/node_modules/jose/dist/browser/jwt/encrypt.js +0 -68
  647. package/node_modules/jose/dist/browser/jwt/produce.js +0 -75
  648. package/node_modules/jose/dist/browser/jwt/sign.js +0 -20
  649. package/node_modules/jose/dist/browser/jwt/unsecured.js +0 -32
  650. package/node_modules/jose/dist/browser/jwt/verify.js +0 -15
  651. package/node_modules/jose/dist/browser/key/export.js +0 -12
  652. package/node_modules/jose/dist/browser/key/generate_key_pair.js +0 -4
  653. package/node_modules/jose/dist/browser/key/generate_secret.js +0 -4
  654. package/node_modules/jose/dist/browser/key/import.js +0 -45
  655. package/node_modules/jose/dist/browser/lib/aesgcmkw.js +0 -16
  656. package/node_modules/jose/dist/browser/lib/buffer_utils.js +0 -51
  657. package/node_modules/jose/dist/browser/lib/cek.js +0 -20
  658. package/node_modules/jose/dist/browser/lib/check_iv_length.js +0 -8
  659. package/node_modules/jose/dist/browser/lib/check_key_type.js +0 -77
  660. package/node_modules/jose/dist/browser/lib/check_p2s.js +0 -6
  661. package/node_modules/jose/dist/browser/lib/crypto_key.js +0 -157
  662. package/node_modules/jose/dist/browser/lib/decrypt_key_management.js +0 -129
  663. package/node_modules/jose/dist/browser/lib/encrypt_key_management.js +0 -89
  664. package/node_modules/jose/dist/browser/lib/epoch.js +0 -1
  665. package/node_modules/jose/dist/browser/lib/format_pem.js +0 -4
  666. package/node_modules/jose/dist/browser/lib/invalid_key_input.js +0 -31
  667. package/node_modules/jose/dist/browser/lib/is_disjoint.js +0 -22
  668. package/node_modules/jose/dist/browser/lib/is_jwk.js +0 -13
  669. package/node_modules/jose/dist/browser/lib/is_object.js +0 -16
  670. package/node_modules/jose/dist/browser/lib/iv.js +0 -20
  671. package/node_modules/jose/dist/browser/lib/jwt_claims_set.js +0 -104
  672. package/node_modules/jose/dist/browser/lib/private_symbols.js +0 -1
  673. package/node_modules/jose/dist/browser/lib/secs.js +0 -55
  674. package/node_modules/jose/dist/browser/lib/validate_algorithms.js +0 -11
  675. package/node_modules/jose/dist/browser/lib/validate_crit.js +0 -34
  676. package/node_modules/jose/dist/browser/package.json +0 -1
  677. package/node_modules/jose/dist/browser/runtime/aeskw.js +0 -32
  678. package/node_modules/jose/dist/browser/runtime/asn1.js +0 -205
  679. package/node_modules/jose/dist/browser/runtime/base64url.js +0 -37
  680. package/node_modules/jose/dist/browser/runtime/bogus.js +0 -6
  681. package/node_modules/jose/dist/browser/runtime/check_cek_length.js +0 -8
  682. package/node_modules/jose/dist/browser/runtime/check_key_length.js +0 -8
  683. package/node_modules/jose/dist/browser/runtime/decrypt.js +0 -91
  684. package/node_modules/jose/dist/browser/runtime/digest.js +0 -6
  685. package/node_modules/jose/dist/browser/runtime/ecdhes.js +0 -47
  686. package/node_modules/jose/dist/browser/runtime/encrypt.js +0 -76
  687. package/node_modules/jose/dist/browser/runtime/fetch_jwks.js +0 -34
  688. package/node_modules/jose/dist/browser/runtime/generate.js +0 -143
  689. package/node_modules/jose/dist/browser/runtime/get_sign_verify_key.js +0 -24
  690. package/node_modules/jose/dist/browser/runtime/is_key_like.js +0 -8
  691. package/node_modules/jose/dist/browser/runtime/jwk_to_key.js +0 -104
  692. package/node_modules/jose/dist/browser/runtime/key_to_jwk.js +0 -21
  693. package/node_modules/jose/dist/browser/runtime/normalize_key.js +0 -68
  694. package/node_modules/jose/dist/browser/runtime/pbes2kw.js +0 -51
  695. package/node_modules/jose/dist/browser/runtime/random.js +0 -2
  696. package/node_modules/jose/dist/browser/runtime/rsaes.js +0 -37
  697. package/node_modules/jose/dist/browser/runtime/runtime.js +0 -1
  698. package/node_modules/jose/dist/browser/runtime/sign.js +0 -11
  699. package/node_modules/jose/dist/browser/runtime/subtle_dsa.js +0 -28
  700. package/node_modules/jose/dist/browser/runtime/subtle_rsaes.js +0 -12
  701. package/node_modules/jose/dist/browser/runtime/timing_safe_equal.js +0 -19
  702. package/node_modules/jose/dist/browser/runtime/verify.js +0 -16
  703. package/node_modules/jose/dist/browser/runtime/webcrypto.js +0 -2
  704. package/node_modules/jose/dist/browser/util/base64url.js +0 -3
  705. package/node_modules/jose/dist/browser/util/decode_jwt.js +0 -32
  706. package/node_modules/jose/dist/browser/util/decode_protected_header.js +0 -34
  707. package/node_modules/jose/dist/browser/util/errors.js +0 -114
  708. package/node_modules/jose/dist/browser/util/runtime.js +0 -2
  709. package/node_modules/openid-client/node_modules/jose/dist/browser/index.js +0 -32
  710. package/node_modules/openid-client/node_modules/jose/dist/browser/jwe/compact/decrypt.js +0 -27
  711. package/node_modules/openid-client/node_modules/jose/dist/browser/jwe/compact/encrypt.js +0 -26
  712. package/node_modules/openid-client/node_modules/jose/dist/browser/jwe/flattened/decrypt.js +0 -166
  713. package/node_modules/openid-client/node_modules/jose/dist/browser/jwe/flattened/encrypt.js +0 -175
  714. package/node_modules/openid-client/node_modules/jose/dist/browser/jwe/general/decrypt.js +0 -31
  715. package/node_modules/openid-client/node_modules/jose/dist/browser/jwe/general/encrypt.js +0 -178
  716. package/node_modules/openid-client/node_modules/jose/dist/browser/jwk/embedded.js +0 -17
  717. package/node_modules/openid-client/node_modules/jose/dist/browser/jwk/thumbprint.js +0 -53
  718. package/node_modules/openid-client/node_modules/jose/dist/browser/jwks/local.js +0 -116
  719. package/node_modules/openid-client/node_modules/jose/dist/browser/jwks/remote.js +0 -76
  720. package/node_modules/openid-client/node_modules/jose/dist/browser/jws/compact/sign.js +0 -17
  721. package/node_modules/openid-client/node_modules/jose/dist/browser/jws/compact/verify.js +0 -21
  722. package/node_modules/openid-client/node_modules/jose/dist/browser/jws/flattened/sign.js +0 -81
  723. package/node_modules/openid-client/node_modules/jose/dist/browser/jws/flattened/verify.js +0 -115
  724. package/node_modules/openid-client/node_modules/jose/dist/browser/jws/general/sign.js +0 -67
  725. package/node_modules/openid-client/node_modules/jose/dist/browser/jws/general/verify.js +0 -24
  726. package/node_modules/openid-client/node_modules/jose/dist/browser/jwt/decrypt.js +0 -23
  727. package/node_modules/openid-client/node_modules/jose/dist/browser/jwt/encrypt.js +0 -68
  728. package/node_modules/openid-client/node_modules/jose/dist/browser/jwt/produce.js +0 -54
  729. package/node_modules/openid-client/node_modules/jose/dist/browser/jwt/sign.js +0 -21
  730. package/node_modules/openid-client/node_modules/jose/dist/browser/jwt/unsecured.js +0 -32
  731. package/node_modules/openid-client/node_modules/jose/dist/browser/jwt/verify.js +0 -16
  732. package/node_modules/openid-client/node_modules/jose/dist/browser/key/export.js +0 -12
  733. package/node_modules/openid-client/node_modules/jose/dist/browser/key/generate_key_pair.js +0 -4
  734. package/node_modules/openid-client/node_modules/jose/dist/browser/key/generate_secret.js +0 -4
  735. package/node_modules/openid-client/node_modules/jose/dist/browser/key/import.js +0 -50
  736. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/aesgcmkw.js +0 -14
  737. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/buffer_utils.js +0 -51
  738. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/cek.js +0 -20
  739. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/check_iv_length.js +0 -8
  740. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/check_key_type.js +0 -45
  741. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/check_p2s.js +0 -6
  742. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/crypto_key.js +0 -152
  743. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/decrypt_key_management.js +0 -127
  744. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/encrypt_key_management.js +0 -87
  745. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/epoch.js +0 -1
  746. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/format_pem.js +0 -4
  747. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/invalid_key_input.js +0 -30
  748. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/is_disjoint.js +0 -22
  749. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/is_object.js +0 -16
  750. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/iv.js +0 -20
  751. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/jwt_claims_set.js +0 -102
  752. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/secs.js +0 -44
  753. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/validate_algorithms.js +0 -11
  754. package/node_modules/openid-client/node_modules/jose/dist/browser/lib/validate_crit.js +0 -34
  755. package/node_modules/openid-client/node_modules/jose/dist/browser/package.json +0 -1
  756. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/aeskw.js +0 -32
  757. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/asn1.js +0 -202
  758. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/base64url.js +0 -37
  759. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/bogus.js +0 -6
  760. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/check_cek_length.js +0 -8
  761. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/check_key_length.js +0 -8
  762. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/decrypt.js +0 -85
  763. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/digest.js +0 -6
  764. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/ecdhes.js +0 -46
  765. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/encrypt.js +0 -68
  766. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/fetch_jwks.js +0 -34
  767. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/generate.js +0 -141
  768. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/get_sign_verify_key.js +0 -17
  769. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/is_key_like.js +0 -5
  770. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/jwk_to_key.js +0 -143
  771. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/key_to_jwk.js +0 -21
  772. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/pbes2kw.js +0 -51
  773. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/random.js +0 -2
  774. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/rsaes.js +0 -37
  775. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/runtime.js +0 -1
  776. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/sign.js +0 -11
  777. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/subtle_dsa.js +0 -26
  778. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/subtle_rsaes.js +0 -12
  779. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/timing_safe_equal.js +0 -19
  780. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/verify.js +0 -16
  781. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/webcrypto.js +0 -2
  782. package/node_modules/openid-client/node_modules/jose/dist/browser/runtime/zlib.js +0 -7
  783. package/node_modules/openid-client/node_modules/jose/dist/browser/util/base64url.js +0 -3
  784. package/node_modules/openid-client/node_modules/jose/dist/browser/util/decode_jwt.js +0 -32
  785. package/node_modules/openid-client/node_modules/jose/dist/browser/util/decode_protected_header.js +0 -34
  786. package/node_modules/openid-client/node_modules/jose/dist/browser/util/errors.js +0 -158
  787. package/node_modules/openid-client/node_modules/jose/dist/browser/util/runtime.js +0 -2
  788. package/static/auth-callback/assets/AiConfigContext-Bx0HCAW5.js +0 -1
  789. package/static/auth-callback/assets/AiConfigPage-ChQImMbm.js +0 -1
  790. package/static/auth-callback/assets/DocumentProcessingPanel-D830H4SH.js +0 -1
  791. package/static/auth-callback/assets/IndexLifecyclePanel-CnlkjMF8.js +0 -1
  792. package/static/auth-callback/assets/IndexSubjectPanel-CdEfg_CO.js +0 -1
  793. package/static/auth-callback/assets/ModelAssignmentsPanel-D-8A8dZx.js +0 -1
  794. package/static/auth-callback/assets/NetworkPage-CfK3x-pb.js +0 -2
  795. package/static/auth-callback/assets/PaneListHeader-Bf_kEd4U.js +0 -1
  796. package/static/auth-callback/assets/SearchIndexingPanel-4kD4RBEQ.js +0 -1
  797. package/static/auth-callback/assets/StatusSubjectPanel-Bw9AiTSf.js +0 -1
  798. package/static/auth-callback/assets/StatusWorkspace-C-301H-0.js +0 -1
  799. package/static/auth-callback/assets/SystemSettingsPage-BbWn-eG6.js +0 -1
  800. package/static/auth-callback/assets/SystemSettingsSubjectPanel-DA4wvNSm.js +0 -33
  801. package/static/auth-callback/assets/XpodAiConnectionsPodStore-CohdyLoX.js +0 -3
  802. package/static/auth-callback/assets/activity-CCsb9Oam.js +0 -1
  803. package/static/auth-callback/assets/admin-C6qCRFiY.js +0 -1
  804. package/static/auth-callback/assets/ai-connections-DexTPyfC.js +0 -1
  805. package/static/auth-callback/assets/badge-CQm5OyzR.js +0 -1
  806. package/static/auth-callback/assets/collection-runtime-DlAuU5TW.js +0 -1
  807. package/static/auth-callback/assets/dialog-CnGzg5Ff.js +0 -1
  808. package/static/auth-callback/assets/download-DwMONJvm.js +0 -1
  809. package/static/auth-callback/assets/external-link-Bu5AGqCO.js +0 -1
  810. package/static/auth-callback/assets/index-B0T-1YO8.js +0 -41
  811. package/static/auth-callback/assets/index-C8QZf_4W.js +0 -1
  812. package/static/auth-callback/assets/index-browser-lRsMcP_7.js +0 -273
  813. package/static/auth-callback/assets/key-round-BDMtU57P.js +0 -1
  814. package/static/auth-callback/assets/layout-DB3pMyTl.js +0 -1
  815. package/static/auth-callback/assets/pod-collections-host-KnnGFZHL.js +0 -8
  816. package/static/auth-callback/assets/rotate-ccw-CoKIGCsQ.js +0 -1
  817. package/static/auth-callback/assets/settings-projection-CUkyprDQ.js +0 -1
  818. package/static/auth-callback/assets/skeleton-CPoSWHDr.js +0 -1
  819. package/static/auth-callback/assets/waypoints-BeYHxqHv.js +0 -1
  820. package/static/auth-callback/assets/workspace-layout-xA5YxiK3.js +0 -1
  821. package/static/auth-callback/auth-callback.html +0 -14
  822. package/static/auth-callback/auth.html +0 -19
  823. package/static/auth-callback/reachability.html +0 -221
  824. package/static/auth-callback/reachability.svg +0 -7
  825. package/static/auth-callback/reachability.webmanifest +0 -18
  826. package/static/auth-callback/signal-pod.html +0 -293
  827. package/static/auth-callback/theme-init.js +0 -18
  828. package/static/auth-callback/vite.svg +0 -1
  829. package/static/auth-callback/xpod-desktop-client.json +0 -19
  830. package/static/dashboard/assets/IndexLifecyclePanel-CpjtgezK.js +0 -1
  831. package/static/dashboard/assets/ModelAssignmentsPanel-BxVgWZPc.js +0 -1
  832. package/static/dashboard/assets/NetworkPage-zQgFscEW.js +0 -2
  833. package/static/settings/assets/AiConfigContext-D3b1l_Kw.js +0 -1
  834. package/static/settings/assets/AiConfigPage-DYKw-atP.js +0 -1
  835. package/static/settings/assets/DocumentProcessingPanel-DguRfsIV.js +0 -1
  836. package/static/settings/assets/IndexLifecyclePanel-B85qJJA4.js +0 -1
  837. package/static/settings/assets/IndexSubjectPanel-CsN7IxaV.js +0 -1
  838. package/static/settings/assets/ModelAssignmentsPanel-DEp9byI6.js +0 -1
  839. package/static/settings/assets/ModelsPage-CzTnPs_G.js +0 -11
  840. package/static/settings/assets/NetworkPage-BDVnmUU0.js +0 -2
  841. package/static/settings/assets/PaneListHeader-Cpe39N76.js +0 -1
  842. package/static/settings/assets/SearchIndexingPanel-DA9w8lLL.js +0 -1
  843. package/static/settings/assets/StatusSubjectPanel-BU0Aq0CS.js +0 -1
  844. package/static/settings/assets/StatusWorkspace-D1AC1i5N.js +0 -1
  845. package/static/settings/assets/XpodAiConnectionsPodStore-VU5Bsz1a.js +0 -3
  846. package/static/settings/assets/activity-DGpLfsQB.js +0 -1
  847. package/static/settings/assets/badge-_hCrrWRP.js +0 -1
  848. package/static/settings/assets/collection-runtime-E40TZ8Cl.js +0 -1
  849. package/static/settings/assets/dialog-DTr2JkHn.js +0 -1
  850. package/static/settings/assets/download-B_D21DDX.js +0 -1
  851. package/static/settings/assets/external-link-BATYaM13.js +0 -1
  852. package/static/settings/assets/index-BAlAVi-J.js +0 -4
  853. package/static/settings/assets/index-Ckh4h9jj.js +0 -41
  854. package/static/settings/assets/key-round-ZTVU_1O1.js +0 -1
  855. package/static/settings/assets/rotate-ccw-DDdw8PTU.js +0 -1
  856. package/static/settings/assets/settings-CyLnISOv.js +0 -306
  857. package/static/settings/assets/settings-rk080mvG.css +0 -1
  858. package/static/settings/assets/skeleton-DEzA3hc2.js +0 -1
  859. package/static/settings/assets/waypoints-BSdfNvEb.js +0 -1
  860. package/static/settings/assets/workspace-layout-BOQnl_3d.js +0 -1
  861. /package/static/{auth-callback/assets/auth-callback-rk080mvG.css → settings/assets/global-rk080mvG.css} +0 -0
@@ -0,0 +1,2 @@
1
+ import{c as I,Y as xe,r as c,aj as U,j as e,C as w,a as k,b as C,d as S,e as P,B as j,ak as ne,R as he,_ as fe,$ as ve,a0 as be}from"./global-B_WO-aYY.js";import{P as ge}from"./PaneListHeader-Da5jZFvG.js";import{N as ie,W as je}from"./waypoints-BXNph9Fd.js";import{A as oe}from"./activity-CWy1W2W0.js";import{T as ye,u as Ne}from"./workspace-layout-TZ7fteel.js";import{E as le}from"./external-link-DnkJGKNc.js";import{B as $}from"./badge-v30yFaaj.js";import{R as we}from"./rotate-ccw-DNR_R3oT.js";import{D as ke}from"./download-C3Dzb60R.js";const Ce=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],Se=I("cable",Ce);const Pe=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],de=I("earth",Pe);const Re=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],De=I("lock-keyhole",Re);const Te=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Ae=I("radio",Te);const Ee=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],Le=I("route",Ee);const $e=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ie=I("shield-check",$e);const Me=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Oe=I("wifi",Me);async function Ue({fetchImpl:t}){return H(t,z("/api/network/settings/status"),{method:"GET",credentials:"include",headers:{accept:"application/json"}})}async function qe({fetchImpl:t}){return H(t,z("/api/network/settings/diagnose"),{method:"POST",credentials:"include",headers:{accept:"application/json"}})}async function ze({fetchImpl:t}){return H(t,z("/api/network/settings/tunnel-clients"),{method:"GET",credentials:"include",headers:{accept:"application/json"}})}async function He({fetchImpl:t,provider:s}){return H(t,z(`/api/network/settings/tunnel-clients/${encodeURIComponent(s)}/install`),{method:"POST",credentials:"include",headers:{accept:"application/json"}})}async function Ve({fetchImpl:t}){await H(t,z("/api/network/settings/certificate/renew"),{method:"POST",credentials:"include",headers:{accept:"application/json"}})}async function _e({podUrl:t,fetchImpl:s,patch:a}){return H(s,Be("/api/network/settings/configuration",t),{method:"PUT",credentials:"include",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(a)})}function z(t){const s=typeof window>"u"?"http://localhost":window.location.origin;return new URL(t,s).toString()}function Be(t,s){return s?new URL(t,s).toString():z(t)}async function H(t,s,a){const i=await t(s,a);if(!i.ok)throw await i.arrayBuffer(),new Error("Network settings request failed. Please try again.");if(!i.headers.get("content-type")?.includes("application/json"))throw await i.arrayBuffer(),new Error("Network settings request failed. Please try again.");return await i.json()}const se=[{id:"overview",label:"Overview",path:"",icon:ie},{id:"endpoints",label:"Endpoints",path:"endpoints",icon:Se},{id:"addresses",label:"Addresses",path:"addresses",icon:de},{id:"domain-dns",label:"Domain & DNS",path:"domain-dns",icon:Le},{id:"https",label:"HTTPS",path:"https",icon:De},{id:"tunnel-profiles",label:"Tunnel Profiles",path:"tunnel-profiles",icon:je},{id:"p2p",label:"P2P",path:"p2p",icon:Ae},{id:"diagnostics",label:"Diagnostics",path:"diagnostics",icon:oe}];function Fe(t){const s=["Xpod Network Diagnostics",`Generated: ${t.generatedAt}`,`Canonical URL: ${t.endpoint??"Unavailable"}`],a=t.checks.flatMap(i=>["",`[${i.status.toUpperCase()}] ${i.label}`,...i.detail?[i.detail]:[]]);return[...s,...a].join(`
2
+ `)}function yt(){const t=xe(),[s,a]=c.useState(),[i,n]=c.useState([]),[l,o]=c.useState(),[f,u]=c.useState(),[d,x]=c.useState(!1),[T,A]=c.useState(!1),[K,E]=c.useState(!1),[M,W]=c.useState(!1),[r,p]=c.useState(),b=c.useRef(0),N=c.useRef(0),V=c.useRef(0),_=c.useRef(void 0),B=c.useRef(!0),G=typeof window>"u"?void 0:window.location.origin,R=G?`local-host:${G}`:void 0,D=globalThis.fetch;c.useEffect(()=>(B.current=!0,()=>{B.current=!1,b.current+=1,N.current+=1,V.current+=1}),[]);const J=c.useCallback((m,h)=>B.current&&b.current===m&&_.current===h,[]),Y=c.useCallback((m,h)=>B.current&&N.current===m&&_.current===h,[]),X=c.useCallback((m,h)=>B.current&&V.current===m&&_.current===h,[]),F=c.useCallback(async()=>{const m=R;if(!m)return;const h=b.current+1;b.current=h,x(!0),u(void 0);try{const L=await Ue({fetchImpl:D});J(h,m)&&a(L)}catch{J(h,m)&&u("网络设置请求失败,请重试。")}finally{J(h,m)&&x(!1)}},[D,R,J]);c.useEffect(()=>{let m=!1;return _.current=R,b.current+=1,N.current+=1,V.current+=1,queueMicrotask(()=>{m||_.current!==R||(a(void 0),n([]),o(void 0),u(void 0),x(!1),A(!1),E(!1),R&&F())}),()=>{m=!0}},[R,F]);const ue=c.useCallback(async()=>{const m=R;if(!m)return;const h=N.current+1;N.current=h,A(!0),u(void 0);try{const L=await qe({fetchImpl:D});Y(h,m)&&(n(L.checks),o(new Date),U({description:"诊断完成"}))}catch{Y(h,m)&&u("网络诊断失败,请重试。")}finally{Y(h,m)&&A(!1)}},[D,R,Y]),me=c.useCallback(async()=>{const m=R;if(!m)return;const h=V.current+1;V.current=h,E(!0),u(void 0);try{await Ve({fetchImpl:D}),X(h,m)&&(U({variant:"success",description:"证书续签成功"}),await F())}catch{X(h,m)&&u("证书续签失败,请重试。")}finally{X(h,m)&&E(!1)}},[D,R,X,F]),Q=c.useCallback(async m=>{if(G){W(!0),u(void 0);try{const h=await _e({fetchImpl:D,patch:m});a(L=>L&&{...L,configuration:h.configuration}),p(h.applyState),U({variant:"success",description:"Network configuration saved"})}catch{u("网络配置保存失败,请重试。")}finally{W(!1)}}},[D,G]),pe=c.useMemo(()=>[{key:"local",title:"本机",values:s?.addresses.local??[]},{key:"lan",title:"局域网",values:s?.addresses.lan??[]},{key:"public",title:"公网",values:s?.addresses.public??[]}],[s]),re=t.pathname.split("/").filter(Boolean).at(-1),g=se.some(m=>m.path===re)?re:"overview";return e.jsx(ye,{mode:"auto",listHeader:e.jsx(ge,{title:"Network"}),list:e.jsx(Ke,{}),mainHeader:e.jsx(We,{title:se.find(m=>(m.path||"overview")===g)?.label??"Overview",loading:d,stale:d&&!!s,onRefresh:F}),main:e.jsxs("section",{className:"flex min-h-full flex-col gap-4 bg-background p-6",children:[f?e.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:f}):null,(g==="overview"||g==="endpoints")&&e.jsx(st,{endpoint:s?.endpoint,loading:d&&!s}),g==="overview"&&e.jsx(Ge,{status:s}),(g==="overview"||g==="addresses")&&e.jsx(at,{sections:pe,loading:d&&!s,diagnostics:i,checkedAt:l}),g==="overview"&&e.jsx(dt,{status:s}),g==="domain-dns"&&e.jsxs(e.Fragment,{children:[e.jsx(ot,{status:s}),e.jsx(Ye,{configuration:s?.configuration,saving:M,applyState:r,onSave:Q})]}),g==="https"&&e.jsxs(e.Fragment,{children:[e.jsx(lt,{status:s}),e.jsx(Xe,{configuration:s?.configuration,saving:M,applyState:r,onSave:Q})]}),g==="tunnel-profiles"&&e.jsxs(e.Fragment,{children:[e.jsx(Je,{title:"Observed tunnel",label:"Tunnel",capability:s?.tunnel}),e.jsx(Ze,{configuration:s?.configuration,providers:s?.providers??[],ingress:s?.ingress,saving:M,applyState:r,onSave:Q}),e.jsx(Qe,{fetchImpl:D})]}),g==="p2p"&&e.jsx(tt,{configuration:s?.configuration,saving:M,applyState:r,onSave:Q}),(g==="overview"||g==="diagnostics"||g==="https")&&e.jsx(ct,{status:s,endpoint:s?.endpoint,diagnostics:i,diagnosing:T,renewing:K,onDiagnose:ue,onRenewCertificate:me})]}),className:"min-h-full"})}function Ke(){const t=Ne();return e.jsx("aside",{className:"h-full border-r border-border bg-muted/20 py-2",children:e.jsx("nav",{"aria-label":"Network sections","data-list-navigation":!0,children:se.map(s=>{const a=s.icon,i=`/network${s.path?`/${s.path}`:""}`;return e.jsxs(fe,{to:i,onClick:()=>t.openMain(),onKeyDown:ve,className:({isActive:n})=>be(n,{compact:!1}),end:s.path==="",children:[e.jsx(a,{className:"h-4 w-4","aria-hidden":"true"}),s.label]},s.id)})})})}function We({title:t,loading:s,stale:a,onRefresh:i}){return e.jsxs("div",{className:"flex h-full min-w-0 items-center justify-between gap-4 px-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h1",{className:"text-sm font-semibold text-foreground",children:["Network · ",t]}),e.jsx("div",{className:"truncate text-xs text-muted-foreground","aria-live":"polite",children:a?"Refreshing · showing previous snapshot":"接入点、DNS、TLS、隧道与连通性诊断"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(j,{type:"button",size:"sm",variant:"outline",onClick:i,disabled:s,children:[e.jsx(he,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"刷新"]})})]})}function Ge({status:t}){const s=t?.addresses.public[0]??t?.addresses.lan[0]??t?.addresses.local[0]??t?.endpoint,a=t?!t.dns.supported||t.dns.status==="unsupported"?"Configure Domain & DNS, then recheck observed DNS.":!t.tls.supported||!["valid","active","ready"].includes(t.tls.status)?"Review HTTPS configuration and certificate renewal evidence.":"No connectivity action is currently required.":"Refresh network status.",i=t?.tunnel.supported===!0;return e.jsxs(w,{children:[e.jsxs(k,{children:[e.jsx(C,{className:"text-base",children:"Preferred access path"}),e.jsx(S,{children:"First address this runtime has configured, in public → LAN → local order"})]}),e.jsxs(P,{className:"space-y-3 text-sm",children:[e.jsx("div",{className:"break-words font-medium",children:s??"Not configured"}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-4",children:[e.jsxs($,{variant:"outline",children:["Local ",t?.addresses.local.length?"configured":"not configured"]}),e.jsxs($,{variant:"outline",children:["LAN ",t?.addresses.lan.length?"configured":"not configured"]}),e.jsxs($,{variant:"outline",children:["Public ",t?.addresses.public.length?"configured":"not configured"]}),e.jsxs($,{variant:"outline",children:["Tunnel ",i?t?.tunnel.status??"unknown":"not observed"]})]}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:"Configured addresses are not probe results; reachability is reported per route."}),e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[e.jsx("div",{className:"font-medium",children:"Next action"}),e.jsx("div",{className:"mt-1 text-muted-foreground",children:a})]})]})]})}function Je({title:t,label:s,capability:a,extra:i}){return e.jsxs(w,{children:[e.jsxs(k,{children:[e.jsx(C,{className:"text-base",children:t}),e.jsx(S,{children:"Observed runtime state"})]}),e.jsx(P,{children:e.jsx(q,{label:s,capability:a,extra:i})})]})}function Z({title:t}){return e.jsxs(w,{children:[e.jsxs(k,{children:[e.jsx(C,{className:"text-base",children:t}),e.jsx(S,{children:"Desired configuration"})]}),e.jsxs(P,{className:"text-sm text-muted-foreground",children:["This runtime does not report a configurable ",t," capability."]})]})}function Ye({configuration:t,saving:s,applyState:a,onSave:i}){const[n,l]=c.useState(t?.domainDns),[o,f]=c.useState("");return c.useEffect(()=>{let u=!1;return queueMicrotask(()=>{u||l(t?.domainDns)}),()=>{u=!0}},[t]),n?e.jsxs(ee,{title:"Saved configuration",applyState:a,children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(y,{name:"domain",label:"Domain",value:n.domain,onChange:u=>l({...n,domain:u})}),e.jsx(y,{name:"provider",label:"DNS provider",value:n.provider,onChange:u=>l({...n,provider:u})}),e.jsx(ce,{name:"recordTtl",label:"Record TTL (seconds)",value:n.recordTtl,min:30,max:86400,onChange:u=>l({...n,recordTtl:u})}),e.jsx(y,{name:"dnsCredential",label:n.credentialConfigured?"Replace credential (configured)":"Credential",value:o,type:"password",onChange:f})]}),e.jsx(ae,{label:"Enable DDNS",checked:n.ddnsEnabled,onChange:u=>l({...n,ddnsEnabled:u})}),e.jsx(te,{label:"Save DNS configuration",saving:s,onClick:()=>i({domainDns:{domain:n.domain,ddnsEnabled:n.ddnsEnabled,provider:n.provider,recordTtl:n.recordTtl,...o?{credential:o}:{}}})})]}):e.jsx(Z,{title:"Domain & DNS"})}function Xe({configuration:t,saving:s,applyState:a,onSave:i}){const[n,l]=c.useState(t?.https);return c.useEffect(()=>{let o=!1;return queueMicrotask(()=>{o||l(t?.https)}),()=>{o=!0}},[t]),n?e.jsxs(ee,{title:"Saved configuration",applyState:a,children:[e.jsx(ae,{label:"Enable HTTPS",checked:n.enabled,onChange:o=>l({...n,enabled:o})}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(y,{name:"acmeEmail",label:"ACME email",value:n.acmeEmail,onChange:o=>l({...n,acmeEmail:o})}),e.jsx(y,{name:"acmeDomains",label:"Certificate domains",value:n.domains.join(", "),onChange:o=>l({...n,domains:o.split(",").map(f=>f.trim()).filter(Boolean)})}),e.jsx(y,{name:"certificatePath",label:"Certificate path",value:n.certificatePath??"",onChange:o=>l({...n,certificatePath:o})}),e.jsx(y,{name:"certificateKeyPath",label:"Private-key path",value:n.certificateKeyPath??"",onChange:o=>l({...n,certificateKeyPath:o})}),e.jsx(ce,{name:"renewBeforeDays",label:"Renew before (days)",value:n.renewBeforeDays,min:1,max:90,onChange:o=>l({...n,renewBeforeDays:o})})]}),e.jsx(te,{label:"Save HTTPS configuration",saving:s,onClick:()=>i({https:n})})]}):e.jsx(Z,{title:"HTTPS"})}function Qe({fetchImpl:t}){const[s,a]=c.useState(void 0),[i,n]=c.useState(void 0),[l,o]=c.useState(void 0),f=async()=>{n("inspect"),o(void 0);try{const d=await ze({fetchImpl:t});a(d.clients)}catch(d){o(d instanceof Error?d.message:String(d))}finally{n(void 0)}},u=async d=>{n(d),o(void 0);try{const x=await He({fetchImpl:t,provider:d});a(x.clients)}catch(x){o(x instanceof Error?x.message:String(x))}finally{n(void 0)}};return e.jsxs(w,{children:[e.jsxs(k,{children:[e.jsx(C,{className:"text-base",children:"Tunnel clients"}),e.jsx(S,{children:"Clients are not bundled with this build: check where one comes from, or download it into the plugin directory."})]}),e.jsxs(P,{className:"space-y-3 text-sm",children:[e.jsx(j,{type:"button",size:"sm",variant:"outline",onClick:f,disabled:i==="inspect",children:i==="inspect"?"Checking…":"Check clients"}),l&&e.jsx("div",{className:"text-destructive",children:l}),s&&e.jsx("div",{className:"space-y-2",children:s.map(d=>e.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md border border-border p-2",children:[e.jsx($,{variant:d.state==="ready"?"default":"outline",children:d.state==="ready"?"Ready":"Missing"}),e.jsx("span",{className:"font-medium",children:d.label}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[d.path??d.binary,d.version?` · ${d.version}`:"",d.source==="bundled"?" · plugin directory":""]}),d.state==="missing"&&e.jsx("span",{className:"text-xs text-muted-foreground",children:d.installHint}),d.state==="missing"&&d.installable&&e.jsx(j,{type:"button",size:"sm",onClick:()=>u(d.provider),disabled:i===d.provider,children:i===d.provider?"Downloading…":"Download"}),d.state==="missing"&&!d.installable&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",d.installableReason,")"]})]},d.provider))})]})]})}function Ze({configuration:t,providers:s,ingress:a,saving:i,applyState:n,onSave:l}){const[o,f]=c.useState(t?.tunnelProfiles.activeProfileId??""),[u,d]=c.useState(t?.tunnelProfiles.profiles??[]),[x,T]=c.useState({});if(c.useEffect(()=>{let r=!1;return queueMicrotask(()=>{r||(f(t?.tunnelProfiles.activeProfileId??""),d(t?.tunnelProfiles.profiles??[]),T({}))}),()=>{r=!0}},[t]),!t)return e.jsx(Z,{title:"Tunnel Profiles"});const A=(r,p)=>d(b=>b.map(N=>N.id===r?{...N,...p}:N)),K=s.filter(r=>r.runtimeSupported),E=r=>s.find(p=>p.id===r),M=()=>{const r=`tunnel-${Date.now()}`,p=K[0]?.id??"ngrok";d(b=>[...b,{id:r,provider:p,label:"New tunnel",credentialConfigured:!1,parameters:{}}])},W=r=>{d(p=>p.filter(b=>b.id!==r)),o===r&&f("none")};return e.jsxs(ee,{title:"Saved tunnel profiles",applyState:n,children:[e.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:["Active profile",e.jsxs("select",{value:o||"none",onChange:r=>f(r.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3 sm:max-w-sm",children:[e.jsx("option",{value:"none",children:"None"}),u.map(r=>e.jsxs("option",{value:r.id,children:[r.label," · ",r.provider]},r.id))]})]}),e.jsx("div",{className:"space-y-3",children:u.map(r=>e.jsxs("div",{className:"space-y-3 rounded-md border border-border p-3 text-sm",children:[e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(y,{name:`tunnel-label-${r.id}`,label:"Label",value:r.label,onChange:p=>A(r.id,{label:p})}),e.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:["Provider",e.jsx("select",{value:r.provider,onChange:p=>A(r.id,{provider:p.target.value,parameters:{}}),className:"block h-10 w-full rounded-md border border-input bg-background px-3",children:K.map(p=>e.jsx("option",{value:p.id,children:p.label},p.id))})]}),E(r.provider)?.endpointSource==="declared"?e.jsx(y,{name:`tunnel-url-${r.id}`,label:"Public endpoint (declared)",value:r.publicUrl??"",onChange:p=>A(r.id,{publicUrl:p})}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"The provider reports its public endpoint; there is nothing to type here."}),e.jsx(y,{name:`tunnel-credential-${r.id}`,label:r.credentialConfigured?"Replace credential (configured)":"Credential",type:"password",value:x[r.id]??"",onChange:p=>T(b=>({...b,[r.id]:p}))})]}),e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer font-medium",children:"Provider-specific parameters"}),e.jsx("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:(E(r.provider)?.parameterFields??[]).map(({key:p,label:b})=>e.jsx(y,{name:`tunnel-${p}-${r.id}`,label:b,value:r.parameters?.[p]??"",onChange:N=>A(r.id,{parameters:{...r.parameters,[p]:N}})},p))})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:[o===r.id?"Active after restart":"Inactive"," · credential ",r.credentialConfigured?"configured":"missing"]}),e.jsx(j,{type:"button",size:"sm",variant:"ghost",onClick:()=>W(r.id),children:"Remove"})]})]},r.id))}),e.jsx(j,{type:"button",size:"sm",variant:"outline",onClick:M,children:"Add tunnel profile"}),e.jsx(et,{ingress:a,descriptor:E(u.find(r=>r.id===o)?.provider??"")}),e.jsx(te,{label:"Save tunnel profiles",saving:i,onClick:()=>l({tunnelProfiles:{activeProfileId:o,profiles:u.map(r=>({id:r.id,provider:r.provider,label:r.label,publicUrl:r.publicUrl,parameters:r.parameters,...x[r.id]?{credential:x[r.id]}:{}}))}})})]})}function et({ingress:t,descriptor:s}){if(!t||s?.originOwner!=="console")return null;const a=async()=>{await window.navigator.clipboard.writeText(t.originUrl),U({description:"Tunnel origin copied"})};return e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3","data-testid":"ingress-origin",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:"Tunnel origin (paste into the provider console)"}),e.jsxs("div",{className:"mt-1 flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"break-all font-mono text-sm",children:t.originUrl}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:"Set the tunnel's local port / service to this address, not the Gateway port: this is the entry that never treats a tunnelled caller as local."})]}),e.jsxs("div",{className:"flex shrink-0 gap-1",children:[e.jsx(j,{type:"button",size:"icon",variant:"ghost","aria-label":"Copy tunnel origin",onClick:()=>{a()},children:e.jsx(ne,{className:"h-4 w-4","aria-hidden":"true"})}),s.consoleUrl?e.jsx(j,{type:"button",size:"icon",variant:"ghost","aria-label":`Open ${s.label} console`,onClick:()=>window.open(s.consoleUrl,"_blank","noopener,noreferrer"),children:e.jsx(le,{className:"h-4 w-4","aria-hidden":"true"})}):null]})]})]})}function tt({configuration:t,saving:s,applyState:a,onSave:i}){const[n,l]=c.useState(t?.p2p);return c.useEffect(()=>{let o=!1;return queueMicrotask(()=>{o||l(t?.p2p)}),()=>{o=!0}},[t]),n?e.jsxs(ee,{title:"Saved P2P configuration",applyState:a,children:[e.jsx(ae,{label:"Enable P2P fallback",checked:n.enabled,onChange:o=>l({...n,enabled:o})}),e.jsx(y,{name:"signalService",label:"Signal service",value:n.signalService,onChange:o=>l({...n,signalService:o})}),e.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:["Fallback policy",e.jsxs("select",{value:n.fallbackPolicy,onChange:o=>l({...n,fallbackPolicy:o.target.value}),className:"block h-10 w-full rounded-md border border-input bg-background px-3 sm:max-w-sm",children:[e.jsx("option",{value:"never",children:"Never"}),e.jsx("option",{value:"when-direct-unavailable",children:"When direct is unavailable"}),e.jsx("option",{value:"prefer-p2p",children:"Prefer P2P"})]})]}),e.jsx(te,{label:"Save P2P configuration",saving:s,onClick:()=>i({p2p:n})})]}):e.jsx(Z,{title:"P2P"})}function ee({title:t,applyState:s,children:a}){return e.jsxs(w,{children:[e.jsxs(k,{children:[e.jsx(C,{className:"text-base",children:t}),e.jsx(S,{children:"Desired configuration · not presented as observed until verified"})]}),e.jsxs(P,{className:"space-y-4",children:[s==="restart-required"?e.jsx("div",{role:"status",className:"rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:bg-amber-950/20 dark:text-amber-200",children:"Saved · restart required"}):null,a]})]})}function y({name:t,label:s,value:a,type:i="text",onChange:n}){return e.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:[s,e.jsx("input",{name:t,type:i,value:a,onChange:l=>n(l.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3 text-sm"})]})}function ce({name:t,label:s,value:a,min:i,max:n,onChange:l}){return e.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:[s,e.jsx("input",{name:t,type:"number",value:a,min:i,max:n,onChange:o=>l(o.target.valueAsNumber),className:"block h-10 w-full rounded-md border border-input bg-background px-3 text-sm"})]})}function ae({label:t,checked:s,onChange:a}){return e.jsxs("label",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-3 text-sm font-medium",children:[t,e.jsx("input",{type:"checkbox",checked:s,onChange:i=>a(i.target.checked)})]})}function te({label:t,saving:s,onClick:a}){return e.jsx("div",{className:"flex justify-end",children:e.jsx(j,{type:"button",onClick:a,disabled:s,children:s?"Saving…":t})})}function st({endpoint:t,loading:s}){const a=[{label:"Canonical URL",value:t},{label:"API endpoint",value:t?nt(t,"/api/"):void 0}],i=async(n,l)=>{await window.navigator.clipboard.writeText(l),U({description:`${n} copied`})};return e.jsxs(w,{children:[e.jsxs(k,{children:[e.jsxs(C,{className:"flex items-center gap-2 text-base",children:[e.jsx(de,{className:"h-4 w-4","aria-hidden":"true"}),"接入点"]}),e.jsx(S,{children:s?"正在解析接入点":"Observed endpoints · Currently effective route is the canonical URL"})]}),e.jsx(P,{className:"space-y-3",children:a.map(({label:n,value:l})=>e.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-md border border-border p-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:n}),e.jsx("div",{className:"mt-1 break-words text-sm text-foreground",children:l||"Unavailable"})]}),l?e.jsxs("div",{className:"flex shrink-0 gap-1",children:[e.jsx(j,{type:"button",size:"icon",variant:"ghost","aria-label":`Copy ${n}`,onClick:()=>{i(n,l)},children:e.jsx(ne,{className:"h-4 w-4","aria-hidden":"true"})}),e.jsx(j,{type:"button",size:"icon",variant:"ghost","aria-label":`Open ${n}`,onClick:()=>window.open(l,"_blank","noopener,noreferrer"),children:e.jsx(le,{className:"h-4 w-4","aria-hidden":"true"})})]}):null]},n))})]})}function nt(t,s){try{return new URL(s,t).toString()}catch{return t}}function at({sections:t,loading:s,diagnostics:a,checkedAt:i}){return e.jsxs(w,{children:[e.jsxs(k,{children:[e.jsxs(C,{className:"flex items-center gap-2 text-base",children:[e.jsx(Oe,{className:"h-4 w-4","aria-hidden":"true"}),"网络地址"]}),e.jsx(S,{children:s?"正在刷新地址":"由运行时网络能力上报"})]}),e.jsx(P,{className:"space-y-4",children:t.map(n=>e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:n.title}),n.values.length>0?e.jsx("div",{className:"mt-1 space-y-1",children:n.values.map(l=>e.jsx(rt,{scope:n.key,value:l,diagnostics:a,checkedAt:i},l))}):e.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:"未提供"})]},n.key))})]})}function rt({scope:t,value:s,diagnostics:a,checkedAt:i}){const n=it(s),l=a.find(o=>o.id==="address-configuration");return e.jsxs("div",{className:"rounded-md border border-border p-3 text-sm",children:[e.jsx("div",{className:"break-words font-medium text-foreground",children:s}),e.jsxs("dl",{className:"mt-2 grid gap-x-4 gap-y-1 text-xs sm:grid-cols-2",children:[e.jsx(v,{label:"Interface",value:t==="local"?"Loopback":t==="lan"?"LAN interface (name not reported)":"Public route"}),e.jsx(v,{label:"IP version",value:n.ipVersion}),e.jsx(v,{label:"Port",value:n.port}),e.jsx(v,{label:"Configured",value:l?l.status==="ok"?"Yes":"No":"Not checked"}),e.jsx(v,{label:"Reachability",value:"Not probed"}),e.jsx(v,{label:"Configuration checked",value:l?.checkedAt?O(l.checkedAt):i?i.toLocaleString():"Not checked"})]})]})}function v({label:t,value:s}){return e.jsxs("div",{className:"flex justify-between gap-3",children:[e.jsx("dt",{className:"text-muted-foreground",children:t}),e.jsx("dd",{className:"text-right text-foreground",children:s})]})}function it(t){try{const s=new URL(t),a=s.hostname.replace(/^\[|\]$/g,"");return{ipVersion:a.includes(":")?"IPv6":/^\d{1,3}(?:\.\d{1,3}){3}$/.test(a)?"IPv4":"Resolved hostname",port:s.port||(s.protocol==="https:"?"443":s.protocol==="http:"?"80":"Not reported")}}catch{return{ipVersion:"Not reported",port:"Not reported"}}}function ot({status:t}){const s=t?.configuration?.domainDns,a=(t?.addresses.public??[]).map(i=>{try{return new URL(i).hostname}catch{return i}});return e.jsxs(w,{children:[e.jsxs(k,{children:[e.jsx(C,{className:"text-base",children:"Observed DNS"}),e.jsx(S,{children:"Observed state is kept separate from desired DNS policy."})]}),e.jsxs(P,{className:"space-y-3",children:[e.jsx(q,{label:"Runtime status",capability:t?.dns}),e.jsxs("dl",{className:"grid gap-2 text-sm sm:grid-cols-2",children:[e.jsx(v,{label:"Observed hostnames",value:a.join(", ")||"Not reported"}),e.jsx(v,{label:"Expected domain",value:s?.domain||"Not configured"}),e.jsx(v,{label:"Expected value",value:t?.addresses.public[0]||"Not reported"}),e.jsx(v,{label:"Provider",value:s?.provider||"Not configured"})]})]})]})}function lt({status:t}){const s=t?.configuration?.https;return e.jsxs(w,{children:[e.jsxs(k,{children:[e.jsx(C,{className:"text-base",children:"Observed HTTPS"}),e.jsx(S,{children:"Certificate evidence reported by the active runtime."})]}),e.jsxs(P,{className:"space-y-3",children:[e.jsx(q,{label:"TLS",capability:t?.tls,extra:t?.tls.expiresAt?`Expires ${O(t.tls.expiresAt)}`:void 0}),e.jsxs("dl",{className:"grid gap-2 text-sm sm:grid-cols-2",children:[e.jsx(v,{label:"Certificate domains",value:t?.tls.domains?.join(", ")||s?.domains.join(", ")||"Not reported"}),e.jsx(v,{label:"Issuer",value:t?.tls.issuer||"Not reported by runtime"}),e.jsx(v,{label:"Validity",value:t?.tls.validFrom?`${O(t.tls.validFrom)} — ${t.tls.expiresAt?O(t.tls.expiresAt):"open"}`:t?.tls.status??"Not reported"}),e.jsx(v,{label:"Expiry",value:t?.tls.expiresAt?O(t.tls.expiresAt):"Not reported"}),e.jsx(v,{label:"Renewal status",value:t?.tls.renewalStatus||(t?.actions.renewCertificate?"Renewal available":"Renewal unavailable")}),e.jsx(v,{label:"Renewal policy",value:s?`${s.renewBeforeDays} days before expiry`:"Not configured"})]})]})]})}function dt({status:t}){return e.jsxs(w,{children:[e.jsxs(k,{children:[e.jsxs(C,{className:"flex items-center gap-2 text-base",children:[e.jsx(ie,{className:"h-4 w-4","aria-hidden":"true"}),"网络能力"]}),e.jsx(S,{children:"服务端声明的网络支持"})]}),e.jsxs(P,{className:"grid gap-3 text-sm",children:[e.jsx(q,{label:"TLS",capability:t?.tls,extra:t?.tls.expiresAt?`到期时间 ${O(t.tls.expiresAt)}`:void 0}),e.jsx(q,{label:"DNS",capability:t?.dns}),e.jsx(q,{label:"Tunnel",capability:t?.tunnel})]})]})}function ct({status:t,endpoint:s,diagnostics:a,diagnosing:i,renewing:n,onDiagnose:l,onRenewCertificate:o}){const f=a.length>0?Fe({generatedAt:new Date().toISOString(),endpoint:s,checks:a}):void 0,u=async()=>{f&&(await window.navigator.clipboard.writeText(f),U({description:"Diagnostic report copied"}))},d=()=>{if(!f)return;const x=URL.createObjectURL(new Blob([f],{type:"text/plain;charset=utf-8"})),T=document.createElement("a");T.href=x,T.download=`xpod-network-diagnostics-${new Date().toISOString().replace(/[:.]/g,"-")}.txt`,T.click(),URL.revokeObjectURL(x)};return e.jsxs(w,{children:[e.jsxs(k,{children:[e.jsxs(C,{className:"flex items-center gap-2 text-base",children:[e.jsx(oe,{className:"h-4 w-4","aria-hidden":"true"}),"操作"]}),e.jsx(S,{children:"仅显示网络能力允许的操作"})]}),e.jsxs(P,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t?.actions.diagnose?e.jsxs(j,{type:"button",size:"sm",variant:"outline",onClick:l,disabled:i,children:[e.jsx(Ie,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"连通性诊断"]}):null,t?.actions.renewCertificate?e.jsxs(j,{type:"button",size:"sm",variant:"subtle",onClick:o,disabled:n,children:[e.jsx(we,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"续签证书"]}):null,e.jsxs(j,{type:"button",size:"sm",variant:"outline",onClick:()=>{u()},disabled:!f,children:[e.jsx(ne,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Copy diagnostics"]}),e.jsxs(j,{type:"button",size:"sm",variant:"outline",onClick:d,disabled:!f,children:[e.jsx(ke,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Export diagnostics"]})]}),a.length>0?e.jsx("div",{className:"space-y-2",children:a.map(x=>e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:x.label}),e.jsx($,{variant:x.status==="ok"?"secondary":"outline",children:x.status})]}),x.detail?e.jsx("div",{className:"mt-1 break-words text-xs text-muted-foreground",children:x.detail}):null]},x.id))}):e.jsx("div",{className:"text-sm text-muted-foreground",children:"尚未运行过诊断。"})]})]})}function q({label:t,capability:s,extra:a}){const i=s?.supported===!0;return e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:i?t:`${t} 不支持`}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[s?.status??"读取中",s?.detail?` · ${s.detail}`:""]})]}),e.jsx($,{variant:i?"secondary":"outline",children:i?"支持":"不支持"})]}),a?e.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:a}):null]})}function O(t){if(!t)return"暂无记录";const s=new Date(t);return Number.isNaN(s.getTime())?"暂无记录":s.toLocaleString()}export{yt as default};
@@ -0,0 +1 @@
1
+ import{j as t}from"./global-B_WO-aYY.js";function s({title:e}){return t.jsx("div",{className:"flex h-full items-center px-4 text-sm font-semibold text-foreground",children:e})}export{s as P};
@@ -0,0 +1 @@
1
+ import{r as g,j as n}from"./global-B_WO-aYY.js";import{i as p,A as f}from"./ModelAssignmentsPanel-T59L_wOk.js";import{u as k}from"./AiConfigContext-eLRkXFtH.js";import"./dialog-BAe7moyL.js";import"./index-CHBQVfuZ.js";import"./ai-connections-DexTPyfC.js";import"./XpodAiConnectionsPodStore-nFgD_usD.js";import"./index-browser-DzhsXZHm.js";function w(){const{config:r,capabilities:d,save:o,rebuild:c,saveAndRebuild:i,saving:l,rebuilding:s}=k(),[e,a]=g.useState(r?.searchIndexing);if(g.useEffect(()=>{let t=!1;return queueMicrotask(()=>{t||a(r?.searchIndexing)}),()=>{t=!0}},[r]),!e)return null;const u=async t=>{t.preventDefault(),await o({searchIndexing:e})},x=e.ftsEnabled&&e.vectorEnabled?"all":e.vectorEnabled?"vector":"fts",b=d?.rebuildTargets?.includes(x)===!0,m=p(e,r?.searchIndexing);return n.jsxs(f,{title:"Search & Indexing",description:"Choose which derived search indexes Xpod maintains for this Pod.",onSubmit:u,onRestore:()=>o({searchIndexing:{ftsEnabled:!0,vectorEnabled:!0,progressiveIndexingEnabled:!0,textBackend:"auto",vectorBackend:"auto"}}),saving:l||s,dirty:m,footerActions:n.jsx("button",{type:"button",disabled:!b||l||s,onClick:()=>m?i({searchIndexing:e},x):c(x),className:"h-9 rounded-md border border-input px-3 text-sm font-medium disabled:opacity-50",children:s?"Scheduling…":m&&b?"Save and schedule rebuild":b?"Schedule rebuild":"Rebuild unavailable on this runtime"}),children:[n.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[n.jsx(h,{title:"Full-text Search",enabled:e.ftsEnabled,onEnabled:t=>a({...e,ftsEnabled:t}),backend:e.textBackend,onBackend:t=>a({...e,textBackend:t}),backends:[["auto","Auto"],...(d?.textBackends??[]).map(t=>[t,t==="fts5"?"FTS5":"PostgreSQL FTS"])]}),n.jsx(h,{title:"Vector Search",enabled:e.vectorEnabled,onEnabled:t=>a({...e,vectorEnabled:t}),backend:e.vectorBackend,onBackend:t=>a({...e,vectorBackend:t}),backends:[["auto","Auto"],...(d?.vectorBackends??[]).map(t=>[t,t==="vec"?"VEC":"pgvector"])]})]}),n.jsxs("label",{className:"flex items-start justify-between gap-4 rounded-xl border border-border p-4",children:[n.jsxs("span",{children:[n.jsx("span",{className:"block text-sm font-medium",children:"Progressive indexing"}),n.jsx("span",{className:"block text-xs text-muted-foreground",children:"Expand coverage as content becomes relevant instead of embedding everything eagerly."})]}),n.jsx("input",{name:"progressiveIndexingEnabled",type:"checkbox",checked:e.progressiveIndexingEnabled,onChange:t=>a({...e,progressiveIndexingEnabled:t.target.checked}),className:"mt-1 h-4 w-4 rounded border-input"})]})]})}function h({title:r,enabled:d,onEnabled:o,backend:c,onBackend:i,backends:l}){const s=l.filter(([a])=>a!=="auto"),e=v(c);return n.jsxs("section",{className:"rounded-xl border border-border p-4",children:[n.jsxs("label",{className:"flex items-center justify-between gap-3 text-sm font-medium",children:[r,n.jsx("input",{type:"checkbox",checked:d,onChange:a=>o(a.target.checked),className:"h-4 w-4 rounded border-input"})]}),n.jsxs("label",{className:"mt-4 flex items-center justify-between gap-3 text-xs font-medium text-muted-foreground",children:["Choose backend manually",n.jsx("input",{type:"checkbox",checked:e,disabled:s.length===0,onChange:a=>i(a.target.checked?s[0]?.[0]??"auto":"auto"),className:"h-4 w-4 rounded border-input"})]}),e?n.jsxs("label",{className:"mt-3 block space-y-2 text-xs font-medium text-muted-foreground",children:["Backend",n.jsx("select",{value:c,onChange:a=>i(a.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3 text-sm text-foreground",children:s.map(([a,u])=>n.jsx("option",{value:a,children:u},a))})]}):n.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Auto selects the runtime-supported backend."})]})}function v(r){return r!=="auto"}export{w as SearchIndexingPanel,v as isManualBackendSelection};
@@ -0,0 +1 @@
1
+ import{c as L,r as o,j as e,B as N,R as T,C as l,a as u,b as h,d as f,e as m}from"./global-B_WO-aYY.js";import{f as D,a as M,t as _,r as O}from"./admin-C6qCRFiY.js";import{E as q}from"./external-link-DnkJGKNc.js";const G=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],U=L("rotate-cw",G);function Q({serviceId:t,title:r}){const[s,d]=o.useState(),[g,R]=o.useState(),[j,k]=o.useState([]),[v,p]=o.useState(),[b,S]=o.useState(!0),[y,w]=o.useState(!1),[C,$]=o.useState(),c=o.useCallback(async a=>{S(!0);try{const[n,A]=await Promise.all([D({signal:a}),M({source:t,level:"error",limit:5})]);d(t==="gateway"?{name:"gateway",status:"running",pid:n.adminData?.pid,uptime:n.adminData?.uptime?n.adminData.uptime*1e3:void 0,restartCount:0}:n.servicesData?.find(E=>E.name===t)),R(n.configData??void 0),k(A),$(n.checkedAt),p(void 0)}catch(n){n instanceof DOMException&&n.name==="AbortError"||p("Service status could not be loaded. The previous snapshot is retained.")}finally{S(!1)}},[t]);o.useEffect(()=>{const a=new AbortController;let n=!0;return Promise.resolve().then(()=>{n&&c(a.signal)}),()=>{n=!1,a.abort()}},[c]);const x=o.useMemo(()=>X(t,g),[g,t]),P=async()=>{const a=t==="gateway"?"the whole Xpod runtime":`${r} only`;if(!window.confirm(`Restart ${a}? Active requests may be interrupted.`))return;w(!0);const n=t==="gateway"?await _():await O(t);w(!1),n?setTimeout(()=>{c()},750):p(`Restart request for ${r} was not accepted by this runtime.`)};return e.jsxs("div",{className:"space-y-4 p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("div",{"aria-live":"polite",className:"text-xs text-muted-foreground",children:b?"Refreshing service evidence…":C?`Checked ${C.toLocaleString()}`:"Not checked"}),e.jsxs(N,{type:"button",size:"sm",variant:"outline",onClick:()=>{c()},disabled:b,children:[e.jsx(T,{className:"mr-2 h-4 w-4"}),"Refresh"]})]}),v&&e.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 p-3 text-sm text-destructive",children:v}),e.jsxs(l,{children:[e.jsxs(u,{children:[e.jsx(h,{children:r}),e.jsx(f,{children:"Observed state, endpoint, health evidence, dependencies, and explicitly scoped lifecycle action."})]}),e.jsxs(m,{className:"grid gap-3 text-sm sm:grid-cols-2 xl:grid-cols-3",children:[e.jsx(i,{label:"State",value:s?.status??"Unknown"}),e.jsx(i,{label:"PID",value:s?.pid?.toString()??"Not reported"}),e.jsx(i,{label:"Uptime",value:s?.uptime?z(s.uptime):"Not reported"}),e.jsx(i,{label:"Restart count",value:s?.restartCount?.toString()??"Not reported"}),e.jsx(i,{label:"Internal endpoint",value:x.endpoint}),e.jsx(i,{label:"Health check",value:x.healthCheck})]})]}),e.jsxs(l,{children:[e.jsx(u,{children:e.jsx(h,{children:"Dependencies"})}),e.jsx(m,{className:"grid gap-3 text-sm sm:grid-cols-2",children:x.dependencies.map(a=>e.jsx(i,{label:a,value:B(a,t,s)},a))})]}),e.jsxs(l,{children:[e.jsxs(u,{children:[e.jsx(h,{children:"Recent errors"}),e.jsxs(f,{children:["Latest supervisor errors scoped to ",r,"."]})]}),e.jsxs(m,{className:"space-y-2",children:[j.length?j.map(a=>e.jsxs("div",{className:"rounded-lg border border-border p-3 text-sm",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:new Date(a.timestamp).toLocaleString()}),e.jsx("div",{className:"mt-1 break-words",children:a.message})]},`${a.timestamp}-${a.message}`)):e.jsx("p",{className:"text-sm text-muted-foreground",children:"No recent errors reported."}),e.jsxs("a",{className:"inline-flex items-center text-sm font-medium text-primary hover:underline",href:`/status/logs?source=${t}`,children:[e.jsx(q,{className:"mr-1.5 h-4 w-4"}),"Open related logs"]})]})]}),e.jsxs(l,{children:[e.jsxs(u,{children:[e.jsx(h,{children:"Lifecycle"}),e.jsx(f,{children:t==="gateway"?"Gateway is the parent process, so this action restarts the whole Xpod runtime.":`This action restarts ${r} only; dependent requests may briefly fail.`})]}),e.jsx(m,{children:e.jsxs(N,{type:"button",variant:"destructive",onClick:()=>{P()},disabled:y,children:[e.jsx(U,{className:"mr-2 h-4 w-4"}),y?"Restarting…":t==="gateway"?"Restart Xpod runtime…":`Restart ${r}…`]})})]})]})}function X(t,r){const s=r?.env??{};return t==="gateway"?{endpoint:window.location.origin,healthCheck:"GET /service/status",dependencies:["Solid Server","API Server"]}:t==="css"?{endpoint:s.CSS_PORT?`http://127.0.0.1:${s.CSS_PORT}`:"Internal endpoint not reported",healthCheck:"TCP readiness + Solid root request",dependencies:["Authority storage","Identity service"]}:{endpoint:s.API_INTERNAL_URL||(s.API_PORT?`http://127.0.0.1:${s.API_PORT}`:"Internal endpoint not reported"),healthCheck:"GET /health",dependencies:["Solid Server","Configuration store"]}}function B(t,r,s){return s?s.status!=="running"?`${H(r)} is ${s.status}; dependency health is not implied`:`${t} required; direct probe evidence is not reported by this runtime`:"Not reported"}function H(t){return t==="gateway"?"Gateway":t==="css"?"Solid Server":"API Server"}function i({label:t,value:r}){return e.jsxs("div",{className:"rounded-lg border border-border p-3",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:t}),e.jsx("div",{className:"mt-1 break-all font-medium",children:r})]})}function z(t){const r=Math.floor(t/1e3),s=Math.floor(r/3600),d=Math.floor(r%3600/60);return s?`${s}h ${d}m`:`${d}m ${r%60}s`}export{Q as ServiceStatusPanel};
@@ -0,0 +1 @@
1
+ import{c as r,a1 as l,af as x,ag as h,Y as y,j as a,Z as v,_ as p,$ as m,a0 as k}from"./global-B_WO-aYY.js";import{A as u}from"./activity-CWy1W2W0.js";import{W as f,N as g}from"./waypoints-BXNph9Fd.js";import{P as w}from"./PaneListHeader-Da5jZFvG.js";import{T as N,u as j}from"./workspace-layout-TZ7fteel.js";const b=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],I=r("boxes",b);const S=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],M=r("braces",S);const _=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],L=r("hard-drive",_);const z=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],d=r("scroll-text",z);const H=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],D=r("server",H);const V=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],$=r("timer",V);function s(i,t,e,n,o){return{id:i,label:t,path:e,href:`/status/${e}`,end:!0,group:n,icon:o}}const c=[s("overview","Overview","overview","Overview",u),s("gateway","Gateway","services/gateway","Services",f),s("solid-server","Solid Server","services/solid-server","Services",l),s("api-server","API Server","services/api-server","Services",D),s("logs","Logs","logs","Diagnostics",d),s("index-overview","Index Overview","index","Index",I),s("rdf","RDF","index/rdf","Index",M),s("fts","FTS","index/fts","Index",d),s("vector","Vector","index/vector","Index",x),s("retrieval-points","Retrieval Points","index/retrieval-points","Index",g),s("cache","Cache","index/cache","Index",L),s("slow-queries","Slow Queries","index/slow-queries","Index",$),s("benchmark","Benchmark","index/benchmark","Index",h)],q=["Overview","Services","Diagnostics","Index"];function B(){const i=y(),t=[...c].sort((e,n)=>n.path.length-e.path.length).find(e=>i.pathname.endsWith(e.path))??c[0];return a.jsx(N,{mode:"auto",listHeader:a.jsx(w,{title:"Status"}),list:a.jsx(A,{}),mainHeader:a.jsx("div",{className:"flex h-full items-center px-4",children:a.jsxs("div",{children:[a.jsxs("h1",{className:"text-sm font-semibold",children:["Status · ",t.label]}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Observed state and operational evidence"})]})}),main:a.jsx("section",{className:"min-h-full bg-background",children:a.jsx(v,{})}),className:"min-h-full"})}function A(){const i=j();return a.jsx("aside",{"data-list-navigation":!0,className:"h-full overflow-y-auto border-r border-border bg-muted/20 py-2",children:q.map(t=>a.jsxs("section",{className:"mb-3",children:[a.jsx("h2",{className:"px-5 py-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:t}),c.filter(e=>e.group===t).map(e=>{const n=e.icon;return a.jsxs(p,{to:e.path,end:e.end,onKeyDown:m,onClick:()=>i.openMain(),className:({isActive:o})=>k(o,{compact:!1}),children:[a.jsx(n,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),e.label]},e.id)})]},t))})}export{B as default};
@@ -1 +1 @@
1
- import{c as l,D as h,v as u,r as c,j as e,O as x,N as b,w as y,x as g}from"./settings-CyLnISOv.js";import{K as f}from"./key-round-ZTVU_1O1.js";import{b as v,c as k}from"./admin-C6qCRFiY.js";import{p as j}from"./settings-projection-CUkyprDQ.js";import{P as N}from"./PaneListHeader-Cpe39N76.js";import{T as S,u as w}from"./workspace-layout-BOQnl_3d.js";const M=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],P=l("box",M);const L=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],C=l("cloud",L);const A=[["path",{d:"m10.852 14.772-.383.923",key:"11vil6"}],["path",{d:"M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1v3clb"}],["path",{d:"m13.148 9.228.383-.923",key:"t2zzyc"}],["path",{d:"m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1bxfiv"}],["path",{d:"m14.772 10.852.923-.383",key:"k9m8cz"}],["path",{d:"m14.772 13.148.923.383",key:"1xvhww"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"m9.228 10.852-.923-.383",key:"1wtb30"}],["path",{d:"m9.228 13.148-.923.383",key:"1a830x"}]],_=l("server-cog",A);const D=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],H=l("wrench",D),I=[{scope:"account",label:"Account",description:"Your Pod and its session.",items:[{id:"pod",label:"Pod",path:"pod",description:"Current Pod identity and data boundary.",icon:P},{id:"identity-access",label:"Identity & Access",path:"identity-access",description:"Session, WebID, and account access.",icon:f}]},{scope:"node",label:"This node",description:"Shared by every Pod on this machine.",items:[{id:"storage",label:"Storage",path:"storage",description:"Authority storage backend and limits.",icon:h},{id:"runtime",label:"Runtime",path:"runtime",description:"Low-frequency runtime configuration.",icon:_},{id:"cloud",label:"Cloud",path:"cloud",description:"Cloud coordination settings when supported.",icon:C},{id:"advanced",label:"Advanced",path:"advanced",description:"Expert and compatibility controls.",icon:H}]}];function q(){const r=u(),[n,s]=c.useState(!1);c.useEffect(()=>{let t=!1;return Promise.all([v(),k()]).then(([d,p])=>{t||s(j({registered:d?.registered===!0,managed:d?.managed===!0,domainAllocated:p?.allocated===!0}).cloud)}),()=>{t=!0}},[]);const a=c.useMemo(()=>I.map(t=>({...t,items:t.items.filter(d=>d.id!=="cloud"||n)})).filter(t=>t.items.length>0),[n]),o=c.useMemo(()=>a.flatMap(t=>t.items),[a]),i=o.find(t=>r.pathname.endsWith(`/${t.path}`))??o[0],m=a.find(t=>t.items.includes(i))?.scope;return e.jsx(S,{mode:"auto",listHeader:e.jsx(N,{title:"Settings"}),list:e.jsx(z,{groups:a}),mainHeader:e.jsx("div",{className:"flex h-full items-center px-4",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"text-sm font-semibold",children:["Settings · ",i.label]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:i.description}),m==="node"?e.jsx("div",{className:"text-xs text-amber-700 dark:text-amber-300",children:"Applies to every Pod on this machine."}):null]})}),main:e.jsx("section",{className:"min-h-full bg-background",children:e.jsx(x,{})}),className:"min-h-full"})}function z({groups:r}){const n=w();return e.jsx("aside",{className:"h-full border-r border-border bg-muted/20 py-2",children:e.jsx("nav",{"aria-label":"Settings sections","data-list-navigation":!0,children:r.map(s=>e.jsxs("div",{children:[e.jsxs("div",{className:"px-4 pb-1 pt-3",children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:s.label}),e.jsx("div",{className:"text-xs leading-4 text-muted-foreground",children:s.description})]}),s.items.map(a=>{const o=a.icon;return e.jsxs(b,{to:a.path,"aria-label":a.label,onKeyDown:y,onClick:()=>n.openMain(),className:({isActive:i})=>g(i,{compact:!1}),children:[e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-medium",children:a.label}),e.jsx("span",{className:"block text-xs leading-4 text-muted-foreground",children:a.description})]})]},a.id)})]},s.scope))})})}export{q as default};
1
+ import{c as l,a1 as h,Y as u,r as c,j as e,Z as x,_ as b,$ as y,a0 as g}from"./global-B_WO-aYY.js";import{K as f}from"./key-round-DoDbsLae.js";import{b as v,c as k}from"./admin-C6qCRFiY.js";import{p as j}from"./settings-projection-CUkyprDQ.js";import{P as N}from"./PaneListHeader-Da5jZFvG.js";import{T as S,u as w}from"./workspace-layout-TZ7fteel.js";const M=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],P=l("box",M);const L=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],C=l("cloud",L);const _=[["path",{d:"m10.852 14.772-.383.923",key:"11vil6"}],["path",{d:"M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1v3clb"}],["path",{d:"m13.148 9.228.383-.923",key:"t2zzyc"}],["path",{d:"m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1bxfiv"}],["path",{d:"m14.772 10.852.923-.383",key:"k9m8cz"}],["path",{d:"m14.772 13.148.923.383",key:"1xvhww"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"m9.228 10.852-.923-.383",key:"1wtb30"}],["path",{d:"m9.228 13.148-.923.383",key:"1a830x"}]],A=l("server-cog",_);const H=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],D=l("wrench",H),I=[{scope:"account",label:"Account",description:"Your Pod and its session.",items:[{id:"pod",label:"Pod",path:"pod",description:"Current Pod identity and data boundary.",icon:P},{id:"identity-access",label:"Identity & Access",path:"identity-access",description:"Session, WebID, and account access.",icon:f}]},{scope:"node",label:"This node",description:"Shared by every Pod on this machine.",items:[{id:"storage",label:"Storage",path:"storage",description:"Authority storage backend and limits.",icon:h},{id:"runtime",label:"Runtime",path:"runtime",description:"Low-frequency runtime configuration.",icon:A},{id:"cloud",label:"Cloud",path:"cloud",description:"Cloud coordination settings when supported.",icon:C},{id:"advanced",label:"Advanced",path:"advanced",description:"Expert and compatibility controls.",icon:D}]}];function Z(){const r=u(),[n,s]=c.useState(!1);c.useEffect(()=>{let t=!1;return Promise.all([v(),k()]).then(([d,p])=>{t||s(j({registered:d?.registered===!0,managed:d?.managed===!0,domainAllocated:p?.allocated===!0}).cloud)}),()=>{t=!0}},[]);const a=c.useMemo(()=>I.map(t=>({...t,items:t.items.filter(d=>d.id!=="cloud"||n)})).filter(t=>t.items.length>0),[n]),o=c.useMemo(()=>a.flatMap(t=>t.items),[a]),i=o.find(t=>r.pathname.endsWith(`/${t.path}`))??o[0],m=a.find(t=>t.items.includes(i))?.scope;return e.jsx(S,{mode:"auto",listHeader:e.jsx(N,{title:"Settings"}),list:e.jsx($,{groups:a}),mainHeader:e.jsx("div",{className:"flex h-full items-center px-4",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"text-sm font-semibold",children:["Settings · ",i.label]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:i.description}),m==="node"?e.jsx("div",{className:"text-xs text-amber-700 dark:text-amber-300",children:"Applies to every Pod on this machine."}):null]})}),main:e.jsx("section",{className:"min-h-full bg-background",children:e.jsx(x,{})}),className:"min-h-full"})}function $({groups:r}){const n=w();return e.jsx("aside",{className:"h-full border-r border-border bg-muted/20 py-2",children:e.jsx("nav",{"aria-label":"Settings sections","data-list-navigation":!0,children:r.map(s=>e.jsxs("div",{children:[e.jsxs("div",{className:"px-4 pb-1 pt-3",children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:s.label}),e.jsx("div",{className:"text-xs leading-4 text-muted-foreground",children:s.description})]}),s.items.map(a=>{const o=a.icon;return e.jsxs(b,{to:a.path,"aria-label":a.label,onKeyDown:y,onClick:()=>n.openMain(),className:({isActive:i})=>g(i,{compact:!1}),children:[e.jsx(o,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-medium",children:a.label}),e.jsx("span",{className:"block text-xs leading-4 text-muted-foreground",children:a.description})]})]},a.id)})]},s.scope))})})}export{Z as default};
@@ -1,5 +1,5 @@
1
- import{y as Z,z as ee,A as te,E as I,F as ie,G as T,H as ce,I as G,J as de,K as le,L as ue,M as he,u as pe,r as u,j as s,B as C,R as fe,C as ge,a as me,b as we,d as be,e as ve,Q as xe,S as ye}from"./settings-CyLnISOv.js";import{d as Ae,e as Se,b as Ce,c as Ie,h as Ne,i as _e,t as je,u as Ee}from"./admin-C6qCRFiY.js";import{a as Re}from"./settings-projection-CUkyprDQ.js";import{e as Ue,a as H}from"./ai-connections-DexTPyfC.js";import{R as Pe}from"./rotate-ccw-DDdw8PTU.js";import{S as X}from"./skeleton-DEzA3hc2.js";import{E as ke}from"./external-link-BATYaM13.js";class v extends Error{code;constructor(t,r){super(r),this.name="AccountStorageBindingsError",this.code=t}}async function Oe(e){const t=De(e.origin),r=e.controls?.account?.bindings;if(typeof r!="string"||r.trim()==="")throw new v("missing-control","Account storage bindings control is unavailable");const n=e.fetchImpl??fetch,a=Te(r,t),o=a.origin===t?a.href:await Z(a.href,n,e.trustedAccountIndex);if(!o)throw new v("cross-origin","Account storage bindings control is not hosted by this Xpod");const c=ee({Accept:"application/json",...e.headers});let i;try{i=await n(o,{headers:c,credentials:"include"})}catch(l){throw new v("request-failed",l instanceof Error?l.message:"Failed to load Account storage bindings")}if(i.status===401||i.status===403)throw new v("forbidden","Account storage bindings require an authenticated Account");if(!i.ok)throw new v("request-failed",`Account storage bindings request failed (${i.status})`);let d;try{d=await i.json()}catch{throw new v("invalid-response","Account storage bindings response is not valid JSON")}return Le(d,a.origin,We(a,e.trustedAccountIndex,t))}function Le(e,t,r=!1){if(!z(e)||!Array.isArray(e.bindings))throw new v("invalid-response","Account storage bindings response is malformed");const n=[],a=new Set;for(const o of e.bindings){if(!z(o)||typeof o.webId!="string"||typeof o.storageUrl!="string")throw new v("invalid-response","Account storage binding row is malformed");const c=Be(o.webId),i=Fe(o.storageUrl,r?void 0:t);if(!c||!i)throw new v("cross-origin","Account storage binding is outside the trusted storage scope");const d={webId:c,storageUrl:i,...typeof o.label=="string"?{label:o.label}:{}},l=`${d.webId}
2
- ${d.storageUrl}`;a.has(l)||(a.add(l),n.push(d))}return n}function De(e){try{return new URL(e??(typeof window>"u"?"http://localhost":window.location.origin)).origin}catch{throw new v("cross-origin","Current Xpod origin is invalid")}}function Te(e,t){try{const r=new URL(e,t);if(!["http:","https:"].includes(r.protocol)||r.username||r.password||r.hash)throw new Error("unsafe control URL");return r}catch{throw new v("cross-origin","Account storage bindings control is not a valid URL")}}function Be(e){if(!te(e))try{const t=new URL(e);return!["http:","https:"].includes(t.protocol)||t.username||t.password?void 0:e}catch{return}}function Fe(e,t){try{const r=new URL(e.trim());return t!==void 0&&r.origin!==t||!["http:","https:"].includes(r.protocol)||r.username||r.password||r.search||r.hash?void 0:(r.pathname=r.pathname.endsWith("/")?r.pathname:`${r.pathname}/`,r.href)}catch{return}}function We(e,t,r){if(!t)return!1;try{const n=new URL(t,r);return n.pathname.startsWith("/.account/")&&e.origin===n.origin&&e.pathname.startsWith("/.account/")}catch{return!1}}function z(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}const q="co.undefineds.ai-connections",Me={providerCredentials:"settings/credentials.ttl",providerDefinitions:"settings/providers/__service_access__.ttl",gatewayAccessKeys:".data/ai/gateway/access-keys.ttl",quotaSnapshots:".data/ai/gateway/quota.ttl"},$e=new Set(Ue);function V(e,t){if(!U(e))throw new Error("invalid_descriptor");if(e.appletId!==q)throw new Error("invalid_applet_id");const r=e.service;if(!U(r)||typeof r.webId!="string"||typeof r.label!="string"||!Je(r.webId))throw new Error("invalid_service");if(!Array.isArray(e.resources)||e.resources.length===0)throw new Error("invalid_empty_resources");const n=Ve(t),a=new Set,o=e.resources.map(c=>Ge(c,n,a));return{appletId:q,service:{webId:r.webId,label:r.label},resources:o}}function Ge(e,t,r){if(!U(e)||typeof e.id!="string"||typeof e.url!="string"||e.mediaType!=="text/turtle"||!U(e.access))throw new Error("invalid_resource");const n=He(e.id,t);if(!n||r.has(e.id))throw new Error("invalid_resource");Xe(e.url);let a;try{a=new URL(e.url)}catch{throw new Error("invalid_resource")}if(!Ke(a,t))throw new Error("invalid_resource");if(a.href!==n)throw new Error("invalid_resource");return r.add(e.id),{id:e.id,url:a.href,mediaType:"text/turtle",access:qe(e.access)}}function He(e,t){const r=Me[e];if(r)return new URL(r,t).href;const n=e.startsWith("providerDocument:")?e.slice(17):void 0;if(n&&$e.has(n))return new URL(`settings/providers/${n}.ttl`,t).href}function Xe(e){if(/%(?![0-9a-fA-F]{2})/.test(e)||/%(?:2f|5c)/i.test(e)||e.includes("\\"))throw new Error("invalid_resource");const t=ze(e);if(K(t))throw new Error("invalid_resource");try{const r=decodeURIComponent(t);if(r.includes("\\")||K(r))throw new Error("invalid_resource")}catch{throw new Error("invalid_resource")}}function ze(e){const t=e.split("#",1)[0]??e;return(t.split("?",1)[0]??t).replace(/^[a-z][a-z0-9+.-]*:\/\/[^/\\?#]*/i,"")}function K(e){return e.split("/").some(t=>t==="."||t==="..")}function qe(e){if(Object.keys(e).some(r=>r!=="read"&&r!=="append"&&r!=="write")||e.read!==!0||e.append!==!0||e.write!==!0)throw new Error("invalid_resource");return{read:!0,append:!0,write:!0}}function Ve(e){const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Error("invalid_current_pod");return t.pathname.endsWith("/")||(t.pathname=`${t.pathname}/`),t}function Ke(e,t){return(e.protocol==="http:"||e.protocol==="https:")&&e.origin===t.origin&&e.pathname.startsWith(t.pathname)}function Je(e){try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"}catch{return!1}}function U(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}const Qe=3,Ye=63,Ze=/^[a-z0-9-]+$/;function B(e){return e.trim().toLowerCase()}function re(e){const t=B(e);if(!t)return I.usernameRequired;if(t.length<Qe||t.length>Ye)return I.usernameLength;if(!Ze.test(t))return I.usernameCharset;if(t.startsWith("-")||t.endsWith("-"))return I.usernameHyphen}const et="已有 Pod 的身份绑定尚未确认。请重试读取绑定或返回账号,不需要重新创建 Pod。",tt="暂时无法确认已有 Pod,请重试读取或返回账号。";class x extends Error{code;constructor(t){super(t==="binding-missing"?et:t==="inventory-unavailable"?tt:"账号已切换,请返回当前账号重新操作。"),this.name="FirstPodReadinessError",this.code=t}}function rt(e){const t=G(),r=de(t,{...e.headers}),n=new Headers(r).get("Authorization"),a=()=>{try{e.assertCurrentAccount?.()}catch{throw new x("account-changed")}if(G()!==t||n?.startsWith("CSS-Account-Token ")&&n!==(t?`CSS-Account-Token ${t}`:void 0))throw new x("account-changed")},o=e.fetchImpl??fetch;return{headers:r,assertCurrentAccount:a,fetch:async(i,d)=>{a();const l=await o(i,d);try{a()}catch(b){throw l.body?.cancel().catch(()=>{}),b}const g=async b=>{a();const y=await b();return a(),y},m=l.json.bind(l),w=l.text.bind(l);return l.json=()=>g(m),l.text=()=>g(w),l}}}async function nt(e,t,r,n){n.assertCurrentAccount();let a;try{const i=await e(T(t),{headers:{...n.headers,Accept:"application/json"},credentials:"include"});if(!i.ok)throw new x("inventory-unavailable");a=await i.json()}catch{throw n.assertCurrentAccount(),new x("inventory-unavailable")}if(n.assertCurrentAccount(),!D(a)||!D(a.pods))throw new x("inventory-unavailable");const o=Object.entries(a.pods);if(o.some(([i,d])=>!ae(i)||typeof d!="string"||!d))throw new x("inventory-unavailable");const c=le(r);if(o.some(([i])=>!c||ue(i,c.storageRoot)))throw new x("binding-missing")}function st(e){for(const t of e){if(!t)continue;const r=ut(t);if(!r)continue;const n=B(r).replace(/[^a-z0-9-]/gu,"-").replace(/-+/gu,"-").replace(/^-+|-+$/gu,"");if(n&&!re(n))return n}return""}async function at(e){const t=rt(e),r=t.fetch,n=B(e.username),a=re(n);if(a)throw new Error(a);const o=await ie(e.provisionCode),c=await Z(e.createPodUrl,r,e.trustedAccountIndex);if(!c)throw new Error("Pod creation control is not hosted by this Xpod");await nt(r,c,o,t);const i=await dt(r,n,o);t.assertCurrentAccount();const d=await r(T(c),{method:"POST",headers:{...t.headers,Accept:"application/json","Content-Type":"application/json"},credentials:"include",body:JSON.stringify(ce(n,i?.provisionCode??o,i?.provisionReceipt))});if(t.assertCurrentAccount(),!d.ok){const w=await ct(d);throw d.status===409||ne(w)?new Error(I.podNameTaken):new Error(w||"Failed to create Pod")}const l=await d.json().catch(P);t.assertCurrentAccount();const g=lt(l);if(!e.pickWebIdUrl)return g;const m=await ot({fetchImpl:r,headers:t.headers,maxAttempts:e.maxAttempts,pickWebIdUrl:e.pickWebIdUrl,pollIntervalMs:e.pollIntervalMs});return t.assertCurrentAccount(),m.length>0?m:g}async function ot(e){const t=e.fetchImpl??fetch,r=Math.max(1,e.maxAttempts??30),n=Math.max(0,e.pollIntervalMs??500);for(let a=0;a<r;a+=1){const o=await it(t,e.pickWebIdUrl,e.headers);if(o.length>0)return o;a<r-1&&n>0&&await new Promise(c=>setTimeout(c,n))}return[]}function P(e){if(e instanceof x)throw e}async function it(e,t,r){const n=await e(T(t),{headers:r,credentials:"include"}).catch(P);if(!n?.ok)return[];const a=await n.json().catch(P);if(!Array.isArray(a?.entries))return[];const o=new Set,c=[];for(const i of a.entries){if(!D(i)||typeof i.webId!="string"||typeof i.storageUrl!="string")continue;const d=se(i.webId,i.storageUrl);if(!d)continue;const l=`${d.webId}
1
+ import{a2 as Z,a3 as ee,a4 as te,a5 as I,a6 as ie,a7 as T,a8 as ce,a9 as G,aa as de,ab as le,Q as ue,ac as he,t as pe,r as u,j as s,B as C,R as fe,C as ge,a as me,b as we,d as be,e as ve,ad as xe,ae as ye}from"./global-B_WO-aYY.js";import{d as Ae,e as Se,b as Ce,c as Ie,h as Ne,i as _e,t as je,u as Re}from"./admin-C6qCRFiY.js";import{a as Ee}from"./settings-projection-CUkyprDQ.js";import{e as Ue,a as X}from"./ai-connections-DexTPyfC.js";import{R as Pe}from"./rotate-ccw-DNR_R3oT.js";import{S as H}from"./skeleton-BjHhu9qI.js";import{E as ke}from"./external-link-DnkJGKNc.js";class v extends Error{code;constructor(t,r){super(r),this.name="AccountStorageBindingsError",this.code=t}}async function Oe(e){const t=De(e.origin),r=e.controls?.account?.bindings;if(typeof r!="string"||r.trim()==="")throw new v("missing-control","Account storage bindings control is unavailable");const n=e.fetchImpl??fetch,a=Te(r,t),o=a.origin===t?a.href:await Z(a.href,n,e.trustedAccountIndex);if(!o)throw new v("cross-origin","Account storage bindings control is not hosted by this Xpod");const c=ee({Accept:"application/json",...e.headers});let i;try{i=await n(o,{headers:c,credentials:"include"})}catch(l){throw new v("request-failed",l instanceof Error?l.message:"Failed to load Account storage bindings")}if(i.status===401||i.status===403)throw new v("forbidden","Account storage bindings require an authenticated Account");if(!i.ok)throw new v("request-failed",`Account storage bindings request failed (${i.status})`);let d;try{d=await i.json()}catch{throw new v("invalid-response","Account storage bindings response is not valid JSON")}return Le(d,a.origin,We(a,e.trustedAccountIndex,t))}function Le(e,t,r=!1){if(!z(e)||!Array.isArray(e.bindings))throw new v("invalid-response","Account storage bindings response is malformed");const n=[],a=new Set;for(const o of e.bindings){if(!z(o)||typeof o.webId!="string"||typeof o.storageUrl!="string")throw new v("invalid-response","Account storage binding row is malformed");const c=Be(o.webId),i=Fe(o.storageUrl,r?void 0:t);if(!c||!i)throw new v("cross-origin","Account storage binding is outside the trusted storage scope");const d={webId:c,storageUrl:i,...typeof o.label=="string"?{label:o.label}:{}},l=`${d.webId}
2
+ ${d.storageUrl}`;a.has(l)||(a.add(l),n.push(d))}return n}function De(e){try{return new URL(e??(typeof window>"u"?"http://localhost":window.location.origin)).origin}catch{throw new v("cross-origin","Current Xpod origin is invalid")}}function Te(e,t){try{const r=new URL(e,t);if(!["http:","https:"].includes(r.protocol)||r.username||r.password||r.hash)throw new Error("unsafe control URL");return r}catch{throw new v("cross-origin","Account storage bindings control is not a valid URL")}}function Be(e){if(!te(e))try{const t=new URL(e);return!["http:","https:"].includes(t.protocol)||t.username||t.password?void 0:e}catch{return}}function Fe(e,t){try{const r=new URL(e.trim());return t!==void 0&&r.origin!==t||!["http:","https:"].includes(r.protocol)||r.username||r.password||r.search||r.hash?void 0:(r.pathname=r.pathname.endsWith("/")?r.pathname:`${r.pathname}/`,r.href)}catch{return}}function We(e,t,r){if(!t)return!1;try{const n=new URL(t,r);return n.pathname.startsWith("/.account/")&&e.origin===n.origin&&e.pathname.startsWith("/.account/")}catch{return!1}}function z(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}const q="co.undefineds.ai-connections",Me={providerCredentials:"settings/credentials.ttl",providerDefinitions:"settings/providers/__service_access__.ttl",gatewayAccessKeys:".data/ai/gateway/access-keys.ttl",quotaSnapshots:".data/ai/gateway/quota.ttl"},$e=new Set(Ue);function V(e,t){if(!U(e))throw new Error("invalid_descriptor");if(e.appletId!==q)throw new Error("invalid_applet_id");const r=e.service;if(!U(r)||typeof r.webId!="string"||typeof r.label!="string"||!Je(r.webId))throw new Error("invalid_service");if(!Array.isArray(e.resources)||e.resources.length===0)throw new Error("invalid_empty_resources");const n=Ve(t),a=new Set,o=e.resources.map(c=>Ge(c,n,a));return{appletId:q,service:{webId:r.webId,label:r.label},resources:o}}function Ge(e,t,r){if(!U(e)||typeof e.id!="string"||typeof e.url!="string"||e.mediaType!=="text/turtle"||!U(e.access))throw new Error("invalid_resource");const n=Xe(e.id,t);if(!n||r.has(e.id))throw new Error("invalid_resource");He(e.url);let a;try{a=new URL(e.url)}catch{throw new Error("invalid_resource")}if(!Ke(a,t))throw new Error("invalid_resource");if(a.href!==n)throw new Error("invalid_resource");return r.add(e.id),{id:e.id,url:a.href,mediaType:"text/turtle",access:qe(e.access)}}function Xe(e,t){const r=Me[e];if(r)return new URL(r,t).href;const n=e.startsWith("providerDocument:")?e.slice(17):void 0;if(n&&$e.has(n))return new URL(`settings/providers/${n}.ttl`,t).href}function He(e){if(/%(?![0-9a-fA-F]{2})/.test(e)||/%(?:2f|5c)/i.test(e)||e.includes("\\"))throw new Error("invalid_resource");const t=ze(e);if(K(t))throw new Error("invalid_resource");try{const r=decodeURIComponent(t);if(r.includes("\\")||K(r))throw new Error("invalid_resource")}catch{throw new Error("invalid_resource")}}function ze(e){const t=e.split("#",1)[0]??e;return(t.split("?",1)[0]??t).replace(/^[a-z][a-z0-9+.-]*:\/\/[^/\\?#]*/i,"")}function K(e){return e.split("/").some(t=>t==="."||t==="..")}function qe(e){if(Object.keys(e).some(r=>r!=="read"&&r!=="append"&&r!=="write")||e.read!==!0||e.append!==!0||e.write!==!0)throw new Error("invalid_resource");return{read:!0,append:!0,write:!0}}function Ve(e){const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Error("invalid_current_pod");return t.pathname.endsWith("/")||(t.pathname=`${t.pathname}/`),t}function Ke(e,t){return(e.protocol==="http:"||e.protocol==="https:")&&e.origin===t.origin&&e.pathname.startsWith(t.pathname)}function Je(e){try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"}catch{return!1}}function U(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}const Qe=3,Ye=63,Ze=/^[a-z0-9-]+$/;function B(e){return e.trim().toLowerCase()}function re(e){const t=B(e);if(!t)return I.usernameRequired;if(t.length<Qe||t.length>Ye)return I.usernameLength;if(!Ze.test(t))return I.usernameCharset;if(t.startsWith("-")||t.endsWith("-"))return I.usernameHyphen}const et="已有 Pod 的身份绑定尚未确认。请重试读取绑定或返回账号,不需要重新创建 Pod。",tt="暂时无法确认已有 Pod,请重试读取或返回账号。";class x extends Error{code;constructor(t){super(t==="binding-missing"?et:t==="inventory-unavailable"?tt:"账号已切换,请返回当前账号重新操作。"),this.name="FirstPodReadinessError",this.code=t}}function rt(e){const t=G(),r=de(t,{...e.headers}),n=new Headers(r).get("Authorization"),a=()=>{try{e.assertCurrentAccount?.()}catch{throw new x("account-changed")}if(G()!==t||n?.startsWith("CSS-Account-Token ")&&n!==(t?`CSS-Account-Token ${t}`:void 0))throw new x("account-changed")},o=e.fetchImpl??fetch;return{headers:r,assertCurrentAccount:a,fetch:async(i,d)=>{a();const l=await o(i,d);try{a()}catch(b){throw l.body?.cancel().catch(()=>{}),b}const g=async b=>{a();const y=await b();return a(),y},m=l.json.bind(l),w=l.text.bind(l);return l.json=()=>g(m),l.text=()=>g(w),l}}}async function nt(e,t,r,n){n.assertCurrentAccount();let a;try{const i=await e(T(t),{headers:{...n.headers,Accept:"application/json"},credentials:"include"});if(!i.ok)throw new x("inventory-unavailable");a=await i.json()}catch{throw n.assertCurrentAccount(),new x("inventory-unavailable")}if(n.assertCurrentAccount(),!D(a)||!D(a.pods))throw new x("inventory-unavailable");const o=Object.entries(a.pods);if(o.some(([i,d])=>!ae(i)||typeof d!="string"||!d))throw new x("inventory-unavailable");const c=le(r);if(o.some(([i])=>!c||ue(i,c.storageRoot)))throw new x("binding-missing")}function st(e){for(const t of e){if(!t)continue;const r=ut(t);if(!r)continue;const n=B(r).replace(/[^a-z0-9-]/gu,"-").replace(/-+/gu,"-").replace(/^-+|-+$/gu,"");if(n&&!re(n))return n}return""}async function at(e){const t=rt(e),r=t.fetch,n=B(e.username),a=re(n);if(a)throw new Error(a);const o=await ie(e.provisionCode),c=await Z(e.createPodUrl,r,e.trustedAccountIndex);if(!c)throw new Error("Pod creation control is not hosted by this Xpod");await nt(r,c,o,t);const i=await dt(r,n,o);t.assertCurrentAccount();const d=await r(T(c),{method:"POST",headers:{...t.headers,Accept:"application/json","Content-Type":"application/json"},credentials:"include",body:JSON.stringify(ce(n,i?.provisionCode??o,i?.provisionReceipt))});if(t.assertCurrentAccount(),!d.ok){const w=await ct(d);throw d.status===409||ne(w)?new Error(I.podNameTaken):new Error(w||"Failed to create Pod")}const l=await d.json().catch(P);t.assertCurrentAccount();const g=lt(l);if(!e.pickWebIdUrl)return g;const m=await ot({fetchImpl:r,headers:t.headers,maxAttempts:e.maxAttempts,pickWebIdUrl:e.pickWebIdUrl,pollIntervalMs:e.pollIntervalMs});return t.assertCurrentAccount(),m.length>0?m:g}async function ot(e){const t=e.fetchImpl??fetch,r=Math.max(1,e.maxAttempts??30),n=Math.max(0,e.pollIntervalMs??500);for(let a=0;a<r;a+=1){const o=await it(t,e.pickWebIdUrl,e.headers);if(o.length>0)return o;a<r-1&&n>0&&await new Promise(c=>setTimeout(c,n))}return[]}function P(e){if(e instanceof x)throw e}async function it(e,t,r){const n=await e(T(t),{headers:r,credentials:"include"}).catch(P);if(!n?.ok)return[];const a=await n.json().catch(P);if(!Array.isArray(a?.entries))return[];const o=new Set,c=[];for(const i of a.entries){if(!D(i)||typeof i.webId!="string"||typeof i.storageUrl!="string")continue;const d=se(i.webId,i.storageUrl);if(!d)continue;const l=`${d.webId}
3
3
  ${d.storageUrl}`;o.has(l)||(o.add(l),c.push(d))}return c}async function ct(e){const t=await e.text?.().catch(P);if(t)try{const r=JSON.parse(t);return typeof r.message=="string"?r.message:typeof r.error=="string"?r.error:t}catch{return t}}function ne(e){return e?/already (?:is )?(?:a )?resource/iu.test(e)||/already taken/iu.test(e)||/already exists/iu.test(e):!1}async function dt(e,t,r){try{return await he(e,t,r)}catch(n){const a=n instanceof Error?n.message:String(n);throw ne(a)?new Error(I.podNameTaken):n}}function lt(e){if(typeof e?.podUrl!="string")return[];const t=ae(e.podUrl);if(!t)return[];const r=new Set;if(typeof e.webId=="string"&&e.webId.length>0&&r.add(e.webId),Array.isArray(e.webIds))for(const n of e.webIds)typeof n=="string"&&n.length>0&&r.add(n);return Array.from(r).map(n=>se(n,t)).filter(n=>!!n)}function ut(e){try{return new URL(e).pathname.split("/").filter(Boolean)[0]}catch{return e.includes("@")?e.split("@",1)[0]:e}}function se(e,t){if(!te(e))try{const r=new URL(e),n=new URL(t);return!["http:","https:"].includes(r.protocol)||!["http:","https:"].includes(n.protocol)?void 0:(n.pathname=n.pathname.endsWith("/")?n.pathname:`${n.pathname}/`,{webId:e,storageUrl:n.href})}catch{return}}function ae(e){try{const t=new URL(e);return!["http:","https:"].includes(t.protocol)||t.username||t.password||t.hash||t.search?void 0:(t.pathname=t.pathname.endsWith("/")?t.pathname:`${t.pathname}/`,t.href)}catch{return}}function D(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function ht(e,t){if(e)try{return new URL(new URL(e).pathname,t).toString()}catch{return}}const pt="http://www.w3.org/ns/solid/acp#",ft="http://www.w3.org/ns/auth/acl#";function J(e,{ownerWebId:t,serviceWebId:r},n=!0){const a=n?`
4
4
  <#serviceAccess>
5
5
  a acp:AccessControl;
@@ -30,4 +30,4 @@ ${d.storageUrl}`;o.has(l)||(o.add(l),c.push(d))}return c}async function ct(e){co
30
30
  acp:agent <${t}>
31
31
  ]
32
32
  ].
33
- ${a}`}function gt(e){const t=new URL(e);return t.pathname.endsWith("/")||(t.pathname=t.pathname.slice(0,t.pathname.lastIndexOf("/")+1)),t.toString()}function O(e){return new URL(".acr",e).toString()}function L(e){return[...new Set(e.resources.map(t=>gt(t.url)))]}async function Q(e,t,r){const n=await e(t,{method:"PUT",headers:{"content-type":"text/turtle"},body:r});if(!n.ok)throw await n.arrayBuffer().catch(()=>{}),new Error(`service_acr_write_failed:${n.status}`)}function R(e,t,r){return{status:t?"granted":"missing",resources:e.resources}}function Y(e){const t=()=>{if(!e.ownerWebId)throw new Error("service_acr_owner_missing");return e.ownerWebId};return{async ensureAgentAccess(r){const n=t();for(const a of L(r))await Q(e.authenticatedFetch,O(a),J(a,{ownerWebId:n,serviceWebId:r.service.webId}));return{status:"granted",resources:r.resources}},async inspectAgentAccess(r){try{for(const n of L(r)){const a=await e.authenticatedFetch(O(n),{headers:{accept:"text/turtle"}});if(!a.ok)return await a.arrayBuffer().catch(()=>{}),R(r,!1);const o=await a.text();if(!o.includes(`<${r.service.webId}>`)||!o.includes("acp:AccessControlResource"))return R(r,!1)}return R(r,!0)}catch{return R(r,!1)}},async revokeAgentAccess(r){const n=t();for(const a of L(r))await Q(e.authenticatedFetch,O(a),J(a,{ownerWebId:n,serviceWebId:r.service.webId},!1));return{status:"missing",resources:r.resources}}}}function Pt({kind:e}){const t=pe(),[r,n]=u.useState(null),[a,o]=u.useState(null),[c,i]=u.useState(null),[d,l]=u.useState(null),[g,m]=u.useState(!0),[w,b]=u.useState(""),[y,A]=u.useState(""),S=u.useCallback(async()=>{m(!0),b("");try{const[h,p,k,f]=await Promise.all([Ae(),Se(),Ce(),Ie()]);if(!h||!p)throw new Error("unavailable");n(h),o(p),i(k),l(await Ne(_e(p.env,f,h.env.CSS_BASE_URL??"")))}catch{b("Settings evidence could not be loaded.")}finally{m(!1)}},[]);u.useEffect(()=>{let h=!1;return queueMicrotask(()=>{h||S()}),()=>{h=!0}},[S]);const _=async h=>{if(b(""),!await Ee(h)){b("Configuration could not be saved.");return}o(p=>p&&{...p,env:{...p.env,...h}}),A("Saved · restart required")},E=St[e];return s.jsxs("div",{className:"space-y-4 p-6",children:[s.jsx("div",{className:"flex justify-end",children:s.jsxs(C,{type:"button",size:"sm",variant:"outline",onClick:S,disabled:g,children:[s.jsx(fe,{className:"mr-2 h-4 w-4"}),"Refresh"]})}),w?s.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 p-3 text-sm text-destructive",children:w}):null,y?s.jsxs("div",{role:"status",className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 p-3 text-sm text-amber-800 dark:bg-amber-950/20 dark:text-amber-200",children:[s.jsx("span",{children:y}),s.jsxs(C,{type:"button",size:"sm",variant:"outline",onClick:()=>{je()},children:[s.jsx(Pe,{className:"mr-2 h-4 w-4"}),"Restart Xpod"]})]}):null,s.jsxs(ge,{children:[s.jsxs(me,{children:[s.jsx(we,{children:E}),s.jsx(be,{children:Ct[e]})]}),s.jsx(ve,{className:"space-y-4",children:g&&!a?s.jsx("div",{role:"status","aria-label":"Loading settings",className:"grid gap-3 sm:grid-cols-2","aria-live":"polite",children:[0,1,2,3].map(h=>s.jsxs("div",{className:"rounded-lg border border-border p-3","aria-hidden":"true",children:[s.jsx(X,{className:"h-3 w-24"}),s.jsx(X,{className:"mt-2 h-5 w-36"})]},h))}):s.jsx(wt,{kind:e,runtime:t,admin:r,configuration:a,provision:c,publicRoute:d,save:_})})]})]})}function mt({runtime:e,publicRoute:t}){const r=xe(),[n,a]=u.useState(null),[o,c]=u.useState(""),[i,d]=u.useState(""),[l,g]=u.useState(!1),[m,w]=u.useState(""),[b,y]=u.useState(""),A=r.controls,S=r.idpIndex,_=u.useCallback(async()=>{c("");try{a(await Oe({controls:A,origin:window.location.origin,trustedAccountIndex:S}))}catch{a(null),c("暂时无法读取存储绑定,请重试。")}},[A,S]);u.useEffect(()=>{let f=!1;return queueMicrotask(()=>{f||_()}),()=>{f=!0}},[_]);const E=u.useMemo(()=>st([e.webId,r.identity?.username,A?.account?.username]),[e.webId,r.identity?.username,A?.account?.username]),h=async f=>{f.preventDefault();const W=A?.account?.pod,M=(i.trim()||E||"").trim();if(!l){if(!W){w("当前部署没有公布创建存储空间的入口。");return}if(!M){w("无法从当前账号推断 Pod 名称,请手动填写。");return}g(!0),w(""),y("");try{await at({assertCurrentAccount:r.bindAccountCapability?.(),createPodUrl:W,headers:ee(),provisionCode:await ye(),trustedAccountIndex:S,username:M}),d(""),y("存储空间已创建。"),await _()}catch($){w($ instanceof Error?$.message:"无法创建存储空间,请重试。")}finally{g(!1)}}},p=ht(e.podUrl,window.location.origin),k=[{label:"Pod name",value:oe(e.podUrl)},{label:"Pod URL",value:p??"Not discovered"},{label:"Public route",value:At(t),detail:t?.detail??"Not checked by this runtime"},{label:"Session",value:e.state.status}];return s.jsxs(s.Fragment,{children:[s.jsx(N,{rows:k}),s.jsxs(C,{type:"button",variant:"outline",disabled:!p,onClick:()=>p&&window.open(p,"_blank","noopener,noreferrer"),children:[s.jsx(ke,{className:"mr-2 h-4 w-4"}),"Open Pod"]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-sm font-medium",children:"属于当前账号的存储空间"}),o?s.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 p-3 text-sm text-destructive",children:o}):null,n===null&&!o?s.jsx("div",{role:"status",className:"text-sm text-muted-foreground",children:"正在读取…"}):null,n?.length===0?s.jsx("div",{role:"status",className:"rounded-lg border border-border p-3 text-sm text-muted-foreground",children:"这个账号还没有任何存储空间。创建后即可用它授权应用访问。"}):null,n&&n.length>0?s.jsx("ul",{className:"space-y-2",children:n.map(f=>s.jsxs("li",{className:"rounded-lg border border-border p-3 text-sm",children:[s.jsx("div",{className:"break-all font-medium",children:f.storageUrl}),s.jsx("div",{className:"mt-1 break-all text-xs text-muted-foreground",children:f.webId})]},`${f.webId}|${f.storageUrl}`))}):null]}),s.jsxs("form",{onSubmit:h,className:"space-y-2 rounded-lg border border-border p-3",children:[s.jsx("label",{className:"block text-sm font-medium",htmlFor:"pod-management-name",children:"创建存储空间"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"创建是一次显式操作:不会因为登录或授权而自动发生。"}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx("input",{id:"pod-management-name",className:"h-10 min-w-48 flex-1 rounded-md border border-input bg-background px-3",value:i,placeholder:E||"my-pod",disabled:l,onChange:f=>d(f.currentTarget.value)}),s.jsx(C,{type:"submit",disabled:l,children:l?"正在创建…":"创建"})]}),m?s.jsx("div",{role:"alert",className:"text-sm text-destructive",children:m}):null,b?s.jsx("div",{role:"status",className:"text-sm text-muted-foreground",children:b}):null]})]})}function wt({kind:e,runtime:t,admin:r,configuration:n,provision:a,publicRoute:o,save:c}){const i=n?.env??{};return e==="pod"?s.jsx(mt,{runtime:t,publicRoute:o}):e==="identity-access"?s.jsx(bt,{runtime:t}):e==="storage"?s.jsxs(s.Fragment,{children:[s.jsx(N,{rows:Re(i,n?.secrets)}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Measured storage and bandwidth are intentionally shown in Status → Usage, not here. Storage migration is unavailable because this runtime does not report a migration capability."})]}):e==="runtime"?s.jsx(vt,{env:i,admin:r,save:c}):e==="cloud"?s.jsx(xt,{env:i,provision:a,save:c}):s.jsx(yt,{env:i,save:c})}function bt({runtime:e}){const[t,r]=u.useState("checking"),[n,a]=u.useState(!1),o=u.useCallback(async()=>{if(!e.webId||!e.podUrl||e.state.status!=="authenticated"){r("unavailable");return}r("checking");try{const d=H({webId:e.webId,podUrl:e.podUrl,authenticatedFetch:e.fetch}),l=V(await d.getServiceAccess(),e.podUrl),m=await Y({authenticatedFetch:e.fetch,ownerWebId:e.webId}).inspectAgentAccess(l);r(m.status==="granted"?"granted":"missing")}catch{r("error")}},[e.fetch,e.podUrl,e.state.status,e.webId]);u.useEffect(()=>{let d=!1;return queueMicrotask(()=>{d||o()}),()=>{d=!0}},[o]);const c=async()=>{if(!(!e.webId||!e.podUrl||!window.confirm("Revoke AI Gateway service access to Xpod settings resources? Provider credentials remain stored but the service can no longer use them."))){a(!0);try{const d=H({webId:e.webId,podUrl:e.podUrl,authenticatedFetch:e.fetch}),l=V(await d.getServiceAccess(),e.podUrl);await Y({authenticatedFetch:e.fetch,ownerWebId:e.webId}).revokeAgentAccess(l),r("missing")}catch{r("error")}finally{a(!1)}}},i=t==="granted"?"Granted":t==="missing"?"Not granted":t==="checking"?"Checking…":t==="unavailable"?"Unavailable while signed out":"Could not inspect";return s.jsxs(s.Fragment,{children:[s.jsx(N,{rows:[{label:"WebID",value:e.webId??"Signed out"},{label:"OIDC issuer",value:e.issuer??"Not reported"},{label:"Current account",value:e.webId?oe(e.webId):"Signed out"},{label:"Session",value:e.state.status},{label:"ACP / ACR",value:t==="error"?"Capability unavailable or permission denied":"Managed ACR capability available"},{label:"AI Gateway service access",value:i,detail:"Inspected from the managed ACRs for declared settings resources"}]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(C,{type:"button",variant:"outline",onClick:()=>{o()},disabled:t==="checking",children:"Recheck access"}),s.jsx(C,{type:"button",variant:"destructive",onClick:()=>{c()},disabled:t!=="granted"||n,children:n?"Revoking…":"Revoke service access"})]})]})}function vt({env:e,admin:t,save:r}){const n=e.CSS_BASE_URL??t?.env.CSS_BASE_URL??"",[a,o]=u.useState(n),[c,i]=u.useState(e.CSS_ROOT_FILE_PATH??"");return u.useEffect(()=>{let d=!1;return queueMicrotask(()=>{d||(o(n),i(e.CSS_ROOT_FILE_PATH??""))}),()=>{d=!0}},[e,n]),s.jsxs("div",{className:"space-y-4",children:[s.jsx(N,{rows:[{label:"Edition",value:t?.env.XPOD_EDITION??e.XPOD_EDITION??"local"},{label:"Configuration source",value:".env.local / runtime bootstrap"},{label:"Service startup",value:"Gateway supervises Solid Server and API Server"},{label:"Automatic restart",value:"Enabled for managed child services"}]}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsx(j,{label:"Base URL",value:a,onChange:o}),s.jsx(j,{label:"Data directory",value:c,onChange:i})]}),s.jsx(F,{onClick:()=>r({CSS_BASE_URL:a,CSS_ROOT_FILE_PATH:c})})]})}function xt({env:e,provision:t,save:r}){const[n,a]=u.useState(e.XPOD_CLOUD_API_ENDPOINT??""),[o,c]=u.useState(e.XPOD_NODE_ID??""),[i,d]=u.useState(e.XPOD_SP_DOMAIN??"");return u.useEffect(()=>{let l=!1;return queueMicrotask(()=>{l||(a(e.XPOD_CLOUD_API_ENDPOINT??""),c(e.XPOD_NODE_ID??""),d(e.XPOD_SP_DOMAIN??""))}),()=>{l=!0}},[e]),s.jsxs("div",{className:"space-y-4",children:[s.jsx(N,{rows:[{label:"Node registration",value:t?.registered?"Registered":"Not registered",detail:t?.nodeId??"Node ID not reported"},{label:"Cluster coordination",value:t?.cloudUrl??"Not configured",detail:t?.managed?"This node is cluster-managed":"Not cluster-managed"},{label:"Service-provider domain",value:t?.serviceProviderDomain??"Not allocated"}]}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsx(j,{label:"Cloud endpoint",value:n,onChange:a}),s.jsx(j,{label:"Node ID",value:o,onChange:c}),s.jsx(j,{label:"Service-provider domain",value:i,onChange:d})]}),s.jsx(F,{onClick:()=>r({XPOD_CLOUD_API_ENDPOINT:n,XPOD_NODE_ID:o,XPOD_SP_DOMAIN:i})})]})}function yt({env:e,save:t}){const[r,n]=u.useState(e.CSS_LOGGING_LEVEL??"info"),[a,o]=u.useState(e.CSS_SHOW_STACK_TRACE==="true");return u.useEffect(()=>{let c=!1;return queueMicrotask(()=>{c||(n(e.CSS_LOGGING_LEVEL??"info"),o(e.CSS_SHOW_STACK_TRACE==="true"))}),()=>{c=!0}},[e]),s.jsxs("div",{className:"space-y-4",children:[s.jsx(N,{rows:[{label:"Log retention",value:"30 days",detail:"Runtime logging profile"},{label:"Configuration provenance",value:".env.local allowlist"},{label:"Restart requirement",value:"Required after save"}]}),s.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:["Logging level",s.jsxs("select",{value:r,onChange:c=>n(c.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3 sm:max-w-xs",children:[s.jsx("option",{children:"debug"}),s.jsx("option",{children:"info"}),s.jsx("option",{children:"warn"}),s.jsx("option",{children:"error"})]})]}),s.jsxs("label",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-3 text-sm font-medium",children:["Show stack traces",s.jsx("input",{type:"checkbox",checked:a,onChange:c=>o(c.target.checked)})]}),s.jsx(F,{onClick:()=>t({CSS_LOGGING_LEVEL:r,CSS_SHOW_STACK_TRACE:String(a)})})]})}function N({rows:e}){return s.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:e.map(t=>s.jsxs("div",{className:"rounded-lg border border-border p-3",children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:t.label}),s.jsx("div",{className:"mt-1 break-all text-sm font-medium",children:t.value}),t.detail?s.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:t.detail}):null]},t.label))})}function j({label:e,value:t,onChange:r}){return s.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:[e,s.jsx("input",{value:t,onChange:n=>r(n.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3"})]})}function F({onClick:e}){return s.jsx("div",{className:"flex justify-end",children:s.jsx(C,{type:"button",onClick:e,children:"Save configuration"})})}function oe(e){if(!e)return"Not discovered";try{return new URL(e).pathname.split("/").filter(Boolean).at(-1)||new URL(e).hostname}catch{return e}}function At(e){return e?e.status==="pass"?"Reachable":e.status==="fail"?"Not reachable":"Not verified":"Not checked"}const St={pod:"Pod","identity-access":"Identity & Access",storage:"Storage",runtime:"Runtime",cloud:"Cloud",advanced:"Advanced"},Ct={pod:"Current Pod identity and authority boundary.","identity-access":"Session, account, and app/service access.",storage:"Authority storage backends and health configuration.",runtime:"Edition, startup, paths, and restart behavior.",cloud:"Node registration and cluster coordination.",advanced:"Bounded logging and runtime compatibility controls."};export{Pt as PodSettingsSubjectPanel};
33
+ ${a}`}function gt(e){const t=new URL(e);return t.pathname.endsWith("/")||(t.pathname=t.pathname.slice(0,t.pathname.lastIndexOf("/")+1)),t.toString()}function O(e){return new URL(".acr",e).toString()}function L(e){return[...new Set(e.resources.map(t=>gt(t.url)))]}async function Q(e,t,r){const n=await e(t,{method:"PUT",headers:{"content-type":"text/turtle"},body:r});if(!n.ok)throw await n.arrayBuffer().catch(()=>{}),new Error(`service_acr_write_failed:${n.status}`)}function E(e,t,r){return{status:t?"granted":"missing",resources:e.resources}}function Y(e){const t=()=>{if(!e.ownerWebId)throw new Error("service_acr_owner_missing");return e.ownerWebId};return{async ensureAgentAccess(r){const n=t();for(const a of L(r))await Q(e.authenticatedFetch,O(a),J(a,{ownerWebId:n,serviceWebId:r.service.webId}));return{status:"granted",resources:r.resources}},async inspectAgentAccess(r){try{for(const n of L(r)){const a=await e.authenticatedFetch(O(n),{headers:{accept:"text/turtle"}});if(!a.ok)return await a.arrayBuffer().catch(()=>{}),E(r,!1);const o=await a.text();if(!o.includes(`<${r.service.webId}>`)||!o.includes("acp:AccessControlResource"))return E(r,!1)}return E(r,!0)}catch{return E(r,!1)}},async revokeAgentAccess(r){const n=t();for(const a of L(r))await Q(e.authenticatedFetch,O(a),J(a,{ownerWebId:n,serviceWebId:r.service.webId},!1));return{status:"missing",resources:r.resources}}}}function Pt({kind:e}){const t=pe(),[r,n]=u.useState(null),[a,o]=u.useState(null),[c,i]=u.useState(null),[d,l]=u.useState(null),[g,m]=u.useState(!0),[w,b]=u.useState(""),[y,A]=u.useState(""),S=u.useCallback(async()=>{m(!0),b("");try{const[h,p,k,f]=await Promise.all([Ae(),Se(),Ce(),Ie()]);if(!h||!p)throw new Error("unavailable");n(h),o(p),i(k),l(await Ne(_e(p.env,f,h.env.CSS_BASE_URL??"")))}catch{b("Settings evidence could not be loaded.")}finally{m(!1)}},[]);u.useEffect(()=>{let h=!1;return queueMicrotask(()=>{h||S()}),()=>{h=!0}},[S]);const _=async h=>{if(b(""),!await Re(h)){b("Configuration could not be saved.");return}o(p=>p&&{...p,env:{...p.env,...h}}),A("Saved · restart required")},R=St[e];return s.jsxs("div",{className:"space-y-4 p-6",children:[s.jsx("div",{className:"flex justify-end",children:s.jsxs(C,{type:"button",size:"sm",variant:"outline",onClick:S,disabled:g,children:[s.jsx(fe,{className:"mr-2 h-4 w-4"}),"Refresh"]})}),w?s.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 p-3 text-sm text-destructive",children:w}):null,y?s.jsxs("div",{role:"status",className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 p-3 text-sm text-amber-800 dark:bg-amber-950/20 dark:text-amber-200",children:[s.jsx("span",{children:y}),s.jsxs(C,{type:"button",size:"sm",variant:"outline",onClick:()=>{je()},children:[s.jsx(Pe,{className:"mr-2 h-4 w-4"}),"Restart Xpod"]})]}):null,s.jsxs(ge,{children:[s.jsxs(me,{children:[s.jsx(we,{children:R}),s.jsx(be,{children:Ct[e]})]}),s.jsx(ve,{className:"space-y-4",children:g&&!a?s.jsx("div",{role:"status","aria-label":"Loading settings",className:"grid gap-3 sm:grid-cols-2","aria-live":"polite",children:[0,1,2,3].map(h=>s.jsxs("div",{className:"rounded-lg border border-border p-3","aria-hidden":"true",children:[s.jsx(H,{className:"h-3 w-24"}),s.jsx(H,{className:"mt-2 h-5 w-36"})]},h))}):s.jsx(wt,{kind:e,runtime:t,admin:r,configuration:a,provision:c,publicRoute:d,save:_})})]})]})}function mt({runtime:e,publicRoute:t}){const r=xe(),[n,a]=u.useState(null),[o,c]=u.useState(""),[i,d]=u.useState(""),[l,g]=u.useState(!1),[m,w]=u.useState(""),[b,y]=u.useState(""),A=r.controls,S=r.idpIndex,_=u.useCallback(async()=>{c("");try{a(await Oe({controls:A,origin:window.location.origin,trustedAccountIndex:S}))}catch{a(null),c("暂时无法读取存储绑定,请重试。")}},[A,S]);u.useEffect(()=>{let f=!1;return queueMicrotask(()=>{f||_()}),()=>{f=!0}},[_]);const R=u.useMemo(()=>st([e.webId,r.identity?.username,A?.account?.username]),[e.webId,r.identity?.username,A?.account?.username]),h=async f=>{f.preventDefault();const W=A?.account?.pod,M=(i.trim()||R||"").trim();if(!l){if(!W){w("当前部署没有公布创建存储空间的入口。");return}if(!M){w("无法从当前账号推断 Pod 名称,请手动填写。");return}g(!0),w(""),y("");try{await at({assertCurrentAccount:r.bindAccountCapability?.(),createPodUrl:W,headers:ee(),provisionCode:await ye(),trustedAccountIndex:S,username:M}),d(""),y("存储空间已创建。"),await _()}catch($){w($ instanceof Error?$.message:"无法创建存储空间,请重试。")}finally{g(!1)}}},p=ht(e.podUrl,window.location.origin),k=[{label:"Pod name",value:oe(e.podUrl)},{label:"Pod URL",value:p??"Not discovered"},{label:"Public route",value:At(t),detail:t?.detail??"Not checked by this runtime"},{label:"Session",value:e.state.status}];return s.jsxs(s.Fragment,{children:[s.jsx(N,{rows:k}),s.jsxs(C,{type:"button",variant:"outline",disabled:!p,onClick:()=>p&&window.open(p,"_blank","noopener,noreferrer"),children:[s.jsx(ke,{className:"mr-2 h-4 w-4"}),"Open Pod"]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-sm font-medium",children:"属于当前账号的存储空间"}),o?s.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 p-3 text-sm text-destructive",children:o}):null,n===null&&!o?s.jsx("div",{role:"status",className:"text-sm text-muted-foreground",children:"正在读取…"}):null,n?.length===0?s.jsx("div",{role:"status",className:"rounded-lg border border-border p-3 text-sm text-muted-foreground",children:"这个账号还没有任何存储空间。创建后即可用它授权应用访问。"}):null,n&&n.length>0?s.jsx("ul",{className:"space-y-2",children:n.map(f=>s.jsxs("li",{className:"rounded-lg border border-border p-3 text-sm",children:[s.jsx("div",{className:"break-all font-medium",children:f.storageUrl}),s.jsx("div",{className:"mt-1 break-all text-xs text-muted-foreground",children:f.webId})]},`${f.webId}|${f.storageUrl}`))}):null]}),s.jsxs("form",{onSubmit:h,className:"space-y-2 rounded-lg border border-border p-3",children:[s.jsx("label",{className:"block text-sm font-medium",htmlFor:"pod-management-name",children:"创建存储空间"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"创建是一次显式操作:不会因为登录或授权而自动发生。"}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx("input",{id:"pod-management-name",className:"h-10 min-w-48 flex-1 rounded-md border border-input bg-background px-3",value:i,placeholder:R||"my-pod",disabled:l,onChange:f=>d(f.currentTarget.value)}),s.jsx(C,{type:"submit",disabled:l,children:l?"正在创建…":"创建"})]}),m?s.jsx("div",{role:"alert",className:"text-sm text-destructive",children:m}):null,b?s.jsx("div",{role:"status",className:"text-sm text-muted-foreground",children:b}):null]})]})}function wt({kind:e,runtime:t,admin:r,configuration:n,provision:a,publicRoute:o,save:c}){const i=n?.env??{};return e==="pod"?s.jsx(mt,{runtime:t,publicRoute:o}):e==="identity-access"?s.jsx(bt,{runtime:t}):e==="storage"?s.jsxs(s.Fragment,{children:[s.jsx(N,{rows:Ee(i,n?.secrets)}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Measured storage and bandwidth are intentionally shown in Status → Usage, not here. Storage migration is unavailable because this runtime does not report a migration capability."})]}):e==="runtime"?s.jsx(vt,{env:i,admin:r,save:c}):e==="cloud"?s.jsx(xt,{env:i,provision:a,save:c}):s.jsx(yt,{env:i,save:c})}function bt({runtime:e}){const[t,r]=u.useState("checking"),[n,a]=u.useState(!1),o=u.useCallback(async()=>{if(!e.webId||!e.podUrl||e.state.status!=="authenticated"){r("unavailable");return}r("checking");try{const d=X({webId:e.webId,podUrl:e.podUrl,authenticatedFetch:e.fetch}),l=V(await d.getServiceAccess(),e.podUrl),m=await Y({authenticatedFetch:e.fetch,ownerWebId:e.webId}).inspectAgentAccess(l);r(m.status==="granted"?"granted":"missing")}catch{r("error")}},[e.fetch,e.podUrl,e.state.status,e.webId]);u.useEffect(()=>{let d=!1;return queueMicrotask(()=>{d||o()}),()=>{d=!0}},[o]);const c=async()=>{if(!(!e.webId||!e.podUrl||!window.confirm("Revoke AI Gateway service access to Xpod settings resources? Provider credentials remain stored but the service can no longer use them."))){a(!0);try{const d=X({webId:e.webId,podUrl:e.podUrl,authenticatedFetch:e.fetch}),l=V(await d.getServiceAccess(),e.podUrl);await Y({authenticatedFetch:e.fetch,ownerWebId:e.webId}).revokeAgentAccess(l),r("missing")}catch{r("error")}finally{a(!1)}}},i=t==="granted"?"Granted":t==="missing"?"Not granted":t==="checking"?"Checking…":t==="unavailable"?"Unavailable while signed out":"Could not inspect";return s.jsxs(s.Fragment,{children:[s.jsx(N,{rows:[{label:"WebID",value:e.webId??"Signed out"},{label:"OIDC issuer",value:e.issuer??"Not reported"},{label:"Current account",value:e.webId?oe(e.webId):"Signed out"},{label:"Session",value:e.state.status},{label:"ACP / ACR",value:t==="error"?"Capability unavailable or permission denied":"Managed ACR capability available"},{label:"AI Gateway service access",value:i,detail:"Inspected from the managed ACRs for declared settings resources"}]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(C,{type:"button",variant:"outline",onClick:()=>{o()},disabled:t==="checking",children:"Recheck access"}),s.jsx(C,{type:"button",variant:"destructive",onClick:()=>{c()},disabled:t!=="granted"||n,children:n?"Revoking…":"Revoke service access"})]})]})}function vt({env:e,admin:t,save:r}){const n=e.CSS_BASE_URL??t?.env.CSS_BASE_URL??"",[a,o]=u.useState(n),[c,i]=u.useState(e.CSS_ROOT_FILE_PATH??"");return u.useEffect(()=>{let d=!1;return queueMicrotask(()=>{d||(o(n),i(e.CSS_ROOT_FILE_PATH??""))}),()=>{d=!0}},[e,n]),s.jsxs("div",{className:"space-y-4",children:[s.jsx(N,{rows:[{label:"Edition",value:t?.env.XPOD_EDITION??e.XPOD_EDITION??"local"},{label:"Configuration source",value:".env.local / runtime bootstrap"},{label:"Service startup",value:"Gateway supervises Solid Server and API Server"},{label:"Automatic restart",value:"Enabled for managed child services"}]}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsx(j,{label:"Base URL",value:a,onChange:o}),s.jsx(j,{label:"Data directory",value:c,onChange:i})]}),s.jsx(F,{onClick:()=>r({CSS_BASE_URL:a,CSS_ROOT_FILE_PATH:c})})]})}function xt({env:e,provision:t,save:r}){const[n,a]=u.useState(e.XPOD_CLOUD_API_ENDPOINT??""),[o,c]=u.useState(e.XPOD_NODE_ID??""),[i,d]=u.useState(e.XPOD_SP_DOMAIN??"");return u.useEffect(()=>{let l=!1;return queueMicrotask(()=>{l||(a(e.XPOD_CLOUD_API_ENDPOINT??""),c(e.XPOD_NODE_ID??""),d(e.XPOD_SP_DOMAIN??""))}),()=>{l=!0}},[e]),s.jsxs("div",{className:"space-y-4",children:[s.jsx(N,{rows:[{label:"Node registration",value:t?.registered?"Registered":"Not registered",detail:t?.nodeId??"Node ID not reported"},{label:"Cluster coordination",value:t?.cloudUrl??"Not configured",detail:t?.managed?"This node is cluster-managed":"Not cluster-managed"},{label:"Service-provider domain",value:t?.serviceProviderDomain??"Not allocated"}]}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsx(j,{label:"Cloud endpoint",value:n,onChange:a}),s.jsx(j,{label:"Node ID",value:o,onChange:c}),s.jsx(j,{label:"Service-provider domain",value:i,onChange:d})]}),s.jsx(F,{onClick:()=>r({XPOD_CLOUD_API_ENDPOINT:n,XPOD_NODE_ID:o,XPOD_SP_DOMAIN:i})})]})}function yt({env:e,save:t}){const[r,n]=u.useState(e.CSS_LOGGING_LEVEL??"info"),[a,o]=u.useState(e.CSS_SHOW_STACK_TRACE==="true");return u.useEffect(()=>{let c=!1;return queueMicrotask(()=>{c||(n(e.CSS_LOGGING_LEVEL??"info"),o(e.CSS_SHOW_STACK_TRACE==="true"))}),()=>{c=!0}},[e]),s.jsxs("div",{className:"space-y-4",children:[s.jsx(N,{rows:[{label:"Log retention",value:"30 days",detail:"Runtime logging profile"},{label:"Configuration provenance",value:".env.local allowlist"},{label:"Restart requirement",value:"Required after save"}]}),s.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:["Logging level",s.jsxs("select",{value:r,onChange:c=>n(c.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3 sm:max-w-xs",children:[s.jsx("option",{children:"debug"}),s.jsx("option",{children:"info"}),s.jsx("option",{children:"warn"}),s.jsx("option",{children:"error"})]})]}),s.jsxs("label",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-3 text-sm font-medium",children:["Show stack traces",s.jsx("input",{type:"checkbox",checked:a,onChange:c=>o(c.target.checked)})]}),s.jsx(F,{onClick:()=>t({CSS_LOGGING_LEVEL:r,CSS_SHOW_STACK_TRACE:String(a)})})]})}function N({rows:e}){return s.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:e.map(t=>s.jsxs("div",{className:"rounded-lg border border-border p-3",children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:t.label}),s.jsx("div",{className:"mt-1 break-all text-sm font-medium",children:t.value}),t.detail?s.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:t.detail}):null]},t.label))})}function j({label:e,value:t,onChange:r}){return s.jsxs("label",{className:"block space-y-2 text-sm font-medium",children:[e,s.jsx("input",{value:t,onChange:n=>r(n.target.value),className:"block h-10 w-full rounded-md border border-input bg-background px-3"})]})}function F({onClick:e}){return s.jsx("div",{className:"flex justify-end",children:s.jsx(C,{type:"button",onClick:e,children:"Save configuration"})})}function oe(e){if(!e)return"Not discovered";try{return new URL(e).pathname.split("/").filter(Boolean).at(-1)||new URL(e).hostname}catch{return e}}function At(e){return e?e.status==="pass"?"Reachable":e.status==="fail"?"Not reachable":"Not verified":"Not checked"}const St={pod:"Pod","identity-access":"Identity & Access",storage:"Storage",runtime:"Runtime",cloud:"Cloud",advanced:"Advanced"},Ct={pod:"Current Pod identity and authority boundary.","identity-access":"Session, account, and app/service access.",storage:"Authority storage backends and health configuration.",runtime:"Edition, startup, paths, and restart behavior.",cloud:"Node registration and cluster coordination.",advanced:"Bounded logging and runtime compatibility controls."};export{Pt as PodSettingsSubjectPanel};
@@ -0,0 +1,3 @@
1
+ import{U as h,k as f,V as w,h as J,W as pe}from"./global-B_WO-aYY.js";import{r as me,a as he,b as be}from"./index-browser-DzhsXZHm.js";import{A as ae,s as M,d as B,c as k,o as X,p as ye,b as we,C as L}from"./ai-connections-DexTPyfC.js";function ve(e){const t=new TextEncoder().encode(JSON.stringify(e));let r="";for(const o of t)r+=String.fromCharCode(o);return btoa(r)}function Ie(e){const t=atob(e),r=Uint8Array.from(t,o=>o.charCodeAt(0));return JSON.parse(new TextDecoder().decode(r))}function ge(e){return JSON.stringify({algorithm:"PLAINTEXT",encoding:"base64",ciphertext:ve(e.secret),webId:e.webId,credentialIri:e.credentialIri,provider:e.provider})}function Se(e){if(!(typeof e.envelope!="string"||!e.envelope.trim()))try{const t=JSON.parse(e.envelope);if(t.algorithm!=="PLAINTEXT"||t.webId!==e.webId||t.provider!==e.provider||t.credentialIri!==e.credentialIri)return;const r=t.encoding==="base64"?Ie(String(t.ciphertext)):JSON.parse(String(t.ciphertext));return typeof r=="object"&&r!==null&&!Array.isArray(r)?r:void 0}catch{return}}function _e(e){return h.buildId({id:e})}function Re(e){return h.buildId({id:`custom-instance-${encodeURIComponent(e)}.ttl#this`})}function Q(e,t){const r=crypto.randomUUID();return t==="local"?`${e}-local-${r}`:`${e}-${r}`}function et(e){const t=(e.split("#",1)[0]??e).split("/").filter(Boolean).at(-1)??"",r=t.endsWith(".ttl")?t.slice(0,-4):t;if(r)return r.startsWith("custom-")||r==="custom"?"custom":ae.find(o=>r===o||r.startsWith(`${o}-`))}function A(e){if(!e)return;const t=e.split("#",1)[0]??e,r=t.split("/").filter(Boolean).at(-1)??t;if(!r)return;const o=r.endsWith(".ttl")?r:`${r}.ttl`,n=e.indexOf("#");return n<0?o:`${o}${e.slice(n)}`}function R(e){const t=A(e);if(t)return(t.split("#",1)[0]??t).replace(/\.ttl$/u,"")}const xe={"api-key":"添加 API Key","browser-login":"浏览器登录","browser-oauth":"浏览器登录","device-code":"设备码登录","local-session-import":"已有登录态","local-service":"本地服务"};function Ee(e){return e.label??xe[e.id]}function tt(e){return e.map(t=>{const r=Ee(t);return r===t.label?t:{...t,label:r}})}function z(e){switch(e){case"openai":return"OpenAI";case"anthropic":return"Anthropic";case"kimi":return"Kimi";case"bailian":return"百炼";case"deepseek":return"DeepSeek";case"zhipu":return"智谱 AI";case"ollama":return"Ollama";case"custom":return"Custom"}}var Ae=me(),Ce=he();const O=Array.from(new Set([...ae,"zhipu","ollama","custom"])),G=new WeakMap,Pe=J.storage.base.slice(J.storage.base.lastIndexOf("/")+1);function Ue(e){const t=e.indexOf("#");return t<0?e:e.slice(0,t)}function rt(e){Me(),pe({createQueryEngine:async()=>new be.QueryEngine});const t=new URL("settings/-/sparql",e.podUrl).toString();return f.setSparqlEndpoint(t),h.setSparqlEndpoint(t),w.setSparqlEndpoint(t),{credentialsTableDocument(){return f.buildIri(e.podUrl,{id:Pe})},providerTableDocument(r,o){const n=v(r);if(!n)throw new Error("unsupported_provider");const i=n==="custom"&&o?j(o):x(n);return h.buildIri(e.podUrl,{id:Ue(i)})},async listModels(){return await e.database.init?.(w),(await e.database.select().from(w).execute()).map(ze).filter(U)},async listProviders(){await e.database.init?.(f,h,w);const r=await e.database.select().from(f).execute(),o=await e.database.select().from(h).execute(),n=await e.database.select().from(w).execute();return ke(e,r,o,n)},async createApiKeyCredential(r,o){const n=v(r);if(!n)throw new Error("unsupported_provider");await e.database.init?.(f,h);const i=c(o.id),a=i??f.buildId({id:Q(n,"apiKey")}),d=1,u=M(n,o.offeringId??B(n,"apiKey")),l=o.baseUrl??X(n,u),s=F(o.proxyUrl),p={id:a,provider:n==="custom"?j(a):x(n),service:"ai",authMode:"apiKey",offeringId:u,status:"active",accountLabel:o.label,label:o.label,baseUrl:l,proxyUrl:s,keyVersion:String(d),reauthRequired:!1,encryptedSecret:$(e,n,a,{type:"apiKey",apiKey:o.apiKey}),encryptionAlgorithm:"PLAINTEXT",metadata:{...k({offeringId:u,baseUrl:l,priority:o.priority}),...o.compatibility?{compatibility:o.compatibility}:{}}};return await ee(e,a,p,i!==void 0),y(e,n,p)},async createLocalCredential(r,o){const n=v(r);if(!n)throw new Error("unsupported_provider");await e.database.init?.(f,h);const i=c(o.id),a=i??f.buildId({id:Q(n,"local")}),d=M(n,o.offeringId??B(n,"local")),u=o.baseUrl??X(n,d),l={id:a,provider:x(n),service:"ai",authMode:"local",offeringId:d,status:"active",accountLabel:o.label??"Local",label:o.label??"Local",baseUrl:u,keyVersion:"1",reauthRequired:!1,encryptedSecret:$(e,n,a,{type:"local"}),encryptionAlgorithm:"PLAINTEXT",metadata:k({offeringId:d,baseUrl:u,priority:o.priority})};return await ee(e,a,l,i!==void 0),y(e,n,l)},async saveOAuthCredential(r,o){const n=v(r);if(!n)throw new Error("unsupported_provider");const a=(G.get(e.database)??Promise.resolve()).then(async()=>{await e.database.init?.(f,h);const d=M(n,o.offeringId??B(n,"deviceCode")),l=(await e.database.select().from(f).execute()).find(_=>{const C=y(e,n,_);if(!C||C.authMode!=="deviceCode"&&C.authMode!=="oauth"||re(n,C.offeringId)!==re(n,d)||_.status!=="active"&&_.status!=="disabled")return!1;const fe=T(e,n,C.id,_.encryptedSecret);return Le(o,I(_.metadata),fe)}),s=l&&y(e,n,l),p=I(l?.metadata),m=s&&T(e,n,s.id,l?.encryptedSecret),b=s?.id??f.buildId({id:`${n}-oauth-${crypto.randomUUID()}`}),g=o.accountLabel??"OAuth",S=o.accountId??c(p?.accountId)??c(m?.accountId),H=o.accountSubject??c(p?.authoritativeSubject)??c(m?.accountSubject)??c(m?.authoritativeSubject),N={...l,id:b,provider:x(n),service:"ai",authMode:"deviceCodeOAuth",offeringId:d,status:s?.enabled===!1?"disabled":"active",accountLabel:l?.accountLabel??g,label:l?.label??g,expiresAt:o.expiresAt,scopes:o.scope?o.scope.split(/\s+/u).filter(Boolean):void 0,keyVersion:String((s?.version??0)+1),reauthRequired:!1,encryptedSecret:$(e,n,b,{type:"deviceCodeOAuth",accessToken:o.accessToken,refreshToken:o.refreshToken,expiresAt:o.expiresAt,scope:o.scope,idToken:o.idToken,accountId:S,accountSubject:H,accountLabel:o.accountLabel,offeringId:d,authorizationMethodId:o.authorizationMethodId}),encryptionAlgorithm:"PLAINTEXT",metadata:{...p,...k({offeringId:d,priority:s?.priority,enabled:s?.enabled,health:"healthy"}),authoritativeSubject:H,accountId:S,authorizationMethodId:o.authorizationMethodId}};if(l){const _={...N};if(delete _.id,!await e.database.updateById(f,b,_))throw new Error("credential_version_conflict")}else await e.database.insert(f).values(N).execute();return y(e,n,N)});return G.set(e.database,a.then(()=>{},()=>{})),a},async updateOAuthCredential(r,o,n,i){const a=v(r);if(!a)throw new Error("unsupported_provider");await e.database.init?.(f,h);const d=await e.database.findById(f,o),u=d&&y(e,a,d);if(!d||!u||u.authMode!=="deviceCode")throw new Error("oauth_credential_not_found");if(u.version!==n)throw new Error("credential_version_conflict");const l=T(e,a,o,d.encryptedSecret),s=i.accountId??c(I(d.metadata)?.accountId)??c(l?.accountId),p=i.accountSubject??c(I(d.metadata)?.authoritativeSubject)??c(l?.accountSubject)??c(l?.authoritativeSubject),m=M(a,i.offeringId??u.offeringId),b={expiresAt:i.expiresAt,scopes:i.scope?i.scope.split(/\s+/u).filter(Boolean):void 0,keyVersion:String(n+1),reauthRequired:!1,status:"active",encryptedSecret:$(e,a,o,{type:"deviceCodeOAuth",accessToken:i.accessToken,refreshToken:i.refreshToken,expiresAt:i.expiresAt,scope:i.scope,idToken:i.idToken,accountId:s,accountSubject:p,accountLabel:i.accountLabel??c(d.accountLabel),offeringId:m,authorizationMethodId:i.authorizationMethodId??c(I(d.metadata)?.authorizationMethodId)}),accountLabel:i.accountLabel??c(d.accountLabel),label:i.accountLabel??c(d.label),offeringId:m,metadata:{...I(d.metadata),...k({offeringId:m,health:"healthy"}),authoritativeSubject:p,accountId:s,authorizationMethodId:i.authorizationMethodId??c(I(d.metadata)?.authorizationMethodId)}},g=await e.database.updateById(f,o,b);if(!g)throw new Error("credential_version_conflict");return y(e,a,g)},async updateProviderCredential(r,o,n){const i=v(r);if(!i)throw new Error("unsupported_provider");await e.database.init?.(f,h);const a=await e.database.findById(f,o),d=a&&y(e,i,a);if(!a||!d)throw new Error("credential_not_found");if(d.version!==n.expectedVersion)throw new Error("credential_version_conflict");const u={...I(a.metadata),...n.priority===void 0?{}:{priority:n.priority},...n.enabled===void 0?{}:{enabled:n.enabled},...n.baseUrl===void 0?{}:{baseUrl:n.baseUrl},...n.proxyUrl===void 0?{}:{proxyUrl:F(n.proxyUrl)}},l={...n.label===void 0?{}:{accountLabel:n.label,label:n.label},...n.baseUrl===void 0?{}:{baseUrl:n.baseUrl},...n.proxyUrl===void 0?{}:{proxyUrl:F(n.proxyUrl)},...n.enabled===void 0?{}:{status:n.enabled?"active":"disabled"},keyVersion:String(d.version+1),metadata:u},s=await e.database.updateById(f,o,l);if(!s)throw new Error("credential_update_failed");const p=y(e,i,s);if(!p)throw new Error("credential_update_failed");return p},async markCredentialHealth(r,o,n,i){const a=v(r);if(!a)throw new Error("unsupported_provider");await e.database.init?.(f);const d=await e.database.findById(f,o),u=d&&y(e,a,d);if(!d||!u)throw new Error("credential_not_found");if(u.version!==i)throw new Error("credential_version_conflict");const l=await e.database.updateById(f,o,{keyVersion:String(u.version+1),metadata:{...I(d.metadata),health:n}});if(!l)throw new Error("credential_update_failed");const s=y(e,a,l);if(!s)throw new Error("credential_update_failed");return s},async deleteProviderCredential(r,o){const n=v(r);if(!n)throw new Error("unsupported_provider");await e.database.init?.(f,h);const i=await e.database.findById(f,o),a=i&&y(e,n,i);if(a)return await e.database.deleteById(f,o),a},async readCredentialSecret(r,o){const n=v(r);if(!n)throw new Error("unsupported_provider");const i=await e.database.findById(f,o);if(!i||!y(e,n,i))throw new Error("credential_not_found");const a=T(e,n,o,i.encryptedSecret);if(!a)throw new Error("credential_secret_unavailable");return a},async saveDiscoveredModels(r,o,n){const i=v(r);if(!i)throw new Error("unsupported_provider");await e.database.init?.(f,h,w);const a=await Y(e,o),d=te(i,a);await oe(e.database,d,z(i));const u=await e.database.select().from(w).execute(),l=new Set(u.map(m=>c(m.id)).filter(U)),s=n.map(Ne).filter(U),p=new Set(s.map(m=>m.id));for(const m of u.filter(b=>De(b,d,i))){const b=E(c(m.id),d)??de(c(m.id));b&&!p.has(b)&&c(m.status)!=="unavailable"&&await e.database.updateById(w,String(m.id),{status:"unavailable"})}for(const m of s)await Fe(e.database,d,m,l)},async saveModelSelection(r,o,n){const i=v(r);if(!i)throw new Error("unsupported_provider");await e.database.init?.(h,w);const a=i==="custom"&&n?await Y(e,n):null;if(i==="custom"&&n&&!a)throw new Error("credential_not_found");const d=a?te(i,a):x(i);await oe(e.database,d,z(i));const l=(await e.database.select().from(h).execute()).find(S=>P(c(S.id),d)),s=c(l?.id)??d,p=le(l?.hasModel),m=await e.database.select().from(w).execute(),b=[...new Set(o.map(S=>Ke(i,S,m,a?d:void 0)))];if(!await e.database.updateById(h,s,{hasModel:b}))throw new Error("provider_model_selection_update_failed");e.authenticatedFetch&&await Oe(e,s,p,b)}}}const Te="https://undefineds.co/ns#hasModel";async function Oe(e,t,r,o){const n=D(h,e.podUrl,t),i=r.map(s=>D(w,e.podUrl,s)),a=o.map(s=>D(w,e.podUrl,s)),d=s=>s.map(p=>`<${n}> <${Te}> <${p}> .`).join(`
2
+ `),u=[i.length>0?`DELETE DATA { ${d(i)} }`:void 0,a.length>0?`INSERT DATA { ${d(a)} }`:void 0].filter(s=>!!s);if(u.length===0)return;const l=await e.authenticatedFetch(n.split("#",1)[0],{method:"PATCH",headers:{"content-type":"application/sparql-update"},body:u.join(`;
3
+ `)});if(!l.ok)throw new Error(`provider_model_selection_persist_failed:${l.status}`)}function D(e,t,r){return/^https?:\/\//u.test(r)?r:e.buildIri(t,{id:r})}async function Y(e,t){const r=await e.database.findById(f,t);return r||((await e.database.select().from(f).execute()).find(n=>{const i=c(n.id);return i===t||(i?f.buildIri(e.podUrl,{id:i})===t:!1)})??null)}function Me(){Z(Ae.ActionObserverHttp.prototype),Z(Ce.ActionObserverHttp.prototype)}function Z(e){const t=e;if(t.__xpodObservedActorsPatch)return;const r=t.onRun;t.onRun=function(o,n,i){return Array.isArray(this.observedActors)||(this.observedActors=[]),r.call(this,o,n,i)},t.__xpodObservedActorsPatch=!0}function ke(e,t,r,o){const n=t.filter(i=>c(i.service)==="ai").filter(i=>c(i.status)!=="revoked");return O.map(i=>{const a=n.map(s=>y(e,i,s)).filter(U).sort((s,p)=>s.priority-p.priority||s.id.localeCompare(p.id)),d=r.find(s=>R(c(s.id))===i),l=le(d?.hasModel).map(s=>Be(i,s,o));return{id:i,name:i==="custom"?a.find(s=>s.label)?.label??z(i):z(i),offerings:i==="custom"?Ve(n.filter(s=>y(e,i,s))):ye(i,e.openAiSubscriptionImportAvailable===!0),credentials:a,selectedModels:l,status:qe(a)}})}async function ee(e,t,r,o){if(!(o?await e.database.findById(f,t):null)){await e.database.insert(f).values(r).execute();return}const i={...r};if(delete i.id,!await e.database.updateById(f,t,i))throw new Error("credential_create_failed")}function $(e,t,r,o){return ge({webId:e.webId,provider:t,credentialIri:f.buildIri(e.podUrl,{id:r}),secret:o})}function Le(e,t,r){let o=!1;for(const[n,i]of[[e.accountId,[t?.accountId,r?.accountId]],[e.accountSubject,[t?.authoritativeSubject,r?.accountSubject,r?.authoritativeSubject]]]){const a=[...new Set(i.map(c).filter(U).filter(d=>d.trim()))];if(a.length>1)return!1;if(!(!n?.trim()||!a.length)){if(a[0]!==n)return!1;o=!0}}return o}function y(e,t,r){const o=c(r.id);if(!o)return;const n=q(c(r.provider))??He(o);if(n!==t)return;const i=I(r.metadata),a=ue(r.authMode);if(a)return{id:o,provider:n,offeringId:ce(r,n,a),authMode:a,label:c(r.accountLabel)??c(r.label),enabled:ie(i?.enabled)??c(r.status)==="active",priority:ne(i?.priority)??100,health:Xe(i?.health)??(ie(r.reauthRequired)?"expired":"healthy"),maskedHint:We(e,n,o,r.encryptedSecret),baseUrl:c(r.baseUrl),proxyUrl:Je(c(r.proxyUrl)??c(i?.proxyUrl)),compatibility:$e(i?.compatibility),expiresAt:Qe(r.expiresAt),version:ne(r.keyVersion)??0}}function $e(e){return e==="auto"||e==="openai"||e==="anthropic"?e:void 0}function ce(e,t,r){return c(e.offeringId)??c(I(e.metadata)?.offeringId)??W(c(e.provider))??B(t,r)}function Be(e,t,r){const o=r.find(d=>A(c(d.id))===A(t)),n=c(o?.isProvidedBy),i=o?E(t,n??e)??t:E(t,e)??t,a=o??r.find(d=>{const u=c(d.id),l=c(d.isProvidedBy);return u===t||E(u,e)===i||q(l)===e&&E(u,l??e)===i});return{id:i,provider:e,offeringId:W(c(a?.isProvidedBy)),credentialId:V(n),resourceId:c(a?.id)??t,displayName:c(a?.displayName),availability:c(a?.status)==="unavailable"||!a?"unavailable":"available"}}function ze(e){const t=c(e.isProvidedBy),r=q(t),o=r&&E(c(e.id),t??r);if(!(!r||!o))return{id:o,provider:r,offeringId:W(t),credentialId:V(t),resourceId:c(e.id),displayName:c(e.displayName),availability:c(e.status)==="unavailable"?"unavailable":"available",...je(e)}}function Ne(e){const t=I(e),r=c(t?.id);if(r)return{id:r,displayName:c(t?.displayName),modelType:se(t?.modelType)}}function te(e,t){const r=V(c(t?.provider));return r?j(r):x(e)}function x(e){return _e(e)}function j(e){return Re(e)}function V(e){const t=R(e),r=t?.startsWith("custom-instance-")?t.slice(16):void 0;if(r)try{return decodeURIComponent(r)}catch{return}}function re(e,t){if(!t)return;const r=t.trim().toLowerCase();if(e==="bailian"){if(r==="token-plan")return"token-plan-personal";if(r==="coding-plan")return"coding-plan-pro";if(r==="payg")return"pay-as-you-go"}return r}function P(e,t){const r=A(e),o=A(t);return r!==void 0&&r===o}function De(e,t,r){const o=c(e.isProvidedBy);return P(o,t)?!0:r==="custom"?!1:R(o)?.startsWith(`${r}-`)===!0}function de(e){if(!e)return;const t=e.lastIndexOf("#");if(t<0||t===e.length-1)return;const r=e.slice(t+1);try{return decodeURIComponent(r)}catch{return r}}async function oe(e,t,r){(await e.select().from(h).execute()).some(n=>P(c(n.id),t))||await e.insert(h).values({id:t,displayName:r}).execute()}async function Fe(e,t,r,o){const n=K(t,r.id),i={displayName:r.displayName??r.id,isProvidedBy:t,status:"active",...r.modelType?{modelType:r.modelType}:{}};if(o.has(n)){await e.updateById(w,n,i);return}await e.insert(w).values({id:n,...i}).execute(),o.add(n)}function je(e){const t=se(e.modelType);return t?{modelType:t,...t==="embedding"?{capabilities:["embedding"]}:{}}:{}}function se(e){const t=c(e)?.trim().toLowerCase();return t==="chat"||t==="embedding"?t:void 0}function K(e,t){const r=A(e)??`${e}.ttl`;return`${r.split("#",1)[0]??r}#${encodeURIComponent(t)}`}function Ke(e,t,r,o){const n=c(t.resourceId),i=o??x(e),a=c(t.id),d=a?r.filter(l=>{const s=c(l.isProvidedBy),p=R(s);return(o?P(s,o):p===e||p?.startsWith(`${e}-`)===!0)&&E(c(l.id),s??i)===a}):[],u=o||d.length===1?d[0]:void 0;if(n){const l=r.find(b=>c(b.id)===n);if(!l&&u)return String(u.id);const s=c(l?.isProvidedBy),p=R(s),m=o?P(s,o):p===e||p?.startsWith(`${e}-`)===!0;if(l&&!m)throw new Error("invalid_model_selection_resource");if(!l){const b=a??de(n),g=R(n),S=o?P(g,o):g===e||g?.startsWith(`${e}-`)===!0;if(!b||!S)throw new Error("invalid_model_selection_resource");return K(i,b)}return n}if(!a)throw new Error("invalid_model_selection_resource");return c(u?.id)??K(i,a)}function E(e,t){if(!e)return;const o=A(t)?.split("#",1)[0]??t,n=o.endsWith(".ttl")?`${o}#`:`${o}.ttl#`,i=e.lastIndexOf(n);if(!(i<0))try{return decodeURIComponent(e.slice(i+n.length))}catch{return e.slice(i+n.length)}}function le(e){if(Array.isArray(e))return e.map(c).filter(U);const t=c(e);return t?[t]:[]}function Ve(e){const t=new Map;for(const r of e){const o=I(r.metadata),n=ce(r,"custom",ue(r.authMode)??"apiKey"),i=we(o?.compatibility,n),a=c(r.baseUrl)??c(o?.baseUrl),d=L.find(u=>u.id===n)??L.find(u=>u.id===`${i}-compatible`)??L[0];t.set(n,{...d,id:n,endpoints:a?[{protocol:i==="anthropic"?"anthropic":"chatCompletions",baseUrl:a}]:d.endpoints,modelDiscovery:i==="anthropic"?{strategy:"anthropic",path:"/models",endpointProtocol:"anthropic"}:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"}})}return t.size>0?[...t.values()]:L}function qe(e){return e.some(t=>t.health==="expired"||t.health==="invalid")?"attention":e.some(t=>t.enabled)?"available":e.length>0?"configured":"unconfigured"}function We(e,t,r,o){const n=T(e,t,r,o),i=c(n?.apiKey);if(i)return i.length<=8?`${i.slice(0,2)}…`:`${i.slice(0,3)}...${i.slice(-4)}`}function T(e,t,r,o){return Se({webId:e.webId,provider:t,credentialIri:f.buildIri(e.podUrl,{id:r}),envelope:o})}function q(e){const t=R(e),r=v(t);return r||O.find(o=>t?.startsWith(`${o}-`))}function W(e){const t=R(e);if(t&&!t.startsWith("custom-instance-")){if(t==="bailian-token-plan-personal")return"token-plan";if(t==="bailian-token-plan-team")return"token-plan-team";if(t==="bailian-coding-plan-pro")return"coding-plan";if(t==="bailian-pay-as-you-go")return"pay-as-you-go";for(const r of O)if(t.startsWith(`${r}-`))return t.slice(r.length+1)}}function He(e){const t=/\/([^/#]+)\.ttl#/u.exec(e);return v(t?.[1])}function v(e){if(typeof e!="string"||!e.trim())return;const t=e.trim().toLowerCase();if(t==="zhipu"||t.startsWith("zhipu-"))return"zhipu";if(O.includes(t))return t;for(const r of O)if(t.startsWith(`${r}-`)||r==="bailian"&&(t==="bailian-token-plan"||t==="bailian-coding-plan"))return r}function F(e){if(e==null||!e.trim())return;let t;try{t=new URL(e.trim())}catch{throw new Error("invalid_proxy_url")}if(!["http:","https:"].includes(t.protocol)||t.username||t.password||t.hash||!t.hostname)throw new Error("invalid_proxy_url");return t.toString().replace(/\/$/u,"")}function Je(e){if(e==null||!e.trim())return;let t;try{t=new URL(e.trim())}catch{return}if(!(!["http:","https:"].includes(t.protocol)||!t.hostname))return t.username="",t.password="",t.search="",t.hash="",t.toString().replace(/\/$/u,"")}function ue(e){if(e==="oauth"||e==="deviceCode"||e==="apiKey"||e==="local")return e;if(e==="deviceCodeOAuth")return"deviceCode"}function Xe(e){if(e==="healthy"||e==="expired"||e==="invalid"||e==="unknown")return e;if(e==="reauthRequired")return"expired";if(e==="disabled")return"unknown"}function I(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function c(e){return typeof e=="string"&&e.trim()?e:void 0}function ne(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()){const t=Number(e);return Number.isFinite(t)?t:void 0}}function ie(e){if(typeof e=="boolean")return e;if(e==="true")return!0;if(e==="false")return!1}function Qe(e){return e instanceof Date?e.toISOString():c(e)}function U(e){return e!==void 0}export{Re as a,_e as b,Q as c,rt as d,et as e,R as p,tt as w};
@@ -0,0 +1 @@
1
+ import{c as t}from"./global-B_WO-aYY.js";const c=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],o=t("activity",c);export{o as A};
@@ -0,0 +1 @@
1
+ import{r as h,j as u,w as Y,x as ie,y as oe,B as W,z as se,A as H,D as ce,E as k,F as U,G as $,H as de,I as K,J as le,K as V,L as ue,M as fe,N as ge,O as me,Q as he,S as pe,l as we,T as ve,m as Re,X as be,n as ye}from"./global-B_WO-aYY.js";const E="xpod.auth.callback.identity.v1.",xe=new Set(["provision-status-unavailable","profile-read-failed","pod-open-failed"]),P="xpod.auth.callback.completed.v1.",Q=600*1e3,F="solidClientAuthn:currentUrl",I=new Map,M=new Set(["webid-mismatch","binding-mismatch"]),O={"missing-transaction":{title:"登录请求已失效",message:"这次登录请求已经失效,请重新登录。",action:"重新登录"},"replayed-transaction":{title:"登录请求已使用",message:"这次登录请求已经完成,不能再次使用。请重新登录。",action:"重新登录"},"expired-transaction":{title:"登录请求已过期",message:"登录等待时间过长,请重新登录。",action:"重新登录"},"malformed-transaction":{title:"登录请求无效",message:"登录信息不完整或已被修改,请重新登录。",action:"重新登录"},"oidc-state-invalid":{title:"登录验证已失效",message:"登录页面与当前会话不再匹配,请重新登录。",action:"重新登录"},"oidc-provider-error":{title:"授权未完成",message:"身份服务未能完成此次授权,请重新登录。",action:"重新登录"},unauthenticated:{title:"登录没有完成",message:"Xpod 没有收到有效的 WebID,请重新登录。",action:"重新登录"},"unsafe-route":{title:"登录请求不安全",message:"Xpod 已阻止异常的登录来源,请从应用内重新登录。",action:"重新登录"},"unsafe-return-to":{title:"登录请求不安全",message:"Xpod 已阻止异常的返回地址,请从应用内重新登录。",action:"重新登录"},"missing-storage":{title:"没有可用的 Pod",message:"当前账号还没有可用于本次登录的 Pod,请返回后重试。",action:"返回并重试"},"provision-status-unavailable":{title:"暂时无法确认本机 Pod",message:"Xpod 暂时无法读取存储服务状态,请稍后重试。",action:"重试连接"},"local-binding-missing":{title:"本机绑定尚未完成",message:"当前账号还没有绑定到这台 Xpod。请先修复本机初始化,再重新登录。",action:"修复本机绑定"},"webid-mismatch":{title:"身份与 Pod 不匹配",message:"本次登录身份与所选 Pod 不一致,请重新登录。",action:"重新登录"},"binding-mismatch":{title:"身份与 Pod 不匹配",message:"Xpod 无法确认当前身份拥有所选 Pod,请重新登录。",action:"重新登录"},"profile-read-failed":{title:"暂时无法读取身份资料",message:"未能读取你的 WebID 资料,暂时无法确认 Pod 地址。请稍后重试,不需要重新创建 Pod。",action:"重试连接"},"pod-open-failed":{title:"暂时无法打开 Pod",message:"Xpod 无法连接到你的 Pod,请检查服务状态后重试。",action:"重试连接"},"storage-unavailable":{title:"无法保存登录状态",message:"当前环境无法保存本次登录状态,请重新打开 Xpod 后重试。",action:"重新登录"},"redirect-failed":{title:"登录已完成",message:"身份验证已经完成,但目标页面没有正常打开。",action:"返回概览"}};async function z(e){const t=new URL(e.href),r=t.origin,n=ke(),i=ee(t,e.storage,e.now);if(i)return e.locationReplace?.(i),{status:"redirected",destination:i};let s=t.searchParams.get("transaction");const d=t.searchParams.has("code")||t.searchParams.has("state")||t.searchParams.has("error"),a=d?X(t):void 0;let o,c,m;try{o=e.transactionStore??k({storage:e.storage,origin:r});const f=o.readSinglePending();!s&&f&&(s=f.id),s?!f||f.id!==s?(o.consume(s),m=l("missing-transaction")):c=f:m=l("missing-transaction")}catch(f){m=l(_e(f))}const b=s?te(t,s,e.storage,e.now):void 0;if(b){if(d&&a&&!c){const f=await D(e.runtime,e.href);if(f.status==="failure"){const g=await N({callbackUrl:t,destination:a,recoveryPointers:n,storage:e.storage,locationReplace:e.locationReplace});return g||f}return e.locationReplace?.(a),{status:"redirected",destination:a}}return e.locationReplace?.(b),{status:"redirected",destination:b}}if(!c){if(a){const f=await D(e.runtime,e.href);if(f.status==="failure"){const g=await N({callbackUrl:t,destination:a,recoveryPointers:n,storage:e.storage,locationReplace:e.locationReplace});return g||f}return e.locationReplace?.(a),{status:"redirected",destination:a}}return m??l("missing-transaction")}if(!o||!s)return l("missing-transaction");const p=await Se(e,c);if(p.status==="failure"){const f=await N({callbackUrl:t,destination:Ee(c,r),recoveryPointers:n,transactionStore:o,transactionId:s,storage:e.storage,locationReplace:e.locationReplace});return f||p}const R=p.webId,y=e.runtime.session.createAuthenticatedFetch(R);let w=!1;const S=e.runtime.session.subscribe(()=>{w=!0,e.runtime.pod.clear({webId:R})});try{try{de(c.route,r)}catch{return l("unsafe-route")}let f;try{f=U(c.returnTo)}catch{return l("unsafe-return-to")}const g=c.selectedStorage&&new URL(c.selectedStorage.storageUrl).origin===r?{storageRoot:r,available:!0}:await Ae(e.fetch??fetch,r);if(w)return l("pod-open-failed");if(!g.available)return l("provision-status-unavailable");const x=g.storageRoot;e.runtime.setLocalPodRoutes(K(x,g));let v;try{v=c.selectedStorage??await Te(y,R,x)}catch{return l("profile-read-failed")}if(w)return l("pod-open-failed");if(v&&!G(v,r,x))return l("binding-mismatch");if(v&&v.webId!==R)return l("webid-mismatch");if(!v)return g.managed?l("local-binding-missing",g.provisionUrl):l("missing-storage");let C;try{e.runtime.setLocalPodRoutes(K(v.storageUrl,g)),C=await e.runtime.pod.open({webId:R,podUrl:v.storageUrl,fetch:y})}catch{return{...l("pod-open-failed")}}if(w)return l("pod-open-failed");const L=v;if(!G(L,r,x)||C.webId!==L.webId||!Ne(C.podUrl,L.storageUrl))return l("binding-mismatch");try{le(L,{storage:e.storage,origin:r,storageRoot:x,now:e.now})}catch{return l("storage-unavailable")}const j=new URL(f??$,r).href;try{o.consume(s),Ie(s,j,t,e.storage,e.now),(e.storage??window.sessionStorage).removeItem(`${E}${s}`),e.locationReplace?.(j)}catch{return V({storage:e.storage}),l("redirect-failed")}return{status:"redirected",destination:j,transaction:c,selectedStorage:L,pod:C}}finally{S()}}async function Se(e,t){const r=new URL(e.href),n=e.storage??window.sessionStorage,i=`${E}${t.id}`,s=A(r),d=e.now??Date.now;try{const o=n.getItem(i);if(o){const c=JSON.parse(o);if(!B(c)||c.callback!==s||typeof c.webId!="string"||typeof c.completedAt!="number"||!Number.isFinite(c.completedAt))return l("oidc-state-invalid");if(d()<c.completedAt||d()-c.completedAt>Q)return l("expired-transaction");const m=e.runtime.session.getSnapshot();return m.status!=="authenticated"?l("unauthenticated"):m.webId!==c.webId?l("webid-mismatch"):{status:"success",webId:m.webId}}}catch{return l("storage-unavailable")}const a=await D(e.runtime,e.href);if(a.status==="failure")return a;try{n.setItem(i,JSON.stringify({callback:s,webId:a.webId,completedAt:d()}))}catch{return l("storage-unavailable")}return a}function q(e){const t=new URL(e.href);if(ee(t,e.storage,e.now))return z(e);const r=Z(t,e.transactionStore),n=I.get(r);if(n)return n;const i=z(e);return I.set(r,i),i}function Z(e,t){let r=e.searchParams.get("transaction");if(!r)try{r=t?.readSinglePending()?.id??k({origin:e.origin}).readSinglePending()?.id??(X(e)?"<silent>":"<missing>")}catch{r=X(e)?"<silent>":"<missing>"}return`${e.origin}:${r}`}function A(e){return`${e.origin}${e.pathname}?state=${encodeURIComponent(e.searchParams.get("state")??"")}`}function ee(e,t,r){if(e.searchParams.get("state"))try{const n=t??window.sessionStorage,i=e.searchParams.get("transaction");for(let s=0;s<n.length;s+=1){const d=n.key(s);if(!d?.startsWith(P))continue;const a=d.slice(P.length);if(i&&i!==a)continue;const o=n.getItem(d);if(!o)continue;const c=JSON.parse(o);if(B(c)&&c.callback===A(e))return te(e,a,n,r)}}catch{}}function te(e,t,r,n=()=>Date.now()){try{const i=r??window.sessionStorage,s=`${P}${t}`,d=i.getItem(s);if(!d)return;const a=JSON.parse(d);if(a.callback!==void 0&&a.callback!==A(e)||typeof a.destination!="string"||typeof a.completedAt!="number"||!Number.isFinite(a.completedAt))return;if(n()<a.completedAt||n()-a.completedAt>Q){i.removeItem(s);return}const o=new URL(a.destination);if(o.origin!==e.origin||o.username||o.password)return;const c=U(`${o.pathname}${o.search}${o.hash}`);return c?new URL(c,e.origin).href:void 0}catch{return}}function X(e){try{const t=window.localStorage.getItem(F);if(!t)return;const r=new URL(t,e.origin);if(r.origin!==e.origin)return;const n=`${r.pathname}${r.search}`,i=U(n);return i===void 0?void 0:new URL(i,e.origin).href}catch{return}}function Ie(e,t,r,n,i=()=>Date.now()){(n??window.sessionStorage).setItem(`${P}${e}`,JSON.stringify({destination:t,callback:A(r),completedAt:i()}))}function Pe({runtime:e,transactionStore:t,href:r=typeof window>"u"?"http://localhost/auth/callback":window.location.href,location:n=typeof window>"u"?void 0:window.location,restartSignIn:i,renderRedirected:s}){const[d]=h.useState(()=>e?void 0:Oe()),a=e??d,[o,c]=h.useState(),[m,b]=h.useState(!1),p=h.useRef(void 0),R=h.useRef(!1),[y]=h.useState(()=>{const f=new URL(r);return re(f,t)?.id??f.searchParams.get("transaction")}),w=h.useMemo(()=>Le({href:r,transactionStore:t}),[r,t]);if(h.useEffect(()=>{p.current||(p.current=q({href:r,runtime:a,transactionStore:t,locationReplace:n?.replace.bind(n)}),p.current.then(c))},[a,r,n,t]),h.useEffect(()=>{typeof document>"u"||o?.status==="redirected"&&s||(document.title=o?.status==="failure"?`Xpod - ${O[o.code].title}`:o?.status==="redirected"?"Xpod - 登录完成":"Xpod - 正在登录")},[s,o]),h.useEffect(()=>{!o||o.status!=="failure"||M.has(o.code)&&(R.current||(R.current=!0,queueMicrotask(()=>{b(!0),_({href:r,runtime:a,transactionStore:t,associatedTransactionId:y}).finally(()=>{(i??(g=>window.location.replace(g)))(w)})})))},[a,y,r,w,i,o,t]),!o)return u.jsx(T,{title:"正在完成登录",message:"请稍候,不要关闭这个窗口。"});if(o.status==="redirected")return s?.(o)??u.jsx(T,{title:"登录完成",message:"正在打开 Xpod。"});if(M.has(o.code))return u.jsx(T,{title:"正在重新登录",message:"Xpod 正在清理不匹配的登录状态。"});const S=O[o.code];return u.jsx(Y,{mode:"modal",title:S.title,lead:u.jsx(H,{compact:!0}),closeOnEscape:!1,children:u.jsxs("div",{className:"flex min-h-0 flex-1 flex-col px-5 pb-5",children:[u.jsx("div",{className:"flex min-h-0 flex-1 flex-col justify-center py-5",children:u.jsxs("div",{className:"min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ie,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 text-destructive"}),u.jsx("h2",{className:"text-[15px] font-semibold leading-6 text-foreground",children:S.title})]}),u.jsx("p",{role:"alert",className:"mt-2 text-xs leading-5 text-muted-foreground",children:S.message}),u.jsxs("details",{className:"group mt-3 text-[11px] leading-4 text-muted-foreground",children:[u.jsxs("summary",{className:"-ml-1 inline-flex min-h-8 cursor-pointer list-none items-center gap-1 rounded-md px-1 outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden",children:[u.jsx(oe,{"aria-hidden":"true",className:"h-3 w-3 shrink-0 group-open:rotate-90"}),"技术详情"]}),u.jsxs("div",{className:"mt-1 max-h-24 overflow-y-auto overscroll-contain",children:[u.jsx("code",{className:"block break-all text-left",children:o.code}),!1]})]})]})}),u.jsx(W,{type:"button",className:"w-full shrink-0 rounded-xl",disabled:m,"aria-busy":m,onClick:()=>{if(!m){if(xe.has(o.code)){I.delete(Z(new URL(r),t)),c(void 0),p.current=q({href:r,runtime:a,transactionStore:t,locationReplace:n?.replace.bind(n)}),p.current.then(c);return}b(!0),(o.code==="redirect-failed"?Promise.resolve():_({href:r,runtime:a,transactionStore:t,associatedTransactionId:y})).finally(()=>{if(o.actionUrl){(i??(x=>window.location.replace(x)))(o.actionUrl);return}(i??(g=>window.location.replace(g)))(w)})}},children:m?"正在重置…":S.action}),u.jsx(W,{type:"button",variant:"ghost",disabled:m,onClick:()=>{m||(b(!0),se(!0),_({href:r,runtime:a,transactionStore:t,associatedTransactionId:y,preserveSession:!0}).finally(()=>{(i??(g=>window.location.replace(g)))(w)}))},children:"返回应用"})]})})}function Le({href:e,transactionStore:t,basePath:r="/settings/"}){const n=new URL(e),s=re(n,t)?.returnTo;if(s)try{const a=U(s);if(a)return a}catch{}const d=X(n);if(d)try{const a=new URL(d);if(a.origin===n.origin)return`${a.pathname}${a.search}${a.hash}`}catch{}return Ue(r,n.pathname)}function re(e,t){try{const r=t?t.readSinglePending():k({origin:e.origin}).readSinglePending(),n=e.searchParams.get("transaction");return n&&r?.id!==n?void 0:r}catch{return}}function Ue(e,t){return Ce(e)==="/settings/"||t==="/settings/auth-callback.html"||t.startsWith("/settings/")?"/settings/":$}function Ce(e){if(e)try{const t=new URL(e,"https://xpod.local");return t.pathname.endsWith("/")?t.pathname:`${t.pathname}/`}catch{return}}function T({title:e,message:t}){return u.jsx(Y,{mode:"modal",title:e,lead:u.jsx(H,{compact:!0}),closeOnEscape:!1,children:u.jsxs("div",{className:"flex h-full flex-col items-center justify-center px-6 text-center",children:[u.jsx("h2",{className:"text-[15px] font-semibold text-foreground",children:e}),u.jsx("p",{role:"status","aria-live":"polite",className:"mt-2 max-w-[13rem] text-xs leading-5 text-muted-foreground",children:t})]})})}async function _({href:e,runtime:t,transactionStore:r,storage:n,preserveSession:i=!1,associatedTransactionId:s}){const d=new URL(e);let a=s===void 0?d.searchParams.get("transaction"):s;try{const o=r??k({storage:n,origin:d.origin}),c=o.readSinglePending();s===void 0&&!a&&c&&(a=c.id),c&&c.id===a&&o.cancel(c.id)}catch{}try{const o=n??window.sessionStorage;a&&(o.removeItem(`${P}${a}`),o.removeItem(`${E}${a}`)),window.localStorage.removeItem(F)}catch{}try{i||await t.session.logout()}catch{}I.delete(`${d.origin}:${a??"<missing>"}`),I.delete(`${d.origin}:<silent>`),I.delete(`${d.origin}:<missing>`)}async function D(e,t){let r="oidc-state-invalid";try{if(new URL(t).searchParams.has("error")&&(r="oidc-provider-error"),!e.session.handleIncomingRedirect)return l("oidc-state-invalid");const n=await e.session.handleIncomingRedirect(t);if(r==="oidc-provider-error")return l(r);const i=B(n)?n:void 0;if(i?.status==="error"||i?.status==="expired")return l("oidc-state-invalid");const s=i?.status==="authenticated"||i?.isLoggedIn===!0?J(i.webId):void 0,d=e.session.getSnapshot();if(d.status==="error"||d.status==="expired")return l("oidc-state-invalid");const a=s??(d.status==="authenticated"?d.webId:void 0);return a?{status:"success",webId:a}:l("unauthenticated")}catch{return l(r)}}function B(e){return typeof e=="object"&&e!==null}async function N({callbackUrl:e,destination:t,recoveryPointers:r,transactionStore:n,transactionId:i,storage:s,locationReplace:d}){const a=e.searchParams.get("error");if($e(a)){Xe({transactionStore:n,transactionId:i,storage:s});for(const{storage:o,key:c,value:m}of r)try{o.getItem(c)===m&&o.removeItem(c)}catch{}return d?.(t),{status:"redirected",destination:t}}}function $e(e){return e==="login_required"||e==="interaction_required"||e==="consent_required"||e==="account_selection_required"}function Xe({transactionStore:e,transactionId:t,storage:r}){try{const n=e?.readSinglePending(),i=t;i&&n?.id===i&&e?.cancel(i),i&&n?.id===i&&((r??window.sessionStorage).removeItem(`${P}${i}`),(r??window.sessionStorage).removeItem(`${E}${i}`))}catch{}V({storage:r})}function ke(){const e=[];for(const t of["localStorage","sessionStorage"])try{const r=window[t];for(const n of[F,"solidClientAuthn:currentSession",ue,fe]){const i=r.getItem(n);i!==null&&e.push({storage:r,key:n,value:i})}}catch{}return e}function Ee(e,t){try{const r=U(e.returnTo);return new URL(r??$,t).href}catch{return new URL($,t).href}}function J(e){return typeof e=="string"&&e?e:void 0}function G(e,t,r){try{const n=new URL(e.storageUrl),i=new URL(e.webId);return(n.origin===t||he(n.href,r))&&["http:","https:"].includes(n.protocol)&&["http:","https:"].includes(i.protocol)&&!n.username&&!n.password&&!n.hash&&!i.username&&!i.password}catch{return!1}}async function Ae(e,t){const r=await e(new URL("/provision/status",t),{headers:{Accept:"application/json"},credentials:"include"}).catch(()=>{});if(r?.status===404)return{storageRoot:t,available:!0};if(!r?.ok)return{storageRoot:t,available:!1};const n=await r.json().catch(()=>{});return!n||typeof n.managed!="boolean"&&typeof n.publicUrl!="string"?{storageRoot:t,available:!1}:{available:!0,storageRoot:typeof n?.publicUrl=="string"&&n.publicUrl?n.publicUrl:t,managed:n?.managed===!0,provisionUrl:je(n?.provisionUrl),routes:ge(n?.routes)}}function je(e){if(!(typeof e!="string"||!e))try{const t=new URL(e);return t.protocol==="https:"&&!t.username&&!t.password?t.href:void 0}catch{return}}async function Te(e,t,r){let n=!1;const s=await me(async(d,a)=>{const o=await e(d,a).catch(c=>{throw String(d)===t&&(n=!0),c});return String(d)===t&&!o.ok&&(n=!0),o},[t],r);if(n)throw new Error("Unable to read WebID profile storage bindings");if(s.length===1)return s[0]}function _e(e){switch(e?.code){case"consumed":return"replayed-transaction";case"expired":return"expired-transaction";case"malformed":return"malformed-transaction";default:return"missing-transaction"}}function l(e,t){return{status:"failure",code:e,message:O[e].message,...t?{actionUrl:t}:{}}}function Ne(e,t){try{return new URL(e).href===new URL(t).href}catch{return e===t}}function Oe(){return ce()}function De({location:e,history:t}){return{origin:e.origin,replace(r){const n=new URL(r,e.origin);if(n.origin===e.origin&&Be(n.pathname)){t.replaceState({},"",`${n.pathname}${n.search}${n.hash}`);return}e.replace(n.href)}}}function Fe(e,t){try{const r=new URL(e,t);if(r.origin!==t)return;const n=ne(r.pathname);return n?{app:n,pathname:r.pathname,target:`${r.pathname}${r.search}${r.hash}`}:void 0}catch{return}}function Be(e){return ne(e)!==void 0}function ne(e){return pe.find(({basename:t})=>e===t||e.startsWith(`${t}/`))?.app}we();const ae=ve(),We=De({location:window.location,history:window.history});function Ke(e){const t=Fe(e.destination,window.location.origin);return t?(`${window.location.pathname}${window.location.search}${window.location.hash}`!==t.target&&window.history.replaceState({},"",t.target),u.jsx(ye,{runtime:ae,initialPathname:t.pathname},t.target)):u.jsx("main",{role:"status","aria-live":"polite",children:"Sign-in complete. Opening Xpod…"})}Re.createRoot(document.getElementById("root")).render(u.jsx(be,{children:u.jsx(Pe,{runtime:ae,location:We,renderRedirected:Ke})}));
@@ -0,0 +1 @@
1
+ import{j as a,f as s,g as o,i as d}from"./global-B_WO-aYY.js";const n=o(`inline-flex items-center rounded-lg border px-2.5 py-0.5 text-xs font-semibold transition-all duration-200 ${d}`,{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-sm shadow-primary/20 hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-sm shadow-destructive/20 hover:bg-destructive/90",outline:"border-border/40 text-foreground bg-muted/30 backdrop-blur-sm"}},defaultVariants:{variant:"default"}});function u({className:r,variant:e,...t}){return a.jsx("div",{className:s(n({variant:e}),r),...t})}export{u as B};
@@ -0,0 +1 @@
1
+ import{h as u,k as b}from"./global-B_WO-aYY.js";import{c as p}from"./ModelsPage-m_SP4PdE.js";import{s as L,d as x,o as P,n as R,c as _}from"./ai-connections-DexTPyfC.js";import{c as m,a as O,b as I}from"./XpodAiConnectionsPodStore-nFgD_usD.js";import{r as K}from"./layout-DB3pMyTl.js";import"./workspace-layout-TZ7fteel.js";import"./index-CHBQVfuZ.js";import"./index-B51ot_m_.js";import"./dialog-BAe7moyL.js";import"./badge-v30yFaaj.js";import"./index-browser-DzhsXZHm.js";async function D(o){const a=o.capabilities.podCollections;if(a)try{return a.load?{collection:await a.load(u,{table:b})}:{collection:a.define(u,{table:b})}}catch{return}}function h(o){return o.includes("#")?K(u,{id:o}):o}async function M(o,a){await o.insert(a).isPersisted.promise}async function C(o,a,l){await o.update(a,d=>{Object.assign(d,l)}).isPersisted.promise}async function U(o,a){await o.delete(a).isPersisted.promise}function g(o,a){const{provider:l}=a,d=L(l,a.offeringId??x(l,a.authMode)),c=a.baseUrl??P(l,d),f=R(a.proxyUrl);return{id:o,service:"ai",provider:l==="custom"?O(o):I(l),authMode:a.authMode,status:"active",accountLabel:a.accountLabel,label:a.accountLabel,keyVersion:"1",reauthRequired:!1,encryptionAlgorithm:"PLAINTEXT",offeringId:d,...c?{baseUrl:c}:{},...f?{proxyUrl:f}:{},metadata:_({offeringId:d,baseUrl:c})}}function N(o,a){const{collection:l}=o,d=async r=>{await U(l,r).catch(()=>{})},c=(r,t)=>{const e=l.get(r);return e?p(e,t):void 0},f=async(r,t,e,n)=>{await M(l,e);try{const s=await n(b.buildId({id:t}))??c(t,r);if(!s)throw new Error("credential_create_failed");return s}catch(i){throw await d(t),i}};return{async createApiKeyCredential(r,t){if(!a.createApiKeyCredential)throw new Error("credential_store_unavailable");const e=m(r,"apiKey"),n=t.label??r;return await f(r,e,g(e,{provider:r,authMode:"apiKey",accountLabel:n,offeringId:t.offeringId,baseUrl:t.baseUrl,proxyUrl:t.proxyUrl}),i=>a.createApiKeyCredential(r,{...t,label:n,id:i}))},async createLocalCredential(r,t){if(!a.createLocalCredential)throw new Error("credential_store_unavailable");const e=m(r,"local"),n=t.label??"Local";return await f(r,e,g(e,{provider:r,authMode:"local",accountLabel:n,offeringId:t.offeringId,baseUrl:t.baseUrl}),i=>a.createLocalCredential(r,{...t,label:n,id:i}))},async updateProviderCredential(r,t,e){const n=h(t);if(!n)throw new Error("credential_not_found");const i={...e.label===void 0?{}:{label:e.label,accountLabel:e.label},...e.enabled===void 0?{}:{status:e.enabled?"active":"disabled"}},s=l.get(n);Object.keys(i).length>0&&await C(l,n,i);const y={...e.priority===void 0?{}:{priority:e.priority},...e.baseUrl===void 0?{}:{baseUrl:e.baseUrl},...e.proxyUrl===void 0?{}:{proxyUrl:e.proxyUrl}};if(Object.keys(y).length===0)return c(n,r);if(!a.updateProviderCredential)throw new Error("credential_store_unavailable");try{return await a.updateProviderCredential(r,t,{expectedVersion:e.expectedVersion,...y})??c(n,r)}catch(w){throw s&&Object.keys(i).length>0&&await C(l,n,{...i.label===void 0?{}:{label:s.label,accountLabel:s.accountLabel},...i.status===void 0?{}:{status:s.status}}).catch(()=>{}),w}},async deleteProviderCredential(r,t){const e=h(t);if(!e)return;const n=c(e,r);return await U(l,e),n}}}export{N as collectionCredentialMutations,h as credentialRowKey,D as openCredentialCollection};
@@ -0,0 +1 @@
1
+ import{j as n,r as l,P as x,u as b,o as _,p as z,q as G,s as H,f as g,i as q}from"./global-B_WO-aYY.js";import{P as R,a as K,c as p,h as U,u as V,R as X,b as Y,F as Z,D as B,d as J,e as C}from"./index-CHBQVfuZ.js";var Q=Object.defineProperty,d=(s,e)=>Q(s,"name",{value:e,configurable:!0}),y="Dialog",[O,_e]=z(y),[W,f]=O(y),ee=d(s=>{const{__scopeDialog:e,children:o,open:r,defaultOpen:i,onOpenChange:a,modal:t=!0}=s,c=l.useRef(null),u=l.useRef(null),[P,v]=J({prop:r,defaultProp:i??!1,onChange:a,caller:y}),[A,S]=l.useState(0),[k,L]=l.useState(0);return n.jsx(W,{scope:e,triggerRef:c,contentRef:u,contentId:C(),titleId:C(),descriptionId:C(),titlePresent:A>0,descriptionPresent:k>0,setTitleCount:S,setDescriptionCount:L,open:P,onOpenChange:v,onOpenToggle:l.useCallback(()=>v($=>!$),[v]),modal:t,children:o})},"Dialog"),te="DialogTrigger",oe=l.forwardRef(d(function(e,o){const{__scopeDialog:r,...i}=e,a=f(te,r),t=_(o,a.triggerRef);return n.jsx(x.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":m(a.open),...i,ref:t,onClick:p(e.onClick,a.onOpenToggle)})},"DialogTrigger")),j="DialogPortal",[ae,N]=O(j,{forceMount:void 0}),ne=d(s=>{const{__scopeDialog:e,forceMount:o,children:r,container:i}=s,a=f(j,e);return n.jsx(ae,{scope:e,forceMount:o,children:l.Children.map(r,t=>n.jsx(R,{present:o||a.open,children:n.jsx(K,{asChild:!0,container:i,children:t})}))})},"DialogPortal"),h="DialogOverlay",w=l.forwardRef(d(function(e,o){const r=N(h,e.__scopeDialog),{forceMount:i=r.forceMount,...a}=e,t=f(h,e.__scopeDialog);return t.modal?n.jsx(R,{present:i||t.open,children:n.jsx(re,{...a,ref:o})}):null},"DialogOverlay")),se=G("DialogOverlay.RemoveScroll"),re=l.forwardRef(d(function(e,o){const{__scopeDialog:r,...i}=e,a=f(h,r),t=V(),c=_(o,t);return n.jsx(X,{as:se,allowPinchZoom:!0,shards:[a.contentRef],children:n.jsx(x.div,{"data-state":m(a.open),...i,ref:c,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),D="DialogContent",E=l.forwardRef(d(function(e,o){const r=N(D,e.__scopeDialog),{forceMount:i=r.forceMount,...a}=e,t=f(D,e.__scopeDialog);return n.jsx(R,{present:i||t.open,children:t.modal?n.jsx(ie,{...a,ref:o}):n.jsx(le,{...a,ref:o})})},"DialogContent")),ie=l.forwardRef(d(function(e,o){const r=f(D,e.__scopeDialog),i=l.useRef(null),a=_(o,r.contentRef,i);return l.useEffect(()=>{const t=i.current;if(t)return U(t)},[]),n.jsx(I,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:p(e.onCloseAutoFocus,t=>{t.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:p(e.onPointerDownOutside,t=>{const c=t.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&t.preventDefault()}),onFocusOutside:p(e.onFocusOutside,t=>t.preventDefault())})},"DialogContentModal")),le=l.forwardRef(d(function(e,o){const r=f(D,e.__scopeDialog),i=l.useRef(!1),a=l.useRef(!1);return n.jsx(I,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(i.current||r.triggerRef.current?.focus(),t.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(i.current=!0,t.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=t.target;r.triggerRef.current?.contains(c)&&t.preventDefault(),t.detail.originalEvent.type==="focusin"&&a.current&&t.preventDefault()}})},"DialogContentNonModal")),I=l.forwardRef(d(function(e,o){const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:t,...c}=e,u=f(D,r);return Y(),n.jsx(n.Fragment,{children:n.jsx(Z,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:t,children:n.jsx(B,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionPresent?u.descriptionId:void 0,"aria-labelledby":u.titlePresent?u.titleId:void 0,"data-state":m(u.open),...c,ref:o,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})},"DialogContentImpl")),ce="DialogTitle",T=l.forwardRef(d(function(e,o){const{__scopeDialog:r,...i}=e,a=f(ce,r),{setTitleCount:t}=a;return b(()=>(t(c=>c+1),()=>t(c=>c-1)),[t]),n.jsx(x.h2,{id:a.titleId,...i,ref:o})},"DialogTitle")),de="DialogDescription",M=l.forwardRef(d(function(e,o){const{__scopeDialog:r,...i}=e,a=f(de,r),{setDescriptionCount:t}=a;return b(()=>(t(c=>c+1),()=>t(c=>c-1)),[t]),n.jsx(x.p,{id:a.descriptionId,...i,ref:o})},"DialogDescription")),ue="DialogClose",fe=l.forwardRef(d(function(e,o){const{__scopeDialog:r,...i}=e,a=f(ue,r);return n.jsx(x.button,{type:"button",...i,ref:o,onClick:p(e.onClick,()=>a.onOpenChange(!1))})},"DialogClose"));function m(s){return s?"open":"closed"}d(m,"getState");const Re=ee,ye=oe,ge=ne,F=l.forwardRef(({className:s,...e},o)=>n.jsx(w,{ref:o,className:g("fixed inset-0 z-50 bg-black/40","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...e}));F.displayName=w.displayName;const pe=l.forwardRef(({className:s,children:e,variant:o="center",...r},i)=>n.jsxs(ge,{children:[n.jsx(F,{}),n.jsxs(E,{ref:i,className:g(o==="sheet-left"?"fixed inset-y-0 left-0 z-50 flex h-dvh w-[min(88vw,320px)] flex-col border-r bg-background p-0 shadow-[16px_0_30px_rgba(15,23,42,0.08)] duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-left-full data-[state=open]:slide-in-from-left-full rounded-none":o==="sheet-right"?"fixed inset-y-0 right-0 z-50 flex h-dvh w-full max-w-4xl flex-col border-l bg-background p-0 shadow-[-16px_0_30px_rgba(15,23,42,0.08)] duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-right-full rounded-none":"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",s),...r,children:[e,n.jsxs(fe,{className:g("absolute right-4 top-4 rounded-xl opacity-70 transition-all hover:opacity-100 hover:bg-muted/50 p-1 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",q),children:[n.jsx(H,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pe.displayName=E.displayName;const De=({className:s,...e})=>n.jsx("div",{className:g("flex flex-col space-y-1.5 text-center sm:text-left",s),...e});De.displayName="DialogHeader";const xe=({className:s,...e})=>n.jsx("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...e});xe.displayName="DialogFooter";const me=l.forwardRef(({className:s,...e},o)=>n.jsx(T,{ref:o,className:g("text-lg font-semibold leading-none tracking-tight",s),...e}));me.displayName=T.displayName;const ve=l.forwardRef(({className:s,...e},o)=>n.jsx(M,{ref:o,className:g("text-sm text-muted-foreground",s),...e}));ve.displayName=M.displayName;export{Re as D,pe as a,De as b,me as c,ve as d,xe as e,ye as f};
@@ -0,0 +1 @@
1
+ import{c as o}from"./global-B_WO-aYY.js";const a=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],e=o("download",a);export{e as D};
@@ -0,0 +1 @@
1
+ import{c as a}from"./global-B_WO-aYY.js";const e=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],n=a("external-link",e);export{n as E};