@deslop/auth 0.1.1338 → 0.1.1343

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.
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{a as t,o as n,r}from"./react-DLGSahv8.js";import{b as i,c as a,n as o}from"./auth-xe7mJnOp.js";import{E as s,Er as c,Fr as l,Lr as u,br as d,hr as f}from"./effect-DkaNBwCo.js";import{c as p,d as m,o as h,s as g}from"./index-ClQ9zIn3.js";import{a as _,i as v,n as y,r as b}from"./app-bar-Dqbmtpqx.js";import{a as x,i as S,n as C,r as w,t as T}from"./dropdown-menu-BIBLM6G7.js";import{t as E}from"./marks-ClLDFiwP.js";var D=e(n()),O=t(),k=r();function A(e){let t=(0,O.c)(2),n;return t[0]===e.children?n=t[1]:(n=(0,k.jsx)(`main`,{className:`pb-safe-bottom relative flex min-h-0 flex-1 justify-center overflow-y-auto px-4 pt-4 sm:px-6 lg:px-8 lg:pt-6`,children:(0,k.jsx)(`div`,{className:`flex min-h-full w-full max-w-160 flex-col gap-4 self-start`,children:e.children})}),t[0]=e.children,t[1]=n),n}function j(e){let t=(0,O.c)(12),n;t[0]===e.account?n=t[1]:(n=(0,k.jsx)(x,{render:(0,k.jsx)(y,{account:e.account})}),t[0]=e.account,t[1]=n);let r;t[2]===e.account.name?r=t[3]:(r=(0,k.jsx)(S,{disabled:!0,children:e.account.name}),t[2]=e.account.name,t[3]=r);let i;t[4]===e.account.signOut?i=t[5]:(i=e.account.signOut&&(0,k.jsx)(S,{onClick:M,children:`Sign out`}),t[4]=e.account.signOut,t[5]=i);let a;t[6]!==r||t[7]!==i?(a=(0,k.jsx)(C,{align:`end`,children:(0,k.jsxs)(w,{children:[r,i]})}),t[6]=r,t[7]=i,t[8]=a):a=t[8];let o;return t[9]!==n||t[10]!==a?(o=(0,k.jsxs)(T,{children:[n,a]}),t[9]=n,t[10]=a,t[11]=o):o=t[11],o}function M(){return location.assign(`/sign-out?${new URLSearchParams({next:location.origin})}`)}var N=e=>{let t=(0,O.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,k.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z`,transform:`scale(64)`,fill:`#ffff`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,k.jsx)(`svg`,{...e,viewBox:`0 0 1024 1024`,fill:`none`,children:n}),t[1]=e,t[2]=r),r},P=e=>{let t=(0,O.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,k.jsx)(`path`,{fill:`#1b1f23`,fillRule:`evenodd`,d:`M512 0C229.12 0 0 229.12 0 512c0 226.56 146.56 417.92 350.08 485.76 25.6 4.48 35.2-10.88 35.2-24.32 0-12.16-.64-52.48-.64-95.36-128.64 23.68-161.92-31.36-172.16-60.16-5.76-14.72-30.72-60.16-52.48-72.32-17.92-9.6-43.52-33.28-.64-33.92 40.32-.64 69.12 37.12 78.72 52.48 46.08 77.44 119.68 55.68 149.12 42.24 4.48-33.28 17.92-55.68 32.64-68.48-113.92-12.8-232.96-56.96-232.96-252.8 0-55.68 19.84-101.76 52.48-137.6-5.12-12.8-23.04-65.28 5.12-135.68 0 0 42.88-13.44 140.8 52.48 40.96-11.52 84.48-17.28 128-17.28s87.04 5.76 128 17.28c97.92-66.56 140.8-52.48 140.8-52.48 28.16 70.4 10.24 122.88 5.12 135.68 32.64 35.84 52.48 81.28 52.48 137.6 0 196.48-119.68 240-233.6 252.8 18.56 16 34.56 46.72 34.56 94.72 0 68.48-.64 123.52-.64 140.8 0 13.44 9.6 29.44 35.2 24.32C877.44 929.92 1024 737.92 1024 512 1024 229.12 794.88 0 512 0`,clipRule:`evenodd`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,k.jsx)(`svg`,{...e,viewBox:`0 0 1024 1024`,fill:`none`,children:n}),t[1]=e,t[2]=r),r},F=p(`/(home)`);function I(){let e=(0,O.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:R},e[0]=t):t=e[0];let n=F.useSearch(t),r;e[1]===n?r=e[2]:(r=()=>location.assign(`/sign-in?${new URLSearchParams({next:d(n,L)})}`),e[1]=n,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,k.jsx)(E,{light:N,dark:P}),e[3]=i):i=e[3];let o;return e[4]===r?o=e[5]:(o=(0,k.jsx)(`section`,{className:`m-auto flex w-full flex-col gap-5 sm:max-w-80`,"aria-label":`Sign in`,children:(0,k.jsxs)(a,{size:`lg`,onClick:r,children:[i,`Continue with GitHub`]})}),e[4]=r,e[5]=o),o}function L(){return location.origin}function R(e){return e.next}var z=`/assets/icon-CPvsBESP.svg`;function B(){let e=(0,O.c)(15),t=i(o).value,n=h(),r;e[0]===t?r=e[1]:(r=c(t,{onNone:l,onSome:K}),e[0]=t,e[1]=r);let a;e[2]!==t||e[3]!==n?(a=f(t,G)&&(0,k.jsxs)(_,{value:s(n({to:`/people`})!==!1,{onFalse:u(`/`),onTrue:u(`/people`)}),children:[(0,k.jsx)(v,{value:`/`,render:(0,k.jsx)(m,{to:`/`,search:{}}),children:`Sessions`}),(0,k.jsx)(v,{value:`/people`,render:(0,k.jsx)(m,{to:`/people`,search:{}}),children:`People`})]}),e[2]=t,e[3]=n,e[4]=a):a=e[4];let d;e[5]!==r||e[6]!==a?(d=(0,k.jsx)(b,{name:`auth`,icon:z,account:r,tabs:a}),e[5]=r,e[6]=a,e[7]=d):d=e[7];let p;e[8]===t?p=e[9]:(p=c(t,{onNone:W,onSome:V}),e[8]=t,e[9]=p);let g;e[10]===p?g=e[11]:(g=(0,k.jsx)(A,{children:p}),e[10]=p,e[11]=g);let y;return e[12]!==d||e[13]!==g?(y=(0,k.jsxs)(k.Fragment,{children:[d,g]}),e[12]=d,e[13]=g,e[14]=y):y=e[14],y}function V(e){return s(e.role===`Waiting`,{onFalse:U,onTrue:H})}function H(){return(0,k.jsx)(`p`,{className:`text-muted-foreground m-auto`,children:`Waiting for an admin`})}function U(){return(0,k.jsx)(g,{})}function W(){return(0,k.jsx)(I,{})}function G(e){return e.role===`Admin`}function K(e){return(0,k.jsx)(j,{account:e})}function q(){let e=(0,O.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,k.jsx)(D.Suspense,{fallback:null,children:(0,k.jsx)(B,{})}),e[0]=t):t=e[0],t}export{q as component};
@@ -13,15 +13,17 @@
13
13
  <link rel="icon" href="/assets/icon-CPvsBESP.svg" />
14
14
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
15
15
  <link rel="manifest" href="/manifest.webmanifest" />
16
+ <!-- Requested with the page, so the reads waiting on them never add a round trip. -->
17
+ <link rel="preload" href="/api/runtime" as="fetch" crossorigin />
16
18
 
17
19
  <title>Auth</title>
18
- <script type="module" crossorigin src="/assets/index-CWfu_n5V.js"></script>
20
+ <script type="module" crossorigin src="/assets/index-ClQ9zIn3.js"></script>
19
21
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-XKyaHtl9.js">
20
- <link rel="modulepreload" crossorigin href="/assets/effect-Dpfcu2L1.js">
21
- <link rel="modulepreload" crossorigin href="/assets/react-BPjvcVqE.js">
22
- <link rel="modulepreload" crossorigin href="/assets/preload-helper-B9gdHcf1.js">
23
- <link rel="modulepreload" crossorigin href="/assets/dist-CoswJ3T9.js">
24
- <link rel="modulepreload" crossorigin href="/assets/auth-DWmRO2OT.js">
22
+ <link rel="modulepreload" crossorigin href="/assets/react-DLGSahv8.js">
23
+ <link rel="modulepreload" crossorigin href="/assets/effect-DkaNBwCo.js">
24
+ <link rel="modulepreload" crossorigin href="/assets/dist-BPRUA1hI.js">
25
+ <link rel="modulepreload" crossorigin href="/assets/auth-xe7mJnOp.js">
26
+ <link rel="modulepreload" crossorigin href="/assets/preload-helper-Cp12E29U.js">
25
27
  <link rel="stylesheet" crossorigin href="/assets/index-B1VOSd9T.css">
26
28
  </head>
27
29
  <body>
package/dist/server.js CHANGED
@@ -14510,6 +14510,51 @@ const filterInterruptors = causeFilterInterruptors;
14510
14510
  */
14511
14511
  const prettyErrors = causePrettyErrors;
14512
14512
  /**
14513
+ * Formats a `Cause` as a human-readable string for logging or debugging.
14514
+ *
14515
+ * **When to use**
14516
+ *
14517
+ * Use to render a whole cause as one human-readable string for logs or
14518
+ * diagnostics.
14519
+ *
14520
+ * **Details**
14521
+ *
14522
+ * Delegates to {@link prettyErrors} to convert each reason to an `Error`,
14523
+ * then joins their stack traces with newlines. Nested `Error.cause` chains
14524
+ * are rendered inline with indentation:
14525
+ *
14526
+ * ```text
14527
+ * ErrorName: message
14528
+ * at ...
14529
+ * at ... {
14530
+ * [cause]: NestedError: message
14531
+ * at ...
14532
+ * }
14533
+ * ```
14534
+ *
14535
+ * Span annotations are appended to the relevant stack frames when available.
14536
+ *
14537
+ * **Gotchas**
14538
+ *
14539
+ * Rendering an empty cause produces an empty string because there are no
14540
+ * errors to render.
14541
+ *
14542
+ * **Example** (Rendering a cause)
14543
+ *
14544
+ * ```ts import.meta.vitest
14545
+ * import { Cause } from "effect"
14546
+ *
14547
+ * Cause.pretty(Cause.fail("something went wrong")).includes("something went wrong") // => true
14548
+ * ```
14549
+ *
14550
+ * @see {@link prettyErrors} — get the individual `Error` instances
14551
+ *
14552
+ * @stability stable
14553
+ * @category formatting
14554
+ * @since 2.0.0
14555
+ */
14556
+ const pretty = causePretty;
14557
+ /**
14513
14558
  * Checks whether an arbitrary value is a `NoSuchElementError`.
14514
14559
  *
14515
14560
  * **Example** (Checking the runtime type)
@@ -108670,7 +108715,7 @@ const findOneOption = (options) => {
108670
108715
  // ../../packages/runtime/src/server/store.ts
108671
108716
  const checkoutRoot = fnUntraced(function* (directory) {
108672
108717
  const path = yield* Path$1;
108673
- if (getOrElse(yield* option$1((yield* FileSystem).exists(path.join(directory, "pnpm-workspace.yaml"))), constFalse$1)) return some$1(directory);
108718
+ if (yield* (yield* FileSystem).exists(path.join(directory, "pnpm-workspace.yaml"))) return some$1(directory);
108674
108719
  if (path.dirname(directory) === directory) return none();
108675
108720
  return yield* checkoutRoot(path.dirname(directory));
108676
108721
  });
@@ -108961,16 +109006,27 @@ const updateRelease = fnUntraced(function* (name) {
108961
109006
  "--registry=https://registry.npmjs.org",
108962
109007
  `@deslop/${name}@${latest}`
108963
109008
  ]), "5 minutes");
108964
- const previous = yield* option$1(fs.readLink(path.join(root, "current")));
108965
- yield* activateRelease(name, path.join(directory, "node_modules", "@deslop", name));
108966
- yield* restartService(name);
108967
- const kept = [latest, ...toArray(map$13(previous, (link) => path.basename(path.resolve(link, "../../.."))))];
109009
+ const previous = yield* fs.readLink(path.join(root, "current"));
109010
+ yield* uninterruptible(gen(function* () {
109011
+ yield* activateRelease(name, path.join(directory, "node_modules", "@deslop", name));
109012
+ const restarted = yield* exit(restartService(name));
109013
+ if (isSuccess(restarted)) return;
109014
+ const restored = yield* exit(activateRelease(name, previous));
109015
+ return yield* AppError.make({
109016
+ cause: restarted.cause,
109017
+ message: `Restart failed: ${pretty(restarted.cause)}. ${match$3(restored, {
109018
+ onFailure: (cause) => `The previous current link could not be restored: ${pretty(cause)}`,
109019
+ onSuccess: constant("The previous current link was restored; service state is unknown")
109020
+ })}`
109021
+ });
109022
+ }));
109023
+ const kept = [latest, path.basename(path.resolve(root, previous, "../../.."))];
108968
109024
  yield* pipe(yield* fs.readDirectory(path.join(root, "releases")), difference(kept), forEach$1((entry) => fs.remove(path.join(root, "releases", entry), { recursive: true }), { concurrency: 1 }));
108969
109025
  return `Updated ${name} from ${running} to ${latest}\n`;
108970
109026
  });
108971
109027
  // ../../packages/runtime/src/server/cli.ts
108972
109028
  const DEFAULT_HOST = "127.0.0.1";
108973
- const TailnetSelf = Struct$2({ Self: Struct$2({ DNSName: String$6 }) });
109029
+ const TailnetSelf = Struct$2({ Self: Struct$2({ DNSName: NonEmptyString }) });
108974
109030
  const SETTINGS = {
108975
109031
  DOMAIN: {
108976
109032
  description: "Parent domain for Deslop apps; without it every caller is the developer",
@@ -108986,13 +109042,9 @@ const SETTINGS = {
108986
109042
  const configProvider = fnUntraced(function* (given, defaultPort) {
108987
109043
  const port = given["PORT"] ?? `${defaultPort}`;
108988
109044
  const name = yield* appName;
108989
- const tailnet = yield* pipe(executeProcess("tailscale", ["status", "--json"]), flatMap$3(decodeUnknownEffect(fromJsonString(TailnetSelf))), map$7((status) => replace(/\.$/u, "")(status.Self.DNSName)), timeout("5 seconds"), option$1);
108990
- const urls = match$8(fromUndefinedOr(given["DOMAIN"]), {
108991
- onNone: () => ({ APP_URL: pipe(tailnet, filter$9(isNonEmpty$1), match$8({
108992
- onNone: () => `http://localhost:${port}`,
108993
- onSome: (host) => `https://${host}:${port}`
108994
- })) }),
108995
- onSome: (domain) => ({
109045
+ const urls = yield* match$8(fromUndefinedOr(given["DOMAIN"]), {
109046
+ onNone: () => pipe(executeProcess("tailscale", ["status", "--json"]), flatMap$3(decodeUnknownEffect(fromJsonString(TailnetSelf))), map$7((status) => ({ APP_URL: `https://${replace(/\.$/u, "")(status.Self.DNSName)}:${port}` })), timeout("5 seconds")),
109047
+ onSome: (domain) => succeed$5({
108996
109048
  APP_URL: `https://${name}.${domain}`,
108997
109049
  AUTH_URL: `https://auth.${domain}`,
108998
109050
  GATEWAY_URL: `https://gateway.${domain}`,
@@ -109623,6 +109675,31 @@ const ROLE_ORDER = {
109623
109675
  function isAdmin(admins, id) {
109624
109676
  return some(admins, (admin) => `github:${admin}` === id);
109625
109677
  }
109678
+ const authorizeMember = fnUntraced(function* (admins, id, row) {
109679
+ if (isAdmin(admins, id)) return {
109680
+ admin: true,
109681
+ id,
109682
+ name: match$8(row, {
109683
+ onNone: () => id,
109684
+ onSome: (member) => member.name
109685
+ })
109686
+ };
109687
+ if (!exists(row, (member) => member.status === "Allowed")) return yield* AuthError.make({
109688
+ error: "access_denied",
109689
+ message: "An admin has not allowed this account yet"
109690
+ });
109691
+ return yield* match$8(row, {
109692
+ onNone: () => fail$6(AuthError.make({
109693
+ error: "access_denied",
109694
+ message: "This account was removed"
109695
+ })),
109696
+ onSome: (member) => succeed$5({
109697
+ admin: false,
109698
+ id: member.id,
109699
+ name: member.name
109700
+ })
109701
+ });
109702
+ });
109626
109703
  function roleOf(admins, id, row) {
109627
109704
  if (isAdmin(admins, id)) return "Admin";
109628
109705
  if (exists(row, (found) => found.status === "Allowed")) return "Member";
@@ -109719,30 +109796,7 @@ var People = class People extends Service$1()("@deslop/auth/services/people/serv
109719
109796
  }));
109720
109797
  }, mutate, sql.withTransaction, asAuthError("Cannot answer the access request")),
109721
109798
  allowed: fn("People.allowed")(function* (id) {
109722
- const row = yield* find(id);
109723
- if (isAdmin(admins, id)) return {
109724
- admin: true,
109725
- id,
109726
- name: match$8(row, {
109727
- onNone: () => id,
109728
- onSome: (member) => member.name
109729
- })
109730
- };
109731
- if (!exists(row, (member) => member.status === "Allowed")) return yield* AuthError.make({
109732
- error: "access_denied",
109733
- message: "An admin has not allowed this account yet"
109734
- });
109735
- return yield* match$8(row, {
109736
- onNone: () => fail$6(AuthError.make({
109737
- error: "access_denied",
109738
- message: "This account was removed"
109739
- })),
109740
- onSome: (member) => succeed$5({
109741
- admin: false,
109742
- id: member.id,
109743
- name: member.name
109744
- })
109745
- });
109799
+ return yield* authorizeMember(admins, id, yield* find(id));
109746
109800
  }, asAuthError("Cannot read the account")),
109747
109801
  find,
109748
109802
  list: fn("People.list")(function* (user) {
@@ -109761,7 +109815,8 @@ var People = class People extends Service$1()("@deslop/auth/services/people/serv
109761
109815
  onFalse: constant("Waiting"),
109762
109816
  onTrue: constant("Allowed")
109763
109817
  });
109764
- if (exists(yield* find(user.id), (member) => member.name === user.name && getOrUndefined$1(member.fullName) === getOrUndefined$1(fullName) && (status === "Waiting" || member.status === "Allowed"))) return yield* existing(user.id);
109818
+ const row = yield* find(user.id);
109819
+ if (exists(row, (member) => member.name === user.name && getOrUndefined$1(member.fullName) === getOrUndefined$1(fullName) && (status === "Waiting" || member.status === "Allowed"))) return yield* fromOption(row);
109765
109820
  yield* mutate(sql`INSERT INTO ${table} (id, name, fullName, since, status) VALUES (${user.id}, ${user.name}, ${getOrUndefined$1(filter$9(fullName, isNonEmpty$1))}, ${toEpochMillis(yield* now)}, ${status}) ON CONFLICT (id) DO UPDATE SET name = excluded.name, fullName = excluded.fullName, status = CASE WHEN excluded.status = 'Allowed' THEN 'Allowed' ELSE ${table}.status END`);
109766
109821
  return yield* existing(user.id);
109767
109822
  }, sql.withTransaction, asAuthError("Cannot register the person")),
@@ -109851,7 +109906,7 @@ var Identity = class Identity extends Service$1()("@deslop/auth/services/identit
109851
109906
  onSome: tailnet
109852
109907
  }));
109853
109908
  }),
109854
- onSome: people.allowed
109909
+ onSome: (id) => succeed$5({ id })
109855
109910
  });
109856
109911
  if (!isTailnet(address)) return yield* AuthError.make({ message: "Sign in first" });
109857
109912
  const found = yield* get(whois, address);
@@ -109871,13 +109926,13 @@ var Identity = class Identity extends Service$1()("@deslop/auth/services/identit
109871
109926
  const role = roleOf(admins, identified.id, row);
109872
109927
  return {
109873
109928
  ...yield* match$8(row, {
109874
- onNone: () => people.allowed(identified.id),
109929
+ onNone: () => authorizeMember(admins, identified.id, row),
109875
109930
  onSome: (member) => {
109876
109931
  if (waiting && identified.signOut) return succeed$5({
109877
109932
  id: member.id,
109878
109933
  name: member.name
109879
109934
  });
109880
- return people.allowed(identified.id);
109935
+ return authorizeMember(admins, identified.id, row);
109881
109936
  }
109882
109937
  }),
109883
109938
  admin: role === "Admin",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deslop/auth",
3
- "version": "0.1.1338",
3
+ "version": "0.1.1343",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/MP281X/deslop.git",
@@ -33,5 +33,5 @@
33
33
  "engines": {
34
34
  "node": ">=26"
35
35
  },
36
- "fingerprint": "af601e67748d45bf1a54f7a94cf31247e46803e376b46ab447405b2cb8aa6fdc"
36
+ "fingerprint": "4ef8ea8d1ee295d0bd9c4ba957d4358557f35e14815c7fca7893418054730fbd"
37
37
  }
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{a as t,n,o as r}from"./react-BPjvcVqE.js";import{Bn as i,Cr as a,Rt as o,Tr as s,Xn as c,Yn as l,cr as u,lr as d,mr as f}from"./effect-Dpfcu2L1.js";import{R as p,m,r as h,t as g}from"./dist-CoswJ3T9.js";import{t as _}from"./marks-NfvBg9BQ.js";import{a as v,c as y,i as b,o as x,s as S,t as C}from"./format-DrYreL0n.js";import{t as w}from"./index-CWfu_n5V.js";import{a as T,l as E,o as D,s as O}from"./auth-DWmRO2OT.js";var k=e(r(),1),A=new Map([[`bold`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,187a113.4,113.4,0,0,1-20.39-35h40.82a116.94,116.94,0,0,1-10,20.77A108.61,108.61,0,0,1,128,207Zm-26.49-59a135.42,135.42,0,0,1,0-40h53a135.42,135.42,0,0,1,0,40ZM44,128a83.49,83.49,0,0,1,2.43-20H77.25a160.63,160.63,0,0,0,0,40H46.43A83.49,83.49,0,0,1,44,128Zm84-79a113.4,113.4,0,0,1,20.39,35H107.59a116.94,116.94,0,0,1,10-20.77A108.61,108.61,0,0,1,128,49Zm50.73,59h30.82a83.52,83.52,0,0,1,0,40H178.75a160.63,160.63,0,0,0,0-40Zm20.77-24H173.71a140.82,140.82,0,0,0-15.5-34.36A84.51,84.51,0,0,1,199.52,84ZM97.79,49.64A140.82,140.82,0,0,0,82.29,84H56.48A84.51,84.51,0,0,1,97.79,49.64ZM56.48,172H82.29a140.82,140.82,0,0,0,15.5,34.36A84.51,84.51,0,0,1,56.48,172Zm101.73,34.36A140.82,140.82,0,0,0,173.71,172h25.81A84.51,84.51,0,0,1,158.21,206.36Z`}))],[`duotone`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),k.createElement(`path`,{d:`M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z`}))],[`fill`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm78.36,64H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM216,128a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM128,43a115.27,115.27,0,0,1,26,45H102A115.11,115.11,0,0,1,128,43ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48Zm50.35,61.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z`}))],[`light`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z`}))],[`regular`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z`}))],[`thin`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M128,28h0A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,190.61c-6.33-6.09-23-24.41-31.27-54.61h62.54C151,194.2,134.33,212.52,128,218.61ZM94.82,156a140.42,140.42,0,0,1,0-56h66.36a140.42,140.42,0,0,1,0,56ZM128,37.39c6.33,6.09,23,24.41,31.27,54.61H96.73C105,61.8,121.67,43.48,128,37.39ZM169.41,100h46.23a92.09,92.09,0,0,1,0,56H169.41a152.65,152.65,0,0,0,0-56Zm43.25-8h-45a129.39,129.39,0,0,0-29.19-55.4A92.25,92.25,0,0,1,212.66,92ZM117.54,36.6A129.39,129.39,0,0,0,88.35,92h-45A92.25,92.25,0,0,1,117.54,36.6ZM40.36,100H86.59a152.65,152.65,0,0,0,0,56H40.36a92.09,92.09,0,0,1,0-56Zm3,64h45a129.39,129.39,0,0,0,29.19,55.4A92.25,92.25,0,0,1,43.34,164Zm95.12,55.4A129.39,129.39,0,0,0,167.65,164h45A92.25,92.25,0,0,1,138.46,219.4Z`}))]]),j=k.forwardRef((e,t)=>k.createElement(p,{ref:t,...e,weights:A}));j.displayName=`GlobeIcon`;function M(e){return h(e.defaultTagName??`div`,e,e)}var N=n(),P=E(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-none border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function F(e){let t=(0,N.c)(13),n,r,i,a,o;if(t[0]!==e){let{className:s,variant:c,render:l,...u}=e;n=l,o=c===void 0?`default`:c,a=M,r=`span`,i=m({className:g(P({variant:o}),s)},u),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o}else n=t[1],r=t[2],i=t[3],a=t[4],o=t[5];let s;t[6]===o?s=t[7]:(s={slot:`badge`,variant:o},t[6]=o,t[7]=s);let c;return t[8]!==n||t[9]!==r||t[10]!==i||t[11]!==s?(c={defaultTagName:r,props:i,render:n,state:s},t[8]=n,t[9]=r,t[10]=i,t[11]=s,t[12]=c):c=t[12],a(c)}var I=t(),L=e=>{let t=(0,N.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,I.jsx)(`path`,{fill:`#34A853`,d:`M255.285 143.47c-.084-.524-.164-1.042-.251-1.56a128.119 128.119 0 0 0-12.794-38.288 128.778 128.778 0 0 0-23.45-31.86 129.166 129.166 0 0 0-22.713-18.005c.049-.08.09-.168.14-.25 2.582-4.461 5.172-8.917 7.755-13.38l7.576-13.068c1.818-3.126 3.632-6.26 5.438-9.386a11.776 11.776 0 0 0 .662-10.484 11.668 11.668 0 0 0-4.823-5.536 11.85 11.85 0 0 0-5.004-1.61 11.963 11.963 0 0 0-2.218.018 11.738 11.738 0 0 0-8.968 5.798c-1.814 3.127-3.628 6.26-5.438 9.386l-7.576 13.069c-2.583 4.462-5.173 8.918-7.755 13.38-.282.487-.567.973-.848 1.467-.392-.157-.78-.313-1.172-.462-14.24-5.43-29.688-8.4-45.836-8.4-.442 0-.879 0-1.324.006-14.357.143-28.152 2.64-41.022 7.12a119.434 119.434 0 0 0-4.42 1.642c-.262-.455-.532-.911-.79-1.367-2.583-4.462-5.173-8.918-7.755-13.38L65.123 15.25c-1.818-3.126-3.632-6.259-5.439-9.386A11.736 11.736 0 0 0 48.5.048 11.71 11.71 0 0 0 43.49 1.66a11.716 11.716 0 0 0-4.077 4.063c-.281.474-.532.967-.742 1.473a11.808 11.808 0 0 0-.365 8.188c.259.786.594 1.554 1.023 2.296a3973.32 3973.32 0 0 1 5.439 9.386c2.53 4.357 5.054 8.713 7.58 13.069 2.582 4.462 5.168 8.918 7.75 13.38.02.038.046.075.065.112A129.184 129.184 0 0 0 45.32 64.38a129.693 129.693 0 0 0-22.2 24.015 127.737 127.737 0 0 0-9.34 15.24 128.238 128.238 0 0 0-10.843 28.764 130.743 130.743 0 0 0-1.951 9.524c-.087.518-.167 1.042-.247 1.56A124.978 124.978 0 0 0 0 149.118h256c-.205-1.891-.449-3.77-.734-5.636l.019-.012Z`}),r=(0,I.jsx)(`path`,{fill:`#202124`,d:`M194.59 113.712c5.122-3.41 5.867-11.3 1.661-17.62-4.203-6.323-11.763-8.682-16.883-5.273-5.122 3.41-5.868 11.3-1.662 17.621 4.203 6.322 11.764 8.682 16.883 5.272ZM78.518 108.462c4.206-6.321 3.46-14.21-1.662-17.62-5.123-3.41-12.68-1.05-16.886 5.27-4.203 6.323-3.458 14.212 1.662 17.622 5.122 3.41 12.683 1.05 16.886-5.272Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,I.jsxs)(`svg`,{...e,preserveAspectRatio:`xMidYMid`,viewBox:`0 0 256 150`,children:[n,r]}),t[2]=e,t[3]=i),i},R=e=>{let t=(0,N.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,I.jsx)(`path`,{d:`M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,I.jsx)(`svg`,{...e,xmlSpace:`preserve`,viewBox:`0 0 814 1000`,children:n}),t[1]=e,t[2]=r),r},z=e=>{let t=(0,N.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,I.jsx)(`path`,{fill:`#fff`,d:`M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,I.jsx)(`svg`,{...e,xmlSpace:`preserve`,viewBox:`0 0 814 1000`,children:n}),t[1]=e,t[2]=r),r},B=e=>{let t=(0,N.c)(24),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTux0`,x1:`48.548%`,x2:`51.047%`,y1:`115.276%`,y2:`41.364%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFEED7`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#BDBFC2`})]}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTux1`,x1:`54.407%`,x2:`46.175%`,y1:`2.404%`,y2:`90.542%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF`,stopOpacity:`.8`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FFF`,stopOpacity:`0`})]}),t[1]=r):r=t[1];let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTux2`,x1:`51.86%`,x2:`47.947%`,y1:`88.248%`,y2:`9.748%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFEED7`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#BDBFC2`})]}),t[2]=i):i=t[2];let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTux3`,x1:`49.925%`,x2:`49.924%`,y1:`85.49%`,y2:`13.811%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFEED7`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#BDBFC2`})]}),t[3]=a):a=t[3];let o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTux4`,x1:`53.901%`,x2:`45.956%`,y1:`3.102%`,y2:`93.895%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF`,stopOpacity:`.65`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FFF`,stopOpacity:`0`})]}),t[4]=o):o=t[4];let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTux5`,x1:`45.593%`,x2:`54.811%`,y1:`5.475%`,y2:`93.524%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF`,stopOpacity:`.65`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FFF`,stopOpacity:`0`})]}),t[5]=s):s=t[5];let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTux6`,x1:`49.984%`,x2:`49.984%`,y1:`89.845%`,y2:`40.632%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFEED7`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#BDBFC2`})]}),t[6]=c):c=t[6];let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTux7`,x1:`53.505%`,x2:`42.746%`,y1:`99.975%`,y2:`23.545%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFEED7`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#BDBFC2`})]}),t[7]=l):l=t[7];let u;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTux8`,x1:`49.841%`,x2:`50.241%`,y1:`13.229%`,y2:`94.673%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF`,stopOpacity:`.8`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FFF`,stopOpacity:`0`})]}),t[8]=u):u=t[8];let d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTux9`,x1:`49.927%`,x2:`50.727%`,y1:`37.327%`,y2:`92.782%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF`,stopOpacity:`.65`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FFF`,stopOpacity:`0`})]}),t[9]=d):d=t[9];let f;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTuxa`,x1:`49.876%`,x2:`49.876%`,y1:`2.299%`,y2:`81.204%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF`,stopOpacity:`.65`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FFF`,stopOpacity:`0`})]}),t[10]=f):f=t[10];let p;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTuxb`,x1:`49.833%`,x2:`49.824%`,y1:`2.272%`,y2:`71.799%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF`,stopOpacity:`.65`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FFF`,stopOpacity:`0`})]}),t[11]=p):p=t[11];let m;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTuxc`,x1:`53.467%`,x2:`38.949%`,y1:`48.921%`,y2:`98.1%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFA63F`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FF0`})]}),t[12]=m):m=t[12];let h;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTuxd`,x1:`52.373%`,x2:`47.579%`,y1:`143.009%`,y2:`-64.622%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFEED7`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#BDBFC2`})]}),t[13]=h):h=t[13];let g;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTuxe`,x1:`30.581%`,x2:`65.887%`,y1:`34.024%`,y2:`89.175%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFA63F`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FF0`})]}),t[14]=g):g=t[14];let _;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTuxf`,x1:`59.572%`,x2:`48.361%`,y1:`-17.216%`,y2:`66.118%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF`,stopOpacity:`.65`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FFF`,stopOpacity:`0`})]}),t[15]=_):_=t[15];let v;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTuxg`,x1:`47.769%`,x2:`51.373%`,y1:`1.565%`,y2:`104.313%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF`,stopOpacity:`.65`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FFF`,stopOpacity:`0`})]}),t[16]=v):v=t[16];let y;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTuxh`,x1:`43.55%`,x2:`57.114%`,y1:`4.533%`,y2:`92.827%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF`,stopOpacity:`.65`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FFF`,stopOpacity:`0`})]}),t[17]=y):y=t[17];let b;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTuxi`,x1:`49.733%`,x2:`50.558%`,y1:`17.609%`,y2:`99.385%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFA63F`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FF0`})]}),t[18]=b):b=t[18];let x;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,I.jsxs)(`linearGradient`,{id:`logosLinuxTuxj`,x1:`50.17%`,x2:`49.68%`,y1:`2.89%`,y2:`94.17%`,children:[(0,I.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF`,stopOpacity:`.65`}),(0,I.jsx)(`stop`,{offset:`100%`,stopColor:`#FFF`,stopOpacity:`0`})]}),t[19]=x):x=t[19];let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,I.jsxs)(`defs`,{children:[n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,(0,I.jsxs)(`filter`,{id:`logosLinuxTuxk`,width:`200%`,height:`200%`,x:`-50%`,y:`-50%`,filterUnits:`objectBoundingBox`,children:[(0,I.jsx)(`feOffset`,{in:`SourceAlpha`,result:`shadowOffsetOuter1`}),(0,I.jsx)(`feGaussianBlur`,{in:`shadowOffsetOuter1`,result:`shadowBlurOuter1`,stdDeviation:`6.5`})]})]}),t[20]=S):S=t[20];let C;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,I.jsxs)(`g`,{fill:`none`,children:[(0,I.jsx)(`path`,{fill:`#000`,fillOpacity:`.2`,d:`M235.125 249.359c0 17.355-52.617 31.497-117.54 31.497S.044 266.806.044 249.359c0-17.356 52.618-31.498 117.54-31.498c64.924 0 117.45 14.142 117.541 31.498`,filter:`url(#logosLinuxTuxk)`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`#000`,d:`M63.213 215.474c-11.387-16.346-13.591-69.606 12.947-102.39C89.292 97.383 92.69 86.455 93.7 71.67c.734-16.805-11.846-66.851 35.537-70.616c48.027-3.857 45.364 43.526 45.088 68.596c-.183 21.12 15.52 33.15 26.355 49.68c19.927 30.303 18.274 82.461-3.765 110.745c-27.916 35.354-51.791 20.018-67.678 21.304c-29.752 1.745-30.762 17.54-66.024-35.905`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTux0)`,d:`M169.1 122.451c8.265 7.622 29.661 41.69-4.224 62.995c-11.937 7.438 10.653 35.721 21.488 22.039c19.193-24.61 6.98-63.913-4.591-77.963c-7.714-9.917-19.651-13.774-12.672-7.07`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`#000`,stroke:`#000`,strokeWidth:`.977`,d:`M176.805 117.86c13.59 11.02 38.292 49.587 2.204 74.748c-11.846 7.806 10.468 32.508 23.049 19.927c43.618-43.894-1.102-94.308-16.53-111.664c-13.774-15.151-25.987 3.49-8.723 16.989z`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTux1)`,d:`M147.245 25.02c-.459 12.581-14.325 23.51-30.946 24.52c-16.621 1.01-29.66-8.54-29.202-21.121c.46-12.581 14.326-23.509 30.947-24.519c16.62-.918 29.66 8.54 29.201 21.12`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTux2)`,d:`M107.483 54.957c.46 8.173-3.397 15.06-8.723 15.335c-5.326.276-10.01-6.06-10.469-14.233c-.459-8.173 3.398-15.06 8.724-15.335c5.326-.276 10.01 6.06 10.468 14.233`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTux3)`,d:`M117.125 55.6c.184 9.458 6.337 16.988 13.683 16.805c7.346-.184 13.131-7.99 12.948-17.54c-.184-9.458-6.336-16.988-13.683-16.804c-7.346.183-13.223 8.08-12.948 17.539`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`#000`,d:`M133.186 57.712c-.092 5.234 2.48 9.458 5.877 9.458c3.306 0 6.153-4.224 6.245-9.366c.091-5.234-2.48-9.459-5.878-9.459c-3.397 0-6.152 4.225-6.244 9.367m-21.212.092c.459 4.316-1.194 7.989-3.582 8.356c-2.387.276-4.683-2.938-5.142-7.254c-.46-4.316 1.194-7.99 3.581-8.357c2.388-.275 4.684 2.939 5.143 7.255`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTux4)`,d:`M124.564 54.773c-.276 2.939 1.102 5.326 3.03 5.51c1.928.184 3.765-2.112 4.04-4.959c.276-2.938-1.102-5.326-3.03-5.51c-1.928-.183-3.765 2.113-4.04 4.96`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTux5)`,d:`M99.953 55.508c.276 2.388-.734 4.5-2.203 4.683c-1.47.184-2.847-1.653-3.123-4.132c-.275-2.388.735-4.5 2.204-4.683c1.47-.184 2.847 1.744 3.122 4.132`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTux6)`,d:`M71.027 145.684c6.52-14.785 20.386-40.772 20.662-60.883c0-15.978 47.843-19.835 51.7-3.856c3.856 15.978 13.59 39.853 19.834 51.424c6.245 11.478 24.335 48.118 5.051 80.074c-17.356 28.284-69.973 50.69-98.073-3.856c-9.55-18.917-7.806-42.333.826-62.903`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTux7)`,d:`M65.15 134.664c-5.601 10.56-17.172 38.293 11.112 53.445c30.395 16.162 30.303 49.312-6.245 33.517c-33.425-14.233-18.641-71.902-9.274-85.676c6.06-9.642 15.243-21.488 4.407-1.286`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`#000`,stroke:`#000`,strokeWidth:`1.25`,d:`M79.925 122.727c-8.907 14.509-30.211 48.669-1.652 66.484c38.384 23.6 27.548 47.108-7.53 25.895c-49.404-29.568-5.97-89.257 13.774-112.03c22.59-25.529 4.316 4.683-4.592 19.65z`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTux8)`,d:`M156.428 151.285c0 16.162-15.519 37.1-42.15 36.916c-27.456.183-39.118-20.754-39.118-36.916c0-16.161 18.182-29.293 40.588-29.293c22.498.092 40.68 13.132 40.68 29.293`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTux9)`,d:`M141.92 100.504c-.276 16.713-11.204 20.662-24.978 20.662c-13.775 0-23.784-2.48-24.978-20.662c0-11.387 11.203-17.998 24.978-17.998c13.774-.092 24.977 6.52 24.977 17.998`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTuxa)`,d:`M58.63 126.216c9-13.682 28.008-34.711 3.582 2.939c-19.835 31.038-7.346 50.965-.918 56.474c18.549 16.53 17.814 27.64 3.214 18.917c-31.314-18.641-24.794-50.047-5.878-78.33`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTuxb)`,d:`M188.936 131.818c-7.806-16.07-32.6-56.842 1.193-9.459c30.763 42.884 9.183 72.729 5.326 75.667c-3.856 2.939-16.804 8.908-13.04-1.469c3.858-10.377 22.958-30.028 6.52-64.74`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTuxc)`,stroke:`#E68C3F`,strokeWidth:`6.25`,d:`M51.835 258.542c-20.57-10.928-50.414 2.112-39.578-27.457c2.204-6.704-3.214-16.805.275-23.325c4.133-7.989 13.04-6.244 18.366-11.57c5.234-5.51 8.54-15.06 18.366-13.59c9.734 1.468 16.254 13.406 23.049 28.099c5.05 10.468 22.865 25.253 21.672 37.007c-1.47 17.998-21.948 21.396-42.15 10.836z`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTuxd)`,d:`M201.608 189.119c-3.122 5.877-16.162 15.335-24.886 12.856c-8.815-2.388-12.856-15.795-11.111-25.988c1.653-11.386 11.111-12.03 23.05-6.336c12.855 6.336 16.712 11.662 12.947 19.468`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTuxe)`,stroke:`#E68C3F`,strokeWidth:`6.251`,d:`M194.445 253.49c15.06-18.273 48.578-14.508 25.988-39.577c-4.775-5.418-3.306-16.989-9.183-21.947c-6.887-6.061-14.509-1.102-21.488-4.224c-6.979-3.398-14.325-9.918-22.865-5.327c-8.54 4.684-9.459 16.805-10.285 32.783c-.735 11.479-11.203 30.671-5.602 41.231c8.081 16.346 29.11 14.142 43.435-2.938z`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTuxf)`,d:`M187.925 229.064c23.325-34.435 5.97-34.16.092-36.823c-5.877-2.755-12.03-8.173-18.916-4.408c-6.888 3.857-7.255 13.775-7.439 26.814c-.275 9.367-8.08 25.07-3.397 33.793c5.693 10.193 19.467-4.591 29.66-19.376`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTuxg)`,d:`M47.06 234.023c-34.895-22.59-18.55-30.303-13.315-33.885c6.336-4.591 6.428-13.407 14.233-12.58c7.806.826 12.397 10.468 17.631 22.406c3.857 8.54 17.264 19.927 16.254 29.753c-1.285 11.57-19.743 3.948-34.803-5.694`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`#000`,d:`M209.588 188.843c-2.755 4.776-13.958 12.306-21.396 10.285c-7.622-1.928-11.112-12.672-9.55-20.753c1.377-9.183 9.55-9.642 19.834-5.05c10.928 4.958 14.326 9.182 11.112 15.518`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTuxh)`,d:`M192.058 186.18c-1.745 3.306-9.091 8.54-14.234 7.163c-5.142-1.377-7.713-8.815-6.887-14.417c.735-6.336 6.244-6.704 13.223-3.581c7.53 3.49 9.918 6.428 7.898 10.835`,transform:`translate(10)`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTuxi)`,stroke:`#E68C3F`,strokeWidth:`3.75`,d:`M97.107 66.344c3.673-3.398 12.58-13.774 29.477-2.939c3.122 2.02 5.693 2.204 11.662 4.775c12.03 4.96 6.336 16.897-6.52 20.937c-5.51 1.745-10.468 8.449-20.386 7.806c-8.54-.46-10.744-6.06-15.978-9.091c-9.275-5.234-10.652-12.305-5.602-16.07c5.051-3.765 6.98-5.143 7.347-5.418z`,transform:`translate(10)`}),(0,I.jsx)(`path`,{stroke:`#E68C3F`,strokeWidth:`2.5`,d:`M148.43 75.986c-5.05.275-15.979 11.203-27.457 11.203c-11.479 0-18.366-10.652-20.11-10.652`}),(0,I.jsx)(`path`,{fill:`url(#logosLinuxTuxj)`,d:`M102.8 65.426c1.837-1.653 7.622-6.153 15.244-1.562c1.653.919 3.306 1.929 5.693 3.306c4.867 2.847 2.48 6.98-3.398 9.55c-2.663 1.102-7.07 3.49-10.376 3.306c-3.673-.367-6.153-2.755-8.54-4.316c-4.5-2.938-4.224-5.418-2.112-7.346c1.56-1.47 3.305-2.847 3.49-2.938`,transform:`translate(10)`})]}),t[21]=C):C=t[21];let w;return t[22]===e?w=t[23]:(w=(0,I.jsxs)(`svg`,{...e,viewBox:`0 0 256 295`,children:[S,C]}),t[22]=e,t[23]=w),w},V=e=>{let t=(0,N.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,I.jsx)(`path`,{d:`m0 12.402 35.687-4.86.016 34.423-35.67.203zm35.67 33.529.028 34.453L.028 75.48.026 45.7zm4.326-39.025L87.314 0v41.527l-47.318.376zm47.329 39.349-.011 41.34-47.318-6.678-.066-34.739z`,fill:`#00adef`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,I.jsx)(`svg`,{...e,viewBox:`0 0 88 88`,children:n}),t[1]=e,t[2]=r),r};function H(e){return f(e.device,{onNone:()=>(0,I.jsx)(j,{className:`size-4`}),onSome:e=>e===`Android`?(0,I.jsx)(L,{"aria-hidden":!0,className:`size-4`}):e===`Windows`?(0,I.jsx)(V,{"aria-hidden":!0,className:`size-4`}):e===`Linux`?(0,I.jsx)(B,{"aria-hidden":!0,className:`size-4`}):(0,I.jsx)(_,{light:R,dark:z,className:`size-4`})})}function U(e){let t=(0,N.c)(7),n;t[0]===e.device?n=t[1]:(n=u(e.device,s(`Unknown device`)),t[0]=e.device,t[1]=n);let r;t[2]===e.device?r=t[3]:(r=(0,I.jsx)(H,{device:e.device}),t[2]=e.device,t[3]=r);let i;return t[4]!==n||t[5]!==r?(i=(0,I.jsx)(`span`,{role:`img`,"aria-label":n,className:`inline-flex`,children:r}),t[4]=n,t[5]=r,t[6]=i):i=t[6],i}function W(){let e=(0,N.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,I.jsx)(w,{atom:T,children:G}),e[0]=t):t=e[0],t}function G(e){return c(e,{onEmpty:Y,onNonEmpty:K})}function K(e){return(0,I.jsx)(v,{"aria-label":`Browser sessions`,children:(0,I.jsx)(x,{children:l(e,q)})})}function q(e){return(0,I.jsxs)(y,{children:[(0,I.jsx)(b,{mark:(0,I.jsx)(U,{device:O(e.browser)}),after:i(e.current,{onFalse:a,onTrue:J}),detail:d(e.address),children:D(e.browser)}),(0,I.jsx)(S,{className:`text-right`,children:(0,I.jsx)(`span`,{className:`text-muted-foreground tabular-nums`,children:C(e.lastSeenAt,o())})})]},e.id)}function J(){return(0,I.jsx)(F,{variant:`secondary`,className:`shrink-0`,children:`This browser`})}function Y(){return(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`No browser sessions`})}var X=W;export{X as component};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dropdown-menu-DuesAEZ-.js","assets/rolldown-runtime-XKyaHtl9.js","assets/react-BPjvcVqE.js","assets/dist-CoswJ3T9.js","assets/index-CWfu_n5V.js","assets/effect-Dpfcu2L1.js","assets/preload-helper-B9gdHcf1.js","assets/auth-DWmRO2OT.js","assets/index-B1VOSd9T.css"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{a as t,i as n,n as r,o as i}from"./react-BPjvcVqE.js";import{t as a}from"./preload-helper-B9gdHcf1.js";import{D as o,R as s,Tt as c,br as l,gn as u,hn as d,k as f,mr as p,pt as m,sr as h,tn as g,vn as _,wt as v}from"./effect-Dpfcu2L1.js";import{c as y,d as b,g as x,h as S,l as C,v as w}from"./auth-DWmRO2OT.js";import{A as T,P as E,R as D,_ as O,a as k,c as A,d as j,f as M,g as N,h as P,i as F,k as I,l as L,o as R,p as z,r as B,t as V,v as ee,y as te}from"./dist-CoswJ3T9.js";var H=e(i(),1),ne=new Map([[`bold`,H.createElement(H.Fragment,null,H.createElement(`path`,{d:`M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z`}))],[`duotone`,H.createElement(H.Fragment,null,H.createElement(`path`,{d:`M160,48V208L80,128Z`,opacity:`0.2`}),H.createElement(`path`,{d:`M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z`}))],[`fill`,H.createElement(H.Fragment,null,H.createElement(`path`,{d:`M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z`}))],[`light`,H.createElement(H.Fragment,null,H.createElement(`path`,{d:`M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z`}))],[`regular`,H.createElement(H.Fragment,null,H.createElement(`path`,{d:`M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z`}))],[`thin`,H.createElement(H.Fragment,null,H.createElement(`path`,{d:`M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z`}))]]),re=H.forwardRef((e,t)=>H.createElement(D,{ref:t,...e,weights:ne}));re.displayName=`CaretLeftIcon`;var U=t(),ie=e(n(),1);function ae(e){return e?.ownerDocument||document}var oe=H.createContext(void 0);function se(){let e=H.useContext(oe);if(e===void 0)throw Error(z(13));return e}var ce={imageLoadingStatus:()=>null},le=H.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,[o,s]=H.useState(`idle`),c={imageLoadingStatus:o},l=H.useMemo(()=>({imageLoadingStatus:o,setImageLoadingStatus:s}),[o,s]),u=B(`span`,e,{state:c,ref:t,props:a,stateAttributesMapping:ce});return(0,U.jsx)(oe.Provider,{value:l,children:u})});function ue(e){H.useEffect(e,F)}var W=null;globalThis.requestAnimationFrame;var G=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},K=class e{static create(){return new e}static request(e){return G.request(e)}static cancel(e){return G.cancel(e)}currentId=W;request(e){this.cancel(),this.currentId=G.request(()=>{this.currentId=W,e()})}cancel=()=>{this.currentId!==W&&(G.cancel(this.currentId),this.currentId=W)};disposeEffect=()=>this.cancel};function de(){let e=O(K.create).current;return ue(e.disposeEffect),e}function fe(e){return e==null?e:`current`in e?e.current:e}function pe(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var me=`data-starting-style`,he=`data-ending-style`,q=null;function ge(e){if(!q){let e=[];q=e,queueMicrotask(()=>{q=null,ie.flushSync(()=>{for(let t of e)t()})})}q.push(e)}function _e(e,t=!1,n=!1){let r=de();return N((i,a=null)=>{r.cancel();let o=fe(e);if(o==null)return;let s=o,c=()=>{n?ge(()=>{a?.aborted||i()}):ie.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(pe(s).map(e=>e.finished.then(R))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(pe(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=me;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function ve(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=N(a),s=_e(r,n,i);H.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var ye={[me]:``},be={[he]:``},xe={transitionStatus(e){return e===`starting`?ye:e===`ending`?be:null}};function Se(e,t=!1,n=!1,r=!1){let[i,a]=H.useState(e&&t?`idle`:void 0),[o,s]=H.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),P(()=>{if(!e&&o&&i!==`ending`&&n){let e=K.request(()=>{a(`ending`)});return()=>{K.cancel(e)}}},[e,o,i,n]),P(()=>{if(!e||t||i===void 0)return;let n=K.request(()=>{a(void 0)});return()=>{K.cancel(n)}},[t,e,i]),P(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=K.request(()=>{a(`idle`)});return()=>{K.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function Ce(e,{referrerPolicy:t,crossOrigin:n,sizes:r,srcSet:i},a){let o=H.useState(`idle`),s=o[1];return P(()=>{if(!a)return R;if(!e&&!i)return s(`error`),R;let o=!0,c=new window.Image,l=e=>()=>{o&&s(e)};return s(`loading`),c.onload=l(`loaded`),c.onerror=l(`error`),t&&(c.referrerPolicy=t),c.crossOrigin=n??null,r&&(c.sizes=r),i&&(c.srcset=i),e&&(c.src=e),c.complete&&s(c.naturalWidth>0?`loaded`:`error`),()=>{o=!1}},[a,e,i,r,n,t,s]),o}var we={...ce,...xe},Te=H.forwardRef(function(e,t){let{className:n,render:r,onLoadingStatusChange:i,keepMounted:a=!1,style:o,sizes:s,srcSet:c,src:l,...u}=e,{setImageLoadingStatus:d}=se(),[f,p]=Ce(l,e,!a),m=f===`loaded`,{mounted:h,transitionStatus:g,setMounted:_}=Se(m),v=H.useRef(null),y=H.useRef(!0);P(()=>{if(!a)return;let e=y.current;y.current=!1;let t=v.current;if(!t)return;if(!t.complete){p(`loading`);return}let n=t.naturalWidth>0?`loaded`:`error`;p(n),n===`loaded`&&e&&_(!0)},[a,l,c,s,u.crossOrigin,u.referrerPolicy,r,p,_]);let b=a?{"data-loading":f===`loading`?``:void 0,"data-error":f===`error`?``:void 0,"aria-hidden":f!==`loaded`||void 0,onLoad(){p(`loaded`)},onError(){p(`error`)}}:void 0,x=N(e=>{i?.(e),d(e)});P(()=>{f!==`idle`&&x(f)},[f,x]),P(()=>()=>d(`idle`),[d]),ve({enabled:!m,open:m,ref:v,onComplete(){m||_(!1)}});let S={imageLoadingStatus:f,transitionStatus:a&&g===`ending`?void 0:g},C=a||h,w={};s!==void 0&&(w.sizes=s),c!==void 0&&(w.srcSet=c),l!==void 0&&(w.src=l);let T=B(`img`,e,{state:S,ref:[t,v],props:[b,u,w],stateAttributesMapping:we,enabled:C});return C?T:null}),J=0,Ee=class e{static create(){return new e}currentId=J;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=J,t()},e)}isStarted(){return this.currentId!==J}clear=()=>{this.currentId!==J&&(clearTimeout(this.currentId),this.currentId=J)};disposeEffect=()=>this.clear};function De(){let e=O(Ee.create).current;return ue(e.disposeEffect),e}var Oe=H.forwardRef(function(e,t){let{className:n,render:r,delay:i=0,style:a,...o}=e,{imageLoadingStatus:s}=se(),[c,l]=H.useState(i===0),u=De();return H.useEffect(()=>(i>0?u.start(i,()=>l(!0)):l(!0),u.clear),[u,i]),B(`span`,e,{state:{imageLoadingStatus:s},ref:t,props:o,stateAttributesMapping:ce,enabled:s!==`loaded`&&(i===0||c)})}),Y=r();function ke(e){let t=(0,Y.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o;t[4]===n?o=t[5]:(o=V(`group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==a||t[8]!==o?(s=(0,U.jsx)(le,{"data-slot":`avatar`,"data-size":a,className:o,...r}),t[6]=r,t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function Ae(e){let t=(0,Y.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=V(`aspect-square size-full rounded-full object-cover`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(Te,{"data-slot":`avatar-image`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function je(e){let t=(0,Y.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=V(`flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(Oe,{"data-slot":`avatar-fallback`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Me({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=H.useRef(e!==void 0),[a,o]=H.useState(()=>t);return[i&&e!==void 0?e:a,H.useCallback(e=>{i||o(e)},[])]}var Ne=H.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Pe(){return H.useContext(Ne)}function Fe(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=N(i),[,o]=H.useState(0),s=O(Le).current,c=O(Ie).current,l=H.useRef(0),u=H.useRef(!0),d=H.useRef(null),f=H.useRef(null),p=N(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=N((e,t)=>{c.set(e,t),p()}),h=N(e=>{c.delete(e),p()}),g=N(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Be(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Ve(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=ze(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=N(()=>{let[e,t]=Re(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});P(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),P(()=>{u.current&&v()}),P(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=N(e=>(s.add(e),()=>{s.delete(e)})),b=H.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,U.jsx)(Ne.Provider,{value:b,children:t})}function Ie(){return new Map}function Le(){return new Set}function Re(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Ve(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function ze(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Be(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Ve(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var He=H.createContext(void 0);function Ue(){let e=H.useContext(He);if(e===void 0)throw Error(z(64));return e}var We=`data-activation-direction`,Ge={tabActivationDirection:e=>({[We]:e})};function Ke(e,t,n,r){let i=!1,a=!1,o=r??k;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function qe(e,t,n){let r=n??k;return{reason:e,event:t??new Event(`base-ui`),...r}}var Je=`none`,Ye=`trigger-press`,Xe=`trigger-hover`,Ze=`trigger-focus`,Qe=`outside-press`,$e=`item-press`,et=`focus-out`,tt=`escape-key`,nt=`list-navigation`,rt=`keyboard`,it=`pointer`,at=`cancel-open`,ot=`sibling-open`,st=`disabled`,ct=`missing`,lt=`initial`,ut=`imperative-action`,dt=H.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,style:c,...l}=e,u=e.defaultValue!==void 0,d=H.useRef([]),[f,p]=H.useState(()=>new Map),[m,h]=Me({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=H.useState(()=>new Map),y=H.useRef(void 0),b=H.useCallback(e=>ft(_,e),[_]),[x,S]=H.useState(()=>({previousValue:m,tabActivationDirection:`none`})),{previousValue:C,tabActivationDirection:w}=x,T=w,E=!1;C!==m&&(T=pt(C,m,a,_),E=C!=null&&m!=null&&b(m)==null);let D=E?C:m,O=C!==D||w!==T;P(()=>{O&&S({previousValue:D,tabActivationDirection:T})},[D,O,T]);let k=N((e,t)=>{t.activationDirection=pt(m,e,a,_),i?.(e,t),t.isCanceled||h(()=>e)}),A=N((e,t)=>{i?.(e,Ke(t,void 0,void 0,{activationDirection:`none`}))}),j=N((e,t)=>(p(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{p(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),M=H.useCallback(e=>f.get(e),[f]),F=H.useCallback(e=>{for(let t of _.values())if(e===t.value)return t.id},[_]),I=H.useMemo(()=>({getTabElementBySelectedValue:b,getTabIdByPanelValue:F,getTabPanelIdByValue:M,onValueChange:k,orientation:a,registerMountedTabPanel:j,setTabMap:v,tabActivationDirection:T,value:m}),[b,F,M,k,a,j,v,T,m]),L=H.useMemo(()=>{for(let e of _.values())if(e.value===m)return e},[_,m]),R=H.useMemo(()=>{for(let e of _.values())if(!e.disabled)return e.value},[_]),z=H.useRef(!u),V=H.useRef(r),ee=H.useRef(u),te=H.useRef(!1);P(()=>{if(g)return;function e(e,t){h(()=>e),S({previousValue:e,tabActivationDirection:`none`}),A(e,t),z.current=!1}if(_.size===0){te.current&&m!==null&&!y.current?.isConnected&&e(null,ct);return}te.current=!0,y.current=_.keys().next().value;let t=L?.disabled,n=L==null&&m!==null;if(!t&&m===V.current&&(ee.current=!1),ee.current&&t&&m===V.current)return;let r=z.current;if(t||n){let n=R??null;if(m===n){z.current=!1;return}let i=ct;r?i=lt:t&&(i=st),e(n,i)}else r&&L!=null&&(A(m,lt),z.current=!1)},[R,g,A,L,h,_,m]);let ne=B(`div`,e,{state:{orientation:a,tabActivationDirection:T},ref:t,props:l,stateAttributesMapping:Ge});return(0,U.jsx)(He.Provider,{value:I,children:(0,U.jsx)(Fe,{elementsRef:d,children:ne})})});function ft(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function pt(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=ft(r,e),c=ft(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}function mt(){let[,e]=H.useState({});return H.useCallback(()=>{e({})},[])}var ht=0;function gt(e,t=`mui`){let n=H.useRef(void 0),r=mt(),i=e??n.current;return H.useEffect(()=>{n.current??(ht+=1,n.current=`${t}-${ht}`,e??r())},[e,t,r]),i}var _t=ee.useId;function vt(e,t){if(_t!==void 0){let n=_t();return e??(t?`${t}-${n}`:n)}return gt(e,t)}function yt(e){return vt(e,`base-ui`)}var bt=`data-composite-item-active`;function xt(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Pe(),u=H.useRef(-1),[d,f]=H.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=H.useRef(null),h=H.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return P(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function St(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=M(),{ref:i,index:a}=xt(e),o=n===a,s=H.useRef(null),c=A(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}var Ct=H.createContext(void 0);function wt(){let e=H.useContext(Ct);if(e===void 0)throw Error(z(65));return e}function Tt(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Et(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&E(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Dt(e,t){let n=e;for(;n;){if(I(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(E(n)?n.host:null)}return null}function Ot(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}function X(e,t){return t<0||t>=e.length}function kt(e,t){return Z(e.current,{disabledIndices:t})}function At(e,t){return Z(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function jt(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Z(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:X(e,u)?-1:u,wrapped:d}}function Z(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Q(e,a,r));return a}function Q(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!Nt(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function Mt(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Nt(e,t=e?te(e):null){return!e||!e.isConnected||!t||Mt(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Pt=H.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,style:c,...l}=e,{value:u,getTabPanelIdByValue:d,onValueChange:f,orientation:p,tabActivationDirection:m}=Ue(),{activateOnFocus:h,registerTabResizeObserverElement:g,tabsListElement:_}=wt(),{highlightedIndex:v,onHighlightedIndexChange:y}=M(),b=yt(o),{compositeProps:x,compositeRef:S,index:C}=St({metadata:H.useMemo(()=>({disabled:r,id:b,value:a}),[r,b,a])}),w=a===u,T=H.useRef(!1),E=H.useRef(null),D=N(e=>{E.current?.(),E.current=e?g(e):null});P(()=>{if(T.current){T.current=!1;return}if(!(w&&C>-1&&v!==C))return;let e=_;if(e!=null){let t=Tt(ae(e));if(t&&Et(e,t))return}r||y(C)},[w,C,v,y,r,_]);let{getButtonProps:O,buttonRef:k}=L({disabled:r,native:s,focusableWhenDisabled:!0}),A=d(a),j=H.useRef(!1),F=H.useRef(!1);function I(e){f(a,Ke(Je,e.nativeEvent,void 0,{activationDirection:`none`}))}function R(e){w||r||I(e)}function z(e){w||r||h&&(!j.current||F.current)&&I(e)}function V(e){if(w||r)return;j.current=!0,F.current=e.button===0;let t=ae(e.currentTarget);function n(){j.current=!1,F.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return B(`button`,e,{state:{disabled:r,active:w,orientation:p,tabActivationDirection:m},ref:[t,k,S,D],props:[x,{role:`tab`,"aria-controls":A,"aria-selected":w,id:b,onClick:R,onFocus:z,onPointerDown:V,[bt]:w?``:void 0,onKeyDownCapture(){T.current=!0}},l,O],stateAttributesMapping:Ge})});function Ft(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var It=`ArrowUp`,Lt=`ArrowDown`,Rt=`ArrowLeft`,zt=`ArrowRight`,Bt=new Set([It,Lt,Rt,zt,`Home`,`End`]),Vt=[`Shift`,`Control`,`Alt`,`Meta`];function Ht(e){return T(e)&&e.tagName===`INPUT`}function Ut(e){return!!(Ht(e)&&e.selectionStart!=null||T(e)&&e.tagName===`TEXTAREA`)}function Wt(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=Gt(e,t,`left`),a=$(e),o=$(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Gt(e,t,`top`),r=$(e),i=$(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Gt(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function $(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function Kt(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=F}=e,[p,m]=H.useState(0),h=r!=null,g=H.useRef(null),_=A(g,c),v=H.useRef([]),y=H.useRef(!1),b=H.useRef(null),x=o??p,S=N((e,t=!1)=>{if(b.current=v.current[e]??null,(s??m)(e),t){let t=v.current[e];Wt(g.current,t,a,n)}}),C=N(e=>{if(e.size===0)return;if(y.current){let e=v.current,t=e.indexOf(b.current);if(t===-1){let t=e[x];!t||Q(e,x,d)?S(qt(e,d)):b.current=t}else t!==x&&S(t);return}y.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)S(i);else if(Q(t,x,d)){let e=Z(t,{disabledIndices:d});X(t,e)||S(e)}Wt(g.current,r,a,n)});P(()=>{if(d==null||o!=null||!y.current)return;let e=v.current;if(Q(e,x,d)){let t=Z(e,{disabledIndices:d});X(e,t)||S(t)}},[d,o,x,v,S]);let w=N((e,t,n)=>i?i(e,t,n,v):n),T=N(e=>{let o=e.key===`Home`||e.key===`End`;if(!Bt.has(e.key)||!l&&o||Jt(e,f)||!g.current)return;let s=a===`rtl`,c=s?Rt:zt,p=s?zt:Rt,m=n===`vertical`?Lt:c,_=n===`vertical`?It:p,y=Ot(e.nativeEvent);if(y!=null&&Ut(y)&&!Ft(y)){let t=y.selectionStart,n=y.selectionEnd,r=y.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=x,C=kt(v,d),T=At(v,d);r!=null&&(b=r({disabledIndices:d,elementsRef:v,event:e,highlightedIndex:x,loopFocus:t,maxIndex:T,minIndex:C,onLoop:w,orientation:n,rtl:s}));let E=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=C:e.key===`End`&&(b=T)),b===x&&(E||D)&&(t&&b===T&&E?(b=C,i&&(b=i(e,x,b,v))):t&&b===C&&D?(b=T,i&&(b=i(e,x,b,v))):b=Z(v.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==x&&!X(v.current,b)&&(u&&e.stopPropagation(),(h||o||E||D)&&e.preventDefault(),S(b,!0),queueMicrotask(()=>{v.current[b]?.focus()}))});return{props:{ref:_,onFocus(e){let t=g.current,n=Ot(e.nativeEvent);t&&n!=null&&Ut(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:T},highlightedIndex:x,onHighlightedIndexChange:S,elementsRef:v,onMapChange:C,relayKeyboardEvent:T}}function qt(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!Q(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function Jt(e,t){for(let n of Vt)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}var Yt=H.createContext(void 0);function Xt(){return H.useContext(Yt)?.direction??`ltr`}function Zt(e){let{render:t,className:n,style:r,refs:i=F,props:a=F,state:o=k,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:d,loopFocus:f,onLoop:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:b=!1,tag:x=`div`,...S}=e,{props:C,highlightedIndex:w,onHighlightedIndexChange:T,elementsRef:E,onMapChange:D,relayKeyboardEvent:O}=Kt({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:Xt(),disabledIndices:v,modifierKeys:y}),A=B(x,e,{state:o,ref:i,props:[C,...a,S],stateAttributesMapping:s}),M=H.useMemo(()=>({highlightedIndex:w,onHighlightedIndexChange:T,highlightItemOnHover:b,relayKeyboardEvent:O}),[w,T,b,O]);return(0,U.jsx)(j.Provider,{value:M,children:(0,U.jsx)(Fe,{elementsRef:E,onMapChange:e=>{h?.(e),D(e)},children:A})})}var Qt=H.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{orientation:c,setTabMap:l,tabActivationDirection:u}=Ue(),[d,f]=H.useState(0),[p,m]=H.useState(null),h=H.useRef(new Set),g=H.useRef(new Set),_=H.useRef(null);P(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{h.current.forEach(e=>{e()})});return _.current=e,p&&e.observe(p),g.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),_.current=null}},[p]);let v=N(e=>(h.current.add(e),()=>{h.current.delete(e)})),y=N(e=>(g.current.add(e),_.current?.observe(e),()=>{g.current.delete(e),_.current?.unobserve(e)})),b={orientation:c,tabActivationDirection:u},x={"aria-orientation":c===`vertical`?`vertical`:void 0,role:`tablist`},S=H.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:v,registerTabResizeObserverElement:y,tabsListElement:p}),[n,v,y,p]);return(0,U.jsx)(Ct.Provider,{value:S,children:(0,U.jsx)(Zt,{render:a,className:r,style:o,state:b,refs:[t,m],props:[x,s],stateAttributesMapping:Ge,highlightedIndex:d,enableHomeAndEndKeys:!0,loopFocus:i,orientation:c,onHighlightedIndexChange:f,onMapChange:l,disabledIndices:F})})});function $t(e){let t=(0,Y.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`horizontal`:i,o;t[4]===n?o=t[5]:(o=V(`group/tabs flex gap-2 data-horizontal:flex-col`,n),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==r||t[8]!==o?(s=(0,U.jsx)(dt,{"data-slot":`tabs`,"data-orientation":a,className:o,...r}),t[6]=a,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}var en=C(`group/tabs-list inline-flex w-fit items-center justify-center rounded-none p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function tn(e){let t=(0,Y.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o;t[4]!==n||t[5]!==a?(o=V(en({variant:a}),n),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o||t[9]!==a?(s=(0,U.jsx)(Qt,{"data-slot":`tabs-list`,"data-variant":a,className:o,...r}),t[7]=r,t[8]=o,t[9]=a,t[10]=s):s=t[10],s}function nn(e){let t=(0,Y.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=V(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-none border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(Pt,{"data-slot":`tabs-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var rn=f(o(()=>g(()=>a(()=>import(`./dropdown-menu-DuesAEZ-.js`).then(e=>e.o),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))));m(c(w.fields,[`id`,`name`]));function an(e){let t=(0,Y.c)(13),n=e.size,r;t[0]===e.account.id?r=t[1]:(r=d(`github:`,``)(e.account.id),t[0]=e.account.id,t[1]=r);let i=`https://avatars.githubusercontent.com/u/${r}?s=96`,a;t[2]!==e.account.name||t[3]!==i?(a=(0,U.jsx)(Ae,{src:i,alt:e.account.name}),t[2]=e.account.name,t[3]=i,t[4]=a):a=t[4];let o;t[5]===e.account.name?o=t[6]:(o=_(u(0,1)(e.account.name)),t[5]=e.account.name,t[6]=o);let s;t[7]===o?s=t[8]:(s=(0,U.jsx)(je,{children:o}),t[7]=o,t[8]=s);let c;return t[9]!==e.size||t[10]!==a||t[11]!==s?(c=(0,U.jsxs)(ke,{size:n,children:[a,s]}),t[9]=e.size,t[10]=a,t[11]=s,t[12]=c):c=t[12],c}function on(e){let t=(0,Y.c)(7),n;t[0]===e?n=t[1]:(n=v(e,[`account`]),t[0]=e,t[1]=n);let r;t[2]===e.account?r=t[3]:(r=(0,U.jsx)(an,{account:e.account,size:`sm`}),t[2]=e.account,t[3]=r);let i;return t[4]!==n||t[5]!==r?(i=(0,U.jsx)(y,{...n,variant:`ghost`,size:`icon-sm`,"aria-label":`Account`,children:r}),t[4]=n,t[5]=r,t[6]=i):i=t[6],i}function sn(){let e=(0,Y.c)(42),t=S(x),[n,r]=b(rn),[i,a]=(0,H.useState)(),o;e[0]===r?o=e[1]:(o=function(){r()},e[0]=r,e[1]=o);let c=o,l;e[2]===r?l=e[3]:(l=function(){a(!0),r()},e[2]=r,e[3]=l);let u=l,d;e[4]===u?d=e[5]:(d=function(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),u())},e[4]=u,e[5]=d);let f=d;if(!s(t))return null;if(!s(n)||i===void 0){let n=i??!1,r;return e[6]!==t.value||e[7]!==u||e[8]!==f||e[9]!==c||e[10]!==n?(r=(0,U.jsx)(on,{account:t.value,"aria-haspopup":`menu`,"aria-expanded":n,onPointerEnter:c,onPointerDown:c,onFocus:c,onClick:u,onKeyDown:f}),e[6]=t.value,e[7]=u,e[8]=f,e[9]=c,e[10]=n,e[11]=r):r=e[11],r}let p;e[12]===t.value?p=e[13]:(p=(0,U.jsx)(on,{account:t.value}),e[12]=t.value,e[13]=p);let m;e[14]!==n.value.DropdownMenuTrigger||e[15]!==p?(m=(0,U.jsx)(n.value.DropdownMenuTrigger,{render:p}),e[14]=n.value.DropdownMenuTrigger,e[15]=p,e[16]=m):m=e[16];let h;e[17]!==t.value.name||e[18]!==n.value.DropdownMenuLabel?(h=(0,U.jsxs)(n.value.DropdownMenuLabel,{children:[`@`,t.value.name]}),e[17]=t.value.name,e[18]=n.value.DropdownMenuLabel,e[19]=h):h=e[19];let g;e[20]!==n.value.DropdownMenuGroup||e[21]!==h?(g=(0,U.jsx)(n.value.DropdownMenuGroup,{children:h}),e[20]=n.value.DropdownMenuGroup,e[21]=h,e[22]=g):g=e[22];let _;e[23]===n.value.DropdownMenuSeparator?_=e[24]:(_=(0,U.jsx)(n.value.DropdownMenuSeparator,{}),e[23]=n.value.DropdownMenuSeparator,e[24]=_);let v=!t.value.signOut,y;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(y=new URLSearchParams({next:location.href}),e[25]=y):y=e[25];let C=`/auth/sign-out?${y}`,w;e[26]===C?w=e[27]:(w=(0,U.jsx)(`a`,{"aria-label":`Sign out`,href:C}),e[26]=C,e[27]=w);let T;e[28]!==n.value.DropdownMenuItem||e[29]!==w||e[30]!==v?(T=(0,U.jsx)(n.value.DropdownMenuItem,{variant:`destructive`,disabled:v,render:w,children:`Sign out`}),e[28]=n.value.DropdownMenuItem,e[29]=w,e[30]=v,e[31]=T):T=e[31];let E;e[32]!==n.value.DropdownMenuContent||e[33]!==T||e[34]!==g||e[35]!==_?(E=(0,U.jsxs)(n.value.DropdownMenuContent,{align:`end`,className:`w-56`,children:[g,_,T]}),e[32]=n.value.DropdownMenuContent,e[33]=T,e[34]=g,e[35]=_,e[36]=E):E=e[36];let D;return e[37]!==n.value.DropdownMenu||e[38]!==i||e[39]!==E||e[40]!==m?(D=(0,U.jsxs)(n.value.DropdownMenu,{open:i,onOpenChange:a,children:[m,E]}),e[37]=n.value.DropdownMenu,e[38]=i,e[39]=E,e[40]=m,e[41]=D):D=e[41],D}function cn(e){function t(){let t=e.querySelector(`[data-active]`);if(l(t)||l(e.parentElement))return;let n=t.getBoundingClientRect(),r=e.parentElement.getBoundingClientRect();n.left>=r.left-1&&n.right<=r.right+1||t.scrollIntoView({block:`nearest`,inline:`nearest`})}t();let n=new MutationObserver(t);return n.observe(e,{attributeFilter:[`data-active`],childList:!0,subtree:!0}),()=>{n.disconnect()}}function ln(e){let t=(0,Y.c)(5),n;t[0]===e.children?n=t[1]:(n=(0,U.jsx)(tn,{children:e.children}),t[0]=e.children,t[1]=n);let r;return t[2]!==e.value||t[3]!==n?(r=(0,U.jsx)(`div`,{ref:cn,children:(0,U.jsx)($t,{value:e.value,children:n})}),t[2]=e.value,t[3]=n,t[4]=r):r=t[4],r}function un(e){let t=(0,Y.c)(4),n;return t[0]!==e.children||t[1]!==e.render||t[2]!==e.value?(n=(0,U.jsx)(nn,{value:e.value,nativeButton:!1,render:e.render,children:e.children}),t[0]=e.children,t[1]=e.render,t[2]=e.value,t[3]=n):n=t[3],n}function dn(e){let t=(0,Y.c)(18),n;if(t[0]!==e.heading||t[1]!==e.icon||t[2]!==e.name){let r;t[4]!==e.icon||t[5]!==e.name?(r=()=>(0,U.jsxs)(y,{variant:`ghost`,nativeButton:!1,render:(0,U.jsx)(`a`,{href:`/`,"aria-label":e.name}),className:`shrink-0`,children:[(0,U.jsx)(`img`,{src:e.icon,alt:``,className:`pixelated size-6`}),(0,U.jsx)(`span`,{className:`font-heading text-sm font-semibold capitalize max-sm:hidden`,children:e.name})]}),t[4]=e.icon,t[5]=e.name,t[6]=r):r=t[6],n=p(h(e.heading),{onNone:r,onSome:fn}),t[0]=e.heading,t[1]=e.icon,t[2]=e.name,t[3]=n}else n=t[3];let r;t[7]===e.tabs?r=t[8]:(r=e.tabs!==void 0&&(0,U.jsx)(`nav`,{"aria-label":`Sections`,className:`flex min-w-0 flex-1 scrollbar-none items-center overflow-x-auto overflow-y-hidden overscroll-x-contain`,children:e.tabs}),t[7]=e.tabs,t[8]=r);let i;t[9]===e.account?i=t[10]:(i=e.account??(0,U.jsx)(sn,{}),t[9]=e.account,t[10]=i);let a;t[11]!==e.controls||t[12]!==i?(a=(0,U.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[e.controls,i]}),t[11]=e.controls,t[12]=i,t[13]=a):a=t[13];let o;return t[14]!==n||t[15]!==r||t[16]!==a?(o=(0,U.jsxs)(`header`,{className:`bg-background flex h-12 shrink-0 items-center gap-4 border-b px-4`,children:[n,r,a]}),t[14]=n,t[15]=r,t[16]=a,t[17]=o):o=t[17],o}function fn(e){return(0,U.jsxs)(`div`,{className:`flex min-w-0 shrink items-center gap-1`,children:[(0,U.jsx)(y,{variant:`ghost`,size:`icon-sm`,"aria-label":e.back.label,onClick:e.back.onClick,children:(0,U.jsx)(re,{})}),(0,U.jsx)(`span`,{className:`font-heading max-w-48 min-w-0 truncate text-sm`,children:e.title})]})}export{Je as A,Me as B,at as C,$e as D,ut as E,Xe as F,ve as G,De as H,Ye as I,K as J,_e as K,Ke as L,it as M,ot as N,rt as O,Ze as P,qe as R,mt as S,et as T,Se as U,Ee as V,xe as W,ue as X,de as Y,ae as Z,Ot as _,ln as a,yt as b,At as c,Nt as d,X as f,Et as g,Dt as h,un as i,Qe as j,nt as k,kt as l,Tt as m,on as n,Xt as o,Q as p,fe as q,dn as r,Bt as s,an as t,jt as u,St as v,tt as w,vt as x,xt as y,Fe as z};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{a as t,n,o as r,t as i}from"./react-BPjvcVqE.js";import{$ as a,$t as o,An as s,At as c,Bt as l,C as u,Cn as ee,D as te,Dn as ne,Dr as d,Dt as re,E as ie,En as ae,Er as oe,Et as se,F as ce,Fn as f,G as le,Gt as ue,H as de,Hn as fe,Ht as pe,I as me,In as he,J as ge,Jt as p,K as _e,Kn as ve,L as ye,Lt as be,M as xe,Mn as Se,Mt as Ce,N as we,Nn as Te,O as Ee,On as De,Ot as m,Pn as Oe,Q as ke,Qn as h,Qt as Ae,Rn as je,S as Me,Sn as Ne,Sr as Pe,St as Fe,T as g,Tn as _,Tr as Ie,Tt as Le,U as Re,Un as ze,V as Be,Vn as Ve,Vt as He,W as Ue,Wn as We,Wt as Ge,X as Ke,Xt as qe,Y as Je,Yt as v,Z as Ye,Zt as Xe,_ as y,_n as Ze,_r as b,a as Qe,an as x,ar as $e,at as et,b as tt,bn as nt,bt as S,c as rt,cn as it,ct as C,d as w,dn as at,dr as ot,dt as st,en as ct,et as T,f as lt,fn as ut,fr as dt,ft as E,g as ft,gr as pt,gt as mt,h as ht,hr as D,ht as gt,i as _t,ir as vt,it as yt,j as O,jn as bt,jt as k,k as A,kn as xt,kt as St,l as Ct,ln as wt,lr as Tt,lt as Et,m as Dt,mr as j,mt as Ot,n as kt,nn as At,nr as jt,nt as M,o as Mt,on as Nt,or as Pt,ot as Ft,p as It,pn as Lt,pr as Rt,pt as N,q as zt,qn as Bt,r as Vt,rn as Ht,rr as P,rt as Ut,s as Wt,sn as Gt,st as F,t as I,tr as L,tt as Kt,u as qt,un as Jt,ur as Yt,ut as R,v as Xt,vr as Zt,vt as z,w as Qt,wn as $t,x as en,xn as tn,xt as nn,y as rn,yt as an,zn as on,zt as sn}from"./effect-Dpfcu2L1.js";import{l as cn,r as ln,t as un}from"./dist-CoswJ3T9.js";var B=e(r(),1),dn=t(),V=class extends Ot()(`AuthError`,{cause:nn(Ut()),error:Fe(F([`access_denied`,`temporarily_unavailable`])),message:E}){get name(){return this.error===`temporarily_unavailable`?`AuthUnavailable`:`AuthError`}},H=d(C,gt(`UserId`)),fn=d(Ft,gt(`GitHubId`));d(et,mt(fn));var U=N({admin:T,id:H,name:C});N({address:R(C),onBehalfOf:R(H),session:R(C)}),H.make(`github:0`);function pn(e){return`${new URL(e).origin}/auth/sign-in?${new URLSearchParams({next:e})}`}function mn(e){return z(V)(e)&&e.error===void 0}function W(e){return z(V)(e)&&e.error!==`temporarily_unavailable`}je()(`@deslop/runtime/shared/auth/CurrentUser`);var hn=class extends _t()(`@deslop/runtime/shared/auth/RpcAuth`,{error:V}){},gn=E.check(S(e=>P(L(g(e)),e=>Ve([`http:`,`https:`],e.protocol)&&e.username===``&&e.password===``&&e.hash===``),{expected:`an HTTP(S) URL without credentials or a fragment`})).check(S(e=>P(L(g(e)),e=>e.pathname===`/`&&e.search===``),{expected:`an HTTP(S) origin without a path or query`}));gn.check(S(e=>P(L(g(e)),e=>e.protocol===`https:`||Ve([`localhost`,`127.0.0.1`,`[::1]`],e.hostname)),{expected:`HTTPS outside loopback`})),E.check(an(/^\d{1,5}$/u),S(e=>P(nt(e),e=>e>=1&&e<=65535),{expected:`a port between 1 and 65535`}));var _n=E.check(an(/^0\.1\.\d+$/u)),vn=`/api/runtime`,yn=N({auth:R(gn),name:E,traces:E,version:_n}),bn=`/api/rpc`,xn=N({...U.fields,signOut:T});N({config:N({port:Ft}),name:E,version:_n}),F([`web`,`mobile`,`server`]);function Sn(e,t,n,r){return tn(xt(v(function*(){let i=`${yield*bt}`,a=yield*re,o={attributes:{"scope.run.started_unix_nano":i,"scope.runtime":n,"service.instance.id":i},serviceName:e,serviceVersion:Tt(dt(r,e=>e!==`0.1.0`))};return _($t(Wt({resource:o,url:new URL(`/v1/traces`,t).href}),rt({resource:o,url:new URL(`/v1/logs`,t).href}),ne(re,[...a,`code`,`state`,`request`,`access_token`,`refresh_token`,`id_token`,`client_secret`,`client_assertion`,`code_verifier`,`session`,`token`])),[Ct,w])})),e=>Oe(e)?Ne(qe):Ne(Ae(`Telemetry is unavailable`)))}function Cn(e){return xt(v(function*(){let t=yield*d((yield*en).get(vn),p(u),p(Qt(yn)),Gt(`3 seconds`),Nt(e=>Ae(`Telemetry is off: the runtime config did not load`,e)),ct);return j(t,{onNone:()=>ee,onSome:t=>t.traces===``?ee:Sn(`${e}-client`,t.traces,`web`,t.version)})}))}var G=class extends _t()(`@deslop/runtime/shared/rpc/RpcStream`){};ne(G,G.of((e,t)=>Xt(t.rpc.successSchema)?He(pe(`rpc.stream`,!0),e):e));var wn=Qe(G,e=>v(function*(){return Xt(e.rpc.successSchema)&&(yield*pe(`rpc.stream`,!0)),yield*e.next(e.request)}));function Tn(e,t=tt){return d(It({pingTimeout:`15 seconds`,retryTransientErrors:!0}),_(_(rn(e),t)),ae(Dt()),ae(wn))}var K=c(D());F([`route`,`caught`,`uncaught`]);var En=te(e=>{let t=Xe(`Web error`,Se(e.error),...Zt(Pt(e.stack)));return j(m(K),{onNone:()=>t,onSome:n=>At(d(t,He(Ge(e.error)),wt(`Web.error`,{attributes:{"web.error.source":e.source,"web.route.id":e.route},root:!0}),ue),n)})}),Dn=O(w).atom(d(Me(`/api/account`),p(u),p(Qt(xn)))),On=Tn(x(()=>`${location.origin}${bn}`));function kn(e){O.addGlobalLayer(d(Cn(e),_(w),De(e=>Yt(on(e,qt))?it:l(x(()=>k(K,b(e))),()=>x(()=>Ce(K,vt(t=>t!==e)))))))}var An=e(i(),1);function jn(e){let t=An.unstable_scheduleCallback(4,e);return()=>An.unstable_cancelCallback(t)}var q=B.createContext(we({scheduleTask:jn,defaultIdleTTL:400})),Mn=new WeakMap,J=0,Y=new Set;function Nn(e){J++;try{return e()}finally{J--}}function Pn(e){if(J===0)return e();Y.size===0&&queueMicrotask(X),Y.add(e)}function X(){for(let e of Y)Y.delete(e),e()}function Fn(e,t){let n=Mn.get(e);n===void 0&&(n=new WeakMap,Mn.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i=0,a,o={subscribe(n){i++;let r=e.subscribe(t,()=>Pn(n));return()=>{i--,Y.delete(n),r()}},snapshot(){return Nn(()=>e.get(t))},getServerSnapshot(){return(i===0||a===void 0)&&(a={value:Nn(()=>Ee(t,e))}),a.value}};return n.set(t,o),o}function Z(e,t){let n=Fn(e,t);return B.useEffect(X),B.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}function In(e,t,n){let r=Fn(e,t),i=B.useMemo(()=>{let e;return t=>(e!==void 0&&Object.is(e.source,t)||(e={source:t,value:n(t)}),e.value)},[n]);return B.useEffect(X),B.useSyncExternalStore(r.subscribe,()=>i(r.snapshot()),()=>i(r.getServerSnapshot()))}var Ln=(e,t)=>{let n=B.useContext(q);return t?In(n,e,t):Z(n,e)};function Rn(e,t){B.useEffect(()=>e.mount(t),[t,e])}function zn(e,t,n){return n?.mode===`promise`||n?.mode===`promiseExit`?B.useCallback(r=>{e.set(t,r);let i=Ht(xe(e,t,{suspendOnWaiting:!0}));return n.mode===`promise`?i.then(Bn):i},[e,t,n.mode]):B.useCallback(n=>{e.set(t,typeof n==`function`?n(e.get(t)):n)},[e,t])}var Bn=e=>{if(s(e))return e.value;throw he(e.cause)},Vn=e=>{Rn(B.useContext(q),e)},Hn=e=>{let t=B.useContext(q);return Rn(t,e),B.useCallback(()=>{t.refresh(e)},[t,e])},Un=(e,t)=>{let n=B.useContext(q);return[Z(n,e),zn(n,e,t)]},Wn={suspendOnWaiting:new WeakMap,default:new WeakMap};function Gn(e,t,n){let r=n?Wn.suspendOnWaiting:Wn.default,i=r.get(e);i===void 0&&(i=new WeakMap,r.set(e,i));let a=i.get(t);return a===void 0&&(a=new Promise(r=>{let a=e.subscribe(t,e=>{e._tag===`Initial`||n&&e.waiting||(setTimeout(a,1e3),r(),i.delete(t))})}),i.set(t,a)),a}function Kn(e,t,n){let r=Z(e,t);if(r._tag===`Initial`||n&&r.waiting)throw Gn(e,t,n);return r}var qn=(e,t)=>{let n=Kn(B.useContext(q),e,t?.suspendOnWaiting??!1);if(n._tag===`Failure`&&!t?.includeFailure)throw he(n.cause);return n},Jn=n();function Yn(e){return h(e.reasons,e=>f(e)&&W(e.error))}function Xn(e){return!ye(e)||!Yn(e.cause)&&ot(e.previousSuccess)?D():b(e.cause)}function Zn(e,t,n=oe){function r(e){let t=ze(e.reasons,e=>f(e)&&W(e.error));return ve(t)?D():b(Te(t))}let i=c(d(e.self(),vt(ye),$e(e=>r(e.cause))));function a(e){return j(m(i),{onNone:()=>e,onSome:t=>Te([...t.reasons,...ze(e.reasons,e=>!f(e)||!W(e.error))])})}let o=c(0),s=Ye(t,t=>x(()=>{Ce(i,e=>pt(r(t),()=>e));let n=a(t);ot(m(i))?e.setSelf(ce(n)):St(o)<2||e.setSelf(me(n,{previous:e.self()}))}));return d(n(s),Ke(()=>x(()=>{k(i,D()),k(o,0)})),Be(e=>le(a(e))),Re(Je(()=>j(m(i),{onNone:()=>Ue,onSome:le}))))}function Qn(e){return ge(e,e=>at(e(Jt(`1 second`)),e=>z(V)(e.input)?e.input.error===`temporarily_unavailable`:z(ft)(e.input)&&!z(ht)(e.input.reason)))}function $n(e,t,n){return ke(o(e,e=>e(t,n)))}function er(e,t,n){return e.runtime.atom(r=>Zn(r,ke(o(e,e=>e(t,n))),Qn))}var tr=B.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=cn({disabled:i,focusableWhenDisabled:a,native:o});return ln(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})});function Q(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Q(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function nr(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Q(e))&&(r&&(r+=` `),r+=t);return r}var rr=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,ir=nr,ar=(e,t)=>n=>{if(t?.variants==null)return ir(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=rr(t)||rr(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return ir(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},or=ar(`group/button inline-flex shrink-0 items-center justify-center rounded-none border border-transparent bg-clip-padding text-xs font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-none [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-none`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function sr(e){let t=(0,Jn.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:i,size:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`default`:i,s=a===void 0?`default`:a,c;t[5]!==n||t[6]!==s||t[7]!==o?(c=un(or({variant:o,size:s,className:n})),t[5]=n,t[6]=s,t[7]=o,t[8]=c):c=t[8];let l;return t[9]!==r||t[10]!==c?(l=(0,dn.jsx)(tr,{"data-slot":`button`,className:c,...r}),t[9]=r,t[10]=c,t[11]=l):l=t[11],l}F([`iPhone`,`iPad`,`Android`,`Mac`,`Windows`,`Linux`]);var cr=class extends I(`CookieSession`)({address:kt(E),browser:E,createdAt:M,id:E,lastSeenAt:M,userId:H}){static table=`cookie_sessions`},lr=class extends I(`ListedSession`)({...Le(Vt(cr),[`address`,`browser`,`id`,`lastSeenAt`]),current:T}){},ur=F([`Admin`,`Member`,`Waiting`]),dr=N({...U.fields,fullName:R(E),role:ur}),fr=N({...dr.fields,signOut:T}),pr=N({...dr.fields,since:d(yt,mt(Et(Kt),{decode:se(e=>d(e,dt(e=>e!==0),Rt(be))),encode:se(e=>j(e,{onNone:Ie(0),onSome:sn}))}))}),mr=F([`Waiting`,`Allowed`]);I(`Member`)({fullName:kt(E),id:U.fields.id,name:U.fields.name,since:M,status:mr}),N({id:fn,login:C,name:st(E)});var hr=N({allow:T,id:H}),gr=class extends Mt(y(`people.watch`,{error:V,stream:!0,success:a(pr)}),y(`people.admit`,{error:V,payload:hr,success:pr}),y(`sessions.watch`,{error:V,stream:!0,success:a(lr)})).middleware(hn).merge(Mt(y(`people.account`,{error:V,stream:!0,success:fr}))){},_r=[{name:`iPhone`,token:`iPhone`},{name:`iPad`,token:`iPad`},{name:`Android`,token:`Android`},{name:`Mac`,token:`Macintosh`},{name:`Windows`,token:`Windows`},{name:`Linux`,token:`Linux`}],vr=[{name:`Edge`,tokens:[`Edg/`,`EdgA/`,`EdgiOS/`]},{name:`Opera`,tokens:[`OPR/`]},{name:`Firefox`,tokens:[`Firefox/`,`FxiOS/`]},{name:`Chrome`,tokens:[`Chrome/`,`CriOS/`]},{name:`Safari`,tokens:[`Safari/`]}];function yr(e){return d(new URL(e).hostname,Ze(`.`),fe(1),Bt(`.`))}function br(e,t,n){return jt(g(e),{onFailure:Pe,onSuccess:e=>e.username!==``||e.password!==``?!1:n?e.origin===new URL(t).origin:e.protocol===`https:`&&(e.hostname===yr(t)||ut(`.${yr(t)}`)(e.hostname))})}function xr(e){return d(_r,We(t=>Lt(t.token)(e)),Rt(e=>e.name))}function Sr(e){return d(vr,We(t=>h(t.tokens,t=>Lt(t)(e))),j({onNone:Ie(`Browser`),onSome:e=>e.name}))}var Cr=N({error:R(E),next:R(E)});kn(`@deslop/auth`);var $=class extends lt()(`@deslop/auth/lib/auth/RpcClient`,{group:gr.middleware(G),protocol:On}){},wr=A($.runtime.atom(d($n($,`people.account`),Qn,Ke(e=>x(()=>{let t=new URL(location.href).searchParams.get(`next`);e.role!==`Waiting`&&t!==null&&br(t,location.origin,location.protocol===`http:`)&&location.assign(t)})),zt(b),de(`AuthError`,()=>_e(D()))))),Tr=A(er($,`people.watch`)),Er=A(er($,`sessions.watch`)),Dr=ie(e=>$.runtime.fn(t=>p($,n=>n(`people.admit`,{allow:t,id:e}))));export{En as _,Er as a,mn as b,sr as c,Un as d,Vn as f,Dn as g,Ln as h,Tr as i,ar as l,qn as m,wr as n,Sr as o,Hn as p,Dr as r,xr as s,Cr as t,Xn as u,xn as v,pn as x,W as y};