@ag2/weave 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/components/account-card/AccountCard.css.d.ts +2 -0
  2. package/dist/components/account-card/AccountCard.d.ts +10 -0
  3. package/dist/components/account-card/index.d.ts +1 -0
  4. package/dist/components/color-swatch-picker/ColorSwatchPicker.css.d.ts +4 -0
  5. package/dist/components/color-swatch-picker/ColorSwatchPicker.d.ts +17 -0
  6. package/dist/components/color-swatch-picker/index.d.ts +1 -0
  7. package/dist/components/form/Form.d.ts +2 -0
  8. package/dist/components/index.d.ts +7 -0
  9. package/dist/components/media-frame/MediaFrame.css.d.ts +6 -0
  10. package/dist/components/media-frame/MediaFrame.d.ts +19 -0
  11. package/dist/components/media-frame/index.d.ts +1 -0
  12. package/dist/components/onboarding-key-button/OnboardingKeyButton.css.d.ts +4 -0
  13. package/dist/components/onboarding-key-button/OnboardingKeyButton.d.ts +12 -0
  14. package/dist/components/onboarding-key-button/index.d.ts +1 -0
  15. package/dist/components/onboarding-motion/OnboardingMotion.css.d.ts +6 -0
  16. package/dist/components/onboarding-motion/OnboardingMotion.d.ts +34 -0
  17. package/dist/components/onboarding-motion/index.d.ts +1 -0
  18. package/dist/components/onboarding-setup/OnboardingSetup.css.d.ts +13 -0
  19. package/dist/components/onboarding-setup/OnboardingSetup.d.ts +62 -0
  20. package/dist/components/onboarding-setup/index.d.ts +1 -0
  21. package/dist/components/option-card/OptionCard.css.d.ts +6 -0
  22. package/dist/components/option-card/OptionCard.d.ts +14 -0
  23. package/dist/components/option-card/index.d.ts +1 -0
  24. package/dist/components/orb-background/OrbBackground.d.ts +3 -2
  25. package/dist/components/orb-background/orbField.d.ts +16 -1
  26. package/dist/index.js +906 -105
  27. package/dist/index.js.map +1 -1
  28. package/dist/style.css +476 -1
  29. package/dist/theme/agentColors.d.ts +47 -0
  30. package/dist/theme/auraColors.d.ts +39 -0
  31. package/dist/theme/index.d.ts +3 -0
  32. package/dist/theme/onboarding.d.ts +10 -0
  33. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -862,6 +862,47 @@ const readingTypography = {
862
862
  measure: "75ch"
863
863
  }
864
864
  };
865
+ const onboardingTokens = {
866
+ surface: colorScale.Neutral[0],
867
+ ink: brandColors.Ink,
868
+ keyFill: brandColors.Ink,
869
+ keyInk: colorScale.Neutral[0],
870
+ keyPressedInk: brandColors.Ink,
871
+ keyGradient: `linear-gradient(105deg, ${brandColors.Sky}, ${brandColors.Pink} 52%, ${brandColors.Orange})`,
872
+ cardShadow: `0 8px 32px color-mix(in srgb, ${brandColors.Ink} 9%, transparent)`
873
+ };
874
+ const agentColorTokens = {
875
+ ember: { label: "Ember", center: brandColors.Orange, rim: colorScale.Orange[600] },
876
+ pink: { label: "Pink", center: brandColors.Pink, rim: colorScale.Pink[500] },
877
+ sky: { label: "Sky", center: brandColors.Sky, rim: brandColors.Indigo },
878
+ mint: { label: "Mint", center: brandColors.Mint, rim: brandColors.Green },
879
+ lemon: { label: "Lemon", center: brandColors.PaleYellow, rim: brandColors.Yellow },
880
+ lilac: { label: "Lilac", center: colorScale.Indigo[100], rim: colorScale.Indigo[300] },
881
+ peach: { label: "Peach", center: brandColors.Peach, rim: brandColors.Orange }
882
+ };
883
+ const agentColors = Object.keys(agentColorTokens);
884
+ const agentIdentityFamilies = {
885
+ ember: "Orange",
886
+ pink: "Pink",
887
+ sky: "Blue",
888
+ mint: "Mint",
889
+ lemon: "Yellow",
890
+ lilac: "Indigo",
891
+ peach: "Peach"
892
+ };
893
+ const agentIdentityIndex = (color2) => identityFamilies.indexOf(agentIdentityFamilies[color2]);
894
+ const isAgentColor = (value) => typeof value === "string" && Object.prototype.hasOwnProperty.call(agentColorTokens, value);
895
+ const auraColorTokens = {
896
+ ember: { center: "#f9a358", rim: "#f2661e" },
897
+ pink: { center: "#f8cefe", rim: "#e58af0" },
898
+ sky: { center: "#addbff", rim: "#4a5fd0" },
899
+ mint: { center: "#a0e2bf", rim: "#2e8f5e" },
900
+ lemon: { center: "#f0e345", rim: "#8dbf3a" },
901
+ lilac: { center: "#f2d4ff", rim: "#9aa6ff" },
902
+ peach: { center: "#ffe0cd", rim: "#f9a358" },
903
+ forest: { center: "#0a8a44", rim: "#045a2c" },
904
+ cream: { center: "#f4f6ba", rim: "#c9a14a" }
905
+ };
865
906
  const canAlignXStart = (anchor, target, offset2) => anchor.x + offset2 + target.width <= document.documentElement.clientWidth;
866
907
  const canAlignXCenter = (anchor, target, offset2) => {
867
908
  const xCenter = anchor.x + anchor.width / 2;
@@ -1250,8 +1291,8 @@ const Box = as(
1250
1291
  )
1251
1292
  );
1252
1293
  const Button_css_ts_vanilla = "";
