@absolutejs/absolute 0.6.1 → 0.6.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.
@@ -16192,8 +16192,8 @@ var require_create = __commonJS((exports, module) => {
16192
16192
  var normalize = require_normalize();
16193
16193
  var Schema = require_schema();
16194
16194
  var DefinedInfo = require_defined_info();
16195
- module.exports = create2;
16196
- function create2(definition) {
16195
+ module.exports = create;
16196
+ function create(definition) {
16197
16197
  var space = definition.space;
16198
16198
  var mustUseProperty = definition.mustUseProperty || [];
16199
16199
  var attributes = definition.attributes || {};
@@ -16218,8 +16218,8 @@ var require_create = __commonJS((exports, module) => {
16218
16218
 
16219
16219
  // node_modules/property-information/lib/xlink.js
16220
16220
  var require_xlink = __commonJS((exports, module) => {
16221
- var create2 = require_create();
16222
- module.exports = create2({
16221
+ var create = require_create();
16222
+ module.exports = create({
16223
16223
  space: "xlink",
16224
16224
  transform: xlinkTransform,
16225
16225
  properties: {
@@ -16239,8 +16239,8 @@ var require_xlink = __commonJS((exports, module) => {
16239
16239
 
16240
16240
  // node_modules/property-information/lib/xml.js
16241
16241
  var require_xml = __commonJS((exports, module) => {
16242
- var create2 = require_create();
16243
- module.exports = create2({
16242
+ var create = require_create();
16243
+ module.exports = create({
16244
16244
  space: "xml",
16245
16245
  transform: xmlTransform,
16246
16246
  properties: {
@@ -16273,9 +16273,9 @@ var require_case_insensitive_transform = __commonJS((exports, module) => {
16273
16273
 
16274
16274
  // node_modules/property-information/lib/xmlns.js
16275
16275
  var require_xmlns = __commonJS((exports, module) => {
16276
- var create2 = require_create();
16276
+ var create = require_create();
16277
16277
  var caseInsensitiveTransform = require_case_insensitive_transform();
16278
- module.exports = create2({
16278
+ module.exports = create({
16279
16279
  space: "xmlns",
16280
16280
  attributes: {
16281
16281
  xmlnsxlink: "xmlns:xlink"
@@ -16291,11 +16291,11 @@ var require_xmlns = __commonJS((exports, module) => {
16291
16291
  // node_modules/property-information/lib/aria.js
16292
16292
  var require_aria = __commonJS((exports, module) => {
16293
16293
  var types2 = require_types();
16294
- var create2 = require_create();
16294
+ var create = require_create();
16295
16295
  var booleanish = types2.booleanish;
16296
16296
  var number = types2.number;
16297
16297
  var spaceSeparated = types2.spaceSeparated;
16298
- module.exports = create2({
16298
+ module.exports = create({
16299
16299
  transform: ariaTransform,
16300
16300
  properties: {
16301
16301
  ariaActiveDescendant: null,
@@ -16357,7 +16357,7 @@ var require_aria = __commonJS((exports, module) => {
16357
16357
  // node_modules/property-information/lib/html.js
16358
16358
  var require_html = __commonJS((exports, module) => {
16359
16359
  var types2 = require_types();
16360
- var create2 = require_create();
16360
+ var create = require_create();
16361
16361
  var caseInsensitiveTransform = require_case_insensitive_transform();
16362
16362
  var boolean = types2.boolean;
16363
16363
  var overloadedBoolean = types2.overloadedBoolean;
@@ -16365,7 +16365,7 @@ var require_html = __commonJS((exports, module) => {
16365
16365
  var number = types2.number;
16366
16366
  var spaceSeparated = types2.spaceSeparated;
16367
16367
  var commaSeparated = types2.commaSeparated;
16368
- module.exports = create2({
16368
+ module.exports = create({
16369
16369
  space: "html",
16370
16370
  attributes: {
16371
16371
  acceptcharset: "accept-charset",
@@ -20060,7 +20060,7 @@ var require_prism_core = __commonJS((exports, module) => {
20060
20060
  break;
20061
20061
  }
20062
20062
  var from = match.index;
20063
- var to2 = match.index + match[0].length;
20063
+ var to3 = match.index + match[0].length;
20064
20064
  var p = pos;
20065
20065
  p += currentNode.value.length;
20066
20066
  while (from >= p) {
@@ -20072,7 +20072,7 @@ var require_prism_core = __commonJS((exports, module) => {
20072
20072
  if (currentNode.value instanceof Token) {
20073
20073
  continue;
20074
20074
  }
20075
- for (var k = currentNode;k !== tokenList.tail && (p < to2 || typeof k.value === "string"); k = k.next) {
20075
+ for (var k = currentNode;k !== tokenList.tail && (p < to3 || typeof k.value === "string"); k = k.next) {
20076
20076
  removeCount++;
20077
20077
  p += k.value.length;
20078
20078
  }
@@ -42116,6 +42116,7 @@ function becomeIdle(self2) {
42116
42116
  });
42117
42117
  }
42118
42118
  }
42119
+ var to2 = (source, ...args) => new Interpolation(source, args);
42119
42120
  globals_exports.assign({
42120
42121
  createStringInterpolator: createStringInterpolator2,
42121
42122
  to: (source, args) => new Interpolation(source, args)
@@ -42521,6 +42522,7 @@ var bodyDefault = (themeSprings) => ({
42521
42522
  flexDirection: "column",
42522
42523
  fontFamily: "Poppins, sans-serif",
42523
42524
  height: "100%",
42525
+ lineHeight: "1.4",
42524
42526
  margin: 0
42525
42527
  });
42526
42528
  var mainDefault = {
@@ -42533,8 +42535,8 @@ var htmlDefault = {
42533
42535
  height: "100%"
42534
42536
  };
42535
42537
  var buttonStyle = ({
42536
- backgroundColor = "none",
42537
- color = "white",
42538
+ backgroundColor,
42539
+ color,
42538
42540
  width
42539
42541
  }) => ({
42540
42542
  alignItems: "center",
@@ -43027,492 +43029,106 @@ var PerformanceArticle = ({ themeSprings }) => /* @__PURE__ */ jsx_dev_runtime8.
43027
43029
  ]
43028
43030
  }, undefined, true, undefined, this);
43029
43031
 
43030
- // node_modules/react-syntax-highlighter/dist/esm/styles/prism/prism.js
43031
- var prism_default = {
43032
- 'code[class*="language-"]': {
43033
- color: "black",
43034
- background: "none",
43035
- textShadow: "0 1px white",
43036
- fontFamily: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
43037
- fontSize: "1em",
43038
- textAlign: "left",
43039
- whiteSpace: "pre",
43040
- wordSpacing: "normal",
43041
- wordBreak: "normal",
43042
- wordWrap: "normal",
43043
- lineHeight: "1.5",
43044
- MozTabSize: "4",
43045
- OTabSize: "4",
43046
- tabSize: "4",
43047
- WebkitHyphens: "none",
43048
- MozHyphens: "none",
43049
- msHyphens: "none",
43050
- hyphens: "none"
43051
- },
43052
- 'pre[class*="language-"]': {
43053
- color: "black",
43054
- background: "#f5f2f0",
43055
- textShadow: "0 1px white",
43056
- fontFamily: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
43057
- fontSize: "1em",
43058
- textAlign: "left",
43059
- whiteSpace: "pre",
43060
- wordSpacing: "normal",
43061
- wordBreak: "normal",
43062
- wordWrap: "normal",
43063
- lineHeight: "1.5",
43064
- MozTabSize: "4",
43065
- OTabSize: "4",
43066
- tabSize: "4",
43067
- WebkitHyphens: "none",
43068
- MozHyphens: "none",
43069
- msHyphens: "none",
43070
- hyphens: "none",
43071
- padding: "1em",
43072
- margin: ".5em 0",
43073
- overflow: "auto"
43074
- },
43075
- 'pre[class*="language-"]::-moz-selection': {
43076
- textShadow: "none",
43077
- background: "#b3d4fc"
43078
- },
43079
- 'pre[class*="language-"] ::-moz-selection': {
43080
- textShadow: "none",
43081
- background: "#b3d4fc"
43082
- },
43083
- 'code[class*="language-"]::-moz-selection': {
43084
- textShadow: "none",
43085
- background: "#b3d4fc"
43086
- },
43087
- 'code[class*="language-"] ::-moz-selection': {
43088
- textShadow: "none",
43089
- background: "#b3d4fc"
43090
- },
43091
- 'pre[class*="language-"]::selection': {
43092
- textShadow: "none",
43093
- background: "#b3d4fc"
43094
- },
43095
- 'pre[class*="language-"] ::selection': {
43096
- textShadow: "none",
43097
- background: "#b3d4fc"
43098
- },
43099
- 'code[class*="language-"]::selection': {
43100
- textShadow: "none",
43101
- background: "#b3d4fc"
43102
- },
43103
- 'code[class*="language-"] ::selection': {
43104
- textShadow: "none",
43105
- background: "#b3d4fc"
43106
- },
43107
- ':not(pre) > code[class*="language-"]': {
43108
- background: "#f5f2f0",
43109
- padding: ".1em",
43110
- borderRadius: ".3em",
43111
- whiteSpace: "normal"
43112
- },
43113
- comment: {
43114
- color: "slategray"
43115
- },
43116
- prolog: {
43117
- color: "slategray"
43118
- },
43119
- doctype: {
43120
- color: "slategray"
43121
- },
43122
- cdata: {
43123
- color: "slategray"
43124
- },
43125
- punctuation: {
43126
- color: "#999"
43127
- },
43128
- namespace: {
43129
- Opacity: ".7"
43130
- },
43131
- property: {
43132
- color: "#905"
43133
- },
43134
- tag: {
43135
- color: "#905"
43136
- },
43137
- boolean: {
43138
- color: "#905"
43139
- },
43140
- number: {
43141
- color: "#905"
43142
- },
43143
- constant: {
43144
- color: "#905"
43145
- },
43146
- symbol: {
43147
- color: "#905"
43148
- },
43149
- deleted: {
43150
- color: "#905"
43151
- },
43152
- selector: {
43153
- color: "#690"
43154
- },
43155
- "attr-name": {
43156
- color: "#690"
43157
- },
43158
- string: {
43159
- color: "#690"
43160
- },
43161
- char: {
43162
- color: "#690"
43163
- },
43164
- builtin: {
43165
- color: "#690"
43166
- },
43167
- inserted: {
43168
- color: "#690"
43169
- },
43170
- operator: {
43171
- color: "#9a6e3a",
43172
- background: "hsla(0, 0%, 100%, .5)"
43173
- },
43174
- entity: {
43175
- color: "#9a6e3a",
43176
- background: "hsla(0, 0%, 100%, .5)",
43177
- cursor: "help"
43032
+ // src/frontend/data/typeSafeCode.ts
43033
+ var databaseCode = `import { NeonHttpDatabase } from 'drizzle-orm/neon-http';
43034
+ import { pgTable, varchar, timestamp, jsonb } from 'drizzle-orm/pg-core';
43035
+
43036
+ export const users = pgTable('users', {
43037
+ auth_sub: varchar('auth_sub', { length: 255 }).primaryKey(),
43038
+ created_at: timestamp('created_at').notNull().defaultNow(),
43039
+ metadata: jsonb('metadata').$type<Record<string, unknown>>().default({})
43040
+ });
43041
+
43042
+ export const schema = {
43043
+ users,
43044
+ };
43045
+
43046
+ export type User = typeof users.$inferSelect;
43047
+ export type NewUser = typeof users.$inferInsert;
43048
+
43049
+ export type SchemaType = typeof schema;
43050
+ export type DatabaseType = NeonHttpDatabase<SchemaType>;`;
43051
+ var backendCode = `import { build, getEnvVar, handleReactPageRequest, networkingPlugin } from '@absolutejs/absolute';
43052
+ import { Home } from '../frontend/pages/Home';
43053
+ import { Elysia, env } from 'elysia';
43054
+ import { neon } from '@neondatabase/serverless';
43055
+ import { drizzle } from 'drizzle-orm/neon-http';
43056
+ import { schema, User } from '../../db/schema';
43057
+
43058
+ const manifest = await build({
43059
+ reactDirectory: 'src/frontend'
43060
+ });
43061
+
43062
+ if (manifest === null || manifest['HomeIndex'] === undefined) {
43063
+ throw new Error('Failed to build manifest');
43064
+ }
43065
+
43066
+ const sql = neon(getEnvVar('DATABASE_URL'))
43067
+ const db = drizzle(sql, { schema });
43068
+
43069
+ const server = new Elysia()
43070
+ .get('/', () => handleReactPageRequest(Home, manifest['HomeIndex']))
43071
+ .get('/api/users/:subject',
43072
+ async ({ status, params: { subject } }) => {
43073
+ try {
43074
+ const [user] = db.select().from(schema.users).where(schema.users.auth_sub.eq(subject))
43075
+ return user === undefined ? status(404, 'User not found') : user;
43076
+ } catch ( error ) {
43077
+ return status(500, 'Internal Server Error while fetching user');
43078
+ }
43079
+ }
43080
+
43081
+ export type Server = typeof server;`;
43082
+ var treatyCode = `import { treaty } from '@elysiajs/eden';
43083
+ import type { Server } from '../../backend/server';
43084
+
43085
+ const serverUrl =
43086
+ typeof window !== 'undefined'
43087
+ ? window.location.origin
43088
+ : 'http://localhost:3000';
43089
+
43090
+ export const server = treaty<Server>(serverUrl);`;
43091
+ var frontendCode = `import { server } from '../eden/treaty';
43092
+ import { Head } from '../components/page/Head';
43093
+ import { bodyDefault, htmlDefault, mainDefault } from '../styles';
43094
+
43095
+ export const Home = () => {
43096
+ const { data, error } = await server.api.users({subject:"EXAMPLE|12345"}).get();
43097
+
43098
+ if( error !== null ) return (error);
43099
+
43100
+ return (
43101
+ <html lang="en" style={htmlDefault}>
43102
+ <Head />
43103
+ <body style={bodyDefault}>
43104
+ <main style={mainDefault}>
43105
+ <h1>{data.auth_sub}</h1>
43106
+ <p>Created at: {data.created_at}</p>
43107
+ </main>
43108
+ </body>
43109
+ </html>
43110
+ );
43111
+ };`;
43112
+
43113
+ // src/frontend/data/typeArticleData.tsx
43114
+ var typeArticleData = [
43115
+ {
43116
+ codeString: databaseCode,
43117
+ description: "Define your database schema with type safety using an ORM like Drizzle.",
43118
+ language: "typescript",
43119
+ title: "Database"
43178
43120
  },
43179
- url: {
43180
- color: "#9a6e3a",
43181
- background: "hsla(0, 0%, 100%, .5)"
43121
+ {
43122
+ codeString: backendCode,
43123
+ description: "Build your backend and Elysia's built in typebox integration will infer types from your routes.",
43124
+ language: "typescript",
43125
+ title: "Backend"
43182
43126
  },
43183
- ".language-css .token.string": {
43184
- color: "#9a6e3a",
43185
- background: "hsla(0, 0%, 100%, .5)"
43186
- },
43187
- ".style .token.string": {
43188
- color: "#9a6e3a",
43189
- background: "hsla(0, 0%, 100%, .5)"
43190
- },
43191
- atrule: {
43192
- color: "#07a"
43193
- },
43194
- "attr-value": {
43195
- color: "#07a"
43196
- },
43197
- keyword: {
43198
- color: "#07a"
43199
- },
43200
- function: {
43201
- color: "#DD4A68"
43202
- },
43203
- "class-name": {
43204
- color: "#DD4A68"
43205
- },
43206
- regex: {
43207
- color: "#e90"
43208
- },
43209
- important: {
43210
- color: "#e90",
43211
- fontWeight: "bold"
43212
- },
43213
- variable: {
43214
- color: "#e90"
43215
- },
43216
- bold: {
43217
- fontWeight: "bold"
43218
- },
43219
- italic: {
43220
- fontStyle: "italic"
43221
- }
43222
- };
43223
- // node_modules/react-syntax-highlighter/dist/esm/styles/prism/night-owl.js
43224
- var night_owl_default = {
43225
- 'code[class*="language-"]': {
43226
- color: "#d6deeb",
43227
- fontFamily: 'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',
43228
- textAlign: "left",
43229
- whiteSpace: "pre",
43230
- wordSpacing: "normal",
43231
- wordBreak: "normal",
43232
- wordWrap: "normal",
43233
- lineHeight: "1.5",
43234
- fontSize: "1em",
43235
- MozTabSize: "4",
43236
- OTabSize: "4",
43237
- tabSize: "4",
43238
- WebkitHyphens: "none",
43239
- MozHyphens: "none",
43240
- msHyphens: "none",
43241
- hyphens: "none"
43242
- },
43243
- 'pre[class*="language-"]': {
43244
- color: "white",
43245
- fontFamily: 'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',
43246
- textAlign: "left",
43247
- whiteSpace: "pre",
43248
- wordSpacing: "normal",
43249
- wordBreak: "normal",
43250
- wordWrap: "normal",
43251
- lineHeight: "1.5",
43252
- fontSize: "1em",
43253
- MozTabSize: "4",
43254
- OTabSize: "4",
43255
- tabSize: "4",
43256
- WebkitHyphens: "none",
43257
- MozHyphens: "none",
43258
- msHyphens: "none",
43259
- hyphens: "none",
43260
- padding: "1em",
43261
- margin: "0.5em 0",
43262
- overflow: "auto",
43263
- background: "#011627"
43264
- },
43265
- 'pre[class*="language-"]::-moz-selection': {
43266
- textShadow: "none",
43267
- background: "rgba(29, 59, 83, 0.99)"
43268
- },
43269
- 'pre[class*="language-"] ::-moz-selection': {
43270
- textShadow: "none",
43271
- background: "rgba(29, 59, 83, 0.99)"
43272
- },
43273
- 'code[class*="language-"]::-moz-selection': {
43274
- textShadow: "none",
43275
- background: "rgba(29, 59, 83, 0.99)"
43276
- },
43277
- 'code[class*="language-"] ::-moz-selection': {
43278
- textShadow: "none",
43279
- background: "rgba(29, 59, 83, 0.99)"
43280
- },
43281
- 'pre[class*="language-"]::selection': {
43282
- textShadow: "none",
43283
- background: "rgba(29, 59, 83, 0.99)"
43284
- },
43285
- 'pre[class*="language-"] ::selection': {
43286
- textShadow: "none",
43287
- background: "rgba(29, 59, 83, 0.99)"
43288
- },
43289
- 'code[class*="language-"]::selection': {
43290
- textShadow: "none",
43291
- background: "rgba(29, 59, 83, 0.99)"
43292
- },
43293
- 'code[class*="language-"] ::selection': {
43294
- textShadow: "none",
43295
- background: "rgba(29, 59, 83, 0.99)"
43296
- },
43297
- ':not(pre) > code[class*="language-"]': {
43298
- color: "white",
43299
- background: "#011627",
43300
- padding: "0.1em",
43301
- borderRadius: "0.3em",
43302
- whiteSpace: "normal"
43303
- },
43304
- comment: {
43305
- color: "rgb(99, 119, 119)",
43306
- fontStyle: "italic"
43307
- },
43308
- prolog: {
43309
- color: "rgb(99, 119, 119)",
43310
- fontStyle: "italic"
43311
- },
43312
- cdata: {
43313
- color: "rgb(99, 119, 119)",
43314
- fontStyle: "italic"
43315
- },
43316
- punctuation: {
43317
- color: "rgb(199, 146, 234)"
43318
- },
43319
- ".namespace": {
43320
- color: "rgb(178, 204, 214)"
43321
- },
43322
- deleted: {
43323
- color: "rgba(239, 83, 80, 0.56)",
43324
- fontStyle: "italic"
43325
- },
43326
- symbol: {
43327
- color: "rgb(128, 203, 196)"
43328
- },
43329
- property: {
43330
- color: "rgb(128, 203, 196)"
43331
- },
43332
- tag: {
43333
- color: "rgb(127, 219, 202)"
43334
- },
43335
- operator: {
43336
- color: "rgb(127, 219, 202)"
43337
- },
43338
- keyword: {
43339
- color: "rgb(127, 219, 202)"
43340
- },
43341
- boolean: {
43342
- color: "rgb(255, 88, 116)"
43343
- },
43344
- number: {
43345
- color: "rgb(247, 140, 108)"
43346
- },
43347
- constant: {
43348
- color: "rgb(130, 170, 255)"
43349
- },
43350
- function: {
43351
- color: "rgb(130, 170, 255)"
43352
- },
43353
- builtin: {
43354
- color: "rgb(130, 170, 255)"
43355
- },
43356
- char: {
43357
- color: "rgb(130, 170, 255)"
43358
- },
43359
- selector: {
43360
- color: "rgb(199, 146, 234)",
43361
- fontStyle: "italic"
43362
- },
43363
- doctype: {
43364
- color: "rgb(199, 146, 234)",
43365
- fontStyle: "italic"
43366
- },
43367
- "attr-name": {
43368
- color: "rgb(173, 219, 103)",
43369
- fontStyle: "italic"
43370
- },
43371
- inserted: {
43372
- color: "rgb(173, 219, 103)",
43373
- fontStyle: "italic"
43374
- },
43375
- string: {
43376
- color: "rgb(173, 219, 103)"
43377
- },
43378
- url: {
43379
- color: "rgb(173, 219, 103)"
43380
- },
43381
- entity: {
43382
- color: "rgb(173, 219, 103)"
43383
- },
43384
- ".language-css .token.string": {
43385
- color: "rgb(173, 219, 103)"
43386
- },
43387
- ".style .token.string": {
43388
- color: "rgb(173, 219, 103)"
43389
- },
43390
- "class-name": {
43391
- color: "rgb(255, 203, 139)"
43392
- },
43393
- atrule: {
43394
- color: "rgb(255, 203, 139)"
43395
- },
43396
- "attr-value": {
43397
- color: "rgb(255, 203, 139)"
43398
- },
43399
- regex: {
43400
- color: "rgb(214, 222, 235)"
43401
- },
43402
- important: {
43403
- color: "rgb(214, 222, 235)",
43404
- fontWeight: "bold"
43405
- },
43406
- variable: {
43407
- color: "rgb(214, 222, 235)"
43408
- },
43409
- bold: {
43410
- fontWeight: "bold"
43411
- },
43412
- italic: {
43413
- fontStyle: "italic"
43414
- }
43415
- };
43416
- // src/frontend/data/typeSafeCode.ts
43417
- var databaseCode = `import { NeonHttpDatabase } from 'drizzle-orm/neon-http';
43418
- import { pgTable, varchar, timestamp, jsonb } from 'drizzle-orm/pg-core';
43419
-
43420
- export const users = pgTable('users', {
43421
- auth_sub: varchar('auth_sub', { length: 255 }).primaryKey(),
43422
- created_at: timestamp('created_at').notNull().defaultNow(),
43423
- metadata: jsonb('metadata').$type<Record<string, unknown>>().default({})
43424
- });
43425
-
43426
- export const schema = {
43427
- users,
43428
- };
43429
-
43430
- export type User = typeof users.$inferSelect;
43431
- export type NewUser = typeof users.$inferInsert;
43432
-
43433
- export type SchemaType = typeof schema;
43434
- export type DatabaseType = NeonHttpDatabase<SchemaType>;`;
43435
- var backendCode = `import { build, getEnvVar, handleReactPageRequest, networkingPlugin } from '@absolutejs/absolute';
43436
- import { Home } from '../frontend/pages/Home';
43437
- import { Elysia, env } from 'elysia';
43438
- import { neon } from '@neondatabase/serverless';
43439
- import { drizzle } from 'drizzle-orm/neon-http';
43440
- import { schema, User } from '../../db/schema';
43441
-
43442
- const manifest = await build({
43443
- reactDirectory: 'src/frontend'
43444
- });
43445
-
43446
- if (manifest === null || manifest['HomeIndex'] === undefined) {
43447
- throw new Error('Failed to build manifest');
43448
- }
43449
-
43450
- const sql = neon(getEnvVar('DATABASE_URL'))
43451
- const db = drizzle(sql, { schema });
43452
-
43453
- const server = new Elysia()
43454
- .get('/', () => handleReactPageRequest(Home, manifest['HomeIndex']))
43455
- .get('/api/users/:subject',
43456
- async ({ status, params: { subject } }) => {
43457
- try {
43458
- const [user] = db.select().from(schema.users).where(schema.users.auth_sub.eq(subject))
43459
- return user === undefined ? status(404, 'User not found') : user;
43460
- } catch ( error ) {
43461
- return status(500, 'Internal Server Error while fetching user');
43462
- }
43463
- }
43464
-
43465
- export type Server = typeof server;`;
43466
- var treatyCode = `import { treaty } from '@elysiajs/eden';
43467
- import type { Server } from '../../backend/server';
43468
-
43469
- const serverUrl =
43470
- typeof window !== 'undefined'
43471
- ? window.location.origin
43472
- : 'http://localhost:3000';
43473
-
43474
- export const server = treaty<Server>(serverUrl);`;
43475
- var frontendCode = `import { server } from '../eden/treaty';
43476
- import { Head } from '../components/page/Head';
43477
- import { bodyDefault, htmlDefault, mainDefault } from '../styles';
43478
-
43479
- export const Home = () => {
43480
- const { data, error } = await server.api.users({subject:"EXAMPLE|12345"}).get();
43481
-
43482
- if( error !== null ) return (error);
43483
-
43484
- return (
43485
- <html lang="en" style={htmlDefault}>
43486
- <Head />
43487
- <body style={bodyDefault}>
43488
- <main style={mainDefault}>
43489
- <h1>{data.auth_sub}</h1>
43490
- <p>Created at: {data.created_at}</p>
43491
- </main>
43492
- </body>
43493
- </html>
43494
- );
43495
- };`;
43496
-
43497
- // src/frontend/data/typeArticleData.tsx
43498
- var typeArticleData = [
43499
- {
43500
- codeString: databaseCode,
43501
- description: "Define your database schema with type safety using an ORM like Drizzle.",
43502
- language: "typescript",
43503
- title: "Database"
43504
- },
43505
- {
43506
- codeString: backendCode,
43507
- description: "Build your backend and Elysia's built in typebox integration will infer types from your routes.",
43508
- language: "typescript",
43509
- title: "Backend"
43510
- },
43511
- {
43512
- codeString: treatyCode,
43513
- description: "Eden treaty is the bridge between our server and UI. Eden takes the type of our server and allows us to make type safe API requests.",
43514
- language: "typescript",
43515
- title: "Treaty"
43127
+ {
43128
+ codeString: treatyCode,
43129
+ description: "Eden treaty is the bridge between our server and UI. Eden takes the type of our server and allows us to make type safe API requests.",
43130
+ language: "typescript",
43131
+ title: "Treaty"
43516
43132
  },
43517
43133
  {
43518
43134
  codeString: frontendCode,
@@ -43541,65 +43157,19 @@ var useTabSprings = (numTabs) => {
43541
43157
  return { currentTab, handleTabClick, sliderSprings };
43542
43158
  };
43543
43159
 
43544
- // node_modules/zustand/esm/vanilla.mjs
43545
- var createStoreImpl = (createState) => {
43546
- let state;
43547
- const listeners = /* @__PURE__ */ new Set;
43548
- const setState = (partial, replace) => {
43549
- const nextState = typeof partial === "function" ? partial(state) : partial;
43550
- if (!Object.is(nextState, state)) {
43551
- const previousState = state;
43552
- state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
43553
- listeners.forEach((listener) => listener(state, previousState));
43554
- }
43555
- };
43556
- const getState = () => state;
43557
- const getInitialState = () => initialState;
43558
- const subscribe = (listener) => {
43559
- listeners.add(listener);
43560
- return () => listeners.delete(listener);
43561
- };
43562
- const api = { setState, getState, getInitialState, subscribe };
43563
- const initialState = state = createState(setState, getState, api);
43564
- return api;
43565
- };
43566
- var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
43567
-
43568
- // node_modules/zustand/esm/react.mjs
43569
- var import_react20 = __toESM(require_react(), 1);
43570
- var identity = (arg) => arg;
43571
- function useStore(api, selector = identity) {
43572
- const slice = import_react20.default.useSyncExternalStore(api.subscribe, () => selector(api.getState()), () => selector(api.getInitialState()));
43573
- import_react20.default.useDebugValue(slice);
43574
- return slice;
43575
- }
43576
- var createImpl = (createState) => {
43577
- const api = createStore(createState);
43578
- const useBoundStore = (selector) => useStore(api, selector);
43579
- Object.assign(useBoundStore, api);
43580
- return useBoundStore;
43581
- };
43582
- var create = (createState) => createState ? createImpl(createState) : createImpl;
43583
-
43584
- // src/frontend/hooks/useThemeStore.ts
43585
- var useThemeStore = create((set) => ({
43586
- theme: "dark",
43587
- setTheme: (newTheme) => set({ theme: newTheme })
43588
- }));
43589
-
43590
43160
  // src/frontend/components/utils/PrismPlus.tsx
43591
- var import_react23 = __toESM(require_react(), 1);
43161
+ var import_react22 = __toESM(require_react(), 1);
43592
43162
 
43593
43163
  // node_modules/react-syntax-highlighter/dist/esm/highlight.js
43594
43164
  var import_objectWithoutProperties = __toESM(require_objectWithoutProperties(), 1);
43595
43165
  var import_toConsumableArray = __toESM(require_toConsumableArray(), 1);
43596
43166
  var import_defineProperty2 = __toESM(require_defineProperty(), 1);
43597
- var import_react22 = __toESM(require_react(), 1);
43167
+ var import_react21 = __toESM(require_react(), 1);
43598
43168
 
43599
43169
  // node_modules/react-syntax-highlighter/dist/esm/create-element.js
43600
43170
  var import_extends = __toESM(require_extends(), 1);
43601
43171
  var import_defineProperty = __toESM(require_defineProperty(), 1);
43602
- var import_react21 = __toESM(require_react(), 1);
43172
+ var import_react20 = __toESM(require_react(), 1);
43603
43173
  function ownKeys2(e, r) {
43604
43174
  var t = Object.keys(e);
43605
43175
  if (Object.getOwnPropertySymbols) {
@@ -43703,7 +43273,7 @@ function createElement4(_ref) {
43703
43273
  });
43704
43274
  }
43705
43275
  var children = childrenCreator(node.children);
43706
- return /* @__PURE__ */ import_react21.default.createElement(TagName, import_extends.default({
43276
+ return /* @__PURE__ */ import_react20.default.createElement(TagName, import_extends.default({
43707
43277
  key
43708
43278
  }, props), children);
43709
43279
  }
@@ -43746,7 +43316,7 @@ function getAllLineNumbers(_ref) {
43746
43316
  var { lines, startingLineNumber, style } = _ref;
43747
43317
  return lines.map(function(_, i) {
43748
43318
  var number = i + startingLineNumber;
43749
- return /* @__PURE__ */ import_react22.default.createElement("span", {
43319
+ return /* @__PURE__ */ import_react21.default.createElement("span", {
43750
43320
  key: "line-".concat(i),
43751
43321
  className: "react-syntax-highlighter-line-number",
43752
43322
  style: typeof style === "function" ? style(number) : style
@@ -43759,7 +43329,7 @@ function AllLineNumbers(_ref2) {
43759
43329
  float: "left",
43760
43330
  paddingRight: "10px"
43761
43331
  } : _ref2$containerStyle, _ref2$numberStyle = _ref2.numberStyle, numberStyle = _ref2$numberStyle === undefined ? {} : _ref2$numberStyle, startingLineNumber = _ref2.startingLineNumber;
43762
- return /* @__PURE__ */ import_react22.default.createElement("code", {
43332
+ return /* @__PURE__ */ import_react21.default.createElement("code", {
43763
43333
  style: Object.assign({}, codeStyle, containerStyle)
43764
43334
  }, getAllLineNumbers({
43765
43335
  lines: codeString.replace(/\n$/, "").split(`
@@ -43970,82 +43540,469 @@ function getCodeTree(_ref6) {
43970
43540
  value: defaultCodeValue
43971
43541
  };
43972
43542
  }
43973
- }
43974
- function highlight_default(defaultAstGenerator, defaultStyle) {
43975
- return function SyntaxHighlighter(_ref7) {
43976
- var { language, children, style: _ref7$style } = _ref7, style = _ref7$style === undefined ? defaultStyle : _ref7$style, _ref7$customStyle = _ref7.customStyle, customStyle = _ref7$customStyle === undefined ? {} : _ref7$customStyle, _ref7$codeTagProps = _ref7.codeTagProps, codeTagProps = _ref7$codeTagProps === undefined ? {
43977
- className: language ? "language-".concat(language) : undefined,
43978
- style: _objectSpread3(_objectSpread3({}, style['code[class*="language-"]']), style['code[class*="language-'.concat(language, '"]')])
43979
- } : _ref7$codeTagProps, _ref7$useInlineStyles = _ref7.useInlineStyles, useInlineStyles = _ref7$useInlineStyles === undefined ? true : _ref7$useInlineStyles, _ref7$showLineNumbers = _ref7.showLineNumbers, showLineNumbers = _ref7$showLineNumbers === undefined ? false : _ref7$showLineNumbers, _ref7$showInlineLineN = _ref7.showInlineLineNumbers, showInlineLineNumbers = _ref7$showInlineLineN === undefined ? true : _ref7$showInlineLineN, _ref7$startingLineNum = _ref7.startingLineNumber, startingLineNumber = _ref7$startingLineNum === undefined ? 1 : _ref7$startingLineNum, lineNumberContainerStyle = _ref7.lineNumberContainerStyle, _ref7$lineNumberStyle = _ref7.lineNumberStyle, lineNumberStyle = _ref7$lineNumberStyle === undefined ? {} : _ref7$lineNumberStyle, wrapLines = _ref7.wrapLines, _ref7$wrapLongLines = _ref7.wrapLongLines, wrapLongLines = _ref7$wrapLongLines === undefined ? false : _ref7$wrapLongLines, _ref7$lineProps = _ref7.lineProps, lineProps = _ref7$lineProps === undefined ? {} : _ref7$lineProps, renderer = _ref7.renderer, _ref7$PreTag = _ref7.PreTag, PreTag = _ref7$PreTag === undefined ? "pre" : _ref7$PreTag, _ref7$CodeTag = _ref7.CodeTag, CodeTag = _ref7$CodeTag === undefined ? "code" : _ref7$CodeTag, _ref7$code = _ref7.code, code = _ref7$code === undefined ? (Array.isArray(children) ? children[0] : children) || "" : _ref7$code, astGenerator = _ref7.astGenerator, rest = import_objectWithoutProperties.default(_ref7, _excluded2);
43980
- astGenerator = astGenerator || defaultAstGenerator;
43981
- var allLineNumbers = showLineNumbers ? /* @__PURE__ */ import_react22.default.createElement(AllLineNumbers, {
43982
- containerStyle: lineNumberContainerStyle,
43983
- codeStyle: codeTagProps.style || {},
43984
- numberStyle: lineNumberStyle,
43985
- startingLineNumber,
43986
- codeString: code
43987
- }) : null;
43988
- var defaultPreStyle = style.hljs || style['pre[class*="language-"]'] || {
43989
- backgroundColor: "#fff"
43990
- };
43991
- var generatorClassName = isHighlightJs(astGenerator) ? "hljs" : "prismjs";
43992
- var preProps = useInlineStyles ? Object.assign({}, rest, {
43993
- style: Object.assign({}, defaultPreStyle, customStyle)
43994
- }) : Object.assign({}, rest, {
43995
- className: rest.className ? "".concat(generatorClassName, " ").concat(rest.className) : generatorClassName,
43996
- style: Object.assign({}, customStyle)
43997
- });
43998
- if (wrapLongLines) {
43999
- codeTagProps.style = _objectSpread3({
44000
- whiteSpace: "pre-wrap"
44001
- }, codeTagProps.style);
44002
- } else {
44003
- codeTagProps.style = _objectSpread3({
44004
- whiteSpace: "pre"
44005
- }, codeTagProps.style);
44006
- }
44007
- if (!astGenerator) {
44008
- return /* @__PURE__ */ import_react22.default.createElement(PreTag, preProps, allLineNumbers, /* @__PURE__ */ import_react22.default.createElement(CodeTag, codeTagProps, code));
44009
- }
44010
- if (wrapLines === undefined && renderer || wrapLongLines)
44011
- wrapLines = true;
44012
- renderer = renderer || defaultRenderer;
44013
- var defaultCodeValue = [{
44014
- type: "text",
44015
- value: code
44016
- }];
44017
- var codeTree = getCodeTree({
44018
- astGenerator,
44019
- language,
44020
- code,
44021
- defaultCodeValue
44022
- });
44023
- if (codeTree.language === null) {
44024
- codeTree.value = defaultCodeValue;
44025
- }
44026
- var lineCount = codeTree.value.length;
44027
- if (lineCount === 1 && codeTree.value[0].type === "text") {
44028
- lineCount = codeTree.value[0].value.split(`
44029
- `).length;
44030
- }
44031
- var largestLineNumber = lineCount + startingLineNumber;
44032
- var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
44033
- return /* @__PURE__ */ import_react22.default.createElement(PreTag, preProps, /* @__PURE__ */ import_react22.default.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
44034
- rows,
44035
- stylesheet: style,
44036
- useInlineStyles
44037
- })));
44038
- };
44039
- }
44040
-
44041
- // node_modules/react-syntax-highlighter/dist/esm/languages/prism/supported-languages.js
44042
- var supported_languages_default = ["abap", "abnf", "actionscript", "ada", "agda", "al", "antlr4", "apacheconf", "apex", "apl", "applescript", "aql", "arduino", "arff", "asciidoc", "asm6502", "asmatmel", "aspnet", "autohotkey", "autoit", "avisynth", "avro-idl", "bash", "basic", "batch", "bbcode", "bicep", "birb", "bison", "bnf", "brainfuck", "brightscript", "bro", "bsl", "c", "cfscript", "chaiscript", "cil", "clike", "clojure", "cmake", "cobol", "coffeescript", "concurnas", "coq", "cpp", "crystal", "csharp", "cshtml", "csp", "css-extras", "css", "csv", "cypher", "d", "dart", "dataweave", "dax", "dhall", "diff", "django", "dns-zone-file", "docker", "dot", "ebnf", "editorconfig", "eiffel", "ejs", "elixir", "elm", "erb", "erlang", "etlua", "excel-formula", "factor", "false", "firestore-security-rules", "flow", "fortran", "fsharp", "ftl", "gap", "gcode", "gdscript", "gedcom", "gherkin", "git", "glsl", "gml", "gn", "go-module", "go", "graphql", "groovy", "haml", "handlebars", "haskell", "haxe", "hcl", "hlsl", "hoon", "hpkp", "hsts", "http", "ichigojam", "icon", "icu-message-format", "idris", "iecst", "ignore", "inform7", "ini", "io", "j", "java", "javadoc", "javadoclike", "javascript", "javastacktrace", "jexl", "jolie", "jq", "js-extras", "js-templates", "jsdoc", "json", "json5", "jsonp", "jsstacktrace", "jsx", "julia", "keepalived", "keyman", "kotlin", "kumir", "kusto", "latex", "latte", "less", "lilypond", "liquid", "lisp", "livescript", "llvm", "log", "lolcode", "lua", "magma", "makefile", "markdown", "markup-templating", "markup", "matlab", "maxscript", "mel", "mermaid", "mizar", "mongodb", "monkey", "moonscript", "n1ql", "n4js", "nand2tetris-hdl", "naniscript", "nasm", "neon", "nevod", "nginx", "nim", "nix", "nsis", "objectivec", "ocaml", "opencl", "openqasm", "oz", "parigp", "parser", "pascal", "pascaligo", "pcaxis", "peoplecode", "perl", "php-extras", "php", "phpdoc", "plsql", "powerquery", "powershell", "processing", "prolog", "promql", "properties", "protobuf", "psl", "pug", "puppet", "pure", "purebasic", "purescript", "python", "q", "qml", "qore", "qsharp", "r", "racket", "reason", "regex", "rego", "renpy", "rest", "rip", "roboconf", "robotframework", "ruby", "rust", "sas", "sass", "scala", "scheme", "scss", "shell-session", "smali", "smalltalk", "smarty", "sml", "solidity", "solution-file", "soy", "sparql", "splunk-spl", "sqf", "sql", "squirrel", "stan", "stylus", "swift", "systemd", "t4-cs", "t4-templating", "t4-vb", "tap", "tcl", "textile", "toml", "tremor", "tsx", "tt2", "turtle", "twig", "typescript", "typoscript", "unrealscript", "uorazor", "uri", "v", "vala", "vbnet", "velocity", "verilog", "vhdl", "vim", "visual-basic", "warpscript", "wasm", "web-idl", "wiki", "wolfram", "wren", "xeora", "xml-doc", "xojo", "xquery", "yaml", "yang", "zig"];
43543
+ }
43544
+ function highlight_default(defaultAstGenerator, defaultStyle) {
43545
+ return function SyntaxHighlighter(_ref7) {
43546
+ var { language, children, style: _ref7$style } = _ref7, style = _ref7$style === undefined ? defaultStyle : _ref7$style, _ref7$customStyle = _ref7.customStyle, customStyle = _ref7$customStyle === undefined ? {} : _ref7$customStyle, _ref7$codeTagProps = _ref7.codeTagProps, codeTagProps = _ref7$codeTagProps === undefined ? {
43547
+ className: language ? "language-".concat(language) : undefined,
43548
+ style: _objectSpread3(_objectSpread3({}, style['code[class*="language-"]']), style['code[class*="language-'.concat(language, '"]')])
43549
+ } : _ref7$codeTagProps, _ref7$useInlineStyles = _ref7.useInlineStyles, useInlineStyles = _ref7$useInlineStyles === undefined ? true : _ref7$useInlineStyles, _ref7$showLineNumbers = _ref7.showLineNumbers, showLineNumbers = _ref7$showLineNumbers === undefined ? false : _ref7$showLineNumbers, _ref7$showInlineLineN = _ref7.showInlineLineNumbers, showInlineLineNumbers = _ref7$showInlineLineN === undefined ? true : _ref7$showInlineLineN, _ref7$startingLineNum = _ref7.startingLineNumber, startingLineNumber = _ref7$startingLineNum === undefined ? 1 : _ref7$startingLineNum, lineNumberContainerStyle = _ref7.lineNumberContainerStyle, _ref7$lineNumberStyle = _ref7.lineNumberStyle, lineNumberStyle = _ref7$lineNumberStyle === undefined ? {} : _ref7$lineNumberStyle, wrapLines = _ref7.wrapLines, _ref7$wrapLongLines = _ref7.wrapLongLines, wrapLongLines = _ref7$wrapLongLines === undefined ? false : _ref7$wrapLongLines, _ref7$lineProps = _ref7.lineProps, lineProps = _ref7$lineProps === undefined ? {} : _ref7$lineProps, renderer = _ref7.renderer, _ref7$PreTag = _ref7.PreTag, PreTag = _ref7$PreTag === undefined ? "pre" : _ref7$PreTag, _ref7$CodeTag = _ref7.CodeTag, CodeTag = _ref7$CodeTag === undefined ? "code" : _ref7$CodeTag, _ref7$code = _ref7.code, code = _ref7$code === undefined ? (Array.isArray(children) ? children[0] : children) || "" : _ref7$code, astGenerator = _ref7.astGenerator, rest = import_objectWithoutProperties.default(_ref7, _excluded2);
43550
+ astGenerator = astGenerator || defaultAstGenerator;
43551
+ var allLineNumbers = showLineNumbers ? /* @__PURE__ */ import_react21.default.createElement(AllLineNumbers, {
43552
+ containerStyle: lineNumberContainerStyle,
43553
+ codeStyle: codeTagProps.style || {},
43554
+ numberStyle: lineNumberStyle,
43555
+ startingLineNumber,
43556
+ codeString: code
43557
+ }) : null;
43558
+ var defaultPreStyle = style.hljs || style['pre[class*="language-"]'] || {
43559
+ backgroundColor: "#fff"
43560
+ };
43561
+ var generatorClassName = isHighlightJs(astGenerator) ? "hljs" : "prismjs";
43562
+ var preProps = useInlineStyles ? Object.assign({}, rest, {
43563
+ style: Object.assign({}, defaultPreStyle, customStyle)
43564
+ }) : Object.assign({}, rest, {
43565
+ className: rest.className ? "".concat(generatorClassName, " ").concat(rest.className) : generatorClassName,
43566
+ style: Object.assign({}, customStyle)
43567
+ });
43568
+ if (wrapLongLines) {
43569
+ codeTagProps.style = _objectSpread3({
43570
+ whiteSpace: "pre-wrap"
43571
+ }, codeTagProps.style);
43572
+ } else {
43573
+ codeTagProps.style = _objectSpread3({
43574
+ whiteSpace: "pre"
43575
+ }, codeTagProps.style);
43576
+ }
43577
+ if (!astGenerator) {
43578
+ return /* @__PURE__ */ import_react21.default.createElement(PreTag, preProps, allLineNumbers, /* @__PURE__ */ import_react21.default.createElement(CodeTag, codeTagProps, code));
43579
+ }
43580
+ if (wrapLines === undefined && renderer || wrapLongLines)
43581
+ wrapLines = true;
43582
+ renderer = renderer || defaultRenderer;
43583
+ var defaultCodeValue = [{
43584
+ type: "text",
43585
+ value: code
43586
+ }];
43587
+ var codeTree = getCodeTree({
43588
+ astGenerator,
43589
+ language,
43590
+ code,
43591
+ defaultCodeValue
43592
+ });
43593
+ if (codeTree.language === null) {
43594
+ codeTree.value = defaultCodeValue;
43595
+ }
43596
+ var lineCount = codeTree.value.length;
43597
+ if (lineCount === 1 && codeTree.value[0].type === "text") {
43598
+ lineCount = codeTree.value[0].value.split(`
43599
+ `).length;
43600
+ }
43601
+ var largestLineNumber = lineCount + startingLineNumber;
43602
+ var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
43603
+ return /* @__PURE__ */ import_react21.default.createElement(PreTag, preProps, /* @__PURE__ */ import_react21.default.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
43604
+ rows,
43605
+ stylesheet: style,
43606
+ useInlineStyles
43607
+ })));
43608
+ };
43609
+ }
43610
+
43611
+ // node_modules/react-syntax-highlighter/dist/esm/languages/prism/supported-languages.js
43612
+ var supported_languages_default = ["abap", "abnf", "actionscript", "ada", "agda", "al", "antlr4", "apacheconf", "apex", "apl", "applescript", "aql", "arduino", "arff", "asciidoc", "asm6502", "asmatmel", "aspnet", "autohotkey", "autoit", "avisynth", "avro-idl", "bash", "basic", "batch", "bbcode", "bicep", "birb", "bison", "bnf", "brainfuck", "brightscript", "bro", "bsl", "c", "cfscript", "chaiscript", "cil", "clike", "clojure", "cmake", "cobol", "coffeescript", "concurnas", "coq", "cpp", "crystal", "csharp", "cshtml", "csp", "css-extras", "css", "csv", "cypher", "d", "dart", "dataweave", "dax", "dhall", "diff", "django", "dns-zone-file", "docker", "dot", "ebnf", "editorconfig", "eiffel", "ejs", "elixir", "elm", "erb", "erlang", "etlua", "excel-formula", "factor", "false", "firestore-security-rules", "flow", "fortran", "fsharp", "ftl", "gap", "gcode", "gdscript", "gedcom", "gherkin", "git", "glsl", "gml", "gn", "go-module", "go", "graphql", "groovy", "haml", "handlebars", "haskell", "haxe", "hcl", "hlsl", "hoon", "hpkp", "hsts", "http", "ichigojam", "icon", "icu-message-format", "idris", "iecst", "ignore", "inform7", "ini", "io", "j", "java", "javadoc", "javadoclike", "javascript", "javastacktrace", "jexl", "jolie", "jq", "js-extras", "js-templates", "jsdoc", "json", "json5", "jsonp", "jsstacktrace", "jsx", "julia", "keepalived", "keyman", "kotlin", "kumir", "kusto", "latex", "latte", "less", "lilypond", "liquid", "lisp", "livescript", "llvm", "log", "lolcode", "lua", "magma", "makefile", "markdown", "markup-templating", "markup", "matlab", "maxscript", "mel", "mermaid", "mizar", "mongodb", "monkey", "moonscript", "n1ql", "n4js", "nand2tetris-hdl", "naniscript", "nasm", "neon", "nevod", "nginx", "nim", "nix", "nsis", "objectivec", "ocaml", "opencl", "openqasm", "oz", "parigp", "parser", "pascal", "pascaligo", "pcaxis", "peoplecode", "perl", "php-extras", "php", "phpdoc", "plsql", "powerquery", "powershell", "processing", "prolog", "promql", "properties", "protobuf", "psl", "pug", "puppet", "pure", "purebasic", "purescript", "python", "q", "qml", "qore", "qsharp", "r", "racket", "reason", "regex", "rego", "renpy", "rest", "rip", "roboconf", "robotframework", "ruby", "rust", "sas", "sass", "scala", "scheme", "scss", "shell-session", "smali", "smalltalk", "smarty", "sml", "solidity", "solution-file", "soy", "sparql", "splunk-spl", "sqf", "sql", "squirrel", "stan", "stylus", "swift", "systemd", "t4-cs", "t4-templating", "t4-vb", "tap", "tcl", "textile", "toml", "tremor", "tsx", "tt2", "turtle", "twig", "typescript", "typoscript", "unrealscript", "uorazor", "uri", "v", "vala", "vbnet", "velocity", "verilog", "vhdl", "vim", "visual-basic", "warpscript", "wasm", "web-idl", "wiki", "wolfram", "wren", "xeora", "xml-doc", "xojo", "xquery", "yaml", "yang", "zig"];
43613
+
43614
+ // node_modules/react-syntax-highlighter/dist/esm/styles/prism/prism.js
43615
+ var prism_default = {
43616
+ 'code[class*="language-"]': {
43617
+ color: "black",
43618
+ background: "none",
43619
+ textShadow: "0 1px white",
43620
+ fontFamily: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
43621
+ fontSize: "1em",
43622
+ textAlign: "left",
43623
+ whiteSpace: "pre",
43624
+ wordSpacing: "normal",
43625
+ wordBreak: "normal",
43626
+ wordWrap: "normal",
43627
+ lineHeight: "1.5",
43628
+ MozTabSize: "4",
43629
+ OTabSize: "4",
43630
+ tabSize: "4",
43631
+ WebkitHyphens: "none",
43632
+ MozHyphens: "none",
43633
+ msHyphens: "none",
43634
+ hyphens: "none"
43635
+ },
43636
+ 'pre[class*="language-"]': {
43637
+ color: "black",
43638
+ background: "#f5f2f0",
43639
+ textShadow: "0 1px white",
43640
+ fontFamily: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
43641
+ fontSize: "1em",
43642
+ textAlign: "left",
43643
+ whiteSpace: "pre",
43644
+ wordSpacing: "normal",
43645
+ wordBreak: "normal",
43646
+ wordWrap: "normal",
43647
+ lineHeight: "1.5",
43648
+ MozTabSize: "4",
43649
+ OTabSize: "4",
43650
+ tabSize: "4",
43651
+ WebkitHyphens: "none",
43652
+ MozHyphens: "none",
43653
+ msHyphens: "none",
43654
+ hyphens: "none",
43655
+ padding: "1em",
43656
+ margin: ".5em 0",
43657
+ overflow: "auto"
43658
+ },
43659
+ 'pre[class*="language-"]::-moz-selection': {
43660
+ textShadow: "none",
43661
+ background: "#b3d4fc"
43662
+ },
43663
+ 'pre[class*="language-"] ::-moz-selection': {
43664
+ textShadow: "none",
43665
+ background: "#b3d4fc"
43666
+ },
43667
+ 'code[class*="language-"]::-moz-selection': {
43668
+ textShadow: "none",
43669
+ background: "#b3d4fc"
43670
+ },
43671
+ 'code[class*="language-"] ::-moz-selection': {
43672
+ textShadow: "none",
43673
+ background: "#b3d4fc"
43674
+ },
43675
+ 'pre[class*="language-"]::selection': {
43676
+ textShadow: "none",
43677
+ background: "#b3d4fc"
43678
+ },
43679
+ 'pre[class*="language-"] ::selection': {
43680
+ textShadow: "none",
43681
+ background: "#b3d4fc"
43682
+ },
43683
+ 'code[class*="language-"]::selection': {
43684
+ textShadow: "none",
43685
+ background: "#b3d4fc"
43686
+ },
43687
+ 'code[class*="language-"] ::selection': {
43688
+ textShadow: "none",
43689
+ background: "#b3d4fc"
43690
+ },
43691
+ ':not(pre) > code[class*="language-"]': {
43692
+ background: "#f5f2f0",
43693
+ padding: ".1em",
43694
+ borderRadius: ".3em",
43695
+ whiteSpace: "normal"
43696
+ },
43697
+ comment: {
43698
+ color: "slategray"
43699
+ },
43700
+ prolog: {
43701
+ color: "slategray"
43702
+ },
43703
+ doctype: {
43704
+ color: "slategray"
43705
+ },
43706
+ cdata: {
43707
+ color: "slategray"
43708
+ },
43709
+ punctuation: {
43710
+ color: "#999"
43711
+ },
43712
+ namespace: {
43713
+ Opacity: ".7"
43714
+ },
43715
+ property: {
43716
+ color: "#905"
43717
+ },
43718
+ tag: {
43719
+ color: "#905"
43720
+ },
43721
+ boolean: {
43722
+ color: "#905"
43723
+ },
43724
+ number: {
43725
+ color: "#905"
43726
+ },
43727
+ constant: {
43728
+ color: "#905"
43729
+ },
43730
+ symbol: {
43731
+ color: "#905"
43732
+ },
43733
+ deleted: {
43734
+ color: "#905"
43735
+ },
43736
+ selector: {
43737
+ color: "#690"
43738
+ },
43739
+ "attr-name": {
43740
+ color: "#690"
43741
+ },
43742
+ string: {
43743
+ color: "#690"
43744
+ },
43745
+ char: {
43746
+ color: "#690"
43747
+ },
43748
+ builtin: {
43749
+ color: "#690"
43750
+ },
43751
+ inserted: {
43752
+ color: "#690"
43753
+ },
43754
+ operator: {
43755
+ color: "#9a6e3a",
43756
+ background: "hsla(0, 0%, 100%, .5)"
43757
+ },
43758
+ entity: {
43759
+ color: "#9a6e3a",
43760
+ background: "hsla(0, 0%, 100%, .5)",
43761
+ cursor: "help"
43762
+ },
43763
+ url: {
43764
+ color: "#9a6e3a",
43765
+ background: "hsla(0, 0%, 100%, .5)"
43766
+ },
43767
+ ".language-css .token.string": {
43768
+ color: "#9a6e3a",
43769
+ background: "hsla(0, 0%, 100%, .5)"
43770
+ },
43771
+ ".style .token.string": {
43772
+ color: "#9a6e3a",
43773
+ background: "hsla(0, 0%, 100%, .5)"
43774
+ },
43775
+ atrule: {
43776
+ color: "#07a"
43777
+ },
43778
+ "attr-value": {
43779
+ color: "#07a"
43780
+ },
43781
+ keyword: {
43782
+ color: "#07a"
43783
+ },
43784
+ function: {
43785
+ color: "#DD4A68"
43786
+ },
43787
+ "class-name": {
43788
+ color: "#DD4A68"
43789
+ },
43790
+ regex: {
43791
+ color: "#e90"
43792
+ },
43793
+ important: {
43794
+ color: "#e90",
43795
+ fontWeight: "bold"
43796
+ },
43797
+ variable: {
43798
+ color: "#e90"
43799
+ },
43800
+ bold: {
43801
+ fontWeight: "bold"
43802
+ },
43803
+ italic: {
43804
+ fontStyle: "italic"
43805
+ }
43806
+ };
44043
43807
 
44044
43808
  // node_modules/react-syntax-highlighter/dist/esm/prism.js
44045
43809
  var import_refractor = __toESM(require_refractor(), 1);
44046
43810
  var highlighter = highlight_default(import_refractor.default, prism_default);
44047
43811
  highlighter.supportedLanguages = supported_languages_default;
44048
43812
  var prism_default2 = highlighter;
43813
+ // node_modules/react-syntax-highlighter/dist/esm/styles/prism/night-owl.js
43814
+ var night_owl_default = {
43815
+ 'code[class*="language-"]': {
43816
+ color: "#d6deeb",
43817
+ fontFamily: 'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',
43818
+ textAlign: "left",
43819
+ whiteSpace: "pre",
43820
+ wordSpacing: "normal",
43821
+ wordBreak: "normal",
43822
+ wordWrap: "normal",
43823
+ lineHeight: "1.5",
43824
+ fontSize: "1em",
43825
+ MozTabSize: "4",
43826
+ OTabSize: "4",
43827
+ tabSize: "4",
43828
+ WebkitHyphens: "none",
43829
+ MozHyphens: "none",
43830
+ msHyphens: "none",
43831
+ hyphens: "none"
43832
+ },
43833
+ 'pre[class*="language-"]': {
43834
+ color: "white",
43835
+ fontFamily: 'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',
43836
+ textAlign: "left",
43837
+ whiteSpace: "pre",
43838
+ wordSpacing: "normal",
43839
+ wordBreak: "normal",
43840
+ wordWrap: "normal",
43841
+ lineHeight: "1.5",
43842
+ fontSize: "1em",
43843
+ MozTabSize: "4",
43844
+ OTabSize: "4",
43845
+ tabSize: "4",
43846
+ WebkitHyphens: "none",
43847
+ MozHyphens: "none",
43848
+ msHyphens: "none",
43849
+ hyphens: "none",
43850
+ padding: "1em",
43851
+ margin: "0.5em 0",
43852
+ overflow: "auto",
43853
+ background: "#011627"
43854
+ },
43855
+ 'pre[class*="language-"]::-moz-selection': {
43856
+ textShadow: "none",
43857
+ background: "rgba(29, 59, 83, 0.99)"
43858
+ },
43859
+ 'pre[class*="language-"] ::-moz-selection': {
43860
+ textShadow: "none",
43861
+ background: "rgba(29, 59, 83, 0.99)"
43862
+ },
43863
+ 'code[class*="language-"]::-moz-selection': {
43864
+ textShadow: "none",
43865
+ background: "rgba(29, 59, 83, 0.99)"
43866
+ },
43867
+ 'code[class*="language-"] ::-moz-selection': {
43868
+ textShadow: "none",
43869
+ background: "rgba(29, 59, 83, 0.99)"
43870
+ },
43871
+ 'pre[class*="language-"]::selection': {
43872
+ textShadow: "none",
43873
+ background: "rgba(29, 59, 83, 0.99)"
43874
+ },
43875
+ 'pre[class*="language-"] ::selection': {
43876
+ textShadow: "none",
43877
+ background: "rgba(29, 59, 83, 0.99)"
43878
+ },
43879
+ 'code[class*="language-"]::selection': {
43880
+ textShadow: "none",
43881
+ background: "rgba(29, 59, 83, 0.99)"
43882
+ },
43883
+ 'code[class*="language-"] ::selection': {
43884
+ textShadow: "none",
43885
+ background: "rgba(29, 59, 83, 0.99)"
43886
+ },
43887
+ ':not(pre) > code[class*="language-"]': {
43888
+ color: "white",
43889
+ background: "#011627",
43890
+ padding: "0.1em",
43891
+ borderRadius: "0.3em",
43892
+ whiteSpace: "normal"
43893
+ },
43894
+ comment: {
43895
+ color: "rgb(99, 119, 119)",
43896
+ fontStyle: "italic"
43897
+ },
43898
+ prolog: {
43899
+ color: "rgb(99, 119, 119)",
43900
+ fontStyle: "italic"
43901
+ },
43902
+ cdata: {
43903
+ color: "rgb(99, 119, 119)",
43904
+ fontStyle: "italic"
43905
+ },
43906
+ punctuation: {
43907
+ color: "rgb(199, 146, 234)"
43908
+ },
43909
+ ".namespace": {
43910
+ color: "rgb(178, 204, 214)"
43911
+ },
43912
+ deleted: {
43913
+ color: "rgba(239, 83, 80, 0.56)",
43914
+ fontStyle: "italic"
43915
+ },
43916
+ symbol: {
43917
+ color: "rgb(128, 203, 196)"
43918
+ },
43919
+ property: {
43920
+ color: "rgb(128, 203, 196)"
43921
+ },
43922
+ tag: {
43923
+ color: "rgb(127, 219, 202)"
43924
+ },
43925
+ operator: {
43926
+ color: "rgb(127, 219, 202)"
43927
+ },
43928
+ keyword: {
43929
+ color: "rgb(127, 219, 202)"
43930
+ },
43931
+ boolean: {
43932
+ color: "rgb(255, 88, 116)"
43933
+ },
43934
+ number: {
43935
+ color: "rgb(247, 140, 108)"
43936
+ },
43937
+ constant: {
43938
+ color: "rgb(130, 170, 255)"
43939
+ },
43940
+ function: {
43941
+ color: "rgb(130, 170, 255)"
43942
+ },
43943
+ builtin: {
43944
+ color: "rgb(130, 170, 255)"
43945
+ },
43946
+ char: {
43947
+ color: "rgb(130, 170, 255)"
43948
+ },
43949
+ selector: {
43950
+ color: "rgb(199, 146, 234)",
43951
+ fontStyle: "italic"
43952
+ },
43953
+ doctype: {
43954
+ color: "rgb(199, 146, 234)",
43955
+ fontStyle: "italic"
43956
+ },
43957
+ "attr-name": {
43958
+ color: "rgb(173, 219, 103)",
43959
+ fontStyle: "italic"
43960
+ },
43961
+ inserted: {
43962
+ color: "rgb(173, 219, 103)",
43963
+ fontStyle: "italic"
43964
+ },
43965
+ string: {
43966
+ color: "rgb(173, 219, 103)"
43967
+ },
43968
+ url: {
43969
+ color: "rgb(173, 219, 103)"
43970
+ },
43971
+ entity: {
43972
+ color: "rgb(173, 219, 103)"
43973
+ },
43974
+ ".language-css .token.string": {
43975
+ color: "rgb(173, 219, 103)"
43976
+ },
43977
+ ".style .token.string": {
43978
+ color: "rgb(173, 219, 103)"
43979
+ },
43980
+ "class-name": {
43981
+ color: "rgb(255, 203, 139)"
43982
+ },
43983
+ atrule: {
43984
+ color: "rgb(255, 203, 139)"
43985
+ },
43986
+ "attr-value": {
43987
+ color: "rgb(255, 203, 139)"
43988
+ },
43989
+ regex: {
43990
+ color: "rgb(214, 222, 235)"
43991
+ },
43992
+ important: {
43993
+ color: "rgb(214, 222, 235)",
43994
+ fontWeight: "bold"
43995
+ },
43996
+ variable: {
43997
+ color: "rgb(214, 222, 235)"
43998
+ },
43999
+ bold: {
44000
+ fontWeight: "bold"
44001
+ },
44002
+ italic: {
44003
+ fontStyle: "italic"
44004
+ }
44005
+ };
44049
44006
  // src/frontend/styles/syntaxHighlighterStyles.ts
44050
44007
  var highlighterContainerStyle = {
44051
44008
  borderRadius: "5px",
@@ -44092,11 +44049,11 @@ var PrismPlus = ({
44092
44049
  codeString,
44093
44050
  language = "tsx",
44094
44051
  showLineNumbers = true,
44095
- codeStyle,
44096
44052
  options,
44097
44053
  themeSprings
44098
44054
  }) => {
44099
- const [selectedOptionIndex, setSelectedOptionIndex] = import_react23.useState(0);
44055
+ const codeStyle = themeSprings.theme.to((theme) => theme === "light" ? prism_default : night_owl_default);
44056
+ const [selectedOptionIndex, setSelectedOptionIndex] = import_react22.useState(0);
44100
44057
  const codeStringsArray = Array.isArray(codeString) ? codeString : [codeString];
44101
44058
  const optionsArray = options || [];
44102
44059
  const displayedCodeString = codeStringsArray[selectedOptionIndex] ?? codeStringsArray[0] ?? "";
@@ -44144,7 +44101,7 @@ var PrismPlus = ({
44144
44101
  }, undefined, true, undefined, this),
44145
44102
  /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(prism_default2, {
44146
44103
  language,
44147
- style: codeStyle,
44104
+ style: codeStyle.get(),
44148
44105
  customStyle: {
44149
44106
  margin: 0,
44150
44107
  marginBottom: "1.5rem",
@@ -44204,8 +44161,6 @@ var CodeSlider = ({
44204
44161
  // src/frontend/components/home/TypeSafeArticle.tsx
44205
44162
  var jsx_dev_runtime11 = __toESM(require_jsx_dev_runtime(), 1);
44206
44163
  var TypeSafeArticle = ({ themeSprings }) => {
44207
- const theme = useThemeStore((state) => state.theme);
44208
- const prismTheme = theme === "light" ? prism_default : night_owl_default;
44209
44164
  const { handleTabClick, currentTab, sliderSprings } = useTabSprings(typeArticleData.length);
44210
44165
  const { codeString, title, description, language } = typeArticleData[currentTab] ?? {};
44211
44166
  if (codeString === undefined || title === undefined || description === undefined) {
@@ -44231,8 +44186,7 @@ var TypeSafeArticle = ({ themeSprings }) => {
44231
44186
  /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(PrismPlus, {
44232
44187
  themeSprings,
44233
44188
  codeString,
44234
- language,
44235
- codeStyle: prismTheme
44189
+ language
44236
44190
  }, undefined, false, undefined, this),
44237
44191
  /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(animated.p, {
44238
44192
  style: paragraphStyle(themeSprings),
@@ -44259,7 +44213,7 @@ var UIArticle = ({ themeSprings }) => /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(a
44259
44213
  }, undefined, true, undefined, this);
44260
44214
 
44261
44215
  // src/frontend/components/navbar/Navbar.tsx
44262
- var import_react33 = __toESM(require_react(), 1);
44216
+ var import_react31 = __toESM(require_react(), 1);
44263
44217
 
44264
44218
  // node_modules/react-icons/rx/index.mjs
44265
44219
  function RxHamburgerMenu(props) {
@@ -44390,13 +44344,13 @@ var profileButtonStyle = {
44390
44344
  };
44391
44345
 
44392
44346
  // src/frontend/components/hamburger/HamburgerMenu.tsx
44393
- var import_react27 = __toESM(require_react(), 1);
44347
+ var import_react26 = __toESM(require_react(), 1);
44394
44348
 
44395
44349
  // src/types/types.ts
44396
44350
  var isNavbarDropdown = (element) => ("links" in element);
44397
44351
 
44398
44352
  // src/frontend/components/auth/AuthContainer.tsx
44399
- var import_react24 = __toESM(require_react(), 1);
44353
+ var import_react23 = __toESM(require_react(), 1);
44400
44354
 
44401
44355
  // src/frontend/styles/authModalStyles.ts
44402
44356
  var containerStyle = (isMobile) => ({
@@ -44752,8 +44706,8 @@ var isScopeRequiredProviderOption = (option) => {
44752
44706
  return provider.scopeRequired;
44753
44707
  };
44754
44708
  var isObject = (x) => x !== null && typeof x === "object" && !Array.isArray(x) && Object.prototype.toString.call(x) === "[object Object]";
44755
- var extractPropFromIdentity = (identity2, keys) => {
44756
- let value = identity2;
44709
+ var extractPropFromIdentity = (identity, keys) => {
44710
+ let value = identity;
44757
44711
  for (const key of keys) {
44758
44712
  if (Array.isArray(value)) {
44759
44713
  value = value[0];
@@ -44765,8 +44719,8 @@ var extractPropFromIdentity = (identity2, keys) => {
44765
44719
  }
44766
44720
  return value;
44767
44721
  };
44768
- var extractSubFromOIDCIdentity = (identity2) => {
44769
- const sub = extractPropFromIdentity(identity2, ["sub"]);
44722
+ var extractSubFromOIDCIdentity = (identity) => {
44723
+ const sub = extractPropFromIdentity(identity, ["sub"]);
44770
44724
  if (typeof sub !== "string") {
44771
44725
  throw new Error("Invalid identity data shape");
44772
44726
  }
@@ -44819,8 +44773,8 @@ var providers = defineProviders({
44819
44773
  },
44820
44774
  anilist: {
44821
44775
  authorizationUrl: "https://anilist.co/api/v2/oauth/authorize",
44822
- extractSubjectFromIdentity(identity2) {
44823
- const subject = extractPropFromIdentity(identity2, [
44776
+ extractSubjectFromIdentity(identity) {
44777
+ const subject = extractPropFromIdentity(identity, [
44824
44778
  "data",
44825
44779
  "Viewer",
44826
44780
  "id"
@@ -44876,8 +44830,8 @@ var providers = defineProviders({
44876
44830
  createAuthorizationURLSearchParams: {
44877
44831
  audience: "api.atlassian.com"
44878
44832
  },
44879
- extractSubjectFromIdentity(identity2) {
44880
- const subject = extractPropFromIdentity(identity2, ["account_id"]);
44833
+ extractSubjectFromIdentity(identity) {
44834
+ const subject = extractPropFromIdentity(identity, ["account_id"]);
44881
44835
  if (typeof subject !== "number") {
44882
44836
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
44883
44837
  }
@@ -44984,8 +44938,8 @@ var providers = defineProviders({
44984
44938
  },
44985
44939
  bitbucket: {
44986
44940
  authorizationUrl: "https://bitbucket.org/site/oauth2/authorize",
44987
- extractSubjectFromIdentity(identity2) {
44988
- const subject = extractPropFromIdentity(identity2, ["uuid"]);
44941
+ extractSubjectFromIdentity(identity) {
44942
+ const subject = extractPropFromIdentity(identity, ["uuid"]);
44989
44943
  if (typeof subject !== "number") {
44990
44944
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
44991
44945
  }
@@ -45008,8 +44962,8 @@ var providers = defineProviders({
45008
44962
  },
45009
44963
  box: {
45010
44964
  authorizationUrl: "https://account.box.com/api/oauth2/authorize",
45011
- extractSubjectFromIdentity(identity2) {
45012
- const subject = extractPropFromIdentity(identity2, ["id"]);
44965
+ extractSubjectFromIdentity(identity) {
44966
+ const subject = extractPropFromIdentity(identity, ["id"]);
45013
44967
  if (typeof subject !== "number") {
45014
44968
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
45015
44969
  }
@@ -45038,8 +44992,8 @@ var providers = defineProviders({
45038
44992
  },
45039
44993
  bungie: {
45040
44994
  authorizationUrl: "https://www.bungie.net/en/OAuth/Authorize",
45041
- extractSubjectFromIdentity(identity2) {
45042
- const subject = extractPropFromIdentity(identity2, [
44995
+ extractSubjectFromIdentity(identity) {
44996
+ const subject = extractPropFromIdentity(identity, [
45043
44997
  "Response",
45044
44998
  "membershipId"
45045
44999
  ]);
@@ -45068,8 +45022,8 @@ var providers = defineProviders({
45068
45022
  },
45069
45023
  coinbase: {
45070
45024
  authorizationUrl: "https://www.coinbase.com/oauth/authorize",
45071
- extractSubjectFromIdentity(identity2) {
45072
- const subject = extractPropFromIdentity(identity2, ["data", "id"]);
45025
+ extractSubjectFromIdentity(identity) {
45026
+ const subject = extractPropFromIdentity(identity, ["data", "id"]);
45073
45027
  if (typeof subject !== "number") {
45074
45028
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
45075
45029
  }
@@ -45111,8 +45065,8 @@ var providers = defineProviders({
45111
45065
  },
45112
45066
  donationalerts: {
45113
45067
  authorizationUrl: "https://www.donationalerts.com/oauth/authorize",
45114
- extractSubjectFromIdentity(identity2) {
45115
- const subject = extractPropFromIdentity(identity2, ["data", "id"]);
45068
+ extractSubjectFromIdentity(identity) {
45069
+ const subject = extractPropFromIdentity(identity, ["data", "id"]);
45116
45070
  if (typeof subject !== "number") {
45117
45071
  throw new Error(`Invalid identity data shape: expected number, got ${typeof subject}`);
45118
45072
  }
@@ -45135,8 +45089,8 @@ var providers = defineProviders({
45135
45089
  },
45136
45090
  dribbble: {
45137
45091
  authorizationUrl: "https://dribbble.com/oauth/authorize",
45138
- extractSubjectFromIdentity(identity2) {
45139
- const subject = extractPropFromIdentity(identity2, ["id"]);
45092
+ extractSubjectFromIdentity(identity) {
45093
+ const subject = extractPropFromIdentity(identity, ["id"]);
45140
45094
  if (typeof subject !== "number") {
45141
45095
  throw new Error(`Invalid identity data shape: expected number, got ${typeof subject}`);
45142
45096
  }
@@ -45159,8 +45113,8 @@ var providers = defineProviders({
45159
45113
  },
45160
45114
  dropbox: {
45161
45115
  authorizationUrl: "https://www.dropbox.com/oauth2/authorize",
45162
- extractSubjectFromIdentity(identity2) {
45163
- const subject = extractPropFromIdentity(identity2, ["account_id"]);
45116
+ extractSubjectFromIdentity(identity) {
45117
+ const subject = extractPropFromIdentity(identity, ["account_id"]);
45164
45118
  if (typeof subject !== "number") {
45165
45119
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
45166
45120
  }
@@ -45188,8 +45142,8 @@ var providers = defineProviders({
45188
45142
  },
45189
45143
  epicgames: {
45190
45144
  authorizationUrl: "https://www.epicgames.com/id/authorize",
45191
- extractSubjectFromIdentity(identity2) {
45192
- const subject = extractPropFromIdentity(identity2, ["account_id"]);
45145
+ extractSubjectFromIdentity(identity) {
45146
+ const subject = extractPropFromIdentity(identity, ["account_id"]);
45193
45147
  if (typeof subject !== "number") {
45194
45148
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
45195
45149
  }
@@ -45212,8 +45166,8 @@ var providers = defineProviders({
45212
45166
  },
45213
45167
  etsy: {
45214
45168
  authorizationUrl: "https://www.etsy.com/oauth/connect",
45215
- extractSubjectFromIdentity(identity2) {
45216
- const subject = extractPropFromIdentity(identity2, [
45169
+ extractSubjectFromIdentity(identity) {
45170
+ const subject = extractPropFromIdentity(identity, [
45217
45171
  "results",
45218
45172
  "0",
45219
45173
  "user_id"
@@ -45260,8 +45214,8 @@ var providers = defineProviders({
45260
45214
  },
45261
45215
  figma: {
45262
45216
  authorizationUrl: "https://www.figma.com/oauth",
45263
- extractSubjectFromIdentity(identity2) {
45264
- const subject = extractPropFromIdentity(identity2, ["id"]);
45217
+ extractSubjectFromIdentity(identity) {
45218
+ const subject = extractPropFromIdentity(identity, ["id"]);
45265
45219
  if (typeof subject !== "string") {
45266
45220
  throw new Error(`Invalid identity data shape: expected string, got ${typeof subject}`);
45267
45221
  }
@@ -45304,8 +45258,8 @@ var providers = defineProviders({
45304
45258
  },
45305
45259
  github: {
45306
45260
  authorizationUrl: "https://github.com/login/oauth/authorize",
45307
- extractSubjectFromIdentity(identity2) {
45308
- const subject = extractPropFromIdentity(identity2, ["id"]);
45261
+ extractSubjectFromIdentity(identity) {
45262
+ const subject = extractPropFromIdentity(identity, ["id"]);
45309
45263
  if (typeof subject !== "number") {
45310
45264
  throw new Error(`Invalid identity data shape: expected number, got ${typeof subject}`);
45311
45265
  }
@@ -45450,8 +45404,8 @@ var providers = defineProviders({
45450
45404
  },
45451
45405
  kick: {
45452
45406
  authorizationUrl: "https://id.kick.com/oauth/authorize",
45453
- extractSubjectFromIdentity(identity2) {
45454
- const subject = extractPropFromIdentity(identity2, [
45407
+ extractSubjectFromIdentity(identity) {
45408
+ const subject = extractPropFromIdentity(identity, [
45455
45409
  "data",
45456
45410
  "user_id"
45457
45411
  ]);
@@ -45484,8 +45438,8 @@ var providers = defineProviders({
45484
45438
  },
45485
45439
  lichess: {
45486
45440
  authorizationUrl: "https://lichess.org/oauth/authorize",
45487
- extractSubjectFromIdentity(identity2) {
45488
- const subject = extractPropFromIdentity(identity2, ["id"]);
45441
+ extractSubjectFromIdentity(identity) {
45442
+ const subject = extractPropFromIdentity(identity, ["id"]);
45489
45443
  if (typeof subject !== "number") {
45490
45444
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
45491
45445
  }
@@ -45528,8 +45482,8 @@ var providers = defineProviders({
45528
45482
  },
45529
45483
  linear: {
45530
45484
  authorizationUrl: "https://linear.app/oauth/authorize",
45531
- extractSubjectFromIdentity(identity2) {
45532
- const subject = extractPropFromIdentity(identity2, [
45485
+ extractSubjectFromIdentity(identity) {
45486
+ const subject = extractPropFromIdentity(identity, [
45533
45487
  "data",
45534
45488
  "viewer",
45535
45489
  "id"
@@ -45587,8 +45541,8 @@ var providers = defineProviders({
45587
45541
  },
45588
45542
  mastodon: {
45589
45543
  authorizationUrl: (config2) => `${config2.baseURL}/oauth/authorize`,
45590
- extractSubjectFromIdentity(identity2) {
45591
- const subject = extractPropFromIdentity(identity2, ["id"]);
45544
+ extractSubjectFromIdentity(identity) {
45545
+ const subject = extractPropFromIdentity(identity, ["id"]);
45592
45546
  if (typeof subject !== "string") {
45593
45547
  throw new Error(`Invalid identity data shape: expected string got ${typeof subject}`);
45594
45548
  }
@@ -45618,8 +45572,8 @@ var providers = defineProviders({
45618
45572
  },
45619
45573
  mercadolibre: {
45620
45574
  authorizationUrl: "https://auth.mercadolibre.com/authorization",
45621
- extractSubjectFromIdentity(identity2) {
45622
- const subject = extractPropFromIdentity(identity2, ["id"]);
45575
+ extractSubjectFromIdentity(identity) {
45576
+ const subject = extractPropFromIdentity(identity, ["id"]);
45623
45577
  if (typeof subject !== "number") {
45624
45578
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
45625
45579
  }
@@ -45643,8 +45597,8 @@ var providers = defineProviders({
45643
45597
  },
45644
45598
  mercadopago: {
45645
45599
  authorizationUrl: "https://auth.mercadopago.com/authorization",
45646
- extractSubjectFromIdentity(identity2) {
45647
- const subject = extractPropFromIdentity(identity2, ["id"]);
45600
+ extractSubjectFromIdentity(identity) {
45601
+ const subject = extractPropFromIdentity(identity, ["id"]);
45648
45602
  if (typeof subject !== "number") {
45649
45603
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
45650
45604
  }
@@ -45686,8 +45640,8 @@ var providers = defineProviders({
45686
45640
  },
45687
45641
  myanimelist: {
45688
45642
  authorizationUrl: "https://myanimelist.net/v1/oauth2/authorize",
45689
- extractSubjectFromIdentity(identity2) {
45690
- const subject = extractPropFromIdentity(identity2, ["id"]);
45643
+ extractSubjectFromIdentity(identity) {
45644
+ const subject = extractPropFromIdentity(identity, ["id"]);
45691
45645
  if (typeof subject !== "number") {
45692
45646
  throw new Error(`Invalid identity data shape: expected number, got ${typeof subject}`);
45693
45647
  }
@@ -45711,8 +45665,8 @@ var providers = defineProviders({
45711
45665
  },
45712
45666
  naver: {
45713
45667
  authorizationUrl: "https://nid.naver.com/oauth2.0/authorize",
45714
- extractSubjectFromIdentity(identity2) {
45715
- const subject = extractPropFromIdentity(identity2, [
45668
+ extractSubjectFromIdentity(identity) {
45669
+ const subject = extractPropFromIdentity(identity, [
45716
45670
  "response",
45717
45671
  "id"
45718
45672
  ]);
@@ -45738,8 +45692,8 @@ var providers = defineProviders({
45738
45692
  },
45739
45693
  notion: {
45740
45694
  authorizationUrl: "https://api.notion.com/v1/oauth/authorize",
45741
- extractSubjectFromIdentity(identity2) {
45742
- const subject = extractPropFromIdentity(identity2, ["id"]);
45695
+ extractSubjectFromIdentity(identity) {
45696
+ const subject = extractPropFromIdentity(identity, ["id"]);
45743
45697
  if (typeof subject !== "string") {
45744
45698
  throw new Error(`Invalid identity data shape: expected string got ${typeof subject}`);
45745
45699
  }
@@ -45790,8 +45744,8 @@ var providers = defineProviders({
45790
45744
  },
45791
45745
  osu: {
45792
45746
  authorizationUrl: "https://osu.ppy.sh/oauth/authorize",
45793
- extractSubjectFromIdentity(identity2) {
45794
- const subject = extractPropFromIdentity(identity2, ["id"]);
45747
+ extractSubjectFromIdentity(identity) {
45748
+ const subject = extractPropFromIdentity(identity, ["id"]);
45795
45749
  if (typeof subject !== "number") {
45796
45750
  throw new Error(`Invalid identity data shape: expected number, got ${typeof subject}`);
45797
45751
  }
@@ -45814,8 +45768,8 @@ var providers = defineProviders({
45814
45768
  },
45815
45769
  patreon: {
45816
45770
  authorizationUrl: "https://www.patreon.com/oauth2/authorize",
45817
- extractSubjectFromIdentity(identity2) {
45818
- const subject = extractPropFromIdentity(identity2, ["data", "id"]);
45771
+ extractSubjectFromIdentity(identity) {
45772
+ const subject = extractPropFromIdentity(identity, ["data", "id"]);
45819
45773
  if (typeof subject !== "string") {
45820
45774
  throw new Error(`Invalid identity data shape: expected string got ${typeof subject}`);
45821
45775
  }
@@ -45863,8 +45817,8 @@ var providers = defineProviders({
45863
45817
  },
45864
45818
  polaraccesslink: {
45865
45819
  authorizationUrl: "https://flow.polar.com/oauth2/authorization",
45866
- extractSubjectFromIdentity(identity2) {
45867
- const subject = extractPropFromIdentity(identity2, ["x_user_id"]);
45820
+ extractSubjectFromIdentity(identity) {
45821
+ const subject = extractPropFromIdentity(identity, ["x_user_id"]);
45868
45822
  if (typeof subject !== "number") {
45869
45823
  throw new Error(`Invalid identity data shape: expected number, got ${typeof subject}`);
45870
45824
  }
@@ -45888,8 +45842,8 @@ var providers = defineProviders({
45888
45842
  },
45889
45843
  polarteampro: {
45890
45844
  authorizationUrl: "https://auth.polar.com/oauth/authorize",
45891
- extractSubjectFromIdentity(identity2) {
45892
- const subject = extractPropFromIdentity(identity2, ["x_user_id"]);
45845
+ extractSubjectFromIdentity(identity) {
45846
+ const subject = extractPropFromIdentity(identity, ["x_user_id"]);
45893
45847
  if (typeof subject !== "number") {
45894
45848
  throw new Error(`Invalid identity data shape: expected number, got ${typeof subject}`);
45895
45849
  }
@@ -45913,8 +45867,8 @@ var providers = defineProviders({
45913
45867
  },
45914
45868
  reddit: {
45915
45869
  authorizationUrl: "https://www.reddit.com/api/v1/authorize",
45916
- extractSubjectFromIdentity(identity2) {
45917
- const subject = extractPropFromIdentity(identity2, ["id"]);
45870
+ extractSubjectFromIdentity(identity) {
45871
+ const subject = extractPropFromIdentity(identity, ["id"]);
45918
45872
  if (typeof subject !== "number") {
45919
45873
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
45920
45874
  }
@@ -45988,8 +45942,8 @@ var providers = defineProviders({
45988
45942
  },
45989
45943
  shikimori: {
45990
45944
  authorizationUrl: "https://shikimori.org/oauth/authorize",
45991
- extractSubjectFromIdentity(identity2) {
45992
- const subject = extractPropFromIdentity(identity2, ["id"]);
45945
+ extractSubjectFromIdentity(identity) {
45946
+ const subject = extractPropFromIdentity(identity, ["id"]);
45993
45947
  if (typeof subject !== "number") {
45994
45948
  throw new Error(`Invalid identity data shape: expected number, got ${typeof subject}`);
45995
45949
  }
@@ -46036,8 +45990,8 @@ var providers = defineProviders({
46036
45990
  },
46037
45991
  spotify: {
46038
45992
  authorizationUrl: "https://accounts.spotify.com/authorize",
46039
- extractSubjectFromIdentity(identity2) {
46040
- const subject = extractPropFromIdentity(identity2, ["id"]);
45993
+ extractSubjectFromIdentity(identity) {
45994
+ const subject = extractPropFromIdentity(identity, ["id"]);
46041
45995
  if (typeof subject !== "string") {
46042
45996
  throw new Error(`Invalid identity data shape: expected string got ${typeof subject}`);
46043
45997
  }
@@ -46061,8 +46015,8 @@ var providers = defineProviders({
46061
46015
  },
46062
46016
  startgg: {
46063
46017
  authorizationUrl: "https://start.gg/oauth/authorize",
46064
- extractSubjectFromIdentity(identity2) {
46065
- const subject = extractPropFromIdentity(identity2, [
46018
+ extractSubjectFromIdentity(identity) {
46019
+ const subject = extractPropFromIdentity(identity, [
46066
46020
  "data",
46067
46021
  "currentUser",
46068
46022
  "id"
@@ -46096,8 +46050,8 @@ var providers = defineProviders({
46096
46050
  },
46097
46051
  strava: {
46098
46052
  authorizationUrl: "https://www.strava.com/oauth/authorize",
46099
- extractSubjectFromIdentity(identity2) {
46100
- const subject = extractPropFromIdentity(identity2, ["id"]);
46053
+ extractSubjectFromIdentity(identity) {
46054
+ const subject = extractPropFromIdentity(identity, ["id"]);
46101
46055
  if (typeof subject !== "number") {
46102
46056
  throw new Error(`Invalid identity data shape: expected number, got ${typeof subject}`);
46103
46057
  }
@@ -46130,8 +46084,8 @@ var providers = defineProviders({
46130
46084
  },
46131
46085
  synology: {
46132
46086
  authorizationUrl: (config2) => `${config2.baseURL}/webman/sso/SSOOauth.cgi?client_id=${config2.clientId}&response_type=code&redirect_uri=${config2.redirectUri}`,
46133
- extractSubjectFromIdentity(identity2) {
46134
- const subject = extractPropFromIdentity(identity2, ["data", "id"]);
46087
+ extractSubjectFromIdentity(identity) {
46088
+ const subject = extractPropFromIdentity(identity, ["data", "id"]);
46135
46089
  if (typeof subject !== "number") {
46136
46090
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
46137
46091
  }
@@ -46157,8 +46111,8 @@ var providers = defineProviders({
46157
46111
  createAuthorizationURLSearchParams: (config2) => ({
46158
46112
  client_key: config2.clientId
46159
46113
  }),
46160
- extractSubjectFromIdentity(identity2) {
46161
- const subject = extractPropFromIdentity(identity2, [
46114
+ extractSubjectFromIdentity(identity) {
46115
+ const subject = extractPropFromIdentity(identity, [
46162
46116
  "data",
46163
46117
  "open_id"
46164
46118
  ]);
@@ -46191,8 +46145,8 @@ var providers = defineProviders({
46191
46145
  },
46192
46146
  tiltify: {
46193
46147
  authorizationUrl: "https://v5api.tiltify.com/oauth/authorize",
46194
- extractSubjectFromIdentity(identity2) {
46195
- const subject = extractPropFromIdentity(identity2, ["data", "id"]);
46148
+ extractSubjectFromIdentity(identity) {
46149
+ const subject = extractPropFromIdentity(identity, ["data", "id"]);
46196
46150
  if (typeof subject !== "string") {
46197
46151
  throw new Error(`Invalid identity data shape: expected string got ${typeof subject}`);
46198
46152
  }
@@ -46215,8 +46169,8 @@ var providers = defineProviders({
46215
46169
  },
46216
46170
  tumblr: {
46217
46171
  authorizationUrl: "https://www.tumblr.com/oauth2/authorize",
46218
- extractSubjectFromIdentity(identity2) {
46219
- const subject = extractPropFromIdentity(identity2, [
46172
+ extractSubjectFromIdentity(identity) {
46173
+ const subject = extractPropFromIdentity(identity, [
46220
46174
  "response",
46221
46175
  "user",
46222
46176
  "name"
@@ -46273,8 +46227,8 @@ var providers = defineProviders({
46273
46227
  },
46274
46228
  twitter: {
46275
46229
  authorizationUrl: "https://twitter.com/i/oauth2/authorize",
46276
- extractSubjectFromIdentity(identity2) {
46277
- const subject = extractPropFromIdentity(identity2, ["data", "id"]);
46230
+ extractSubjectFromIdentity(identity) {
46231
+ const subject = extractPropFromIdentity(identity, ["data", "id"]);
46278
46232
  if (typeof subject !== "number") {
46279
46233
  throw new Error(`Invalid identity data shape: expected number got ${typeof subject}`);
46280
46234
  }
@@ -46303,8 +46257,8 @@ var providers = defineProviders({
46303
46257
  },
46304
46258
  vk: {
46305
46259
  authorizationUrl: "https://oauth.vk.com/authorize",
46306
- extractSubjectFromIdentity(identity2) {
46307
- const subject = extractPropFromIdentity(identity2, [
46260
+ extractSubjectFromIdentity(identity) {
46261
+ const subject = extractPropFromIdentity(identity, [
46308
46262
  "response",
46309
46263
  "0",
46310
46264
  "id"
@@ -46331,8 +46285,8 @@ var providers = defineProviders({
46331
46285
  },
46332
46286
  withings: {
46333
46287
  authorizationUrl: "https://account.withings.com/oauth2_user/authorize2",
46334
- extractSubjectFromIdentity(identity2) {
46335
- const subject = extractPropFromIdentity(identity2, ["userid"]);
46288
+ extractSubjectFromIdentity(identity) {
46289
+ const subject = extractPropFromIdentity(identity, ["userid"]);
46336
46290
  if (typeof subject !== "string") {
46337
46291
  throw new Error(`Invalid identity data shape: expected string, got ${typeof subject}`);
46338
46292
  }
@@ -46444,8 +46398,8 @@ var providers = defineProviders({
46444
46398
  device_id: crypto.randomUUID(),
46445
46399
  device_name: `${navigator.platform ?? "Unknown"} \u2014 ${(navigator.userAgent.split(")")[0] || "").split("(").pop() || "Unknown"}`
46446
46400
  },
46447
- extractSubjectFromIdentity(identity2) {
46448
- const subject = extractPropFromIdentity(identity2, ["id"]);
46401
+ extractSubjectFromIdentity(identity) {
46402
+ const subject = extractPropFromIdentity(identity, ["id"]);
46449
46403
  if (typeof subject !== "string") {
46450
46404
  throw new Error(`Invalid identity data shape: expected string got ${typeof subject}`);
46451
46405
  }
@@ -46475,8 +46429,8 @@ var providers = defineProviders({
46475
46429
  },
46476
46430
  zoom: {
46477
46431
  authorizationUrl: "https://zoom.us/oauth/authorize",
46478
- extractSubjectFromIdentity(identity2) {
46479
- const subject = extractPropFromIdentity(identity2, ["id"]);
46432
+ extractSubjectFromIdentity(identity) {
46433
+ const subject = extractPropFromIdentity(identity, ["id"]);
46480
46434
  if (typeof subject !== "string") {
46481
46435
  throw new Error(`Invalid identity data shape: expected string got ${typeof subject}`);
46482
46436
  }
@@ -47067,8 +47021,8 @@ var OAuthLink = ({ mode, provider, themeSprings }) => {
47067
47021
  // src/frontend/components/auth/AuthContainer.tsx
47068
47022
  var jsx_dev_runtime16 = __toESM(require_jsx_dev_runtime(), 1);
47069
47023
  var AuthContainer = ({ themeSprings }) => {
47070
- const [currentProvider, setCurrentProvider] = import_react24.useState();
47071
- const [mode, setMode] = import_react24.useState("login");
47024
+ const [currentProvider, setCurrentProvider] = import_react23.useState();
47025
+ const [mode, setMode] = import_react23.useState("login");
47072
47026
  const switchMode = () => {
47073
47027
  setMode((prev) => prev === "login" ? "signup" : "login");
47074
47028
  };
@@ -47148,7 +47102,7 @@ var NavbarLink = ({
47148
47102
  }, undefined, true, undefined, this);
47149
47103
 
47150
47104
  // src/frontend/components/utils/Modal.tsx
47151
- var import_react25 = __toESM(require_react(), 1);
47105
+ var import_react24 = __toESM(require_react(), 1);
47152
47106
  var jsx_dev_runtime18 = __toESM(require_jsx_dev_runtime(), 1);
47153
47107
  var Modal = ({
47154
47108
  style,
@@ -47157,8 +47111,8 @@ var Modal = ({
47157
47111
  onOpen,
47158
47112
  children
47159
47113
  }) => {
47160
- const dialogRef = import_react25.useRef(null);
47161
- import_react25.useEffect(() => {
47114
+ const dialogRef = import_react24.useRef(null);
47115
+ import_react24.useEffect(() => {
47162
47116
  const dialog = dialogRef.current;
47163
47117
  if (!dialog)
47164
47118
  return;
@@ -47169,7 +47123,7 @@ var Modal = ({
47169
47123
  dialog.close();
47170
47124
  }
47171
47125
  }, [isOpen, onOpen]);
47172
- import_react25.useEffect(() => {
47126
+ import_react24.useEffect(() => {
47173
47127
  if (!isOpen)
47174
47128
  return;
47175
47129
  document.body.style.overflow = "hidden";
@@ -47244,11 +47198,11 @@ var Modal = ({
47244
47198
  };
47245
47199
 
47246
47200
  // src/frontend/hooks/useContainerQuery.ts
47247
- var import_react26 = __toESM(require_react(), 1);
47248
- var useIsomorphicLayoutEffect2 = typeof window !== "undefined" ? import_react26.useLayoutEffect : import_react26.useEffect;
47201
+ var import_react25 = __toESM(require_react(), 1);
47202
+ var useIsomorphicLayoutEffect2 = typeof window !== "undefined" ? import_react25.useLayoutEffect : import_react25.useEffect;
47249
47203
  var useContainerQuery = () => {
47250
- const ref = import_react26.useRef(null);
47251
- const [dimensions, setDimensions] = import_react26.useState({
47204
+ const ref = import_react25.useRef(null);
47205
+ const [dimensions, setDimensions] = import_react25.useState({
47252
47206
  height: 0,
47253
47207
  scrollHeight: 0,
47254
47208
  width: 0
@@ -47277,6 +47231,17 @@ var useContainerQuery = () => {
47277
47231
  return { dimensions, ref };
47278
47232
  };
47279
47233
 
47234
+ // node_modules/react-icons/ai/index.mjs
47235
+ function AiOutlineExperiment(props) {
47236
+ return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M512 472a40 40 0 1 0 80 0 40 40 0 1 0-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 0 1-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z" }, child: [] }] })(props);
47237
+ }
47238
+ function AiOutlineMinusCircle(props) {
47239
+ return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" }, child: [] }, { tag: "path", attr: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, child: [] }] })(props);
47240
+ }
47241
+ function AiOutlineMoon(props) {
47242
+ return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024", fill: "currentColor", fillRule: "evenodd" }, child: [{ tag: "path", attr: { d: "M489.493 111.658c30.658-1.792 45.991 36.44 22.59 56.329C457.831 214.095 426 281.423 426 354c0 134.757 109.243 244 244 244 72.577 0 139.905-31.832 186.014-86.084 19.868-23.377 58.064-8.102 56.332 22.53C900.4 745.823 725.141 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.287-386.024 374.198-399.649l.206-.013zm-81.143 79.75-4.112 1.362C271.1 237.943 176 364.092 176 511.5 176 697.344 326.656 848 512.5 848c148.28 0 274.938-96.192 319.453-230.41l.625-1.934-.11.071c-47.18 29.331-102.126 45.755-159.723 46.26L670 662c-170.104 0-308-137.896-308-308 0-58.595 16.476-114.54 46.273-162.467z" }, child: [] }] })(props);
47243
+ }
47244
+
47280
47245
  // node_modules/react-icons/fa/index.mjs
47281
47246
  function FaCheckCircle(props) {
47282
47247
  return GenIcon({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z" }, child: [] }] })(props);
@@ -47291,11 +47256,39 @@ function FaRegQuestionCircle(props) {
47291
47256
  return GenIcon({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm107.244-255.2c0 67.052-72.421 68.084-72.421 92.863V300c0 6.627-5.373 12-12 12h-45.647c-6.627 0-12-5.373-12-12v-8.659c0-35.745 27.1-50.034 47.579-61.516 17.561-9.845 28.324-16.541 28.324-29.579 0-17.246-21.999-28.693-39.784-28.693-23.189 0-33.894 10.977-48.942 29.969-4.057 5.12-11.46 6.071-16.666 2.124l-27.824-21.098c-5.107-3.872-6.251-11.066-2.644-16.363C184.846 131.491 214.94 112 261.794 112c49.071 0 101.45 38.304 101.45 88.8zM298 368c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42z" }, child: [] }] })(props);
47292
47257
  }
47293
47258
 
47259
+ // node_modules/react-icons/io5/index.mjs
47260
+ function IoSunny(props) {
47261
+ return GenIcon({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 118a22 22 0 0 1-22-22V48a22 22 0 0 1 44 0v48a22 22 0 0 1-22 22zm0 368a22 22 0 0 1-22-22v-48a22 22 0 0 1 44 0v48a22 22 0 0 1-22 22zm113.14-321.14a22 22 0 0 1-15.56-37.55l33.94-33.94a22 22 0 0 1 31.11 31.11l-33.94 33.94a21.93 21.93 0 0 1-15.55 6.44zM108.92 425.08a22 22 0 0 1-15.55-37.56l33.94-33.94a22 22 0 1 1 31.11 31.11l-33.94 33.94a21.94 21.94 0 0 1-15.56 6.45zM464 278h-48a22 22 0 0 1 0-44h48a22 22 0 0 1 0 44zm-368 0H48a22 22 0 0 1 0-44h48a22 22 0 0 1 0 44zm307.08 147.08a21.94 21.94 0 0 1-15.56-6.45l-33.94-33.94a22 22 0 0 1 31.11-31.11l33.94 33.94a22 22 0 0 1-15.55 37.56zM142.86 164.86a21.89 21.89 0 0 1-15.55-6.44l-33.94-33.94a22 22 0 0 1 31.11-31.11l33.94 33.94a22 22 0 0 1-15.56 37.55zM256 358a102 102 0 1 1 102-102 102.12 102.12 0 0 1-102 102z" }, child: [] }] })(props);
47262
+ }
47263
+
47264
+ // src/frontend/components/utils/ProfilePicture.tsx
47265
+ var jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
47266
+ var ProfilePicture = ({
47267
+ userImage,
47268
+ backupImage,
47269
+ width = "2rem",
47270
+ height = "2rem",
47271
+ themeSprings
47272
+ }) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(animated.img, {
47273
+ src: userImage ?? backupImage,
47274
+ alt: "Profile",
47275
+ style: {
47276
+ backgroundColor: themeSprings.themeTertiary,
47277
+ borderRadius: "50%",
47278
+ height,
47279
+ objectFit: "cover",
47280
+ width
47281
+ }
47282
+ }, undefined, false, undefined, this);
47283
+
47294
47284
  // src/frontend/components/utils/AnimatedComponents.tsx
47295
47285
  var AnimatedFaChevronDown = animated(FaChevronDown);
47286
+ var AnimatedProfilePicture = animated(ProfilePicture);
47287
+ var AnimatedMoon = animated(AiOutlineMoon);
47288
+ var AnimatedSun = animated(IoSunny);
47296
47289
 
47297
47290
  // src/frontend/components/hamburger/HamburgerDropdown.tsx
47298
- var jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
47291
+ var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
47299
47292
  var HamburgerDropdown = ({
47300
47293
  label,
47301
47294
  icon,
@@ -47323,27 +47316,27 @@ var HamburgerDropdown = ({
47323
47316
  transform: isOpen ? "rotate(180deg)" : "rotate(0deg)"
47324
47317
  });
47325
47318
  };
47326
- return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("div", {
47319
+ return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV("div", {
47327
47320
  style: { width: "100%" },
47328
47321
  children: [
47329
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("div", {
47322
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV("div", {
47330
47323
  style: {
47331
47324
  alignItems: "center",
47332
47325
  display: "flex",
47333
47326
  justifyContent: "space-between"
47334
47327
  },
47335
47328
  children: [
47336
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(animated.a, {
47329
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(animated.a, {
47337
47330
  href,
47338
47331
  style: labelStyle(themeSprings),
47339
47332
  children: [
47340
47333
  icon,
47341
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV("span", {
47334
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV("span", {
47342
47335
  children: label
47343
47336
  }, undefined, false, undefined, this)
47344
47337
  ]
47345
47338
  }, undefined, true, undefined, this),
47346
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(AnimatedFaChevronDown, {
47339
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(AnimatedFaChevronDown, {
47347
47340
  onClick: toggleDropdown,
47348
47341
  style: {
47349
47342
  cursor: "pointer",
@@ -47355,14 +47348,14 @@ var HamburgerDropdown = ({
47355
47348
  }, undefined, false, undefined, this)
47356
47349
  ]
47357
47350
  }, undefined, true, undefined, this),
47358
- /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(animated.nav, {
47351
+ /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(animated.nav, {
47359
47352
  ref,
47360
47353
  style: {
47361
47354
  height: dropdownSprings.height,
47362
47355
  opacity: dropdownSprings.opacity,
47363
47356
  overflow: "hidden"
47364
47357
  },
47365
- children: links.map((link, index) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(NavbarLink, {
47358
+ children: links.map((link, index) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(NavbarLink, {
47366
47359
  themeSprings,
47367
47360
  icon: link.icon,
47368
47361
  href: link.href,
@@ -47374,11 +47367,11 @@ var HamburgerDropdown = ({
47374
47367
  };
47375
47368
 
47376
47369
  // src/frontend/components/hamburger/HamburgerHeader.tsx
47377
- var jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
47370
+ var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
47378
47371
  var HamburgerHeader = ({
47379
47372
  onClose,
47380
47373
  themeSprings
47381
- }) => /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(animated.div, {
47374
+ }) => /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(animated.div, {
47382
47375
  style: {
47383
47376
  alignItems: "center",
47384
47377
  backgroundColor: themeSprings.themePrimary,
@@ -47393,7 +47386,7 @@ var HamburgerHeader = ({
47393
47386
  width: "100%"
47394
47387
  },
47395
47388
  children: [
47396
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV("a", {
47389
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV("a", {
47397
47390
  href: "/",
47398
47391
  style: {
47399
47392
  color: "inherit",
@@ -47403,7 +47396,7 @@ var HamburgerHeader = ({
47403
47396
  },
47404
47397
  children: "AbsoluteJS"
47405
47398
  }, undefined, false, undefined, this),
47406
- /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(FaTimes, {
47399
+ /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(FaTimes, {
47407
47400
  style: {
47408
47401
  cursor: "pointer",
47409
47402
  fontSize: "34px"
@@ -47413,26 +47406,6 @@ var HamburgerHeader = ({
47413
47406
  ]
47414
47407
  }, undefined, true, undefined, this);
47415
47408
 
47416
- // src/frontend/components/utils/ProfilePicture.tsx
47417
- var jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
47418
- var ProfilePicture = ({
47419
- userImage,
47420
- backupImage,
47421
- width = "2rem",
47422
- height = "2rem",
47423
- themeSprings
47424
- }) => /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(animated.img, {
47425
- src: userImage ?? backupImage,
47426
- alt: "Profile",
47427
- style: {
47428
- backgroundColor: themeSprings.themeTertiary,
47429
- borderRadius: "50%",
47430
- height,
47431
- objectFit: "cover",
47432
- width
47433
- }
47434
- }, undefined, false, undefined, this);
47435
-
47436
47409
  // src/frontend/components/hamburger/HamburgerUserButtons.tsx
47437
47410
  var jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
47438
47411
  var HamburgerUserButtons = ({
@@ -47440,63 +47413,60 @@ var HamburgerUserButtons = ({
47440
47413
  handleSignOut,
47441
47414
  openModal,
47442
47415
  themeSprings
47443
- }) => {
47444
- const theme = useThemeStore((state) => state.theme);
47445
- return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV("div", {
47446
- style: {
47447
- alignItems: "center",
47448
- display: "flex",
47449
- flexDirection: "column",
47450
- justifyContent: "space-between",
47451
- width: "100%"
47452
- },
47453
- children: [
47454
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(animated.button, {
47455
- onClick: user ? () => handleSignOut() : openModal,
47456
- style: buttonStyle({
47457
- backgroundColor: themeSprings.themeTertiary,
47458
- color: themeSprings.contrastPrimary,
47459
- width: "100%"
47460
- }),
47461
- children: user ? "Sign Out" : "Login"
47462
- }, undefined, false, undefined, this),
47463
- user !== undefined && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV("div", {
47464
- style: {
47465
- alignItems: "center",
47466
- display: "flex",
47467
- flexDirection: "row",
47468
- gap: "2rem",
47469
- marginTop: "1rem"
47470
- },
47471
- children: [
47472
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(animated.a, {
47473
- href: "/portal",
47474
- children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(ProfilePicture, {
47475
- themeSprings,
47476
- userImage: typeof user.metadata?.profile_picture === "string" ? user.metadata.profile_picture : undefined,
47477
- backupImage: theme === "dark" ? "/assets/svg/default-profile-icon-light.svg" : "/assets/svg/default-profile-icon.svg",
47478
- width: "4rem",
47479
- height: "4rem"
47480
- }, undefined, false, undefined, this)
47481
- }, undefined, false, undefined, this),
47482
- /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(animated.span, {
47483
- style: {
47484
- color: themeSprings.contrastPrimary,
47485
- fontSize: "1.2rem",
47486
- fontWeight: "bold",
47487
- textAlign: "center"
47488
- },
47489
- children: [
47490
- typeof user.metadata?.given_name === "string" ? user.metadata.given_name : "",
47491
- " ",
47492
- typeof user.metadata?.family_name === "string" ? user.metadata.family_name : ""
47493
- ]
47494
- }, undefined, true, undefined, this)
47495
- ]
47496
- }, undefined, true, undefined, this)
47497
- ]
47498
- }, undefined, true, undefined, this);
47499
- };
47416
+ }) => /* @__PURE__ */ jsx_dev_runtime22.jsxDEV("div", {
47417
+ style: {
47418
+ alignItems: "center",
47419
+ display: "flex",
47420
+ flexDirection: "column",
47421
+ justifyContent: "space-between",
47422
+ width: "100%"
47423
+ },
47424
+ children: [
47425
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(animated.button, {
47426
+ onClick: user ? () => handleSignOut() : openModal,
47427
+ style: buttonStyle({
47428
+ backgroundColor: themeSprings.themeTertiary,
47429
+ color: themeSprings.contrastPrimary,
47430
+ width: "100%"
47431
+ }),
47432
+ children: user ? "Sign Out" : "Login"
47433
+ }, undefined, false, undefined, this),
47434
+ user !== undefined && /* @__PURE__ */ jsx_dev_runtime22.jsxDEV("div", {
47435
+ style: {
47436
+ alignItems: "center",
47437
+ display: "flex",
47438
+ flexDirection: "row",
47439
+ gap: "2rem",
47440
+ marginTop: "1rem"
47441
+ },
47442
+ children: [
47443
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(animated.a, {
47444
+ href: "/portal",
47445
+ children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(AnimatedProfilePicture, {
47446
+ themeSprings,
47447
+ userImage: typeof user.metadata?.profile_picture === "string" ? user.metadata.profile_picture : undefined,
47448
+ backupImage: themeSprings.theme.to((mode) => mode === "dark" ? "/assets/svg/default-profile-icon-light.svg" : "/assets/svg/default-profile-icon.svg"),
47449
+ width: "4rem",
47450
+ height: "4rem"
47451
+ }, undefined, false, undefined, this)
47452
+ }, undefined, false, undefined, this),
47453
+ /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(animated.span, {
47454
+ style: {
47455
+ color: themeSprings.contrastPrimary,
47456
+ fontSize: "1.2rem",
47457
+ fontWeight: "bold",
47458
+ textAlign: "center"
47459
+ },
47460
+ children: [
47461
+ typeof user.metadata?.given_name === "string" ? user.metadata.given_name : "",
47462
+ " ",
47463
+ typeof user.metadata?.family_name === "string" ? user.metadata.family_name : ""
47464
+ ]
47465
+ }, undefined, true, undefined, this)
47466
+ ]
47467
+ }, undefined, true, undefined, this)
47468
+ ]
47469
+ }, undefined, true, undefined, this);
47500
47470
 
47501
47471
  // src/frontend/components/hamburger/HamburgerMenu.tsx
47502
47472
  var jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
@@ -47507,7 +47477,7 @@ var HamburgerMenu = ({
47507
47477
  themeSprings,
47508
47478
  handleSignOut
47509
47479
  }) => {
47510
- const [isModalOpen, setIsModalOpen] = import_react27.useState(false);
47480
+ const [isModalOpen, setIsModalOpen] = import_react26.useState(false);
47511
47481
  return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(animated.div, {
47512
47482
  style: {
47513
47483
  background: themeSprings.themeSecondary,
@@ -47587,7 +47557,7 @@ var HamburgerMenu = ({
47587
47557
  };
47588
47558
 
47589
47559
  // src/frontend/components/navbar/NavbarDropdown.tsx
47590
- var import_react28 = __toESM(require_react(), 1);
47560
+ var import_react27 = __toESM(require_react(), 1);
47591
47561
  var jsx_dev_runtime24 = __toESM(require_jsx_dev_runtime(), 1);
47592
47562
  var AnimatedFaChevronDown2 = animated(FaChevronDown);
47593
47563
  var NavbarDropdown = ({
@@ -47596,7 +47566,7 @@ var NavbarDropdown = ({
47596
47566
  links,
47597
47567
  themeSprings
47598
47568
  }) => {
47599
- const dropdownRef = import_react28.useRef(null);
47569
+ const dropdownRef = import_react27.useRef(null);
47600
47570
  const [dropdownSpring, dropdownApi] = useSpring(() => ({
47601
47571
  config: { friction: 30, tension: 250 },
47602
47572
  height: 0,
@@ -47698,10 +47668,10 @@ var NavbarLinks = ({ navbarData: navbarData2, themeSprings }) => /* @__PURE__ */
47698
47668
  }, undefined, false, undefined, this);
47699
47669
 
47700
47670
  // src/frontend/components/navbar/NavbarUserButtons.tsx
47701
- var import_react32 = __toESM(require_react(), 1);
47671
+ var import_react30 = __toESM(require_react(), 1);
47702
47672
 
47703
47673
  // src/frontend/components/navbar/DropdownContainer.tsx
47704
- var import_react29 = __toESM(require_react(), 1);
47674
+ var import_react28 = __toESM(require_react(), 1);
47705
47675
  var jsx_dev_runtime26 = __toESM(require_jsx_dev_runtime(), 1);
47706
47676
  var DropdownContainer = ({
47707
47677
  spring,
@@ -47711,8 +47681,8 @@ var DropdownContainer = ({
47711
47681
  themeSprings,
47712
47682
  ignoredElements = []
47713
47683
  }) => {
47714
- const dropdownRef = import_react29.useRef(null);
47715
- import_react29.useEffect(() => {
47684
+ const dropdownRef = import_react28.useRef(null);
47685
+ import_react28.useEffect(() => {
47716
47686
  const handleOutsideClick = (event) => {
47717
47687
  if (!(event.target instanceof Node))
47718
47688
  return;
@@ -47750,63 +47720,11 @@ var DropdownContainer = ({
47750
47720
  };
47751
47721
 
47752
47722
  // src/frontend/components/navbar/ThemeButton.tsx
47753
- var import_react31 = __toESM(require_react(), 1);
47754
-
47755
- // node_modules/react-icons/ai/index.mjs
47756
- function AiOutlineExperiment(props) {
47757
- return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M512 472a40 40 0 1 0 80 0 40 40 0 1 0-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 0 1-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z" }, child: [] }] })(props);
47758
- }
47759
- function AiOutlineMinusCircle(props) {
47760
- return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" }, child: [] }, { tag: "path", attr: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, child: [] }] })(props);
47761
- }
47762
- function AiOutlineMoon(props) {
47763
- return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024", fill: "currentColor", fillRule: "evenodd" }, child: [{ tag: "path", attr: { d: "M489.493 111.658c30.658-1.792 45.991 36.44 22.59 56.329C457.831 214.095 426 281.423 426 354c0 134.757 109.243 244 244 244 72.577 0 139.905-31.832 186.014-86.084 19.868-23.377 58.064-8.102 56.332 22.53C900.4 745.823 725.141 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.287-386.024 374.198-399.649l.206-.013zm-81.143 79.75-4.112 1.362C271.1 237.943 176 364.092 176 511.5 176 697.344 326.656 848 512.5 848c148.28 0 274.938-96.192 319.453-230.41l.625-1.934-.11.071c-47.18 29.331-102.126 45.755-159.723 46.26L670 662c-170.104 0-308-137.896-308-308 0-58.595 16.476-114.54 46.273-162.467z" }, child: [] }] })(props);
47764
- }
47765
-
47766
- // node_modules/react-icons/io5/index.mjs
47767
- function IoSunny(props) {
47768
- return GenIcon({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 118a22 22 0 0 1-22-22V48a22 22 0 0 1 44 0v48a22 22 0 0 1-22 22zm0 368a22 22 0 0 1-22-22v-48a22 22 0 0 1 44 0v48a22 22 0 0 1-22 22zm113.14-321.14a22 22 0 0 1-15.56-37.55l33.94-33.94a22 22 0 0 1 31.11 31.11l-33.94 33.94a21.93 21.93 0 0 1-15.55 6.44zM108.92 425.08a22 22 0 0 1-15.55-37.56l33.94-33.94a22 22 0 1 1 31.11 31.11l-33.94 33.94a21.94 21.94 0 0 1-15.56 6.45zM464 278h-48a22 22 0 0 1 0-44h48a22 22 0 0 1 0 44zm-368 0H48a22 22 0 0 1 0-44h48a22 22 0 0 1 0 44zm307.08 147.08a21.94 21.94 0 0 1-15.56-6.45l-33.94-33.94a22 22 0 0 1 31.11-31.11l33.94 33.94a22 22 0 0 1-15.55 37.56zM142.86 164.86a21.89 21.89 0 0 1-15.55-6.44l-33.94-33.94a22 22 0 0 1 31.11-31.11l33.94 33.94a22 22 0 0 1-15.56 37.55zM256 358a102 102 0 1 1 102-102 102.12 102.12 0 0 1-102 102z" }, child: [] }] })(props);
47769
- }
47770
-
47771
- // src/frontend/hooks/useInitTheme.ts
47772
- var import_react30 = __toESM(require_react(), 1);
47773
- var useInitTheme = () => {
47774
- const setTheme = useThemeStore((state) => state.setTheme);
47775
- const [currentTheme, setCurrentTheme] = import_react30.useState("dark");
47776
- import_react30.useEffect(() => {
47777
- const storedTheme = window.localStorage.getItem("theme");
47778
- const mediaQuery = window.matchMedia("(prefers-color-scheme: light)");
47779
- const applySystemTheme = (event) => {
47780
- setTheme(event.matches ? "light" : "dark");
47781
- setCurrentTheme(event.matches ? "system:light" : "system:dark");
47782
- };
47783
- if (storedTheme === "light") {
47784
- setTheme("light");
47785
- setCurrentTheme("light");
47786
- return;
47787
- }
47788
- if (storedTheme === "dark") {
47789
- setTheme("dark");
47790
- setCurrentTheme("dark");
47791
- return;
47792
- }
47793
- const isLight = mediaQuery.matches;
47794
- setTheme(isLight ? "light" : "dark");
47795
- setCurrentTheme(isLight ? "system:light" : "system:dark");
47796
- mediaQuery.addEventListener("change", applySystemTheme);
47797
- return () => {
47798
- mediaQuery.removeEventListener("change", applySystemTheme);
47799
- };
47800
- }, [setTheme, setCurrentTheme]);
47801
- return { currentTheme, setCurrentTheme, setTheme };
47802
- };
47803
-
47804
- // src/frontend/components/navbar/ThemeButton.tsx
47723
+ var import_react29 = __toESM(require_react(), 1);
47805
47724
  var jsx_dev_runtime27 = __toESM(require_jsx_dev_runtime(), 1);
47806
- var ThemeButton = ({ themeSprings }) => {
47807
- const { currentTheme, setCurrentTheme, setTheme } = useInitTheme();
47808
- const detailsRef = import_react31.useRef(null);
47809
- import_react31.useEffect(() => {
47725
+ var ThemeButton = ({ themeSprings, setTheme }) => {
47726
+ const detailsRef = import_react29.useRef(null);
47727
+ import_react29.useEffect(() => {
47810
47728
  const onClickOutside = (event) => {
47811
47729
  const det = detailsRef.current;
47812
47730
  if (!det?.open)
@@ -47821,25 +47739,14 @@ var ThemeButton = ({ themeSprings }) => {
47821
47739
  return () => document.removeEventListener("mousedown", onClickOutside);
47822
47740
  }, []);
47823
47741
  const selectTheme = (option) => {
47824
- if (option === "system") {
47825
- const prefersLight = window.matchMedia("(prefers-color-scheme: light)").matches;
47826
- setTheme(prefersLight ? "light" : "dark");
47827
- setCurrentTheme(prefersLight ? "system:light" : "system:dark");
47828
- window.localStorage.removeItem("theme");
47829
- } else {
47830
- setTheme(option);
47831
- setCurrentTheme(option);
47832
- window.localStorage.setItem("theme", option);
47833
- }
47742
+ setTheme(option);
47834
47743
  if (detailsRef.current)
47835
47744
  detailsRef.current.open = false;
47836
47745
  };
47837
- const icon = currentTheme.includes("dark") ? /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(AiOutlineMoon, {
47838
- style: { height: 24, width: 24 }
47839
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(IoSunny, {
47840
- style: { height: 24, width: 24 }
47841
- }, undefined, false, undefined, this);
47842
- const selected = currentTheme.startsWith("system") ? "system" : currentTheme;
47746
+ const selected = themeSprings.theme.to((t) => {
47747
+ const sel = t.startsWith("system") ? "system" : t;
47748
+ return sel;
47749
+ });
47843
47750
  return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(animated.details, {
47844
47751
  ref: detailsRef,
47845
47752
  style: {
@@ -47862,10 +47769,28 @@ var ThemeButton = ({ themeSprings }) => {
47862
47769
  listStyle: "none",
47863
47770
  margin: 0,
47864
47771
  padding: 0,
47772
+ position: "relative",
47865
47773
  width: "2.5rem"
47866
47774
  },
47867
- children: icon
47868
- }, undefined, false, undefined, this),
47775
+ children: [
47776
+ /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(AnimatedMoon, {
47777
+ style: {
47778
+ height: 24,
47779
+ opacity: themeSprings.theme.to((t) => t.endsWith("dark") ? 1 : 0),
47780
+ position: "absolute",
47781
+ width: 24
47782
+ }
47783
+ }, undefined, false, undefined, this),
47784
+ /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(AnimatedSun, {
47785
+ style: {
47786
+ height: 24,
47787
+ opacity: themeSprings.theme.to((t) => t.endsWith("dark") ? 0 : 1),
47788
+ position: "absolute",
47789
+ width: 24
47790
+ }
47791
+ }, undefined, false, undefined, this)
47792
+ ]
47793
+ }, undefined, true, undefined, this),
47869
47794
  /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(animated.ul, {
47870
47795
  style: {
47871
47796
  backgroundColor: themeSprings.themeTertiary,
@@ -47879,17 +47804,25 @@ var ThemeButton = ({ themeSprings }) => {
47879
47804
  right: 0,
47880
47805
  top: "3.5rem"
47881
47806
  },
47882
- children: ["system", "light", "dark"].map((opt) => /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(animated.li, {
47883
- onClick: () => selectTheme(opt),
47884
- style: {
47885
- background: opt === selected ? themeSprings.contrastPrimary : "transparent",
47886
- borderRadius: "0.25rem",
47887
- color: opt === selected ? themeSprings.themeTertiary : themeSprings.contrastPrimary,
47888
- cursor: "pointer",
47889
- padding: "0.25rem 0.5rem"
47890
- },
47891
- children: opt.charAt(0).toUpperCase() + opt.slice(1)
47892
- }, opt, false, undefined, this))
47807
+ children: ["system", "light", "dark"].map((opt) => {
47808
+ const background = to2([selected, themeSprings.themePrimary], (sel, bkg) => sel === opt ? bkg : "transparent");
47809
+ const color = to2([
47810
+ selected,
47811
+ themeSprings.contrastPrimary,
47812
+ themeSprings.contrastSecondary
47813
+ ], (sel, tertiary, contrast) => sel === opt ? tertiary : contrast);
47814
+ return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(animated.li, {
47815
+ onClick: () => selectTheme(opt),
47816
+ style: {
47817
+ background,
47818
+ borderRadius: "0.25rem",
47819
+ color,
47820
+ cursor: "pointer",
47821
+ padding: "0.25rem 0.5rem"
47822
+ },
47823
+ children: opt.charAt(0).toUpperCase() + opt.slice(1)
47824
+ }, opt, false, undefined, this);
47825
+ })
47893
47826
  }, undefined, false, undefined, this)
47894
47827
  ]
47895
47828
  }, undefined, true, undefined, this);
@@ -47900,12 +47833,12 @@ var jsx_dev_runtime28 = __toESM(require_jsx_dev_runtime(), 1);
47900
47833
  var NavbarUserButtons = ({
47901
47834
  user,
47902
47835
  handleSignOut,
47903
- themeSprings
47836
+ themeSprings,
47837
+ setTheme
47904
47838
  }) => {
47905
- const [isDropdownOpen, setIsDropdownOpen] = import_react32.useState(false);
47839
+ const [isDropdownOpen, setIsDropdownOpen] = import_react30.useState(false);
47906
47840
  const { isSizeOrLess } = useMediaQuery();
47907
47841
  const isMobile = isSizeOrLess("sm");
47908
- const theme = useThemeStore((state) => state.theme);
47909
47842
  const openDropdown = () => {
47910
47843
  setIsDropdownOpen(true);
47911
47844
  loginDropdownApi.start({ opacity: 1, scale: 1 });
@@ -47926,7 +47859,7 @@ var NavbarUserButtons = ({
47926
47859
  opacity: 0,
47927
47860
  scale: 0
47928
47861
  }));
47929
- const userButtonRef = import_react32.useRef(null);
47862
+ const userButtonRef = import_react30.useRef(null);
47930
47863
  return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV("div", {
47931
47864
  style: {
47932
47865
  display: "flex",
@@ -47946,16 +47879,17 @@ var NavbarUserButtons = ({
47946
47879
  user !== undefined && !isMobile && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(animated.a, {
47947
47880
  style: profileButtonStyle,
47948
47881
  href: "/protected",
47949
- children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(ProfilePicture, {
47882
+ children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(AnimatedProfilePicture, {
47950
47883
  themeSprings,
47951
47884
  userImage: typeof user.metadata?.profile_picture === "string" ? user.metadata.profile_picture : undefined,
47952
- backupImage: theme === "dark" ? "/assets/svg/default-profile-icon-light.svg" : "/assets/svg/default-profile-icon.svg",
47885
+ backupImage: themeSprings.theme.to((theme) => theme.endsWith("dark") ? "/assets/svg/default-profile-icon-light.svg" : "/assets/svg/default-profile-icon.svg"),
47953
47886
  width: "2.5rem",
47954
47887
  height: "2.5rem"
47955
47888
  }, undefined, false, undefined, this)
47956
47889
  }, undefined, false, undefined, this),
47957
47890
  /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(ThemeButton, {
47958
- themeSprings
47891
+ themeSprings,
47892
+ setTheme
47959
47893
  }, undefined, false, undefined, this),
47960
47894
  isDropdownOpen === true && !isMobile && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(DropdownContainer, {
47961
47895
  themeSprings,
@@ -47986,10 +47920,15 @@ var NavbarUserButtons = ({
47986
47920
 
47987
47921
  // src/frontend/components/navbar/Navbar.tsx
47988
47922
  var jsx_dev_runtime29 = __toESM(require_jsx_dev_runtime(), 1);
47989
- var Navbar = ({ user, handleSignOut, themeSprings }) => {
47923
+ var Navbar = ({
47924
+ user,
47925
+ handleSignOut,
47926
+ themeSprings,
47927
+ setTheme
47928
+ }) => {
47990
47929
  const { isSizeOrLess } = useMediaQuery();
47991
47930
  const isMobile = isSizeOrLess("sm");
47992
- const navRef = import_react33.useRef(null);
47931
+ const navRef = import_react31.useRef(null);
47993
47932
  const [hamburgerMenuSpring, hamburgerMenuApi] = useSpring(() => ({
47994
47933
  config: { friction: 40, tension: 275 },
47995
47934
  transform: "translateX(100%)",
@@ -48035,7 +47974,8 @@ var Navbar = ({ user, handleSignOut, themeSprings }) => {
48035
47974
  /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(NavbarUserButtons, {
48036
47975
  user,
48037
47976
  handleSignOut,
48038
- themeSprings
47977
+ themeSprings,
47978
+ setTheme
48039
47979
  }, undefined, false, undefined, this),
48040
47980
  isMobile === true && /* @__PURE__ */ jsx_dev_runtime29.jsxDEV("button", {
48041
47981
  style: hamburgerButtonStyle,
@@ -48093,9 +48033,9 @@ var Head = ({
48093
48033
  }, undefined, true, undefined, this);
48094
48034
 
48095
48035
  // src/frontend/hooks/useAuthStatus.ts
48096
- var import_react34 = __toESM(require_react(), 1);
48036
+ var import_react32 = __toESM(require_react(), 1);
48097
48037
  var useAuthStatus = () => {
48098
- const [user, setUser] = import_react34.useState();
48038
+ const [user, setUser] = import_react32.useState();
48099
48039
  const checkAuthStatus = async () => {
48100
48040
  const response = await fetch("/oauth2/status");
48101
48041
  if (!response.ok && response.statusText === "Unauthorized") {
@@ -48124,7 +48064,7 @@ var useAuthStatus = () => {
48124
48064
  console.error("SignOut failed");
48125
48065
  }
48126
48066
  };
48127
- import_react34.useEffect(() => {
48067
+ import_react32.useEffect(() => {
48128
48068
  checkAuthStatus();
48129
48069
  }, []);
48130
48070
  return {
@@ -48134,8 +48074,8 @@ var useAuthStatus = () => {
48134
48074
  };
48135
48075
  };
48136
48076
 
48137
- // src/frontend/hooks/useThemeColors.ts
48138
- var import_react35 = __toESM(require_react(), 1);
48077
+ // src/frontend/hooks/useTheme.ts
48078
+ var import_react33 = __toESM(require_react(), 1);
48139
48079
 
48140
48080
  // src/frontend/styles/colors.ts
48141
48081
  var primaryColor = "#A0E7E5";
@@ -48146,33 +48086,68 @@ var darkPrimaryColor = "#0B0B0B";
48146
48086
  var darkSecondaryColor = "#14141E";
48147
48087
  var darkTertiaryColor = "#1E1E2E";
48148
48088
 
48149
- // src/frontend/hooks/useThemeColors.ts
48150
- var useThemeColors = () => {
48151
- const theme = useThemeStore((state) => state.theme);
48152
- const [themeSprings, themeApi] = useSpring(() => ({
48153
- contrastPrimary: theme === "dark" ? lightPrimaryColor : darkPrimaryColor,
48154
- contrastSecondary: theme === "dark" ? lightSecondaryColor : darkSecondaryColor,
48155
- themePrimary: theme === "dark" ? darkPrimaryColor : lightPrimaryColor,
48156
- themeSecondary: theme === "dark" ? darkSecondaryColor : lightSecondaryColor,
48157
- themeTertiary: theme === "dark" ? darkTertiaryColor : lightTertiaryColor
48158
- }));
48159
- import_react35.useEffect(() => {
48160
- themeApi.start({
48161
- contrastPrimary: theme === "dark" ? lightPrimaryColor : darkPrimaryColor,
48162
- contrastSecondary: theme === "dark" ? lightSecondaryColor : darkSecondaryColor,
48163
- themePrimary: theme === "dark" ? darkPrimaryColor : lightPrimaryColor,
48164
- themeSecondary: theme === "dark" ? darkSecondaryColor : lightSecondaryColor,
48165
- themeTertiary: theme === "dark" ? darkTertiaryColor : lightTertiaryColor
48166
- });
48167
- }, [theme, themeApi]);
48168
- return themeSprings;
48089
+ // src/frontend/hooks/useTheme.ts
48090
+ var createPalette = (mode) => ({
48091
+ contrastPrimary: mode.endsWith("dark") ? lightPrimaryColor : darkPrimaryColor,
48092
+ contrastSecondary: mode.endsWith("dark") ? lightSecondaryColor : darkSecondaryColor,
48093
+ theme: mode,
48094
+ themePrimary: mode.endsWith("dark") ? darkPrimaryColor : lightPrimaryColor,
48095
+ themeSecondary: mode.endsWith("dark") ? darkSecondaryColor : lightSecondaryColor,
48096
+ themeTertiary: mode.endsWith("dark") ? darkTertiaryColor : lightTertiaryColor
48097
+ });
48098
+ var useTheme = (initialTheme) => {
48099
+ const browserEnvironmentAvailable = typeof window !== "undefined" && typeof window.matchMedia === "function";
48100
+ const [themeSprings, themeSpringController] = useSpring(() => createPalette(initialTheme ?? "system:dark"));
48101
+ const mediaQueryRef = import_react33.useRef(null);
48102
+ const applySystemChange = (event) => {
48103
+ const updatedThemeMode = event.matches ? "system:dark" : "system:light";
48104
+ themeSpringController.start(createPalette(updatedThemeMode));
48105
+ document.cookie = `theme=${updatedThemeMode}; Max-Age=31536000; Path=/`;
48106
+ };
48107
+ import_react33.useEffect(() => {
48108
+ if (!browserEnvironmentAvailable)
48109
+ return;
48110
+ const shouldFollowSystem = !initialTheme || initialTheme.startsWith("system");
48111
+ if (!shouldFollowSystem)
48112
+ return;
48113
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
48114
+ mediaQueryRef.current = mediaQuery;
48115
+ if (!mediaQuery.matches) {
48116
+ themeSpringController.start(createPalette("system:light"));
48117
+ }
48118
+ mediaQuery.addEventListener("change", applySystemChange);
48119
+ return () => {
48120
+ mediaQuery.removeEventListener("change", applySystemChange);
48121
+ mediaQueryRef.current = null;
48122
+ };
48123
+ }, []);
48124
+ const setTheme = (selectedTheme) => {
48125
+ if (!browserEnvironmentAvailable)
48126
+ return;
48127
+ if (mediaQueryRef.current) {
48128
+ mediaQueryRef.current.removeEventListener("change", applySystemChange);
48129
+ mediaQueryRef.current = null;
48130
+ }
48131
+ let nextThemeMode;
48132
+ if (selectedTheme === "system") {
48133
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
48134
+ nextThemeMode = mediaQuery.matches ? "system:dark" : "system:light";
48135
+ mediaQuery.addEventListener("change", applySystemChange);
48136
+ mediaQueryRef.current = mediaQuery;
48137
+ } else {
48138
+ nextThemeMode = selectedTheme;
48139
+ }
48140
+ themeSpringController.start(createPalette(nextThemeMode));
48141
+ document.cookie = `theme=${nextThemeMode}; Max-Age=31536000; Path=/`;
48142
+ };
48143
+ return [themeSprings, setTheme];
48169
48144
  };
48170
48145
 
48171
48146
  // src/frontend/pages/Home.tsx
48172
48147
  var jsx_dev_runtime31 = __toESM(require_jsx_dev_runtime(), 1);
48173
- var Home = () => {
48148
+ var Home = ({ theme }) => {
48174
48149
  const { user, handleSignOut } = useAuthStatus();
48175
- const themeSprings = useThemeColors();
48150
+ const [themeSprings, setTheme] = useTheme(theme);
48176
48151
  return /* @__PURE__ */ jsx_dev_runtime31.jsxDEV("html", {
48177
48152
  lang: "en",
48178
48153
  style: htmlDefault,
@@ -48184,7 +48159,8 @@ var Home = () => {
48184
48159
  /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Navbar, {
48185
48160
  themeSprings,
48186
48161
  user,
48187
- handleSignOut
48162
+ handleSignOut,
48163
+ setTheme
48188
48164
  }, undefined, false, undefined, this),
48189
48165
  /* @__PURE__ */ jsx_dev_runtime31.jsxDEV("main", {
48190
48166
  style: mainDefault,
@@ -48220,4 +48196,6 @@ var Home = () => {
48220
48196
 
48221
48197
  // src/frontend/indexes/HomeIndex.tsx
48222
48198
  var jsx_dev_runtime32 = __toESM(require_jsx_dev_runtime(), 1);
48223
- import_client.hydrateRoot(document, /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Home, {}, undefined, false, undefined, this));
48199
+ import_client.hydrateRoot(document, /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Home, {
48200
+ ...window.__INITIAL_PROPS__
48201
+ }, undefined, false, undefined, this));