@cabin-id/nextjs 0.2.5 → 1.0.0

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 (301) hide show
  1. package/package.json +1 -1
  2. package/dist/cjs/api/endpoints/AbstractApi.js +0 -38
  3. package/dist/cjs/api/endpoints/AbstractApi.js.map +0 -1
  4. package/dist/cjs/api/endpoints/UserApi.js +0 -40
  5. package/dist/cjs/api/endpoints/UserApi.js.map +0 -1
  6. package/dist/cjs/api/endpoints/index.js +0 -32
  7. package/dist/cjs/api/endpoints/index.js.map +0 -1
  8. package/dist/cjs/api/factory.js +0 -60
  9. package/dist/cjs/api/factory.js.map +0 -1
  10. package/dist/cjs/api/request.js +0 -97
  11. package/dist/cjs/api/request.js.map +0 -1
  12. package/dist/cjs/component.client.js +0 -32
  13. package/dist/cjs/component.client.js.map +0 -1
  14. package/dist/cjs/component.server.js +0 -32
  15. package/dist/cjs/component.server.js.map +0 -1
  16. package/dist/cjs/components/SignInButton.js +0 -67
  17. package/dist/cjs/components/SignInButton.js.map +0 -1
  18. package/dist/cjs/components/index.js +0 -29
  19. package/dist/cjs/components/index.js.map +0 -1
  20. package/dist/cjs/constants.js +0 -122
  21. package/dist/cjs/constants.js.map +0 -1
  22. package/dist/cjs/hooks/createContextAndHook.js +0 -62
  23. package/dist/cjs/hooks/createContextAndHook.js.map +0 -1
  24. package/dist/cjs/hooks/index.js +0 -29
  25. package/dist/cjs/hooks/index.js.map +0 -1
  26. package/dist/cjs/hooks/useSafeLayoutEffect.js +0 -40
  27. package/dist/cjs/hooks/useSafeLayoutEffect.js.map +0 -1
  28. package/dist/cjs/hooks/useUser.js +0 -70
  29. package/dist/cjs/hooks/useUser.js.map +0 -1
  30. package/dist/cjs/icons/logo.js +0 -98
  31. package/dist/cjs/icons/logo.js.map +0 -1
  32. package/dist/cjs/index.js +0 -45
  33. package/dist/cjs/index.js.map +0 -1
  34. package/dist/cjs/package.json +0 -9
  35. package/dist/cjs/provider/context.js +0 -62
  36. package/dist/cjs/provider/context.js.map +0 -1
  37. package/dist/cjs/provider/core.provider.js +0 -49
  38. package/dist/cjs/provider/core.provider.js.map +0 -1
  39. package/dist/cjs/provider/main.provider.js +0 -45
  40. package/dist/cjs/provider/main.provider.js.map +0 -1
  41. package/dist/cjs/server/auth.js +0 -61
  42. package/dist/cjs/server/auth.js.map +0 -1
  43. package/dist/cjs/server/client.js +0 -35
  44. package/dist/cjs/server/client.js.map +0 -1
  45. package/dist/cjs/server/createGetAuth.js +0 -45
  46. package/dist/cjs/server/createGetAuth.js.map +0 -1
  47. package/dist/cjs/server/createRedirect.js +0 -90
  48. package/dist/cjs/server/createRedirect.js.map +0 -1
  49. package/dist/cjs/server/errors.js +0 -110
  50. package/dist/cjs/server/errors.js.map +0 -1
  51. package/dist/cjs/server/getCurrentUser.js +0 -36
  52. package/dist/cjs/server/getCurrentUser.js.map +0 -1
  53. package/dist/cjs/server/index.js +0 -32
  54. package/dist/cjs/server/index.js.map +0 -1
  55. package/dist/cjs/server/middleware.js +0 -185
  56. package/dist/cjs/server/middleware.js.map +0 -1
  57. package/dist/cjs/server/protect.js +0 -69
  58. package/dist/cjs/server/protect.js.map +0 -1
  59. package/dist/cjs/server/routeMatcher.js +0 -42
  60. package/dist/cjs/server/routeMatcher.js.map +0 -1
  61. package/dist/cjs/server/serverRedirectWithAuth.js +0 -39
  62. package/dist/cjs/server/serverRedirectWithAuth.js.map +0 -1
  63. package/dist/cjs/server/type.js +0 -17
  64. package/dist/cjs/server/type.js.map +0 -1
  65. package/dist/cjs/server/utils.js +0 -165
  66. package/dist/cjs/server/utils.js.map +0 -1
  67. package/dist/cjs/styles/global.css +0 -420
  68. package/dist/cjs/styles/global.css.map +0 -1
  69. package/dist/cjs/tokens/authObjects.js +0 -45
  70. package/dist/cjs/tokens/authObjects.js.map +0 -1
  71. package/dist/cjs/tokens/authStatus.js +0 -86
  72. package/dist/cjs/tokens/authStatus.js.map +0 -1
  73. package/dist/cjs/tokens/authenticateContext.js +0 -69
  74. package/dist/cjs/tokens/authenticateContext.js.map +0 -1
  75. package/dist/cjs/tokens/cabinIdRequest.js +0 -79
  76. package/dist/cjs/tokens/cabinIdRequest.js.map +0 -1
  77. package/dist/cjs/tokens/cabinIdUrl.js +0 -36
  78. package/dist/cjs/tokens/cabinIdUrl.js.map +0 -1
  79. package/dist/cjs/tokens/request.js +0 -58
  80. package/dist/cjs/tokens/request.js.map +0 -1
  81. package/dist/cjs/types.js +0 -17
  82. package/dist/cjs/types.js.map +0 -1
  83. package/dist/cjs/utils/assertValidSecretKey.js +0 -35
  84. package/dist/cjs/utils/assertValidSecretKey.js.map +0 -1
  85. package/dist/cjs/utils/createCabinIdClient.js +0 -38
  86. package/dist/cjs/utils/createCabinIdClient.js.map +0 -1
  87. package/dist/cjs/utils/http.js +0 -31
  88. package/dist/cjs/utils/http.js.map +0 -1
  89. package/dist/cjs/utils/initial.js +0 -45
  90. package/dist/cjs/utils/initial.js.map +0 -1
  91. package/dist/cjs/utils/isomorphicAtob.js +0 -36
  92. package/dist/cjs/utils/isomorphicAtob.js.map +0 -1
  93. package/dist/cjs/utils/isomorphicBtoa.js +0 -36
  94. package/dist/cjs/utils/isomorphicBtoa.js.map +0 -1
  95. package/dist/cjs/utils/key.js +0 -49
  96. package/dist/cjs/utils/key.js.map +0 -1
  97. package/dist/cjs/utils/path.js +0 -33
  98. package/dist/cjs/utils/path.js.map +0 -1
  99. package/dist/cjs/utils/response.js +0 -76
  100. package/dist/cjs/utils/response.js.map +0 -1
  101. package/dist/cjs/utils.js +0 -52
  102. package/dist/cjs/utils.js.map +0 -1
  103. package/dist/esm/api/endpoints/AbstractApi.js +0 -14
  104. package/dist/esm/api/endpoints/AbstractApi.js.map +0 -1
  105. package/dist/esm/api/endpoints/UserApi.js +0 -16
  106. package/dist/esm/api/endpoints/UserApi.js.map +0 -1
  107. package/dist/esm/api/endpoints/index.js +0 -7
  108. package/dist/esm/api/endpoints/index.js.map +0 -1
  109. package/dist/esm/api/factory.js +0 -35
  110. package/dist/esm/api/factory.js.map +0 -1
  111. package/dist/esm/api/request.js +0 -63
  112. package/dist/esm/api/request.js.map +0 -1
  113. package/dist/esm/component.client.js +0 -7
  114. package/dist/esm/component.client.js.map +0 -1
  115. package/dist/esm/component.server.js +0 -7
  116. package/dist/esm/component.server.js.map +0 -1
  117. package/dist/esm/components/SignInButton.js +0 -33
  118. package/dist/esm/components/SignInButton.js.map +0 -1
  119. package/dist/esm/components/index.js +0 -5
  120. package/dist/esm/components/index.js.map +0 -1
  121. package/dist/esm/constants.js +0 -88
  122. package/dist/esm/constants.js.map +0 -1
  123. package/dist/esm/hooks/createContextAndHook.js +0 -27
  124. package/dist/esm/hooks/createContextAndHook.js.map +0 -1
  125. package/dist/esm/hooks/index.js +0 -5
  126. package/dist/esm/hooks/index.js.map +0 -1
  127. package/dist/esm/hooks/useSafeLayoutEffect.js +0 -6
  128. package/dist/esm/hooks/useSafeLayoutEffect.js.map +0 -1
  129. package/dist/esm/hooks/useUser.js +0 -54
  130. package/dist/esm/hooks/useUser.js.map +0 -1
  131. package/dist/esm/icons/logo.js +0 -64
  132. package/dist/esm/icons/logo.js.map +0 -1
  133. package/dist/esm/index.js +0 -16
  134. package/dist/esm/index.js.map +0 -1
  135. package/dist/esm/package.json +0 -9
  136. package/dist/esm/provider/context.js +0 -24
  137. package/dist/esm/provider/context.js.map +0 -1
  138. package/dist/esm/provider/core.provider.js +0 -15
  139. package/dist/esm/provider/core.provider.js.map +0 -1
  140. package/dist/esm/provider/main.provider.js +0 -11
  141. package/dist/esm/provider/main.provider.js.map +0 -1
  142. package/dist/esm/server/auth.js +0 -37
  143. package/dist/esm/server/auth.js.map +0 -1
  144. package/dist/esm/server/client.js +0 -11
  145. package/dist/esm/server/client.js.map +0 -1
  146. package/dist/esm/server/createGetAuth.js +0 -23
  147. package/dist/esm/server/createGetAuth.js.map +0 -1
  148. package/dist/esm/server/createRedirect.js +0 -66
  149. package/dist/esm/server/createRedirect.js.map +0 -1
  150. package/dist/esm/server/errors.js +0 -78
  151. package/dist/esm/server/errors.js.map +0 -1
  152. package/dist/esm/server/getCurrentUser.js +0 -12
  153. package/dist/esm/server/getCurrentUser.js.map +0 -1
  154. package/dist/esm/server/index.js +0 -7
  155. package/dist/esm/server/index.js.map +0 -1
  156. package/dist/esm/server/middleware.js +0 -167
  157. package/dist/esm/server/middleware.js.map +0 -1
  158. package/dist/esm/server/protect.js +0 -45
  159. package/dist/esm/server/protect.js.map +0 -1
  160. package/dist/esm/server/routeMatcher.js +0 -18
  161. package/dist/esm/server/routeMatcher.js.map +0 -1
  162. package/dist/esm/server/serverRedirectWithAuth.js +0 -15
  163. package/dist/esm/server/serverRedirectWithAuth.js.map +0 -1
  164. package/dist/esm/server/type.js +0 -1
  165. package/dist/esm/server/type.js.map +0 -1
  166. package/dist/esm/server/utils.js +0 -132
  167. package/dist/esm/server/utils.js.map +0 -1
  168. package/dist/esm/styles/global.css +0 -420
  169. package/dist/esm/styles/global.css.map +0 -1
  170. package/dist/esm/tokens/authObjects.js +0 -20
  171. package/dist/esm/tokens/authObjects.js.map +0 -1
  172. package/dist/esm/tokens/authStatus.js +0 -59
  173. package/dist/esm/tokens/authStatus.js.map +0 -1
  174. package/dist/esm/tokens/authenticateContext.js +0 -45
  175. package/dist/esm/tokens/authenticateContext.js.map +0 -1
  176. package/dist/esm/tokens/cabinIdRequest.js +0 -55
  177. package/dist/esm/tokens/cabinIdRequest.js.map +0 -1
  178. package/dist/esm/tokens/cabinIdUrl.js +0 -12
  179. package/dist/esm/tokens/cabinIdUrl.js.map +0 -1
  180. package/dist/esm/tokens/request.js +0 -34
  181. package/dist/esm/tokens/request.js.map +0 -1
  182. package/dist/esm/types.js +0 -1
  183. package/dist/esm/types.js.map +0 -1
  184. package/dist/esm/utils/assertValidSecretKey.js +0 -11
  185. package/dist/esm/utils/assertValidSecretKey.js.map +0 -1
  186. package/dist/esm/utils/createCabinIdClient.js +0 -17
  187. package/dist/esm/utils/createCabinIdClient.js.map +0 -1
  188. package/dist/esm/utils/http.js +0 -7
  189. package/dist/esm/utils/http.js.map +0 -1
  190. package/dist/esm/utils/initial.js +0 -21
  191. package/dist/esm/utils/initial.js.map +0 -1
  192. package/dist/esm/utils/isomorphicAtob.js +0 -12
  193. package/dist/esm/utils/isomorphicAtob.js.map +0 -1
  194. package/dist/esm/utils/isomorphicBtoa.js +0 -12
  195. package/dist/esm/utils/isomorphicBtoa.js.map +0 -1
  196. package/dist/esm/utils/key.js +0 -24
  197. package/dist/esm/utils/key.js.map +0 -1
  198. package/dist/esm/utils/path.js +0 -9
  199. package/dist/esm/utils/path.js.map +0 -1
  200. package/dist/esm/utils/response.js +0 -49
  201. package/dist/esm/utils/response.js.map +0 -1
  202. package/dist/esm/utils.js +0 -27
  203. package/dist/esm/utils.js.map +0 -1
  204. package/dist/types/api/endpoints/AbstractApi.d.ts +0 -7
  205. package/dist/types/api/endpoints/AbstractApi.d.ts.map +0 -1
  206. package/dist/types/api/endpoints/UserApi.d.ts +0 -6
  207. package/dist/types/api/endpoints/UserApi.d.ts.map +0 -1
  208. package/dist/types/api/endpoints/index.d.ts +0 -3
  209. package/dist/types/api/endpoints/index.d.ts.map +0 -1
  210. package/dist/types/api/factory.d.ts +0 -35
  211. package/dist/types/api/factory.d.ts.map +0 -1
  212. package/dist/types/api/request.d.ts +0 -33
  213. package/dist/types/api/request.d.ts.map +0 -1
  214. package/dist/types/component.client.d.ts +0 -3
  215. package/dist/types/component.client.d.ts.map +0 -1
  216. package/dist/types/component.server.d.ts +0 -3
  217. package/dist/types/component.server.d.ts.map +0 -1
  218. package/dist/types/components/SignInButton.d.ts +0 -3
  219. package/dist/types/components/SignInButton.d.ts.map +0 -1
  220. package/dist/types/components/index.d.ts +0 -2
  221. package/dist/types/components/index.d.ts.map +0 -1
  222. package/dist/types/constants.d.ts +0 -69
  223. package/dist/types/constants.d.ts.map +0 -1
  224. package/dist/types/hooks/createContextAndHook.d.ts +0 -18
  225. package/dist/types/hooks/createContextAndHook.d.ts.map +0 -1
  226. package/dist/types/hooks/index.d.ts +0 -2
  227. package/dist/types/hooks/index.d.ts.map +0 -1
  228. package/dist/types/hooks/useSafeLayoutEffect.d.ts +0 -3
  229. package/dist/types/hooks/useSafeLayoutEffect.d.ts.map +0 -1
  230. package/dist/types/hooks/useUser.d.ts +0 -36
  231. package/dist/types/hooks/useUser.d.ts.map +0 -1
  232. package/dist/types/icons/logo.d.ts +0 -3
  233. package/dist/types/icons/logo.d.ts.map +0 -1
  234. package/dist/types/index.d.ts +0 -8
  235. package/dist/types/index.d.ts.map +0 -1
  236. package/dist/types/provider/context.d.ts +0 -15
  237. package/dist/types/provider/context.d.ts.map +0 -1
  238. package/dist/types/provider/core.provider.d.ts +0 -6
  239. package/dist/types/provider/core.provider.d.ts.map +0 -1
  240. package/dist/types/provider/main.provider.d.ts +0 -5
  241. package/dist/types/provider/main.provider.d.ts.map +0 -1
  242. package/dist/types/server/auth.d.ts +0 -11
  243. package/dist/types/server/auth.d.ts.map +0 -1
  244. package/dist/types/server/client.d.ts +0 -3
  245. package/dist/types/server/client.d.ts.map +0 -1
  246. package/dist/types/server/createGetAuth.d.ts +0 -5
  247. package/dist/types/server/createGetAuth.d.ts.map +0 -1
  248. package/dist/types/server/createRedirect.d.ts +0 -21
  249. package/dist/types/server/createRedirect.d.ts.map +0 -1
  250. package/dist/types/server/errors.d.ts +0 -10
  251. package/dist/types/server/errors.d.ts.map +0 -1
  252. package/dist/types/server/getCurrentUser.d.ts +0 -3
  253. package/dist/types/server/getCurrentUser.d.ts.map +0 -1
  254. package/dist/types/server/index.d.ts +0 -3
  255. package/dist/types/server/index.d.ts.map +0 -1
  256. package/dist/types/server/middleware.d.ts +0 -33
  257. package/dist/types/server/middleware.d.ts.map +0 -1
  258. package/dist/types/server/protect.d.ts +0 -34
  259. package/dist/types/server/protect.d.ts.map +0 -1
  260. package/dist/types/server/routeMatcher.d.ts +0 -10
  261. package/dist/types/server/routeMatcher.d.ts.map +0 -1
  262. package/dist/types/server/serverRedirectWithAuth.d.ts +0 -3
  263. package/dist/types/server/serverRedirectWithAuth.d.ts.map +0 -1
  264. package/dist/types/server/type.d.ts +0 -14
  265. package/dist/types/server/type.d.ts.map +0 -1
  266. package/dist/types/server/utils.d.ts +0 -17
  267. package/dist/types/server/utils.d.ts.map +0 -1
  268. package/dist/types/tokens/authObjects.d.ts +0 -37
  269. package/dist/types/tokens/authObjects.d.ts.map +0 -1
  270. package/dist/types/tokens/authStatus.d.ts +0 -51
  271. package/dist/types/tokens/authStatus.d.ts.map +0 -1
  272. package/dist/types/tokens/authenticateContext.d.ts +0 -40
  273. package/dist/types/tokens/authenticateContext.d.ts.map +0 -1
  274. package/dist/types/tokens/cabinIdRequest.d.ts +0 -24
  275. package/dist/types/tokens/cabinIdRequest.d.ts.map +0 -1
  276. package/dist/types/tokens/cabinIdUrl.d.ts +0 -18
  277. package/dist/types/tokens/cabinIdUrl.d.ts.map +0 -1
  278. package/dist/types/tokens/request.d.ts +0 -4
  279. package/dist/types/tokens/request.d.ts.map +0 -1
  280. package/dist/types/types.d.ts +0 -34
  281. package/dist/types/types.d.ts.map +0 -1
  282. package/dist/types/utils/assertValidSecretKey.d.ts +0 -2
  283. package/dist/types/utils/assertValidSecretKey.d.ts.map +0 -1
  284. package/dist/types/utils/createCabinIdClient.d.ts +0 -5
  285. package/dist/types/utils/createCabinIdClient.d.ts.map +0 -1
  286. package/dist/types/utils/http.d.ts +0 -4
  287. package/dist/types/utils/http.d.ts.map +0 -1
  288. package/dist/types/utils/initial.d.ts +0 -5
  289. package/dist/types/utils/initial.d.ts.map +0 -1
  290. package/dist/types/utils/isomorphicAtob.d.ts +0 -6
  291. package/dist/types/utils/isomorphicAtob.d.ts.map +0 -1
  292. package/dist/types/utils/isomorphicBtoa.d.ts +0 -2
  293. package/dist/types/utils/isomorphicBtoa.d.ts.map +0 -1
  294. package/dist/types/utils/key.d.ts +0 -5
  295. package/dist/types/utils/key.d.ts.map +0 -1
  296. package/dist/types/utils/path.d.ts +0 -4
  297. package/dist/types/utils/path.d.ts.map +0 -1
  298. package/dist/types/utils/response.d.ts +0 -13
  299. package/dist/types/utils/response.d.ts.map +0 -1
  300. package/dist/types/utils.d.ts +0 -5
  301. package/dist/types/utils.d.ts.map +0 -1
