convex-cms 0.0.2 → 0.0.3

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 (265) hide show
  1. package/admin-dist/nitro.json +15 -0
  2. package/admin-dist/public/assets/CmsEmptyState-CRswfTzk.js +5 -0
  3. package/admin-dist/public/assets/CmsPageHeader-CirpXndm.js +1 -0
  4. package/admin-dist/public/assets/CmsStatusBadge-CbEUpQu-.js +1 -0
  5. package/admin-dist/public/assets/CmsToolbar-BI2nZOXp.js +1 -0
  6. package/admin-dist/public/assets/ContentEntryEditor-CBeCyK_m.js +4 -0
  7. package/admin-dist/public/assets/ErrorState-BIVaWmom.js +1 -0
  8. package/admin-dist/public/assets/TaxonomyFilter-ChaY6Y_x.js +1 -0
  9. package/admin-dist/public/assets/_contentTypeId-DQ8k_Rvw.js +1 -0
  10. package/admin-dist/public/assets/_entryId-CKU_glsK.js +1 -0
  11. package/admin-dist/public/assets/alert-BXjTqrwQ.js +1 -0
  12. package/admin-dist/public/assets/badge-hvUOzpVZ.js +1 -0
  13. package/admin-dist/public/assets/circle-check-big-CF_pR17r.js +1 -0
  14. package/admin-dist/public/assets/command-DU82cJlt.js +1 -0
  15. package/admin-dist/public/assets/content-_LXl3pp7.js +1 -0
  16. package/admin-dist/public/assets/content-types-KjxaXGxY.js +2 -0
  17. package/admin-dist/public/assets/globals-CS6BZ0zp.css +1 -0
  18. package/admin-dist/public/assets/index-DNGIZHL-.js +1 -0
  19. package/admin-dist/public/assets/label-KNtpL71g.js +1 -0
  20. package/admin-dist/public/assets/link-2-Bw2aI4V4.js +1 -0
  21. package/admin-dist/public/assets/list-sYepHjt_.js +1 -0
  22. package/admin-dist/public/assets/main-CKj5yfEi.js +97 -0
  23. package/admin-dist/public/assets/media-Bkrkffm7.js +1 -0
  24. package/admin-dist/public/assets/new._contentTypeId-C3LstjNs.js +1 -0
  25. package/admin-dist/public/assets/plus-DUn8v_Xf.js +1 -0
  26. package/admin-dist/public/assets/rotate-ccw-DJEoHcRI.js +1 -0
  27. package/admin-dist/public/assets/scroll-area-DfIlT0in.js +1 -0
  28. package/admin-dist/public/assets/search-MuAUDJKR.js +1 -0
  29. package/admin-dist/public/assets/select-BD29IXCI.js +1 -0
  30. package/admin-dist/public/assets/settings-DmMyn_6A.js +1 -0
  31. package/admin-dist/public/assets/switch-h3Rrnl5i.js +1 -0
  32. package/admin-dist/public/assets/tabs-imc8h-Dp.js +1 -0
  33. package/admin-dist/public/assets/taxonomies-dAsrT65H.js +1 -0
  34. package/admin-dist/public/assets/textarea-BTy7nwzR.js +1 -0
  35. package/admin-dist/public/assets/trash-SAWKZZHv.js +1 -0
  36. package/admin-dist/public/assets/triangle-alert-E52Vfeuh.js +1 -0
  37. package/admin-dist/public/assets/useBreadcrumbLabel-BECBMCzM.js +1 -0
  38. package/admin-dist/public/assets/usePermissions-Basjs9BT.js +1 -0
  39. package/admin-dist/public/favicon.ico +0 -0
  40. package/admin-dist/server/_chunks/_libs/@date-fns/tz.mjs +217 -0
  41. package/admin-dist/server/_chunks/_libs/@floating-ui/core.mjs +719 -0
  42. package/admin-dist/server/_chunks/_libs/@floating-ui/dom.mjs +622 -0
  43. package/admin-dist/server/_chunks/_libs/@floating-ui/react-dom.mjs +292 -0
  44. package/admin-dist/server/_chunks/_libs/@floating-ui/utils.mjs +320 -0
  45. package/admin-dist/server/_chunks/_libs/@radix-ui/number.mjs +6 -0
  46. package/admin-dist/server/_chunks/_libs/@radix-ui/primitive.mjs +11 -0
  47. package/admin-dist/server/_chunks/_libs/@radix-ui/react-arrow.mjs +23 -0
  48. package/admin-dist/server/_chunks/_libs/@radix-ui/react-avatar.mjs +119 -0
  49. package/admin-dist/server/_chunks/_libs/@radix-ui/react-checkbox.mjs +270 -0
  50. package/admin-dist/server/_chunks/_libs/@radix-ui/react-collection.mjs +69 -0
  51. package/admin-dist/server/_chunks/_libs/@radix-ui/react-compose-refs.mjs +39 -0
  52. package/admin-dist/server/_chunks/_libs/@radix-ui/react-context.mjs +137 -0
  53. package/admin-dist/server/_chunks/_libs/@radix-ui/react-dialog.mjs +325 -0
  54. package/admin-dist/server/_chunks/_libs/@radix-ui/react-direction.mjs +9 -0
  55. package/admin-dist/server/_chunks/_libs/@radix-ui/react-dismissable-layer.mjs +210 -0
  56. package/admin-dist/server/_chunks/_libs/@radix-ui/react-dropdown-menu.mjs +253 -0
  57. package/admin-dist/server/_chunks/_libs/@radix-ui/react-focus-guards.mjs +29 -0
  58. package/admin-dist/server/_chunks/_libs/@radix-ui/react-focus-scope.mjs +206 -0
  59. package/admin-dist/server/_chunks/_libs/@radix-ui/react-id.mjs +14 -0
  60. package/admin-dist/server/_chunks/_libs/@radix-ui/react-label.mjs +23 -0
  61. package/admin-dist/server/_chunks/_libs/@radix-ui/react-menu.mjs +812 -0
  62. package/admin-dist/server/_chunks/_libs/@radix-ui/react-popover.mjs +300 -0
  63. package/admin-dist/server/_chunks/_libs/@radix-ui/react-popper.mjs +286 -0
  64. package/admin-dist/server/_chunks/_libs/@radix-ui/react-portal.mjs +16 -0
  65. package/admin-dist/server/_chunks/_libs/@radix-ui/react-presence.mjs +128 -0
  66. package/admin-dist/server/_chunks/_libs/@radix-ui/react-primitive.mjs +141 -0
  67. package/admin-dist/server/_chunks/_libs/@radix-ui/react-roving-focus.mjs +224 -0
  68. package/admin-dist/server/_chunks/_libs/@radix-ui/react-scroll-area.mjs +721 -0
  69. package/admin-dist/server/_chunks/_libs/@radix-ui/react-select.mjs +1163 -0
  70. package/admin-dist/server/_chunks/_libs/@radix-ui/react-separator.mjs +28 -0
  71. package/admin-dist/server/_chunks/_libs/@radix-ui/react-slot.mjs +601 -0
  72. package/admin-dist/server/_chunks/_libs/@radix-ui/react-switch.mjs +152 -0
  73. package/admin-dist/server/_chunks/_libs/@radix-ui/react-tabs.mjs +189 -0
  74. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-callback-ref.mjs +11 -0
  75. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-controllable-state.mjs +69 -0
  76. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-effect-event.mjs +1 -0
  77. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-escape-keydown.mjs +17 -0
  78. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-is-hydrated.mjs +15 -0
  79. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-layout-effect.mjs +6 -0
  80. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-previous.mjs +14 -0
  81. package/admin-dist/server/_chunks/_libs/@radix-ui/react-use-size.mjs +39 -0
  82. package/admin-dist/server/_chunks/_libs/@radix-ui/react-visually-hidden.mjs +33 -0
  83. package/admin-dist/server/_chunks/_libs/@tanstack/history.mjs +409 -0
  84. package/admin-dist/server/_chunks/_libs/@tanstack/react-router.mjs +1711 -0
  85. package/admin-dist/server/_chunks/_libs/@tanstack/react-store.mjs +56 -0
  86. package/admin-dist/server/_chunks/_libs/@tanstack/router-core.mjs +4829 -0
  87. package/admin-dist/server/_chunks/_libs/@tanstack/store.mjs +134 -0
  88. package/admin-dist/server/_chunks/_libs/react-dom.mjs +10781 -0
  89. package/admin-dist/server/_chunks/_libs/react.mjs +513 -0
  90. package/admin-dist/server/_libs/aria-hidden.mjs +122 -0
  91. package/admin-dist/server/_libs/class-variance-authority.mjs +44 -0
  92. package/admin-dist/server/_libs/clsx.mjs +16 -0
  93. package/admin-dist/server/_libs/cmdk.mjs +315 -0
  94. package/admin-dist/server/_libs/convex.mjs +4841 -0
  95. package/admin-dist/server/_libs/cookie-es.mjs +58 -0
  96. package/admin-dist/server/_libs/croner.mjs +1 -0
  97. package/admin-dist/server/_libs/crossws.mjs +1 -0
  98. package/admin-dist/server/_libs/date-fns.mjs +1716 -0
  99. package/admin-dist/server/_libs/detect-node-es.mjs +1 -0
  100. package/admin-dist/server/_libs/get-nonce.mjs +9 -0
  101. package/admin-dist/server/_libs/h3-v2.mjs +277 -0
  102. package/admin-dist/server/_libs/h3.mjs +401 -0
  103. package/admin-dist/server/_libs/hookable.mjs +1 -0
  104. package/admin-dist/server/_libs/isbot.mjs +20 -0
  105. package/admin-dist/server/_libs/lucide-react.mjs +850 -0
  106. package/admin-dist/server/_libs/ohash.mjs +1 -0
  107. package/admin-dist/server/_libs/react-day-picker.mjs +2201 -0
  108. package/admin-dist/server/_libs/react-remove-scroll-bar.mjs +82 -0
  109. package/admin-dist/server/_libs/react-remove-scroll.mjs +328 -0
  110. package/admin-dist/server/_libs/react-style-singleton.mjs +69 -0
  111. package/admin-dist/server/_libs/rou3.mjs +8 -0
  112. package/admin-dist/server/_libs/seroval-plugins.mjs +58 -0
  113. package/admin-dist/server/_libs/seroval.mjs +1765 -0
  114. package/admin-dist/server/_libs/srvx.mjs +719 -0
  115. package/admin-dist/server/_libs/tailwind-merge.mjs +3010 -0
  116. package/admin-dist/server/_libs/tiny-invariant.mjs +12 -0
  117. package/admin-dist/server/_libs/tiny-warning.mjs +5 -0
  118. package/admin-dist/server/_libs/tslib.mjs +39 -0
  119. package/admin-dist/server/_libs/ufo.mjs +54 -0
  120. package/admin-dist/server/_libs/unctx.mjs +1 -0
  121. package/admin-dist/server/_libs/unstorage.mjs +1 -0
  122. package/admin-dist/server/_libs/use-callback-ref.mjs +66 -0
  123. package/admin-dist/server/_libs/use-sidecar.mjs +106 -0
  124. package/admin-dist/server/_libs/use-sync-external-store.mjs +139 -0
  125. package/admin-dist/server/_libs/zod.mjs +4223 -0
  126. package/admin-dist/server/_ssr/CmsEmptyState-DU7-7-mV.mjs +290 -0
  127. package/admin-dist/server/_ssr/CmsPageHeader-CseW0AHm.mjs +24 -0
  128. package/admin-dist/server/_ssr/CmsStatusBadge-B_pi4KCp.mjs +127 -0
  129. package/admin-dist/server/_ssr/CmsToolbar-X75ex6ek.mjs +49 -0
  130. package/admin-dist/server/_ssr/ContentEntryEditor-CepusRsA.mjs +3720 -0
  131. package/admin-dist/server/_ssr/ErrorState-cI-bKLez.mjs +89 -0
  132. package/admin-dist/server/_ssr/TaxonomyFilter-Bwrq0-cz.mjs +188 -0
  133. package/admin-dist/server/_ssr/_contentTypeId-BqYKEcLr.mjs +379 -0
  134. package/admin-dist/server/_ssr/_entryId-CRfnqeDf.mjs +161 -0
  135. package/admin-dist/server/_ssr/_tanstack-start-manifest_v-BwDlABVk.mjs +4 -0
  136. package/admin-dist/server/_ssr/alert-CVt45UUP.mjs +92 -0
  137. package/admin-dist/server/_ssr/badge-6BsP37vG.mjs +125 -0
  138. package/admin-dist/server/_ssr/command-fy8epIKf.mjs +128 -0
  139. package/admin-dist/server/_ssr/config.server-D7JHDcDv.mjs +117 -0
  140. package/admin-dist/server/_ssr/content-B5RhL7uW.mjs +532 -0
  141. package/admin-dist/server/_ssr/content-types-BIOqCQYN.mjs +1166 -0
  142. package/admin-dist/server/_ssr/index-DHSHDPt1.mjs +193 -0
  143. package/admin-dist/server/_ssr/index.mjs +1275 -0
  144. package/admin-dist/server/_ssr/label-C8Dko1j7.mjs +22 -0
  145. package/admin-dist/server/_ssr/media-CSx3XttC.mjs +1832 -0
  146. package/admin-dist/server/_ssr/new._contentTypeId-DzanEZQM.mjs +144 -0
  147. package/admin-dist/server/_ssr/router-DDWcF-kt.mjs +1556 -0
  148. package/admin-dist/server/_ssr/scroll-area-bjPYwhXN.mjs +59 -0
  149. package/admin-dist/server/_ssr/select-BUhDDf4T.mjs +142 -0
  150. package/admin-dist/server/_ssr/settings-DAsxnw2q.mjs +348 -0
  151. package/admin-dist/server/_ssr/start-HYkvq4Ni.mjs +4 -0
  152. package/admin-dist/server/_ssr/switch-BgyRtQ1Z.mjs +31 -0
  153. package/admin-dist/server/_ssr/tabs-DzMdRB1A.mjs +628 -0
  154. package/admin-dist/server/_ssr/taxonomies-C8j8g5Q5.mjs +915 -0
  155. package/admin-dist/server/_ssr/textarea-9jNeYJSc.mjs +18 -0
  156. package/admin-dist/server/_ssr/trash-DYMxwhZB.mjs +291 -0
  157. package/admin-dist/server/_ssr/useBreadcrumbLabel-FNSAr2Ha.mjs +16 -0
  158. package/admin-dist/server/_ssr/usePermissions-BJGGahrJ.mjs +68 -0
  159. package/admin-dist/server/favicon.ico +0 -0
  160. package/admin-dist/server/index.mjs +627 -0
  161. package/dist/cli/index.js +0 -0
  162. package/dist/client/admin-config.d.ts +0 -1
  163. package/dist/client/admin-config.d.ts.map +1 -1
  164. package/dist/client/admin-config.js +0 -1
  165. package/dist/client/admin-config.js.map +1 -1
  166. package/dist/client/adminApi.d.ts.map +1 -1
  167. package/dist/client/agentTools.d.ts +1237 -135
  168. package/dist/client/agentTools.d.ts.map +1 -1
  169. package/dist/client/agentTools.js +33 -9
  170. package/dist/client/agentTools.js.map +1 -1
  171. package/dist/client/index.d.ts +1 -1
  172. package/dist/client/index.d.ts.map +1 -1
  173. package/dist/client/index.js.map +1 -1
  174. package/dist/component/_generated/component.d.ts +9 -0
  175. package/dist/component/_generated/component.d.ts.map +1 -1
  176. package/dist/component/mediaAssets.d.ts +35 -0
  177. package/dist/component/mediaAssets.d.ts.map +1 -1
  178. package/dist/component/mediaAssets.js +81 -0
  179. package/dist/component/mediaAssets.js.map +1 -1
  180. package/dist/test.d.ts.map +1 -1
  181. package/dist/test.js +2 -1
  182. package/dist/test.js.map +1 -1
  183. package/package.json +9 -5
  184. package/dist/component/auditLog.d.ts +0 -410
  185. package/dist/component/auditLog.d.ts.map +0 -1
  186. package/dist/component/auditLog.js +0 -607
  187. package/dist/component/auditLog.js.map +0 -1
  188. package/dist/component/types.d.ts +0 -4
  189. package/dist/component/types.d.ts.map +0 -1
  190. package/dist/component/types.js +0 -2
  191. package/dist/component/types.js.map +0 -1
  192. package/src/cli/commands/admin.ts +0 -104
  193. package/src/cli/index.ts +0 -21
  194. package/src/cli/utils/detectConvexUrl.ts +0 -54
  195. package/src/cli/utils/openBrowser.ts +0 -16
  196. package/src/client/admin-config.ts +0 -138
  197. package/src/client/adminApi.ts +0 -942
  198. package/src/client/agentTools.ts +0 -1311
  199. package/src/client/argTypes.ts +0 -316
  200. package/src/client/field-types.ts +0 -187
  201. package/src/client/index.ts +0 -1301
  202. package/src/client/queryBuilder.ts +0 -1100
  203. package/src/client/schema/codegen.ts +0 -500
  204. package/src/client/schema/defineContentType.ts +0 -501
  205. package/src/client/schema/index.ts +0 -169
  206. package/src/client/schema/schemaDrift.ts +0 -574
  207. package/src/client/schema/typedClient.ts +0 -688
  208. package/src/client/schema/types.ts +0 -666
  209. package/src/client/types.ts +0 -723
  210. package/src/client/workflows.ts +0 -141
  211. package/src/client/wrapper.ts +0 -4304
  212. package/src/component/_generated/api.ts +0 -140
  213. package/src/component/_generated/component.ts +0 -5029
  214. package/src/component/_generated/dataModel.ts +0 -60
  215. package/src/component/_generated/server.ts +0 -156
  216. package/src/component/authorization.ts +0 -647
  217. package/src/component/authorizationHooks.ts +0 -668
  218. package/src/component/bulkOperations.ts +0 -687
  219. package/src/component/contentEntries.ts +0 -1976
  220. package/src/component/contentEntryMutations.ts +0 -1223
  221. package/src/component/contentEntryValidation.ts +0 -707
  222. package/src/component/contentLock.ts +0 -550
  223. package/src/component/contentTypeMigration.ts +0 -1064
  224. package/src/component/contentTypeMutations.ts +0 -969
  225. package/src/component/contentTypes.ts +0 -346
  226. package/src/component/convex.config.ts +0 -44
  227. package/src/component/documentTypes.ts +0 -240
  228. package/src/component/eventEmitter.ts +0 -485
  229. package/src/component/exportImport.ts +0 -1169
  230. package/src/component/index.ts +0 -491
  231. package/src/component/lib/deepReferenceResolver.ts +0 -999
  232. package/src/component/lib/errors.ts +0 -816
  233. package/src/component/lib/index.ts +0 -145
  234. package/src/component/lib/mediaReferenceResolver.ts +0 -495
  235. package/src/component/lib/metadataExtractor.ts +0 -792
  236. package/src/component/lib/mutationAuth.ts +0 -199
  237. package/src/component/lib/queries.ts +0 -79
  238. package/src/component/lib/ragContentChunker.ts +0 -1371
  239. package/src/component/lib/referenceResolver.ts +0 -430
  240. package/src/component/lib/slugGenerator.ts +0 -262
  241. package/src/component/lib/slugUniqueness.ts +0 -333
  242. package/src/component/lib/softDelete.ts +0 -44
  243. package/src/component/localeFallbackChain.ts +0 -673
  244. package/src/component/localeFields.ts +0 -896
  245. package/src/component/mediaAssetMutations.ts +0 -725
  246. package/src/component/mediaAssets.ts +0 -932
  247. package/src/component/mediaFolderMutations.ts +0 -1046
  248. package/src/component/mediaUploadMutations.ts +0 -224
  249. package/src/component/mediaVariantMutations.ts +0 -900
  250. package/src/component/mediaVariants.ts +0 -793
  251. package/src/component/ragContentIndexer.ts +0 -1067
  252. package/src/component/rateLimitHooks.ts +0 -572
  253. package/src/component/roles.ts +0 -1360
  254. package/src/component/scheduledPublish.ts +0 -358
  255. package/src/component/schema.ts +0 -617
  256. package/src/component/taxonomies.ts +0 -949
  257. package/src/component/taxonomyMutations.ts +0 -1210
  258. package/src/component/trash.ts +0 -724
  259. package/src/component/userContext.ts +0 -898
  260. package/src/component/validation.ts +0 -1388
  261. package/src/component/validators.ts +0 -949
  262. package/src/component/versionMutations.ts +0 -392
  263. package/src/component/webhookTrigger.ts +0 -1922
  264. package/src/react/index.ts +0 -898
  265. package/src/test.ts +0 -1580
