@axium/server 0.26.0 → 0.26.2
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.
- package/dist/api/acl.js +2 -4
- package/dist/cli.js +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.js +5 -1
- package/dist/internal_requests.js +1 -1
- package/package.json +2 -3
- package/build/client/_app/immutable/assets/account.dAAx7bby.css +0 -1
- package/build/client/_app/immutable/assets/account.dAAx7bby.css.br +0 -0
- package/build/client/_app/immutable/assets/account.dAAx7bby.css.gz +0 -0
- package/build/client/_app/immutable/assets/list.DVGH0BeP.css +0 -1
- package/build/client/_app/immutable/assets/list.DVGH0BeP.css.br +0 -0
- package/build/client/_app/immutable/assets/list.DVGH0BeP.css.gz +0 -0
- package/build/client/_app/immutable/assets/styles.D8SZ-PeY.css +0 -1
- package/build/client/_app/immutable/assets/styles.D8SZ-PeY.css.br +0 -2
- package/build/client/_app/immutable/assets/styles.D8SZ-PeY.css.gz +0 -0
- package/build/client/_app/immutable/chunks/46qGscyh.js +0 -2
- package/build/client/_app/immutable/chunks/46qGscyh.js.br +0 -0
- package/build/client/_app/immutable/chunks/46qGscyh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B2Vkpbkw.js +0 -2
- package/build/client/_app/immutable/chunks/B2Vkpbkw.js.br +0 -0
- package/build/client/_app/immutable/chunks/B2Vkpbkw.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BKixenYx.js +0 -1
- package/build/client/_app/immutable/chunks/BKixenYx.js.br +0 -0
- package/build/client/_app/immutable/chunks/BKixenYx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BLtAtlP3.js +0 -1
- package/build/client/_app/immutable/chunks/BLtAtlP3.js.br +0 -2
- package/build/client/_app/immutable/chunks/BLtAtlP3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BNTlty5m.js +0 -1
- package/build/client/_app/immutable/chunks/BNTlty5m.js.br +0 -0
- package/build/client/_app/immutable/chunks/BNTlty5m.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Beh6Ec8J.js +0 -1
- package/build/client/_app/immutable/chunks/Beh6Ec8J.js.br +0 -0
- package/build/client/_app/immutable/chunks/Beh6Ec8J.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BrUe-Qen.js +0 -1
- package/build/client/_app/immutable/chunks/BrUe-Qen.js.br +0 -0
- package/build/client/_app/immutable/chunks/BrUe-Qen.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bs4cD_pX.js +0 -1
- package/build/client/_app/immutable/chunks/Bs4cD_pX.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bs4cD_pX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C62F-tXu.js +0 -1
- package/build/client/_app/immutable/chunks/C62F-tXu.js.br +0 -1
- package/build/client/_app/immutable/chunks/C62F-tXu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CUBtP2L9.js +0 -23
- package/build/client/_app/immutable/chunks/CUBtP2L9.js.br +0 -0
- package/build/client/_app/immutable/chunks/CUBtP2L9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Ch16TNvP.js +0 -1
- package/build/client/_app/immutable/chunks/Ch16TNvP.js.br +0 -0
- package/build/client/_app/immutable/chunks/Ch16TNvP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CoYD6HNm.js +0 -1
- package/build/client/_app/immutable/chunks/CoYD6HNm.js.br +0 -0
- package/build/client/_app/immutable/chunks/CoYD6HNm.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D40Zn55h.js +0 -1
- package/build/client/_app/immutable/chunks/D40Zn55h.js.br +0 -0
- package/build/client/_app/immutable/chunks/D40Zn55h.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DW7-1esk.js +0 -21
- package/build/client/_app/immutable/chunks/DW7-1esk.js.br +0 -0
- package/build/client/_app/immutable/chunks/DW7-1esk.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DY4fWHx_.js +0 -1
- package/build/client/_app/immutable/chunks/DY4fWHx_.js.br +0 -0
- package/build/client/_app/immutable/chunks/DY4fWHx_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DvOBbqVY.js +0 -1
- package/build/client/_app/immutable/chunks/DvOBbqVY.js.br +0 -0
- package/build/client/_app/immutable/chunks/DvOBbqVY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DwZYWemd.js +0 -1
- package/build/client/_app/immutable/chunks/DwZYWemd.js.br +0 -0
- package/build/client/_app/immutable/chunks/DwZYWemd.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dy2Ho0cF.js +0 -1
- package/build/client/_app/immutable/chunks/Dy2Ho0cF.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dy2Ho0cF.js.gz +0 -0
- package/build/client/_app/immutable/chunks/FTv0qR3w.js +0 -1
- package/build/client/_app/immutable/chunks/FTv0qR3w.js.br +0 -0
- package/build/client/_app/immutable/chunks/FTv0qR3w.js.gz +0 -0
- package/build/client/_app/immutable/chunks/NeK0YGoY.js +0 -1
- package/build/client/_app/immutable/chunks/NeK0YGoY.js.br +0 -0
- package/build/client/_app/immutable/chunks/NeK0YGoY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/aArGsq9c.js +0 -1
- package/build/client/_app/immutable/chunks/aArGsq9c.js.br +0 -0
- package/build/client/_app/immutable/chunks/aArGsq9c.js.gz +0 -0
- package/build/client/_app/immutable/chunks/lH47zGKU.js +0 -1
- package/build/client/_app/immutable/chunks/lH47zGKU.js.br +0 -0
- package/build/client/_app/immutable/chunks/lH47zGKU.js.gz +0 -0
- package/build/client/_app/immutable/chunks/sMHjBQqw.js +0 -1
- package/build/client/_app/immutable/chunks/sMHjBQqw.js.br +0 -0
- package/build/client/_app/immutable/chunks/sMHjBQqw.js.gz +0 -0
- package/build/client/_app/immutable/chunks/vQfHcJV6.js +0 -2
- package/build/client/_app/immutable/chunks/vQfHcJV6.js.br +0 -0
- package/build/client/_app/immutable/chunks/vQfHcJV6.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.pLVZKpSD.js +0 -2
- package/build/client/_app/immutable/entry/app.pLVZKpSD.js.br +0 -0
- package/build/client/_app/immutable/entry/app.pLVZKpSD.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.CUaVsIrY.js +0 -1
- package/build/client/_app/immutable/entry/start.CUaVsIrY.js.br +0 -2
- package/build/client/_app/immutable/entry/start.CUaVsIrY.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.D7hET-Bq.js +0 -1
- package/build/client/_app/immutable/nodes/0.D7hET-Bq.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.D7hET-Bq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.BWU-JJm_.js +0 -1
- package/build/client/_app/immutable/nodes/1.BWU-JJm_.js.br +0 -2
- package/build/client/_app/immutable/nodes/1.BWU-JJm_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.C5N2XBee.js +0 -1
- package/build/client/_app/immutable/nodes/10.C5N2XBee.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.C5N2XBee.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.CerbuSAv.js +0 -1
- package/build/client/_app/immutable/nodes/11.CerbuSAv.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.CerbuSAv.js.gz +0 -0
- package/build/client/_app/immutable/nodes/12.Z4B9zS78.js +0 -1
- package/build/client/_app/immutable/nodes/12.Z4B9zS78.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.Z4B9zS78.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.CuICShck.js +0 -1
- package/build/client/_app/immutable/nodes/13.CuICShck.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.CuICShck.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.BSEF5oaF.js +0 -1
- package/build/client/_app/immutable/nodes/14.BSEF5oaF.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.BSEF5oaF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.D1nsmo6j.js +0 -1
- package/build/client/_app/immutable/nodes/15.D1nsmo6j.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.D1nsmo6j.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DQ1JcYgz.js +0 -1
- package/build/client/_app/immutable/nodes/2.DQ1JcYgz.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DQ1JcYgz.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.BJp2JEtW.js +0 -1
- package/build/client/_app/immutable/nodes/3.BJp2JEtW.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.BJp2JEtW.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.Cvn_QsIx.js +0 -1
- package/build/client/_app/immutable/nodes/4.Cvn_QsIx.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.Cvn_QsIx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.DgPP9GX3.js +0 -1
- package/build/client/_app/immutable/nodes/5.DgPP9GX3.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.DgPP9GX3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.DKIzms8i.js +0 -2
- package/build/client/_app/immutable/nodes/6.DKIzms8i.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.DKIzms8i.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.3UigVXV4.js +0 -1
- package/build/client/_app/immutable/nodes/7.3UigVXV4.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.3UigVXV4.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.B8s2TdNQ.js +0 -1
- package/build/client/_app/immutable/nodes/8.B8s2TdNQ.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.B8s2TdNQ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.LBMMe2kc.js +0 -1
- package/build/client/_app/immutable/nodes/9.LBMMe2kc.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.LBMMe2kc.js.gz +0 -0
- package/build/client/_app/version.json +0 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/client/icons/brands.svg +0 -1493
- package/build/client/icons/brands.svg.br +0 -0
- package/build/client/icons/brands.svg.gz +0 -0
- package/build/client/icons/light.svg +0 -9977
- package/build/client/icons/light.svg.br +0 -0
- package/build/client/icons/light.svg.gz +0 -0
- package/build/client/icons/regular.svg +0 -9977
- package/build/client/icons/regular.svg.br +0 -0
- package/build/client/icons/regular.svg.gz +0 -0
- package/build/client/icons/solid.svg +0 -9977
- package/build/client/icons/solid.svg.br +0 -0
- package/build/client/icons/solid.svg.gz +0 -0
- package/build/client/styles.css +0 -168
- package/build/client/styles.css.br +0 -0
- package/build/client/styles.css.gz +0 -0
- package/build/client/theme.css +0 -42
- package/build/client/theme.css.br +0 -0
- package/build/client/theme.css.gz +0 -0
- package/build/env.js +0 -45
- package/build/handler.js +0 -1390
- package/build/index.js +0 -334
- package/build/server/chunks/0-CNbALTKz.js +0 -9
- package/build/server/chunks/0-CNbALTKz.js.map +0 -1
- package/build/server/chunks/1-Dgxy393u.js +0 -9
- package/build/server/chunks/1-Dgxy393u.js.map +0 -1
- package/build/server/chunks/10-DovmbqKa.js +0 -14
- package/build/server/chunks/10-DovmbqKa.js.map +0 -1
- package/build/server/chunks/11-CRK_ubcl.js +0 -14
- package/build/server/chunks/11-CRK_ubcl.js.map +0 -1
- package/build/server/chunks/12-SbQlwMfe.js +0 -9
- package/build/server/chunks/12-SbQlwMfe.js.map +0 -1
- package/build/server/chunks/13-CbniIW7F.js +0 -14
- package/build/server/chunks/13-CbniIW7F.js.map +0 -1
- package/build/server/chunks/14-D9Vb_8Yx.js +0 -9
- package/build/server/chunks/14-D9Vb_8Yx.js.map +0 -1
- package/build/server/chunks/15-D-75Hdef.js +0 -9
- package/build/server/chunks/15-D-75Hdef.js.map +0 -1
- package/build/server/chunks/2-57exN8ae.js +0 -14
- package/build/server/chunks/2-57exN8ae.js.map +0 -1
- package/build/server/chunks/3-DNQft-pY.js +0 -9
- package/build/server/chunks/3-DNQft-pY.js.map +0 -1
- package/build/server/chunks/4-D9Bwp-f8.js +0 -14
- package/build/server/chunks/4-D9Bwp-f8.js.map +0 -1
- package/build/server/chunks/5-COEQwZNP.js +0 -14
- package/build/server/chunks/5-COEQwZNP.js.map +0 -1
- package/build/server/chunks/6-RT4yiDcP.js +0 -14
- package/build/server/chunks/6-RT4yiDcP.js.map +0 -1
- package/build/server/chunks/7-CVqF_r5D.js +0 -14
- package/build/server/chunks/7-CVqF_r5D.js.map +0 -1
- package/build/server/chunks/8-C5SO-sVH.js +0 -14
- package/build/server/chunks/8-C5SO-sVH.js.map +0 -1
- package/build/server/chunks/9-DoCOKtY-.js +0 -14
- package/build/server/chunks/9-DoCOKtY-.js.map +0 -1
- package/build/server/chunks/FormDialog-ZCY0chY1.js +0 -102
- package/build/server/chunks/FormDialog-ZCY0chY1.js.map +0 -1
- package/build/server/chunks/Icon-BVo9qbDf.js +0 -30
- package/build/server/chunks/Icon-BVo9qbDf.js.map +0 -1
- package/build/server/chunks/Logout-CmBZgu0j.js +0 -46
- package/build/server/chunks/Logout-CmBZgu0j.js.map +0 -1
- package/build/server/chunks/_layout.svelte-DuS006VZ.js +0 -33
- package/build/server/chunks/_layout.svelte-DuS006VZ.js.map +0 -1
- package/build/server/chunks/_page.svelte-BFVobcI7.js +0 -14
- package/build/server/chunks/_page.svelte-BFVobcI7.js.map +0 -1
- package/build/server/chunks/_page.svelte-B_cvhWJS.js +0 -66
- package/build/server/chunks/_page.svelte-B_cvhWJS.js.map +0 -1
- package/build/server/chunks/_page.svelte-BriaBR9l.js +0 -28
- package/build/server/chunks/_page.svelte-BriaBR9l.js.map +0 -1
- package/build/server/chunks/_page.svelte-BtQQzT7H.js +0 -72
- package/build/server/chunks/_page.svelte-BtQQzT7H.js.map +0 -1
- package/build/server/chunks/_page.svelte-C8D3c3yB.js +0 -64
- package/build/server/chunks/_page.svelte-C8D3c3yB.js.map +0 -1
- package/build/server/chunks/_page.svelte-CVSb9eHQ.js +0 -24
- package/build/server/chunks/_page.svelte-CVSb9eHQ.js.map +0 -1
- package/build/server/chunks/_page.svelte-CwRjZqL7.js +0 -107
- package/build/server/chunks/_page.svelte-CwRjZqL7.js.map +0 -1
- package/build/server/chunks/_page.svelte-D9A9RYjx.js +0 -233
- package/build/server/chunks/_page.svelte-D9A9RYjx.js.map +0 -1
- package/build/server/chunks/_page.svelte-DGhwqWMM.js +0 -34
- package/build/server/chunks/_page.svelte-DGhwqWMM.js.map +0 -1
- package/build/server/chunks/_page.svelte-DTvnX95_.js +0 -75
- package/build/server/chunks/_page.svelte-DTvnX95_.js.map +0 -1
- package/build/server/chunks/_page.svelte-DUfwpXfC.js +0 -122
- package/build/server/chunks/_page.svelte-DUfwpXfC.js.map +0 -1
- package/build/server/chunks/_page.svelte-DxDoD3rZ.js +0 -37
- package/build/server/chunks/_page.svelte-DxDoD3rZ.js.map +0 -1
- package/build/server/chunks/_page.svelte-VDBvShZ8.js +0 -6
- package/build/server/chunks/_page.svelte-VDBvShZ8.js.map +0 -1
- package/build/server/chunks/account-Bf_llRe2.js +0 -446
- package/build/server/chunks/account-Bf_llRe2.js.map +0 -1
- package/build/server/chunks/auth_redirect-olBYiIF2.js +0 -24
- package/build/server/chunks/auth_redirect-olBYiIF2.js.map +0 -1
- package/build/server/chunks/color-K_MR7m8s.js +0 -14
- package/build/server/chunks/color-K_MR7m8s.js.map +0 -1
- package/build/server/chunks/context-R2425nfV.js +0 -64
- package/build/server/chunks/context-R2425nfV.js.map +0 -1
- package/build/server/chunks/error.svelte-CkSCwrMJ.js +0 -47
- package/build/server/chunks/error.svelte-CkSCwrMJ.js.map +0 -1
- package/build/server/chunks/index-CIEcmmdN.js +0 -890
- package/build/server/chunks/index-CIEcmmdN.js.map +0 -1
- package/build/server/chunks/index-Tt4zVDIZ.js +0 -5345
- package/build/server/chunks/index-Tt4zVDIZ.js.map +0 -1
- package/build/server/chunks/layout.svelte-UxsTmhKc.js +0 -8
- package/build/server/chunks/layout.svelte-UxsTmhKc.js.map +0 -1
- package/build/server/chunks/numbers-DL8C9q4W.js +0 -354
- package/build/server/chunks/numbers-DL8C9q4W.js.map +0 -1
- package/build/server/chunks/user2-CRfK67II.js +0 -716
- package/build/server/chunks/user2-CRfK67II.js.map +0 -1
- package/build/server/chunks/utils-h74ns7K6.js +0 -286
- package/build/server/chunks/utils-h74ns7K6.js.map +0 -1
- package/build/server/index.js +0 -8115
- package/build/server/index.js.map +0 -1
- package/build/server/manifest.js +0 -143
- package/build/server/manifest.js.map +0 -1
- package/build/shims.js +0 -32
package/dist/api/acl.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Permission } from '@axium/core/access';
|
|
1
2
|
import * as z from 'zod';
|
|
2
3
|
import * as acl from '../acl.js';
|
|
3
4
|
import { parseBody, withError } from '../requests.js';
|
|
@@ -11,10 +12,7 @@ addRoute({
|
|
|
11
12
|
async PUT(request, params) {
|
|
12
13
|
const type = params.itemType;
|
|
13
14
|
const itemId = params.itemId;
|
|
14
|
-
const data = await parseBody(request, z.object({
|
|
15
|
-
userId: z.uuid(),
|
|
16
|
-
permission: z.number().int().min(0).max(5),
|
|
17
|
-
}));
|
|
15
|
+
const data = await parseBody(request, z.object({ userId: z.uuid(), permission: Permission }));
|
|
18
16
|
const share = await acl.createEntry(type, { ...data, itemId }).catch(withError('Failed to create access control'));
|
|
19
17
|
return share;
|
|
20
18
|
},
|
package/dist/cli.js
CHANGED
|
@@ -544,7 +544,7 @@ try {
|
|
|
544
544
|
secure: opt.ssl ? true : config.web.secure,
|
|
545
545
|
ssl_cert: opt.ssl ? join(opt.ssl, 'cert.pem') : config.web.ssl_cert,
|
|
546
546
|
ssl_key: opt.ssl ? join(opt.ssl, 'key.pem') : config.web.ssl_key,
|
|
547
|
-
build: opt.build ? resolve(opt.build) :
|
|
547
|
+
build: opt.build ? resolve(opt.build) : config.web.build,
|
|
548
548
|
});
|
|
549
549
|
const port = !Number.isNaN(Number.parseInt(opt.port ?? '')) ? Number.parseInt(opt.port) : config.web.port;
|
|
550
550
|
server.listen(port, () => {
|
package/dist/config.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
51
51
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
52
52
|
ssl_key: z.ZodOptional<z.ZodString>;
|
|
53
53
|
ssl_cert: z.ZodOptional<z.ZodString>;
|
|
54
|
+
build: z.ZodOptional<z.ZodString>;
|
|
54
55
|
}, z.core.$loose>>;
|
|
55
56
|
}, z.core.$loose>;
|
|
56
57
|
export interface Config extends z.infer<typeof ConfigSchema> {
|
|
@@ -124,6 +125,7 @@ export declare const FileSchema: z.ZodObject<{
|
|
|
124
125
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
125
126
|
ssl_key: z.ZodOptional<z.ZodString>;
|
|
126
127
|
ssl_cert: z.ZodOptional<z.ZodString>;
|
|
128
|
+
build: z.ZodOptional<z.ZodString>;
|
|
127
129
|
}, z.core.$loose>>>;
|
|
128
130
|
}, z.core.$loose>;
|
|
129
131
|
export interface File extends z.infer<typeof FileSchema> {
|
package/dist/config.js
CHANGED
|
@@ -73,6 +73,7 @@ export const ConfigSchema = z
|
|
|
73
73
|
secure: z.boolean(),
|
|
74
74
|
ssl_key: z.string(),
|
|
75
75
|
ssl_cert: z.string(),
|
|
76
|
+
build: z.string(),
|
|
76
77
|
})
|
|
77
78
|
.partial(),
|
|
78
79
|
})
|
|
@@ -131,6 +132,7 @@ export const defaultConfig = {
|
|
|
131
132
|
secure: true,
|
|
132
133
|
ssl_key: resolve(dirs[0], 'ssl_key.pem'),
|
|
133
134
|
ssl_cert: resolve(dirs[0], 'ssl_cert.pem'),
|
|
135
|
+
build: '../build/handler.js',
|
|
134
136
|
},
|
|
135
137
|
};
|
|
136
138
|
const configShortcuts = {
|
|
@@ -197,7 +199,7 @@ export async function loadConfig(path, options = {}) {
|
|
|
197
199
|
try {
|
|
198
200
|
writeFileSync(path, '{}');
|
|
199
201
|
}
|
|
200
|
-
catch {
|
|
202
|
+
catch (e) {
|
|
201
203
|
io.warn('Failed to create the main configuration file (/etc/axium/config.json): ' + e.message);
|
|
202
204
|
return;
|
|
203
205
|
}
|
|
@@ -212,6 +214,8 @@ export async function loadConfig(path, options = {}) {
|
|
|
212
214
|
let file;
|
|
213
215
|
try {
|
|
214
216
|
file = FileSchema.parse(json);
|
|
217
|
+
if (file.web?.build)
|
|
218
|
+
file.web.build = resolve(dirname(path), file.web.build);
|
|
215
219
|
}
|
|
216
220
|
catch (e) {
|
|
217
221
|
if (!options.loose)
|
|
@@ -90,7 +90,7 @@ export async function convertFromResponse(res, response) {
|
|
|
90
90
|
res.off('close', cancel);
|
|
91
91
|
res.off('error', cancel);
|
|
92
92
|
// If the reader has already been interrupted with an error earlier,
|
|
93
|
-
// then it will appear here, it is useless, but it needs to be
|
|
93
|
+
// then it will appear here, it is useless, but it needs to be caught.
|
|
94
94
|
reader.cancel(error).catch(() => { });
|
|
95
95
|
if (error)
|
|
96
96
|
res.destroy(error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axium/server",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"author": "James Prevett <axium@jamespre.dev>",
|
|
5
5
|
"funding": {
|
|
6
6
|
"type": "individual",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"assets",
|
|
32
|
-
"build",
|
|
33
32
|
"dist",
|
|
34
33
|
"routes",
|
|
35
34
|
"svelte.config.js",
|
|
@@ -47,7 +46,7 @@
|
|
|
47
46
|
},
|
|
48
47
|
"peerDependencies": {
|
|
49
48
|
"@axium/client": ">=0.6.0",
|
|
50
|
-
"@axium/core": ">=0.
|
|
49
|
+
"@axium/core": ">=0.10.0",
|
|
51
50
|
"kysely": "^0.28.0",
|
|
52
51
|
"utilium": "^2.3.8",
|
|
53
52
|
"zod": "^4.0.5"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.section{width:50%;padding-top:4em}.section .item{display:grid;align-items:center;width:100%;gap:1em;text-wrap:nowrap;border-top:1px solid #8888;padding-bottom:1em}.info{grid-template-columns:10em 1fr 2em}.info>:first-child{margin-left:1em}.info>:nth-child(2){text-overflow:ellipsis;overflow:hidden}.passkey{grid-template-columns:1em 1em 1fr 1fr 1em 1em}.passkey dfn:not(.disabled){cursor:help}.session{grid-template-columns:1fr 1fr 1fr 1em}.session .current{border-radius:2em;padding:0 .5em;background-color:#337}.session .elevated{border-radius:2em;padding:0 .5em;background-color:#733}
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.list-container{overflow-x:hidden;overflow-y:scroll}.list-container .list{height:100%}.list{display:flex;flex-direction:column;padding:.5em}.list-header{font-weight:700;border-bottom:1.5px solid var(--fg-accent);position:sticky;top:0}.list-item-container{text-decoration:none;color:inherit}.list-item{display:grid;grid-template-columns:1em 4fr 15em 5em repeat(3,1em);align-items:center;gap:1em;padding:.5em;overflow:hidden;text-wrap:nowrap}.list-item:not(.list-header,:first-child){border-top:1px solid var(--fg-accent)}.list-item:not(.list-header):hover{background-color:var(--bg-alt);cursor:pointer}p.list-empty{text-align:center;color:#888;margin-top:1em;font-style:italic}.list-item .action{visibility:hidden}.list-item:hover .action{visibility:visible;cursor:pointer}
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.severity--emergency{background-color:red;color:#fff;text-decoration:underline}.severity--alert{background-color:red;color:#fff}.severity--critical{font-weight:700;color:red}.severity--error{color:red}.severity--warning{color:#ff0}.severity--notice{color:#0ff}.severity--debug{opacity:.7}
|
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as Y,D as P,m as G,W as K,h as N,aD as Z,x as J,aN as m,aO as x,aP as rr,aQ as ir,aR as fr,aS as tr,d as er,aT as ar,aU as sr,j as U,aV as ur,aW as lr,B as or,aX as cr}from"./BrUe-Qen.js";import{i as nr,c as vr,d as dr,n as br,a as gr}from"./vQfHcJV6.js";function _r(r,t){var i=void 0,f;Y(()=>{i!==(i=t())&&(f&&(P(f),f=null),i&&(f=G(()=>{K(()=>i(r))})))})}function W(r){var t,i,f="";if(typeof r=="string"||typeof r=="number")f+=r;else if(typeof r=="object")if(Array.isArray(r)){var e=r.length;for(t=0;t<e;t++)r[t]&&(i=W(r[t]))&&(f&&(f+=" "),f+=i)}else for(i in r)r[i]&&(f&&(f+=" "),f+=i);return f}function hr(){for(var r,t,i=0,f="",e=arguments.length;i<e;i++)(r=arguments[i])&&(t=W(r))&&(f&&(f+=" "),f+=t);return f}function Ar(r){return typeof r=="object"?hr(r):r??""}const V=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function pr(r,t,i){var f=r==null?"":""+r;if(t&&(f=f?f+" "+t:t),i){for(var e in i)if(i[e])f=f?f+" "+e:e;else if(f.length)for(var a=e.length,l=0;(l=f.indexOf(e,l))>=0;){var c=l+a;(l===0||V.includes(f[l-1]))&&(c===f.length||V.includes(f[c]))?f=(l===0?"":f.substring(0,l))+f.substring(c+1):l=c}}return f===""?null:f}function D(r,t=!1){var i=t?" !important;":";",f="";for(var e in r){var a=r[e];a!=null&&a!==""&&(f+=" "+e+": "+a+i)}return f}function w(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function Nr(r,t){if(t){var i="",f,e;if(Array.isArray(t)?(f=t[0],e=t[1]):f=t,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,c=!1,d=[];f&&d.push(...Object.keys(f).map(w)),e&&d.push(...Object.keys(e).map(w));var n=0,_=-1;const T=r.length;for(var v=0;v<T;v++){var s=r[v];if(c?s==="/"&&r[v-1]==="*"&&(c=!1):a?a===s&&(a=!1):s==="/"&&r[v+1]==="*"?c=!0:s==='"'||s==="'"?a=s:s==="("?l++:s===")"&&l--,!c&&a===!1&&l===0){if(s===":"&&_===-1)_=v;else if(s===";"||v===T-1){if(_!==-1){var S=w(r.substring(n,_).trim());if(!d.includes(S)){s!==";"&&v++;var p=r.substring(n,v).trim();i+=" "+p+";"}}n=v+1,_=-1}}}}return f&&(i+=D(f)),e&&(i+=D(e,!0)),i=i.trim(),i===""?null:i}return r==null?null:String(r)}function Sr(r,t,i,f,e,a){var l=r.__className;if(N||l!==i||l===void 0){var c=pr(i,f,a);(!N||c!==r.getAttribute("class"))&&(c==null?r.removeAttribute("class"):t?r.className=c:r.setAttribute("class",c)),r.__className=i}else if(a&&e!==a)for(var d in a){var n=!!a[d];(e==null||n!==!!e[d])&&r.classList.toggle(d,n)}return a}function M(r,t={},i,f){for(var e in i){var a=i[e];t[e]!==a&&(i[e]==null?r.style.removeProperty(e):r.style.setProperty(e,a,f))}}function Tr(r,t,i,f){var e=r.__style;if(N||e!==t){var a=Nr(t,f);(!N||a!==r.getAttribute("style"))&&(a==null?r.removeAttribute("style"):r.style.cssText=a),r.__style=t}else f&&(Array.isArray(f)?(M(r,i?.[0],f[0]),M(r,i?.[1],f[1],"important")):M(r,i,f));return f}function j(r,t,i=!1){if(r.multiple){if(t==null)return;if(!J(t))return m();for(var f of r.options)f.selected=t.includes(B(f));return}for(f of r.options){var e=B(f);if(x(e,t)){f.selected=!0;return}}(!i||t!==void 0)&&(r.selectedIndex=-1)}function Or(r){var t=new MutationObserver(()=>{j(r,r.__value)});t.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Z(()=>{t.disconnect()})}function B(r){return"__value"in r?r.__value:r.value}const L=Symbol("class"),I=Symbol("style"),q=Symbol("is custom element"),z=Symbol("is html");function Er(r){if(N){var t=!1,i=()=>{if(!t){if(t=!0,r.hasAttribute("value")){var f=r.value;y(r,"value",null),r.value=f}if(r.hasAttribute("checked")){var e=r.checked;y(r,"checked",null),r.checked=e}}};r.__on_r=i,or(i),cr()}}function wr(r,t){var i=k(r);i.value===(i.value=t??void 0)||r.value===t&&(t!==0||r.nodeName!=="PROGRESS")||(r.value=t??"")}function Lr(r,t){t?r.hasAttribute("selected")||r.setAttribute("selected",""):r.removeAttribute("selected")}function y(r,t,i,f){var e=k(r);N&&(e[t]=r.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&r.nodeName==="LINK")||e[t]!==(e[t]=i)&&(t==="loading"&&(r[ir]=i),i==null?r.removeAttribute(t):typeof i!="string"&&F(r).includes(t)?r[t]=i:r.setAttribute(t,i))}function Ir(r,t,i,f,e=!1,a=!1){if(N&&e&&r.tagName==="INPUT"){var l=r,c=l.type==="checkbox"?"defaultChecked":"defaultValue";c in i||Er(l)}var d=k(r),n=d[q],_=!d[z];let v=N&&n;v&&U(!1);var s=t||{},S=r.tagName==="OPTION";for(var p in t)p in i||(i[p]=null);i.class?i.class=Ar(i.class):(f||i[L])&&(i.class=null),i[I]&&(i.style??=null);var T=F(r);for(const u in i){let o=i[u];if(S&&u==="value"&&o==null){r.value=r.__value="",s[u]=o;continue}if(u==="class"){var E=r.namespaceURI==="http://www.w3.org/1999/xhtml";Sr(r,E,o,f,t?.[L],i[L]),s[u]=o,s[L]=i[L];continue}if(u==="style"){Tr(r,o,t?.[I],i[I]),s[u]=o,s[I]=i[I];continue}var h=s[u];if(!(o===h&&!(o===void 0&&r.hasAttribute(u)))){s[u]=o;var $=u[0]+u[1];if($!=="$$")if($==="on"){const A={},O="$$"+u;let b=u.slice(2);var C=gr(b);if(nr(b)&&(b=b.slice(0,-7),A.capture=!0),!C&&h){if(o!=null)continue;r.removeEventListener(b,s[O],A),s[O]=null}if(o!=null)if(C)r[`__${b}`]=o,dr([b]);else{let Q=function(X){s[u].call(this,X)};s[O]=vr(b,r,Q,A)}else C&&(r[`__${b}`]=void 0)}else if(u==="style")y(r,u,o);else if(u==="autofocus")ur(r,!!o);else if(!n&&(u==="__value"||u==="value"&&o!=null))r.value=r.__value=o;else if(u==="selected"&&S)Lr(r,o);else{var g=u;_||(g=br(g));var R=g==="defaultValue"||g==="defaultChecked";if(o==null&&!n&&!R)if(d[u]=null,g==="value"||g==="checked"){let A=r;const O=t===void 0;if(g==="value"){let b=A.defaultValue;A.removeAttribute(g),A.defaultValue=b,A.value=A.__value=O?b:null}else{let b=A.defaultChecked;A.removeAttribute(g),A.defaultChecked=b,A.checked=O?b:!1}}else r.removeAttribute(u);else R||T.includes(g)&&(n||typeof o!="string")?(r[g]=o,g in d&&(d[g]=lr)):typeof o!="function"&&y(r,g,o)}}}return v&&U(!0),s}function Mr(r,t,i=[],f=[],e=[],a,l=!1,c=!1){rr(e,i,f,d=>{var n=void 0,_={},v=r.nodeName==="SELECT",s=!1;if(Y(()=>{var p=t(...d.map(er)),T=Ir(r,n,p,a,l,c);s&&v&&"value"in p&&j(r,p.value);for(let h of Object.getOwnPropertySymbols(_))p[h]||P(_[h]);for(let h of Object.getOwnPropertySymbols(p)){var E=p[h];h.description===ar&&(!n||E!==n[h])&&(_[h]&&P(_[h]),_[h]=G(()=>_r(r,()=>E))),T[h]=E}n=T}),v){var S=r;K(()=>{j(S,n.value,!0),Or(S)})}s=!0})}function k(r){return r.__attributes??={[q]:r.nodeName.includes("-"),[z]:r.namespaceURI===fr}}var H=new Map;function F(r){var t=r.getAttribute("is")||r.nodeName,i=H.get(t);if(i)return i;H.set(t,i=[]);for(var f,e=r,a=Element.prototype;a!==e;){f=sr(e);for(var l in f)f[l].set&&i.push(l);e=tr(e)}return i}export{Mr as a,Sr as b,Ar as c,Tr as d,wr as e,j as f,Lr as g,Or as i,Er as r,y as s};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u as C,p as T,$ as S,o as v,e as U,d as K,U as L}from"./CUBtP2L9.js";import{f as s}from"./Ch16TNvP.js";function d(e){const t=new Uint8Array(e);let n="";for(const i of t)n+=String.fromCharCode(i);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function E(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,a=t.padEnd(t.length+n,"="),i=atob(a),l=new ArrayBuffer(i.length),f=new Uint8Array(l);for(let o=0;o<i.length;o++)f[o]=i.charCodeAt(o);return l}function A(){return x.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential=="function")}const x={stubThis:e=>e};function P(e){const{id:t}=e;return{...e,id:E(t),transports:e.transports}}function _(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class r extends Error{constructor({message:t,code:n,cause:a,name:i}){super(t,{cause:a}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i??a.name,this.code=n}}function k({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new r({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(n.authenticatorSelection?.requireResidentKey===!0)return new r({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&n.authenticatorSelection?.userVerification==="required")return new r({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(n.authenticatorSelection?.userVerification==="required")return new r({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new r({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new r({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return n.pubKeyCredParams.filter(i=>i.type==="public-key").length===0?new r({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new r({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const a=globalThis.location.hostname;if(_(a)){if(n.rp.id!==a)return new r({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new r({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new r({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new r({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}class V{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const D=new V,H=["cross-platform","platform"];function N(e){if(e&&!(H.indexOf(e)<0))return e}async function I(e){!e.optionsJSON&&e.challenge&&(console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useAutoRegister:n=!1}=e;if(!A())throw new Error("WebAuthn is not supported in this browser");const a={...t,challenge:E(t.challenge),user:{...t.user,id:E(t.user.id)},excludeCredentials:t.excludeCredentials?.map(P)},i={};n&&(i.mediation="conditional"),i.publicKey=a,i.signal=D.createNewAbortSignal();let l;try{l=await navigator.credentials.create(i)}catch(u){throw k({error:u,options:i})}if(!l)throw new Error("Registration was not completed");const{id:f,rawId:o,response:c,type:m}=l;let h;typeof c.getTransports=="function"&&(h=c.getTransports());let g;if(typeof c.getPublicKeyAlgorithm=="function")try{g=c.getPublicKeyAlgorithm()}catch(u){y("getPublicKeyAlgorithm()",u)}let w;if(typeof c.getPublicKey=="function")try{const u=c.getPublicKey();u!==null&&(w=d(u))}catch(u){y("getPublicKey()",u)}let b;if(typeof c.getAuthenticatorData=="function")try{b=d(c.getAuthenticatorData())}catch(u){y("getAuthenticatorData()",u)}return{id:f,rawId:d(o),response:{attestationObject:d(c.attestationObject),clientDataJSON:d(c.clientDataJSON),transports:h,publicKeyAlgorithm:g,publicKey:w,authenticatorData:b},type:m,clientExtensionResults:l.getClientExtensionResults(),authenticatorAttachment:N(l.authenticatorAttachment)}}function y(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
2
|
-
`,t)}function J(){if(!A())return R.stubThis(new Promise(t=>t(!1)));const e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?R.stubThis(new Promise(t=>t(!1))):R.stubThis(e.isConditionalMediationAvailable())}const R={stubThis:e=>e};function B({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new r({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new r({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const a=globalThis.location.hostname;if(_(a)){if(n.rpId!==a)return new r({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new r({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new r({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}async function O(e){!e.optionsJSON&&e.challenge&&(console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:a=!0}=e;if(!A())throw new Error("WebAuthn is not supported in this browser");let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(P));const l={...t,challenge:E(t.challenge),allowCredentials:i},f={};if(n){if(!await J())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&a)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');f.mediation="conditional",l.allowCredentials=[]}f.publicKey=l,f.signal=D.createNewAbortSignal();let o;try{o=await navigator.credentials.get(f)}catch(b){throw B({error:b,options:f})}if(!o)throw new Error("Authentication was not completed");const{id:c,rawId:m,response:h,type:g}=o;let w;return h.userHandle&&(w=d(h.userHandle)),{id:c,rawId:d(m),response:{authenticatorData:d(h.authenticatorData),clientDataJSON:d(h.clientDataJSON),signature:d(h.signature),userHandle:w},type:g,clientExtensionResults:o.getClientExtensionResults(),authenticatorAttachment:N(o.authenticatorAttachment)}}async function G(e){const t=await s("OPTIONS","users/:id/auth",{type:"login"},e),n=await O({optionsJSON:t});return await s("POST","users/:id/auth",n,e)}async function M(e){const t=await s("OPTIONS","users/:id/auth",{type:"action"},e),n=await O({optionsJSON:t});await s("POST","users/:id/auth",n,e)}async function $(e){const{id:t}=await s("POST","user_id",{using:"email",value:e});return await G(t)}async function Y(){const e=await s("GET","session");return e.created=new Date(e.created),e.expires=new Date(e.expires),e}async function j(e){p(e);const t=await s("GET","users/:id/sessions",{},e);for(const n of t)n.created=new Date(n.created),n.expires=new Date(n.expires);return t}async function F(e,...t){p(e);const n=await s("DELETE","users/:id/sessions",{id:t},e);for(const a of n)a.created=new Date(a.created),a.expires=new Date(a.expires);return n}async function z(e){p(e),await M(e);const t=await s("DELETE","users/:id/sessions",{confirm_all:!0},e);for(const n of t)n.created=new Date(n.created),n.expires=new Date(n.expires);return t}async function Z(){return await s("DELETE","session")}async function Q(e){const t=v({name:K(),email:U()}).parse(e),{options:n,userId:a}=await s("OPTIONS","register",t),i=await I({optionsJSON:n});await s("POST","register",{userId:a,name:t.name,email:t.email,response:i})}function p(e){try{C().parse(e)}catch(t){throw t instanceof S?T(t):t}}async function X(e,t){p(e);const n=await L.parseAsync(t).catch(i=>{throw i instanceof S?T(i):i}),a=await s("PATCH","users/:id",n,e);return a.registeredAt=new Date(a.registeredAt),a.emailVerified&&(a.emailVerified=new Date(a.emailVerified)),a}async function ee(e){p(e);const t=await s("OPTIONS","users/:id/auth",{type:"action"},e),n=await O({optionsJSON:t});await s("POST","users/:id/auth",n,e);const a=await s("DELETE","users/:id",n,e);return a.registeredAt=new Date(a.registeredAt),a.emailVerified=new Date(a.emailVerified),a}async function te(e){p(e);const{enabled:t}=await s("OPTIONS","users/:id/verify_email",{},e);return t}async function ne(e){return p(e),await s("GET","users/:id/verify_email",{},e)}async function ae(e){p(e);const t=await s("GET","users/:id/passkeys",{},e);for(const n of t)n.createdAt=new Date(n.createdAt);return t}async function ie(e){p(e);const t=await s("OPTIONS","users/:id/passkeys",{},e),n=await I({optionsJSON:t});return await s("PUT","users/:id/passkeys",n,e)}async function se(e,t){return await s("PATCH","passkeys/:id",t,e)}async function re(e){return await s("DELETE","passkeys/:id",{},e)}export{j as a,ae as b,ie as c,ee as d,te as e,se as f,Y as g,re as h,$ as i,O as j,z as k,Z as l,F as m,Q as r,ne as s,X as u};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a0 as o,a1 as t,Y as c}from"./BrUe-Qen.js";function f(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function u(e){t===null&&f(),o(()=>{const n=c(e);if(typeof n=="function")return n})}export{u as o};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as u,b as g,V as o,h as t,g as _,C as p,G as i,j as l,s as d,k as m}from"./BrUe-Qen.js";function E(n,r){let s=null,f=t;var a;if(t){s=m;for(var e=_(document.head);e!==null&&(e.nodeType!==p||e.data!==n);)e=i(e);if(e===null)l(!1);else{var y=i(e);e.remove(),d(y)}}t||(a=document.head.appendChild(u()));try{g(()=>r(a),o)}finally{f&&(l(!0),d(s))}}export{E as h};
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as h,a as c}from"./D40Zn55h.js";import{N as g,O as n,P as p,Q as u,R as _,d as s,S as t,T as b}from"./BrUe-Qen.js";import{a as w}from"./lH47zGKU.js";import{a as x,s as y}from"./46qGscyh.js";import{r as $}from"./DvOBbqVY.js";var q=h("<svg><use></use></svg>");const z={hash:"svelte-15xbqt3",code:"svg.svelte-15xbqt3 {width:var(--size, 1em);height:var(--size, 1em);display:inline-block;fill:var(--fill, hsl(var(--hue) 0 var(--fg-light)));}"};function P(i,e){g(e,!0),w(i,z);const o=$(e,["$$slots","$$events","$$legacy","i"]),v=t(()=>e.i.includes("/")?e.i.split("/"):["solid",e.i]),r=t(()=>b(s(v),2)),l=t(()=>s(r)[0]),d=t(()=>s(r)[1]),m=t(()=>`/icons/${s(l)}.svg#${s(d)}`);var a=q();x(a,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",...o}),void 0,void 0,void 0,"svelte-15xbqt3");var f=u(a);_(a),n(()=>y(f,"href",s(m))),c(i,a),p()}export{P as I};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f,a as s}from"./D40Zn55h.js";import{N as d,P as c,U as b,f as _}from"./BrUe-Qen.js";import{d as h}from"./vQfHcJV6.js";import{i as v}from"./CoYD6HNm.js";import{p as u}from"./DvOBbqVY.js";import{l as k}from"./B2Vkpbkw.js";import{F as P}from"./DW7-1esk.js";var w=f("<button>Take me back</button>"),y=f("<p>Are you sure you want to log out?</p> <!>",1);function N(m,o){d(o,!0);let t=u(o,"dialog",15),e=u(o,"fullPage",3,!1);P(m,{get pageMode(){return e()},submitText:"Log Out",submit:()=>k().then(()=>window.location.href="/"),get dialog(){return t()},set dialog(r){t(r)},children:(r,L)=>{var i=y(),n=b(_(i),2);{var g=a=>{var l=w();l.__click=p=>{p.preventDefault(),t().close(),history.back()},s(a,l)};v(n,a=>{e()&&a(g)})}s(r,i)},$$slots:{default:!0}}),c()}h(["click"]);export{N as L};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Ct=Array.isArray,Mt=Array.prototype.indexOf,An=Array.from,kn=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,xn=Object.getOwnPropertyDescriptors,Ft=Object.prototype,Lt=Array.prototype,jt=Object.getPrototypeOf,We=Object.isExtensible;function Rn(e){return typeof e=="function"}const Sn=()=>{};function Yt(e){for(var t=0;t<e.length;t++)e[t]()}function rt(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function On(e,t,n=!1){return e===void 0?n?t():t:e}function Nn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const E=2,Fe=4,ke=8,F=16,L=32,ee=64,Le=128,g=1024,T=2048,j=4096,I=8192,H=16384,je=32768,pe=65536,Oe=1<<17,qt=1<<18,de=1<<19,st=1<<20,R=256,we=512,ye=32768,Ne=1<<21,Ye=1<<22,W=1<<23,oe=Symbol("$state"),In=Symbol("legacy props"),Dn=Symbol(""),te=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},qe=3,ft=8;function Ht(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ut(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Bt(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Vt(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Gt(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Kt(){throw new Error("https://svelte.dev/e/experimental_async_fork")}function zt(){throw new Error("https://svelte.dev/e/fork_discarded")}function $t(){throw new Error("https://svelte.dev/e/fork_timing")}function Cn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Mn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Wt(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Xt(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Zt(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Ln=1,jn=2,Yn=4,qn=8,Hn=16,Un=1,Bn=4,Vn=8,Gn=16,Kn=4,zn=1,$n=2,Jt="[",Qt="[!",en="]",He={},m=Symbol(),Wn="http://www.w3.org/1999/xhtml",Xn="@attach";function Ue(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Zn(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Jn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let Z=!1;function Qn(e){Z=e}let k;function re(e){if(e===null)throw Ue(),He;return k=e}function er(){return re(G(k))}function tr(e){if(Z){if(G(k)!==null)throw Ue(),He;k=e}}function nr(e=1){if(Z){for(var t=e,n=k;t--;)n=G(n);k=n}}function rr(e=!0){for(var t=0,n=k;;){if(n.nodeType===ft){var r=n.data;if(r===en){if(t===0)return n;t-=1}else(r===Jt||r===Qt)&&(t+=1)}var s=G(n);e&&n.remove(),n=s}}function sr(e){if(!e||e.nodeType!==ft)throw Ue(),He;return e.data}function at(e){return e===this.v}function tn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function it(e){return!tn(e,this.v)}let D=null;function Ee(e){D=e}function fr(e,t=!1,n){D={p:D,i:!1,c:null,e:null,s:e,x:null,l:null}}function ar(e){var t=D,n=t.e;if(n!==null){t.e=null;for(var r of n)bt(r)}return t.i=!0,D=t.p,{}}function lt(){return!0}let z=[];function ut(){var e=z;z=[],Yt(e)}function ot(e){if(z.length===0&&!ce){var t=z;queueMicrotask(()=>{t===z&&ut()})}z.push(e)}function nn(){for(;z.length>0;)ut()}function rn(e){var t=v;if(t===null)return c.f|=W,e;if((t.f&je)===0){if((t.f&Le)===0)throw e;t.b.error(e)}else me(e,t)}function me(e,t){for(;t!==null;){if((t.f&Le)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const $=new Set;let w=null,S=null,N=[],xe=null,Ie=!1,ce=!1;class B{committed=!1;current=new Map;previous=new Map;#r=new Set;#s=new Set;#t=0;#n=0;#i=null;#f=[];#a=[];skipped_effects=new Set;is_fork=!1;process(t){N=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#l(r,n);this.is_fork||this.#u(),this.#n>0||this.is_fork?(this.#e(n.effects),this.#e(n.render_effects),this.#e(n.block_effects)):(w=null,Xe(n.render_effects),Xe(n.effects),this.#i?.resolve()),S=null}#l(t,n){t.f^=g;for(var r=t.first;r!==null;){var s=r.f,f=(s&(L|ee))!==0,l=f&&(s&g)!==0,u=l||(s&I)!==0||this.skipped_effects.has(r);if((r.f&Le)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!u&&r.fn!==null){f?r.f^=g:(s&Fe)!==0?n.effects.push(r):he(r)&&((r.f&F)!==0&&n.block_effects.push(r),ve(r));var a=r.first;if(a!==null){r=a;continue}}var i=r.parent;for(r=r.next;r===null&&i!==null;)i===n.effect&&(this.#e(n.effects),this.#e(n.render_effects),this.#e(n.block_effects),n=n.parent),r=i.next,i=i.parent}}#e(t){for(const n of t)((n.f&T)!==0?this.#f:this.#a).push(n),y(n,g)}capture(t,n){this.previous.has(t)||this.previous.set(t,n),this.current.set(t,t.v),S?.set(t,t.v)}activate(){w=this}deactivate(){w=null,S=null}flush(){if(this.activate(),N.length>0){if(Pe(),w!==null&&w!==this)return}else this.#t===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#u(){if(this.#n===0){for(const t of this.#r)t();this.#r.clear()}this.#t===0&&this.#o()}#o(){if($.size>1){this.previous.clear();var t=S,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const s of $){if(s===this){n=!1;continue}const f=[];for(const[u,a]of this.current){if(s.current.has(u))if(n&&a!==s.current.get(u))s.current.set(u,a);else continue;f.push(u)}if(f.length===0)continue;const l=[...s.current.keys()].filter(u=>!this.current.has(u));if(l.length>0){const u=new Set,a=new Map;for(const i of f)ct(i,l,u,a);if(N.length>0){w=s,s.apply();for(const i of N)s.#l(i,r);N=[],s.deactivate()}}}w=null,S=t}this.committed=!0,$.delete(this)}increment(t){this.#t+=1,t&&(this.#n+=1)}decrement(t){this.#t-=1,t&&(this.#n-=1),this.revive()}revive(){for(const t of this.#f)y(t,T),J(t);for(const t of this.#a)y(t,j),J(t);this.#f=[],this.#a=[],this.flush()}oncommit(t){this.#r.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#i??=rt()).promise}static ensure(){if(w===null){const t=w=new B;$.add(w),ce||B.enqueue(()=>{w===t&&t.flush()})}return w}static enqueue(t){ot(t)}apply(){}}function De(e){var t=ce;ce=!0;try{var n;for(e&&(w!==null&&Pe(),n=e());;){if(nn(),N.length===0&&(w?.flush(),N.length===0))return xe=null,n;Pe()}}finally{ce=t}}function Pe(){var e=ne;Ie=!0;try{var t=0;for(et(!0);N.length>0;){var n=B.ensure();if(t++>1e3){var r,s;sn()}n.process(N),U.clear()}}finally{Ie=!1,et(e),xe=null}}function sn(){try{Gt()}catch(e){me(e,xe)}}let C=null;function Xe(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(H|I))===0&&he(r)&&(C=new Set,ve(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?kt(r):r.fn=null),C?.size>0)){U.clear();for(const s of C){if((s.f&(H|I))!==0)continue;const f=[s];let l=s.parent;for(;l!==null;)C.has(l)&&(C.delete(l),f.push(l)),l=l.parent;for(let u=f.length-1;u>=0;u--){const a=f[u];(a.f&(H|I))===0&&ve(a)}}C.clear()}}C=null}}function ct(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&E)!==0?ct(s,t,n,r):(f&(Ye|F))!==0&&(f&T)===0&&vt(s,t,r)&&(y(s,T),J(s))}}function _t(e,t){if(e.reactions!==null)for(const n of e.reactions){const r=n.f;(r&E)!==0?_t(n,t):(r&Oe)!==0&&(y(n,T),t.add(n))}}function vt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&E)!==0&&vt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function J(e){for(var t=xe=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ie&&t===v&&(n&F)!==0)return;if((n&(ee|L))!==0){if((n&g)===0)return;t.f^=g}}N.push(t)}function ir(e){Kt(),w!==null&&$t();var t=B.ensure();t.is_fork=!0;var n=!1,r=t.settled();De(e);for(var[s,f]of t.previous)s.v=f;return{commit:async()=>{if(n){await r;return}$.has(t)||zt(),n=!0,t.is_fork=!1;for(var[l,u]of t.current)l.v=u;De(()=>{var a=new Set;for(var i of t.current.keys())_t(i,a);on(a),wt()}),t.revive(),await r},discard:()=>{!n&&$.has(t)&&($.delete(t),t.discard())}}}function fn(e,t,n,r){const s=Be;if(n.length===0&&e.length===0){r(t.map(s));return}var f=w,l=v,u=an();function a(){Promise.all(n.map(i=>ln(i))).then(i=>{u();try{r([...t.map(s),...i])}catch(o){(l.f&H)===0&&me(o,l)}f?.deactivate(),ge()}).catch(i=>{me(i,l)})}e.length>0?Promise.all(e).then(()=>{u();try{return a()}finally{f?.deactivate(),ge()}}):a()}function an(){var e=v,t=c,n=D,r=w;return function(f=!0){se(e),V(t),Ee(n),f&&r?.activate()}}function ge(){se(null),V(null),Ee(null)}function Be(e){var t=E|T,n=c!==null&&(c.f&E)!==0?c:null;return v===null||n!==null&&(n.f&R)!==0?t|=R:v.f|=de,{ctx:D,deps:null,effects:null,equals:at,f:t,fn:e,reactions:null,rv:0,v:m,wv:0,parent:n??v,ac:null}}function ln(e,t){let n=v;n===null&&Ht();var r=n.b,s=void 0,f=Ge(m),l=!c,u=new Map;return pn(()=>{var a=rt();s=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).then(()=>{i===w&&i.committed&&i.deactivate(),ge()})}catch(p){a.reject(p),ge()}var i=w;if(l){var o=!r.is_pending();r.update_pending_count(1),i.increment(o),u.get(i)?.reject(te),u.delete(i),u.set(i,a)}const _=(p,d=void 0)=>{if(i.activate(),d)d!==te&&(f.f|=W,Ce(f,d));else{(f.f&W)!==0&&(f.f^=W),Ce(f,p);for(const[h,ae]of u){if(u.delete(h),h===i)break;ae.reject(te)}}l&&(r.update_pending_count(-1),i.decrement(o))};a.promise.then(_,p=>_(null,p||"unknown"))}),hn(()=>{for(const a of u.values())a.reject(te)}),new Promise(a=>{function i(o){function _(){o===s?a(f):i(s)}o.then(_,_)}i(s)})}function lr(e){const t=Be(e);return St(t),t}function ur(e){const t=Be(e);return t.equals=it,t}function dt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Q(t[n])}}function un(e){for(var t=e.parent;t!==null;){if((t.f&E)===0)return t;t=t.parent}return null}function Ve(e){var t,n=v;se(un(e));try{e.f&=~ye,dt(e),t=Dt(e)}finally{se(n)}return t}function ht(e){var t=Ve(e);if(e.equals(t)||(e.v=t,e.wv=Nt()),!fe)if(S!==null)S.set(e,e.v);else{var n=(q||(e.f&R)!==0)&&e.deps!==null?j:g;y(e,n)}}let be=new Set;const U=new Map;function on(e){be=e}let pt=!1;function Ge(e,t){var n={f:0,v:e,reactions:null,equals:at,rv:0,wv:0};return n}function Y(e,t){const n=Ge(e);return St(n),n}function or(e,t=!1,n=!0){const r=Ge(e);return t||(r.equals=it),r}function K(e,t,n=!1){c!==null&&(!O||(c.f&Oe)!==0)&<()&&(c.f&(E|F|Ye|Oe))!==0&&!M?.includes(e)&&Zt();let r=n?ie(t):t;return Ce(e,r)}function Ce(e,t){if(!e.equals(t)){var n=e.v;fe?U.set(e,t):U.set(e,n),e.v=t;var r=B.ensure();r.capture(e,n),(e.f&E)!==0&&((e.f&T)!==0&&Ve(e),y(e,(e.f&R)===0?g:j)),e.wv=Nt(),yt(e,T),v!==null&&(v.f&g)!==0&&(v.f&(L|ee))===0&&(x===null?gn([e]):x.push(e)),!r.is_fork&&be.size>0&&!pt&&wt()}return t}function wt(){pt=!1;const e=Array.from(be);for(const t of e)(t.f&g)!==0&&y(t,j),he(t)&&ve(t);be.clear()}function Se(e){K(e,e.v+1)}function yt(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,s=0;s<r;s++){var f=n[s],l=f.f,u=(l&T)===0;u&&y(f,t),(l&E)!==0?(l&ye)===0&&(f.f|=ye,yt(f,j)):u&&((l&F)!==0&&C!==null&&C.add(f),J(f))}}function ie(e){if(typeof e!="object"||e===null||oe in e)return e;const t=jt(e);if(t!==Ft&&t!==Lt)return e;var n=new Map,r=Ct(e),s=Y(0),f=X,l=u=>{if(X===f)return u();var a=c,i=X;V(null),nt(f);var o=u();return V(a),nt(i),o};return r&&n.set("length",Y(e.length)),new Proxy(e,{defineProperty(u,a,i){(!("value"in i)||i.configurable===!1||i.enumerable===!1||i.writable===!1)&&Wt();var o=n.get(a);return o===void 0?o=l(()=>{var _=Y(i.value);return n.set(a,_),_}):K(o,i.value,!0),!0},deleteProperty(u,a){var i=n.get(a);if(i===void 0){if(a in u){const o=l(()=>Y(m));n.set(a,o),Se(s)}}else K(i,m),Se(s);return!0},get(u,a,i){if(a===oe)return e;var o=n.get(a),_=a in u;if(o===void 0&&(!_||ue(u,a)?.writable)&&(o=l(()=>{var d=ie(_?u[a]:m),h=Y(d);return h}),n.set(a,o)),o!==void 0){var p=le(o);return p===m?void 0:p}return Reflect.get(u,a,i)},getOwnPropertyDescriptor(u,a){var i=Reflect.getOwnPropertyDescriptor(u,a);if(i&&"value"in i){var o=n.get(a);o&&(i.value=le(o))}else if(i===void 0){var _=n.get(a),p=_?.v;if(_!==void 0&&p!==m)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return i},has(u,a){if(a===oe)return!0;var i=n.get(a),o=i!==void 0&&i.v!==m||Reflect.has(u,a);if(i!==void 0||v!==null&&(!o||ue(u,a)?.writable)){i===void 0&&(i=l(()=>{var p=o?ie(u[a]):m,d=Y(p);return d}),n.set(a,i));var _=le(i);if(_===m)return!1}return o},set(u,a,i,o){var _=n.get(a),p=a in u;if(r&&a==="length")for(var d=i;d<_.v;d+=1){var h=n.get(d+"");h!==void 0?K(h,m):d in u&&(h=l(()=>Y(m)),n.set(d+"",h))}if(_===void 0)(!p||ue(u,a)?.writable)&&(_=l(()=>Y(void 0)),K(_,ie(i)),n.set(a,_));else{p=_.v!==m;var ae=l(()=>ie(i));K(_,ae)}var ze=Reflect.getOwnPropertyDescriptor(u,a);if(ze?.set&&ze.set.call(o,i),!p){if(r&&typeof a=="string"){var $e=n.get("length"),Re=Number(a);Number.isInteger(Re)&&Re>=$e.v&&K($e,Re+1)}Se(s)}return!0},ownKeys(u){le(s);var a=Reflect.ownKeys(u).filter(_=>{var p=n.get(_);return p===void 0||p.v!==m});for(var[i,o]of n)o.v!==m&&!(i in u)&&a.push(i);return a},setPrototypeOf(){Xt()}})}function Ze(e){try{if(e!==null&&typeof e=="object"&&oe in e)return e[oe]}catch{}return e}function cr(e,t){return Object.is(Ze(e),Ze(t))}var Je,cn,_n,Et,mt;function _r(){if(Je===void 0){Je=window,cn=document,_n=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Et=ue(t,"firstChild").get,mt=ue(t,"nextSibling").get,We(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),We(n)&&(n.__t=void 0)}}function Te(e=""){return document.createTextNode(e)}function Me(e){return Et.call(e)}function G(e){return mt.call(e)}function vr(e,t){if(!Z)return Me(e);var n=Me(k);if(n===null)n=k.appendChild(Te());else if(t&&n.nodeType!==qe){var r=Te();return n?.before(r),re(r),r}return re(n),n}function dr(e,t=!1){if(!Z){var n=Me(e);return n instanceof Comment&&n.data===""?G(n):n}if(t&&k?.nodeType!==qe){var r=Te();return k?.before(r),re(r),r}return k}function hr(e,t=1,n=!1){let r=Z?k:e;for(var s;t--;)s=r,r=G(r);if(!Z)return r;if(n&&r?.nodeType!==qe){var f=Te();return r===null?s?.after(f):r.before(f),re(f),f}return re(r),r}function pr(e){e.textContent=""}function wr(){return!1}function yr(e,t){if(t){const n=document.body;e.autofocus=!0,ot(()=>{document.activeElement===n&&e.focus()})}}let Qe=!1;function vn(){Qe||(Qe=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Ke(e){var t=c,n=v;V(null),se(null);try{return e()}finally{V(t),se(n)}}function Er(e,t,n,r=n){e.addEventListener(t,()=>Ke(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),vn()}function gt(e){v===null&&c===null&&Vt(),c!==null&&(c.f&R)!==0&&v===null&&Bt(),fe&&Ut()}function dn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function P(e,t,n,r=!0){var s=v;s!==null&&(s.f&I)!==0&&(e|=I);var f={ctx:D,deps:null,nodes_start:null,nodes_end:null,f:e|T,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{ve(f),f.f|=je}catch(a){throw Q(f),a}else t!==null&&J(f);if(r){var l=f;if(n&&l.deps===null&&l.teardown===null&&l.nodes_start===null&&l.first===l.last&&(l.f&de)===0&&(l=l.first,(e&F)!==0&&(e&pe)!==0&&l!==null&&(l.f|=pe)),l!==null&&(l.parent=s,s!==null&&dn(l,s),c!==null&&(c.f&E)!==0&&(e&ee)===0)){var u=c;(u.effects??=[]).push(l)}}return f}function mr(){return c!==null&&!O}function hn(e){const t=P(ke,null,!1);return y(t,g),t.teardown=e,t}function gr(e){gt();var t=v.f,n=!c&&(t&L)!==0&&(t&je)===0;if(n){var r=D;(r.e??=[]).push(e)}else return bt(e)}function bt(e){return P(Fe|st,e,!1)}function br(e){return gt(),P(ke|st,e,!0)}function Tr(e){B.ensure();const t=P(ee|de,e,!0);return(n={})=>new Promise(r=>{n.outro?En(t,()=>{Q(t),r(void 0)}):(Q(t),r(void 0))})}function Ar(e){return P(Fe,e,!1)}function pn(e){return P(Ye|de,e,!0)}function kr(e,t=0){return P(ke|t,e,!0)}function xr(e,t=[],n=[],r=[]){fn(r,t,n,s=>{P(ke,()=>e(...s.map(le)),!0)})}function Rr(e,t=0){var n=P(F|t,e,!0);return n}function Sr(e,t=!0){return P(L|de,e,!0,t)}function Tt(e){var t=e.teardown;if(t!==null){const n=fe,r=c;tt(!0),V(null);try{t.call(null)}finally{tt(n),V(r)}}}function At(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Ke(()=>{s.abort(te)});var r=n.next;(n.f&ee)!==0?n.parent=null:Q(n,t),n=r}}function wn(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&L)===0&&Q(t),t=n}}function Q(e,t=!0){var n=!1;(t||(e.f&qt)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(yn(e.nodes_start,e.nodes_end),n=!0),At(e,t&&!n),Ae(e,0),y(e,H);var r=e.transitions;if(r!==null)for(const f of r)f.stop();Tt(e);var s=e.parent;s!==null&&s.first!==null&&kt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function yn(e,t){for(;e!==null;){var n=e===t?null:G(e);e.remove(),e=n}}function kt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function En(e,t,n=!0){var r=[];xt(e,r,!0),mn(r,()=>{n&&Q(e),t&&t()})}function mn(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var s of e)s.out(r)}else t()}function xt(e,t,n){if((e.f&I)===0){if(e.f^=I,e.transitions!==null)for(const l of e.transitions)(l.is_global||n)&&t.push(l);for(var r=e.first;r!==null;){var s=r.next,f=(r.f&pe)!==0||(r.f&L)!==0&&(e.f&F)!==0;xt(r,t,f?n:!1),r=s}}}function Or(e){Rt(e,!0)}function Rt(e,t){if((e.f&I)!==0){e.f^=I,(e.f&g)===0&&(y(e,T),J(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&pe)!==0||(n.f&L)!==0;Rt(n,s?t:!1),n=r}if(e.transitions!==null)for(const f of e.transitions)(f.is_global||t)&&f.in()}}function Nr(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var s=n===r?null:G(n);t.append(n),n=s}}let ne=!1;function et(e){ne=e}let fe=!1;function tt(e){fe=e}let c=null,O=!1;function V(e){c=e}let v=null;function se(e){v=e}let M=null;function St(e){c!==null&&(M===null?M=[e]:M.push(e))}let b=null,A=0,x=null;function gn(e){x=e}let Ot=1,_e=0,X=_e;function nt(e){X=e}let q=!1;function Nt(){return++Ot}function he(e){var t=e.f;if((t&T)!==0)return!0;if((t&j)!==0){var n=e.deps,r=(t&R)!==0;if(t&E&&(e.f&=~ye),n!==null){var s,f,l=(t&we)!==0,u=r&&v!==null&&!q,a=n.length;if((l||u)&&(v===null||(v.f&H)===0)){var i=e,o=i.parent;for(s=0;s<a;s++)f=n[s],(l||!f?.reactions?.includes(i))&&(f.reactions??=[]).push(i);l&&(i.f^=we),u&&o!==null&&(o.f&R)===0&&(i.f^=R)}for(s=0;s<a;s++)if(f=n[s],he(f)&&ht(f),f.wv>e.wv)return!0}(!r||v!==null&&!q)&&y(e,g)}return!1}function It(e,t,n=!0){var r=e.reactions;if(r!==null&&!M?.includes(e))for(var s=0;s<r.length;s++){var f=r[s];(f.f&E)!==0?It(f,t,!1):t===f&&(n?y(f,T):(f.f&g)!==0&&y(f,j),J(f))}}function Dt(e){var t=b,n=A,r=x,s=c,f=q,l=M,u=D,a=O,i=X,o=e.f;b=null,A=0,x=null,q=(o&R)!==0&&(O||!ne||c===null),c=(o&(L|ee))===0?e:null,M=null,Ee(e.ctx),O=!1,X=++_e,e.ac!==null&&(Ke(()=>{e.ac.abort(te)}),e.ac=null);try{e.f|=Ne;var _=e.fn,p=_(),d=e.deps;if(b!==null){var h;if(Ae(e,A),d!==null&&A>0)for(d.length=A+b.length,h=0;h<b.length;h++)d[A+h]=b[h];else e.deps=d=b;if(!q||(o&E)!==0&&e.reactions!==null)for(h=A;h<d.length;h++)(d[h].reactions??=[]).push(e)}else d!==null&&A<d.length&&(Ae(e,A),d.length=A);if(lt()&&x!==null&&!O&&d!==null&&(e.f&(E|j|T))===0)for(h=0;h<x.length;h++)It(x[h],e);return s!==null&&s!==e&&(_e++,x!==null&&(r===null?r=x:r.push(...x))),(e.f&W)!==0&&(e.f^=W),p}catch(ae){return rn(ae)}finally{e.f^=Ne,b=t,A=n,x=r,c=s,q=f,M=l,Ee(u),O=a,X=i}}function bn(e,t){let n=t.reactions;if(n!==null){var r=Mt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}n===null&&(t.f&E)!==0&&(b===null||!b.includes(t))&&(y(t,j),(t.f&(R|we))===0&&(t.f^=we),dt(t),Ae(t,0))}function Ae(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)bn(e,n[r])}function ve(e){var t=e.f;if((t&H)===0){y(e,g);var n=v,r=ne;v=e,ne=!0;try{(t&F)!==0?wn(e):At(e),Tt(e);var s=Dt(e);e.teardown=typeof s=="function"?s:null,e.wv=Ot;var f}finally{ne=r,v=n}}}async function Ir(){await Promise.resolve(),De()}function Dr(){return B.ensure().settled()}function le(e){var t=e.f,n=(t&E)!==0;if(c!==null&&!O){var r=v!==null&&(v.f&H)!==0;if(!r&&!M?.includes(e)){var s=c.deps;if((c.f&Ne)!==0)e.rv<_e&&(e.rv=_e,b===null&&s!==null&&s[A]===e?A++:b===null?b=[e]:(!q||!b.includes(e))&&b.push(e));else{(c.deps??=[]).push(e);var f=e.reactions;f===null?e.reactions=[c]:f.includes(c)||f.push(c)}}}else if(n&&e.deps===null&&e.effects===null){var l=e,u=l.parent;u!==null&&(u.f&R)===0&&(l.f^=R)}if(fe){if(U.has(e))return U.get(e);if(n){l=e;var a=l.v;return((l.f&g)===0&&l.reactions!==null||Pt(l))&&(a=Ve(l)),U.set(l,a),a}}else if(n){if(l=e,S?.has(l))return S.get(l);he(l)&&ht(l)}if(S?.has(e))return S.get(e);if((e.f&W)!==0)throw e.v;return e.v}function Pt(e){if(e.v===m)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(U.has(t)||(t.f&E)!==0&&Pt(t))return!0;return!1}function Pr(e){var t=O;try{return O=!0,e()}finally{O=t}}const Tn=-7169;function y(e,t){e.f=e.f&Tn|t}export{Nr as $,Hn as A,ot as B,ft as C,Q as D,Yn as E,qn as F,G,Qt as H,I,xt as J,pr as K,mn as L,v as M,fr as N,xr as O,ar as P,vr as Q,tr as R,lr as S,Nn as T,hr as U,qt as V,Ar as W,kr as X,Pr as Y,oe as Z,pe as _,er as a,Er as a$,gr as a0,D as a1,ie as a2,Y as a3,Sn as a4,cn as a5,nr as a6,On as a7,K as a8,ue as a9,Jn as aA,kn as aB,Ke as aC,hn as aD,_r as aE,Jt as aF,He as aG,Cn as aH,Tr as aI,Ue as aJ,De as aK,br as aL,Ir as aM,Zn as aN,cr as aO,fn as aP,Dn as aQ,Wn as aR,jt as aS,Xn as aT,xn as aU,yr as aV,m as aW,vn as aX,F as aY,je as aZ,Kn as a_,Mn as aa,Bn as ab,H as ac,Be as ad,Vn as ae,Un as af,Rn as ag,In as ah,Gn as ai,fe as aj,_n as ak,zn as al,$n as am,qe as an,mr as ao,Se as ap,B as aq,se as ar,V as as,Ee as at,rn as au,c as av,me as aw,Fn as ax,de as ay,Le as az,Rr as b,tn as b0,ir as b1,Dr as b2,Te as c,le as d,ur as e,dr as f,Me as g,Z as h,rr as i,Qn as j,k,en as l,Sr as m,wr as n,Ln as o,jn as p,w as q,sr as r,re as s,Ce as t,or as u,Ge as v,An as w,Ct as x,Or as y,En as z};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as x,a as u,p as Tt,c as O}from"./D40Zn55h.js";import{X as ft,h as ut,s as Ot,g as Pt,M as jt,_ as Ft,aY as Nt,aZ as Mt,W as qt,Y as vt,a_ as Bt,aC as dt,ag as zt,B as Dt,a4 as ge,a$ as Rt,N as Ke,P as Qe,a8 as ce,a3 as Ge,Q as S,d as f,R as w,a2 as _t,f as E,S as ne,U as B,O as V,T as tt}from"./BrUe-Qen.js";import{b as Ht,d as le,s as $}from"./vQfHcJV6.js";import{i as L}from"./CoYD6HNm.js";import{a as ht}from"./lH47zGKU.js";import{p as qe}from"./DvOBbqVY.js";import{z as P,f as rt}from"./CUBtP2L9.js";import{I as Be}from"./BNTlty5m.js";import{e as ie,i as oe}from"./DwZYWemd.js";import{a as Vt,r as Yt,s as se,g as at,d as Ut}from"./46qGscyh.js";import{b as Ne}from"./C62F-tXu.js";import{f as Wt}from"./Ch16TNvP.js";import{k as Gt,m as Jt}from"./B2Vkpbkw.js";import{F as nt}from"./DW7-1esk.js";import"./Beh6Ec8J.js";function mt(r,e){ut&&Ot(Pt(r)),ft(()=>{var s=e();for(var a in s){var c=s[a];c?r.style.setProperty(a,c):r.style.removeProperty(a)}})}const Kt=()=>performance.now(),G={tick:r=>requestAnimationFrame(r),now:()=>Kt(),tasks:new Set};function pt(){const r=G.now();G.tasks.forEach(e=>{e.c(r)||(G.tasks.delete(e),e.f())}),G.tasks.size!==0&&G.tick(pt)}function Qt(r){let e;return G.tasks.size===0&&G.tick(pt),{promise:new Promise(s=>{G.tasks.add(e={c:r,f:s})}),abort(){G.tasks.delete(e)}}}function Me(r,e){dt(()=>{r.dispatchEvent(new CustomEvent(e))})}function Xt(r){if(r==="float")return"cssFloat";if(r==="offset")return"cssOffset";if(r.startsWith("--"))return r;const e=r.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(s=>s[0].toUpperCase()+s.slice(1)).join("")}function st(r){const e={},s=r.split(";");for(const a of s){const[c,g]=a.split(":");if(!c||g===void 0)break;const d=Xt(c.trim());e[d]=g.trim()}return e}const Zt=r=>r;function it(r,e,s,a){var c=(r&Bt)!==0,g="both",d,h=e.inert,v=e.style.overflow,n,t;function o(){return dt(()=>d??=s()(e,a?.()??{},{direction:g}))}var b={is_global:c,in(){e.inert=h,Me(e,"introstart"),n=Je(e,o(),t,1,()=>{Me(e,"introend"),n?.abort(),n=d=void 0,e.style.overflow=v})},out(i){e.inert=!0,Me(e,"outrostart"),t=Je(e,o(),n,0,()=>{Me(e,"outroend"),i?.()})},stop:()=>{n?.abort(),t?.abort()}},y=jt;if((y.transitions??=[]).push(b),Ht){var _=c;if(!_){for(var l=y.parent;l&&(l.f&Ft)!==0;)for(;(l=l.parent)&&(l.f&Nt)===0;);_=!l||(l.f&Mt)!==0}_&&qt(()=>{vt(()=>b.in())})}}function Je(r,e,s,a,c){var g=a===1;if(zt(e)){var d,h=!1;return Dt(()=>{if(!h){var i=e({direction:g?"in":"out"});d=Je(r,i,s,a,c)}}),{abort:()=>{h=!0,d?.abort()},deactivate:()=>d.deactivate(),reset:()=>d.reset(),t:()=>d.t()}}if(s?.deactivate(),!e?.duration)return c(),{abort:ge,deactivate:ge,reset:ge,t:()=>a};const{delay:v=0,css:n,tick:t,easing:o=Zt}=e;var b=[];if(g&&s===void 0&&(t&&t(0,1),n)){var y=st(n(0,1));b.push(y,y)}var _=()=>1-a,l=r.animate(b,{duration:v,fill:"forwards"});return l.onfinish=()=>{l.cancel();var i=s?.t()??1-a;s?.abort();var p=a-i,k=e.duration*Math.abs(p),m=[];if(k>0){var I=!1;if(n)for(var C=Math.ceil(k/16.666666666666668),Y=0;Y<=C;Y+=1){var M=i+p*o(Y/C),F=st(n(M,1-M));m.push(F),I||=F.overflow==="hidden"}I&&(r.style.overflow="hidden"),_=()=>{var T=l.currentTime;return i+p*o(T/k)},t&&Qt(()=>{if(l.playState!=="running")return!1;var T=_();return t(T,1-T),!0})}l=r.animate(m,{duration:k,fill:"forwards"}),l.onfinish=()=>{_=()=>a,t?.(a,1-a),c()}},{abort:()=>{l&&(l.cancel(),l.effect=null,l.onfinish=ge)},deactivate:()=>{c=ge},reset:()=>{a===0&&t?.(1,0)},t:()=>_()}}function $t(r,e,s=e){Rt(r,"change",a=>{var c=a?r.defaultChecked:r.checked;s(c)}),(ut&&r.defaultChecked!==r.checked||vt(e)==null)&&s(r.checked),ft(()=>{var a=e();r.checked=!!a})}le(["click"]);const er=r=>r;function ot(r,{delay:e=0,duration:s=400,easing:a=er}={}){const c=+getComputedStyle(r).opacity;return{delay:e,duration:s,easing:a,css:g=>`opacity: ${g*c}`}}var We={exports:{}},ct;function tr(){return ct||(ct=1,(function(r){var e=Object.prototype.hasOwnProperty,s="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(s=!1));function c(v,n,t){this.fn=v,this.context=n,this.once=t||!1}function g(v,n,t,o,b){if(typeof t!="function")throw new TypeError("The listener must be a function");var y=new c(t,o||v,b),_=s?s+n:n;return v._events[_]?v._events[_].fn?v._events[_]=[v._events[_],y]:v._events[_].push(y):(v._events[_]=y,v._eventsCount++),v}function d(v,n){--v._eventsCount===0?v._events=new a:delete v._events[n]}function h(){this._events=new a,this._eventsCount=0}h.prototype.eventNames=function(){var n=[],t,o;if(this._eventsCount===0)return n;for(o in t=this._events)e.call(t,o)&&n.push(s?o.slice(1):o);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},h.prototype.listeners=function(n){var t=s?s+n:n,o=this._events[t];if(!o)return[];if(o.fn)return[o.fn];for(var b=0,y=o.length,_=new Array(y);b<y;b++)_[b]=o[b].fn;return _},h.prototype.listenerCount=function(n){var t=s?s+n:n,o=this._events[t];return o?o.fn?1:o.length:0},h.prototype.emit=function(n,t,o,b,y,_){var l=s?s+n:n;if(!this._events[l])return!1;var i=this._events[l],p=arguments.length,k,m;if(i.fn){switch(i.once&&this.removeListener(n,i.fn,void 0,!0),p){case 1:return i.fn.call(i.context),!0;case 2:return i.fn.call(i.context,t),!0;case 3:return i.fn.call(i.context,t,o),!0;case 4:return i.fn.call(i.context,t,o,b),!0;case 5:return i.fn.call(i.context,t,o,b,y),!0;case 6:return i.fn.call(i.context,t,o,b,y,_),!0}for(m=1,k=new Array(p-1);m<p;m++)k[m-1]=arguments[m];i.fn.apply(i.context,k)}else{var I=i.length,C;for(m=0;m<I;m++)switch(i[m].once&&this.removeListener(n,i[m].fn,void 0,!0),p){case 1:i[m].fn.call(i[m].context);break;case 2:i[m].fn.call(i[m].context,t);break;case 3:i[m].fn.call(i[m].context,t,o);break;case 4:i[m].fn.call(i[m].context,t,o,b);break;default:if(!k)for(C=1,k=new Array(p-1);C<p;C++)k[C-1]=arguments[C];i[m].fn.apply(i[m].context,k)}}return!0},h.prototype.on=function(n,t,o){return g(this,n,t,o,!1)},h.prototype.once=function(n,t,o){return g(this,n,t,o,!0)},h.prototype.removeListener=function(n,t,o,b){var y=s?s+n:n;if(!this._events[y])return this;if(!t)return d(this,y),this;var _=this._events[y];if(_.fn)_.fn===t&&(!b||_.once)&&(!o||_.context===o)&&d(this,y);else{for(var l=0,i=[],p=_.length;l<p;l++)(_[l].fn!==t||b&&!_[l].once||o&&_[l].context!==o)&&i.push(_[l]);i.length?this._events[y]=i.length===1?i[0]:i:d(this,y)}return this},h.prototype.removeAllListeners=function(n){var t;return n?(t=s?s+n:n,this._events[t]&&d(this,t)):(this._events=new a,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=s,h.EventEmitter=h,r.exports=h})(We)),We.exports}tr();function rr(r,...e){const s={};for(const a of e.flat())s[a]=r[a];return s}function pe(r,e,s=/[.[\]'"]/){return e.split(s).filter(a=>a&&a!="__proto__").reduce((a,c)=>a?.[c],r)}function ar(r,e,s,a=/[.[\]'"]/){return e.split(a).filter(c=>c&&c!="__proto__").reduce((c,g,d)=>c[g]=e.split(a).filter(h=>h).length===++d?s:c[g]||{},r)}function nr(r){return new Promise(e=>setTimeout(e,r))}const lt=Intl.NumberFormat("en",{notation:"compact"});lt.format.bind(lt);async function sr(r,...e){const s=new Blob(e,{type:r}),a=new ClipboardItem({[r]:s});await navigator.clipboard.write([a])}var ir=x('<span class="svelte-1jyuowb"><!></span>'),or=x('<span class="svelte-1jyuowb"><!></span>'),cr=x('<button class="svelte-1jyuowb"><!></button>');const lr={hash:"svelte-1jyuowb",code:"button.svelte-1jyuowb {position:relative;display:inline-block;width:1em;height:1em;border:none;background:transparent;}span.svelte-1jyuowb {position:absolute;inset:0;}"};function Wr(r,e){Ke(e,!0),ht(r,lr);const s=qe(e,"type",3,"text/plain");let a=Ge(!1);async function c(){await sr(s(),e.value),ce(a,!0),await nr(3e3),ce(a,!1)}var g=cr();g.__click=c;var d=S(g);{var h=n=>{var t=ir(),o=S(t);Be(o,{i:"check"}),w(t),it(3,t,()=>ot),u(n,t)},v=n=>{var t=or(),o=S(t);Be(o,{i:"copy"}),w(t),it(3,t,()=>ot),u(n,t)};L(d,n=>{f(a)?n(h):n(v,!1)})}w(g),u(r,g),Qe()}le(["click"]);var fr=x("<input/>"),ur=x('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1),vr=x('<input type="checkbox" class="svelte-5ofwln"/> <label class="checkbox svelte-5ofwln"><!></label>',1),dr=x("<option> </option>"),_r=x("<select></select>"),hr=x('<div class="pref-record-entry"><!></div>'),mr=x('<div class="pref-sub"></div>'),pr=x('<div class="pref-record-entry"><label> </label> <!></div>'),gr=x('<div class="pref-sub"></div>'),yr=x('<div class="pref-sub"><label> </label> <!></div>'),br=x('<div class="pref-sub"></div>'),wr=x("<option> </option>"),xr=x("<select></select>"),kr=x('<i class="error-text"> </i>');const Cr={hash:"svelte-5ofwln",code:"input[type='checkbox'].svelte-5ofwln {display:none;}label.checkbox.svelte-5ofwln {cursor:pointer;width:1.5em;height:1.5em;border:1px solid var(--border-accent);border-radius:0.5em;display:inline-flex;justify-content:center;align-items:center;}"};function Oe(r,e){const s=Tt();Ke(e,!0),ht(r,Cr);const a=(l,i=ge)=>{var p=fr();Vt(p,()=>({id:s,...i(),value:f(v),onchange:t,required:!g()}),void 0,void 0,void 0,"svelte-5ofwln",!0),Ne(p,k=>ce(d,k),()=>f(d)),u(l,p)};let c=qe(e,"preferences",15),g=qe(e,"optional",3,!1),d=Ge(void 0),h=Ge(_t(e.schema.def.type=="boolean"&&pe(c(),e.path)));const v=ne(()=>pe(c(),e.path)??pe(rt,e.path));function n(l,i){if(!l)return null;const p=T=>String(T).padStart(2,"0"),k=l.getFullYear(),m=p(l.getMonth()+1),I=p(l.getDate()),C=`${k}-${m}-${I}`,Y=p(l.getHours()),M=p(l.getMinutes()),F=`${Y}:${M}`;switch(i){case"date":return C;case"time":return F;case"time+sec":return`${F}:${p(l.getSeconds())}`;case"datetime":default:return`${C}T${F}`}}function t(l){const i=e.schema.parse(f(d)instanceof HTMLInputElement&&f(d).type==="checkbox"?f(d).checked:f(d).value);if(i!=pe(c(),e.path)){if(pe(rt,e.path)==i){const p=e.path.split("."),k=p.pop();delete pe(c(),p.join("."))[k]}else ar(c(),e.path,i);Wt("PATCH","users/:id",{preferences:c()},e.userId)}}var o=O(),b=E(o);{var y=l=>{{let i=ne(()=>({type:e.schema.format=="email"?"email":"text",...rr(e.schema,"minLength","maxLength")}));a(l,()=>f(i))}},_=l=>{var i=O(),p=E(i);{var k=I=>{{let C=ne(()=>({type:"number",min:e.schema.minValue,max:e.schema.maxValue,step:e.schema.format?.includes("int")?1:.1}));a(I,()=>f(C))}},m=I=>{var C=O(),Y=E(C);{var M=T=>{{let A=ne(()=>({type:"number",min:Number(e.schema.minValue),max:Number(e.schema.maxValue),step:1}));a(T,()=>f(A))}},F=T=>{var A=O(),J=E(A);{var ye=fe=>{var be=vr(),U=E(be);Yt(U),U.__change=t,Ne(U,N=>ce(d,N),()=>f(d));var we=B(U,2),De=S(we);{var K=N=>{var Pe=ur(),xe=E(Pe);mt(xe,()=>({"--size":"1.3em"})),Be(xe.lastChild,{i:"check"}),w(xe),u(N,Pe)};L(De,N=>{f(h)&&N(K)})}w(we),V(()=>{se(U,"id",s),U.required=!g(),se(we,"for",s)}),$t(U,()=>f(h),N=>ce(h,N)),u(fe,be)},ze=fe=>{var be=O(),U=E(be);{var we=K=>{{let N=ne(()=>({type:"date",min:n(e.schema.minDate,"date"),max:n(e.schema.maxDate,"date")}));a(K,()=>f(N))}},De=K=>{var N=O(),Pe=E(N);{var xe=ke=>{},gt=ke=>{var Xe=O(),yt=E(Xe);{var bt=ue=>{var z=_r();z.__change=t,ie(z,21,()=>e.schema.values,oe,(Ce,ve)=>{var Q=dr(),ee=S(Q,!0);w(Q);var Ee={};V(()=>{at(Q,f(v)===f(ve)),$(ee,f(ve)),Ee!==(Ee=f(ve))&&(Q.value=(Q.__value=f(ve))??"")}),u(Ce,Q)}),w(z),Ne(z,Ce=>ce(d,Ce),()=>f(d)),V(()=>{se(z,"id",s),z.required=!g()}),u(ue,z)},wt=ue=>{var z=O(),Ce=E(z);{var ve=ee=>{},Q=ee=>{var Ee=O(),xt=E(Ee);{var kt=de=>{Oe(de,{get userId(){return e.userId},get path(){return e.path},get schema(){return e.schema.def.innerType},optional:!0,get preferences(){return c()},set preferences(je){c(je)}})},Ct=de=>{var je=O(),Et=E(je);{var At=_e=>{var he=mr();ie(he,21,()=>f(v),oe,(Re,Ze,He)=>{var D=hr(),X=S(D);Oe(X,{get userId(){return e.userId},get path(){return`${e.path??""}.${He}`},get schema(){return e.schema.element},get preferences(){return c()},set preferences(Ae){c(Ae)}}),w(D),u(Re,D)}),w(he),u(_e,he)},Lt=_e=>{var he=O(),Re=E(he);{var Ze=D=>{var X=gr();ie(X,21,()=>Object.keys(f(v)),oe,(Ae,Fe)=>{var Le=pr(),q=S(Le),te=S(q,!0);w(q);var Se=B(q,2);Oe(Se,{get userId(){return e.userId},get path(){return`${e.path??""}.${f(Fe)??""}`},get schema(){return e.schema.valueType},get preferences(){return c()},set preferences(Ie){c(Ie)}}),w(Le),V(()=>{se(q,"for",s),$(te,f(Fe))}),u(Ae,Le)}),w(X),u(D,X)},He=D=>{var X=O(),Ae=E(X);{var Fe=q=>{var te=O(),Se=E(te);ie(Se,17,()=>Object.entries(e.schema.shape),oe,(Ie,Ve)=>{var W=ne(()=>tt(f(Ve),2));let R=()=>f(W)[0],Te=()=>f(W)[1];var re=yr(),Z=S(re),H=S(Z,!0);w(Z);var j=B(Z,2);Oe(j,{get userId(){return e.userId},get path(){return`${e.path??""}.${R()??""}`},get schema(){return Te()},get preferences(){return c()},set preferences(ae){c(ae)}}),w(re),V(()=>{se(Z,"for",s),$(H,R())}),u(Ie,re)}),u(q,te)},Le=q=>{var te=O(),Se=E(te);{var Ie=W=>{var R=br();ie(R,21,()=>e.schema.def.items,oe,(Te,re,Z)=>{Oe(Te,{get userId(){return e.userId},get path(){return`${e.path??""}.${Z}`},get schema(){return f(re)},get preferences(){return c()},set preferences(H){c(H)}})}),w(R),V(()=>se(R,"data-rest",e.schema.def.rest)),u(W,R)},Ve=W=>{var R=O(),Te=E(R);{var re=H=>{var j=xr();j.__change=t,ie(j,21,()=>Object.entries(e.schema.enum),oe,(ae,Ye)=>{var $e=ne(()=>tt(f(Ye),2));let St=()=>f($e)[0],Ue=()=>f($e)[1];var me=wr(),It=S(me,!0);w(me);var et={};V(()=>{at(me,f(v)===Ue()),$(It,St()),et!==(et=Ue())&&(me.value=(me.__value=Ue())??"")}),u(ae,me)}),w(j),Ne(j,ae=>ce(d,ae),()=>f(d)),V(()=>{se(j,"id",s),j.required=!g()}),u(H,j)},Z=H=>{var j=kr(),ae=S(j);w(j),V(Ye=>$(ae,`Invalid preference type: ${Ye??""}`),[()=>JSON.stringify(e.schema?.def?.type)]),u(H,j)};L(Te,H=>{P(e.schema,"enum")?H(re):H(Z,!1)},!0)}u(W,R)};L(Se,W=>{P(e.schema,"tuple")?W(Ie):W(Ve,!1)},!0)}u(q,te)};L(Ae,q=>{P(e.schema,"object")?q(Fe):q(Le,!1)},!0)}u(D,X)};L(Re,D=>{P(e.schema,"record")?D(Ze):D(He,!1)},!0)}u(_e,he)};L(Et,_e=>{P(e.schema,"array")?_e(At):_e(Lt,!1)},!0)}u(de,je)};L(xt,de=>{P(e.schema,"nullable")||P(e.schema,"optional")?de(kt):de(Ct,!1)},!0)}u(ee,Ee)};L(Ce,ee=>{P(e.schema,"template_literal")?ee(ve):ee(Q,!1)},!0)}u(ue,z)};L(yt,ue=>{P(e.schema,"literal")?ue(bt):ue(wt,!1)},!0)}u(ke,Xe)};L(Pe,ke=>{P(e.schema,"file")?ke(xe):ke(gt,!1)},!0)}u(K,N)};L(U,K=>{P(e.schema,"date")?K(we):K(De,!1)},!0)}u(fe,be)};L(J,fe=>{P(e.schema,"boolean")?fe(ye):fe(ze,!1)},!0)}u(T,A)};L(Y,T=>{P(e.schema,"bigint")?T(M):T(F,!1)},!0)}u(I,C)};L(p,I=>{P(e.schema,"number")?I(k):I(m,!1)},!0)}u(l,i)};L(b,l=>{P(e.schema,"string")?l(y):l(_,!1)})}u(r,o),Qe()}le(["change"]);var Er=x('<span class="current">Current</span>'),Ar=x('<span class="elevated">Elevated</span>'),Lr=x("<p>Are you sure you want to log out this session?</p>"),Sr=x('<div class="item session"><p> <!> <!></p> <p> </p> <p> </p> <button><svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper></button></div> <!>',1),Ir=x("<p>Are you sure you want to log out all sessions?</p>"),Tr=x('<!> <span><button class="danger">Logout All</button></span> <!>',1);function Gr(r,e){Ke(e,!0);let s=qe(e,"redirectAfterLogoutAll",3,!1);const a=_t({});var c=Tr(),g=E(c);ie(g,17,()=>e.sessions,oe,(n,t)=>{var o=Sr(),b=E(o),y=S(b),_=S(y),l=B(_);{var i=A=>{var J=Er();u(A,J)};L(l,A=>{f(t).id==e.currentSession?.id&&A(i)})}var p=B(l,2);{var k=A=>{var J=Ar();u(A,J)};L(p,A=>{f(t).elevated&&A(k)})}w(y);var m=B(y,2),I=S(m);w(m);var C=B(m,2),Y=S(C);w(C);var M=B(C,2);M.__click=()=>a["logout#"+f(t).id].showModal(),Ut(M,"",{},{display:"contents"});var F=S(M);mt(F,()=>({"--size":"16px"})),Be(F.lastChild,{i:"right-from-bracket"}),w(F),w(M),w(b);var T=B(b,2);nt(T,{submit:async()=>{await Jt(e.user.id,f(t).id),a["logout#"+f(t).id].remove(),e.sessions.splice(e.sessions.indexOf(f(t)),1),f(t).id==e.currentSession?.id&&(window.location.href="/")},submitText:"Logout",get dialog(){return a["logout#"+f(t).id]},set dialog(A){a["logout#"+f(t).id]=A},children:(A,J)=>{var ye=Lr();u(A,ye)},$$slots:{default:!0}}),V((A,J,ye,ze)=>{$(_,`${A??""}...${J??""} `),$(I,`Created ${ye??""}`),$(Y,`Expires ${ze??""}`)},[()=>f(t).id.slice(0,4),()=>f(t).id.slice(-4),()=>f(t).created.toLocaleString(),()=>f(t).expires.toLocaleString()]),u(n,o)});var d=B(g,2),h=S(d);h.__click=()=>a.logout_all.showModal(),w(d);var v=B(d,2);nt(v,{submit:()=>Gt(e.user.id).then(()=>s()?window.location.href="/":null),submitText:"Logout All Sessions",submitDanger:!0,get dialog(){return a.logout_all},set dialog(n){a.logout_all=n},children:(n,t)=>{var o=Ir();u(n,o)},$$slots:{default:!0}}),u(r,c),Qe()}le(["click"]);le(["click"]);le(["click"]);le(["click"]);export{Wr as C,Oe as P,Gr as S,mt as c};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as t,X as b,Y as h,B as k,Z as B}from"./BrUe-Qen.js";function u(r,i){return r===i||r?.[B]===i}function Y(r={},i,a,S){return t(()=>{var f,s;return b(()=>{f=s,s=[],h(()=>{r!==a(...s)&&(i(r,...s),f&&u(a(...f),r)&&i(null,...f))})}),()=>{k(()=>{s&&u(a(...s),r)&&i(null,...s)})}}),r}export{Y as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
-`�̩��%�}����c.)A�-oպt1��H�~��&4E�ts�ũC^o\ݴ��j�Y��9n���"e��Y�^&�s���C떻$���g ��^��2[�'�|��{ƜȄ�ӽ]�����*4\�q>��{bf5�6�IPL���u��@��t��ƧAx��+թk���`7ץx[
|
|
Binary file
|