@@ -1,18 +0,0 @@
1
- import { paths } from "../utils";
2
- const createRouteMatcher = (routes) => {
3
- if (typeof routes === "function") {
4
- return (req) => routes(req);
5
- }
6
- const routePatterns = [routes || ""].flat().filter(Boolean);
7
- const matchers = precomputePathRegex(routePatterns);
8
- return (req) => matchers.some((matcher) => matcher.test(req.nextUrl.pathname));
9
- };
10
- const precomputePathRegex = (patterns) => {
11
- return patterns.map(
12
- (pattern) => pattern instanceof RegExp ? pattern : paths.toRegexp(pattern)
13
- );
14
- };
15
- export {
16
- createRouteMatcher
17
- };
18
- //# sourceMappingURL=routeMatcher.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/server/routeMatcher.ts"],"sourcesContent":["import type Link from 'next/link';\nimport type { NextRequest } from 'next/server';\nimport type { Autocomplete } from '../types';\nimport { paths } from '../utils';\n\ntype WithPathPatternWildcard<T> = `${T & string}(.*)`;\ntype NextTypedRoute<T = Parameters<typeof Link>['0']['href']> = T extends string\n ? T\n : never;\n\ntype RouteMatcherWithNextTypedRoutes = Autocomplete<\n WithPathPatternWildcard<NextTypedRoute> | NextTypedRoute\n>;\n\nexport type RouteMatcherParam =\n | Array<RegExp | RouteMatcherWithNextTypedRoutes>\n | RegExp\n | RouteMatcherWithNextTypedRoutes\n | ((req: NextRequest) => boolean);\n\nexport const createRouteMatcher = (routes: RouteMatcherParam) => {\n if (typeof routes === 'function') {\n return (req: NextRequest) => routes(req);\n }\n const routePatterns = [routes || ''].flat().filter(Boolean);\n const matchers = precomputePathRegex(routePatterns);\n return (req: NextRequest) =>\n matchers.some((matcher) => matcher.test(req.nextUrl.pathname));\n};\n\nconst precomputePathRegex = (patterns: Array<string | RegExp>) => {\n return patterns.map((pattern) =>\n pattern instanceof RegExp ? pattern : paths.toRegexp(pattern)\n );\n};\n"],"mappings":"AAGA,SAAS,aAAa;AAiBf,MAAM,qBAAqB,CAAC,WAA8B;AAC/D,MAAI,OAAO,WAAW,YAAY;AAChC,WAAO,CAAC,QAAqB,OAAO,GAAG;AAAA,EACzC;AACA,QAAM,gBAAgB,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,OAAO,OAAO;AAC1D,QAAM,WAAW,oBAAoB,aAAa;AAClD,SAAO,CAAC,QACN,SAAS,KAAK,CAAC,YAAY,QAAQ,KAAK,IAAI,QAAQ,QAAQ,CAAC;AACjE;AAEA,MAAM,sBAAsB,CAAC,aAAqC;AAChE,SAAO,SAAS;AAAA,IAAI,CAAC,YACnB,mBAAmB,SAAS,UAAU,MAAM,SAAS,OAAO;AAAA,EAC9D;AACF;","names":[]}
@@ -1,15 +0,0 @@
1
- import { NextResponse } from "next/server";
2
- import { constants } from "../constants";
3
- const serverRedirectWithAuth = (cabinIdRequest, res) => {
4
- const location = res.headers.get("location");
5
- const shouldAppendDevBrowser = res.headers.get(constants.Headers.CabinIdRedirectTo) === "true";
6
- if (shouldAppendDevBrowser && !!location && cabinIdRequest.cabinIdUrl.isCrossOrigin(location)) {
7
- const url = new URL(location);
8
- return NextResponse.redirect(url.href, res);
9
- }
10
- return res;
11
- };
12
- export {
13
- serverRedirectWithAuth
14
- };
15
- //# sourceMappingURL=serverRedirectWithAuth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/server/serverRedirectWithAuth.ts"],"sourcesContent":["import { NextResponse } from 'next/server';\nimport { constants } from '../constants';\nimport { CabinIdRequest } from 'src/tokens/cabinIdRequest';\n\nexport const serverRedirectWithAuth = (\n cabinIdRequest: CabinIdRequest,\n res: Response\n) => {\n const location = res.headers.get('location');\n const shouldAppendDevBrowser =\n res.headers.get(constants.Headers.CabinIdRedirectTo) === 'true';\n\n if (\n shouldAppendDevBrowser &&\n !!location &&\n cabinIdRequest.cabinIdUrl.isCrossOrigin(location)\n ) {\n const url = new URL(location);\n return NextResponse.redirect(url.href, res);\n }\n return res;\n};\n"],"mappings":"AAAA,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAGnB,MAAM,yBAAyB,CACpC,gBACA,QACG;AACH,QAAM,WAAW,IAAI,QAAQ,IAAI,UAAU;AAC3C,QAAM,yBACJ,IAAI,QAAQ,IAAI,UAAU,QAAQ,iBAAiB,MAAM;AAE3D,MACE,0BACA,CAAC,CAAC,YACF,eAAe,WAAW,cAAc,QAAQ,GAChD;AACA,UAAM,MAAM,IAAI,IAAI,QAAQ;AAC5B,WAAO,aAAa,SAAS,IAAI,MAAM,GAAG;AAAA,EAC5C;AACA,SAAO;AACT;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,132 +0,0 @@
1
- import { NextResponse, NextRequest } from "next/server";
2
- import { constants } from "../constants";
3
- function assertKey(key, onError) {
4
- if (!key) {
5
- onError();
6
- }
7
- return key;
8
- }
9
- const apiEndpointUnauthorizedNextResponse = () => {
10
- return NextResponse.json(null, { status: 401, statusText: "Unauthorized" });
11
- };
12
- const redirectAdapter = (url) => {
13
- return NextResponse.redirect(url, {
14
- headers: { [constants.Headers.CabinIdRedirectTo]: "true" }
15
- });
16
- };
17
- const OVERRIDE_HEADERS = "x-middleware-override-headers";
18
- const MIDDLEWARE_HEADER_PREFIX = "x-middleware-request";
19
- const setRequestHeadersOnNextResponse = (res, req, newHeaders) => {
20
- if (!res.headers.get(OVERRIDE_HEADERS)) {
21
- res.headers.set(OVERRIDE_HEADERS, [...req.headers.keys()]);
22
- req.headers.forEach((val, key) => {
23
- res.headers.set(`${MIDDLEWARE_HEADER_PREFIX}-${key}`, val);
24
- });
25
- }
26
- Object.entries(newHeaders).forEach(([key, val]) => {
27
- res.headers.set(
28
- OVERRIDE_HEADERS,
29
- `${res.headers.get(OVERRIDE_HEADERS)},${key}`
30
- );
31
- res.headers.set(`${MIDDLEWARE_HEADER_PREFIX}-${key}`, val);
32
- });
33
- };
34
- function createTokenSignature(token, key) {
35
- return `${token}${key}`;
36
- }
37
- function decorateRequest(req, res, requestState, secretKey) {
38
- const { token } = requestState;
39
- if (!res) {
40
- res = NextResponse.next();
41
- }
42
- if (res.headers.get(constants.NextHeaders.NextRedirect)) {
43
- return res;
44
- }
45
- let rewriteURL;
46
- if (res.headers.get(constants.NextHeaders.NextResume) === "1") {
47
- res.headers.delete(constants.NextHeaders.NextResume);
48
- rewriteURL = new URL(req.url);
49
- }
50
- const rewriteURLHeader = res.headers.get(constants.NextHeaders.NextRewrite);
51
- if (rewriteURLHeader) {
52
- const reqURL = new URL(req.url);
53
- rewriteURL = new URL(rewriteURLHeader);
54
- if (rewriteURL.origin !== reqURL.origin) {
55
- return res;
56
- }
57
- }
58
- if (rewriteURL) {
59
- setRequestHeadersOnNextResponse(res, req, {
60
- [constants.Headers.AuthToken]: token || "",
61
- [constants.Headers.AuthSignature]: token ? createTokenSignature(token, secretKey) : ""
62
- });
63
- const origin = rewriteURL == null ? void 0 : rewriteURL.origin;
64
- const pathName = rewriteURL == null ? void 0 : rewriteURL.pathname;
65
- res.headers.set(
66
- constants.NextHeaders.NextRewrite,
67
- `${origin}${pathName || ""}`
68
- );
69
- }
70
- return res;
71
- }
72
- const buildRequestLike = () => {
73
- try {
74
- const { headers } = require("next/headers");
75
- return new NextRequest("https://placeholder.com", { headers: headers() });
76
- } catch (e) {
77
- if (e && "message" in e && typeof e.message === "string" && (e.message.toLowerCase().includes("Dynamic server usage".toLowerCase()) || e.message.toLowerCase().includes(
78
- "This page needs to bail out of prerendering".toLowerCase()
79
- ))) {
80
- throw e;
81
- }
82
- throw new Error(
83
- `CabinID: auth() and currentUser() are only supported in App Router (/app directory).
84
- If you're using /pages, try getAuth() instead.
85
- Original error: ${e}`
86
- );
87
- }
88
- };
89
- function getCustomAttributeFromRequest(req, key) {
90
- return key in req ? req[key] : void 0;
91
- }
92
- function getAuthKeyFromRequest(req, key) {
93
- return getCustomAttributeFromRequest(req, constants.Attributes[key]) || getHeader(req, constants.Headers[key]);
94
- }
95
- function getHeader(req, name) {
96
- var _a, _b;
97
- if (isNextRequest(req)) {
98
- return req.headers.get(name);
99
- }
100
- return req.headers[name] || req.headers[name.toLowerCase()] || ((_b = (_a = req.socket) == null ? void 0 : _a._httpMessage) == null ? void 0 : _b.getHeader(name));
101
- }
102
- function isNextRequest(val) {
103
- try {
104
- const { headers, nextUrl, cookies } = val || {};
105
- return typeof (headers == null ? void 0 : headers.get) === "function" && typeof (nextUrl == null ? void 0 : nextUrl.searchParams.get) === "function" && typeof (cookies == null ? void 0 : cookies.get) === "function";
106
- } catch (e) {
107
- return false;
108
- }
109
- }
110
- function getCookie(req, name) {
111
- if (isNextRequest(req)) {
112
- const reqCookieOrString = req.cookies.get(name);
113
- if (!reqCookieOrString) {
114
- return void 0;
115
- }
116
- return typeof reqCookieOrString === "string" ? reqCookieOrString : reqCookieOrString.value;
117
- }
118
- return req.cookies[name];
119
- }
120
- export {
121
- apiEndpointUnauthorizedNextResponse,
122
- assertKey,
123
- buildRequestLike,
124
- decorateRequest,
125
- getAuthKeyFromRequest,
126
- getCookie,
127
- getCustomAttributeFromRequest,
128
- getHeader,
129
- redirectAdapter,
130
- setRequestHeadersOnNextResponse
131
- };
132
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/server/utils.ts"],"sourcesContent":["import { NextResponse, NextRequest } from 'next/server';\nimport { constants } from '../constants';\nimport { CabinIdRequest } from '../tokens/cabinIdRequest';\nimport { RequestLike } from './type';\n\nexport function assertKey(key: string, onError: () => never): string {\n if (!key) {\n onError();\n }\n\n return key;\n}\n\nexport const apiEndpointUnauthorizedNextResponse = () => {\n return NextResponse.json(null, { status: 401, statusText: 'Unauthorized' });\n};\n\nexport const redirectAdapter = (url: string | URL) => {\n return NextResponse.redirect(url, {\n headers: { [constants.Headers.CabinIdRedirectTo]: 'true' },\n });\n};\n\nconst OVERRIDE_HEADERS = 'x-middleware-override-headers';\nconst MIDDLEWARE_HEADER_PREFIX = 'x-middleware-request' as string;\n\nexport const setRequestHeadersOnNextResponse = (\n res: NextResponse | Response,\n req: Request,\n newHeaders: Record<string, string>\n) => {\n if (!res.headers.get(OVERRIDE_HEADERS)) {\n // Emulate a user setting overrides by explicitly adding the required nextjs headers\n // https://github.com/vercel/next.js/pull/41380\n // @ts-expect-error\n res.headers.set(OVERRIDE_HEADERS, [...req.headers.keys()]);\n req.headers.forEach((val, key) => {\n res.headers.set(`${MIDDLEWARE_HEADER_PREFIX}-${key}`, val);\n });\n }\n\n // Now that we have normalised res to include overrides, just append the new header\n Object.entries(newHeaders).forEach(([key, val]) => {\n res.headers.set(\n OVERRIDE_HEADERS,\n `${res.headers.get(OVERRIDE_HEADERS)},${key}`\n );\n res.headers.set(`${MIDDLEWARE_HEADER_PREFIX}-${key}`, val);\n });\n};\n\n/**\n * Compute a cryptographic signature from a session token and provided secret key. Used to validate that the token has not been modified when transferring between middleware and the Next.js origin.\n */\nfunction createTokenSignature(token: string, key: string): string {\n return `${token}${key}`;\n}\n\ntype RequestState = any;\n\n// Auth result will be set as both a query param & header when applicable\nexport function decorateRequest(\n req: CabinIdRequest,\n res: Response,\n requestState: RequestState,\n secretKey: string\n): Response {\n const { token } = requestState;\n\n // pass-through case, convert to next()\n if (!res) {\n res = NextResponse.next();\n }\n\n // redirect() case, return early\n if (res.headers.get(constants.NextHeaders.NextRedirect)) {\n return res;\n }\n\n let rewriteURL;\n\n // next() case, convert to a rewrite\n if (res.headers.get(constants.NextHeaders.NextResume) === '1') {\n res.headers.delete(constants.NextHeaders.NextResume);\n rewriteURL = new URL(req.url);\n }\n\n // rewrite() case, set auth result only if origin remains the same\n const rewriteURLHeader = res.headers.get(constants.NextHeaders.NextRewrite);\n\n if (rewriteURLHeader) {\n const reqURL = new URL(req.url);\n rewriteURL = new URL(rewriteURLHeader);\n\n // if the origin has changed, return early\n if (rewriteURL.origin !== reqURL.origin) {\n return res;\n }\n }\n\n if (rewriteURL) {\n setRequestHeadersOnNextResponse(res, req, {\n [constants.Headers.AuthToken]: token || '',\n [constants.Headers.AuthSignature]: token\n ? createTokenSignature(token, secretKey)\n : '',\n });\n const origin = rewriteURL?.origin;\n const pathName = rewriteURL?.pathname;\n\n res.headers.set(\n constants.NextHeaders.NextRewrite,\n `${origin}${pathName || ''}`\n );\n }\n return res;\n}\n\nexport const buildRequestLike = () => {\n try {\n // Dynamically import next/headers, otherwise Next12 apps will break\n // because next/headers was introduced in next@13\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { headers } = require('next/headers');\n return new NextRequest('https://placeholder.com', { headers: headers() });\n } catch (e: any) {\n if (\n e &&\n 'message' in e &&\n typeof e.message === 'string' &&\n (e.message.toLowerCase().includes('Dynamic server usage'.toLowerCase()) ||\n e.message\n .toLowerCase()\n .includes(\n 'This page needs to bail out of prerendering'.toLowerCase()\n ))\n ) {\n throw e;\n }\n\n throw new Error(\n `CabinID: auth() and currentUser() are only supported in App Router (/app directory).\\nIf you're using /pages, try getAuth() instead.\\nOriginal error: ${e}`\n );\n }\n};\n\nexport function getCustomAttributeFromRequest(\n req: RequestLike,\n key: string\n): string | null | undefined {\n // @ts-expect-error - TS doesn't like indexing into RequestLike\n return key in req ? req[key] : undefined;\n}\n\nexport function getAuthKeyFromRequest(\n req: RequestLike,\n key: keyof typeof constants.Attributes\n): string | null | undefined {\n return (\n getCustomAttributeFromRequest(req, constants.Attributes[key]) ||\n getHeader(req, constants.Headers[key])\n );\n}\n\nexport function getHeader(\n req: RequestLike,\n name: string\n): string | null | undefined {\n if (isNextRequest(req)) {\n return req.headers.get(name);\n }\n\n // If no header has been determined for IncomingMessage case, check if available within private `socket` headers\n // When deployed to vercel, req.headers for API routes is a `IncomingHttpHeaders` key-val object which does not follow\n // the Headers spec so the name is no longer case-insensitive.\n return (\n req.headers[name] ||\n req.headers[name.toLowerCase()] ||\n (req.socket as any)?._httpMessage?.getHeader(name)\n );\n}\n\nfunction isNextRequest(val: unknown): val is NextRequest {\n try {\n const { headers, nextUrl, cookies } = (val || {}) as NextRequest;\n return (\n typeof headers?.get === 'function' &&\n typeof nextUrl?.searchParams.get === 'function' &&\n typeof cookies?.get === 'function'\n );\n } catch (e) {\n return false;\n }\n}\n\nexport function getCookie(req: RequestLike, name: string): string | undefined {\n if (isNextRequest(req)) {\n // Nextjs broke semver in the 13.0.0 -> 13.0.1 release, so even though\n // this should be RequestCookie in all updated apps. In order to support apps\n // using v13.0.0 still, we explicitly add the string type\n // https://github.com/vercel/next.js/pull/41526\n const reqCookieOrString = req.cookies.get(name) as\n | ReturnType<NextRequest['cookies']['get']>\n | string\n | undefined;\n if (!reqCookieOrString) {\n return undefined;\n }\n return typeof reqCookieOrString === 'string'\n ? reqCookieOrString\n : reqCookieOrString.value;\n }\n return req.cookies[name];\n}\n"],"mappings":"AAAA,SAAS,cAAc,mBAAmB;AAC1C,SAAS,iBAAiB;AAInB,SAAS,UAAU,KAAa,SAA8B;AACnE,MAAI,CAAC,KAAK;AACR,YAAQ;AAAA,EACV;AAEA,SAAO;AACT;AAEO,MAAM,sCAAsC,MAAM;AACvD,SAAO,aAAa,KAAK,MAAM,EAAE,QAAQ,KAAK,YAAY,eAAe,CAAC;AAC5E;AAEO,MAAM,kBAAkB,CAAC,QAAsB;AACpD,SAAO,aAAa,SAAS,KAAK;AAAA,IAChC,SAAS,EAAE,CAAC,UAAU,QAAQ,iBAAiB,GAAG,OAAO;AAAA,EAC3D,CAAC;AACH;AAEA,MAAM,mBAAmB;AACzB,MAAM,2BAA2B;AAE1B,MAAM,kCAAkC,CAC7C,KACA,KACA,eACG;AACH,MAAI,CAAC,IAAI,QAAQ,IAAI,gBAAgB,GAAG;AAItC,QAAI,QAAQ,IAAI,kBAAkB,CAAC,GAAG,IAAI,QAAQ,KAAK,CAAC,CAAC;AACzD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S,SAAQ,cACxB,QAAO,mCAAS,aAAa,SAAQ,cACrC,QAAO,mCAAS,SAAQ;AAAA,EAE5B,SAAS,GAAG;AACV,WAAO;AAAA,EACT;AACF;AAEO,SAAS,UAAU,KAAkB,MAAkC;AAC5E,MAAI,cAAc,GAAG,GAAG;AAKtB,UAAM,oBAAoB,IAAI,QAAQ,IAAI,IAAI;AAI9C,QAAI,CAAC,mBAAmB;AACtB,aAAO;AAAA,IACT;AACA,WAAO,OAAO,sBAAsB,WAChC,oBACA,kBAAkB;AAAA,EACxB;AACA,SAAO,IAAI,QAAQ,IAAI;AACzB;","names":[]}
@@ -1,420 +0,0 @@
1
- *,
2
- ::before,
3
- ::after {
4
- box-sizing: border-box;
5
- border-width: 0;
6
- border-style: solid;
7
- border-color: #e5e7eb;
8
- }
9
- ::before,
10
- ::after {
11
- --tw-content: "";
12
- }
13
- html,
14
- :host {
15
- line-height: 1.5;
16
- -webkit-text-size-adjust: 100%;
17
- -moz-tab-size: 4;
18
- -o-tab-size: 4;
19
- tab-size: 4;
20
- font-family:
21
- ui-sans-serif,
22
- system-ui,
23
- sans-serif,
24
- "Apple Color Emoji",
25
- "Segoe UI Emoji",
26
- "Segoe UI Symbol",
27
- "Noto Color Emoji";
28
- font-feature-settings: normal;
29
- font-variation-settings: normal;
30
- -webkit-tap-highlight-color: transparent;
31
- }
32
- body {
33
- margin: 0;
34
- line-height: inherit;
35
- }
36
- hr {
37
- height: 0;
38
- color: inherit;
39
- border-top-width: 1px;
40
- }
41
- abbr:where([title]) {
42
- -webkit-text-decoration: underline dotted;
43
- text-decoration: underline dotted;
44
- }
45
- h1,
46
- h2,
47
- h3,
48
- h4,
49
- h5,
50
- h6 {
51
- font-size: inherit;
52
- font-weight: inherit;
53
- }
54
- a {
55
- color: inherit;
56
- text-decoration: inherit;
57
- }
58
- b,
59
- strong {
60
- font-weight: bolder;
61
- }
62
- code,
63
- kbd,
64
- samp,
65
- pre {
66
- font-family:
67
- ui-monospace,
68
- SFMono-Regular,
69
- Menlo,
70
- Monaco,
71
- Consolas,
72
- "Liberation Mono",
73
- "Courier New",
74
- monospace;
75
- font-feature-settings: normal;
76
- font-variation-settings: normal;
77
- font-size: 1em;
78
- }
79
- small {
80
- font-size: 80%;
81
- }
82
- sub,
83
- sup {
84
- font-size: 75%;
85
- line-height: 0;
86
- position: relative;
87
- vertical-align: baseline;
88
- }
89
- sub {
90
- bottom: -0.25em;
91
- }
92
- sup {
93
- top: -0.5em;
94
- }
95
- table {
96
- text-indent: 0;
97
- border-color: inherit;
98
- border-collapse: collapse;
99
- }
100
- button,
101
- input,
102
- optgroup,
103
- select,
104
- textarea {
105
- font-family: inherit;
106
- font-feature-settings: inherit;
107
- font-variation-settings: inherit;
108
- font-size: 100%;
109
- font-weight: inherit;
110
- line-height: inherit;
111
- letter-spacing: inherit;
112
- color: inherit;
113
- margin: 0;
114
- padding: 0;
115
- }
116
- button,
117
- select {
118
- text-transform: none;
119
- }
120
- button,
121
- input:where([type=button]),
122
- input:where([type=reset]),
123
- input:where([type=submit]) {
124
- -webkit-appearance: button;
125
- background-color: transparent;
126
- background-image: none;
127
- }
128
- :-moz-focusring {
129
- outline: auto;
130
- }
131
- :-moz-ui-invalid {
132
- box-shadow: none;
133
- }
134
- progress {
135
- vertical-align: baseline;
136
- }
137
- ::-webkit-inner-spin-button,
138
- ::-webkit-outer-spin-button {
139
- height: auto;
140
- }
141
- [type=search] {
142
- -webkit-appearance: textfield;
143
- outline-offset: -2px;
144
- }
145
- ::-webkit-search-decoration {
146
- -webkit-appearance: none;
147
- }
148
- ::-webkit-file-upload-button {
149
- -webkit-appearance: button;
150
- font: inherit;
151
- }
152
- summary {
153
- display: list-item;
154
- }
155
- blockquote,
156
- dl,
157
- dd,
158
- h1,
159
- h2,
160
- h3,
161
- h4,
162
- h5,
163
- h6,
164
- hr,
165
- figure,
166
- p,
167
- pre {
168
- margin: 0;
169
- }
170
- fieldset {
171
- margin: 0;
172
- padding: 0;
173
- }
174
- legend {
175
- padding: 0;
176
- }
177
- ol,
178
- ul,
179
- menu {
180
- list-style: none;
181
- margin: 0;
182
- padding: 0;
183
- }
184
- dialog {
185
- padding: 0;
186
- }
187
- textarea {
188
- resize: vertical;
189
- }
190
- input::-moz-placeholder,
191
- textarea::-moz-placeholder {
192
- opacity: 1;
193
- color: #9ca3af;
194
- }
195
- input::placeholder,
196
- textarea::placeholder {
197
- opacity: 1;
198
- color: #9ca3af;
199
- }
200
- button,
201
- [role=button] {
202
- cursor: pointer;
203
- }
204
- :disabled {
205
- cursor: default;
206
- }
207
- img,
208
- svg,
209
- video,
210
- canvas,
211
- audio,
212
- iframe,
213
- embed,
214
- object {
215
- display: block;
216
- vertical-align: middle;
217
- }
218
- img,
219
- video {
220
- max-width: 100%;
221
- height: auto;
222
- }
223
- [hidden] {
224
- display: none;
225
- }
226
- *,
227
- ::before,
228
- ::after {
229
- --tw-border-spacing-x: 0;
230
- --tw-border-spacing-y: 0;
231
- --tw-translate-x: 0;
232
- --tw-translate-y: 0;
233
- --tw-rotate: 0;
234
- --tw-skew-x: 0;
235
- --tw-skew-y: 0;
236
- --tw-scale-x: 1;
237
- --tw-scale-y: 1;
238
- --tw-pan-x: ;
239
- --tw-pan-y: ;
240
- --tw-pinch-zoom: ;
241
- --tw-scroll-snap-strictness: proximity;
242
- --tw-gradient-from-position: ;
243
- --tw-gradient-via-position: ;
244
- --tw-gradient-to-position: ;
245
- --tw-ordinal: ;
246
- --tw-slashed-zero: ;
247
- --tw-numeric-figure: ;
248
- --tw-numeric-spacing: ;
249
- --tw-numeric-fraction: ;
250
- --tw-ring-inset: ;
251
- --tw-ring-offset-width: 0px;
252
- --tw-ring-offset-color: #fff;
253
- --tw-ring-color: rgb(59 130 246 / 0.5);
254
- --tw-ring-offset-shadow: 0 0 #0000;
255
- --tw-ring-shadow: 0 0 #0000;
256
- --tw-shadow: 0 0 #0000;
257
- --tw-shadow-colored: 0 0 #0000;
258
- --tw-blur: ;
259
- --tw-brightness: ;
260
- --tw-contrast: ;
261
- --tw-grayscale: ;
262
- --tw-hue-rotate: ;
263
- --tw-invert: ;
264
- --tw-saturate: ;
265
- --tw-sepia: ;
266
- --tw-drop-shadow: ;
267
- --tw-backdrop-blur: ;
268
- --tw-backdrop-brightness: ;
269
- --tw-backdrop-contrast: ;
270
- --tw-backdrop-grayscale: ;
271
- --tw-backdrop-hue-rotate: ;
272
- --tw-backdrop-invert: ;
273
- --tw-backdrop-opacity: ;
274
- --tw-backdrop-saturate: ;
275
- --tw-backdrop-sepia: ;
276
- --tw-contain-size: ;
277
- --tw-contain-layout: ;
278
- --tw-contain-paint: ;
279
- --tw-contain-style: ;
280
- }
281
- ::backdrop {
282
- --tw-border-spacing-x: 0;
283
- --tw-border-spacing-y: 0;
284
- --tw-translate-x: 0;
285
- --tw-translate-y: 0;
286
- --tw-rotate: 0;
287
- --tw-skew-x: 0;
288
- --tw-skew-y: 0;
289
- --tw-scale-x: 1;
290
- --tw-scale-y: 1;
291
- --tw-pan-x: ;
292
- --tw-pan-y: ;
293
- --tw-pinch-zoom: ;
294
- --tw-scroll-snap-strictness: proximity;
295
- --tw-gradient-from-position: ;
296
- --tw-gradient-via-position: ;
297
- --tw-gradient-to-position: ;
298
- --tw-ordinal: ;
299
- --tw-slashed-zero: ;
300
- --tw-numeric-figure: ;
301
- --tw-numeric-spacing: ;
302
- --tw-numeric-fraction: ;
303
- --tw-ring-inset: ;
304
- --tw-ring-offset-width: 0px;
305
- --tw-ring-offset-color: #fff;
306
- --tw-ring-color: rgb(59 130 246 / 0.5);
307
- --tw-ring-offset-shadow: 0 0 #0000;
308
- --tw-ring-shadow: 0 0 #0000;
309
- --tw-shadow: 0 0 #0000;
310
- --tw-shadow-colored: 0 0 #0000;
311
- --tw-blur: ;
312
- --tw-brightness: ;
313
- --tw-contrast: ;
314
- --tw-grayscale: ;
315
- --tw-hue-rotate: ;
316
- --tw-invert: ;
317
- --tw-saturate: ;
318
- --tw-sepia: ;
319
- --tw-drop-shadow: ;
320
- --tw-backdrop-blur: ;
321
- --tw-backdrop-brightness: ;
322
- --tw-backdrop-contrast: ;
323
- --tw-backdrop-grayscale: ;
324
- --tw-backdrop-hue-rotate: ;
325
- --tw-backdrop-invert: ;
326
- --tw-backdrop-opacity: ;
327
- --tw-backdrop-saturate: ;
328
- --tw-backdrop-sepia: ;
329
- --tw-contain-size: ;
330
- --tw-contain-layout: ;
331
- --tw-contain-paint: ;
332
- --tw-contain-style: ;
333
- }
334
- .container {
335
- width: 100%;
336
- }
337
- @media (min-width: 640px) {
338
- .container {
339
- max-width: 640px;
340
- }
341
- }
342
- @media (min-width: 768px) {
343
- .container {
344
- max-width: 768px;
345
- }
346
- }
347
- @media (min-width: 1024px) {
348
- .container {
349
- max-width: 1024px;
350
- }
351
- }
352
- @media (min-width: 1280px) {
353
- .container {
354
- max-width: 1280px;
355
- }
356
- }
357
- @media (min-width: 1536px) {
358
- .container {
359
- max-width: 1536px;
360
- }
361
- }
362
- .fixed {
363
- position: fixed;
364
- }
365
- .absolute {
366
- position: absolute;
367
- }
368
- .flex {
369
- display: flex;
370
- }
371
- .max-w-48 {
372
- max-width: 12rem;
373
- }
374
- .flex-row {
375
- flex-direction: row;
376
- }
377
- .items-center {
378
- align-items: center;
379
- }
380
- .space-x-2 > :not([hidden]) ~ :not([hidden]) {
381
- --tw-space-x-reverse: 0;
382
- margin-right: calc(0.5rem * var(--tw-space-x-reverse));
383
- margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
384
- }
385
- .rounded-full {
386
- border-radius: 9999px;
387
- }
388
- .bg-blue-600 {
389
- --tw-bg-opacity: 1;
390
- background-color: rgb(37 99 235 / var(--tw-bg-opacity));
391
- }
392
- .py-2 {
393
- padding-top: 0.5rem;
394
- padding-bottom: 0.5rem;
395
- }
396
- .pl-2 {
397
- padding-left: 0.5rem;
398
- }
399
- .pr-4 {
400
- padding-right: 1rem;
401
- }
402
- .text-sm {
403
- font-size: 0.875rem;
404
- line-height: 1.25rem;
405
- }
406
- .text-white {
407
- --tw-text-opacity: 1;
408
- color: rgb(255 255 255 / var(--tw-text-opacity));
409
- }
410
- .filter {
411
- filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
412
- }
413
- .hover\:opacity-90:hover {
414
- opacity: 0.9;
415
- }
416
- .active\:bg-blue-700:active {
417
- --tw-bg-opacity: 1;
418
- background-color: rgb(29 78 216 / var(--tw-bg-opacity));
419
- }
420
- /*# sourceMappingURL=global.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/styles/global.css"],"sourcesContent":["/*\n! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.flex {\n display: flex;\n}\n.max-w-48 {\n max-width: 12rem;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity));\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}\n.active\\:bg-blue-700:active {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity));\n}\n"],"mappings":"AAOA;AACA;AACA;AACE,cAAY;AACZ,gBAAc;AACd,gBAAc;AACd,gBAAc;AAChB;AAEA;AACA;AACE,gBAAc;AAChB;AAYA;AACA;AACE,eAAa;AACb,4BAA0B;AAC1B,iBAAe;AACf,eAAa;AACV,YAAU;AACb;AAAA,IAAa,aAAa;AAAA,IAAE,SAAS;AAAA,IAAE,UAAU;AAAA,IAAE,mBAAmB;AAAA,IAAE,gBAAgB;AAAA,IAAE,iBAAiB;AAAA,IAAE;AAC7G,yBAAuB;AACvB,2BAAyB;AACzB,+BAA6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;AACA;AACA;AACA;AACA;AACA;AACA;AACE,UAAQ;AACV;AAEA;AACE,UAAQ;AACR,WAAS;AACX;AAEA;AACE,WAAS;AACX;AAEA;AACA;AACA;AACE,cAAY;AACZ,UAAQ;AACR,WAAS;AACX;AAKA;AACE,WAAS;AACX;AAMA;AACE,UAAQ;AACV;AAOA,KAAK;AAAoB,QAAQ;AAC/B,WAAS;AACT,SAAO;AACT;AAEA,KAAK;AACL,QAAQ;AACN,WAAS;AACT,SAAO;AACT;AAMA;AACA,CAAC;AACC,UAAQ;AACV;AAKA;AACE,UAAQ;AACV;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE,WAAS;AACT,kBAAgB;AAClB;AAMA;AACA;AACE,aAAW;AACX,UAAQ;AACV;AAGA,CAAC;AACC,WAAS;AACX;AAEA;AAAG;AAAU;AACX,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAEA;AACE,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,I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,IAAI,EAAE,IAAI;AAC/B;AACA,CAAC;AACC,UAAQ,IAAI,WAAW,IAAI,iBAAiB,IAAI,eAAe,IAAI,gBAAgB,IAAI,iBAAiB,IAAI,aAAa,IAAI,eAAe,IAAI,YAAY,IAAI;AAClK;AACA,CAAC,iBAAiB;AAChB,WAAS;AACX;AACA,CAAC,mBAAmB;AAClB,mBAAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI;AACxC;","names":[]}
@@ -1,20 +0,0 @@
1
- function signedInAuthObject({
2
- userId,
3
- sessionToken
4
- }) {
5
- return {
6
- userId,
7
- sessionToken
8
- };
9
- }
10
- function signedOutAuthObject() {
11
- return {
12
- userId: null,
13
- sessionToken: null
14
- };
15
- }
16
- export {
17
- signedInAuthObject,
18
- signedOutAuthObject
19
- };
20
- //# sourceMappingURL=authObjects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/tokens/authObjects.ts"],"sourcesContent":["import { CreateBackendApiOptions } from '../api/factory';\n\n/**\n * @internal\n */\nexport type SignedInAuthObjectOptions = CreateBackendApiOptions & {\n token: string;\n};\n\n/**\n * @internal\n */\nexport type SignedInAuthObject = {\n userId: string;\n sessionToken: string;\n};\n\n/**\n * @internal\n */\nexport type SignedOutAuthObject = {\n userId: null;\n sessionToken: null;\n};\n\n/**\n * @internal\n */\nexport type AuthObject = SignedInAuthObject | SignedOutAuthObject;\n\n/**\n * @internal\n */\nexport function signedInAuthObject({\n userId,\n sessionToken,\n}: {\n userId: string;\n sessionToken: string;\n}): SignedInAuthObject {\n return {\n userId,\n sessionToken,\n };\n}\n\n/**\n * @internal\n */\nexport function signedOutAuthObject(): SignedOutAuthObject {\n return {\n userId: null,\n sessionToken: null,\n };\n}\n"],"mappings":"AAiCO,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AACF,GAGuB;AACrB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;AAKO,SAAS,sBAA2C;AACzD,SAAO;AAAA,IACL,QAAQ;AAAA,IACR,cAAc;AAAA,EAChB;AACF;","names":[]}