@@ -0,0 +1,9 @@
1
+ var getNonce = function() {
2
+ if (typeof __webpack_nonce__ !== "undefined") {
3
+ return __webpack_nonce__;
4
+ }
5
+ return void 0;
6
+ };
7
+ export {
8
+ getNonce as g
9
+ };
@@ -0,0 +1,277 @@
1
+ import { N as NullProtoObj } from "./rou3.mjs";
2
+ import { F as FastURL, N as NodeResponse } from "./srvx.mjs";
3
+ const kEventNS = "h3.internal.event.";
4
+ const kEventRes = /* @__PURE__ */ Symbol.for(`${kEventNS}res`);
5
+ const kEventResHeaders = /* @__PURE__ */ Symbol.for(`${kEventNS}res.headers`);
6
+ var H3Event = class {
7
+ app;
8
+ req;
9
+ url;
10
+ context;
11
+ static __is_event__ = true;
12
+ constructor(req, context, app) {
13
+ this.context = context || req.context || new NullProtoObj();
14
+ this.req = req;
15
+ this.app = app;
16
+ const _url = req._url;
17
+ this.url = _url && _url instanceof URL ? _url : new FastURL(req.url);
18
+ }
19
+ get res() {
20
+ return this[kEventRes] ||= new H3EventResponse();
21
+ }
22
+ get runtime() {
23
+ return this.req.runtime;
24
+ }
25
+ waitUntil(promise) {
26
+ this.req.waitUntil?.(promise);
27
+ }
28
+ toString() {
29
+ return `[${this.req.method}] ${this.req.url}`;
30
+ }
31
+ toJSON() {
32
+ return this.toString();
33
+ }
34
+ get node() {
35
+ return this.req.runtime?.node;
36
+ }
37
+ get headers() {
38
+ return this.req.headers;
39
+ }
40
+ get path() {
41
+ return this.url.pathname + this.url.search;
42
+ }
43
+ get method() {
44
+ return this.req.method;
45
+ }
46
+ };
47
+ var H3EventResponse = class {
48
+ status;
49
+ statusText;
50
+ get headers() {
51
+ return this[kEventResHeaders] ||= new Headers();
52
+ }
53
+ };
54
+ const DISALLOWED_STATUS_CHARS = /[^\u0009\u0020-\u007E]/g;
55
+ function sanitizeStatusMessage(statusMessage = "") {
56
+ return statusMessage.replace(DISALLOWED_STATUS_CHARS, "");
57
+ }
58
+ function sanitizeStatusCode(statusCode, defaultStatusCode = 200) {
59
+ if (!statusCode) return defaultStatusCode;
60
+ if (typeof statusCode === "string") statusCode = +statusCode;
61
+ if (statusCode < 100 || statusCode > 599) return defaultStatusCode;
62
+ return statusCode;
63
+ }
64
+ var HTTPError = class HTTPError2 extends Error {
65
+ get name() {
66
+ return "HTTPError";
67
+ }
68
+ status;
69
+ statusText;
70
+ headers;
71
+ cause;
72
+ data;
73
+ body;
74
+ unhandled;
75
+ static isError(input) {
76
+ return input instanceof Error && input?.name === "HTTPError";
77
+ }
78
+ static status(status, statusText, details) {
79
+ return new HTTPError2({
80
+ ...details,
81
+ statusText,
82
+ status
83
+ });
84
+ }
85
+ constructor(arg1, arg2) {
86
+ let messageInput;
87
+ let details;
88
+ if (typeof arg1 === "string") {
89
+ messageInput = arg1;
90
+ details = arg2;
91
+ } else details = arg1;
92
+ const status = sanitizeStatusCode(details?.status || details?.cause?.status || details?.status || details?.statusCode, 500);
93
+ const statusText = sanitizeStatusMessage(details?.statusText || details?.cause?.statusText || details?.statusText || details?.statusMessage);
94
+ const message = messageInput || details?.message || details?.cause?.message || details?.statusText || details?.statusMessage || [
95
+ "HTTPError",
96
+ status,
97
+ statusText
98
+ ].filter(Boolean).join(" ");
99
+ super(message, { cause: details });
100
+ this.cause = details;
101
+ this.status = status;
102
+ this.statusText = statusText || void 0;
103
+ const rawHeaders = details?.headers || details?.cause?.headers;
104
+ this.headers = rawHeaders ? new Headers(rawHeaders) : void 0;
105
+ this.unhandled = details?.unhandled ?? details?.cause?.unhandled ?? void 0;
106
+ this.data = details?.data;
107
+ this.body = details?.body;
108
+ }
109
+ get statusCode() {
110
+ return this.status;
111
+ }
112
+ get statusMessage() {
113
+ return this.statusText;
114
+ }
115
+ toJSON() {
116
+ const unhandled = this.unhandled;
117
+ return {
118
+ status: this.status,
119
+ statusText: this.statusText,
120
+ unhandled,
121
+ message: unhandled ? "HTTPError" : this.message,
122
+ data: unhandled ? void 0 : this.data,
123
+ ...unhandled ? void 0 : this.body
124
+ };
125
+ }
126
+ };
127
+ function isJSONSerializable(value, _type) {
128
+ if (value === null || value === void 0) return true;
129
+ if (_type !== "object") return _type === "boolean" || _type === "number" || _type === "string";
130
+ if (typeof value.toJSON === "function") return true;
131
+ if (Array.isArray(value)) return true;
132
+ if (typeof value.pipe === "function" || typeof value.pipeTo === "function") return false;
133
+ if (value instanceof NullProtoObj) return true;
134
+ const proto = Object.getPrototypeOf(value);
135
+ return proto === Object.prototype || proto === null;
136
+ }
137
+ const kNotFound = /* @__PURE__ */ Symbol.for("h3.notFound");
138
+ const kHandled = /* @__PURE__ */ Symbol.for("h3.handled");
139
+ function toResponse(val, event, config = {}) {
140
+ if (typeof val?.then === "function") return (val.catch?.((error) => error) || Promise.resolve(val)).then((resolvedVal) => toResponse(resolvedVal, event, config));
141
+ const response = prepareResponse(val, event, config);
142
+ if (typeof response?.then === "function") return toResponse(response, event, config);
143
+ const { onResponse: onResponse$1 } = config;
144
+ return onResponse$1 ? Promise.resolve(onResponse$1(response, event)).then(() => response) : response;
145
+ }
146
+ var HTTPResponse = class {
147
+ #headers;
148
+ #init;
149
+ body;
150
+ constructor(body, init) {
151
+ this.body = body;
152
+ this.#init = init;
153
+ }
154
+ get status() {
155
+ return this.#init?.status || 200;
156
+ }
157
+ get statusText() {
158
+ return this.#init?.statusText || "OK";
159
+ }
160
+ get headers() {
161
+ return this.#headers ||= new Headers(this.#init?.headers);
162
+ }
163
+ };
164
+ function prepareResponse(val, event, config, nested) {
165
+ if (val === kHandled) return new NodeResponse(null);
166
+ if (val === kNotFound) val = new HTTPError({
167
+ status: 404,
168
+ message: `Cannot find any route matching [${event.req.method}] ${event.url}`
169
+ });
170
+ if (val && val instanceof Error) {
171
+ const isHTTPError = HTTPError.isError(val);
172
+ const error = isHTTPError ? val : new HTTPError(val);
173
+ if (!isHTTPError) {
174
+ error.unhandled = true;
175
+ if (val?.stack) error.stack = val.stack;
176
+ }
177
+ if (error.unhandled && !config.silent) console.error(error);
178
+ const { onError: onError$1 } = config;
179
+ return onError$1 && !nested ? Promise.resolve(onError$1(error, event)).catch((error$1) => error$1).then((newVal) => prepareResponse(newVal ?? val, event, config, true)) : errorResponse(error, config.debug);
180
+ }
181
+ const preparedRes = event[kEventRes];
182
+ const preparedHeaders = preparedRes?.[kEventResHeaders];
183
+ event[kEventRes] = void 0;
184
+ if (!(val instanceof Response)) {
185
+ const res = prepareResponseBody(val, event, config);
186
+ const status = res.status || preparedRes?.status;
187
+ return new NodeResponse(nullBody(event.req.method, status) ? null : res.body, {
188
+ status,
189
+ statusText: res.statusText || preparedRes?.statusText,
190
+ headers: res.headers && preparedHeaders ? mergeHeaders$1(res.headers, preparedHeaders) : res.headers || preparedHeaders
191
+ });
192
+ }
193
+ if (!preparedHeaders || nested || !val.ok) return val;
194
+ try {
195
+ mergeHeaders$1(val.headers, preparedHeaders, val.headers);
196
+ return val;
197
+ } catch {
198
+ return new NodeResponse(nullBody(event.req.method, val.status) ? null : val.body, {
199
+ status: val.status,
200
+ statusText: val.statusText,
201
+ headers: mergeHeaders$1(val.headers, preparedHeaders)
202
+ });
203
+ }
204
+ }
205
+ function mergeHeaders$1(base, overrides, target = new Headers(base)) {
206
+ for (const [name, value] of overrides) if (name === "set-cookie") target.append(name, value);
207
+ else target.set(name, value);
208
+ return target;
209
+ }
210
+ const frozenHeaders = () => {
211
+ throw new Error("Headers are frozen");
212
+ };
213
+ var FrozenHeaders = class extends Headers {
214
+ constructor(init) {
215
+ super(init);
216
+ this.set = this.append = this.delete = frozenHeaders;
217
+ }
218
+ };
219
+ const emptyHeaders = /* @__PURE__ */ new FrozenHeaders({ "content-length": "0" });
220
+ const jsonHeaders = /* @__PURE__ */ new FrozenHeaders({ "content-type": "application/json;charset=UTF-8" });
221
+ function prepareResponseBody(val, event, config) {
222
+ if (val === null || val === void 0) return {
223
+ body: "",
224
+ headers: emptyHeaders
225
+ };
226
+ const valType = typeof val;
227
+ if (valType === "string") return { body: val };
228
+ if (val instanceof Uint8Array) {
229
+ event.res.headers.set("content-length", val.byteLength.toString());
230
+ return { body: val };
231
+ }
232
+ if (val instanceof HTTPResponse || val?.constructor?.name === "HTTPResponse") return val;
233
+ if (isJSONSerializable(val, valType)) return {
234
+ body: JSON.stringify(val, void 0, config.debug ? 2 : void 0),
235
+ headers: jsonHeaders
236
+ };
237
+ if (valType === "bigint") return {
238
+ body: val.toString(),
239
+ headers: jsonHeaders
240
+ };
241
+ if (val instanceof Blob) {
242
+ const headers = new Headers({
243
+ "content-type": val.type,
244
+ "content-length": val.size.toString()
245
+ });
246
+ let filename = val.name;
247
+ if (filename) {
248
+ filename = encodeURIComponent(filename);
249
+ headers.set("content-disposition", `filename="${filename}"; filename*=UTF-8''${filename}`);
250
+ }
251
+ return {
252
+ body: val.stream(),
253
+ headers
254
+ };
255
+ }
256
+ if (valType === "symbol") return { body: val.toString() };
257
+ if (valType === "function") return { body: `${val.name}()` };
258
+ return { body: val };
259
+ }
260
+ function nullBody(method, status) {
261
+ return method === "HEAD" || status === 100 || status === 101 || status === 102 || status === 204 || status === 205 || status === 304;
262
+ }
263
+ function errorResponse(error, debug) {
264
+ return new NodeResponse(JSON.stringify({
265
+ ...error.toJSON(),
266
+ stack: debug && error.stack ? error.stack.split("\n").map((l) => l.trim()) : void 0
267
+ }, void 0, debug ? 2 : void 0), {
268
+ status: error.status,
269
+ statusText: error.statusText,
270
+ headers: error.headers ? mergeHeaders$1(jsonHeaders, error.headers) : new Headers(jsonHeaders)
271
+ });
272
+ }
273
+ new TextEncoder();
274
+ export {
275
+ H3Event as H,
276
+ toResponse as t
277
+ };
@@ -0,0 +1,401 @@
1
+ import { N as NullProtoObj } from "./rou3.mjs";
2
+ import { F as FastURL, N as NodeResponse } from "./srvx.mjs";
3
+ const kEventNS = "h3.internal.event.";
4
+ const kEventRes = /* @__PURE__ */ Symbol.for(`${kEventNS}res`);
5
+ const kEventResHeaders = /* @__PURE__ */ Symbol.for(`${kEventNS}res.headers`);
6
+ var H3Event = class {
7
+ app;
8
+ req;
9
+ url;
10
+ context;
11
+ static __is_event__ = true;
12
+ constructor(req, context, app) {
13
+ this.context = context || req.context || new NullProtoObj();
14
+ this.req = req;
15
+ this.app = app;
16
+ const _url = req._url;
17
+ this.url = _url && _url instanceof URL ? _url : new FastURL(req.url);
18
+ }
19
+ get res() {
20
+ return this[kEventRes] ||= new H3EventResponse();
21
+ }
22
+ get runtime() {
23
+ return this.req.runtime;
24
+ }
25
+ waitUntil(promise) {
26
+ this.req.waitUntil?.(promise);
27
+ }
28
+ toString() {
29
+ return `[${this.req.method}] ${this.req.url}`;
30
+ }
31
+ toJSON() {
32
+ return this.toString();
33
+ }
34
+ get node() {
35
+ return this.req.runtime?.node;
36
+ }
37
+ get headers() {
38
+ return this.req.headers;
39
+ }
40
+ get path() {
41
+ return this.url.pathname + this.url.search;
42
+ }
43
+ get method() {
44
+ return this.req.method;
45
+ }
46
+ };
47
+ var H3EventResponse = class {
48
+ status;
49
+ statusText;
50
+ get headers() {
51
+ return this[kEventResHeaders] ||= new Headers();
52
+ }
53
+ };
54
+ const DISALLOWED_STATUS_CHARS = /[^\u0009\u0020-\u007E]/g;
55
+ function sanitizeStatusMessage(statusMessage = "") {
56
+ return statusMessage.replace(DISALLOWED_STATUS_CHARS, "");
57
+ }
58
+ function sanitizeStatusCode(statusCode, defaultStatusCode = 200) {
59
+ if (!statusCode) return defaultStatusCode;
60
+ if (typeof statusCode === "string") statusCode = +statusCode;
61
+ if (statusCode < 100 || statusCode > 599) return defaultStatusCode;
62
+ return statusCode;
63
+ }
64
+ var HTTPError = class HTTPError2 extends Error {
65
+ get name() {
66
+ return "HTTPError";
67
+ }
68
+ status;
69
+ statusText;
70
+ headers;
71
+ cause;
72
+ data;
73
+ body;
74
+ unhandled;
75
+ static isError(input) {
76
+ return input instanceof Error && input?.name === "HTTPError";
77
+ }
78
+ static status(status, statusText, details) {
79
+ return new HTTPError2({
80
+ ...details,
81
+ statusText,
82
+ status
83
+ });
84
+ }
85
+ constructor(arg1, arg2) {
86
+ let messageInput;
87
+ let details;
88
+ if (typeof arg1 === "string") {
89
+ messageInput = arg1;
90
+ details = arg2;
91
+ } else details = arg1;
92
+ const status = sanitizeStatusCode(details?.status || details?.cause?.status || details?.status || details?.statusCode, 500);
93
+ const statusText = sanitizeStatusMessage(details?.statusText || details?.cause?.statusText || details?.statusText || details?.statusMessage);
94
+ const message = messageInput || details?.message || details?.cause?.message || details?.statusText || details?.statusMessage || [
95
+ "HTTPError",
96
+ status,
97
+ statusText
98
+ ].filter(Boolean).join(" ");
99
+ super(message, { cause: details });
100
+ this.cause = details;
101
+ this.status = status;
102
+ this.statusText = statusText || void 0;
103
+ const rawHeaders = details?.headers || details?.cause?.headers;
104
+ this.headers = rawHeaders ? new Headers(rawHeaders) : void 0;
105
+ this.unhandled = details?.unhandled ?? details?.cause?.unhandled ?? void 0;
106
+ this.data = details?.data;
107
+ this.body = details?.body;
108
+ }
109
+ get statusCode() {
110
+ return this.status;
111
+ }
112
+ get statusMessage() {
113
+ return this.statusText;
114
+ }
115
+ toJSON() {
116
+ const unhandled = this.unhandled;
117
+ return {
118
+ status: this.status,
119
+ statusText: this.statusText,
120
+ unhandled,
121
+ message: unhandled ? "HTTPError" : this.message,
122
+ data: unhandled ? void 0 : this.data,
123
+ ...unhandled ? void 0 : this.body
124
+ };
125
+ }
126
+ };
127
+ function isJSONSerializable(value, _type) {
128
+ if (value === null || value === void 0) return true;
129
+ if (_type !== "object") return _type === "boolean" || _type === "number" || _type === "string";
130
+ if (typeof value.toJSON === "function") return true;
131
+ if (Array.isArray(value)) return true;
132
+ if (typeof value.pipe === "function" || typeof value.pipeTo === "function") return false;
133
+ if (value instanceof NullProtoObj) return true;
134
+ const proto = Object.getPrototypeOf(value);
135
+ return proto === Object.prototype || proto === null;
136
+ }
137
+ const kNotFound = /* @__PURE__ */ Symbol.for("h3.notFound");
138
+ const kHandled = /* @__PURE__ */ Symbol.for("h3.handled");
139
+ function toResponse(val, event, config = {}) {
140
+ if (typeof val?.then === "function") return (val.catch?.((error) => error) || Promise.resolve(val)).then((resolvedVal) => toResponse(resolvedVal, event, config));
141
+ const response = prepareResponse(val, event, config);
142
+ if (typeof response?.then === "function") return toResponse(response, event, config);
143
+ const { onResponse: onResponse$1 } = config;
144
+ return onResponse$1 ? Promise.resolve(onResponse$1(response, event)).then(() => response) : response;
145
+ }
146
+ var HTTPResponse = class {
147
+ #headers;
148
+ #init;
149
+ body;
150
+ constructor(body, init) {
151
+ this.body = body;
152
+ this.#init = init;
153
+ }
154
+ get status() {
155
+ return this.#init?.status || 200;
156
+ }
157
+ get statusText() {
158
+ return this.#init?.statusText || "OK";
159
+ }
160
+ get headers() {
161
+ return this.#headers ||= new Headers(this.#init?.headers);
162
+ }
163
+ };
164
+ function prepareResponse(val, event, config, nested) {
165
+ if (val === kHandled) return new NodeResponse(null);
166
+ if (val === kNotFound) val = new HTTPError({
167
+ status: 404,
168
+ message: `Cannot find any route matching [${event.req.method}] ${event.url}`
169
+ });
170
+ if (val && val instanceof Error) {
171
+ const isHTTPError = HTTPError.isError(val);
172
+ const error = isHTTPError ? val : new HTTPError(val);
173
+ if (!isHTTPError) {
174
+ error.unhandled = true;
175
+ if (val?.stack) error.stack = val.stack;
176
+ }
177
+ if (error.unhandled && !config.silent) console.error(error);
178
+ const { onError: onError$1 } = config;
179
+ return onError$1 && !nested ? Promise.resolve(onError$1(error, event)).catch((error$1) => error$1).then((newVal) => prepareResponse(newVal ?? val, event, config, true)) : errorResponse(error, config.debug);
180
+ }
181
+ const preparedRes = event[kEventRes];
182
+ const preparedHeaders = preparedRes?.[kEventResHeaders];
183
+ event[kEventRes] = void 0;
184
+ if (!(val instanceof Response)) {
185
+ const res = prepareResponseBody(val, event, config);
186
+ const status = res.status || preparedRes?.status;
187
+ return new NodeResponse(nullBody(event.req.method, status) ? null : res.body, {
188
+ status,
189
+ statusText: res.statusText || preparedRes?.statusText,
190
+ headers: res.headers && preparedHeaders ? mergeHeaders$1(res.headers, preparedHeaders) : res.headers || preparedHeaders
191
+ });
192
+ }
193
+ if (!preparedHeaders || nested || !val.ok) return val;
194
+ try {
195
+ mergeHeaders$1(val.headers, preparedHeaders, val.headers);
196
+ return val;
197
+ } catch {
198
+ return new NodeResponse(nullBody(event.req.method, val.status) ? null : val.body, {
199
+ status: val.status,
200
+ statusText: val.statusText,
201
+ headers: mergeHeaders$1(val.headers, preparedHeaders)
202
+ });
203
+ }
204
+ }
205
+ function mergeHeaders$1(base, overrides, target = new Headers(base)) {
206
+ for (const [name, value] of overrides) if (name === "set-cookie") target.append(name, value);
207
+ else target.set(name, value);
208
+ return target;
209
+ }
210
+ const frozenHeaders = () => {
211
+ throw new Error("Headers are frozen");
212
+ };
213
+ var FrozenHeaders = class extends Headers {
214
+ constructor(init) {
215
+ super(init);
216
+ this.set = this.append = this.delete = frozenHeaders;
217
+ }
218
+ };
219
+ const emptyHeaders = /* @__PURE__ */ new FrozenHeaders({ "content-length": "0" });
220
+ const jsonHeaders = /* @__PURE__ */ new FrozenHeaders({ "content-type": "application/json;charset=UTF-8" });
221
+ function prepareResponseBody(val, event, config) {
222
+ if (val === null || val === void 0) return {
223
+ body: "",
224
+ headers: emptyHeaders
225
+ };
226
+ const valType = typeof val;
227
+ if (valType === "string") return { body: val };
228
+ if (val instanceof Uint8Array) {
229
+ event.res.headers.set("content-length", val.byteLength.toString());
230
+ return { body: val };
231
+ }
232
+ if (val instanceof HTTPResponse || val?.constructor?.name === "HTTPResponse") return val;
233
+ if (isJSONSerializable(val, valType)) return {
234
+ body: JSON.stringify(val, void 0, config.debug ? 2 : void 0),
235
+ headers: jsonHeaders
236
+ };
237
+ if (valType === "bigint") return {
238
+ body: val.toString(),
239
+ headers: jsonHeaders
240
+ };
241
+ if (val instanceof Blob) {
242
+ const headers = new Headers({
243
+ "content-type": val.type,
244
+ "content-length": val.size.toString()
245
+ });
246
+ let filename = val.name;
247
+ if (filename) {
248
+ filename = encodeURIComponent(filename);
249
+ headers.set("content-disposition", `filename="${filename}"; filename*=UTF-8''${filename}`);
250
+ }
251
+ return {
252
+ body: val.stream(),
253
+ headers
254
+ };
255
+ }
256
+ if (valType === "symbol") return { body: val.toString() };
257
+ if (valType === "function") return { body: `${val.name}()` };
258
+ return { body: val };
259
+ }
260
+ function nullBody(method, status) {
261
+ return method === "HEAD" || status === 100 || status === 101 || status === 102 || status === 204 || status === 205 || status === 304;
262
+ }
263
+ function errorResponse(error, debug) {
264
+ return new NodeResponse(JSON.stringify({
265
+ ...error.toJSON(),
266
+ stack: debug && error.stack ? error.stack.split("\n").map((l) => l.trim()) : void 0
267
+ }, void 0, debug ? 2 : void 0), {
268
+ status: error.status,
269
+ statusText: error.statusText,
270
+ headers: error.headers ? mergeHeaders$1(jsonHeaders, error.headers) : new Headers(jsonHeaders)
271
+ });
272
+ }
273
+ function callMiddleware(event, middleware, handler, index = 0) {
274
+ if (index === middleware.length) return handler(event);
275
+ const fn = middleware[index];
276
+ let nextCalled;
277
+ let nextResult;
278
+ const next = () => {
279
+ if (nextCalled) return nextResult;
280
+ nextCalled = true;
281
+ nextResult = callMiddleware(event, middleware, handler, index + 1);
282
+ return nextResult;
283
+ };
284
+ const ret = fn(event, next);
285
+ return isUnhandledResponse(ret) ? next() : typeof ret?.then === "function" ? ret.then((resolved) => isUnhandledResponse(resolved) ? next() : resolved) : ret;
286
+ }
287
+ function isUnhandledResponse(val) {
288
+ return val === void 0 || val === kNotFound;
289
+ }
290
+ function toRequest(input, options) {
291
+ if (typeof input === "string") {
292
+ let url = input;
293
+ if (url[0] === "/") {
294
+ const host = "localhost";
295
+ url = `${"http"}://${host}${url}`;
296
+ }
297
+ return new Request(url, options);
298
+ } else if (input instanceof URL) return new Request(input, options);
299
+ return input;
300
+ }
301
+ function defineHandler(input) {
302
+ if (typeof input === "function") return handlerWithFetch(input);
303
+ const handler = input.handler || (input.fetch ? function _fetchHandler(event) {
304
+ return input.fetch(event.req);
305
+ } : NoHandler);
306
+ return Object.assign(handlerWithFetch(input.middleware?.length ? function _handlerMiddleware(event) {
307
+ return callMiddleware(event, input.middleware, handler);
308
+ } : handler), input);
309
+ }
310
+ function handlerWithFetch(handler) {
311
+ if ("fetch" in handler) return handler;
312
+ return Object.assign(handler, { fetch: (req) => {
313
+ if (typeof req === "string") req = new URL(req, "http://_");
314
+ if (req instanceof URL) req = new Request(req);
315
+ const event = new H3Event(req);
316
+ try {
317
+ return Promise.resolve(toResponse(handler(event), event));
318
+ } catch (error) {
319
+ return Promise.resolve(toResponse(error, event));
320
+ }
321
+ } });
322
+ }
323
+ function defineLazyEventHandler(loader) {
324
+ let handler;
325
+ let promise;
326
+ const resolveLazyHandler = () => {
327
+ if (handler) return Promise.resolve(handler);
328
+ return promise ??= Promise.resolve(loader()).then((r) => {
329
+ handler = toEventHandler(r) || toEventHandler(r.default);
330
+ if (typeof handler !== "function") throw new TypeError("Invalid lazy handler", { cause: { resolved: r } });
331
+ return handler;
332
+ });
333
+ };
334
+ return defineHandler(function lazyHandler(event) {
335
+ return handler ? handler(event) : resolveLazyHandler().then((r) => r(event));
336
+ });
337
+ }
338
+ function toEventHandler(handler) {
339
+ if (typeof handler === "function") return handler;
340
+ if (typeof handler?.handler === "function") return handler.handler;
341
+ if (typeof handler?.fetch === "function") return function _fetchHandler(event) {
342
+ return handler.fetch(event.req);
343
+ };
344
+ }
345
+ const NoHandler = () => kNotFound;
346
+ var H3Core = class {
347
+ config;
348
+ "~middleware";
349
+ "~routes" = [];
350
+ constructor(config = {}) {
351
+ this["~middleware"] = [];
352
+ this.config = config;
353
+ this.fetch = this.fetch.bind(this);
354
+ this.handler = this.handler.bind(this);
355
+ }
356
+ fetch(request) {
357
+ return this["~request"](request);
358
+ }
359
+ handler(event) {
360
+ const route = this["~findRoute"](event);
361
+ if (route) {
362
+ event.context.params = route.params;
363
+ event.context.matchedRoute = route.data;
364
+ }
365
+ const routeHandler = route?.data.handler || NoHandler;
366
+ const middleware = this["~getMiddleware"](event, route);
367
+ return middleware.length > 0 ? callMiddleware(event, middleware, routeHandler) : routeHandler(event);
368
+ }
369
+ "~request"(request, context) {
370
+ const event = new H3Event(request, context, this);
371
+ let handlerRes;
372
+ try {
373
+ if (this.config.onRequest) {
374
+ const hookRes = this.config.onRequest(event);
375
+ handlerRes = typeof hookRes?.then === "function" ? hookRes.then(() => this.handler(event)) : this.handler(event);
376
+ } else handlerRes = this.handler(event);
377
+ } catch (error) {
378
+ handlerRes = Promise.reject(error);
379
+ }
380
+ return toResponse(handlerRes, event, this.config);
381
+ }
382
+ "~findRoute"(_event) {
383
+ }
384
+ "~addRoute"(_route) {
385
+ this["~routes"].push(_route);
386
+ }
387
+ "~getMiddleware"(_event, route) {
388
+ const routeMiddleware = route?.data.middleware;
389
+ const globalMiddleware = this["~middleware"];
390
+ return routeMiddleware ? [...globalMiddleware, ...routeMiddleware] : globalMiddleware;
391
+ }
392
+ };
393
+ new TextEncoder();
394
+ export {
395
+ HTTPError as H,
396
+ defineLazyEventHandler as a,
397
+ H3Core as b,
398
+ toRequest as c,
399
+ defineHandler as d,
400
+ toEventHandler as t
401
+ };