@streamoid/settings 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -258,7 +258,8 @@ var TAB_SCOPE = {
258
258
  billing: "workspace",
259
259
  apikey: "workspace",
260
260
  connectedApps: "account",
261
- organizationIntegrations: "organization"
261
+ organizationIntegrations: "organization",
262
+ organizationLoginMethods: "organization"
262
263
  };
263
264
  var SCOPE_LABELS = {
264
265
  account: "Account",
@@ -279,7 +280,8 @@ var TAB_TO_URL = {
279
280
  billing: "billing",
280
281
  apikey: "api-keys",
281
282
  connectedApps: "connected-apps",
282
- organizationIntegrations: "organization/integrations"
283
+ organizationIntegrations: "organization/integrations",
284
+ organizationLoginMethods: "organization/login-methods"
283
285
  };
284
286
  var URL_TO_TAB = {
285
287
  /* Canonical, scope-first slugs. */
@@ -290,6 +292,7 @@ var URL_TO_TAB = {
290
292
  "organization/people": "organization",
291
293
  "organization/workspaces": "organizationWorkspaces",
292
294
  "organization/integrations": "organizationIntegrations",
295
+ "organization/login-methods": "organizationLoginMethods",
293
296
  /* The Domains tab is gone; its join requests live under Workspaces. */
294
297
  "organization/domains": "organizationWorkspaces",
295
298
  /* Unscoped destinations. */
@@ -321,7 +324,8 @@ var TAB_LABELS = {
321
324
  billing: "Billing & usage",
322
325
  apikey: "API Keys",
323
326
  connectedApps: "Connected apps",
324
- organizationIntegrations: "Integrations"
327
+ organizationIntegrations: "Integrations",
328
+ organizationLoginMethods: "Login methods"
325
329
  };
326
330
  var TAB_DESCRIPTIONS = {
327
331
  profile: "Your name, photo, language and personalisation",
@@ -336,7 +340,8 @@ var TAB_DESCRIPTIONS = {
336
340
  billing: "Workspace plan, credits, invoices and usage history",
337
341
  apikey: "Create and revoke keys for calling the Streamoid APIs",
338
342
  connectedApps: "Apps like ChatGPT and Codex that you've allowed to use CXO for you",
339
- organizationIntegrations: "Turn ChatGPT and Codex on for the organization, and revoke any member's connection"
343
+ organizationIntegrations: "Turn ChatGPT and Codex on for the organization, and revoke any member's connection",
344
+ organizationLoginMethods: "Choose whether people sign in with an email code, company SSO, or either"
340
345
  };
341
346
  function resolveSettingsTabFromPath(path) {
342
347
  const segments = path.split("/").filter(Boolean);
@@ -374,6 +379,7 @@ function AdministrationOverview({
374
379
  isWorkspaceAdmin,
375
380
  showConnectedApps,
376
381
  showIntegrations,
382
+ showLoginMethods = false,
377
383
  showReferral = false,
378
384
  canInvite,
379
385
  onNavigate,
@@ -392,7 +398,7 @@ function AdministrationOverview({
392
398
  {
393
399
  title: "Organization",
394
400
  scopeName: hasOrganization ? organizationName : null,
395
- tabs: ["organizationList", ...hasOrganization ? ["organization", "organizationWorkspaces"] : [], ...showIntegrations ? ["organizationIntegrations"] : []]
401
+ tabs: ["organizationList", ...hasOrganization ? ["organization", "organizationWorkspaces"] : [], ...showIntegrations ? ["organizationIntegrations"] : [], ...showLoginMethods ? ["organizationLoginMethods"] : []]
396
402
  }
397
403
  ];
398
404
  return /* @__PURE__ */ jsx3("div", { className: administration_overview_default.overview, children: groups.map((group) => /* @__PURE__ */ jsxs2("section", { className: administration_overview_default.section, "aria-label": group.scopeName ? `${group.title} \xB7 ${group.scopeName}` : group.title, children: [
@@ -597,8 +603,8 @@ function useWorkspaceOrganization({
597
603
 
598
604
  // src/settings-content.tsx
599
605
  import {
600
- Fragment as Fragment15,
601
- useState as useState25,
606
+ Fragment as Fragment16,
607
+ useState as useState26,
602
608
  useEffect as useEffect20,
603
609
  useRef as useRef12,
604
610
  useCallback as useCallback10,
@@ -610,7 +616,7 @@ import {
610
616
  ScMenuOptions
611
617
  } from "@streamoid/ui";
612
618
  import { ScTextField } from "@streamoid/ui";
613
- import { ScButton as ScButton18 } from "@streamoid/ui";
619
+ import { ScButton as ScButton19 } from "@streamoid/ui";
614
620
  import { ScWorkspaceSwitchCard } from "@streamoid/ui";
615
621
  import {
616
622
  SiconTeam,
@@ -9693,7 +9699,11 @@ function Spinner() {
9693
9699
  }
9694
9700
  );
9695
9701
  }
9696
- function LoadError({ message, onRetry }) {
9702
+ function LoadError({
9703
+ message,
9704
+ onRetry,
9705
+ retryLabel = "Try again"
9706
+ }) {
9697
9707
  return /* @__PURE__ */ jsxs22(
9698
9708
  "div",
9699
9709
  {
@@ -9708,7 +9718,7 @@ function LoadError({ message, onRetry }) {
9708
9718
  },
9709
9719
  children: [
9710
9720
  /* @__PURE__ */ jsx25("p", { style: { margin: 0, fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: message }),
9711
- /* @__PURE__ */ jsx25(ScButton10, { text: "Try again", variant: "outline", size: "sm", onClick: onRetry })
9721
+ /* @__PURE__ */ jsx25(ScButton10, { text: retryLabel, variant: "outline", size: "sm", onClick: onRetry })
9712
9722
  ]
9713
9723
  }
9714
9724
  );
@@ -14406,14 +14416,158 @@ function referralCodeOf(user) {
14406
14416
  function referralLink(code, origin) {
14407
14417
  return code && origin ? `${origin}?referral_code=${encodeURIComponent(code)}` : "";
14408
14418
  }
14419
+ var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
14420
+ function referralSignupDate(iso) {
14421
+ const date = iso ? new Date(iso) : null;
14422
+ if (!date || Number.isNaN(date.valueOf())) return "\u2013";
14423
+ return `${date.getDate()} ${MONTHS[date.getMonth()]} ${date.getFullYear()}`;
14424
+ }
14425
+ function sortReferredUsers(users) {
14426
+ const time = (u) => {
14427
+ const t = new Date(u.createdAt).valueOf();
14428
+ return Number.isNaN(t) ? -Infinity : t;
14429
+ };
14430
+ return [...users].sort((a, b) => time(b) - time(a));
14431
+ }
14432
+ function referralCountLabel(count) {
14433
+ return `${count} ${count === 1 ? "person" : "people"} signed up with your link`;
14434
+ }
14435
+ var MOCK_REFERRED_USERS = [
14436
+ { id: "r1", email: "chris@kepler.com", createdAt: "2025-11-09T10:30:00.000Z" },
14437
+ { id: "r2", email: "maya@northwind.studio", createdAt: "2026-11-24T06:15:00.000Z" },
14438
+ { id: "r3", email: "arjun@lumen.co", createdAt: "2026-03-02T12:00:00.000Z" }
14439
+ ];
14440
+
14441
+ // src/referral-history.tsx
14442
+ import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
14443
+ var TITLE_ID = "settings-referral-history-title";
14444
+ var SKELETON_ROWS = 3;
14445
+ var REFERRAL_HISTORY_EMPTY = "No one has signed up with your link yet. Share it to get started.";
14446
+ var LOAD_FAILED = "Couldn't load your referral history.";
14447
+ function ReferralHistory({
14448
+ load
14449
+ }) {
14450
+ const { value, error, retry } = useLoad(
14451
+ "referred-users",
14452
+ (signal) => load(signal),
14453
+ LOAD_FAILED
14454
+ );
14455
+ return /* @__PURE__ */ jsx32(ReferralHistoryView, { users: value, error, onRetry: retry });
14456
+ }
14457
+ function ReferralHistoryView({ users, error, onRetry }) {
14458
+ let body;
14459
+ if (error) {
14460
+ body = /* @__PURE__ */ jsx32(LoadError, { message: error, onRetry, retryLabel: "Retry" });
14461
+ } else if (!users) {
14462
+ body = /* @__PURE__ */ jsx32(HistorySkeleton, {});
14463
+ } else if (users.length === 0) {
14464
+ body = /* @__PURE__ */ jsx32(Card2, { children: /* @__PURE__ */ jsx32("div", { style: { padding: T15.sp6xl }, children: /* @__PURE__ */ jsx32(Muted, { children: REFERRAL_HISTORY_EMPTY }) }) });
14465
+ } else {
14466
+ body = /* @__PURE__ */ jsx32(HistoryTable, { users: sortReferredUsers(users) });
14467
+ }
14468
+ return /* @__PURE__ */ jsxs29("section", { "aria-labelledby": TITLE_ID, className: "flex flex-col w-full", style: { gap: T15.spXl }, children: [
14469
+ /* @__PURE__ */ jsxs29("div", { className: "flex flex-col", style: { gap: T15.spXs }, children: [
14470
+ /* @__PURE__ */ jsx32(
14471
+ "h2",
14472
+ {
14473
+ id: TITLE_ID,
14474
+ style: {
14475
+ margin: 0,
14476
+ fontFamily: T15.font,
14477
+ fontSize: T15.fsSm,
14478
+ fontWeight: 400,
14479
+ lineHeight: T15.lhSm,
14480
+ color: "var(--alias-text---icons-tertiary)"
14481
+ },
14482
+ children: "Referral History"
14483
+ }
14484
+ ),
14485
+ !error && users && users.length > 0 && /* @__PURE__ */ jsx32(Muted, { children: referralCountLabel(users.length) })
14486
+ ] }),
14487
+ body
14488
+ ] });
14489
+ }
14490
+ function Card2({ children }) {
14491
+ return /* @__PURE__ */ jsx32(
14492
+ "div",
14493
+ {
14494
+ className: "w-full overflow-clip",
14495
+ style: {
14496
+ backgroundColor: T15.surfaceBase,
14497
+ border: `1px solid ${T15.borderSubtle}`,
14498
+ borderRadius: T15.r3xl
14499
+ },
14500
+ children
14501
+ }
14502
+ );
14503
+ }
14504
+ var CELL = { padding: `${T15.spXl} ${T15.sp6xl}`, textAlign: "left" };
14505
+ var HEAD_CELL = {
14506
+ ...CELL,
14507
+ fontFamily: T15.font,
14508
+ fontSize: T15.fsXs,
14509
+ lineHeight: T15.lhXs,
14510
+ fontWeight: 500,
14511
+ color: T15.muted
14512
+ };
14513
+ var BODY_CELL = {
14514
+ ...CELL,
14515
+ fontFamily: T15.font,
14516
+ fontSize: T15.fsSm,
14517
+ lineHeight: T15.lhSm,
14518
+ borderTop: `1px solid ${T15.borderDivider}`
14519
+ };
14520
+ function HistoryTable({ users }) {
14521
+ return /* @__PURE__ */ jsx32(Card2, { children: /* @__PURE__ */ jsxs29("table", { className: "w-full", style: { borderCollapse: "collapse" }, children: [
14522
+ /* @__PURE__ */ jsx32("thead", { children: /* @__PURE__ */ jsxs29("tr", { children: [
14523
+ /* @__PURE__ */ jsx32("th", { scope: "col", style: HEAD_CELL, children: "Email" }),
14524
+ /* @__PURE__ */ jsx32("th", { scope: "col", style: { ...HEAD_CELL, textAlign: "right" }, children: "Signed up" })
14525
+ ] }) }),
14526
+ /* @__PURE__ */ jsx32("tbody", { children: users.map((user) => /* @__PURE__ */ jsxs29("tr", { children: [
14527
+ /* @__PURE__ */ jsx32("td", { style: { ...BODY_CELL, color: T15.primary, wordBreak: "break-all" }, children: user.email }),
14528
+ /* @__PURE__ */ jsx32("td", { style: { ...BODY_CELL, color: T15.muted, textAlign: "right", whiteSpace: "nowrap" }, children: /* @__PURE__ */ jsx32("time", { dateTime: user.createdAt, children: referralSignupDate(user.createdAt) }) })
14529
+ ] }, user.id)) })
14530
+ ] }) });
14531
+ }
14532
+ function Bar({ width }) {
14533
+ return /* @__PURE__ */ jsx32(
14534
+ "div",
14535
+ {
14536
+ className: "animate-pulse",
14537
+ style: {
14538
+ width,
14539
+ height: 12,
14540
+ borderRadius: "var(--radius-full)",
14541
+ backgroundColor: "var(--alias-fill-neutral-neutral)"
14542
+ }
14543
+ }
14544
+ );
14545
+ }
14546
+ function HistorySkeleton() {
14547
+ return /* @__PURE__ */ jsx32("div", { role: "status", "aria-label": "Loading referral history", className: "w-full", children: /* @__PURE__ */ jsx32(Card2, { children: Array.from({ length: SKELETON_ROWS }, (_, i) => /* @__PURE__ */ jsxs29(
14548
+ "div",
14549
+ {
14550
+ className: "flex items-center justify-between",
14551
+ style: {
14552
+ padding: `${T15.spXl} ${T15.sp6xl}`,
14553
+ borderTop: i === 0 ? void 0 : `1px solid ${T15.borderDivider}`
14554
+ },
14555
+ children: [
14556
+ /* @__PURE__ */ jsx32(Bar, { width: 180 }),
14557
+ /* @__PURE__ */ jsx32(Bar, { width: 72 })
14558
+ ]
14559
+ },
14560
+ i
14561
+ )) }) });
14562
+ }
14409
14563
 
14410
14564
  // src/organization-integrations-content.tsx
14411
14565
  import { useState as useState24 } from "react";
14412
14566
  import { ScButton as ScButton17, ScToggleSwitch } from "@streamoid/ui";
14413
- import { Fragment as Fragment14, jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
14567
+ import { Fragment as Fragment14, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
14414
14568
  var COLUMN = { app: "6.5rem", workspace: "9rem", date: "6.5rem", action: "4.75rem" };
14415
14569
  function HeaderRow() {
14416
- const cell = (label, width) => /* @__PURE__ */ jsx32(
14570
+ const cell = (label, width) => /* @__PURE__ */ jsx33(
14417
14571
  "span",
14418
14572
  {
14419
14573
  className: width ? "shrink-0" : "flex-1 min-w-0",
@@ -14431,7 +14585,7 @@ function HeaderRow() {
14431
14585
  children: label
14432
14586
  }
14433
14587
  );
14434
- return /* @__PURE__ */ jsxs29(
14588
+ return /* @__PURE__ */ jsxs30(
14435
14589
  "div",
14436
14590
  {
14437
14591
  className: "flex items-center",
@@ -14442,7 +14596,7 @@ function HeaderRow() {
14442
14596
  cell("Workspace", COLUMN.workspace),
14443
14597
  cell("Connected", COLUMN.date),
14444
14598
  cell("Last used", COLUMN.date),
14445
- /* @__PURE__ */ jsx32("span", { className: "shrink-0", style: { width: COLUMN.action } })
14599
+ /* @__PURE__ */ jsx33("span", { className: "shrink-0", style: { width: COLUMN.action } })
14446
14600
  ]
14447
14601
  }
14448
14602
  );
@@ -14451,7 +14605,7 @@ function ConnectionRow({ app, onRevoke }) {
14451
14605
  const name = app.user?.name?.trim();
14452
14606
  const email = app.user?.email ?? "";
14453
14607
  const active = app.status === "active";
14454
- const text2 = (value, width, color = T15.primary) => /* @__PURE__ */ jsx32(
14608
+ const text2 = (value, width, color = T15.primary) => /* @__PURE__ */ jsx33(
14455
14609
  "span",
14456
14610
  {
14457
14611
  className: "truncate shrink-0",
@@ -14460,7 +14614,7 @@ function ConnectionRow({ app, onRevoke }) {
14460
14614
  children: value
14461
14615
  }
14462
14616
  );
14463
- return /* @__PURE__ */ jsxs29(
14617
+ return /* @__PURE__ */ jsxs30(
14464
14618
  "div",
14465
14619
  {
14466
14620
  className: "flex items-center",
@@ -14471,10 +14625,10 @@ function ConnectionRow({ app, onRevoke }) {
14471
14625
  opacity: active ? 1 : 0.6
14472
14626
  },
14473
14627
  children: [
14474
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center flex-1 min-w-0", style: { minWidth: 200, gap: T15.spMd }, children: [
14475
- /* @__PURE__ */ jsx32(ProfileAvatar, { name: name || email || "Member", size: 32 }),
14476
- /* @__PURE__ */ jsxs29("div", { className: "flex flex-col min-w-0", children: [
14477
- /* @__PURE__ */ jsx32(
14628
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center flex-1 min-w-0", style: { minWidth: 200, gap: T15.spMd }, children: [
14629
+ /* @__PURE__ */ jsx33(ProfileAvatar, { name: name || email || "Member", size: 32 }),
14630
+ /* @__PURE__ */ jsxs30("div", { className: "flex flex-col min-w-0", children: [
14631
+ /* @__PURE__ */ jsx33(
14478
14632
  "span",
14479
14633
  {
14480
14634
  className: "truncate",
@@ -14482,17 +14636,17 @@ function ConnectionRow({ app, onRevoke }) {
14482
14636
  children: name || email || "A member"
14483
14637
  }
14484
14638
  ),
14485
- name && email && /* @__PURE__ */ jsx32("span", { className: "truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: email })
14639
+ name && email && /* @__PURE__ */ jsx33("span", { className: "truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: email })
14486
14640
  ] })
14487
14641
  ] }),
14488
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center shrink-0", style: { width: COLUMN.app, gap: T15.spMd }, children: [
14489
- /* @__PURE__ */ jsx32(AppMark, { name: app.clientName, size: 24 }),
14490
- /* @__PURE__ */ jsx32("span", { className: "truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: app.clientName })
14642
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center shrink-0", style: { width: COLUMN.app, gap: T15.spMd }, children: [
14643
+ /* @__PURE__ */ jsx33(AppMark, { name: app.clientName, size: 24 }),
14644
+ /* @__PURE__ */ jsx33("span", { className: "truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: app.clientName })
14491
14645
  ] }),
14492
14646
  text2(workspaceLabel(app), COLUMN.workspace),
14493
14647
  text2(formatDate2(app.createdAt), COLUMN.date),
14494
14648
  text2(active ? lastUsedLabel(app.lastUsedAt) : "Revoked", COLUMN.date, T15.muted),
14495
- /* @__PURE__ */ jsx32("div", { className: "flex justify-end shrink-0", style: { width: COLUMN.action }, children: active && /* @__PURE__ */ jsx32(
14649
+ /* @__PURE__ */ jsx33("div", { className: "flex justify-end shrink-0", style: { width: COLUMN.action }, children: active && /* @__PURE__ */ jsx33(
14496
14650
  ScButton17,
14497
14651
  {
14498
14652
  text: "Revoke",
@@ -14512,7 +14666,7 @@ function AccessCard({
14512
14666
  activeCount,
14513
14667
  onToggle
14514
14668
  }) {
14515
- return /* @__PURE__ */ jsxs29(
14669
+ return /* @__PURE__ */ jsxs30(
14516
14670
  "section",
14517
14671
  {
14518
14672
  "aria-label": "ChatGPT and Codex access",
@@ -14525,19 +14679,19 @@ function AccessCard({
14525
14679
  borderRadius: T15.r3xl
14526
14680
  },
14527
14681
  children: [
14528
- /* @__PURE__ */ jsx32(AppMark, { name: "ChatGPT and Codex" }),
14529
- /* @__PURE__ */ jsxs29("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.spXs }, children: [
14530
- /* @__PURE__ */ jsx32("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: "ChatGPT & Codex" }),
14531
- /* @__PURE__ */ jsx32(Muted, { children: "Let members use CXO from ChatGPT and Codex. Each member still chooses which workspace an app can reach, and the app gets only that member's permissions there." }),
14532
- enabled === false && activeCount > 0 && /* @__PURE__ */ jsxs29("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: [
14682
+ /* @__PURE__ */ jsx33(AppMark, { name: "ChatGPT and Codex" }),
14683
+ /* @__PURE__ */ jsxs30("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.spXs }, children: [
14684
+ /* @__PURE__ */ jsx33("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: "ChatGPT & Codex" }),
14685
+ /* @__PURE__ */ jsx33(Muted, { children: "Let members use CXO from ChatGPT and Codex. Each member still chooses which workspace an app can reach, and the app gets only that member's permissions there." }),
14686
+ enabled === false && activeCount > 0 && /* @__PURE__ */ jsxs30("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: [
14533
14687
  "Off: the ",
14534
14688
  countLabel(activeCount, "connection"),
14535
14689
  " below can't start new work until you turn this back on."
14536
14690
  ] })
14537
14691
  ] }),
14538
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center shrink-0", style: { alignSelf: "center", gap: T15.spMd, minHeight: 26 }, children: [
14539
- /* @__PURE__ */ jsx32("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: enabled === null ? "" : enabled ? "On" : "Off" }),
14540
- /* @__PURE__ */ jsx32("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ jsx32(
14692
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center shrink-0", style: { alignSelf: "center", gap: T15.spMd, minHeight: 26 }, children: [
14693
+ /* @__PURE__ */ jsx33("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: enabled === null ? "" : enabled ? "On" : "Off" }),
14694
+ /* @__PURE__ */ jsx33("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ jsx33(
14541
14695
  ScToggleSwitch,
14542
14696
  {
14543
14697
  checked: !!enabled,
@@ -14583,7 +14737,7 @@ function OrganizationIntegrationsContent() {
14583
14737
  const [confirmOff, setConfirmOff] = useState24(false);
14584
14738
  const [revoking, setRevoking] = useState24(null);
14585
14739
  if (!canLoad) {
14586
- return /* @__PURE__ */ jsx32("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.sp3xl }, children: /* @__PURE__ */ jsx32(Muted, { children: !supported ? "Integrations aren't available here yet." : "Integrations are managed by organization admins." }) });
14740
+ return /* @__PURE__ */ jsx33("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.sp3xl }, children: /* @__PURE__ */ jsx33(Muted, { children: !supported ? "Integrations aren't available here yet." : "Integrations are managed by organization admins." }) });
14587
14741
  }
14588
14742
  const value = data.value;
14589
14743
  const rows = value ? sortConnections(value.rows) : [];
@@ -14621,8 +14775,8 @@ function OrganizationIntegrationsContent() {
14621
14775
  toast.error(errorMessage(cause, { method: "DELETE" }));
14622
14776
  }
14623
14777
  }
14624
- return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", style: { gap: T15.sp3xl }, children: [
14625
- /* @__PURE__ */ jsx32(
14778
+ return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", style: { gap: T15.sp3xl }, children: [
14779
+ /* @__PURE__ */ jsx33(
14626
14780
  ScopeHeader,
14627
14781
  {
14628
14782
  kind: "organization",
@@ -14632,10 +14786,10 @@ function OrganizationIntegrationsContent() {
14632
14786
  facts: [value && countLabel(activeRows.length, "active connection")]
14633
14787
  }
14634
14788
  ),
14635
- data.error && /* @__PURE__ */ jsx32(LoadError, { message: data.error, onRetry: data.retry }),
14636
- !value && !data.error && /* @__PURE__ */ jsx32(Spinner, {}),
14637
- value && /* @__PURE__ */ jsxs29(Fragment14, { children: [
14638
- /* @__PURE__ */ jsx32(
14789
+ data.error && /* @__PURE__ */ jsx33(LoadError, { message: data.error, onRetry: data.retry }),
14790
+ !value && !data.error && /* @__PURE__ */ jsx33(Spinner, {}),
14791
+ value && /* @__PURE__ */ jsxs30(Fragment14, { children: [
14792
+ /* @__PURE__ */ jsx33(
14639
14793
  AccessCard,
14640
14794
  {
14641
14795
  enabled: value.enabled,
@@ -14644,7 +14798,7 @@ function OrganizationIntegrationsContent() {
14644
14798
  onToggle: (next) => next ? void setAccess(true) : setConfirmOff(true)
14645
14799
  }
14646
14800
  ),
14647
- /* @__PURE__ */ jsx32(
14801
+ /* @__PURE__ */ jsx33(
14648
14802
  MemberListToolbar,
14649
14803
  {
14650
14804
  activeTab: "active",
@@ -14654,7 +14808,7 @@ function OrganizationIntegrationsContent() {
14654
14808
  activeCount: visible.length,
14655
14809
  searchQuery: search,
14656
14810
  onSearchChange: setSearch,
14657
- action: revokedCount > 0 ? /* @__PURE__ */ jsx32(
14811
+ action: revokedCount > 0 ? /* @__PURE__ */ jsx33(
14658
14812
  ScButton17,
14659
14813
  {
14660
14814
  text: showRevoked ? "Hide revoked" : `Show revoked (${revokedCount})`,
@@ -14665,30 +14819,30 @@ function OrganizationIntegrationsContent() {
14665
14819
  ) : void 0
14666
14820
  }
14667
14821
  ),
14668
- /* @__PURE__ */ jsx32(
14822
+ /* @__PURE__ */ jsx33(
14669
14823
  MemberListFrame,
14670
14824
  {
14671
- header: /* @__PURE__ */ jsx32(HeaderRow, {}),
14825
+ header: /* @__PURE__ */ jsx33(HeaderRow, {}),
14672
14826
  isEmpty: visible.length === 0,
14673
14827
  emptyText: q ? "No connections match your search" : value.enabled ? "No one has connected ChatGPT or Codex yet" : "Turn on ChatGPT & Codex to let members connect",
14674
14828
  grow: "fill",
14675
- children: visible.map((app) => /* @__PURE__ */ jsx32(ConnectionRow, { app, onRevoke: () => setRevoking(app) }, app.id))
14829
+ children: visible.map((app) => /* @__PURE__ */ jsx33(ConnectionRow, { app, onRevoke: () => setRevoking(app) }, app.id))
14676
14830
  }
14677
14831
  )
14678
14832
  ] }),
14679
- confirmOff && /* @__PURE__ */ jsx32(
14833
+ confirmOff && /* @__PURE__ */ jsx33(
14680
14834
  ConfirmActionModal,
14681
14835
  {
14682
14836
  title: "Turn off ChatGPT & Codex?",
14683
- body: /* @__PURE__ */ jsxs29(Fragment14, { children: [
14684
- /* @__PURE__ */ jsxs29("span", { children: [
14837
+ body: /* @__PURE__ */ jsxs30(Fragment14, { children: [
14838
+ /* @__PURE__ */ jsxs30("span", { children: [
14685
14839
  "Members of ",
14686
14840
  current?.name || "this organization",
14687
14841
  " won't be able to connect ChatGPT or Codex",
14688
14842
  activeRows.length > 0 ? `, and the ${countLabel(activeRows.length, "existing connection")} will stop working` : "",
14689
14843
  "."
14690
14844
  ] }),
14691
- /* @__PURE__ */ jsxs29("span", { style: { color: T15.muted, fontSize: T15.fsSm, lineHeight: T15.lhSm }, children: [
14845
+ /* @__PURE__ */ jsxs30("span", { style: { color: T15.muted, fontSize: T15.fsSm, lineHeight: T15.lhSm }, children: [
14692
14846
  REVOKE_TIMING,
14693
14847
  " Connections come back when you turn this on again."
14694
14848
  ] })
@@ -14699,20 +14853,20 @@ function OrganizationIntegrationsContent() {
14699
14853
  onConfirm: () => setAccess(false)
14700
14854
  }
14701
14855
  ),
14702
- revoking && /* @__PURE__ */ jsx32(
14856
+ revoking && /* @__PURE__ */ jsx33(
14703
14857
  ConfirmActionModal,
14704
14858
  {
14705
14859
  title: `Revoke ${revoking.clientName}?`,
14706
- body: /* @__PURE__ */ jsxs29(Fragment14, { children: [
14707
- /* @__PURE__ */ jsxs29("span", { children: [
14860
+ body: /* @__PURE__ */ jsxs30(Fragment14, { children: [
14861
+ /* @__PURE__ */ jsxs30("span", { children: [
14708
14862
  revoking.user?.name || revoking.user?.email || "This member",
14709
14863
  "'s ",
14710
14864
  revoking.clientName,
14711
14865
  " will no longer be able to use CXO in ",
14712
- /* @__PURE__ */ jsx32("span", { style: { fontWeight: 600 }, children: workspaceLabel(revoking) }),
14866
+ /* @__PURE__ */ jsx33("span", { style: { fontWeight: 600 }, children: workspaceLabel(revoking) }),
14713
14867
  "."
14714
14868
  ] }),
14715
- /* @__PURE__ */ jsxs29("span", { style: { color: T15.muted, fontSize: T15.fsSm, lineHeight: T15.lhSm }, children: [
14869
+ /* @__PURE__ */ jsxs30("span", { style: { color: T15.muted, fontSize: T15.fsSm, lineHeight: T15.lhSm }, children: [
14716
14870
  REVOKE_TIMING,
14717
14871
  " They can connect again unless you turn access off."
14718
14872
  ] })
@@ -14726,8 +14880,271 @@ function OrganizationIntegrationsContent() {
14726
14880
  ] });
14727
14881
  }
14728
14882
 
14883
+ // src/organization-login-methods-content.tsx
14884
+ import { useState as useState25 } from "react";
14885
+ import { ScButton as ScButton18, ScToggleSwitch as ScToggleSwitch2 } from "@streamoid/ui";
14886
+ import { Fragment as Fragment15, jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
14887
+ var AT_LEAST_ONE_HINT = "At least one login method must stay on, or nobody can sign in.";
14888
+ var NO_SSO_HINT = "Company SSO isn't set up for your organization. Contact Streamoid to set it up.";
14889
+ var SELF_GUARD_HINT = "Sign in once with company SSO before turning email codes off.";
14890
+ var SESSION_NOTE = "People already signed in stay signed in until their session ends (up to 7 days).";
14891
+ function loginMethodsSwitchState(data) {
14892
+ const hasConnection = !!data.connection;
14893
+ let emailHint = null;
14894
+ if (data.emailCode) {
14895
+ if (!hasConnection) emailHint = null;
14896
+ else if (!data.sso) emailHint = AT_LEAST_ONE_HINT;
14897
+ else if (data.constraints.selfLockoutGuard) emailHint = SELF_GUARD_HINT;
14898
+ }
14899
+ const emailLocked = data.emailCode && (!data.constraints.canDisableEmailCode || data.constraints.selfLockoutGuard);
14900
+ let ssoHint = null;
14901
+ if (!hasConnection) ssoHint = NO_SSO_HINT;
14902
+ else if (data.sso && !data.emailCode) ssoHint = AT_LEAST_ONE_HINT;
14903
+ const ssoLocked = !hasConnection || data.sso && !data.emailCode;
14904
+ return {
14905
+ emailCode: { checked: data.emailCode, disabled: emailLocked, hint: emailHint },
14906
+ sso: { checked: data.sso, disabled: ssoLocked, hint: ssoHint }
14907
+ };
14908
+ }
14909
+ var domainsLabel = (domains) => domains.length ? domains.map((d) => `@${d}`).join(" or ") : "your organization's";
14910
+ var memberCsv = (members) => toCsv([["Name", "Email", "Role"], ...members.map((m) => [m.name ?? "", m.email, m.role])]);
14911
+ function SwitchRow({
14912
+ title,
14913
+ description,
14914
+ state,
14915
+ busy,
14916
+ onToggle
14917
+ }) {
14918
+ const disabled = state.disabled || busy;
14919
+ return /* @__PURE__ */ jsxs31("div", { className: "flex items-start w-full", style: { gap: T15.spXl }, children: [
14920
+ /* @__PURE__ */ jsxs31("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.spXs }, children: [
14921
+ /* @__PURE__ */ jsx34("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: title }),
14922
+ /* @__PURE__ */ jsx34(Muted, { children: description }),
14923
+ state.hint && /* @__PURE__ */ jsx34("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: state.hint })
14924
+ ] }),
14925
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-center shrink-0", style: { alignSelf: "center", gap: T15.spMd, minHeight: 26 }, children: [
14926
+ /* @__PURE__ */ jsx34("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: state.checked ? "On" : "Off" }),
14927
+ /* @__PURE__ */ jsx34("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ jsx34(
14928
+ ScToggleSwitch2,
14929
+ {
14930
+ checked: state.checked,
14931
+ disabled,
14932
+ onToggle,
14933
+ role: "switch",
14934
+ "aria-checked": state.checked,
14935
+ "aria-disabled": disabled,
14936
+ "aria-label": title,
14937
+ tabIndex: 0,
14938
+ onKeyDown: (event) => {
14939
+ if ((event.key === " " || event.key === "Enter") && !disabled) {
14940
+ event.preventDefault();
14941
+ onToggle(!state.checked);
14942
+ }
14943
+ }
14944
+ }
14945
+ ) })
14946
+ ] })
14947
+ ] });
14948
+ }
14949
+ function MemberList({ members }) {
14950
+ return /* @__PURE__ */ jsx34(
14951
+ "ul",
14952
+ {
14953
+ "aria-label": "Not signed in with SSO yet",
14954
+ className: "flex flex-col w-full",
14955
+ style: { maxHeight: 240, overflowY: "auto", border: `1px solid ${T15.borderSubtle}`, borderRadius: T15.rXl },
14956
+ children: members.map((m) => /* @__PURE__ */ jsxs31(
14957
+ "li",
14958
+ {
14959
+ className: "flex items-center w-full",
14960
+ style: { gap: T15.spMd, padding: `${T15.spMd} ${T15.spXl}`, borderBottom: `1px solid ${T15.borderSubtle}` },
14961
+ children: [
14962
+ /* @__PURE__ */ jsx34("span", { className: "flex-1 min-w-0 truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: m.name || m.email }),
14963
+ /* @__PURE__ */ jsx34("span", { className: "flex-1 min-w-0 truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: m.email }),
14964
+ /* @__PURE__ */ jsx34("span", { className: "shrink-0", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted, textTransform: "capitalize" }, children: m.role })
14965
+ ]
14966
+ },
14967
+ m.userId
14968
+ ))
14969
+ }
14970
+ );
14971
+ }
14972
+ var card = {
14973
+ gap: T15.spXl,
14974
+ padding: T15.sp3xl,
14975
+ backgroundColor: T15.surfaceBase,
14976
+ border: `1px solid ${T15.borderSubtle}`,
14977
+ borderRadius: T15.r3xl
14978
+ };
14979
+ function OrganizationLoginMethodsContent() {
14980
+ const { loginMethods, organization, toast } = useSettingsAdapters();
14981
+ const current = organization.current;
14982
+ const orgId = current?.id ?? null;
14983
+ const canLoad = !!loginMethods && !!orgId && current?.role === "admin";
14984
+ const data = useLoad(
14985
+ canLoad ? orgId : null,
14986
+ (signal) => loginMethods.get(orgId, signal),
14987
+ "Couldn't load this organization's login methods."
14988
+ );
14989
+ const [saving, setSaving] = useState25(false);
14990
+ const [confirmEmailOff, setConfirmEmailOff] = useState25(false);
14991
+ if (!canLoad) {
14992
+ return /* @__PURE__ */ jsx34("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.sp3xl }, children: /* @__PURE__ */ jsx34(Muted, { children: !loginMethods ? "Login methods aren't available here yet." : "Login methods are managed by organization admins." }) });
14993
+ }
14994
+ const value = data.value;
14995
+ const state = value ? loginMethodsSwitchState(value) : null;
14996
+ const ssoName = value?.connection?.displayName ?? "company";
14997
+ const domains = domainsLabel(value?.coveredDomains ?? []);
14998
+ const notYet = value?.readiness?.notYet ?? [];
14999
+ async function save(next) {
15000
+ if (saving || !value) return;
15001
+ setSaving(true);
15002
+ try {
15003
+ const result = await loginMethods.update(orgId, next);
15004
+ data.setValue(result);
15005
+ toast.success("Login methods updated. Changes apply within a minute.");
15006
+ setConfirmEmailOff(false);
15007
+ } catch (cause) {
15008
+ toast.error(errorMessage(cause, { method: "PUT" }));
15009
+ } finally {
15010
+ setSaving(false);
15011
+ }
15012
+ }
15013
+ async function copyEmails() {
15014
+ try {
15015
+ await navigator.clipboard.writeText(notYet.map((m) => m.email).join("\n"));
15016
+ toast.success(`Copied ${notYet.length} email ${notYet.length === 1 ? "address" : "addresses"}`);
15017
+ } catch {
15018
+ toast.error("Couldn't copy to the clipboard.");
15019
+ }
15020
+ }
15021
+ function downloadCsv() {
15022
+ const blob = new Blob([memberCsv(notYet)], { type: "text/csv;charset=utf-8;" });
15023
+ const url = URL.createObjectURL(blob);
15024
+ const link = document.createElement("a");
15025
+ link.href = url;
15026
+ link.download = `not-signed-in-with-sso-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`;
15027
+ link.click();
15028
+ URL.revokeObjectURL(url);
15029
+ }
15030
+ return /* @__PURE__ */ jsxs31(
15031
+ "div",
15032
+ {
15033
+ className: "flex flex-col flex-1 min-w-0 min-h-0 h-full overflow-y-auto",
15034
+ style: { gap: T15.sp3xl, paddingBottom: T15.sp6xl },
15035
+ children: [
15036
+ /* @__PURE__ */ jsx34(ScopeHeader, { kind: "organization", name: current?.name, imageUrl: current?.imageUrl, role: current?.role }),
15037
+ data.error && /* @__PURE__ */ jsx34(LoadError, { message: data.error, onRetry: data.retry }),
15038
+ !value && !data.error && /* @__PURE__ */ jsx34(Spinner, {}),
15039
+ value && state && /* @__PURE__ */ jsxs31(Fragment15, { children: [
15040
+ value.failOpen && /* @__PURE__ */ jsxs31("div", { role: "alert", className: "flex flex-col w-full", style: { ...card, gap: T15.spXs }, children: [
15041
+ /* @__PURE__ */ jsx34("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, fontWeight: 600, lineHeight: T15.lhSm, color: T15.primary }, children: "Company SSO isn't working right now, so email codes still work." }),
15042
+ /* @__PURE__ */ jsx34(Muted, { children: "Your organization is set to company SSO only. Contact Streamoid to fix the SSO connection." })
15043
+ ] }),
15044
+ /* @__PURE__ */ jsxs31("section", { "aria-label": "Login methods", className: "flex flex-col w-full shrink-0", style: card, children: [
15045
+ /* @__PURE__ */ jsx34(
15046
+ SwitchRow,
15047
+ {
15048
+ title: "Email code",
15049
+ description: `Anyone with an ${domains} address gets a one-time code by email. Google and Microsoft sign-in follow this switch.`,
15050
+ state: state.emailCode,
15051
+ busy: saving,
15052
+ onToggle: (next) => next ? save({ emailCode: true, sso: value.sso }) : setConfirmEmailOff(true)
15053
+ }
15054
+ ),
15055
+ /* @__PURE__ */ jsx34("div", { style: { borderTop: `1px solid ${T15.borderSubtle}` } }),
15056
+ /* @__PURE__ */ jsx34(
15057
+ SwitchRow,
15058
+ {
15059
+ title: "Company SSO",
15060
+ description: `People your IT team has given access sign in through ${ssoName} SSO.`,
15061
+ state: state.sso,
15062
+ busy: saving,
15063
+ onToggle: (next) => save({ emailCode: value.emailCode, sso: next })
15064
+ }
15065
+ )
15066
+ ] }),
15067
+ value.readiness && /* @__PURE__ */ jsxs31("section", { "aria-label": "SSO readiness", className: "flex flex-col w-full shrink-0", style: card, children: [
15068
+ /* @__PURE__ */ jsxs31("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: [
15069
+ value.readiness.signedInWithSso,
15070
+ " of ",
15071
+ value.readiness.affectedTotal,
15072
+ " ",
15073
+ value.readiness.affectedTotal === 1 ? "person" : "people",
15074
+ " at ",
15075
+ domains,
15076
+ " have signed in with SSO.",
15077
+ notYet.length > 0 ? ` ${notYet.length} haven't yet.` : ""
15078
+ ] }),
15079
+ notYet.length > 0 ? /* @__PURE__ */ jsxs31(Fragment15, { children: [
15080
+ /* @__PURE__ */ jsxs31(Muted, { children: [
15081
+ "Send this list to your IT team to give them access to ",
15082
+ ssoName,
15083
+ " SSO. When it's empty, it's safe to turn email codes off."
15084
+ ] }),
15085
+ /* @__PURE__ */ jsx34(MemberList, { members: notYet }),
15086
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-center", style: { gap: T15.spMd }, children: [
15087
+ /* @__PURE__ */ jsx34(ScButton18, { text: "Copy emails", variant: "outline", size: "sm", onClick: copyEmails }),
15088
+ /* @__PURE__ */ jsx34(ScButton18, { text: "Download CSV", variant: "outline", size: "sm", onClick: downloadCsv })
15089
+ ] })
15090
+ ] }) : /* @__PURE__ */ jsx34(Muted, { children: "Everyone has signed in with SSO at least once." }),
15091
+ value.readiness.notAffected > 0 && /* @__PURE__ */ jsxs31(Muted, { children: [
15092
+ value.readiness.notAffected,
15093
+ " ",
15094
+ value.readiness.notAffected === 1 ? "member uses" : "members use",
15095
+ " an address on another domain and ",
15096
+ value.readiness.notAffected === 1 ? "isn't" : "aren't",
15097
+ " affected by these switches."
15098
+ ] })
15099
+ ] }),
15100
+ /* @__PURE__ */ jsxs31("div", { className: "flex flex-col", style: { gap: T15.spXs }, children: [
15101
+ /* @__PURE__ */ jsxs31(Muted, { children: [
15102
+ "Changes apply within a minute. ",
15103
+ SESSION_NOTE
15104
+ ] }),
15105
+ /* @__PURE__ */ jsx34(Muted, { children: value.source === "org" && value.updatedAt ? `Last changed${value.updatedBy?.email ? ` by ${value.updatedBy.email}` : ""} on ${formatDate2(value.updatedAt)}.` : "Using Streamoid's default for your organization. Nobody has changed it yet." })
15106
+ ] }),
15107
+ confirmEmailOff && /* @__PURE__ */ jsx34(
15108
+ ConfirmActionModal,
15109
+ {
15110
+ title: "Turn off email codes?",
15111
+ body: /* @__PURE__ */ jsxs31("div", { className: "flex flex-col", style: { gap: T15.spMd }, children: [
15112
+ notYet.length > 0 ? /* @__PURE__ */ jsxs31(Fragment15, { children: [
15113
+ /* @__PURE__ */ jsxs31("span", { children: [
15114
+ "These ",
15115
+ notYet.length,
15116
+ " ",
15117
+ notYet.length === 1 ? "person has" : "people have",
15118
+ " never signed in with",
15119
+ " ",
15120
+ ssoName,
15121
+ " SSO and will be locked out until IT gives them access:"
15122
+ ] }),
15123
+ /* @__PURE__ */ jsx34(MemberList, { members: notYet }),
15124
+ /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ScButton18, { text: "Copy emails", variant: "outline", size: "sm", onClick: copyEmails }) })
15125
+ ] }) : /* @__PURE__ */ jsxs31("span", { children: [
15126
+ "Everyone at ",
15127
+ domains,
15128
+ " will have to sign in with ",
15129
+ ssoName,
15130
+ " SSO. Google and Microsoft sign-in turn off too."
15131
+ ] }),
15132
+ /* @__PURE__ */ jsx34("span", { children: SESSION_NOTE })
15133
+ ] }),
15134
+ confirmText: "Turn off email codes",
15135
+ busyText: "Turning off\u2026",
15136
+ onClose: () => setConfirmEmailOff(false),
15137
+ onConfirm: () => save({ emailCode: false, sso: value.sso })
15138
+ }
15139
+ )
15140
+ ] })
15141
+ ]
15142
+ }
15143
+ );
15144
+ }
15145
+
14729
15146
  // src/settings-content.tsx
14730
- import { Fragment as Fragment16, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
15147
+ import { Fragment as Fragment17, jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
14731
15148
  function deriveInitials(name) {
14732
15149
  return name.split(/\s+/).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("") || "WS";
14733
15150
  }
@@ -14763,7 +15180,7 @@ function SettingsNavItem({
14763
15180
  onTabChange
14764
15181
  }) {
14765
15182
  const isActive = activeTab === tab;
14766
- return /* @__PURE__ */ jsx33(SettingsTooltip, { content: TAB_DESCRIPTIONS[tab], placement: "right", children: /* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33(
15183
+ return /* @__PURE__ */ jsx35(SettingsTooltip, { content: TAB_DESCRIPTIONS[tab], placement: "right", children: /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
14767
15184
  ScSidebarMenu,
14768
15185
  {
14769
15186
  icon: icon(isActive ? PRIMARY_COLOR3 : MUTED_COLOR2),
@@ -14793,9 +15210,10 @@ function SettingsNav({
14793
15210
  isWorkspaceAdmin,
14794
15211
  showConnectedApps = false,
14795
15212
  showIntegrations = false,
15213
+ showLoginMethods = false,
14796
15214
  showReferral = false
14797
15215
  }) {
14798
- const item = (tab, icon) => /* @__PURE__ */ jsx33(
15216
+ const item = (tab, icon) => /* @__PURE__ */ jsx35(
14799
15217
  SettingsNavItem,
14800
15218
  {
14801
15219
  tab,
@@ -14805,7 +15223,7 @@ function SettingsNav({
14805
15223
  onTabChange
14806
15224
  }
14807
15225
  );
14808
- return /* @__PURE__ */ jsxs30(
15226
+ return /* @__PURE__ */ jsxs32(
14809
15227
  "div",
14810
15228
  {
14811
15229
  className: "flex flex-col items-start shrink-0 relative overflow-y-auto",
@@ -14828,43 +15246,44 @@ function SettingsNav({
14828
15246
  gap: "var(--spacing-5xl)"
14829
15247
  },
14830
15248
  children: [
14831
- /* @__PURE__ */ jsxs30("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
14832
- /* @__PURE__ */ jsx33("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Account" }),
14833
- item("profile", (color) => /* @__PURE__ */ jsx33(SiconUser, { className: "w-5 h-5", color })),
14834
- item("workspaceList", (color) => /* @__PURE__ */ jsx33(SiconSwitch, { className: "w-5 h-5", color })),
14835
- showConnectedApps && item("connectedApps", (color) => /* @__PURE__ */ jsx33(SiconPlug_default, { className: "w-5 h-5", color })),
14836
- showReferral && item("referral", (color) => /* @__PURE__ */ jsx33(SiconReferral, { className: "w-5 h-5", color }))
15249
+ /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
15250
+ /* @__PURE__ */ jsx35("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Account" }),
15251
+ item("profile", (color) => /* @__PURE__ */ jsx35(SiconUser, { className: "w-5 h-5", color })),
15252
+ item("workspaceList", (color) => /* @__PURE__ */ jsx35(SiconSwitch, { className: "w-5 h-5", color })),
15253
+ showConnectedApps && item("connectedApps", (color) => /* @__PURE__ */ jsx35(SiconPlug_default, { className: "w-5 h-5", color })),
15254
+ showReferral && item("referral", (color) => /* @__PURE__ */ jsx35(SiconReferral, { className: "w-5 h-5", color }))
14837
15255
  ] }),
14838
- /* @__PURE__ */ jsx33(ScHDivider, {}),
14839
- /* @__PURE__ */ jsxs30("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
14840
- /* @__PURE__ */ jsx33("div", { title: workspaceName ?? void 0, style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Workspace" }),
14841
- item("workspace", (color) => /* @__PURE__ */ jsx33(SiconSettings2, { className: "w-5 h-5", color })),
14842
- item("workspaceMembers", (color) => /* @__PURE__ */ jsx33(SiconTeam, { className: "w-5 h-5", color })),
14843
- isWorkspaceAdmin && /* @__PURE__ */ jsxs30(Fragment16, { children: [
14844
- item("billing", (color) => /* @__PURE__ */ jsx33(SiconBilling, { className: "w-5 h-5", color })),
14845
- item("apikey", (color) => /* @__PURE__ */ jsx33(SiconKey_default, { className: "w-5 h-5", color }))
15256
+ /* @__PURE__ */ jsx35(ScHDivider, {}),
15257
+ /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
15258
+ /* @__PURE__ */ jsx35("div", { title: workspaceName ?? void 0, style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Workspace" }),
15259
+ item("workspace", (color) => /* @__PURE__ */ jsx35(SiconSettings2, { className: "w-5 h-5", color })),
15260
+ item("workspaceMembers", (color) => /* @__PURE__ */ jsx35(SiconTeam, { className: "w-5 h-5", color })),
15261
+ isWorkspaceAdmin && /* @__PURE__ */ jsxs32(Fragment17, { children: [
15262
+ item("billing", (color) => /* @__PURE__ */ jsx35(SiconBilling, { className: "w-5 h-5", color })),
15263
+ item("apikey", (color) => /* @__PURE__ */ jsx35(SiconKey_default, { className: "w-5 h-5", color }))
14846
15264
  ] }),
14847
- !isWorkspaceAdmin && /* @__PURE__ */ jsx33("p", { style: { margin: "4px 12px", fontSize: 12, lineHeight: "18px", color: MUTED_COLOR2 }, children: "Contact your workspace admin for credit top-ups and billing history." })
15265
+ !isWorkspaceAdmin && /* @__PURE__ */ jsx35("p", { style: { margin: "4px 12px", fontSize: 12, lineHeight: "18px", color: MUTED_COLOR2 }, children: "Contact your workspace admin for credit top-ups and billing history." })
14848
15266
  ] }),
14849
- /* @__PURE__ */ jsx33(ScHDivider, {}),
14850
- /* @__PURE__ */ jsx33("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: hasOrganization ? /* @__PURE__ */ jsxs30(Fragment16, { children: [
14851
- /* @__PURE__ */ jsx33("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Organization" }),
14852
- item("organizationList", (color) => /* @__PURE__ */ jsx33(SiconSwitch, { className: "w-5 h-5", color })),
14853
- item("organization", (color) => /* @__PURE__ */ jsx33(SiconTeam, { className: "w-5 h-5", color })),
14854
- item("organizationWorkspaces", (color) => /* @__PURE__ */ jsx33(SiconWorkspace2, { className: "w-5 h-5", color })),
14855
- showIntegrations && item("organizationIntegrations", (color) => /* @__PURE__ */ jsx33(SiconPlug_default, { className: "w-5 h-5", color }))
14856
- ] }) : /* @__PURE__ */ jsxs30(Fragment16, { children: [
14857
- /* @__PURE__ */ jsx33(
15267
+ /* @__PURE__ */ jsx35(ScHDivider, {}),
15268
+ /* @__PURE__ */ jsx35("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: hasOrganization ? /* @__PURE__ */ jsxs32(Fragment17, { children: [
15269
+ /* @__PURE__ */ jsx35("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Organization" }),
15270
+ item("organizationList", (color) => /* @__PURE__ */ jsx35(SiconSwitch, { className: "w-5 h-5", color })),
15271
+ item("organization", (color) => /* @__PURE__ */ jsx35(SiconTeam, { className: "w-5 h-5", color })),
15272
+ item("organizationWorkspaces", (color) => /* @__PURE__ */ jsx35(SiconWorkspace2, { className: "w-5 h-5", color })),
15273
+ showIntegrations && item("organizationIntegrations", (color) => /* @__PURE__ */ jsx35(SiconPlug_default, { className: "w-5 h-5", color })),
15274
+ showLoginMethods && item("organizationLoginMethods", (color) => /* @__PURE__ */ jsx35(SiconLock, { className: "w-5 h-5", color }))
15275
+ ] }) : /* @__PURE__ */ jsxs32(Fragment17, { children: [
15276
+ /* @__PURE__ */ jsx35(
14858
15277
  SettingsNavItem,
14859
15278
  {
14860
15279
  tab: "organization",
14861
15280
  label: "Organization",
14862
- icon: (color) => /* @__PURE__ */ jsx33(SiconGlobe3, { className: "w-5 h-5", color }),
15281
+ icon: (color) => /* @__PURE__ */ jsx35(SiconGlobe3, { className: "w-5 h-5", color }),
14863
15282
  activeTab,
14864
15283
  onTabChange
14865
15284
  }
14866
15285
  ),
14867
- item("organizationList", (color) => /* @__PURE__ */ jsx33(SiconSwitch, { className: "w-5 h-5", color }))
15286
+ item("organizationList", (color) => /* @__PURE__ */ jsx35(SiconSwitch, { className: "w-5 h-5", color }))
14868
15287
  ] }) })
14869
15288
  ]
14870
15289
  }
@@ -14873,7 +15292,7 @@ function SettingsNav({
14873
15292
  var SPECIALIZATION_ICON_SIZE = 24;
14874
15293
  function SpecializationIcon({ iconUrl }) {
14875
15294
  if (iconUrl) {
14876
- return /* @__PURE__ */ jsx33(
15295
+ return /* @__PURE__ */ jsx35(
14877
15296
  "img",
14878
15297
  {
14879
15298
  src: iconUrl,
@@ -14886,7 +15305,7 @@ function SpecializationIcon({ iconUrl }) {
14886
15305
  }
14887
15306
  );
14888
15307
  }
14889
- return /* @__PURE__ */ jsx33(
15308
+ return /* @__PURE__ */ jsx35(
14890
15309
  SiconBolt,
14891
15310
  {
14892
15311
  style: {
@@ -14918,9 +15337,9 @@ function SpecializationDropdown({
14918
15337
  disabled
14919
15338
  }) {
14920
15339
  const { auth } = useSettingsAdapters();
14921
- const [open, setOpen] = useState25(false);
15340
+ const [open, setOpen] = useState26(false);
14922
15341
  const containerRef = useRef12(null);
14923
- const [options, setOptions] = useState25([]);
15342
+ const [options, setOptions] = useState26([]);
14924
15343
  useEffect20(() => {
14925
15344
  if (!auth.getSpecializations) return;
14926
15345
  let cancelled = false;
@@ -14959,15 +15378,15 @@ function SpecializationDropdown({
14959
15378
  };
14960
15379
  }, [open]);
14961
15380
  const selected = options.find((o) => o.id === value);
14962
- return /* @__PURE__ */ jsxs30(
15381
+ return /* @__PURE__ */ jsxs32(
14963
15382
  "div",
14964
15383
  {
14965
15384
  ref: containerRef,
14966
15385
  className: "w-full",
14967
15386
  style: { position: "relative" },
14968
15387
  children: [
14969
- /* @__PURE__ */ jsx33("style", { children: DROPDOWN_TRIGGER_STYLES }),
14970
- /* @__PURE__ */ jsx33(
15388
+ /* @__PURE__ */ jsx35("style", { children: DROPDOWN_TRIGGER_STYLES }),
15389
+ /* @__PURE__ */ jsx35(
14971
15390
  "div",
14972
15391
  {
14973
15392
  className: "spec-dropdown-trigger",
@@ -14975,7 +15394,7 @@ function SpecializationDropdown({
14975
15394
  onClick: () => !disabled && setOpen((v) => !v),
14976
15395
  "aria-haspopup": "listbox",
14977
15396
  "aria-expanded": open,
14978
- children: /* @__PURE__ */ jsx33(
15397
+ children: /* @__PURE__ */ jsx35(
14979
15398
  ScTextField,
14980
15399
  {
14981
15400
  label: "Specialization",
@@ -14983,8 +15402,8 @@ function SpecializationDropdown({
14983
15402
  value: selected?.label ?? "",
14984
15403
  placeholderFilled: "Select specialization",
14985
15404
  tfGroup: "icon-left-right",
14986
- tfLeftIcon: /* @__PURE__ */ jsx33(SpecializationIcon, { iconUrl: selected?.iconUrl }),
14987
- tfRightIcon: /* @__PURE__ */ jsx33(
15405
+ tfLeftIcon: /* @__PURE__ */ jsx35(SpecializationIcon, { iconUrl: selected?.iconUrl }),
15406
+ tfRightIcon: /* @__PURE__ */ jsx35(
14988
15407
  "span",
14989
15408
  {
14990
15409
  style: {
@@ -14994,7 +15413,7 @@ function SpecializationDropdown({
14994
15413
  transform: open ? "rotate(180deg)" : "none",
14995
15414
  transition: "transform 120ms ease-out"
14996
15415
  },
14997
- children: /* @__PURE__ */ jsx33(SiconDown2, {})
15416
+ children: /* @__PURE__ */ jsx35(SiconDown2, {})
14998
15417
  }
14999
15418
  ),
15000
15419
  className: "sc-text-field-full-width",
@@ -15005,7 +15424,7 @@ function SpecializationDropdown({
15005
15424
  )
15006
15425
  }
15007
15426
  ),
15008
- open && /* @__PURE__ */ jsx33(
15427
+ open && /* @__PURE__ */ jsx35(
15009
15428
  "div",
15010
15429
  {
15011
15430
  role: "listbox",
@@ -15027,11 +15446,11 @@ function SpecializationDropdown({
15027
15446
  },
15028
15447
  children: options.map((opt) => {
15029
15448
  const isActive = opt.id === value;
15030
- return /* @__PURE__ */ jsx33(
15449
+ return /* @__PURE__ */ jsx35(
15031
15450
  ScMenuOptions,
15032
15451
  {
15033
15452
  text: opt.label,
15034
- icon: /* @__PURE__ */ jsx33(SpecializationIcon, { iconUrl: opt.iconUrl }),
15453
+ icon: /* @__PURE__ */ jsx35(SpecializationIcon, { iconUrl: opt.iconUrl }),
15035
15454
  hover: isActive ? "true" : "false",
15036
15455
  variant: "default",
15037
15456
  role: "option",
@@ -15056,7 +15475,7 @@ function LanguageDropdown({
15056
15475
  onChange,
15057
15476
  disabled
15058
15477
  }) {
15059
- const [open, setOpen] = useState25(false);
15478
+ const [open, setOpen] = useState26(false);
15060
15479
  const containerRef = useRef12(null);
15061
15480
  useEffect20(() => {
15062
15481
  if (!open) return;
@@ -15075,15 +15494,15 @@ function LanguageDropdown({
15075
15494
  document.removeEventListener("keydown", handleKeyDown);
15076
15495
  };
15077
15496
  }, [open]);
15078
- return /* @__PURE__ */ jsxs30(
15497
+ return /* @__PURE__ */ jsxs32(
15079
15498
  "div",
15080
15499
  {
15081
15500
  ref: containerRef,
15082
15501
  className: "w-full",
15083
15502
  style: { position: "relative" },
15084
15503
  children: [
15085
- /* @__PURE__ */ jsx33("style", { children: DROPDOWN_TRIGGER_STYLES }),
15086
- /* @__PURE__ */ jsx33(
15504
+ /* @__PURE__ */ jsx35("style", { children: DROPDOWN_TRIGGER_STYLES }),
15505
+ /* @__PURE__ */ jsx35(
15087
15506
  "div",
15088
15507
  {
15089
15508
  className: "spec-dropdown-trigger",
@@ -15091,7 +15510,7 @@ function LanguageDropdown({
15091
15510
  onClick: () => !disabled && setOpen((v) => !v),
15092
15511
  "aria-haspopup": "listbox",
15093
15512
  "aria-expanded": open,
15094
- children: /* @__PURE__ */ jsx33(
15513
+ children: /* @__PURE__ */ jsx35(
15095
15514
  ScTextField,
15096
15515
  {
15097
15516
  label: "Language",
@@ -15099,7 +15518,7 @@ function LanguageDropdown({
15099
15518
  value: userLanguageLabel(value),
15100
15519
  placeholderFilled: "Select language",
15101
15520
  tfGroup: "icon-right",
15102
- tfRightIcon: /* @__PURE__ */ jsx33(
15521
+ tfRightIcon: /* @__PURE__ */ jsx35(
15103
15522
  "span",
15104
15523
  {
15105
15524
  style: {
@@ -15109,7 +15528,7 @@ function LanguageDropdown({
15109
15528
  transform: open ? "rotate(180deg)" : "none",
15110
15529
  transition: "transform 120ms ease-out"
15111
15530
  },
15112
- children: /* @__PURE__ */ jsx33(SiconDown2, {})
15531
+ children: /* @__PURE__ */ jsx35(SiconDown2, {})
15113
15532
  }
15114
15533
  ),
15115
15534
  className: "sc-text-field-full-width",
@@ -15120,7 +15539,7 @@ function LanguageDropdown({
15120
15539
  )
15121
15540
  }
15122
15541
  ),
15123
- open && /* @__PURE__ */ jsx33(
15542
+ open && /* @__PURE__ */ jsx35(
15124
15543
  "div",
15125
15544
  {
15126
15545
  role: "listbox",
@@ -15146,11 +15565,11 @@ function LanguageDropdown({
15146
15565
  },
15147
15566
  children: USER_LANGUAGES.map((lang) => {
15148
15567
  const isActive = lang.code === value;
15149
- return /* @__PURE__ */ jsx33(
15568
+ return /* @__PURE__ */ jsx35(
15150
15569
  ScMenuOptions,
15151
15570
  {
15152
15571
  text: lang.label,
15153
- icon: /* @__PURE__ */ jsx33(Fragment16, {}),
15572
+ icon: /* @__PURE__ */ jsx35(Fragment17, {}),
15154
15573
  hover: isActive ? "true" : "false",
15155
15574
  variant: "default",
15156
15575
  role: "option",
@@ -15176,12 +15595,12 @@ function ProfileTab() {
15176
15595
  const derivedName = user?.name ?? "";
15177
15596
  const derivedSpec = user?.userSpecialization ?? "";
15178
15597
  const derivedLanguage = user?.language?.trim() || DEFAULT_USER_LANGUAGE;
15179
- const [fullName, setFullName] = useState25(derivedName);
15180
- const [selectedSpec, setSelectedSpec] = useState25(derivedSpec);
15181
- const [selectedLanguage, setSelectedLanguage] = useState25(derivedLanguage);
15182
- const [saving, setSaving] = useState25(false);
15183
- const [imageSaving, setImageSaving] = useState25(false);
15184
- const [imagePreview, setImagePreview] = useState25(
15598
+ const [fullName, setFullName] = useState26(derivedName);
15599
+ const [selectedSpec, setSelectedSpec] = useState26(derivedSpec);
15600
+ const [selectedLanguage, setSelectedLanguage] = useState26(derivedLanguage);
15601
+ const [saving, setSaving] = useState26(false);
15602
+ const [imageSaving, setImageSaving] = useState26(false);
15603
+ const [imagePreview, setImagePreview] = useState26(
15185
15604
  void 0
15186
15605
  );
15187
15606
  const fileInputRef = useRef12(null);
@@ -15279,13 +15698,13 @@ function ProfileTab() {
15279
15698
  }
15280
15699
  auth.clearAuth();
15281
15700
  };
15282
- return /* @__PURE__ */ jsxs30(
15701
+ return /* @__PURE__ */ jsxs32(
15283
15702
  "div",
15284
15703
  {
15285
15704
  className: "flex flex-col items-start flex-1 min-w-0 min-h-0 overflow-y-auto",
15286
15705
  style: { gap: "var(--spacing-3xl)" },
15287
15706
  children: [
15288
- /* @__PURE__ */ jsxs30(
15707
+ /* @__PURE__ */ jsxs32(
15289
15708
  "div",
15290
15709
  {
15291
15710
  className: "sc-profile-card flex flex-col items-start w-full",
@@ -15298,13 +15717,13 @@ function ProfileTab() {
15298
15717
  gap: "var(--spacing-6xl)"
15299
15718
  },
15300
15719
  children: [
15301
- /* @__PURE__ */ jsxs30(
15720
+ /* @__PURE__ */ jsxs32(
15302
15721
  "div",
15303
15722
  {
15304
15723
  className: "flex items-center shrink-0 w-full",
15305
15724
  style: { gap: 24, flexWrap: "wrap" },
15306
15725
  children: [
15307
- profileImage ? /* @__PURE__ */ jsx33(
15726
+ profileImage ? /* @__PURE__ */ jsx35(
15308
15727
  "img",
15309
15728
  {
15310
15729
  src: profileImage,
@@ -15317,7 +15736,7 @@ function ProfileTab() {
15317
15736
  flexShrink: 0
15318
15737
  }
15319
15738
  }
15320
- ) : /* @__PURE__ */ jsx33(
15739
+ ) : /* @__PURE__ */ jsx35(
15321
15740
  "div",
15322
15741
  {
15323
15742
  "aria-label": "Profile",
@@ -15330,7 +15749,7 @@ function ProfileTab() {
15330
15749
  border: "1px solid var(--alias-border-subtle)",
15331
15750
  flexShrink: 0
15332
15751
  },
15333
- children: /* @__PURE__ */ jsx33(
15752
+ children: /* @__PURE__ */ jsx35(
15334
15753
  "span",
15335
15754
  {
15336
15755
  style: {
@@ -15345,7 +15764,7 @@ function ProfileTab() {
15345
15764
  )
15346
15765
  }
15347
15766
  ),
15348
- /* @__PURE__ */ jsx33(
15767
+ /* @__PURE__ */ jsx35(
15349
15768
  "input",
15350
15769
  {
15351
15770
  ref: fileInputRef,
@@ -15355,17 +15774,17 @@ function ProfileTab() {
15355
15774
  onChange: handleImageChange
15356
15775
  }
15357
15776
  ),
15358
- /* @__PURE__ */ jsxs30(
15777
+ /* @__PURE__ */ jsxs32(
15359
15778
  "div",
15360
15779
  {
15361
15780
  className: "flex items-center",
15362
15781
  style: { gap: 12, flexWrap: "wrap" },
15363
15782
  children: [
15364
- /* @__PURE__ */ jsx33(
15365
- ScButton18,
15783
+ /* @__PURE__ */ jsx35(
15784
+ ScButton19,
15366
15785
  {
15367
15786
  text: "Upload photo",
15368
- icon: /* @__PURE__ */ jsx33(SiconUpload2, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
15787
+ icon: /* @__PURE__ */ jsx35(SiconUpload2, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
15369
15788
  styleVariant: "icon-left",
15370
15789
  variant: "outline",
15371
15790
  size: "md",
@@ -15373,11 +15792,11 @@ function ProfileTab() {
15373
15792
  onClick: handleUploadClick
15374
15793
  }
15375
15794
  ),
15376
- /* @__PURE__ */ jsx33(
15377
- ScButton18,
15795
+ /* @__PURE__ */ jsx35(
15796
+ ScButton19,
15378
15797
  {
15379
15798
  text: "Remove photo",
15380
- icon: /* @__PURE__ */ jsx33(
15799
+ icon: /* @__PURE__ */ jsx35(
15381
15800
  SiconDelete,
15382
15801
  {
15383
15802
  className: "w-5 h-5",
@@ -15397,15 +15816,15 @@ function ProfileTab() {
15397
15816
  ]
15398
15817
  }
15399
15818
  ),
15400
- /* @__PURE__ */ jsx33(ScHDivider, {}),
15401
- /* @__PURE__ */ jsxs30(
15819
+ /* @__PURE__ */ jsx35(ScHDivider, {}),
15820
+ /* @__PURE__ */ jsxs32(
15402
15821
  "div",
15403
15822
  {
15404
15823
  className: "sc-profile-fields flex flex-col min-w-0 w-full",
15405
15824
  style: { gap: 24 },
15406
15825
  children: [
15407
- /* @__PURE__ */ jsxs30("div", { style: { display: "grid", width: "100%", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 240px), 1fr))", gap: 24 }, children: [
15408
- /* @__PURE__ */ jsx33("div", { className: "flex-1 min-w-0", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx33(
15826
+ /* @__PURE__ */ jsxs32("div", { style: { display: "grid", width: "100%", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 240px), 1fr))", gap: 24 }, children: [
15827
+ /* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx35(
15409
15828
  ScTextField,
15410
15829
  {
15411
15830
  label: "Full Name",
@@ -15419,7 +15838,7 @@ function ProfileTab() {
15419
15838
  onChange: (e) => setFullName(e.target.value)
15420
15839
  }
15421
15840
  ) }),
15422
- /* @__PURE__ */ jsx33("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx33(
15841
+ /* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx35(
15423
15842
  SpecializationDropdown,
15424
15843
  {
15425
15844
  value: selectedSpec,
@@ -15428,8 +15847,8 @@ function ProfileTab() {
15428
15847
  }
15429
15848
  ) })
15430
15849
  ] }),
15431
- /* @__PURE__ */ jsxs30("div", { className: "flex items-start w-full", style: { gap: "var(--spacing-3xl)" }, children: [
15432
- /* @__PURE__ */ jsx33("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx33(
15850
+ /* @__PURE__ */ jsxs32("div", { className: "flex items-start w-full", style: { gap: "var(--spacing-3xl)" }, children: [
15851
+ /* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx35(
15433
15852
  LanguageDropdown,
15434
15853
  {
15435
15854
  value: selectedLanguage,
@@ -15437,9 +15856,9 @@ function ProfileTab() {
15437
15856
  disabled: disableAllActions
15438
15857
  }
15439
15858
  ) }),
15440
- /* @__PURE__ */ jsx33("div", { className: "flex-1 min-w-0" })
15859
+ /* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0" })
15441
15860
  ] }),
15442
- /* @__PURE__ */ jsx33("div", { className: "w-full", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx33(
15861
+ /* @__PURE__ */ jsx35("div", { className: "w-full", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx35(
15443
15862
  ScTextField,
15444
15863
  {
15445
15864
  label: "Email ID",
@@ -15448,7 +15867,7 @@ function ProfileTab() {
15448
15867
  value: user?.email ?? "",
15449
15868
  placeholderFilled: user?.email ?? "chris@kepler.com",
15450
15869
  tfGroup: "icon-right",
15451
- tfRightIcon: /* @__PURE__ */ jsx33(
15870
+ tfRightIcon: /* @__PURE__ */ jsx35(
15452
15871
  SiconLock,
15453
15872
  {
15454
15873
  className: "w-6 h-6",
@@ -15460,13 +15879,13 @@ function ProfileTab() {
15460
15879
  readOnly: true
15461
15880
  }
15462
15881
  ) }),
15463
- /* @__PURE__ */ jsx33(
15882
+ /* @__PURE__ */ jsx35(
15464
15883
  "div",
15465
15884
  {
15466
15885
  className: "flex items-center w-full",
15467
15886
  style: { justifyContent: "flex-end", paddingTop: "var(--spacing-md)" },
15468
- children: /* @__PURE__ */ jsx33(
15469
- ScButton18,
15887
+ children: /* @__PURE__ */ jsx35(
15888
+ ScButton19,
15470
15889
  {
15471
15890
  text: saving ? "Saving..." : "Save changes",
15472
15891
  variant: "secondary",
@@ -15483,7 +15902,7 @@ function ProfileTab() {
15483
15902
  ]
15484
15903
  }
15485
15904
  ),
15486
- /* @__PURE__ */ jsxs30(
15905
+ /* @__PURE__ */ jsxs32(
15487
15906
  "div",
15488
15907
  {
15489
15908
  className: "flex items-center w-full",
@@ -15495,8 +15914,8 @@ function ProfileTab() {
15495
15914
  gap: "var(--spacing-3xl)"
15496
15915
  },
15497
15916
  children: [
15498
- /* @__PURE__ */ jsxs30("div", { className: "flex flex-col min-w-0 flex-1", style: { gap: "var(--spacing-xs)" }, children: [
15499
- /* @__PURE__ */ jsx33(
15917
+ /* @__PURE__ */ jsxs32("div", { className: "flex flex-col min-w-0 flex-1", style: { gap: "var(--spacing-xs)" }, children: [
15918
+ /* @__PURE__ */ jsx35(
15500
15919
  "span",
15501
15920
  {
15502
15921
  style: {
@@ -15509,7 +15928,7 @@ function ProfileTab() {
15509
15928
  children: "Session"
15510
15929
  }
15511
15930
  ),
15512
- /* @__PURE__ */ jsx33(
15931
+ /* @__PURE__ */ jsx35(
15513
15932
  "span",
15514
15933
  {
15515
15934
  className: "truncate",
@@ -15524,8 +15943,8 @@ function ProfileTab() {
15524
15943
  }
15525
15944
  )
15526
15945
  ] }),
15527
- /* @__PURE__ */ jsx33(
15528
- ScButton18,
15946
+ /* @__PURE__ */ jsx35(
15947
+ ScButton19,
15529
15948
  {
15530
15949
  text: "Log out",
15531
15950
  variant: "outline",
@@ -15588,9 +16007,9 @@ function WorkspaceListTab({
15588
16007
  const currentOrganization = organizations.find(
15589
16008
  (org) => org._id && org._id === currentWorkspace?.organizationId
15590
16009
  );
15591
- const [page, setPage] = useState25(0);
15592
- const [serverPage, setServerPage] = useState25(null);
15593
- const [serverFailed, setServerFailed] = useState25(false);
16010
+ const [page, setPage] = useState26(0);
16011
+ const [serverPage, setServerPage] = useState26(null);
16012
+ const [serverFailed, setServerFailed] = useState26(false);
15594
16013
  const serverMode = !!listPage && !serverFailed;
15595
16014
  useEffect20(() => {
15596
16015
  if (!listPage || serverFailed) return;
@@ -15633,7 +16052,7 @@ function WorkspaceListTab({
15633
16052
  const pageRows = serverMode ? (serverPage?.items ?? []).map((ws) => ({ ws, group: serverGroupOf(ws) })) : rows.slice(pageStart, pageStart + pageSize);
15634
16053
  const pageWorkspaces = pageRows.map((row) => row.ws);
15635
16054
  const listLoading = loading || serverMode && !serverPage;
15636
- const [plans, setPlans] = useState25({});
16055
+ const [plans, setPlans] = useState26({});
15637
16056
  const requestedPlans = useRef12(/* @__PURE__ */ new Set());
15638
16057
  const visibleIds = [
15639
16058
  ...currentWorkspace ? [currentWorkspace._id] : [],
@@ -15658,13 +16077,13 @@ function WorkspaceListTab({
15658
16077
  });
15659
16078
  }, [fetchPlans, listLoading, visibleKey]);
15660
16079
  const planOf = (ws) => fetchPlans ? plans[ws._id] ?? "" : ws.plan ?? "";
15661
- return /* @__PURE__ */ jsxs30(
16080
+ return /* @__PURE__ */ jsxs32(
15662
16081
  "div",
15663
16082
  {
15664
16083
  className: "flex flex-col items-start flex-1 min-w-0",
15665
16084
  style: { gap: "var(--spacing-3xl)", height: "100%" },
15666
16085
  children: [
15667
- /* @__PURE__ */ jsx33(
16086
+ /* @__PURE__ */ jsx35(
15668
16087
  "p",
15669
16088
  {
15670
16089
  className: "shrink-0 w-full",
@@ -15677,7 +16096,7 @@ function WorkspaceListTab({
15677
16096
  children: "Switching changes which workspace the rest of Settings acts on."
15678
16097
  }
15679
16098
  ),
15680
- listLoading && /* @__PURE__ */ jsx33(
16099
+ listLoading && /* @__PURE__ */ jsx35(
15681
16100
  "p",
15682
16101
  {
15683
16102
  style: {
@@ -15688,13 +16107,13 @@ function WorkspaceListTab({
15688
16107
  children: "Loading workspaces\u2026"
15689
16108
  }
15690
16109
  ),
15691
- !listLoading && currentWorkspace && /* @__PURE__ */ jsxs30(
16110
+ !listLoading && currentWorkspace && /* @__PURE__ */ jsxs32(
15692
16111
  "div",
15693
16112
  {
15694
16113
  className: "flex flex-col items-start shrink-0 w-full",
15695
16114
  style: { gap: 16, padding: "var(--spacing-md) 0" },
15696
16115
  children: [
15697
- /* @__PURE__ */ jsxs30(
16116
+ /* @__PURE__ */ jsxs32(
15698
16117
  "p",
15699
16118
  {
15700
16119
  className: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
@@ -15711,7 +16130,7 @@ function WorkspaceListTab({
15711
16130
  ]
15712
16131
  }
15713
16132
  ),
15714
- /* @__PURE__ */ jsx33(
16133
+ /* @__PURE__ */ jsx35(
15715
16134
  ScWorkspaceSwitchCard,
15716
16135
  {
15717
16136
  wsName: currentWorkspace.name,
@@ -15728,7 +16147,7 @@ function WorkspaceListTab({
15728
16147
  ]
15729
16148
  }
15730
16149
  ),
15731
- !listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */ jsx33(
16150
+ !listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */ jsx35(
15732
16151
  "div",
15733
16152
  {
15734
16153
  className: "shrink-0 w-full",
@@ -15738,19 +16157,19 @@ function WorkspaceListTab({
15738
16157
  }
15739
16158
  }
15740
16159
  ),
15741
- !listLoading && listTotal > 0 && /* @__PURE__ */ jsxs30(
16160
+ !listLoading && listTotal > 0 && /* @__PURE__ */ jsxs32(
15742
16161
  "div",
15743
16162
  {
15744
16163
  className: "flex flex-col items-start flex-1 min-h-0 w-full",
15745
16164
  style: { gap: 16, overflowY: "auto" },
15746
16165
  children: [
15747
- /* @__PURE__ */ jsx33(
16166
+ /* @__PURE__ */ jsx35(
15748
16167
  "div",
15749
16168
  {
15750
16169
  className: "flex flex-col items-start w-full",
15751
16170
  style: { gap: 16 },
15752
- children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */ jsxs30(Fragment15, { children: [
15753
- (index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */ jsx33(
16171
+ children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */ jsxs32(Fragment16, { children: [
16172
+ (index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */ jsx35(
15754
16173
  "p",
15755
16174
  {
15756
16175
  className: "w-full overflow-hidden text-ellipsis whitespace-nowrap shrink-0",
@@ -15765,7 +16184,7 @@ function WorkspaceListTab({
15765
16184
  children: group.label
15766
16185
  }
15767
16186
  ),
15768
- /* @__PURE__ */ jsx33(
16187
+ /* @__PURE__ */ jsx35(
15769
16188
  ScWorkspaceSwitchCard,
15770
16189
  {
15771
16190
  wsName: ws.name,
@@ -15783,13 +16202,13 @@ function WorkspaceListTab({
15783
16202
  ] }, ws._id))
15784
16203
  }
15785
16204
  ),
15786
- pageCount > 1 && /* @__PURE__ */ jsxs30(
16205
+ pageCount > 1 && /* @__PURE__ */ jsxs32(
15787
16206
  "div",
15788
16207
  {
15789
16208
  className: "flex items-center justify-between shrink-0 w-full",
15790
16209
  style: { gap: "var(--spacing-md)" },
15791
16210
  children: [
15792
- /* @__PURE__ */ jsxs30(
16211
+ /* @__PURE__ */ jsxs32(
15793
16212
  "span",
15794
16213
  {
15795
16214
  style: {
@@ -15808,9 +16227,9 @@ function WorkspaceListTab({
15808
16227
  ]
15809
16228
  }
15810
16229
  ),
15811
- /* @__PURE__ */ jsxs30("div", { className: "flex items-center", style: { gap: "var(--spacing-md)" }, children: [
15812
- /* @__PURE__ */ jsx33(
15813
- ScButton18,
16230
+ /* @__PURE__ */ jsxs32("div", { className: "flex items-center", style: { gap: "var(--spacing-md)" }, children: [
16231
+ /* @__PURE__ */ jsx35(
16232
+ ScButton19,
15814
16233
  {
15815
16234
  text: "Previous",
15816
16235
  variant: "tertiary",
@@ -15819,8 +16238,8 @@ function WorkspaceListTab({
15819
16238
  onClick: safePage === 0 ? void 0 : () => setPage(safePage - 1)
15820
16239
  }
15821
16240
  ),
15822
- /* @__PURE__ */ jsx33(
15823
- ScButton18,
16241
+ /* @__PURE__ */ jsx35(
16242
+ ScButton19,
15824
16243
  {
15825
16244
  text: "Next",
15826
16245
  variant: "tertiary",
@@ -15842,10 +16261,10 @@ function WorkspaceListTab({
15842
16261
  }
15843
16262
  var WorkspaceTab = WorkspaceListTab;
15844
16263
  function ReferralTab() {
15845
- const { auth, toast } = useSettingsAdapters();
16264
+ const { auth, toast, api } = useSettingsAdapters();
15846
16265
  const domain = typeof window !== "undefined" ? window.location.origin : "";
15847
16266
  const link = referralLink(referralCodeOf(auth.user), domain);
15848
- const [copied, setCopied] = useState25(false);
16267
+ const [copied, setCopied] = useState26(false);
15849
16268
  const copiedTimer = useRef12(null);
15850
16269
  useEffect20(() => () => {
15851
16270
  if (copiedTimer.current) clearTimeout(copiedTimer.current);
@@ -15862,68 +16281,71 @@ function ReferralTab() {
15862
16281
  toast.error("Couldn't copy the referral link");
15863
16282
  }
15864
16283
  };
15865
- return /* @__PURE__ */ jsx33(
16284
+ return /* @__PURE__ */ jsxs32(
15866
16285
  "div",
15867
16286
  {
15868
16287
  className: "flex flex-col items-start flex-1 min-w-0",
15869
16288
  style: { gap: "var(--spacing-3xl)" },
15870
- children: /* @__PURE__ */ jsx33(
15871
- "div",
15872
- {
15873
- className: "w-full relative",
15874
- style: {
15875
- backgroundColor: "var(--alias-surface-base)",
15876
- borderRadius: "var(--radius-3xl)",
15877
- padding: "var(--spacing-6xl)"
15878
- },
15879
- children: /* @__PURE__ */ jsx33(
15880
- ScTextField,
15881
- {
15882
- label: "Your Referral Link",
15883
- labelGroup: "label",
15884
- state: "filled",
15885
- value: link,
15886
- placeholderFilled: "https://your-domain.com?referral_code=ABC123",
15887
- tfGroup: "none",
15888
- rightSlot: /* @__PURE__ */ jsxs30(
15889
- "button",
15890
- {
15891
- type: "button",
15892
- "aria-label": copied ? "Copied" : "Copy referral link",
15893
- title: copied ? "Copied" : "Copy referral link",
15894
- disabled: !link,
15895
- onClick: () => void copyLink(),
15896
- className: "flex items-center justify-center shrink-0 cursor-pointer border-none",
15897
- style: {
15898
- gap: "var(--spacing-xs)",
15899
- padding: "0 var(--spacing-md)",
15900
- height: 32,
15901
- borderRadius: "var(--radius-lg)",
15902
- background: "transparent",
15903
- color: "var(--alias-text---icons-primary)",
15904
- fontSize: "var(--font-size-font-size-sm)",
15905
- fontWeight: 500
15906
- },
15907
- onMouseEnter: (e) => {
15908
- e.currentTarget.style.background = "var(--alias-fill-neutral-neutralplus)";
15909
- },
15910
- onMouseLeave: (e) => {
15911
- e.currentTarget.style.background = "transparent";
15912
- },
15913
- children: [
15914
- copied ? /* @__PURE__ */ jsx33(SiconCheck2, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }) : /* @__PURE__ */ jsx33(SiconCopy2, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }),
15915
- copied ? "Copied" : "Copy"
15916
- ]
15917
- }
15918
- ),
15919
- desc: "Share this link. When someone opens it and creates a new Streamoid account, it's recorded as your referral.",
15920
- className: "sc-text-field-full-width w-full min-w-0",
15921
- readOnly: true,
15922
- onFocus: (e) => e.currentTarget.select()
15923
- }
15924
- )
15925
- }
15926
- )
16289
+ children: [
16290
+ /* @__PURE__ */ jsx35(
16291
+ "div",
16292
+ {
16293
+ className: "w-full relative",
16294
+ style: {
16295
+ backgroundColor: "var(--alias-surface-base)",
16296
+ borderRadius: "var(--radius-3xl)",
16297
+ padding: "var(--spacing-6xl)"
16298
+ },
16299
+ children: /* @__PURE__ */ jsx35(
16300
+ ScTextField,
16301
+ {
16302
+ label: "Your Referral Link",
16303
+ labelGroup: "label",
16304
+ state: "filled",
16305
+ value: link,
16306
+ placeholderFilled: "https://your-domain.com?referral_code=ABC123",
16307
+ tfGroup: "none",
16308
+ rightSlot: /* @__PURE__ */ jsxs32(
16309
+ "button",
16310
+ {
16311
+ type: "button",
16312
+ "aria-label": copied ? "Copied" : "Copy referral link",
16313
+ title: copied ? "Copied" : "Copy referral link",
16314
+ disabled: !link,
16315
+ onClick: () => void copyLink(),
16316
+ className: "flex items-center justify-center shrink-0 cursor-pointer border-none",
16317
+ style: {
16318
+ gap: "var(--spacing-xs)",
16319
+ padding: "0 var(--spacing-md)",
16320
+ height: 32,
16321
+ borderRadius: "var(--radius-lg)",
16322
+ background: "transparent",
16323
+ color: "var(--alias-text---icons-primary)",
16324
+ fontSize: "var(--font-size-font-size-sm)",
16325
+ fontWeight: 500
16326
+ },
16327
+ onMouseEnter: (e) => {
16328
+ e.currentTarget.style.background = "var(--alias-fill-neutral-neutralplus)";
16329
+ },
16330
+ onMouseLeave: (e) => {
16331
+ e.currentTarget.style.background = "transparent";
16332
+ },
16333
+ children: [
16334
+ copied ? /* @__PURE__ */ jsx35(SiconCheck2, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }) : /* @__PURE__ */ jsx35(SiconCopy2, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }),
16335
+ copied ? "Copied" : "Copy"
16336
+ ]
16337
+ }
16338
+ ),
16339
+ desc: "Share this link. When someone opens it and creates a new Streamoid account, it's recorded as your referral.",
16340
+ className: "sc-text-field-full-width w-full min-w-0",
16341
+ readOnly: true,
16342
+ onFocus: (e) => e.currentTarget.select()
16343
+ }
16344
+ )
16345
+ }
16346
+ ),
16347
+ api.getReferredUsers && /* @__PURE__ */ jsx35(ReferralHistory, { load: (signal) => api.getReferredUsers(signal) })
16348
+ ]
15927
16349
  }
15928
16350
  );
15929
16351
  }
@@ -15940,7 +16362,7 @@ function SettingsContent({
15940
16362
  inviteRequested,
15941
16363
  onInviteRequestHandled
15942
16364
  }) {
15943
- return /* @__PURE__ */ jsx33(SettingsAdaptersProvider, { adapters, children: /* @__PURE__ */ jsx33(
16365
+ return /* @__PURE__ */ jsx35(SettingsAdaptersProvider, { adapters, children: /* @__PURE__ */ jsx35(
15944
16366
  SettingsContentInner,
15945
16367
  {
15946
16368
  activeTab,
@@ -15978,7 +16400,8 @@ function SettingsContentInner({
15978
16400
  organization,
15979
16401
  navigation,
15980
16402
  toast,
15981
- integrations
16403
+ integrations,
16404
+ loginMethods
15982
16405
  } = adapters;
15983
16406
  const overviewDetail = presentation === "overview-detail";
15984
16407
  const isOverview = overviewDetail && showOverview;
@@ -15986,13 +16409,14 @@ function SettingsContentInner({
15986
16409
  const showConnectedApps = !!integrations;
15987
16410
  const showReferral = !!referralCodeOf(adapters.auth.user);
15988
16411
  const showIntegrations = !!integrations?.listOrganizationConnections && !!integrations.getOrganizationAccess && organization.current?.role === "admin";
16412
+ const showLoginMethods = !!loginMethods && organization.current?.role === "admin";
15989
16413
  const workspaceId = workspace.current?.id ?? null;
15990
16414
  const workspaceOwner = useWorkspaceOrganization({ workspaceId, request: workspace.organizationRequest ?? unavailableOrganizationRequest, enabled: !!workspace.organizationRequest });
15991
16415
  const workspaceOwnerName = workspace.organizationRequest ? workspaceOwner.organizationName : void 0;
15992
- const [workspaceList, setWorkspaceList] = useState25([]);
16416
+ const [workspaceList, setWorkspaceList] = useState26([]);
15993
16417
  const currentWorkspaceRole = workspace.current?.role ?? workspaceList.find((item) => item._id === workspaceId)?.role;
15994
16418
  const isWorkspaceAdmin = currentWorkspaceRole?.trim().toLowerCase() === "admin";
15995
- const [workspaceListLoading, setWorkspaceListLoading] = useState25(false);
16419
+ const [workspaceListLoading, setWorkspaceListLoading] = useState26(false);
15996
16420
  const refreshWorkspaceList = useCallback10(async () => {
15997
16421
  setWorkspaceListLoading(true);
15998
16422
  try {
@@ -16035,7 +16459,7 @@ function SettingsContentInner({
16035
16459
  } : void 0,
16036
16460
  [hostListPage, workspaceId]
16037
16461
  );
16038
- const [listOrganizations, setListOrganizations] = useState25([]);
16462
+ const [listOrganizations, setListOrganizations] = useState26([]);
16039
16463
  useEffect20(() => {
16040
16464
  if (activeTab !== "workspaceList" || typeof organization?.list !== "function") {
16041
16465
  return;
@@ -16066,23 +16490,23 @@ function SettingsContentInner({
16066
16490
  const setActiveTab = (tab) => {
16067
16491
  navigation.navigateToTab(tab);
16068
16492
  };
16069
- const [creatingWorkspace, setCreatingWorkspace] = useState25(false);
16070
- const [updatingWorkspace, setUpdatingWorkspace] = useState25(false);
16071
- const [teamInviteOpen, setTeamInviteOpen] = useState25(false);
16493
+ const [creatingWorkspace, setCreatingWorkspace] = useState26(false);
16494
+ const [updatingWorkspace, setUpdatingWorkspace] = useState26(false);
16495
+ const [teamInviteOpen, setTeamInviteOpen] = useState26(false);
16072
16496
  const teamPermissionScope = JSON.stringify([workspaceId, _auth.user?.id, workspace.current?.role]);
16073
- const [teamInvitePermission, setTeamInvitePermission] = useState25(null);
16497
+ const [teamInvitePermission, setTeamInvitePermission] = useState26(null);
16074
16498
  const teamCanInvite = teamInvitePermission?.scope === teamPermissionScope && teamInvitePermission.api === adapters.api ? teamInvitePermission.canInvite : null;
16075
16499
  const receiveTeamInvitePermission = useCallback10((canInvite) => {
16076
16500
  setTeamInvitePermission((previous) => previous?.scope === teamPermissionScope && previous.api === adapters.api && previous.canInvite === canInvite ? previous : { scope: teamPermissionScope, api: adapters.api, canInvite });
16077
16501
  }, [teamPermissionScope, adapters.api]);
16078
16502
  const canUseHeaderInvite = overviewDetail ? activeTab === "workspaceMembers" && !isOverview ? teamCanInvite === true : !overviewInvite.isLoading && overviewInvite.canInvite : teamCanInvite ?? isWorkspaceAdmin;
16079
- const [tokenShowRevoked, setTokenShowRevoked] = useState25(false);
16080
- const [tokenCreateOpen, setTokenCreateOpen] = useState25(false);
16081
- const [billingShowPlans, setBillingShowPlans] = useState25(false);
16503
+ const [tokenShowRevoked, setTokenShowRevoked] = useState26(false);
16504
+ const [tokenCreateOpen, setTokenCreateOpen] = useState26(false);
16505
+ const [billingShowPlans, setBillingShowPlans] = useState26(false);
16082
16506
  const isBillingPlans = activeTab === "billing" && isWorkspaceAdmin && billingShowPlans;
16083
- const [billingShowPerUserLimits, setBillingShowPerUserLimits] = useState25(false);
16507
+ const [billingShowPerUserLimits, setBillingShowPerUserLimits] = useState26(false);
16084
16508
  const isBillingPerUserLimits = activeTab === "billing" && isWorkspaceAdmin && billingShowPerUserLimits && !billingShowPlans;
16085
- const [billingShowSharedCredits, setBillingShowSharedCredits] = useState25(false);
16509
+ const [billingShowSharedCredits, setBillingShowSharedCredits] = useState26(false);
16086
16510
  const isBillingSharedCredits = activeTab === "billing" && isWorkspaceAdmin && billingShowSharedCredits && !billingShowPlans && !billingShowPerUserLimits;
16087
16511
  const isBillingSubView = isBillingPlans || isBillingPerUserLimits || isBillingSharedCredits;
16088
16512
  useEffect20(() => {
@@ -16119,14 +16543,14 @@ function SettingsContentInner({
16119
16543
  document.addEventListener("keydown", handleKeyDown);
16120
16544
  return () => document.removeEventListener("keydown", handleKeyDown);
16121
16545
  }, [onClose, billingShowPlans, billingShowPerUserLimits, billingShowSharedCredits]);
16122
- const [localWorkspaces, setLocalWorkspaces] = useState25(null);
16123
- const [wsModalOpen, setWsModalOpen] = useState25(false);
16124
- const [wsModalMode, setWsModalMode] = useState25("create");
16125
- const [editingWorkspace, setEditingWorkspace] = useState25(null);
16126
- const [confirmLeaveOpen, setConfirmLeaveOpen] = useState25(false);
16127
- const [leavingWorkspace, setLeavingWorkspace] = useState25(null);
16128
- const [confirmDeleteOpen, setConfirmDeleteOpen] = useState25(false);
16129
- const [deletingWorkspace, setDeletingWorkspace] = useState25(null);
16546
+ const [localWorkspaces, setLocalWorkspaces] = useState26(null);
16547
+ const [wsModalOpen, setWsModalOpen] = useState26(false);
16548
+ const [wsModalMode, setWsModalMode] = useState26("create");
16549
+ const [editingWorkspace, setEditingWorkspace] = useState26(null);
16550
+ const [confirmLeaveOpen, setConfirmLeaveOpen] = useState26(false);
16551
+ const [leavingWorkspace, setLeavingWorkspace] = useState26(null);
16552
+ const [confirmDeleteOpen, setConfirmDeleteOpen] = useState26(false);
16553
+ const [deletingWorkspace, setDeletingWorkspace] = useState26(null);
16130
16554
  const toWorkspaceData = (ws) => ({
16131
16555
  id: ws._id,
16132
16556
  name: ws.name ?? "",
@@ -16393,7 +16817,7 @@ function SettingsContentInner({
16393
16817
  setConfirmLeaveOpen(true);
16394
16818
  return false;
16395
16819
  }
16396
- return /* @__PURE__ */ jsxs30(
16820
+ return /* @__PURE__ */ jsxs32(
16397
16821
  "div",
16398
16822
  {
16399
16823
  "data-streamoid-settings": "",
@@ -16404,8 +16828,8 @@ function SettingsContentInner({
16404
16828
  ...isOverview ? { display: "block", overflowY: "auto" } : {}
16405
16829
  },
16406
16830
  children: [
16407
- !isOverview && /* @__PURE__ */ jsx33(SettingsAppearance, {}),
16408
- /* @__PURE__ */ jsx33(
16831
+ !isOverview && /* @__PURE__ */ jsx35(SettingsAppearance, {}),
16832
+ /* @__PURE__ */ jsx35(
16409
16833
  "div",
16410
16834
  {
16411
16835
  className: "flex flex-col items-start relative h-full overflow-hidden",
@@ -16416,8 +16840,8 @@ function SettingsContentInner({
16416
16840
  width: "100%",
16417
16841
  ...isOverview ? { height: "auto", minHeight: "100%", overflow: "visible", marginInline: "auto" } : {}
16418
16842
  },
16419
- children: /* @__PURE__ */ jsxs30("div", { className: "flex flex-col w-full flex-1 min-h-0", style: { gap: 20, paddingTop: 16 }, children: [
16420
- !overviewDetail && onBack !== null && /* @__PURE__ */ jsx33("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsxs30(
16843
+ children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full flex-1 min-h-0", style: { gap: 20, paddingTop: 16 }, children: [
16844
+ !overviewDetail && onBack !== null && /* @__PURE__ */ jsx35("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsxs32(
16421
16845
  "button",
16422
16846
  {
16423
16847
  type: "button",
@@ -16449,19 +16873,19 @@ function SettingsContentInner({
16449
16873
  else window.history.back();
16450
16874
  },
16451
16875
  children: [
16452
- /* @__PURE__ */ jsx33(SiconLeft3, { className: "w-4 h-4 shrink-0", color: "var(--alias-text---icons-muted)" }),
16876
+ /* @__PURE__ */ jsx35(SiconLeft3, { className: "w-4 h-4 shrink-0", color: "var(--alias-text---icons-muted)" }),
16453
16877
  "Back"
16454
16878
  ]
16455
16879
  }
16456
16880
  ) }),
16457
- overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */ jsx33("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsx33(
16458
- ScButton18,
16881
+ overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */ jsx35("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsx35(
16882
+ ScButton19,
16459
16883
  {
16460
16884
  text: isBillingSubView ? "Back to billing" : "Back to account and workspace settings",
16461
16885
  variant: "tertiary",
16462
16886
  size: "sm",
16463
16887
  styleVariant: "icon-left",
16464
- icon: /* @__PURE__ */ jsx33(SiconArrowLeft, { size: 18, "aria-hidden": "true" }),
16888
+ icon: /* @__PURE__ */ jsx35(SiconArrowLeft, { size: 18, "aria-hidden": "true" }),
16465
16889
  onClick: () => {
16466
16890
  if (isBillingSubView) {
16467
16891
  setBillingShowPlans(false);
@@ -16473,7 +16897,7 @@ function SettingsContentInner({
16473
16897
  }
16474
16898
  }
16475
16899
  ) }),
16476
- /* @__PURE__ */ jsxs30(
16900
+ /* @__PURE__ */ jsxs32(
16477
16901
  "div",
16478
16902
  {
16479
16903
  className: "flex items-center shrink-0 w-full",
@@ -16484,9 +16908,9 @@ function SettingsContentInner({
16484
16908
  paddingRight: 20
16485
16909
  },
16486
16910
  children: [
16487
- /* @__PURE__ */ jsxs30("div", { className: "flex items-center flex-1 min-w-0", style: { gap: 8, paddingLeft: 20 }, children: [
16488
- /* @__PURE__ */ jsx33(SiconSettings2, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16489
- /* @__PURE__ */ jsx33(
16911
+ /* @__PURE__ */ jsxs32("div", { className: "flex items-center flex-1 min-w-0", style: { gap: 8, paddingLeft: 20 }, children: [
16912
+ /* @__PURE__ */ jsx35(SiconSettings2, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16913
+ /* @__PURE__ */ jsx35(
16490
16914
  "h1",
16491
16915
  {
16492
16916
  style: {
@@ -16500,10 +16924,10 @@ function SettingsContentInner({
16500
16924
  children: overviewDetail ? "Account and workspace settings" : "Settings"
16501
16925
  }
16502
16926
  ),
16503
- !isOverview && /* @__PURE__ */ jsxs30("nav", { "aria-label": "Breadcrumb", className: "flex items-center min-w-0", style: { gap: 8 }, children: [
16504
- scopeCrumb && /* @__PURE__ */ jsxs30(Fragment16, { children: [
16505
- /* @__PURE__ */ jsx33(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16506
- /* @__PURE__ */ jsx33(
16927
+ !isOverview && /* @__PURE__ */ jsxs32("nav", { "aria-label": "Breadcrumb", className: "flex items-center min-w-0", style: { gap: 8 }, children: [
16928
+ scopeCrumb && /* @__PURE__ */ jsxs32(Fragment17, { children: [
16929
+ /* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16930
+ /* @__PURE__ */ jsx35(
16507
16931
  "span",
16508
16932
  {
16509
16933
  className: "truncate",
@@ -16520,8 +16944,8 @@ function SettingsContentInner({
16520
16944
  }
16521
16945
  )
16522
16946
  ] }),
16523
- /* @__PURE__ */ jsx33(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16524
- /* @__PURE__ */ jsx33(
16947
+ /* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16948
+ /* @__PURE__ */ jsx35(
16525
16949
  "span",
16526
16950
  {
16527
16951
  style: {
@@ -16534,9 +16958,9 @@ function SettingsContentInner({
16534
16958
  children: leafLabel
16535
16959
  }
16536
16960
  ),
16537
- isBillingPlans && /* @__PURE__ */ jsxs30(Fragment16, { children: [
16538
- /* @__PURE__ */ jsx33(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16539
- /* @__PURE__ */ jsx33(
16961
+ isBillingPlans && /* @__PURE__ */ jsxs32(Fragment17, { children: [
16962
+ /* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16963
+ /* @__PURE__ */ jsx35(
16540
16964
  "span",
16541
16965
  {
16542
16966
  style: {
@@ -16550,9 +16974,9 @@ function SettingsContentInner({
16550
16974
  }
16551
16975
  )
16552
16976
  ] }),
16553
- isBillingPerUserLimits && /* @__PURE__ */ jsxs30(Fragment16, { children: [
16554
- /* @__PURE__ */ jsx33(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16555
- /* @__PURE__ */ jsx33(
16977
+ isBillingPerUserLimits && /* @__PURE__ */ jsxs32(Fragment17, { children: [
16978
+ /* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16979
+ /* @__PURE__ */ jsx35(
16556
16980
  "span",
16557
16981
  {
16558
16982
  style: {
@@ -16566,9 +16990,9 @@ function SettingsContentInner({
16566
16990
  }
16567
16991
  )
16568
16992
  ] }),
16569
- isBillingSharedCredits && /* @__PURE__ */ jsxs30(Fragment16, { children: [
16570
- /* @__PURE__ */ jsx33(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16571
- /* @__PURE__ */ jsx33(
16993
+ isBillingSharedCredits && /* @__PURE__ */ jsxs32(Fragment17, { children: [
16994
+ /* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16995
+ /* @__PURE__ */ jsx35(
16572
16996
  "span",
16573
16997
  {
16574
16998
  style: {
@@ -16584,20 +17008,20 @@ function SettingsContentInner({
16584
17008
  ] })
16585
17009
  ] })
16586
17010
  ] }),
16587
- !isOverview && activeTab === "workspaceList" && /* @__PURE__ */ jsx33(
17011
+ !isOverview && activeTab === "workspaceList" && /* @__PURE__ */ jsx35(
16588
17012
  SettingsTooltip,
16589
17013
  {
16590
17014
  content: "Start a new workspace with its own team, members and billing",
16591
17015
  placement: "bottom",
16592
17016
  inline: true,
16593
- children: /* @__PURE__ */ jsx33(
16594
- ScButton18,
17017
+ children: /* @__PURE__ */ jsx35(
17018
+ ScButton19,
16595
17019
  {
16596
17020
  text: "Create Workspace",
16597
17021
  variant: "secondary",
16598
17022
  size: "md",
16599
17023
  styleVariant: "icon-left",
16600
- icon: /* @__PURE__ */ jsx33(
17024
+ icon: /* @__PURE__ */ jsx35(
16601
17025
  SiconWorkspace2,
16602
17026
  {
16603
17027
  className: "w-5 h-5",
@@ -16609,21 +17033,21 @@ function SettingsContentInner({
16609
17033
  )
16610
17034
  }
16611
17035
  ),
16612
- !isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */ jsx33(
17036
+ !isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */ jsx35(
16613
17037
  SettingsTooltip,
16614
17038
  {
16615
17039
  content: "Send someone an invite to join this workspace",
16616
17040
  placement: "bottom",
16617
17041
  inline: true,
16618
- children: /* @__PURE__ */ jsx33(
16619
- ScButton18,
17042
+ children: /* @__PURE__ */ jsx35(
17043
+ ScButton19,
16620
17044
  {
16621
17045
  text: overviewDetail ? "Invite people" : "Invite user",
16622
17046
  variant: "secondary",
16623
17047
  size: "md",
16624
17048
  styleVariant: "icon-left",
16625
17049
  state: canUseHeaderInvite ? "default" : "disabled",
16626
- icon: /* @__PURE__ */ jsx33(
17050
+ icon: /* @__PURE__ */ jsx35(
16627
17051
  SiconUserAdd3,
16628
17052
  {
16629
17053
  className: "w-5 h-5",
@@ -16637,15 +17061,15 @@ function SettingsContentInner({
16637
17061
  )
16638
17062
  }
16639
17063
  ),
16640
- !isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs30("div", { className: "flex items-center shrink-0", style: { gap: "var(--spacing-md)" }, children: [
16641
- /* @__PURE__ */ jsx33(
17064
+ !isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs32("div", { className: "flex items-center shrink-0", style: { gap: "var(--spacing-md)" }, children: [
17065
+ /* @__PURE__ */ jsx35(
16642
17066
  SettingsTooltip,
16643
17067
  {
16644
17068
  content: "Include keys you have already revoked in the list below",
16645
17069
  placement: "bottom",
16646
17070
  inline: true,
16647
- children: /* @__PURE__ */ jsx33(
16648
- ScButton18,
17071
+ children: /* @__PURE__ */ jsx35(
17072
+ ScButton19,
16649
17073
  {
16650
17074
  text: tokenShowRevoked ? "Hide Revoked" : "Show Revoked",
16651
17075
  variant: "outline",
@@ -16655,20 +17079,20 @@ function SettingsContentInner({
16655
17079
  )
16656
17080
  }
16657
17081
  ),
16658
- /* @__PURE__ */ jsx33(
17082
+ /* @__PURE__ */ jsx35(
16659
17083
  SettingsTooltip,
16660
17084
  {
16661
17085
  content: "Generate a key for calling the Streamoid APIs from your own code",
16662
17086
  placement: "bottom",
16663
17087
  inline: true,
16664
- children: /* @__PURE__ */ jsx33(
16665
- ScButton18,
17088
+ children: /* @__PURE__ */ jsx35(
17089
+ ScButton19,
16666
17090
  {
16667
17091
  text: "New API Key",
16668
17092
  variant: "secondary",
16669
17093
  size: "md",
16670
17094
  styleVariant: "icon-left",
16671
- icon: /* @__PURE__ */ jsx33(
17095
+ icon: /* @__PURE__ */ jsx35(
16672
17096
  SiconPlus3,
16673
17097
  {
16674
17098
  className: "w-5 h-5",
@@ -16681,13 +17105,13 @@ function SettingsContentInner({
16681
17105
  }
16682
17106
  )
16683
17107
  ] }),
16684
- overviewDetail && onClose && /* @__PURE__ */ jsx33(SettingsTooltip, { content: "Close settings", placement: "bottom", inline: true, children: /* @__PURE__ */ jsx33(
16685
- ScButton18,
17108
+ overviewDetail && onClose && /* @__PURE__ */ jsx35(SettingsTooltip, { content: "Close settings", placement: "bottom", inline: true, children: /* @__PURE__ */ jsx35(
17109
+ ScButton19,
16686
17110
  {
16687
17111
  styleVariant: "icon-only",
16688
17112
  variant: "outline",
16689
17113
  size: "md",
16690
- icon: /* @__PURE__ */ jsx33(SiconClose11, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
17114
+ icon: /* @__PURE__ */ jsx35(SiconClose11, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
16691
17115
  "aria-label": "Close settings",
16692
17116
  style: isOverview ? { width: "2rem", height: "2rem", padding: 0 } : void 0,
16693
17117
  onClick: onClose
@@ -16696,7 +17120,7 @@ function SettingsContentInner({
16696
17120
  ]
16697
17121
  }
16698
17122
  ),
16699
- isOverview ? /* @__PURE__ */ jsx33(
17123
+ isOverview ? /* @__PURE__ */ jsx35(
16700
17124
  AdministrationOverview,
16701
17125
  {
16702
17126
  workspaceName: workspaceScopeName,
@@ -16706,18 +17130,19 @@ function SettingsContentInner({
16706
17130
  isWorkspaceAdmin,
16707
17131
  showConnectedApps,
16708
17132
  showIntegrations,
17133
+ showLoginMethods,
16709
17134
  showReferral,
16710
17135
  canInvite: !overviewInvite.isLoading && overviewInvite.canInvite,
16711
17136
  onNavigate: setActiveTab,
16712
17137
  onInvitePeople
16713
17138
  }
16714
- ) : /* @__PURE__ */ jsxs30(
17139
+ ) : /* @__PURE__ */ jsxs32(
16715
17140
  "div",
16716
17141
  {
16717
17142
  className: "flex items-start flex-1 min-h-0 w-full overflow-hidden",
16718
17143
  style: { gap: 20 },
16719
17144
  children: [
16720
- !overviewDetail && !isBillingSubView && /* @__PURE__ */ jsx33(
17145
+ !overviewDetail && !isBillingSubView && /* @__PURE__ */ jsx35(
16721
17146
  SettingsNav,
16722
17147
  {
16723
17148
  isWorkspaceAdmin,
@@ -16728,11 +17153,12 @@ function SettingsContentInner({
16728
17153
  hasOrganization,
16729
17154
  showConnectedApps,
16730
17155
  showIntegrations,
17156
+ showLoginMethods,
16731
17157
  showReferral
16732
17158
  }
16733
17159
  ),
16734
- activeTab === "profile" && /* @__PURE__ */ jsx33(ProfileTab, {}),
16735
- activeTab === "workspace" && /* @__PURE__ */ jsx33("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx33(
17160
+ activeTab === "profile" && /* @__PURE__ */ jsx35(ProfileTab, {}),
17161
+ activeTab === "workspace" && /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx35(
16736
17162
  WorkspaceGeneralTab,
16737
17163
  {
16738
17164
  workspace: currentWorkspaceData,
@@ -16754,7 +17180,7 @@ function SettingsContentInner({
16754
17180
  }
16755
17181
  }
16756
17182
  ) }),
16757
- activeTab === "workspaceMembers" && /* @__PURE__ */ jsx33("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx33(
17183
+ activeTab === "workspaceMembers" && /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx35(
16758
17184
  TeamsContent,
16759
17185
  {
16760
17186
  embedded: true,
@@ -16769,7 +17195,7 @@ function SettingsContentInner({
16769
17195
  hiddenApps
16770
17196
  }
16771
17197
  ) }),
16772
- activeTab === "workspaceList" && /* @__PURE__ */ jsx33(
17198
+ activeTab === "workspaceList" && /* @__PURE__ */ jsx35(
16773
17199
  WorkspaceListTab,
16774
17200
  {
16775
17201
  workspaces: displayWorkspaces,
@@ -16794,11 +17220,12 @@ function SettingsContentInner({
16794
17220
  }
16795
17221
  }
16796
17222
  ),
16797
- activeTab === "referral" && showReferral && /* @__PURE__ */ jsx33(ReferralTab, {}),
16798
- activeTab === "connectedApps" && /* @__PURE__ */ jsx33(ConnectedAppsContent, {}),
16799
- activeTab === "organizationIntegrations" && /* @__PURE__ */ jsx33(OrganizationIntegrationsContent, {}),
16800
- activeTab === "organizationList" && /* @__PURE__ */ jsx33(OrganizationListContent, {}),
16801
- (activeTab === "organization" || activeTab === "organizationWorkspaces" || activeTab === "organizationDomains") && /* @__PURE__ */ jsx33("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: organization.managementUrl ? /* @__PURE__ */ jsx33(
17223
+ activeTab === "referral" && showReferral && /* @__PURE__ */ jsx35(ReferralTab, {}),
17224
+ activeTab === "connectedApps" && /* @__PURE__ */ jsx35(ConnectedAppsContent, {}),
17225
+ activeTab === "organizationIntegrations" && /* @__PURE__ */ jsx35(OrganizationIntegrationsContent, {}),
17226
+ activeTab === "organizationLoginMethods" && /* @__PURE__ */ jsx35(OrganizationLoginMethodsContent, {}),
17227
+ activeTab === "organizationList" && /* @__PURE__ */ jsx35(OrganizationListContent, {}),
17228
+ (activeTab === "organization" || activeTab === "organizationWorkspaces" || activeTab === "organizationDomains") && /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: organization.managementUrl ? /* @__PURE__ */ jsx35(
16802
17229
  ManagedOrganizationSummary,
16803
17230
  {
16804
17231
  name: workspaceOwner.organizationName,
@@ -16806,14 +17233,14 @@ function SettingsContentInner({
16806
17233
  status: workspaceOwner.organizationStatus,
16807
17234
  managementUrl: organization.managementUrl
16808
17235
  }
16809
- ) : /* @__PURE__ */ jsx33(
17236
+ ) : /* @__PURE__ */ jsx35(
16810
17237
  OrganizationContent,
16811
17238
  {
16812
17239
  embedded: true,
16813
17240
  view: activeTab === "organizationWorkspaces" || activeTab === "organizationDomains" ? "workspaces" : "people"
16814
17241
  }
16815
17242
  ) }),
16816
- activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */ jsx33("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx33(
17243
+ activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx35(
16817
17244
  BillingContent,
16818
17245
  {
16819
17246
  embedded: true,
@@ -16843,14 +17270,14 @@ function SettingsContentInner({
16843
17270
  }
16844
17271
  }
16845
17272
  ) }),
16846
- (activeTab === "billing" || activeTab === "apikey") && !isWorkspaceAdmin && /* @__PURE__ */ jsxs30("section", { role: "status", className: "flex flex-col flex-1 min-w-0", style: { padding: 28, gap: 12, background: "var(--alias-surface-base)", border: "1px solid var(--alias-border-default)", borderRadius: "var(--radius-3xl, 16px)" }, children: [
16847
- /* @__PURE__ */ jsx33(SiconLock, { size: 24, color: MUTED_COLOR2 }),
16848
- /* @__PURE__ */ jsx33("h2", { style: { margin: 0, fontSize: 18, fontWeight: 600, color: PRIMARY_COLOR3 }, children: "Contact your workspace admin" }),
16849
- /* @__PURE__ */ jsx33("p", { style: { margin: 0, fontSize: 14, lineHeight: "22px", color: MUTED_COLOR2, maxWidth: 480 }, children: activeTab === "billing" ? "Your workspace admin manages credit top-ups, plans and billing history. Get in touch with them to add credits or request billing details." : "API Keys are available to workspace Admins only. Get in touch with your workspace admin to manage API access." }),
16850
- /* @__PURE__ */ jsx33("button", { type: "button", onClick: () => setActiveTab("workspaceMembers"), style: { alignSelf: "flex-start", marginTop: 8, padding: "8px 12px", background: "transparent", color: PRIMARY_COLOR3, border: "1px solid var(--alias-border-default)", borderRadius: 8, cursor: "pointer" }, children: "View workspace members" })
17273
+ (activeTab === "billing" || activeTab === "apikey") && !isWorkspaceAdmin && /* @__PURE__ */ jsxs32("section", { role: "status", className: "flex flex-col flex-1 min-w-0", style: { padding: 28, gap: 12, background: "var(--alias-surface-base)", border: "1px solid var(--alias-border-default)", borderRadius: "var(--radius-3xl, 16px)" }, children: [
17274
+ /* @__PURE__ */ jsx35(SiconLock, { size: 24, color: MUTED_COLOR2 }),
17275
+ /* @__PURE__ */ jsx35("h2", { style: { margin: 0, fontSize: 18, fontWeight: 600, color: PRIMARY_COLOR3 }, children: "Contact your workspace admin" }),
17276
+ /* @__PURE__ */ jsx35("p", { style: { margin: 0, fontSize: 14, lineHeight: "22px", color: MUTED_COLOR2, maxWidth: 480 }, children: activeTab === "billing" ? "Your workspace admin manages credit top-ups, plans and billing history. Get in touch with them to add credits or request billing details." : "API Keys are available to workspace Admins only. Get in touch with your workspace admin to manage API access." }),
17277
+ /* @__PURE__ */ jsx35("button", { type: "button", onClick: () => setActiveTab("workspaceMembers"), style: { alignSelf: "flex-start", marginTop: 8, padding: "8px 12px", background: "transparent", color: PRIMARY_COLOR3, border: "1px solid var(--alias-border-default)", borderRadius: 8, cursor: "pointer" }, children: "View workspace members" })
16851
17278
  ] }),
16852
- activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs30("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: [
16853
- /* @__PURE__ */ jsxs30(
17279
+ activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs32("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: [
17280
+ /* @__PURE__ */ jsxs32(
16854
17281
  "a",
16855
17282
  {
16856
17283
  href: "https://docs.streamoid.com",
@@ -16860,19 +17287,19 @@ function SettingsContentInner({
16860
17287
  className: "flex items-center shrink-0",
16861
17288
  style: { gap: 14, padding: "16px 20px", marginBottom: 16, border: "1px solid var(--alias-border-default)", borderRadius: "var(--radius-3xl, 16px)", background: "var(--alias-surface-base)", color: PRIMARY_COLOR3, textDecoration: "none" },
16862
17289
  children: [
16863
- /* @__PURE__ */ jsx33(SiconBookOpen, { size: 24 }),
16864
- /* @__PURE__ */ jsxs30("span", { style: { display: "flex", flexDirection: "column", gap: 4, flex: 1 }, children: [
16865
- /* @__PURE__ */ jsx33("span", { style: { fontSize: 14, fontWeight: 600 }, children: "Build with the Streamoid API" }),
16866
- /* @__PURE__ */ jsx33("span", { style: { fontSize: 13, lineHeight: "20px", color: MUTED_COLOR2 }, children: "Explore authentication, API references and integration guides." })
17290
+ /* @__PURE__ */ jsx35(SiconBookOpen, { size: 24 }),
17291
+ /* @__PURE__ */ jsxs32("span", { style: { display: "flex", flexDirection: "column", gap: 4, flex: 1 }, children: [
17292
+ /* @__PURE__ */ jsx35("span", { style: { fontSize: 14, fontWeight: 600 }, children: "Build with the Streamoid API" }),
17293
+ /* @__PURE__ */ jsx35("span", { style: { fontSize: 13, lineHeight: "20px", color: MUTED_COLOR2 }, children: "Explore authentication, API references and integration guides." })
16867
17294
  ] }),
16868
- /* @__PURE__ */ jsxs30("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontSize: 13, whiteSpace: "nowrap" }, children: [
17295
+ /* @__PURE__ */ jsxs32("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontSize: 13, whiteSpace: "nowrap" }, children: [
16869
17296
  "View docs ",
16870
- /* @__PURE__ */ jsx33(SiconExternalLink2, { size: 16 })
17297
+ /* @__PURE__ */ jsx35(SiconExternalLink2, { size: 16 })
16871
17298
  ] })
16872
17299
  ]
16873
17300
  }
16874
17301
  ),
16875
- /* @__PURE__ */ jsx33(
17302
+ /* @__PURE__ */ jsx35(
16876
17303
  TokensContent,
16877
17304
  {
16878
17305
  embedded: true,
@@ -16889,7 +17316,7 @@ function SettingsContentInner({
16889
17316
  ] })
16890
17317
  }
16891
17318
  ),
16892
- /* @__PURE__ */ jsx33(
17319
+ /* @__PURE__ */ jsx35(
16893
17320
  WorkspaceModal,
16894
17321
  {
16895
17322
  open: wsModalOpen,
@@ -16908,7 +17335,7 @@ function SettingsContentInner({
16908
17335
  }
16909
17336
  }
16910
17337
  ),
16911
- /* @__PURE__ */ jsx33(
17338
+ /* @__PURE__ */ jsx35(
16912
17339
  ConfirmLeaveModal,
16913
17340
  {
16914
17341
  open: confirmLeaveOpen,
@@ -16941,7 +17368,7 @@ function SettingsContentInner({
16941
17368
  }
16942
17369
  }
16943
17370
  ),
16944
- /* @__PURE__ */ jsx33(
17371
+ /* @__PURE__ */ jsx35(
16945
17372
  ConfirmDeleteModal,
16946
17373
  {
16947
17374
  open: confirmDeleteOpen,
@@ -16971,10 +17398,10 @@ function SettingsContentInner({
16971
17398
  }
16972
17399
 
16973
17400
  // src/workspace-picker.tsx
16974
- import { useState as useState26 } from "react";
16975
- import { ScButton as ScButton19, ScCheckbox } from "@streamoid/ui";
17401
+ import { useState as useState27 } from "react";
17402
+ import { ScButton as ScButton20, ScCheckbox } from "@streamoid/ui";
16976
17403
  import { SiconChevronDown, SiconChevronRight } from "@streamoid/icons";
16977
- import { Fragment as Fragment17, jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
17404
+ import { Fragment as Fragment18, jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
16978
17405
  var T19 = {
16979
17406
  primary: "var(--alias-text---icons-primary)",
16980
17407
  muted: "var(--alias-text---icons-muted)",
@@ -17015,14 +17442,14 @@ function WorkspacePicker({
17015
17442
  }
17016
17443
  ];
17017
17444
  const grouped = !!groups && sections.length > 1;
17018
- const [selected, setSelected] = useState26(/* @__PURE__ */ new Set());
17019
- const [collapsed, setCollapsed] = useState26(/* @__PURE__ */ new Set());
17020
- const [creating, setCreating] = useState26(false);
17021
- const [name, setName] = useState26("");
17022
- const [visibility, setVisibility] = useState26("shared");
17445
+ const [selected, setSelected] = useState27(/* @__PURE__ */ new Set());
17446
+ const [collapsed, setCollapsed] = useState27(/* @__PURE__ */ new Set());
17447
+ const [creating, setCreating] = useState27(false);
17448
+ const [name, setName] = useState27("");
17449
+ const [visibility, setVisibility] = useState27("shared");
17023
17450
  const creatable = onCreate ? sections.filter((s) => s.canCreate) : [];
17024
- const [createOrgId, setCreateOrgId] = useState26("");
17025
- const [busy, setBusy] = useState26(false);
17451
+ const [createOrgId, setCreateOrgId] = useState27("");
17452
+ const [busy, setBusy] = useState27(false);
17026
17453
  const total = sections.reduce((n, s) => n + s.workspaces.length, 0);
17027
17454
  const hasWorkspaces = total > 0;
17028
17455
  const canCreate = creatable.length > 0;
@@ -17057,7 +17484,7 @@ function WorkspacePicker({
17057
17484
  );
17058
17485
  const workspaceRow = (workspace, first) => {
17059
17486
  const checked = selected.has(workspace._id);
17060
- return /* @__PURE__ */ jsxs31(
17487
+ return /* @__PURE__ */ jsxs33(
17061
17488
  "div",
17062
17489
  {
17063
17490
  role: "checkbox",
@@ -17078,8 +17505,8 @@ function WorkspacePicker({
17078
17505
  }
17079
17506
  },
17080
17507
  children: [
17081
- /* @__PURE__ */ jsx34(ScCheckbox, { checked }),
17082
- /* @__PURE__ */ jsx34(
17508
+ /* @__PURE__ */ jsx36(ScCheckbox, { checked }),
17509
+ /* @__PURE__ */ jsx36(
17083
17510
  ProfileAvatar,
17084
17511
  {
17085
17512
  name: workspace.name,
@@ -17088,8 +17515,8 @@ function WorkspacePicker({
17088
17515
  borderRadius: T19.rLg
17089
17516
  }
17090
17517
  ),
17091
- /* @__PURE__ */ jsxs31("div", { className: "flex flex-col min-w-0", children: [
17092
- /* @__PURE__ */ jsx34(
17518
+ /* @__PURE__ */ jsxs33("div", { className: "flex flex-col min-w-0", children: [
17519
+ /* @__PURE__ */ jsx36(
17093
17520
  "span",
17094
17521
  {
17095
17522
  className: "truncate",
@@ -17097,7 +17524,7 @@ function WorkspacePicker({
17097
17524
  children: workspace.name
17098
17525
  }
17099
17526
  ),
17100
- workspace.ownerName && /* @__PURE__ */ jsxs31(
17527
+ workspace.ownerName && /* @__PURE__ */ jsxs33(
17101
17528
  "span",
17102
17529
  {
17103
17530
  className: "truncate",
@@ -17118,8 +17545,8 @@ function WorkspacePicker({
17118
17545
  const isCollapsed = collapsed.has(section.organizationId);
17119
17546
  const picked = section.workspaces.filter((w) => selected.has(w._id)).length;
17120
17547
  const Chevron = isCollapsed ? SiconChevronRight : SiconChevronDown;
17121
- return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col w-full", children: [
17122
- /* @__PURE__ */ jsxs31(
17548
+ return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col w-full", children: [
17549
+ /* @__PURE__ */ jsxs33(
17123
17550
  "div",
17124
17551
  {
17125
17552
  role: "button",
@@ -17143,8 +17570,8 @@ function WorkspacePicker({
17143
17570
  }
17144
17571
  },
17145
17572
  children: [
17146
- /* @__PURE__ */ jsx34(Chevron, { className: "w-4 h-4", color: T19.muted }),
17147
- /* @__PURE__ */ jsx34(
17573
+ /* @__PURE__ */ jsx36(Chevron, { className: "w-4 h-4", color: T19.muted }),
17574
+ /* @__PURE__ */ jsx36(
17148
17575
  ProfileAvatar,
17149
17576
  {
17150
17577
  name: section.organizationName,
@@ -17153,7 +17580,7 @@ function WorkspacePicker({
17153
17580
  borderRadius: T19.rLg
17154
17581
  }
17155
17582
  ),
17156
- /* @__PURE__ */ jsx34(
17583
+ /* @__PURE__ */ jsx36(
17157
17584
  "span",
17158
17585
  {
17159
17586
  className: "truncate flex-1 min-w-0",
@@ -17161,11 +17588,11 @@ function WorkspacePicker({
17161
17588
  children: section.organizationName
17162
17589
  }
17163
17590
  ),
17164
- /* @__PURE__ */ jsx34("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs, flexShrink: 0 }, children: picked ? `${picked} of ${section.workspaces.length} selected` : `${section.workspaces.length} workspace${section.workspaces.length === 1 ? "" : "s"}` })
17591
+ /* @__PURE__ */ jsx36("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs, flexShrink: 0 }, children: picked ? `${picked} of ${section.workspaces.length} selected` : `${section.workspaces.length} workspace${section.workspaces.length === 1 ? "" : "s"}` })
17165
17592
  ]
17166
17593
  }
17167
17594
  ),
17168
- !isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */ jsx34(
17595
+ !isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */ jsx36(
17169
17596
  "div",
17170
17597
  {
17171
17598
  style: {
@@ -17180,14 +17607,14 @@ function WorkspacePicker({
17180
17607
  ))
17181
17608
  ] }, section.organizationId);
17182
17609
  };
17183
- return /* @__PURE__ */ jsxs31(
17610
+ return /* @__PURE__ */ jsxs33(
17184
17611
  "div",
17185
17612
  {
17186
17613
  className: "flex flex-col w-full",
17187
17614
  style: { maxWidth: 520, gap: T19.sp5xl, fontFamily: T19.font },
17188
17615
  children: [
17189
- /* @__PURE__ */ jsxs31("div", { className: "flex flex-col", style: { gap: T19.spMd }, children: [
17190
- /* @__PURE__ */ jsx34(
17616
+ /* @__PURE__ */ jsxs33("div", { className: "flex flex-col", style: { gap: T19.spMd }, children: [
17617
+ /* @__PURE__ */ jsx36(
17191
17618
  "p",
17192
17619
  {
17193
17620
  style: {
@@ -17200,9 +17627,9 @@ function WorkspacePicker({
17200
17627
  children: "Choose your workspaces"
17201
17628
  }
17202
17629
  ),
17203
- /* @__PURE__ */ jsx34("p", { style: { color: T19.muted, fontSize: T19.fsSm, lineHeight: T19.lhSm, margin: 0 }, children: hasWorkspaces || loading ? canCreate ? `Join one or more workspaces in ${orgLabel} as a member, or create your own.` : `Join one or more workspaces in ${orgLabel} as a member.` : canCreate ? `There are no workspaces to join in ${orgLabel} yet. Create one to get started.` : `There are no workspaces you can join in ${orgLabel} yet. Ask an admin${grouped ? "" : ` of ${orgLabel}`} to invite you to one.` })
17630
+ /* @__PURE__ */ jsx36("p", { style: { color: T19.muted, fontSize: T19.fsSm, lineHeight: T19.lhSm, margin: 0 }, children: hasWorkspaces || loading ? canCreate ? `Join one or more workspaces in ${orgLabel} as a member, or create your own.` : `Join one or more workspaces in ${orgLabel} as a member.` : canCreate ? `There are no workspaces to join in ${orgLabel} yet. Create one to get started.` : `There are no workspaces you can join in ${orgLabel} yet. Ask an admin${grouped ? "" : ` of ${orgLabel}`} to invite you to one.` })
17204
17631
  ] }),
17205
- (loading || hasWorkspaces) && /* @__PURE__ */ jsx34(
17632
+ (loading || hasWorkspaces) && /* @__PURE__ */ jsx36(
17206
17633
  "div",
17207
17634
  {
17208
17635
  className: "flex flex-col w-full overflow-y-auto",
@@ -17212,7 +17639,7 @@ function WorkspacePicker({
17212
17639
  border: `1px solid ${T19.borderSubtle}`,
17213
17640
  borderRadius: T19.r3xl
17214
17641
  },
17215
- children: loading ? /* @__PURE__ */ jsx34(
17642
+ children: loading ? /* @__PURE__ */ jsx36(
17216
17643
  "div",
17217
17644
  {
17218
17645
  className: "flex items-center justify-center",
@@ -17222,9 +17649,9 @@ function WorkspacePicker({
17222
17649
  ) : grouped ? sections.map(groupSection) : sections[0].workspaces.map((w, index) => workspaceRow(w, index === 0))
17223
17650
  }
17224
17651
  ),
17225
- showCreate ? /* @__PURE__ */ jsxs31("div", { className: "flex flex-col w-full", style: { gap: T19.spMd }, children: [
17226
- creatable.length > 1 && /* @__PURE__ */ jsxs31(Fragment17, { children: [
17227
- /* @__PURE__ */ jsx34(
17652
+ showCreate ? /* @__PURE__ */ jsxs33("div", { className: "flex flex-col w-full", style: { gap: T19.spMd }, children: [
17653
+ creatable.length > 1 && /* @__PURE__ */ jsxs33(Fragment18, { children: [
17654
+ /* @__PURE__ */ jsx36(
17228
17655
  "label",
17229
17656
  {
17230
17657
  htmlFor: "workspace-picker-organization",
@@ -17232,7 +17659,7 @@ function WorkspacePicker({
17232
17659
  children: "Organization"
17233
17660
  }
17234
17661
  ),
17235
- /* @__PURE__ */ jsx34(
17662
+ /* @__PURE__ */ jsx36(
17236
17663
  "select",
17237
17664
  {
17238
17665
  id: "workspace-picker-organization",
@@ -17249,11 +17676,11 @@ function WorkspacePicker({
17249
17676
  fontFamily: T19.font,
17250
17677
  fontSize: T19.fsSm
17251
17678
  },
17252
- children: creatable.map((s) => /* @__PURE__ */ jsx34("option", { value: s.organizationId, children: s.organizationName }, s.organizationId))
17679
+ children: creatable.map((s) => /* @__PURE__ */ jsx36("option", { value: s.organizationId, children: s.organizationName }, s.organizationId))
17253
17680
  }
17254
17681
  )
17255
17682
  ] }),
17256
- /* @__PURE__ */ jsx34(
17683
+ /* @__PURE__ */ jsx36(
17257
17684
  "label",
17258
17685
  {
17259
17686
  htmlFor: "workspace-picker-name",
@@ -17261,7 +17688,7 @@ function WorkspacePicker({
17261
17688
  children: "New workspace name"
17262
17689
  }
17263
17690
  ),
17264
- /* @__PURE__ */ jsx34(
17691
+ /* @__PURE__ */ jsx36(
17265
17692
  "input",
17266
17693
  {
17267
17694
  id: "workspace-picker-name",
@@ -17285,12 +17712,12 @@ function WorkspacePicker({
17285
17712
  }
17286
17713
  }
17287
17714
  ),
17288
- /* @__PURE__ */ jsx34("div", { role: "radiogroup", className: "flex w-full", style: { gap: T19.spMd }, children: [
17715
+ /* @__PURE__ */ jsx36("div", { role: "radiogroup", className: "flex w-full", style: { gap: T19.spMd }, children: [
17289
17716
  ["shared", "Shared", `Anyone in ${createLabel} can join`],
17290
17717
  ["private", "Private", "Invite only"]
17291
17718
  ].map(([value, label, hint]) => {
17292
17719
  const active = visibility === value;
17293
- return /* @__PURE__ */ jsxs31(
17720
+ return /* @__PURE__ */ jsxs33(
17294
17721
  "div",
17295
17722
  {
17296
17723
  role: "radio",
@@ -17311,7 +17738,7 @@ function WorkspacePicker({
17311
17738
  border: `1px solid ${active ? T19.primary : T19.borderSubtle}`
17312
17739
  },
17313
17740
  children: [
17314
- /* @__PURE__ */ jsx34(
17741
+ /* @__PURE__ */ jsx36(
17315
17742
  "span",
17316
17743
  {
17317
17744
  style: {
@@ -17323,15 +17750,15 @@ function WorkspacePicker({
17323
17750
  children: label
17324
17751
  }
17325
17752
  ),
17326
- /* @__PURE__ */ jsx34("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs }, children: hint })
17753
+ /* @__PURE__ */ jsx36("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs }, children: hint })
17327
17754
  ]
17328
17755
  },
17329
17756
  value
17330
17757
  );
17331
17758
  }) }),
17332
- /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-end w-full", style: { gap: T19.spMd }, children: [
17333
- hasWorkspaces && /* @__PURE__ */ jsx34(
17334
- ScButton19,
17759
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-end w-full", style: { gap: T19.spMd }, children: [
17760
+ hasWorkspaces && /* @__PURE__ */ jsx36(
17761
+ ScButton20,
17335
17762
  {
17336
17763
  text: "Back",
17337
17764
  variant: "tertiary",
@@ -17339,8 +17766,8 @@ function WorkspacePicker({
17339
17766
  onClick: () => setCreating(false)
17340
17767
  }
17341
17768
  ),
17342
- /* @__PURE__ */ jsx34(
17343
- ScButton19,
17769
+ /* @__PURE__ */ jsx36(
17770
+ ScButton20,
17344
17771
  {
17345
17772
  text: busy ? "Creating\u2026" : "Create workspace",
17346
17773
  variant: "primary",
@@ -17350,9 +17777,9 @@ function WorkspacePicker({
17350
17777
  }
17351
17778
  )
17352
17779
  ] })
17353
- ] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */ jsxs31("div", { className: "flex flex-wrap items-center justify-between w-full", style: { gap: T19.spMd }, children: [
17354
- canCreate ? /* @__PURE__ */ jsx34(
17355
- ScButton19,
17780
+ ] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */ jsxs33("div", { className: "flex flex-wrap items-center justify-between w-full", style: { gap: T19.spMd }, children: [
17781
+ canCreate ? /* @__PURE__ */ jsx36(
17782
+ ScButton20,
17356
17783
  {
17357
17784
  text: "Create a workspace",
17358
17785
  variant: "tertiary",
@@ -17360,9 +17787,9 @@ function WorkspacePicker({
17360
17787
  state: loading || busy ? "disabled" : "default",
17361
17788
  onClick: loading || busy ? void 0 : () => setCreating(true)
17362
17789
  }
17363
- ) : /* @__PURE__ */ jsx34("span", {}),
17364
- /* @__PURE__ */ jsx34(
17365
- ScButton19,
17790
+ ) : /* @__PURE__ */ jsx36("span", {}),
17791
+ /* @__PURE__ */ jsx36(
17792
+ ScButton20,
17366
17793
  {
17367
17794
  text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} workspaces` : "Join workspace",
17368
17795
  variant: "primary",
@@ -17378,9 +17805,9 @@ function WorkspacePicker({
17378
17805
  }
17379
17806
 
17380
17807
  // src/organization-picker.tsx
17381
- import { useEffect as useEffect21, useState as useState27 } from "react";
17382
- import { ScButton as ScButton20, ScCheckbox as ScCheckbox2 } from "@streamoid/ui";
17383
- import { Fragment as Fragment18, jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
17808
+ import { useEffect as useEffect21, useState as useState28 } from "react";
17809
+ import { ScButton as ScButton21, ScCheckbox as ScCheckbox2 } from "@streamoid/ui";
17810
+ import { Fragment as Fragment19, jsx as jsx37, jsxs as jsxs34 } from "react/jsx-runtime";
17384
17811
  var T20 = {
17385
17812
  primary: "var(--alias-text---icons-primary)",
17386
17813
  muted: "var(--alias-text---icons-muted)",
@@ -17414,16 +17841,16 @@ function OrganizationPicker({
17414
17841
  onJoin,
17415
17842
  onCreate
17416
17843
  }) {
17417
- const [selected, setSelected] = useState27(/* @__PURE__ */ new Set());
17844
+ const [selected, setSelected] = useState28(/* @__PURE__ */ new Set());
17418
17845
  const toggle = (id) => setSelected((prev) => {
17419
17846
  const next = new Set(prev);
17420
17847
  if (next.has(id)) next.delete(id);
17421
17848
  else next.add(id);
17422
17849
  return next;
17423
17850
  });
17424
- const [name, setName] = useState27(suggestedName);
17425
- const [type, setType] = useState27("shared");
17426
- const [busy, setBusy] = useState27(false);
17851
+ const [name, setName] = useState28(suggestedName);
17852
+ const [type, setType] = useState28("shared");
17853
+ const [busy, setBusy] = useState28(false);
17427
17854
  useEffect21(() => {
17428
17855
  setName((current) => current || suggestedName);
17429
17856
  }, [suggestedName]);
@@ -17440,18 +17867,18 @@ function OrganizationPicker({
17440
17867
  const heading = choosing ? "Choose your organization" : "Create your organization";
17441
17868
  const subheading = choosing ? `${companyDomain ?? "Your company"} has more than one organization. Pick the ones to join as a member.` : publicDomain ? "Create an organization for your team. Or, if your team already uses Streamoid, ask them to invite you." : `Nobody from ${companyDomain ?? "your company"} has set up an organization you can join yet. Create one; you'll be its admin.`;
17442
17869
  const textStyle = { margin: 0, fontFamily: T20.font };
17443
- return /* @__PURE__ */ jsxs32(
17870
+ return /* @__PURE__ */ jsxs34(
17444
17871
  "div",
17445
17872
  {
17446
17873
  className: "flex flex-col w-full",
17447
17874
  style: { maxWidth: 520, gap: T20.sp5xl, fontFamily: T20.font },
17448
17875
  children: [
17449
- /* @__PURE__ */ jsxs32("div", { className: "flex flex-col", style: { gap: T20.spMd }, children: [
17450
- /* @__PURE__ */ jsx35("p", { style: { ...textStyle, color: T20.primary, fontSize: T20.fsXl, fontWeight: 600, lineHeight: T20.lhXl }, children: heading }),
17451
- /* @__PURE__ */ jsx35("p", { style: { ...textStyle, color: T20.muted, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: loading ? "Looking up your company\u2026" : subheading })
17876
+ /* @__PURE__ */ jsxs34("div", { className: "flex flex-col", style: { gap: T20.spMd }, children: [
17877
+ /* @__PURE__ */ jsx37("p", { style: { ...textStyle, color: T20.primary, fontSize: T20.fsXl, fontWeight: 600, lineHeight: T20.lhXl }, children: heading }),
17878
+ /* @__PURE__ */ jsx37("p", { style: { ...textStyle, color: T20.muted, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: loading ? "Looking up your company\u2026" : subheading })
17452
17879
  ] }),
17453
- !loading && choosing && /* @__PURE__ */ jsxs32(Fragment18, { children: [
17454
- /* @__PURE__ */ jsx35(
17880
+ !loading && choosing && /* @__PURE__ */ jsxs34(Fragment19, { children: [
17881
+ /* @__PURE__ */ jsx37(
17455
17882
  "div",
17456
17883
  {
17457
17884
  role: "group",
@@ -17464,7 +17891,7 @@ function OrganizationPicker({
17464
17891
  },
17465
17892
  children: organizations.map((org, index) => {
17466
17893
  const checked = selected.has(org._id);
17467
- return /* @__PURE__ */ jsxs32(
17894
+ return /* @__PURE__ */ jsxs34(
17468
17895
  "div",
17469
17896
  {
17470
17897
  role: "checkbox",
@@ -17485,11 +17912,11 @@ function OrganizationPicker({
17485
17912
  }
17486
17913
  },
17487
17914
  children: [
17488
- /* @__PURE__ */ jsx35(ScCheckbox2, { checked }),
17489
- /* @__PURE__ */ jsx35(ProfileAvatar, { name: org.name, profileImage: org.imageUrl, size: 32, borderRadius: T20.rLg }),
17490
- /* @__PURE__ */ jsxs32("div", { className: "flex flex-col min-w-0", children: [
17491
- /* @__PURE__ */ jsx35("span", { className: "truncate", style: { color: T20.primary, fontSize: T20.fsSm, fontWeight: 500, lineHeight: T20.lhSm }, children: org.name }),
17492
- org.domain && /* @__PURE__ */ jsx35("span", { className: "truncate", style: { color: T20.muted, fontSize: T20.fsXs, lineHeight: T20.lhXs }, children: org.domain })
17915
+ /* @__PURE__ */ jsx37(ScCheckbox2, { checked }),
17916
+ /* @__PURE__ */ jsx37(ProfileAvatar, { name: org.name, profileImage: org.imageUrl, size: 32, borderRadius: T20.rLg }),
17917
+ /* @__PURE__ */ jsxs34("div", { className: "flex flex-col min-w-0", children: [
17918
+ /* @__PURE__ */ jsx37("span", { className: "truncate", style: { color: T20.primary, fontSize: T20.fsSm, fontWeight: 500, lineHeight: T20.lhSm }, children: org.name }),
17919
+ org.domain && /* @__PURE__ */ jsx37("span", { className: "truncate", style: { color: T20.muted, fontSize: T20.fsXs, lineHeight: T20.lhXs }, children: org.domain })
17493
17920
  ] })
17494
17921
  ]
17495
17922
  },
@@ -17498,8 +17925,8 @@ function OrganizationPicker({
17498
17925
  })
17499
17926
  }
17500
17927
  ),
17501
- /* @__PURE__ */ jsx35("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx35(
17502
- ScButton20,
17928
+ /* @__PURE__ */ jsx37("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx37(
17929
+ ScButton21,
17503
17930
  {
17504
17931
  text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} organizations` : "Join organization",
17505
17932
  variant: "primary",
@@ -17509,10 +17936,10 @@ function OrganizationPicker({
17509
17936
  }
17510
17937
  ) })
17511
17938
  ] }),
17512
- !loading && !choosing && /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: T20.sp3xl }, children: [
17513
- /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
17514
- /* @__PURE__ */ jsx35("label", { htmlFor: "organization-picker-name", style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Organization name" }),
17515
- /* @__PURE__ */ jsx35(
17939
+ !loading && !choosing && /* @__PURE__ */ jsxs34("div", { className: "flex flex-col w-full", style: { gap: T20.sp3xl }, children: [
17940
+ /* @__PURE__ */ jsxs34("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
17941
+ /* @__PURE__ */ jsx37("label", { htmlFor: "organization-picker-name", style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Organization name" }),
17942
+ /* @__PURE__ */ jsx37(
17516
17943
  "input",
17517
17944
  {
17518
17945
  id: "organization-picker-name",
@@ -17534,14 +17961,14 @@ function OrganizationPicker({
17534
17961
  }
17535
17962
  )
17536
17963
  ] }),
17537
- !publicDomain && /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
17538
- /* @__PURE__ */ jsx35("span", { style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Who can join" }),
17539
- /* @__PURE__ */ jsx35("div", { role: "radiogroup", className: "flex w-full", style: { gap: T20.spMd }, children: [
17964
+ !publicDomain && /* @__PURE__ */ jsxs34("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
17965
+ /* @__PURE__ */ jsx37("span", { style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Who can join" }),
17966
+ /* @__PURE__ */ jsx37("div", { role: "radiogroup", className: "flex w-full", style: { gap: T20.spMd }, children: [
17540
17967
  ["shared", "Shared"],
17541
17968
  ["private", "Private"]
17542
17969
  ].map(([value, label]) => {
17543
17970
  const active = type === value;
17544
- return /* @__PURE__ */ jsx35(
17971
+ return /* @__PURE__ */ jsx37(
17545
17972
  "div",
17546
17973
  {
17547
17974
  role: "radio",
@@ -17560,12 +17987,12 @@ function OrganizationPicker({
17560
17987
  borderRadius: T20.r3xl,
17561
17988
  border: `1px solid ${active ? T20.primary : T20.borderSubtle}`
17562
17989
  },
17563
- children: /* @__PURE__ */ jsx35("span", { style: { color: T20.primary, fontSize: T20.fsSm, lineHeight: T20.lhSm, fontWeight: active ? 600 : 400 }, children: label })
17990
+ children: /* @__PURE__ */ jsx37("span", { style: { color: T20.primary, fontSize: T20.fsSm, lineHeight: T20.lhSm, fontWeight: active ? 600 : 400 }, children: label })
17564
17991
  },
17565
17992
  value
17566
17993
  );
17567
17994
  }) }),
17568
- /* @__PURE__ */ jsx35(
17995
+ /* @__PURE__ */ jsx37(
17569
17996
  "span",
17570
17997
  {
17571
17998
  "data-testid": "organization-visibility-message",
@@ -17575,8 +18002,8 @@ function OrganizationPicker({
17575
18002
  }
17576
18003
  )
17577
18004
  ] }),
17578
- /* @__PURE__ */ jsx35("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx35(
17579
- ScButton20,
18005
+ /* @__PURE__ */ jsx37("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx37(
18006
+ ScButton21,
17580
18007
  {
17581
18008
  text: busy ? "Creating\u2026" : "Create organization",
17582
18009
  variant: "primary",
@@ -17592,12 +18019,12 @@ function OrganizationPicker({
17592
18019
  }
17593
18020
 
17594
18021
  // src/use-billing-entitlement.ts
17595
- import { useEffect as useEffect22, useRef as useRef13, useState as useState28 } from "react";
18022
+ import { useEffect as useEffect22, useRef as useRef13, useState as useState29 } from "react";
17596
18023
  function useBillingEntitlement(fetchCurrentPlan, key) {
17597
18024
  const fetchRef = useRef13(fetchCurrentPlan);
17598
18025
  fetchRef.current = fetchCurrentPlan;
17599
- const [state, setState] = useState28(null);
17600
- const [loading, setLoading] = useState28(false);
18026
+ const [state, setState] = useState29(null);
18027
+ const [loading, setLoading] = useState29(false);
17601
18028
  useEffect22(() => {
17602
18029
  const fetch2 = fetchRef.current;
17603
18030
  setState(null);
@@ -17683,18 +18110,18 @@ var app_settings_page_default = {
17683
18110
  };
17684
18111
 
17685
18112
  // src/app-settings-page.tsx
17686
- import { Fragment as Fragment19, jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
18113
+ import { Fragment as Fragment20, jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
17687
18114
  function AppSettingsHeader({ administrationHref, onOpenAdministration, onClose }) {
17688
- return /* @__PURE__ */ jsxs33("header", { className: app_settings_page_default.header, children: [
17689
- /* @__PURE__ */ jsx36("h1", { children: "App settings" }),
17690
- /* @__PURE__ */ jsxs33("div", { className: app_settings_page_default.actions, children: [
17691
- /* @__PURE__ */ jsx36("a", { href: administrationHref, onClick: (event) => {
18115
+ return /* @__PURE__ */ jsxs35("header", { className: app_settings_page_default.header, children: [
18116
+ /* @__PURE__ */ jsx38("h1", { children: "App settings" }),
18117
+ /* @__PURE__ */ jsxs35("div", { className: app_settings_page_default.actions, children: [
18118
+ /* @__PURE__ */ jsx38("a", { href: administrationHref, onClick: (event) => {
17692
18119
  if (onOpenAdministration && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
17693
18120
  event.preventDefault();
17694
18121
  onOpenAdministration();
17695
18122
  }
17696
18123
  }, children: "Account and workspace settings" }),
17697
- onClose ? /* @__PURE__ */ jsx36("button", { type: "button", className: app_settings_page_default.close, "aria-label": "Close App settings", onClick: onClose, children: /* @__PURE__ */ jsx36(SiconX, { size: 20, "aria-hidden": "true" }) }) : null
18124
+ onClose ? /* @__PURE__ */ jsx38("button", { type: "button", className: app_settings_page_default.close, "aria-label": "Close App settings", onClick: onClose, children: /* @__PURE__ */ jsx38(SiconX, { size: 20, "aria-hidden": "true" }) }) : null
17698
18125
  ] })
17699
18126
  ] });
17700
18127
  }
@@ -17706,45 +18133,45 @@ function AppSettingsPage({
17706
18133
  emptyDescription = "Account, workspace and organization settings are available above.",
17707
18134
  children
17708
18135
  }) {
17709
- return /* @__PURE__ */ jsxs33("div", { className: app_settings_page_default.page, children: [
17710
- /* @__PURE__ */ jsx36(AppSettingsHeader, { administrationHref, onOpenAdministration, onClose }),
17711
- children ?? /* @__PURE__ */ jsxs33("section", { className: app_settings_page_default.empty, "aria-label": "App settings empty state", children: [
17712
- /* @__PURE__ */ jsx36("h2", { children: emptyTitle }),
17713
- /* @__PURE__ */ jsx36("p", { children: emptyDescription })
18136
+ return /* @__PURE__ */ jsxs35("div", { className: app_settings_page_default.page, children: [
18137
+ /* @__PURE__ */ jsx38(AppSettingsHeader, { administrationHref, onOpenAdministration, onClose }),
18138
+ children ?? /* @__PURE__ */ jsxs35("section", { className: app_settings_page_default.empty, "aria-label": "App settings empty state", children: [
18139
+ /* @__PURE__ */ jsx38("h2", { children: emptyTitle }),
18140
+ /* @__PURE__ */ jsx38("p", { children: emptyDescription })
17714
18141
  ] })
17715
18142
  ] });
17716
18143
  }
17717
18144
  function AppSettingsSection({ title, action, children }) {
17718
- return /* @__PURE__ */ jsxs33("section", { className: app_settings_page_default.section, "aria-label": title, children: [
17719
- /* @__PURE__ */ jsxs33("div", { className: app_settings_page_default.sectionHeader, children: [
17720
- /* @__PURE__ */ jsx36("h2", { children: title }),
17721
- action ? /* @__PURE__ */ jsx36("div", { className: app_settings_page_default.sectionAction, children: action }) : null
18145
+ return /* @__PURE__ */ jsxs35("section", { className: app_settings_page_default.section, "aria-label": title, children: [
18146
+ /* @__PURE__ */ jsxs35("div", { className: app_settings_page_default.sectionHeader, children: [
18147
+ /* @__PURE__ */ jsx38("h2", { children: title }),
18148
+ action ? /* @__PURE__ */ jsx38("div", { className: app_settings_page_default.sectionAction, children: action }) : null
17722
18149
  ] }),
17723
- /* @__PURE__ */ jsx36("div", { children })
18150
+ /* @__PURE__ */ jsx38("div", { children })
17724
18151
  ] });
17725
18152
  }
17726
18153
  function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }) {
17727
18154
  const reasonId = useId2();
17728
- const content = /* @__PURE__ */ jsxs33(Fragment19, { children: [
17729
- /* @__PURE__ */ jsxs33("span", { className: app_settings_page_default.rowCopy, children: [
17730
- /* @__PURE__ */ jsx36("span", { className: app_settings_page_default.rowTitle, children: title }),
17731
- description ? /* @__PURE__ */ jsx36("span", { className: app_settings_page_default.rowDescription, children: description }) : null
18155
+ const content = /* @__PURE__ */ jsxs35(Fragment20, { children: [
18156
+ /* @__PURE__ */ jsxs35("span", { className: app_settings_page_default.rowCopy, children: [
18157
+ /* @__PURE__ */ jsx38("span", { className: app_settings_page_default.rowTitle, children: title }),
18158
+ description ? /* @__PURE__ */ jsx38("span", { className: app_settings_page_default.rowDescription, children: description }) : null
17732
18159
  ] }),
17733
- summary || trailing || href || onClick ? /* @__PURE__ */ jsxs33("span", { className: app_settings_page_default.rowEnd, children: [
18160
+ summary || trailing || href || onClick ? /* @__PURE__ */ jsxs35("span", { className: app_settings_page_default.rowEnd, children: [
17734
18161
  summary,
17735
- trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */ jsx36(SiconArrowRight2, { size: 18, "aria-hidden": "true" }) : null)
18162
+ trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */ jsx38(SiconArrowRight2, { size: 18, "aria-hidden": "true" }) : null)
17736
18163
  ] }) : null,
17737
- disabledReason ? /* @__PURE__ */ jsx36("span", { className: app_settings_page_default.srOnly, id: reasonId, children: disabledReason }) : null
18164
+ disabledReason ? /* @__PURE__ */ jsx38("span", { className: app_settings_page_default.srOnly, id: reasonId, children: disabledReason }) : null
17738
18165
  ] });
17739
18166
  const props = { className: app_settings_page_default.row, "aria-label": ariaLabel, "aria-describedby": disabledReason ? reasonId : void 0 };
17740
- if (href && !disabled) return /* @__PURE__ */ jsx36("a", { ...props, href, onClick: (event) => {
18167
+ if (href && !disabled) return /* @__PURE__ */ jsx38("a", { ...props, href, onClick: (event) => {
17741
18168
  if (onClick && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
17742
18169
  event.preventDefault();
17743
18170
  onClick();
17744
18171
  }
17745
18172
  }, children: content });
17746
- if (onClick || disabled) return /* @__PURE__ */ jsx36("button", { ...props, type: "button", disabled, onClick, children: content });
17747
- return /* @__PURE__ */ jsx36("div", { ...props, children: content });
18173
+ if (onClick || disabled) return /* @__PURE__ */ jsx38("button", { ...props, type: "button", disabled, onClick, children: content });
18174
+ return /* @__PURE__ */ jsx38("div", { ...props, children: content });
17748
18175
  }
17749
18176
  export {
17750
18177
  APP_KEYS,
@@ -17768,11 +18195,13 @@ export {
17768
18195
  ExportDateModal,
17769
18196
  INITIAL_USAGE_LOGS_STATE,
17770
18197
  InviteUpdateModal,
18198
+ MOCK_REFERRED_USERS,
17771
18199
  MemberCreditLimitModal,
17772
18200
  MemberListFrame,
17773
18201
  MemberListToolbar,
17774
18202
  OrganizationContent,
17775
18203
  OrganizationIntegrationsContent,
18204
+ OrganizationLoginMethodsContent,
17776
18205
  OrganizationMemberModal,
17777
18206
  OrganizationModal,
17778
18207
  OrganizationPicker,
@@ -17783,6 +18212,7 @@ export {
17783
18212
  ProfileAvatar,
17784
18213
  ProfileTab,
17785
18214
  REMOVE_REASON_MAX_LENGTH,
18215
+ ReferralHistoryView,
17786
18216
  ReferralTab,
17787
18217
  RemovePoolMemberModal,
17788
18218
  SCOPE_LABELS,
@@ -17845,6 +18275,7 @@ export {
17845
18275
  limitSourceLabel,
17846
18276
  loadCurrentPlan,
17847
18277
  loadWorkspaceOrganization,
18278
+ loginMethodsSwitchState,
17848
18279
  memberRoleUpdate,
17849
18280
  minPoolEndDate,
17850
18281
  minimumCreditLimit,
@@ -17859,7 +18290,9 @@ export {
17859
18290
  productsForCountry,
17860
18291
  readSettingsCaller,
17861
18292
  referralCodeOf,
18293
+ referralCountLabel,
17862
18294
  referralLink,
18295
+ referralSignupDate,
17863
18296
  rememberSettingsCaller,
17864
18297
  resolveSettingsTabFromPath,
17865
18298
  roundCredits,
@@ -17867,6 +18300,7 @@ export {
17867
18300
  sharedPoolBannerText,
17868
18301
  sharedPoolEndsText,
17869
18302
  sliceUsageLogsPage,
18303
+ sortReferredUsers,
17870
18304
  sponsoredCreditsText,
17871
18305
  toCsv,
17872
18306
  toLocalDateInput,