1253
- var Button$2 = createRuntimeFn({ defaultClassName: "_1atfpl9e _8nex5a1 _8nex5a0 _1atfpl9d x4g6301", variantClassNames: { size: { "300": "_1atfpl9f", "400": "_1atfpl9g", "500": "_1atfpl9h" }, variant: { Primary: "_1atfpl9i", Secondary: "_1atfpl9j", Success: "_1atfpl9k", Warning: "_1atfpl9l", Critical: "_1atfpl9m" }, fill: { Solid: "_1atfpl9n", Soft: "_1atfpl9o", None: "_1atfpl9p" }, outlined: { true: "_1atfpl9q" }, radii: { "0": "ebramc1", "300": "ebramc2", "400": "ebramc3", "500": "ebramc4", Inherit: "ebramc0", Pill: "ebramc5" } }, defaultVariants: { size: "400", variant: "Primary", fill: "Solid", radii: "Pill" }, compoundVariants: [[{ variant: "Secondary", fill: "Solid" }, "_1atfpl9x"], [{ variant: "Secondary", fill: "None" }, "_1atfpl9y"], [{ variant: "Critical", fill: "Soft" }, "_1atfpl9z"], [{ variant: "Critical", fill: "Solid" }, "_1atfpl910"], [{ fill: "Solid", outlined: true }, "_1atfpl911"], [{ variant: "Primary", fill: "Solid" }, "_1atfpl912"]] });
1254
- const Button$1 = as(
1294
+ var Button$3 = createRuntimeFn({ defaultClassName: "_1atfpl9e _8nex5a1 _8nex5a0 _1atfpl9d x4g6301", variantClassNames: { size: { "300": "_1atfpl9f", "400": "_1atfpl9g", "500": "_1atfpl9h" }, variant: { Primary: "_1atfpl9i", Secondary: "_1atfpl9j", Success: "_1atfpl9k", Warning: "_1atfpl9l", Critical: "_1atfpl9m" }, fill: { Solid: "_1atfpl9n", Soft: "_1atfpl9o", None: "_1atfpl9p" }, outlined: { true: "_1atfpl9q" }, radii: { "0": "ebramc1", "300": "ebramc2", "400": "ebramc3", "500": "ebramc4", Inherit: "ebramc0", Pill: "ebramc5" } }, defaultVariants: { size: "400", variant: "Primary", fill: "Solid", radii: "Pill" }, compoundVariants: [[{ variant: "Secondary", fill: "Solid" }, "_1atfpl9x"], [{ variant: "Secondary", fill: "None" }, "_1atfpl9y"], [{ variant: "Critical", fill: "Soft" }, "_1atfpl9z"], [{ variant: "Critical", fill: "Solid" }, "_1atfpl910"], [{ fill: "Solid", outlined: true }, "_1atfpl911"], [{ variant: "Primary", fill: "Solid" }, "_1atfpl912"]] });
1295
+ const Button$2 = as(
1255
1296
  ({
1256
1297
  as: AsButton = "button",
1257
1298
  className,
@@ -1267,7 +1308,7 @@ const Button$1 = as(
1267
1308
  }, ref) => /* @__PURE__ */ jsxs(
1268
1309
  AsButton,
1269
1310
  {
1270
- className: classNames(Button$2({ size: size2, variant, fill, outlined, radii }), className),
1311
+ className: classNames(Button$3({ size: size2, variant, fill, outlined, radii }), className),
1271
1312
  "data-ui-before": before ? true : void 0,
1272
1313
  "data-ui-after": after ? true : void 0,
1273
1314
  ...props,
@@ -6161,16 +6202,16 @@ const Input = forwardRef(
6161
6202
  }
6162
6203
  );
6163
6204
  const Form_css_ts_vanilla = "";
6164
- var Body$2 = "_1699xxt1";
6165
- var Card = "_1699xxt8";
6205
+ var Body$4 = "_1699xxt1";
6206
+ var Card$3 = "_1699xxt8";
6166
6207
  var CardTone = createRuntimeFn({ defaultClassName: "", variantClassNames: { variant: { Surface: "_1699xxt9", SurfaceVariant: "_1699xxta", Background: "_1699xxtb", Primary: "_1699xxtc", Secondary: "_1699xxtd", Success: "_1699xxte", Warning: "_1699xxtf", Critical: "_1699xxtg" } }, defaultVariants: {}, compoundVariants: [] });
6167
6208
  var Children = "_1699xxt4";
6168
6209
  var Control = "_1699xxt5";
6169
- var Description$1 = "_1699xxt3";
6210
+ var Description$3 = "_1699xxt3";
6170
6211
  var Error$1 = "_1699xxt7";
6171
6212
  var Field$1 = "_1699xxt6";
6172
- var Label$4 = "_1699xxt2";
6173
- var Row$1 = "_1699xxt0";
6213
+ var Label$5 = "_1699xxt2";
6214
+ var Row$2 = "_1699xxt0";
6174
6215
  const FormRow = forwardRef(
6175
6216
  ({ title, description, before, after, children, className, ...props }, ref) => {
6176
6217
  const id = useId$1();
@@ -6182,11 +6223,11 @@ const FormRow = forwardRef(
6182
6223
  "aria-describedby": descriptionId,
6183
6224
  ...after.props
6184
6225
  }) : after;
6185
- return /* @__PURE__ */ jsx(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsxs("div", { ref, ...props, "data-weave-form-row": true, className: classNames(Row$1, className), children: [
6226
+ return /* @__PURE__ */ jsx(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsxs("div", { ref, ...props, "data-weave-form-row": true, className: classNames(Row$2, className), children: [
6186
6227
  before && /* @__PURE__ */ jsx("div", { "data-weave-form-before": true, children: before }),
6187
- /* @__PURE__ */ jsxs("div", { className: Body$2, "data-weave-form-body": true, children: [
6188
- title && /* @__PURE__ */ jsx("div", { className: Label$4, id: labelId, children: title }),
6189
- description && /* @__PURE__ */ jsx("div", { className: Description$1, id: descriptionId, children: description }),
6228
+ /* @__PURE__ */ jsxs("div", { className: Body$4, "data-weave-form-body": true, children: [
6229
+ title && /* @__PURE__ */ jsx("div", { className: Label$5, id: labelId, children: title }),
6230
+ description && /* @__PURE__ */ jsx("div", { className: Description$3, id: descriptionId, children: description }),
6190
6231
  children && /* @__PURE__ */ jsx("div", { className: Children, "data-weave-form-children": true, children })
6191
6232
  ] }),
6192
6233
  control2 && /* @__PURE__ */ jsx("div", { className: Control, "data-weave-form-control": true, children: control2 })
@@ -6195,7 +6236,7 @@ const FormRow = forwardRef(
6195
6236
  );
6196
6237
  FormRow.displayName = "FormRow";
6197
6238
  const Field = forwardRef(
6198
- ({ label, description, error, children, className, ...props }, ref) => {
6239
+ ({ label, description, error, density = "comfortable", children, className, ...props }, ref) => {
6199
6240
  const id = useId$1();
6200
6241
  const [controlId, setControlId] = useState(`${id}-control`);
6201
6242
  const registerControlId = useCallback(
@@ -6217,12 +6258,22 @@ const Field = forwardRef(
6217
6258
  }),
6218
6259
  [id, controlId, registerControlId, descriptionId, errorId, error]
6219
6260
  );
6220
- return /* @__PURE__ */ jsx(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsxs("div", { ref, ...props, className: classNames(Field$1, className), "data-weave-field": true, children: [
6221
- /* @__PURE__ */ jsx("label", { htmlFor: context.controlId, id: context.labelId, className: Label$4, children: label }),
6222
- description && /* @__PURE__ */ jsx("p", { id: descriptionId, className: Description$1, children: description }),
6223
- children,
6224
- error && /* @__PURE__ */ jsx("p", { id: errorId, className: Error$1, role: "alert", children: error })
6225
- ] }) });
6261
+ return /* @__PURE__ */ jsx(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsxs(
6262
+ "div",
6263
+ {
6264
+ ref,
6265
+ ...props,
6266
+ className: classNames(Field$1, className),
6267
+ "data-weave-field": true,
6268
+ "data-density": density,
6269
+ children: [
6270
+ /* @__PURE__ */ jsx("label", { htmlFor: context.controlId, id: context.labelId, className: Label$5, children: label }),
6271
+ description && /* @__PURE__ */ jsx("p", { id: descriptionId, className: Description$3, children: description }),
6272
+ children,
6273
+ error && /* @__PURE__ */ jsx("p", { id: errorId, className: Error$1, role: "alert", children: error })
6274
+ ]
6275
+ }
6276
+ ) });
6226
6277
  }
6227
6278
  );
6228
6279
  Field.displayName = "Field";
@@ -6235,7 +6286,7 @@ const FormCard = as(
6235
6286
  gap: "0",
6236
6287
  ...props,
6237
6288
  ref,
6238
- className: classNames(Card, CardTone({ variant }), className),
6289
+ className: classNames(Card$3, CardTone({ variant }), className),
6239
6290
  "data-weave-form-card": true
6240
6291
  }
6241
6292
  )
@@ -11532,7 +11583,7 @@ SelectContent.displayName = CONTENT_NAME;
11532
11583
  var CONTENT_MARGIN = 10;
11533
11584
  var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME);
11534
11585
  var CONTENT_IMPL_NAME = "SelectContentImpl";
11535
- var Slot = /* @__PURE__ */ createSlot$4("SelectContent.RemoveScroll");
11586
+ var Slot$1 = /* @__PURE__ */ createSlot$4("SelectContent.RemoveScroll");
11536
11587
  var SelectContentImpl = a$U.forwardRef(
11537
11588
  (props, forwardedRef) => {
11538
11589
  const {
@@ -11702,7 +11753,7 @@ var SelectContentImpl = a$U.forwardRef(
11702
11753
  position,
11703
11754
  isPositioned,
11704
11755
  searchRef,
11705
- children: /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
11756
+ children: /* @__PURE__ */ jsx(RemoveScroll, { as: Slot$1, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
11706
11757
  FocusScope,
11707
11758
  {
11708
11759
  asChild: true,
@@ -12436,9 +12487,9 @@ var Value$1 = SelectValue;
12436
12487
  var Icon$1 = SelectIcon;
12437
12488
  var Portal$1 = SelectPortal;
12438
12489
  var Content2 = SelectContent;
12439
- var Viewport$1 = SelectViewport;
12440
- var Group = SelectGroup$1;
12441
- var Label$3 = SelectLabel$1;
12490
+ var Viewport$2 = SelectViewport;
12491
+ var Group$2 = SelectGroup$1;
12492
+ var Label$4 = SelectLabel$1;
12442
12493
  var Item$2 = SelectItem$1;
12443
12494
  var ItemText = SelectItemText;
12444
12495
  var ItemIndicator = SelectItemIndicator;
@@ -12447,15 +12498,15 @@ var ScrollDownButton = SelectScrollDownButton;
12447
12498
  const Select_css_ts_vanilla = "";
12448
12499
  var Chevron$1 = "_8n0hf12";
12449
12500
  var Content$1 = "_8n0hf14";
12450
- var Description = "_8n0hf1b";
12451
- var Indicator = "_8n0hf17";
12501
+ var Description$2 = "_8n0hf1b";
12502
+ var Indicator$2 = "_8n0hf17";
12452
12503
  var Item$1 = "_8n0hf16";
12453
- var Label$2 = "_8n0hf19";
12504
+ var Label$3 = "_8n0hf19";
12454
12505
  var Root$1 = "_8n0hf10";
12455
12506
  var ScrollButton = "_8n0hf18";
12456
12507
  var Select$1 = "_8n0hf11";
12457
12508
  var Value = "_8n0hf1a";
12458
- var Viewport = "_8n0hf15";
12509
+ var Viewport$1 = "_8n0hf15";
12459
12510
  const Select = forwardRef(
12460
12511
  ({
12461
12512
  children,
@@ -12566,7 +12617,7 @@ const Select = forwardRef(
12566
12617
  },
12567
12618
  children: [
12568
12619
  /* @__PURE__ */ jsx(ScrollUpButton, { className: ScrollButton, children: /* @__PURE__ */ jsx(Icon$2, { src: Icons.ChevronTop, size: "100", "aria-hidden": true }) }),
12569
- /* @__PURE__ */ jsx(Viewport$1, { className: Viewport, children }),
12620
+ /* @__PURE__ */ jsx(Viewport$2, { className: Viewport$1, children }),
12570
12621
  /* @__PURE__ */ jsx(ScrollDownButton, { className: ScrollButton, children: /* @__PURE__ */ jsx(Icon$2, { src: Icons.ChevronBottom, size: "100", "aria-hidden": true }) })
12571
12622
  ]
12572
12623
  }
@@ -12579,13 +12630,13 @@ const Select = forwardRef(
12579
12630
  Select.displayName = "Select";
12580
12631
  const SelectItem = forwardRef(({ children, description, className, ...props }, ref) => /* @__PURE__ */ jsxs(Item$2, { ref, ...props, className: classNames(Item$1, className), children: [
12581
12632
  /* @__PURE__ */ jsx(ItemText, { children }),
12582
- description && /* @__PURE__ */ jsx("span", { className: Description, children: description }),
12583
- /* @__PURE__ */ jsx(ItemIndicator, { className: Indicator, children: /* @__PURE__ */ jsx(Icon$2, { src: Icons.Check, size: "100", "aria-hidden": true }) })
12633
+ description && /* @__PURE__ */ jsx("span", { className: Description$2, children: description }),
12634
+ /* @__PURE__ */ jsx(ItemIndicator, { className: Indicator$2, children: /* @__PURE__ */ jsx(Icon$2, { src: Icons.Check, size: "100", "aria-hidden": true }) })
12584
12635
  ] }));
12585
12636
  SelectItem.displayName = "SelectItem";
12586
- const SelectGroup = Group;
12637
+ const SelectGroup = Group$2;
12587
12638
  const SelectLabel = forwardRef(
12588
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(Label$3, { ref, ...props, className: classNames(Label$2, className) })
12639
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(Label$4, { ref, ...props, className: classNames(Label$3, className) })
12589
12640
  );
12590
12641
  SelectLabel.displayName = "SelectLabel";
12591
12642
  const Line_css_ts_vanilla = "";
@@ -12600,6 +12651,70 @@ const Line$1 = as(
12600
12651
  }
12601
12652
  )
12602
12653
  );
12654
+ const MediaFrame_css_ts_vanilla = "";
12655
+ var Caption = "ep6cux5";
12656
+ var Frame = "ep6cux0 _8nex5a1 _8nex5a0";
12657
+ var Media = "ep6cux3";
12658
+ var Outlined = "ep6cux1";
12659
+ var Overlay$2 = "ep6cux4";
12660
+ var Viewport = "ep6cux2";
12661
+ const positive = (value, fallback) => Number.isFinite(value) && value > 0 ? value : fallback;
12662
+ const MediaFrame = as(
12663
+ ({
12664
+ as: Component = "div",
12665
+ aspectRatio = 1,
12666
+ minWidth = 120,
12667
+ maxWidth = 400,
12668
+ minHeight = 48,
12669
+ maxHeight = 600,
12670
+ outlined = true,
12671
+ children,
12672
+ overlay,
12673
+ caption,
12674
+ className,
12675
+ style,
12676
+ ...props
12677
+ }, ref) => {
12678
+ const widthLimit = positive(maxWidth, 400);
12679
+ const heightLimit = positive(maxHeight, 600);
12680
+ const widthFloor = Math.min(positive(minWidth, 120), widthLimit);
12681
+ const heightFloor = Math.min(positive(minHeight, 48), heightLimit);
12682
+ const ratio = Math.min(
12683
+ widthLimit / heightFloor,
12684
+ Math.max(widthFloor / heightLimit, positive(aspectRatio, 1))
12685
+ );
12686
+ return /* @__PURE__ */ jsxs(
12687
+ Component,
12688
+ {
12689
+ ...props,
12690
+ ref,
12691
+ className: classNames(Frame, outlined && Outlined, className),
12692
+ style: {
12693
+ width: `min(100%, ${toRem(Math.min(widthLimit, heightLimit * ratio))})`,
12694
+ ...style
12695
+ },
12696
+ children: [
12697
+ /* @__PURE__ */ jsxs(
12698
+ "div",
12699
+ {
12700
+ className: Viewport,
12701
+ style: {
12702
+ aspectRatio: String(ratio),
12703
+ minHeight: toRem(heightFloor),
12704
+ maxHeight: toRem(heightLimit)
12705
+ },
12706
+ children: [
12707
+ /* @__PURE__ */ jsx("div", { className: Media, children }),
12708
+ overlay != null && /* @__PURE__ */ jsx("div", { className: Overlay$2, children: overlay })
12709
+ ]
12710
+ }
12711
+ ),
12712
+ caption != null && /* @__PURE__ */ jsx("div", { className: Caption, children: caption })
12713
+ ]
12714
+ }
12715
+ );
12716
+ }
12717
+ );
12603
12718
  const MenuItem_css_ts_vanilla = "";
12604
12719
  var MenuItem$1 = createRuntimeFn({ defaultClassName: "_189azi66 _8nex5a1 _8nex5a0 x4g6300 x4g6301", variantClassNames: { variant: { Background: "_189azi67", Surface: "_189azi68", SurfaceVariant: "_189azi69", Primary: "_189azi6a", Secondary: "_189azi6b", Success: "_189azi6c", Warning: "_189azi6d", Critical: "_189azi6e" }, fill: { Soft: "_189azi6f", None: "_189azi6g" }, size: { "300": "_189azi6h", "400": "_189azi6i" }, radii: { "0": "ebramc1", "300": "ebramc2", "400": "ebramc3", "500": "ebramc4", Inherit: "ebramc0", Pill: "ebramc5" } }, defaultVariants: { variant: "Surface", fill: "Soft", size: "400", radii: "0" }, compoundVariants: [] });
12605
12720
  const MenuItem = as(
@@ -14041,6 +14156,7 @@ var RadioGroupIndicator = a$U.forwardRef(
14041
14156
  RadioGroupIndicator.displayName = INDICATOR_NAME2;
14042
14157
  var Root2 = RadioGroup$1;
14043
14158
  var Item2 = RadioGroupItem$1;
14159
+ var Indicator$1 = RadioGroupIndicator;
14044
14160
  const RadioGroup = forwardRef((props, ref) => /* @__PURE__ */ jsx(Root2, { ...props, ref }));
14045
14161
  RadioGroup.displayName = "RadioGroup";
14046
14162
  const RadioGroupItem = forwardRef(({ className, variant, size: size2, ...props }, ref) => /* @__PURE__ */ jsx(
@@ -15511,9 +15627,9 @@ function mountAliveMark(container, opts) {
15511
15627
  var clip = container.querySelector(".am-clip");
15512
15628
  var dream = container.querySelector(".am-dream");
15513
15629
  var eyes = look.parentNode;
15514
- var reduced = false;
15630
+ var reduced2 = false;
15515
15631
  try {
15516
- reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
15632
+ reduced2 = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
15517
15633
  } catch (e2) {
15518
15634
  }
15519
15635
  var running = true, raf = 0, last = 0;
@@ -15546,7 +15662,7 @@ function mountAliveMark(container, opts) {
15546
15662
  var e2 = t2 - a2.t0;
15547
15663
  if (e2 >= a2.dur)
15548
15664
  return 1;
15549
- var edge = reduced ? 0 : Math.min(a2.edge, a2.dur / 2);
15665
+ var edge = reduced2 ? 0 : Math.min(a2.edge, a2.dur / 2);
15550
15666
  var p2 = 1;
15551
15667
  if (edge > 0) {
15552
15668
  if (e2 < edge)
@@ -15559,7 +15675,7 @@ function mountAliveMark(container, opts) {
15559
15675
  }
15560
15676
  function scheduleBlink() {
15561
15677
  clearTimeout(blinkT);
15562
- var mult = reduced ? 2 : 1;
15678
+ var mult = reduced2 ? 2 : 1;
15563
15679
  blinkT = setTimeout(function() {
15564
15680
  if (!sleeping)
15565
15681
  doBlink(Math.random() < o2.doubleBlinkChance);
@@ -15589,7 +15705,7 @@ function mountAliveMark(container, opts) {
15589
15705
  var t2 = now();
15590
15706
  animL = animR = { t0: t2, dur: o2.squintMs, edge: Math.min(110, o2.squintMs / 2), to: o2.squintTo };
15591
15707
  tiltCur = c2.tilt + o2.tiltNudge;
15592
- if (!reduced) {
15708
+ if (!reduced2) {
15593
15709
  tgtX = 0;
15594
15710
  tgtY = -o2.driftY;
15595
15711
  }
@@ -15597,7 +15713,7 @@ function mountAliveMark(container, opts) {
15597
15713
  function scheduleDrift() {
15598
15714
  clearTimeout(driftT);
15599
15715
  driftT = setTimeout(function() {
15600
- if (!reduced && !sleeping && !gazing) {
15716
+ if (!reduced2 && !sleeping && !gazing) {
15601
15717
  tgtX = rnd2(-o2.driftX, o2.driftX);
15602
15718
  tgtY = rnd2(-o2.driftY, o2.driftY);
15603
15719
  }
@@ -15610,7 +15726,7 @@ function mountAliveMark(container, opts) {
15610
15726
  var dt = last ? Math.min(0.05, (t2 - last) / 1e3) : 0.016;
15611
15727
  last = t2;
15612
15728
  var ease2 = function(tau) {
15613
- return reduced ? 1 : 1 - Math.exp(-dt / tau);
15729
+ return reduced2 ? 1 : 1 - Math.exp(-dt / tau);
15614
15730
  };
15615
15731
  if (t2 - rectAt > 250) {
15616
15732
  rect = svg.getBoundingClientRect();
@@ -15632,7 +15748,7 @@ function mountAliveMark(container, opts) {
15632
15748
  if (dreamAmt > 0.999)
15633
15749
  dreamAmt = 1;
15634
15750
  var gx = null, gy = null;
15635
- if (!reduced && !sleeping && pointer && rect && o2.pointerMode !== "off") {
15751
+ if (!reduced2 && !sleeping && pointer && rect && o2.pointerMode !== "off") {
15636
15752
  var cxp = rect.left + rect.width / 2, cyp = rect.top + rect.height / 2;
15637
15753
  var dx = pointer.x - cxp, dy = pointer.y - cyp;
15638
15754
  var d = Math.max(1e-3, Math.sqrt(dx * dx + dy * dy));
@@ -15665,7 +15781,7 @@ function mountAliveMark(container, opts) {
15665
15781
  if (gazing) {
15666
15782
  tgtX = gx;
15667
15783
  tgtY = gy;
15668
- } else if (wasGazing || reduced || sleeping) {
15784
+ } else if (wasGazing || reduced2 || sleeping) {
15669
15785
  tgtX = 0;
15670
15786
  tgtY = 0;
15671
15787
  }
@@ -15818,16 +15934,16 @@ const StackedAvatar = as(
15818
15934
  )
15819
15935
  );
15820
15936
  const ComposeIcon = Icons.Compose;
15821
- const PAL = {
15822
- ember: { c: [249, 163, 88], r: [242, 102, 30] },
15823
- pink: { c: [248, 206, 254], r: [229, 138, 240] },
15824
- sky: { c: [173, 219, 255], r: [74, 95, 208] },
15825
- mint: { c: [160, 226, 191], r: [46, 143, 94] },
15826
- lemon: { c: [240, 227, 69], r: [141, 191, 58] },
15827
- lilac: { c: [242, 212, 255], r: [154, 166, 255] },
15828
- forest: { c: [10, 138, 68], r: [4, 90, 44] },
15829
- cream: { c: [244, 246, 186], r: [201, 161, 74] }
15937
+ const rgb = (value) => {
15938
+ const hex = toSrgbHex(value);
15939
+ return [1, 3, 5].map((offset2) => parseInt(hex.slice(offset2, offset2 + 2), 16));
15830
15940
  };
15941
+ const PAL = Object.fromEntries(
15942
+ Object.entries(auraColorTokens).map(([name, token]) => [
15943
+ name,
15944
+ { c: rgb(token.center), r: rgb(token.rim) }
15945
+ ])
15946
+ );
15831
15947
  const W = 1200;
15832
15948
  const H = 800;
15833
15949
  const TILT = -46.7 * Math.PI / 180;
@@ -15855,11 +15971,12 @@ const make = (x, y, vx, vy, r2, name, from) => ({
15855
15971
  wob: from ? 1 : 0
15856
15972
  });
15857
15973
  const cur = (o2) => ({ c: mix(o2.c0, o2.c, ease(o2.ct)), r: mix(o2.r0, o2.rr, ease(o2.ct)) });
15858
- function startOrbField(element) {
15974
+ function startOrbField(element, initial = {}) {
15975
+ let options = initial;
15859
15976
  const canvas = element;
15860
15977
  const ctx = canvas.getContext("2d");
15861
15978
  if (!ctx)
15862
- return () => void 0;
15979
+ return Object.assign(() => void 0, { update: () => void 0 });
15863
15980
  let orbs = [];
15864
15981
  let target = 3;
15865
15982
  let targetTime = 0;
@@ -15869,9 +15986,10 @@ function startOrbField(element) {
15869
15986
  const motion2 = window.matchMedia("(prefers-reduced-motion: reduce)");
15870
15987
  const pickName = (exclude = []) => {
15871
15988
  const taken = /* @__PURE__ */ new Set([...exclude, ...orbs.filter((o2) => !o2.leaving).map((o2) => o2.name)]);
15872
- let pool = Object.keys(PAL).filter((n2) => !taken.has(n2) && n2 !== "ember");
15989
+ const eligible = (n2) => n2 !== "ember" && (n2 !== "peach" || Boolean(options.agentColor)) && n2 !== options.agentColor && !(options.agentColor === "ember" && n2 === "peach");
15990
+ let pool = Object.keys(PAL).filter((n2) => !taken.has(n2) && eligible(n2));
15873
15991
  if (!pool.length)
15874
- pool = Object.keys(PAL).filter((n2) => !exclude.includes(n2) && n2 !== "ember");
15992
+ pool = Object.keys(PAL).filter((n2) => !exclude.includes(n2) && eligible(n2));
15875
15993
  return pool[Math.floor(Math.random() * pool.length)];
15876
15994
  };
15877
15995
  [
@@ -15890,6 +16008,44 @@ function startOrbField(element) {
15890
16008
  o2.age = 2;
15891
16009
  orbs.push(o2);
15892
16010
  });
16011
+ let previousColor;
16012
+ let colorsInitialized = false;
16013
+ const enforceColors = () => {
16014
+ const active = orbs.filter((o2) => !o2.leaving);
16015
+ const kept = previousColor === options.agentColor ? active.find((o2) => o2.agent) : void 0;
16016
+ const carrier = options.agentColor ? kept ?? [...active].sort((a2, b) => b.r - a2.r)[0] : void 0;
16017
+ const used = /* @__PURE__ */ new Set();
16018
+ const recolor = (orb, name) => {
16019
+ const o2 = orb;
16020
+ if (o2.name === name)
16021
+ return;
16022
+ const from = cur(o2);
16023
+ o2.name = name;
16024
+ o2.c0 = from.c;
16025
+ o2.r0 = from.r;
16026
+ o2.c = PAL[name].c.slice();
16027
+ o2.rr = PAL[name].r.slice();
16028
+ o2.ct = motion2.matches || !colorsInitialized ? 1 : 0;
16029
+ };
16030
+ if (carrier && options.agentColor) {
16031
+ recolor(carrier, options.agentColor);
16032
+ used.add(options.agentColor);
16033
+ }
16034
+ orbs.forEach((orb) => {
16035
+ const o2 = orb;
16036
+ o2.agent = o2 === carrier;
16037
+ if (motion2.matches)
16038
+ o2.ct = 1;
16039
+ if (o2 === carrier)
16040
+ return;
16041
+ if (used.has(o2.name) || o2.name === options.agentColor || options.agentColor === "ember" && o2.name === "peach" || o2.name === "ember" && (options.agentColor !== "ember" || used.has("peach"))) {
16042
+ recolor(o2, pickName([...used]));
16043
+ }
16044
+ used.add(o2.name);
16045
+ });
16046
+ previousColor = options.agentColor;
16047
+ colorsInitialized = true;
16048
+ };
15893
16049
  const spawn = () => {
15894
16050
  const side = Math.floor(Math.random() * 4);
15895
16051
  const r2 = rnd(120, 180);
@@ -15930,17 +16086,19 @@ function startOrbField(element) {
15930
16086
  const cs = cur(small);
15931
16087
  const cb = cur(big);
15932
16088
  const k = Math.min(0.08, da / (big.r * big.r));
15933
- big.c0 = mix(cb.c, cs.c, k * 3);
15934
- big.r0 = mix(cb.r, cs.r, k * 3);
15935
- big.c = mix(big.c, cs.c, k * 3);
15936
- big.rr = mix(big.rr, cs.r, k * 3);
16089
+ if (!big.agent && !small.agent) {
16090
+ big.c0 = mix(cb.c, cs.c, k * 3);
16091
+ big.r0 = mix(cb.r, cs.r, k * 3);
16092
+ big.c = mix(big.c, cs.c, k * 3);
16093
+ big.rr = mix(big.rr, cs.r, k * 3);
16094
+ }
15937
16095
  small.x += (big.x - small.x) * 0.05;
15938
16096
  small.y += (big.y - small.y) * 0.05;
15939
16097
  if (small.r < 10) {
15940
16098
  orbs.splice(orbs.indexOf(small), 1);
15941
16099
  big.wob = 1;
15942
16100
  const c2 = cur(big);
15943
- big.name = pickName([big.name]);
16101
+ big.name = big.agent && options.agentColor ? options.agentColor : pickName([big.name]);
15944
16102
  big.c0 = c2.c;
15945
16103
  big.r0 = c2.r;
15946
16104
  big.c = PAL[big.name].c.slice();
@@ -15988,7 +16146,7 @@ function startOrbField(element) {
15988
16146
  }
15989
16147
  }
15990
16148
  }
15991
- if (spawnTime > 2.4 && orbs.filter((o2) => !o2.leaving).length < target) {
16149
+ if (spawnTime > 2.4 && orbs.length < target) {
15992
16150
  spawnTime = 0;
15993
16151
  spawn();
15994
16152
  }
@@ -16041,13 +16199,29 @@ function startOrbField(element) {
16041
16199
  });
16042
16200
  };
16043
16201
  const draw = () => {
16202
+ enforceColors();
16203
+ const { finish } = options;
16204
+ const progress = finish && !motion2.matches ? Math.min(1, Math.max(0, (performance.now() - finish.startedAt) / 1e3)) : Number(Boolean(finish));
16205
+ const width = Math.max(1, canvas.clientWidth);
16206
+ const height = Math.max(1, canvas.clientHeight);
16207
+ const scale = Math.max(width / W, height / H);
16208
+ const fx = finish ? (Math.min(1, Math.max(0, finish.origin.x)) * width - (width - W * scale) / 2) / scale : W / 2;
16209
+ const fy = finish ? (Math.min(1, Math.max(0, finish.origin.y)) * height - (height - H * scale) / 2) / scale : H / 2;
16044
16210
  ctx.clearRect(0, 0, W, H);
16045
16211
  orbs.forEach((o2) => {
16046
16212
  const c2 = cur(o2);
16047
16213
  const w2 = o2.rd * 1.35;
16048
16214
  const wob = o2.wob > 0 ? Math.sin((1 - o2.wob) * 20) * 0.16 * o2.wob : 0;
16049
16215
  ctx.save();
16050
- ctx.translate(o2.x, o2.y);
16216
+ const angle = progress * Math.PI * 1.5;
16217
+ const dx = o2.x - fx;
16218
+ const dy = o2.y - fy;
16219
+ ctx.translate(
16220
+ fx + (dx * Math.cos(angle) - dy * Math.sin(angle)) * (1 - progress),
16221
+ fy + (dx * Math.sin(angle) + dy * Math.cos(angle)) * (1 - progress)
16222
+ );
16223
+ ctx.globalAlpha = 1 - progress;
16224
+ ctx.scale(1 - progress * 0.9, 1 - progress * 0.9);
16051
16225
  ctx.rotate(TILT);
16052
16226
  ctx.scale(1 + wob, (1 - wob) * RATIO);
16053
16227
  const gradient = ctx.createRadialGradient(0, 0, 0, 0, 0, w2);
@@ -16079,29 +16253,41 @@ function startOrbField(element) {
16079
16253
  draw();
16080
16254
  };
16081
16255
  const tick = (now) => {
16082
- step(Math.min(0.05, (now - last) / 1e3));
16256
+ if (!options.finish)
16257
+ step(Math.min(0.05, (now - last) / 1e3));
16083
16258
  last = now;
16084
16259
  draw();
16085
- raf = window.requestAnimationFrame(tick);
16260
+ if (!options.finish || now - options.finish.startedAt < 1e3)
16261
+ raf = window.requestAnimationFrame(tick);
16086
16262
  };
16087
16263
  const syncMotion = () => {
16088
16264
  window.cancelAnimationFrame(raf);
16089
16265
  last = performance.now();
16090
- if (!motion2.matches && !document.hidden)
16266
+ if (!motion2.matches && !document.hidden && (!options.finish || last - options.finish.startedAt < 1e3))
16091
16267
  raf = window.requestAnimationFrame(tick);
16268
+ draw();
16092
16269
  };
16093
16270
  resize();
16094
- syncMotion();
16271
+ if (!motion2.matches && !document.hidden)
16272
+ raf = window.requestAnimationFrame(tick);
16095
16273
  const observer = new ResizeObserver(resize);
16096
16274
  observer.observe(canvas);
16097
16275
  motion2.addEventListener("change", syncMotion);
16098
16276
  document.addEventListener("visibilitychange", syncMotion);
16099
- return () => {
16100
- window.cancelAnimationFrame(raf);
16101
- observer.disconnect();
16102
- motion2.removeEventListener("change", syncMotion);
16103
- document.removeEventListener("visibilitychange", syncMotion);
16104
- };
16277
+ return Object.assign(
16278
+ () => {
16279
+ window.cancelAnimationFrame(raf);
16280
+ observer.disconnect();
16281
+ motion2.removeEventListener("change", syncMotion);
16282
+ document.removeEventListener("visibilitychange", syncMotion);
16283
+ },
16284
+ {
16285
+ update: (next) => {
16286
+ options = next;
16287
+ syncMotion();
16288
+ }
16289
+ }
16290
+ );
16105
16291
  }
16106
16292
  const orbOpacityForSurface = (surface, prefersDark) => {
16107
16293
  const perceptual = surface.match(/^okl(?:ab|ch)\(\s*([\d.]+)(%?)/);
@@ -16123,13 +16309,29 @@ const orbOpacityForSurface = (surface, prefersDark) => {
16123
16309
  const OrbBackground_css_ts_vanilla = "";
16124
16310
  var OrbBackground$1 = "gde17n1";
16125
16311
  var OrbBackgroundHost = "gde17n0";
16126
- const OrbBackground = ({ className, appearance }) => {
16312
+ const OrbBackground = ({
16313
+ className,
16314
+ appearance,
16315
+ agentColor,
16316
+ finish
16317
+ }) => {
16127
16318
  const ref = useRef(null);
16319
+ const controller = useRef();
16320
+ const initialOptions = useRef({ agentColor, finish });
16128
16321
  useEffect(() => {
16129
16322
  if (!ref.current)
16130
16323
  return void 0;
16131
- return startOrbField(ref.current);
16324
+ const field = startOrbField(ref.current, initialOptions.current);
16325
+ controller.current = field;
16326
+ return () => {
16327
+ field();
16328
+ controller.current = void 0;
16329
+ };
16132
16330
  }, []);
16331
+ useEffect(() => {
16332
+ var _a;
16333
+ (_a = controller.current) == null ? void 0 : _a.update({ agentColor, finish });
16334
+ }, [agentColor, finish]);
16133
16335
  useEffect(() => {
16134
16336
  var _a;
16135
16337
  const canvas = ref.current;
@@ -17315,14 +17517,14 @@ const UnreadBadge = as(
17315
17517
  const ActivityRow_css_ts_vanilla = "";
17316
17518
  var ActivityRow$1 = createRuntimeFn({ defaultClassName: "_3hdcuo0 _8nex5a1 _8nex5a0 x4g6300 x4g6301", variantClassNames: { layout: { panel: "_3hdcuo1", card: "_3hdcuo2" }, unread: { true: "_3hdcuo3" }, read: { true: "_3hdcuo4" }, selected: { true: "_3hdcuo5" } }, defaultVariants: { layout: "panel" }, compoundVariants: [] });
17317
17519
  var Avatar = "_3hdcuo6";
17318
- var Body$1 = "_3hdcuo7";
17520
+ var Body$3 = "_3hdcuo7";
17319
17521
  var Footer$1 = "_3hdcuoh";
17320
17522
  var Header = "_3hdcuo8";
17321
17523
  var Meta = "_3hdcuoi";
17322
17524
  var Preview = "_3hdcuog";
17323
17525
  var Reason = createRuntimeFn({ defaultClassName: "_3hdcuo9", variantClassNames: { tone: { you: "_3hdcuoa", agent: "_3hdcuob", participant: "_3hdcuoc" } }, defaultVariants: {}, compoundVariants: [] });
17324
17526
  var Time$2 = "_3hdcuoe";
17325
- var Title$1 = "_3hdcuof";
17527
+ var Title$3 = "_3hdcuof";
17326
17528
  var Where = "_3hdcuod";
17327
17529
  const ActivityRow = as(
17328
17530
  ({
@@ -17356,7 +17558,7 @@ const ActivityRow = as(
17356
17558
  ref,
17357
17559
  children: [
17358
17560
  /* @__PURE__ */ jsx("span", { className: Avatar, children: avatar }),
17359
- /* @__PURE__ */ jsxs("span", { className: Body$1, children: [
17561
+ /* @__PURE__ */ jsxs("span", { className: Body$3, children: [
17360
17562
  /* @__PURE__ */ jsxs("span", { className: Header, children: [
17361
17563
  /* @__PURE__ */ jsx("span", { className: Reason({ tone: read ? "participant" : reasonTone }), children: reason2 }),
17362
17564
  /* @__PURE__ */ jsxs("span", { className: Where, children: [
@@ -17364,7 +17566,7 @@ const ActivityRow = as(
17364
17566
  where
17365
17567
  ] })
17366
17568
  ] }),
17367
- layout === "card" && title && /* @__PURE__ */ jsx("span", { className: Title$1, children: title }),
17569
+ layout === "card" && title && /* @__PURE__ */ jsx("span", { className: Title$3, children: title }),
17368
17570
  /* @__PURE__ */ jsx("span", { className: Preview, children: preview }),
17369
17571
  /* @__PURE__ */ jsxs("span", { className: Footer$1, children: [
17370
17572
  !read && (count2 > 0 || unread > 0) && /* @__PURE__ */ jsx(UnreadBadgeCenter, { children: /* @__PURE__ */ jsx(
@@ -17386,7 +17588,7 @@ const ActivityRow = as(
17386
17588
  );
17387
17589
  const ActivityGroup_css_ts_vanilla = "";
17388
17590
  var ActivityGroup$1 = "_1ybkglv0";
17389
- var Label$1 = "_1ybkglv1 _8nex5a1 _8nex5a0";
17591
+ var Label$2 = "_1ybkglv1 _8nex5a1 _8nex5a0";
17390
17592
  const ActivityGroup = as(
17391
17593
  ({ as: Component = "section", label, count: count2, children, className, ...props }, ref) => {
17392
17594
  const headingId = useId$1();
@@ -17398,7 +17600,7 @@ const ActivityGroup = as(
17398
17600
  ...props,
17399
17601
  ref,
17400
17602
  children: [
17401
- /* @__PURE__ */ jsx("h3", { id: headingId, className: Label$1, children: `${label}${count2 !== void 0 ? ` ${count2}` : ""}` }),
17603
+ /* @__PURE__ */ jsx("h3", { id: headingId, className: Label$2, children: `${label}${count2 !== void 0 ? ` ${count2}` : ""}` }),
17402
17604
  children
17403
17605
  ]
17404
17606
  }
@@ -17596,7 +17798,7 @@ var Count = "e7d7gk5";
17596
17798
  var CountPill = "e7d7gk6";
17597
17799
  var Folds = "e7d7gk9";
17598
17800
  var Glyph$2 = "e7d7gk3";
17599
- var Label = "e7d7gk8";
17801
+ var Label$1 = "e7d7gk8";
17600
17802
  var PanelSwitch$1 = "e7d7gk2 _8nex5a1 _8nex5a0 x4g6300 x4g6301";
17601
17803
  var PanelSwitchGroup$1 = "e7d7gk0 _8nex5a1 _8nex5a0";
17602
17804
  const PanelSwitchGroup = as(({ as: Component = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(
@@ -17650,7 +17852,7 @@ const PanelSwitch = as(
17650
17852
  /* @__PURE__ */ jsx(Icon$2, { src: icon2, size: "compact" }),
17651
17853
  attention && !selected && /* @__PURE__ */ jsx("span", { className: Attention$1 })
17652
17854
  ] }),
17653
- showLabel && /* @__PURE__ */ jsx(Text, { as: "span", size: "H6", className: classNames(Label, Folds), "aria-hidden": true, children: label }),
17855
+ showLabel && /* @__PURE__ */ jsx(Text, { as: "span", size: "H6", className: classNames(Label$1, Folds), "aria-hidden": true, children: label }),
17654
17856
  showCount && /* @__PURE__ */ jsx(
17655
17857
  Text,
17656
17858
  {
@@ -17672,7 +17874,7 @@ var Faces = "kev8vj1";
17672
17874
  var Live = "kev8vj3";
17673
17875
  var PeopleLine$1 = "kev8vj0 _8nex5a1 _8nex5a0";
17674
17876
  var Summary = "kev8vj4";
17675
- var Working = "kev8vj6";
17877
+ var Working$1 = "kev8vj6";
17676
17878
  const PeopleLineFace = as(
17677
17879
  ({ as: Component = "span", size: size2 = "small", className, ...props }, ref) => /* @__PURE__ */ jsx(Component, { "data-size": size2, className: classNames(Face$2, className), ...props, ref })
17678
17880
  );
@@ -17687,7 +17889,7 @@ const PeopleLine = as(
17687
17889
  children: [
17688
17890
  status === "Call" && /* @__PURE__ */ jsx("span", { className: Live, "aria-hidden": true }),
17689
17891
  Children$1.toArray(faces).length > 0 && /* @__PURE__ */ jsx("span", { className: Faces, "aria-hidden": true, children: faces }),
17690
- /* @__PURE__ */ jsx("span", { className: classNames(Summary, status === "Working" && Working), children })
17892
+ /* @__PURE__ */ jsx("span", { className: classNames(Summary, status === "Working" && Working$1), children })
17691
17893
  ]
17692
17894
  }
17693
17895
  )
@@ -17699,7 +17901,7 @@ var Identity = "cv0ofl3";
17699
17901
  var Mark$1 = "cv0ofl2";
17700
17902
  var Name$4 = "cv0ofl4";
17701
17903
  var RoomHeader$1 = "cv0ofl0 _8nex5a1 _8nex5a0";
17702
- var Row = "cv0ofl1";
17904
+ var Row$1 = "cv0ofl1";
17703
17905
  var Spacer$1 = "cv0ofl5";
17704
17906
  const RoomHeaderMark = as(
17705
17907
  ({ as: Component = "span", faces, className, ...props }, ref) => /* @__PURE__ */ jsx(
@@ -17723,7 +17925,7 @@ const RoomHeader = as(
17723
17925
  panels,
17724
17926
  className,
17725
17927
  ...props
17726
- }, ref) => /* @__PURE__ */ jsx(Component, { className: classNames(RoomHeader$1, className), ...props, ref, children: /* @__PURE__ */ jsxs("div", { className: Row, children: [
17928
+ }, ref) => /* @__PURE__ */ jsx(Component, { className: classNames(RoomHeader$1, className), ...props, ref, children: /* @__PURE__ */ jsxs("div", { className: Row$1, children: [
17727
17929
  mark,
17728
17930
  /* @__PURE__ */ jsxs("div", { className: Identity, children: [
17729
17931
  /* @__PURE__ */ jsx(Text, { as: nameAs, size: "H5", truncate: true, className: Name$4, children: name }),
@@ -17736,7 +17938,7 @@ const RoomHeader = as(
17736
17938
  ] }) })
17737
17939
  );
17738
17940
  const Composer_css_ts_vanilla = "";
17739
- var Actions$1 = "_1ejw1qz3";
17941
+ var Actions$2 = "_1ejw1qz3";
17740
17942
  var ActionsAfter = "_1ejw1qz5";
17741
17943
  var ActionsBefore = "_1ejw1qz4";
17742
17944
  var Composer$1 = "_1ejw1qz0";
@@ -17758,7 +17960,7 @@ const Composer = as(
17758
17960
  /* @__PURE__ */ jsxs("div", { className: Surface, children: [
17759
17961
  context,
17760
17962
  /* @__PURE__ */ jsx("div", { className: Content, children }),
17761
- (actionsBefore || actionsAfter) && /* @__PURE__ */ jsxs("div", { className: Actions$1, children: [
17963
+ (actionsBefore || actionsAfter) && /* @__PURE__ */ jsxs("div", { className: Actions$2, children: [
17762
17964
  /* @__PURE__ */ jsx("div", { className: ActionsBefore, children: actionsBefore }),
17763
17965
  /* @__PURE__ */ jsx("div", { className: ActionsAfter, children: actionsAfter })
17764
17966
  ] }),
@@ -18115,11 +18317,11 @@ const InspectorTab = as(
18115
18317
  );
18116
18318
  const ActivityItem_css_ts_vanilla = "";
18117
18319
  var Action = "_1wyqgiii _8nex5a1 _8nex5a0 x4g6300";
18118
- var Actions = "_1wyqgiid _1wyqgii8";
18320
+ var Actions$1 = "_1wyqgiid _1wyqgii8";
18119
18321
  var ActivityItem$1 = "_1wyqgii0 _8nex5a1 _8nex5a0";
18120
18322
  var Attention = "_1wyqgiie";
18121
18323
  var AttentionBreathing = "_1wyqgiih";
18122
- var Body = "_1wyqgii9 _1wyqgii8";
18324
+ var Body$2 = "_1wyqgii9 _1wyqgii8";
18123
18325
  var Face$1 = "_1wyqgii4";
18124
18326
  var Head$1 = "_1wyqgii3";
18125
18327
  var Main = "_1wyqgii2 _8nex5a1 _8nex5a0 x4g6300";
@@ -18187,7 +18389,7 @@ const ActivityItem = as(
18187
18389
  /* @__PURE__ */ jsx(Text, { as: "span", size: "T300", className: What$1, children: what }),
18188
18390
  /* @__PURE__ */ jsx(Text, { as: "span", size: "T200", className: Time$1, children: time })
18189
18391
  ] }),
18190
- body && /* @__PURE__ */ jsx(Text, { as: "span", size: "T300", className: Body, children: body })
18392
+ body && /* @__PURE__ */ jsx(Text, { as: "span", size: "T300", className: Body$2, children: body })
18191
18393
  ]
18192
18394
  }
18193
18395
  ),
@@ -18199,7 +18401,7 @@ const ActivityItem = as(
18199
18401
  replies.unread
18200
18402
  ] })
18201
18403
  ] }),
18202
- actions && /* @__PURE__ */ jsx("div", { className: Actions, "data-pinned": actionsShown || void 0, children: actions })
18404
+ actions && /* @__PURE__ */ jsx("div", { className: Actions$1, "data-pinned": actionsShown || void 0, children: actions })
18203
18405
  ]
18204
18406
  }
18205
18407
  )
@@ -18224,12 +18426,12 @@ const ActivityHeader_css_ts_vanilla = "";
18224
18426
  var ActivityHeader$1 = "_1yfy4k20 _8nex5a1 _8nex5a0";
18225
18427
  var Controls = "_1yfy4k23";
18226
18428
  var Spacer = "_1yfy4k24";
18227
- var Title = "_1yfy4k22";
18429
+ var Title$2 = "_1yfy4k22";
18228
18430
  var TitleRow = "_1yfy4k21";
18229
18431
  const ActivityHeader = as(
18230
18432
  ({ as: Component = "div", title, actions, filters, after, className, ...props }, ref) => /* @__PURE__ */ jsxs(Component, { className: classNames(ActivityHeader$1, className), ...props, ref, children: [
18231
18433
  /* @__PURE__ */ jsxs("div", { className: TitleRow, children: [
18232
- /* @__PURE__ */ jsx(Text, { as: "h2", size: "H6", className: Title, children: title }),
18434
+ /* @__PURE__ */ jsx(Text, { as: "h2", size: "H6", className: Title$2, children: title }),
18233
18435
  actions
18234
18436
  ] }),
18235
18437
  (filters || after) && /* @__PURE__ */ jsxs("div", { className: Controls, children: [
@@ -18385,7 +18587,7 @@ var AddAgentRow = "pkh0681u _8nex5a1 _8nex5a0 x4g6300";
18385
18587
  var AgentChoice = "pkh068w _8nex5a1 _8nex5a0";
18386
18588
  var AgentTile = "pkh06817 _8nex5a1 _8nex5a0";
18387
18589
  var AllSetCheck = "pkh068l";
18388
- var Button = "pkh068e _8nex5a1 _8nex5a0 x4g6300";
18590
+ var Button$1 = "pkh068e _8nex5a1 _8nex5a0 x4g6300";
18389
18591
  var ButtonFull = "pkh068h";
18390
18592
  var ButtonType = { Dark: "pkh068f", Outline: "pkh068g" };
18391
18593
  var CardText = "pkh06816";
@@ -18394,7 +18596,7 @@ var Dot = { live: "pkh0681b", off: "pkh0681c", needsYou: "pkh0681d" };
18394
18596
  var GetStarted = "pkh068i _8nex5a1 _8nex5a0";
18395
18597
  var GetStartedHead = "pkh068j";
18396
18598
  var GetStartedTitle = "pkh068k";
18397
- var Glow = "pkh068t";
18599
+ var Glow$1 = "pkh068t";
18398
18600
  var Hero = "pkh0686";
18399
18601
  var HeroAside = "pkh068a";
18400
18602
  var HeroText = "pkh0687";
@@ -18409,8 +18611,8 @@ var PageFrame = "pkh0684";
18409
18611
  var Person = "pkh0681q _8nex5a1 _8nex5a0 x4g6300";
18410
18612
  var PersonFace = "pkh0681r";
18411
18613
  var PersonName = "pkh0681s";
18412
- var Progress = "pkh068m";
18413
- var ProgressFill = "pkh068o";
18614
+ var Progress$1 = "pkh068m";
18615
+ var ProgressFill$1 = "pkh068o";
18414
18616
  var ProgressTrack = "pkh068n";
18415
18617
  var Resume = "pkh0681f _8nex5a1 _8nex5a0 x4g6300";
18416
18618
  var RoomCard = "pkh0681g _8nex5a1 _8nex5a0";
@@ -18462,7 +18664,7 @@ const LobbyButton = as(
18462
18664
  Component,
18463
18665
  {
18464
18666
  type: Component === "button" ? "button" : void 0,
18465
- className: classNames(Button, ButtonType[variant], full && ButtonFull, className),
18667
+ className: classNames(Button$1, ButtonType[variant], full && ButtonFull, className),
18466
18668
  ...props,
18467
18669
  ref,
18468
18670
  children: /* @__PURE__ */ jsx(Text, { as: "span", size: "B300", children })
@@ -18470,7 +18672,7 @@ const LobbyButton = as(
18470
18672
  )
18471
18673
  );
18472
18674
  const LobbyProgress = as(
18473
- ({ as: Component = "div", done, total = 3, className, ...props }, ref) => /* @__PURE__ */ jsxs(Component, { className: classNames(Progress, className), ...props, ref, children: [
18675
+ ({ as: Component = "div", done, total = 3, className, ...props }, ref) => /* @__PURE__ */ jsxs(Component, { className: classNames(Progress$1, className), ...props, ref, children: [
18474
18676
  /* @__PURE__ */ jsx(
18475
18677
  "span",
18476
18678
  {
@@ -18480,7 +18682,7 @@ const LobbyProgress = as(
18480
18682
  "aria-valuemax": total,
18481
18683
  "aria-valuenow": done,
18482
18684
  "aria-label": "Get started progress",
18483
- children: /* @__PURE__ */ jsx("span", { className: ProgressFill, style: { width: `${done / total * 100}%` } })
18685
+ children: /* @__PURE__ */ jsx("span", { className: ProgressFill$1, style: { width: `${done / total * 100}%` } })
18484
18686
  }
18485
18687
  ),
18486
18688
  /* @__PURE__ */ jsxs(Text, { as: "span", size: "C400", className: classNames(Secondary, Upright), children: [
@@ -18558,7 +18760,7 @@ const LobbyAgentChoice = as(
18558
18760
  ({ as: Component = "div", mark, name, description, recommended, onAdd, className, ...props }, ref) => /* @__PURE__ */ jsxs(
18559
18761
  Component,
18560
18762
  {
18561
- className: classNames(AgentChoice, recommended && Glow, className),
18763
+ className: classNames(AgentChoice, recommended && Glow$1, className),
18562
18764
  ...props,
18563
18765
  ref,
18564
18766
  children: [
@@ -18658,7 +18860,7 @@ const LobbyRoomCard = as(
18658
18860
  }, ref) => /* @__PURE__ */ jsxs(
18659
18861
  Component,
18660
18862
  {
18661
- className: classNames(RoomCard, suggested && Glow, className),
18863
+ className: classNames(RoomCard, suggested && Glow$1, className),
18662
18864
  ...props,
18663
18865
  ref,
18664
18866
  children: [
@@ -18762,6 +18964,585 @@ const SidebarAddAgent = as(
18762
18964
  }
18763
18965
  )
18764
18966
  );
18967
+ const AccountCard_css_ts_vanilla = "";
18968
+ var Card$2 = "dzm7ge0 _8nex5a1 _8nex5a0";
18969
+ var Slot = "dzm7ge1";
18970
+ const AccountCard = forwardRef(
18971
+ ({ header: header2, footer, children, className, ...props }, ref) => /* @__PURE__ */ jsxs(
18972
+ "div",
18973
+ {
18974
+ ...props,
18975
+ "data-weave-account-card": true,
18976
+ ref,
18977
+ className: classNames(lightTheme, Card$2, className),
18978
+ children: [
18979
+ header2 && /* @__PURE__ */ jsx("div", { className: Slot, children: header2 }),
18980
+ /* @__PURE__ */ jsx("div", { className: Slot, children }),
18981
+ footer && /* @__PURE__ */ jsx("div", { className: Slot, children: footer })
18982
+ ]
18983
+ }
18984
+ )
18985
+ );
18986
+ AccountCard.displayName = "AccountCard";
18987
+ const OnboardingKeyButton_css_ts_vanilla = "";
18988
+ var Button = "_1idz8s11 _8nex5a1 _8nex5a0";
18989
+ var Fill = "_1idz8s13";
18990
+ var Glow = "_1idz8s12";
18991
+ var Label = "_1idz8s14";
18992
+ const OnboardingKeyButton = forwardRef(
18993
+ ({ children, className, type = "button", finishing = false, fullWidth = false, ...props }, ref) => /* @__PURE__ */ jsxs(
18994
+ "button",
18995
+ {
18996
+ ...props,
18997
+ "data-finishing": finishing || void 0,
18998
+ "data-full-width": fullWidth || void 0,
18999
+ ref,
19000
+ type,
19001
+ className: classNames(Button, className),
19002
+ children: [
19003
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: Glow }),
19004
+ /* @__PURE__ */ jsx("span", { "data-weave-key-fill": true, "aria-hidden": "true", className: Fill }),
19005
+ /* @__PURE__ */ jsx("span", { className: Label, children })
19006
+ ]
19007
+ }
19008
+ )
19009
+ );
19010
+ OnboardingKeyButton.displayName = "OnboardingKeyButton";
19011
+ const OptionCard_css_ts_vanilla = "";
19012
+ var Body$1 = "g3b1zp2";
19013
+ var Card$1 = "g3b1zp1 _8nex5a1 _8nex5a0";
19014
+ var Description$1 = "g3b1zp4";
19015
+ var Group$1 = "g3b1zp0";
19016
+ var Indicator = "g3b1zp5";
19017
+ var Title$1 = "g3b1zp3";
19018
+ const OptionCardGroup = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Root2, { ...props, ref, className: classNames(Group$1, className) }));
19019
+ OptionCardGroup.displayName = "OptionCardGroup";
19020
+ const OptionCard = forwardRef(
19021
+ ({ title, description, before, className, ...props }, ref) => {
19022
+ const id = useId$1();
19023
+ return /* @__PURE__ */ jsxs(
19024
+ Item2,
19025
+ {
19026
+ "aria-labelledby": `${id}-title`,
19027
+ "aria-describedby": description ? `${id}-description` : void 0,
19028
+ ...props,
19029
+ ref,
19030
+ className: classNames(Card$1, className),
19031
+ children: [
19032
+ before && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: before }),
19033
+ /* @__PURE__ */ jsxs("span", { className: Body$1, children: [
19034
+ /* @__PURE__ */ jsx("span", { id: `${id}-title`, className: Title$1, children: title }),
19035
+ description && /* @__PURE__ */ jsx("span", { id: `${id}-description`, className: Description$1, children: description })
19036
+ ] }),
19037
+ /* @__PURE__ */ jsx("span", { className: Indicator, "aria-hidden": "true", children: /* @__PURE__ */ jsx(Indicator$1, { children: "✓" }) })
19038
+ ]
19039
+ }
19040
+ );
19041
+ }
19042
+ );
19043
+ OptionCard.displayName = "OptionCard";
19044
+ const ColorSwatchPicker_css_ts_vanilla = "";
19045
+ var Check = "_1z0ew4o3";
19046
+ var Group = "_1z0ew4o0";
19047
+ var Paint = "_1z0ew4o2";
19048
+ var Swatch = "_1z0ew4o1 _8nex5a1 _8nex5a0";
19049
+ const ColorSwatchPicker = forwardRef(
19050
+ ({
19051
+ colors = agentColors,
19052
+ disabledColors = [],
19053
+ onValueChange,
19054
+ className,
19055
+ value: selectedValue,
19056
+ defaultValue,
19057
+ ...props
19058
+ }, ref) => /* @__PURE__ */ jsx(
19059
+ Root2,
19060
+ {
19061
+ "aria-label": "Agent colour",
19062
+ ...props,
19063
+ ref,
19064
+ value: selectedValue === void 0 || isAgentColor(selectedValue) ? selectedValue : "",
19065
+ defaultValue: isAgentColor(defaultValue) ? defaultValue : void 0,
19066
+ className: classNames(Group, className),
19067
+ onValueChange: (value) => onValueChange == null ? void 0 : onValueChange(value),
19068
+ children: [...new Set(colors)].filter(isAgentColor).map((value) => {
19069
+ const token = agentColorTokens[value];
19070
+ return /* @__PURE__ */ jsxs(
19071
+ Item2,
19072
+ {
19073
+ value,
19074
+ "aria-label": token.label,
19075
+ disabled: props.disabled || disabledColors.includes(value),
19076
+ className: Swatch,
19077
+ children: [
19078
+ /* @__PURE__ */ jsx(
19079
+ "span",
19080
+ {
19081
+ "aria-hidden": "true",
19082
+ className: Paint,
19083
+ style: { background: `radial-gradient(circle, ${token.center}, ${token.rim})` }
19084
+ }
19085
+ ),
19086
+ /* @__PURE__ */ jsx(Indicator$1, { "aria-hidden": "true", className: Check, children: "✓" })
19087
+ ]
19088
+ },
19089
+ value
19090
+ );
19091
+ })
19092
+ }
19093
+ )
19094
+ );
19095
+ ColorSwatchPicker.displayName = "ColorSwatchPicker";
19096
+ const OnboardingSetup_css_ts_vanilla = "";
19097
+ var Actions = "_10w4f9zc";
19098
+ var Body = "_10w4f9z5";
19099
+ var Description = "_10w4f9z7";
19100
+ var Hidden = "_10w4f9zd";
19101
+ var Navigation = "_10w4f9zb";
19102
+ var Progress = "_10w4f9z0";
19103
+ var ProgressFill = "_10w4f9z2";
19104
+ var ProgressInset = "var(--_10w4f9z1)";
19105
+ var Row = "_10w4f9z3";
19106
+ var Status = "_10w4f9z8";
19107
+ var Title = "_10w4f9z6";
19108
+ var Well = "_10w4f9z4";
19109
+ var Working = "_10w4f9za";
19110
+ const OnboardingProgress = forwardRef(
19111
+ ({ value, max: max2, label, className, ...props }, ref) => {
19112
+ const end = Number.isFinite(max2) && max2 >= 1 ? Math.floor(max2) : 1;
19113
+ const current2 = Number.isFinite(value) ? Math.floor(Math.min(end, Math.max(0, value))) : 0;
19114
+ return /* @__PURE__ */ jsx(
19115
+ "div",
19116
+ {
19117
+ ...props,
19118
+ ref,
19119
+ className: classNames(Progress, className),
19120
+ role: "progressbar",
19121
+ "aria-label": label,
19122
+ "aria-valuemin": 0,
19123
+ "aria-valuemax": end,
19124
+ "aria-valuenow": current2,
19125
+ "aria-valuetext": props["aria-valuetext"] ?? `Step ${current2} of ${end}`,
19126
+ children: /* @__PURE__ */ jsx(
19127
+ "div",
19128
+ {
19129
+ className: ProgressFill,
19130
+ style: {
19131
+ [ProgressInset.slice(4, -1)]: `${100 * (1 - current2 / end)}%`
19132
+ }
19133
+ }
19134
+ )
19135
+ }
19136
+ );
19137
+ }
19138
+ );
19139
+ OnboardingProgress.displayName = "OnboardingProgress";
19140
+ const statusLabels = {
19141
+ idle: "Not started",
19142
+ working: "Working…",
19143
+ ready: "Ready",
19144
+ error: "Could not finish"
19145
+ };
19146
+ const SetupStatusRow = forwardRef(
19147
+ ({
19148
+ title,
19149
+ description,
19150
+ icon: icon2,
19151
+ state,
19152
+ statusText = statusLabels[state],
19153
+ action: action2,
19154
+ className,
19155
+ ...props
19156
+ }, ref) => {
19157
+ const id = useId$1();
19158
+ const statusRef = useRef(null);
19159
+ const actionRef = useRef(null);
19160
+ const bindAction = useCallback((node) => {
19161
+ var _a;
19162
+ if (!node && actionRef.current === document.activeElement)
19163
+ (_a = statusRef.current) == null ? void 0 : _a.focus();
19164
+ actionRef.current = node;
19165
+ }, []);
19166
+ return /* @__PURE__ */ jsxs("div", { ...props, ref, className: classNames(Row, className), children: [
19167
+ icon2 && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: Well, children: icon2 }),
19168
+ /* @__PURE__ */ jsxs("div", { className: Body, children: [
19169
+ /* @__PURE__ */ jsx("p", { className: Title, children: title }),
19170
+ description && /* @__PURE__ */ jsx("div", { className: Description, children: description })
19171
+ ] }),
19172
+ /* @__PURE__ */ jsxs(
19173
+ "span",
19174
+ {
19175
+ id,
19176
+ role: "status",
19177
+ ref: statusRef,
19178
+ tabIndex: -1,
19179
+ "aria-atomic": "true",
19180
+ "data-state": state,
19181
+ className: Status,
19182
+ children: [
19183
+ /* @__PURE__ */ jsxs("span", { className: Hidden, children: [
19184
+ title,
19185
+ ": "
19186
+ ] }),
19187
+ state === "working" && /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", className: Working, children: [
19188
+ "●",
19189
+ " "
19190
+ ] }),
19191
+ state === "ready" && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "✓ " }),
19192
+ statusText
19193
+ ]
19194
+ }
19195
+ ),
19196
+ action2 && /* @__PURE__ */ jsx(
19197
+ Button$2,
19198
+ {
19199
+ type: "button",
19200
+ variant: "Secondary",
19201
+ ref: bindAction,
19202
+ "aria-disabled": action2.disabled || state === "working" || void 0,
19203
+ onClick: () => {
19204
+ if (!action2.disabled && state !== "working")
19205
+ action2.onClick();
19206
+ },
19207
+ "aria-label": `${action2.label}: ${title}`,
19208
+ children: action2.label
19209
+ }
19210
+ )
19211
+ ] });
19212
+ }
19213
+ );
19214
+ SetupStatusRow.displayName = "SetupStatusRow";
19215
+ const permissionStates = {
19216
+ "not-allowed": "idle",
19217
+ waiting: "working",
19218
+ allowed: "ready",
19219
+ error: "error"
19220
+ };
19221
+ const permissionLabels = {
19222
+ "not-allowed": "Not allowed",
19223
+ waiting: "Waiting for permission…",
19224
+ allowed: "Allowed",
19225
+ error: "Access not granted"
19226
+ };
19227
+ const PermissionRow = forwardRef(
19228
+ ({ state, onAllow, disabled, statusText, actionLabel, ...props }, ref) => /* @__PURE__ */ jsx(
19229
+ SetupStatusRow,
19230
+ {
19231
+ ...props,
19232
+ ref,
19233
+ state: permissionStates[state],
19234
+ statusText: statusText ?? permissionLabels[state],
19235
+ action: onAllow && state !== "allowed" ? {
19236
+ label: actionLabel ?? (state === "error" ? "Try again" : "Allow"),
19237
+ onClick: onAllow,
19238
+ disabled
19239
+ } : void 0
19240
+ }
19241
+ )
19242
+ );
19243
+ PermissionRow.displayName = "PermissionRow";
19244
+ const OnboardingNavigation = forwardRef(
19245
+ ({ back, secondary, primary, className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { ...props, ref, className: classNames(Navigation, className), children: [
19246
+ back,
19247
+ /* @__PURE__ */ jsxs("div", { className: Actions, children: [
19248
+ secondary,
19249
+ primary
19250
+ ] })
19251
+ ] })
19252
+ );
19253
+ OnboardingNavigation.displayName = "OnboardingNavigation";
19254
+ const OnboardingMotion_css_ts_vanilla = "";
19255
+ var Card = "_1b5rjjx3";
19256
+ var Finish = "_1b5rjjx2";
19257
+ var Light = "_1b5rjjx5";
19258
+ var Room = "_1b5rjjx4";
19259
+ var Snapshot = "_1b5rjjx1";
19260
+ var Stage = "_1b5rjjx0";
19261
+ const reduced = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
19262
+ const centre = (element) => {
19263
+ const rect = element.getBoundingClientRect();
19264
+ return { x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 };
19265
+ };
19266
+ class OnboardingTransition extends a__default.Component {
19267
+ constructor() {
19268
+ super(...arguments);
19269
+ this.live = a__default.createRef();
19270
+ this.overlay = a__default.createRef();
19271
+ this.running = [];
19272
+ }
19273
+ getSnapshotBeforeUpdate(previous) {
19274
+ const { stepKey } = this.props;
19275
+ const element = this.live.current;
19276
+ if (previous.stepKey === stepKey || !element)
19277
+ return null;
19278
+ const snapshot = element.cloneNode(true);
19279
+ const originals = element.querySelectorAll("input, textarea, select");
19280
+ const copies = snapshot.querySelectorAll("input, textarea, select");
19281
+ originals.forEach((original, index2) => {
19282
+ const copy = copies[index2];
19283
+ if (original instanceof HTMLInputElement && copy instanceof HTMLInputElement) {
19284
+ if (original.type !== "file")
19285
+ copy.value = original.value;
19286
+ copy.checked = original.checked;
19287
+ } else if (original instanceof HTMLTextAreaElement && copy instanceof HTMLTextAreaElement) {
19288
+ copy.value = original.value;
19289
+ } else if (original instanceof HTMLSelectElement && copy instanceof HTMLSelectElement) {
19290
+ Array.from(original.options).forEach((option, optionIndex) => {
19291
+ copy.options[optionIndex].selected = option.selected;
19292
+ });
19293
+ }
19294
+ });
19295
+ snapshot.setAttribute("inert", "");
19296
+ snapshot.setAttribute("aria-hidden", "true");
19297
+ snapshot.querySelectorAll("[id], [name]").forEach((node) => {
19298
+ node.removeAttribute("id");
19299
+ node.removeAttribute("name");
19300
+ });
19301
+ return snapshot;
19302
+ }
19303
+ componentDidUpdate(...args) {
19304
+ const [previous, , snapshot] = args;
19305
+ const { stepKey, direction } = this.props;
19306
+ if (previous.stepKey === stepKey)
19307
+ return;
19308
+ this.clearExit();
19309
+ const element = this.live.current;
19310
+ const host = this.overlay.current;
19311
+ if (!element || !host || !snapshot)
19312
+ return;
19313
+ host.append(snapshot);
19314
+ const offset2 = direction === "back" ? -24 : 24;
19315
+ const simple = reduced();
19316
+ const enter = element.animate(
19317
+ simple ? [{ opacity: 0 }, { opacity: 1 }] : [
19318
+ { opacity: 0, transform: `translateX(${offset2}px)` },
19319
+ { opacity: 1, transform: "translateX(0)" }
19320
+ ],
19321
+ { duration: 240, easing: "ease-out" }
19322
+ );
19323
+ const leave = snapshot.animate(
19324
+ simple ? [{ opacity: 1 }, { opacity: 0 }] : [
19325
+ { opacity: 1, transform: "translateX(0)" },
19326
+ { opacity: 0, transform: `translateX(${-offset2}px)` }
19327
+ ],
19328
+ { duration: 200, easing: "ease-out", fill: "forwards" }
19329
+ );
19330
+ leave.onfinish = () => snapshot.remove();
19331
+ this.running = [enter, leave];
19332
+ }
19333
+ componentWillUnmount() {
19334
+ this.clearExit();
19335
+ }
19336
+ clearExit() {
19337
+ var _a;
19338
+ this.running.forEach((animation) => animation.cancel());
19339
+ this.running = [];
19340
+ (_a = this.overlay.current) == null ? void 0 : _a.replaceChildren();
19341
+ }
19342
+ render() {
19343
+ const { children } = this.props;
19344
+ return /* @__PURE__ */ jsxs("div", { className: Stage, children: [
19345
+ /* @__PURE__ */ jsx("div", { ref: this.overlay, className: Snapshot, "aria-hidden": "true" }),
19346
+ /* @__PURE__ */ jsx("div", { ref: this.live, children })
19347
+ ] });
19348
+ }
19349
+ }
19350
+ function useAgentColorMotion() {
19351
+ const cleanup = useRef(() => void 0);
19352
+ useLayoutEffect(() => () => cleanup.current(), []);
19353
+ return useCallback((source2, target, color2) => {
19354
+ cleanup.current();
19355
+ const animations = [];
19356
+ const start = centre(source2);
19357
+ const end = centre(target);
19358
+ const orb = document.createElement("span");
19359
+ orb.setAttribute("aria-hidden", "true");
19360
+ orb.className = Light;
19361
+ Object.assign(orb.style, {
19362
+ left: `${start.x - 120}px`,
19363
+ top: `${start.y - 120}px`,
19364
+ background: `radial-gradient(circle, ${agentColorTokens[color2].center}, ${agentColorTokens[color2].rim})`
19365
+ });
19366
+ document.body.append(orb);
19367
+ const flight = orb.animate(
19368
+ reduced() ? [{ opacity: 0 }, { opacity: 0 }] : [
19369
+ { transform: "translate(0, 0) scale(.1)", opacity: 1 },
19370
+ {
19371
+ transform: `translate(${end.x - start.x}px, ${end.y - start.y}px) scale(.1)`,
19372
+ opacity: 1
19373
+ }
19374
+ ],
19375
+ { duration: reduced() ? 0 : 240, easing: "cubic-bezier(.55,0,1,.45)", fill: "forwards" }
19376
+ );
19377
+ animations.push(flight);
19378
+ flight.onfinish = () => {
19379
+ orb.style.left = `${end.x - 120}px`;
19380
+ orb.style.top = `${end.y - 120}px`;
19381
+ flight.cancel();
19382
+ const bloom = orb.animate(
19383
+ reduced() ? [{ opacity: 0.3 }, { opacity: 0 }] : [
19384
+ { transform: "scale(.08)", opacity: 1 },
19385
+ { transform: "scale(.6)", opacity: 0 }
19386
+ ],
19387
+ { duration: 300 }
19388
+ );
19389
+ animations.push(bloom);
19390
+ bloom.onfinish = () => orb.remove();
19391
+ if (!reduced())
19392
+ animations.push(
19393
+ target.animate(
19394
+ [{ transform: "scale(1)" }, { transform: "scale(1.12)" }, { transform: "scale(1)" }],
19395
+ { duration: 300 }
19396
+ )
19397
+ );
19398
+ };
19399
+ cleanup.current = () => {
19400
+ animations.forEach((animation) => animation.cancel());
19401
+ orb.remove();
19402
+ };
19403
+ }, []);
19404
+ }
19405
+ const OnboardingFinish = ({
19406
+ active,
19407
+ color: color2,
19408
+ originRef,
19409
+ destinationRef,
19410
+ card: card2,
19411
+ room,
19412
+ roomLabel = "Your first room",
19413
+ className
19414
+ }) => {
19415
+ const host = useRef(null);
19416
+ const cardRef = useRef(null);
19417
+ const roomRef = useRef(null);
19418
+ const latestColor = useRef(color2);
19419
+ latestColor.current = color2;
19420
+ const wasActive = useRef(false);
19421
+ const [fieldFinish, setFieldFinish] = useState();
19422
+ useLayoutEffect(() => {
19423
+ var _a;
19424
+ const cardElement = cardRef.current;
19425
+ const roomElement = roomRef.current;
19426
+ if (!active || !host.current || !cardElement || !roomElement) {
19427
+ setFieldFinish(void 0);
19428
+ if (wasActive.current && document.activeElement === document.body) {
19429
+ (_a = cardElement == null ? void 0 : cardElement.querySelector(
19430
+ 'button:not([disabled]):not([aria-disabled="true"]):not([tabindex="-1"]), input:not([disabled]):not([type="hidden"]):not([tabindex="-1"]), [tabindex]:not([disabled]):not([aria-disabled="true"]):not([tabindex="-1"])'
19431
+ )) == null ? void 0 : _a.focus({ preventScroll: true });
19432
+ }
19433
+ wasActive.current = false;
19434
+ return void 0;
19435
+ }
19436
+ wasActive.current = true;
19437
+ const start = centre(originRef.current ?? cardElement);
19438
+ const end = centre(destinationRef.current ?? roomElement);
19439
+ const bounds = host.current.getBoundingClientRect();
19440
+ const cardCentre = centre(cardElement);
19441
+ const simple = reduced();
19442
+ setFieldFinish({
19443
+ origin: {
19444
+ x: (start.x - bounds.left) / (bounds.width || 1),
19445
+ y: (start.y - bounds.top) / (bounds.height || 1)
19446
+ },
19447
+ startedAt: performance.now()
19448
+ });
19449
+ const animations = [];
19450
+ const focusWasInCard = cardElement.contains(document.activeElement);
19451
+ cardElement.setAttribute("inert", "");
19452
+ cardElement.setAttribute("aria-hidden", "true");
19453
+ if (focusWasInCard)
19454
+ roomElement.focus({ preventScroll: true });
19455
+ animations.push(
19456
+ cardElement.animate(
19457
+ simple ? [{ opacity: 1 }, { opacity: 0 }] : [
19458
+ { opacity: 1, transform: "translate(0, 0) scale(1)", filter: "blur(0px)" },
19459
+ {
19460
+ opacity: 0,
19461
+ transform: `translate(${start.x - cardCentre.x}px, ${start.y - cardCentre.y}px) scale(.03)`,
19462
+ filter: "blur(18px)"
19463
+ }
19464
+ ],
19465
+ { duration: simple ? 180 : 650, easing: "ease-in", fill: "forwards" }
19466
+ )
19467
+ );
19468
+ animations.push(
19469
+ roomElement.animate([{ opacity: 0 }, { opacity: 1 }], {
19470
+ duration: simple ? 180 : 600,
19471
+ delay: simple ? 0 : 800,
19472
+ fill: "both"
19473
+ })
19474
+ );
19475
+ const light = document.createElement("span");
19476
+ light.className = Light;
19477
+ light.setAttribute("aria-hidden", "true");
19478
+ Object.assign(light.style, {
19479
+ left: `${start.x - 120}px`,
19480
+ top: `${start.y - 120}px`,
19481
+ background: agentColorTokens[latestColor.current].center
19482
+ });
19483
+ document.body.append(light);
19484
+ if (!simple) {
19485
+ const reveal = light.animate(
19486
+ [
19487
+ { transform: "translate(0, 0) scale(.05)", opacity: 0, filter: "blur(0px)", offset: 0 },
19488
+ {
19489
+ transform: "translate(0, 0) scale(5)",
19490
+ opacity: 0.85,
19491
+ filter: "blur(20px)",
19492
+ offset: 0.625
19493
+ },
19494
+ {
19495
+ transform: `translate(${end.x - start.x}px, ${end.y - start.y}px) scale(.15)`,
19496
+ opacity: 0,
19497
+ filter: "blur(0px)",
19498
+ offset: 1
19499
+ }
19500
+ ],
19501
+ { duration: 1600, easing: "ease-in-out" }
19502
+ );
19503
+ animations.push(reveal);
19504
+ reveal.onfinish = () => {
19505
+ light.remove();
19506
+ if (destinationRef.current && !reduced())
19507
+ animations.push(
19508
+ destinationRef.current.animate(
19509
+ [{ transform: "scale(1)" }, { transform: "scale(1.15)" }, { transform: "scale(1)" }],
19510
+ { duration: 200 }
19511
+ )
19512
+ );
19513
+ };
19514
+ } else
19515
+ light.remove();
19516
+ const preference = window.matchMedia("(prefers-reduced-motion: reduce)");
19517
+ const stopMovement = () => {
19518
+ if (!preference.matches)
19519
+ return;
19520
+ animations.forEach((animation) => animation.finish());
19521
+ light.remove();
19522
+ };
19523
+ preference.addEventListener("change", stopMovement);
19524
+ return () => {
19525
+ preference.removeEventListener("change", stopMovement);
19526
+ animations.forEach((animation) => animation.cancel());
19527
+ light.remove();
19528
+ cardElement.removeAttribute("inert");
19529
+ cardElement.removeAttribute("aria-hidden");
19530
+ };
19531
+ }, [active, originRef, destinationRef]);
19532
+ return /* @__PURE__ */ jsxs("div", { ref: host, className: [Finish, className].filter(Boolean).join(" "), children: [
19533
+ /* @__PURE__ */ jsx(OrbBackground, { agentColor: color2, finish: fieldFinish }),
19534
+ /* @__PURE__ */ jsx(
19535
+ "div",
19536
+ {
19537
+ ref: cardRef,
19538
+ className: Card,
19539
+ style: active ? { position: "absolute", inset: 0, pointerEvents: "none" } : void 0,
19540
+ children: card2
19541
+ }
19542
+ ),
19543
+ active && /* @__PURE__ */ jsx("div", { ref: roomRef, className: Room, role: "region", "aria-label": roomLabel, tabIndex: -1, children: room })
19544
+ ] });
19545
+ };
18765
19546
  function ActionGroup({ actions, hint: hint$1 }) {
18766
19547
  return /* @__PURE__ */ jsxs("div", { className: actionSection, children: [
18767
19548
  /* @__PURE__ */ jsx("div", { className: actionGroup, role: "group", "aria-label": "Draft a PR request", children: actions.map((action$1) => /* @__PURE__ */ jsxs(
@@ -18785,6 +19566,7 @@ export {
18785
19566
  AGENT_MARK_PLATE_DEFAULT,
18786
19567
  AGENT_MARK_PLATE_VAR,
18787
19568
  AGENT_STATE_MARKS,
19569
+ AccountCard,
18788
19570
  ActionGroup,
18789
19571
  ActivityGroup,
18790
19572
  ActivityHeader,
@@ -18800,9 +19582,10 @@ export {
18800
19582
  AvatarImage,
18801
19583
  Badge,
18802
19584
  Box,
18803
- Button$1 as Button,
19585
+ Button$2 as Button,
18804
19586
  Checkbox,
18805
19587
  Chip,
19588
+ ColorSwatchPicker,
18806
19589
  CommonsTab,
18807
19590
  CommonsTabStrip,
18808
19591
  ComposeIcon,
@@ -18853,11 +19636,19 @@ export {
18853
19636
  LobbyStep,
18854
19637
  LobbyYourAgentCard,
18855
19638
  MOBILE_BREAKPOINT,
19639
+ MediaFrame,
18856
19640
  MemberTypeTag,
18857
19641
  Menu,
18858
19642
  MenuItem,
18859
19643
  Modal,
18860
19644
  NavCollapseRow,
19645
+ OnboardingFinish,
19646
+ OnboardingKeyButton,
19647
+ OnboardingNavigation,
19648
+ OnboardingProgress,
19649
+ OnboardingTransition,
19650
+ OptionCard,
19651
+ OptionCardGroup,
18861
19652
  OrbBackground,
18862
19653
  OrbBackgroundHost,
18863
19654
  Overlay,
@@ -18882,6 +19673,7 @@ export {
18882
19673
  PeopleGlyph,
18883
19674
  PeopleLine,
18884
19675
  PeopleLineFace,
19676
+ PermissionRow,
18885
19677
  PopOut,
18886
19678
  PopOutContainerProvider,
18887
19679
  Portal,
@@ -18906,6 +19698,7 @@ export {
18906
19698
  SequenceCard,
18907
19699
  ServerBadge,
18908
19700
  FormRow as SettingTile,
19701
+ SetupStatusRow,
18909
19702
  Sidebar,
18910
19703
  SidebarAddAgent,
18911
19704
  SidebarAvatar,
@@ -18945,7 +19738,12 @@ export {
18945
19738
  UnreadBadge,
18946
19739
  UnreadBadgeCenter,
18947
19740
  abbreviateCount,
19741
+ agentColorTokens,
19742
+ agentColors,
19743
+ agentIdentityFamilies,
19744
+ agentIdentityIndex,
18948
19745
  as,
19746
+ auraColorTokens,
18949
19747
  avatarRadii,
18950
19748
  avatarSizes,
18951
19749
  blueAccent,
@@ -18969,11 +19767,13 @@ export {
18969
19767
  getScreenSize,
18970
19768
  identityFamilies,
18971
19769
  identityValues,
19770
+ isAgentColor,
18972
19771
  lightClass,
18973
19772
  lightColorValues,
18974
19773
  lightTheme,
18975
19774
  motion,
18976
19775
  mountAliveMark,
19776
+ onboardingTokens,
18977
19777
  percent,
18978
19778
  personAvatarInk,
18979
19779
  personAvatarTones,
@@ -18985,6 +19785,7 @@ export {
18985
19785
  toSrgbHex,
18986
19786
  typeTileIcon,
18987
19787
  uiFontFamily,
19788
+ useAgentColorMotion,
18988
19789
  useElementSizeObserver,
18989
19790
  useOverlayContainer,
18990
19791
  usePopOutContainer,