@planningcenter/topbar 10.20.0 → 10.20.1

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.
@@ -33,9 +33,10 @@
33
33
  children
34
34
  }) => {
35
35
  const handleClick = event => {
36
+ var _a;
36
37
  event.preventDefault();
37
38
  event.stopPropagation();
38
- document.getElementById("main-content")?.focus();
39
+ (_a = document.getElementById("main-content")) === null || _a === void 0 ? void 0 : _a.focus();
39
40
  };
40
41
  return /*#__PURE__*/React.createElement("div", {
41
42
  className: styles$c["accessibility-toolbar"]
@@ -47,16 +48,6 @@
47
48
  }), children);
48
49
  };
49
50
 
50
- function _extends() {
51
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
52
- for (var e = 1; e < arguments.length; e++) {
53
- var t = arguments[e];
54
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
55
- }
56
- return n;
57
- }, _extends.apply(null, arguments);
58
- }
59
-
60
51
  function getDefaultExportFromCjs (x) {
61
52
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
62
53
  }
@@ -170,7 +161,8 @@
170
161
  });
171
162
  };
172
163
  function inferRailsCsrfToken() {
173
- return window?.Rails?.csrfToken() || document.querySelector('meta[name="csrf-token"]')?.getAttribute("content") || null;
164
+ var _a, _b;
165
+ return ((_a = window === null || window === void 0 ? void 0 : window.Rails) === null || _a === void 0 ? void 0 : _a.csrfToken()) || ((_b = document.querySelector('meta[name="csrf-token"]')) === null || _b === void 0 ? void 0 : _b.getAttribute("content")) || null;
174
166
  }
175
167
  function apiRequest(fetch, url, {
176
168
  method = "GET",
@@ -216,17 +208,17 @@
216
208
  d: "M21.482,16.626,19.1,13.649V9a7,7,0,0,0-14,0v4.649L2.478,16.929A1.89,1.89,0,0,0,3.952,20H9.285a2.983,2.983,0,0,0,5.633,0H19.86a2.077,2.077,0,0,0,1.622-3.374ZM19.86,18H4.182l2.7-3.375A1,1,0,0,0,7.1,14V9a5,5,0,0,1,10,0v5a1,1,0,0,0,.219.625l2.6,3.25Z",
217
209
  fill: "white"
218
210
  });
219
- return /*#__PURE__*/React.createElement("svg", _extends({
211
+ return /*#__PURE__*/React.createElement("svg", {
220
212
  width: "24",
221
213
  height: "24",
222
214
  viewBox: "0 0 24 24",
223
215
  style: {
224
216
  display: "block",
225
217
  ...style
226
- }
227
- }, props, {
218
+ },
219
+ ...props,
228
220
  stroke: "none"
229
- }), /*#__PURE__*/React.createElement("title", null, "bell"), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("mask", {
221
+ }, /*#__PURE__*/React.createElement("title", null, "bell"), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("mask", {
230
222
  id: "mask-no-dot"
231
223
  }, bellPath), /*#__PURE__*/React.createElement("mask", {
232
224
  id: "mask-dot"
@@ -253,14 +245,15 @@
253
245
  id = "default",
254
246
  style,
255
247
  ...nativeProps
256
- }) => /*#__PURE__*/React.createElement("svg", _extends({
248
+ }) => (/*#__PURE__*/React.createElement("svg", {
257
249
  fill: "none",
258
250
  height: "123",
259
251
  style: {
260
252
  ...style
261
253
  },
262
- width: "160"
263
- }, nativeProps), /*#__PURE__*/React.createElement("g", {
254
+ width: "160",
255
+ ...nativeProps
256
+ }, /*#__PURE__*/React.createElement("g", {
264
257
  clipPath: `url(#clip-path-blank-state-${id})`
265
258
  }, /*#__PURE__*/React.createElement("path", {
266
259
  opacity: ".6",
@@ -292,70 +285,76 @@
292
285
  }, /*#__PURE__*/React.createElement("path", {
293
286
  fill: "#fff",
294
287
  d: "M0 0h160v122.063H0z"
295
- }))));
288
+ })))));
296
289
  const DisclosureChevronIcon = ({
297
290
  className,
298
291
  style,
299
292
  ...nativeProps
300
- }) => /*#__PURE__*/React.createElement("svg", _extends({
293
+ }) => (/*#__PURE__*/React.createElement("svg", {
301
294
  className: className,
302
295
  height: "16",
303
296
  viewBox: "0 0 16 16",
304
297
  width: "16",
305
- style
306
- }, nativeProps), /*#__PURE__*/React.createElement("title", null, "chevron"), /*#__PURE__*/React.createElement("polygon", {
298
+ ...{
299
+ style
300
+ },
301
+ ...nativeProps
302
+ }, /*#__PURE__*/React.createElement("title", null, "chevron"), /*#__PURE__*/React.createElement("polygon", {
307
303
  fill: "currentColor",
308
304
  points: "11.931 4.892 8 8.824 4.069 4.892 2.927 6.034 8 11.108 9.142 9.966 13.073 6.034 11.931 4.892"
309
- }));
305
+ })));
310
306
  const ExclamationTriangle = ({
311
307
  fill = "#000",
312
308
  size = 24,
313
309
  style,
314
310
  ...nativeProps
315
- }) => /*#__PURE__*/React.createElement("svg", _extends({
311
+ }) => (/*#__PURE__*/React.createElement("svg", {
316
312
  height: size,
317
313
  style: {
318
314
  display: "block",
319
315
  ...style
320
316
  },
321
317
  viewBox: "0 0 16 16",
322
- width: size
323
- }, nativeProps), /*#__PURE__*/React.createElement("title", null, "exclamation triangle icon"), /*#__PURE__*/React.createElement("path", {
318
+ width: size,
319
+ ...nativeProps
320
+ }, /*#__PURE__*/React.createElement("title", null, "exclamation triangle icon"), /*#__PURE__*/React.createElement("path", {
324
321
  d: "M15.669 13.676L8.65499 1.56099C8.58867 1.44593 8.49322 1.35037 8.37823 1.28392C8.26325 1.21748 8.13279 1.1825 7.99999 1.1825C7.86718 1.1825 7.73672 1.21748 7.62174 1.28392C7.50675 1.35037 7.4113 1.44593 7.34499 1.56099L0.330986 13.676C0.264196 13.7911 0.228916 13.9217 0.2287 14.0548C0.228484 14.1878 0.26334 14.3186 0.329756 14.4339C0.396172 14.5492 0.491802 14.6449 0.60701 14.7115C0.722218 14.778 0.852933 14.813 0.985986 14.813H15.014C15.147 14.813 15.2778 14.778 15.393 14.7115C15.5082 14.6449 15.6038 14.5492 15.6702 14.4339C15.7366 14.3186 15.7715 14.1878 15.7713 14.0548C15.7711 13.9217 15.7358 13.7911 15.669 13.676ZM8.75699 12.542H7.24299V11.028H8.75699V12.542ZM8.75699 9.51399H7.24299V6.48499H8.75699V9.51399Z",
325
322
  fill: fill
326
- }));
323
+ })));
327
324
  const Spyglass = ({
328
325
  fill = "#000",
329
326
  style,
330
327
  ...nativeProps
331
- }) => /*#__PURE__*/React.createElement("svg", _extends({
328
+ }) => (/*#__PURE__*/React.createElement("svg", {
332
329
  width: "24",
333
330
  height: "24",
334
331
  viewBox: "0 0 24 24",
335
332
  style: {
336
333
  display: "block",
337
334
  ...style
338
- }
339
- }, nativeProps), /*#__PURE__*/React.createElement("title", null, "search spyglass icon"), /*#__PURE__*/React.createElement("path", {
335
+ },
336
+ ...nativeProps
337
+ }, /*#__PURE__*/React.createElement("title", null, "search spyglass icon"), /*#__PURE__*/React.createElement("path", {
340
338
  d: "M17.352,15.481a8.517,8.517,0,1,0-2.209,2.033l4.642,4.642,2.121-2.121Zm-6.757,1.364a6.5,6.5,0,1,1,6.5-6.5A6.508,6.508,0,0,1,10.595,16.845Z",
341
339
  fill: fill
342
- }));
340
+ })));
343
341
  const X = ({
344
342
  fill = "#A0A0A0",
345
343
  style,
346
344
  ...nativeProps
347
- }) => /*#__PURE__*/React.createElement("svg", _extends({
345
+ }) => (/*#__PURE__*/React.createElement("svg", {
348
346
  width: "16",
349
347
  height: "16",
350
348
  viewBox: "0 0 16 16",
351
349
  style: {
352
350
  display: "block",
353
351
  ...style
354
- }
355
- }, nativeProps), /*#__PURE__*/React.createElement("title", null, "close-x"), /*#__PURE__*/React.createElement("path", {
352
+ },
353
+ ...nativeProps
354
+ }, /*#__PURE__*/React.createElement("title", null, "close-x"), /*#__PURE__*/React.createElement("path", {
356
355
  d: "M9.142,8l3.814,3.814-1.142,1.142L8,9.142,4.186,12.956,3.044,11.814,6.858,8,3.044,4.186,4.186,3.044,8,6.858l3.814-3.814,1.142,1.142Z",
357
356
  fill: fill
358
- }));
357
+ })));
359
358
 
360
359
  var styles$b = {"announcement":"announcement-pI5tM","announcement--platform":"announcement--platform-EcUn2","announcement-icon":"announcement-icon-Ov39-","announcement-content":"announcement-content-q2ad6","dismiss":"dismiss-wUAoU"};
361
360
 
@@ -396,9 +395,6 @@
396
395
  announcements: props.initialAnnouncements
397
396
  };
398
397
  }
399
- static defaultProps = {
400
- formatter: formatter
401
- };
402
398
  dismissAnnouncements(id) {
403
399
  this.setState(({
404
400
  announcements
@@ -421,6 +417,9 @@
421
417
  }));
422
418
  }
423
419
  }
420
+ Provider.defaultProps = {
421
+ formatter: formatter
422
+ };
424
423
  let StyledAnnouncement$1 = class StyledAnnouncement extends React.Component {
425
424
  render() {
426
425
  const {
@@ -429,10 +428,11 @@
429
428
  } = this.props;
430
429
  return /*#__PURE__*/React.createElement("div", {
431
430
  className: classnames(styles$b["announcement"], styles$b["announcement--platform"])
432
- }, /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", _extends({
431
+ }, /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", {
433
432
  className: styles$b["announcement-content"],
434
- style: style
435
- }, platformProps)));
433
+ style: style,
434
+ ...platformProps
435
+ }));
436
436
  }
437
437
  };
438
438
  let StyleProvider$1 = class StyleProvider extends React.Component {
@@ -440,39 +440,42 @@
440
440
  const {
441
441
  ...platformProps
442
442
  } = this.props;
443
- return /*#__PURE__*/React.createElement("div", platformProps);
443
+ return /*#__PURE__*/React.createElement("div", {
444
+ ...platformProps
445
+ });
444
446
  }
445
447
  };
446
448
  class PlatformAnnouncements extends React.Component {
447
- static defaultProps = {
448
- configuredFetch: defaultFetch,
449
- renderItem: ({
450
- announcement,
451
- actions
452
- }) => /*#__PURE__*/React.createElement(DissmissibleAnnouncement, {
453
- key: announcement.id,
454
- html: announcement.data.html,
455
- onClick: () => actions.dismissAnnouncements(announcement.id)
456
- })
457
- };
458
449
  render() {
459
450
  return /*#__PURE__*/React.createElement(StyleProvider$1, null, /*#__PURE__*/React.createElement(Provider, {
460
451
  env: this.props.env,
461
452
  initialAnnouncements: this.props.data,
462
453
  configuredFetch: this.props.configuredFetch
463
- }, (data, actions) => Boolean(data.announcements.length > 0) ? /*#__PURE__*/React.createElement("div", null, data.announcements.map(announcement => this.props.renderItem({
454
+ }, (data, actions) => Boolean(data.announcements.length > 0) ? (/*#__PURE__*/React.createElement("div", null, data.announcements.map(announcement => this.props.renderItem({
464
455
  actions,
465
456
  announcement
466
- }))) : null));
457
+ })))) : null));
467
458
  }
468
459
  }
460
+ PlatformAnnouncements.defaultProps = {
461
+ configuredFetch: defaultFetch,
462
+ renderItem: ({
463
+ announcement,
464
+ actions
465
+ }) => (/*#__PURE__*/React.createElement(DissmissibleAnnouncement, {
466
+ key: announcement.id,
467
+ html: announcement.data.html,
468
+ onClick: () => actions.dismissAnnouncements(announcement.id)
469
+ }))
470
+ };
469
471
  function StyledDismissButton$1({
470
472
  ...props
471
473
  }) {
472
- return /*#__PURE__*/React.createElement("button", _extends({
474
+ return /*#__PURE__*/React.createElement("button", {
473
475
  type: "button",
474
- className: styles$b.dismiss
475
- }, props), /*#__PURE__*/React.createElement(X, {
476
+ className: styles$b.dismiss,
477
+ ...props
478
+ }, /*#__PURE__*/React.createElement(X, {
476
479
  fill: "white",
477
480
  style: {
478
481
  height: 20,
@@ -509,7 +512,6 @@
509
512
 
510
513
  Attributes like `className`, `id`, `data-*`, and `aria-*` are all applied to the root element.
511
514
  */
512
-
513
515
  function ProductAnnouncement({
514
516
  html = "",
515
517
  onClick = _event => {
@@ -518,7 +520,9 @@
518
520
  ...props
519
521
  }) {
520
522
  const [dismissed, updateDismissed] = React.useState(false);
521
- return dismissed || !html ? null : /*#__PURE__*/React.createElement(StyleProvider, props, /*#__PURE__*/React.createElement(StyledAnnouncement, null, /*#__PURE__*/React.createElement("span", {
523
+ return dismissed || !html ? null : (/*#__PURE__*/React.createElement(StyleProvider, {
524
+ ...props
525
+ }, /*#__PURE__*/React.createElement(StyledAnnouncement, null, /*#__PURE__*/React.createElement("span", {
522
526
  dangerouslySetInnerHTML: {
523
527
  __html: html
524
528
  }
@@ -527,14 +531,16 @@
527
531
  onClick(event);
528
532
  updateDismissed(true);
529
533
  }
530
- })));
534
+ }))));
531
535
  }
532
536
  class StyleProvider extends React.Component {
533
537
  render() {
534
538
  const {
535
539
  ...platformProps
536
540
  } = this.props;
537
- return /*#__PURE__*/React.createElement("div", platformProps);
541
+ return /*#__PURE__*/React.createElement("div", {
542
+ ...platformProps
543
+ });
538
544
  }
539
545
  }
540
546
  class StyledAnnouncement extends React.Component {
@@ -545,19 +551,21 @@
545
551
  } = this.props;
546
552
  return /*#__PURE__*/React.createElement("div", {
547
553
  className: styles$b["announcement"]
548
- }, /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", _extends({
554
+ }, /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", {
549
555
  className: styles$b["announcement-content"],
550
- style: style
551
- }, platformProps)));
556
+ style: style,
557
+ ...platformProps
558
+ }));
552
559
  }
553
560
  }
554
561
  function StyledDismissButton({
555
562
  ...props
556
563
  }) {
557
- return /*#__PURE__*/React.createElement("button", _extends({
564
+ return /*#__PURE__*/React.createElement("button", {
558
565
  type: "button",
559
- className: styles$b.dismiss
560
- }, props), /*#__PURE__*/React.createElement(X, {
566
+ className: styles$b.dismiss,
567
+ ...props
568
+ }, /*#__PURE__*/React.createElement(X, {
561
569
  fill: "white",
562
570
  style: {
563
571
  height: 20,
@@ -633,8 +641,9 @@
633
641
  }, [enabled, subscribeToJoltChannel]);
634
642
  React.useEffect(() => {
635
643
  const pcoPageExpiredHandler = event => {
644
+ var _a;
636
645
  if (!event.data.hasOwnProperty("PCOPageExpiredCurrentPersonACID")) return;
637
- if (event.data.PCOPageExpiredCurrentPersonACID === window?.pcoPageExpired?.currentPersonACID) return;
646
+ if (event.data.PCOPageExpiredCurrentPersonACID === ((_a = window === null || window === void 0 ? void 0 : window.pcoPageExpired) === null || _a === void 0 ? void 0 : _a.currentPersonACID)) return;
638
647
  if (joltInstance) joltInstance.disconnect();
639
648
  };
640
649
  window.addEventListener("message", pcoPageExpiredHandler);
@@ -649,7 +658,6 @@
649
658
  }, [joltInstance]);
650
659
  return joltChannel;
651
660
  };
652
-
653
661
  // TODO: This can be removed once all Topbar consumers that
654
662
  // provide a joltPromise are updated to jolt-client v2
655
663
  const buildLegacyJoltChannel = (jolt, channelName, fetchSubscribeTokenFn) => {
@@ -659,7 +667,8 @@
659
667
  return channel;
660
668
  };
661
669
  const buildJoltChannel = (jolt, channelName, fetchSubscribeTokenFn) => {
662
- const channel = jolt.allSubscriptions?.find(s => s.channel === channelName) || jolt.subscribe(channelName, {
670
+ var _a;
671
+ const channel = ((_a = jolt.allSubscriptions) === null || _a === void 0 ? void 0 : _a.find(s => s.channel === channelName)) || jolt.subscribe(channelName, {
663
672
  fetchSubscribeTokenFn
664
673
  });
665
674
  channel.subscribe();
@@ -708,7 +717,6 @@
708
717
  try {
709
718
  // Get from local storage by key
710
719
  const item = window.localStorage.getItem(key);
711
-
712
720
  // Parse stored json or if none return initialValue
713
721
  return item ? JSON.parse(item) : initialValue;
714
722
  } catch (error) {
@@ -716,13 +724,11 @@
716
724
  return initialValue;
717
725
  }
718
726
  });
719
-
720
727
  // Reflect the state into localStorage as a side effect.
721
728
  const localStorageRepresentation = JSON.stringify(storedValue);
722
729
  React.useEffect(() => {
723
730
  window.localStorage.setItem(key, localStorageRepresentation);
724
731
  }, [key, localStorageRepresentation]);
725
-
726
732
  // When we are done with this key, drop it from localStorage completely
727
733
  const dropKey = () => window.localStorage.removeItem(key);
728
734
  return {
@@ -813,22 +819,21 @@
813
819
  render,
814
820
  userId
815
821
  }) => {
822
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
816
823
  const topbarResponse = useTopbarAPI({
817
824
  configuredFetch,
818
825
  env
819
826
  });
820
827
  const apps = formatter(topbarResponse);
821
- const hasConnectedPeople = topbarResponse?.data?.attributes?.has_connected_people;
822
- const mfaConfigured = !!topbarResponse?.data?.attributes?.mfa_configured;
823
- const colorModeSelectionEnabled = topbarResponse?.data?.attributes?.features?.includes("color_mode_selection_enabled") ?? false;
824
- const colorModeLaunched = topbarResponse?.data?.attributes?.features?.includes("color_mode_launched") ?? false;
825
- const colorMode = topbarResponse?.data?.attributes?.color_mode;
826
- const name = topbarResponse?.data?.attributes?.name;
828
+ const hasConnectedPeople = (_b = (_a = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b.has_connected_people;
829
+ const mfaConfigured = !!((_d = (_c = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _c === void 0 ? void 0 : _c.attributes) === null || _d === void 0 ? void 0 : _d.mfa_configured);
830
+ const colorMode = (_f = (_e = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _e === void 0 ? void 0 : _e.attributes) === null || _f === void 0 ? void 0 : _f.color_mode;
831
+ const name = (_h = (_g = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _g === void 0 ? void 0 : _g.attributes) === null || _h === void 0 ? void 0 : _h.name;
827
832
  const notificationsEnabled = !window.notificationsDisabled;
828
- const organizationTimeZone = topbarResponse?.data?.attributes?.org_time_zone || "America/Los_Angeles";
833
+ const organizationTimeZone = ((_k = (_j = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _j === void 0 ? void 0 : _j.attributes) === null || _k === void 0 ? void 0 : _k.org_time_zone) || "America/Los_Angeles";
829
834
  const algoliaSearchAuth = {
830
- algoliaApplicationId: topbarResponse?.data?.attributes?.algolia_application_identifier,
831
- algoliaSearchOnlyApiKey: topbarResponse?.data?.attributes?.algolia_search_key
835
+ algoliaApplicationId: (_m = (_l = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _l === void 0 ? void 0 : _l.attributes) === null || _m === void 0 ? void 0 : _m.algolia_application_identifier,
836
+ algoliaSearchOnlyApiKey: (_p = (_o = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _o === void 0 ? void 0 : _o.attributes) === null || _p === void 0 ? void 0 : _p.algolia_search_key
832
837
  };
833
838
  const joltPromise = React.useMemo(() => {
834
839
  return resolveJoltPromise({
@@ -880,8 +885,6 @@
880
885
  ...state,
881
886
  algoliaSearchAuth,
882
887
  colorMode,
883
- colorModeLaunched,
884
- colorModeSelectionEnabled,
885
888
  disconnectJoltOnUnmount: !providedJoltPromise,
886
889
  hasConnectedPeople,
887
890
  indicatorVisible: {
@@ -901,17 +904,16 @@
901
904
  organizationTimeZone,
902
905
  userId
903
906
  });
904
- }, [colorMode, colorModeLaunched, joltPromise, mfaConfigured, name, notificationsEnabled, notificationsHasUnread, organizationTimeZone, colorModeSelectionEnabled, userId]);
905
-
907
+ }, [colorMode, joltPromise, mfaConfigured, name, notificationsEnabled, notificationsHasUnread, organizationTimeZone, userId]);
906
908
  // TODO: remove `fetch` and `remove` (breaking changes)
907
909
  return render(apps || [], {
908
910
  fetch: () => {},
909
- // no-op because we already have fresh data
910
911
  remove: () => {} // no-op because we are no longer caching anyway
911
912
  });
912
913
  };
913
914
  function mapApps(resp) {
914
- return resp?.data?.attributes?.apps || [];
915
+ var _a, _b;
916
+ return ((_b = (_a = resp === null || resp === void 0 ? void 0 : resp.data) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b.apps) || [];
915
917
  }
916
918
 
917
919
  function remove() {
@@ -927,9 +929,6 @@
927
929
  connectedPeople: []
928
930
  };
929
931
  }
930
- static defaultProps = {
931
- configuredFetch: defaultFetch
932
- };
933
932
  fetch() {
934
933
  apiRequest(this.props.configuredFetch, `${pcoUrl(this.props.env)("api")}/login/v2/me/connected_people`).then(({
935
934
  json,
@@ -948,7 +947,8 @@
948
947
  }).then(({
949
948
  json
950
949
  }) => {
951
- if (json?.meta?.redirect_to) navigateTo(json.meta.redirect_to);
950
+ var _a;
951
+ if ((_a = json === null || json === void 0 ? void 0 : json.meta) === null || _a === void 0 ? void 0 : _a.redirect_to) navigateTo(json.meta.redirect_to);
952
952
  });
953
953
  }
954
954
  switch(toId, returnPath) {
@@ -965,7 +965,8 @@
965
965
  }).then(({
966
966
  json
967
967
  }) => {
968
- if (json?.meta?.redirect_to) navigateTo(json.meta.redirect_to);
968
+ var _a;
969
+ if ((_a = json === null || json === void 0 ? void 0 : json.meta) === null || _a === void 0 ? void 0 : _a.redirect_to) navigateTo(json.meta.redirect_to);
969
970
  });
970
971
  }
971
972
  componentDidMount() {
@@ -984,6 +985,9 @@
984
985
  });
985
986
  }
986
987
  }
988
+ ConnectedPeopleProvider.defaultProps = {
989
+ configuredFetch: defaultFetch
990
+ };
987
991
 
988
992
  class PointBreak extends React.Component {
989
993
  constructor(props) {
@@ -1016,9 +1020,6 @@
1016
1020
  }
1017
1021
  }
1018
1022
  class DisplaySwitch extends React.Component {
1019
- static defaultProps = {
1020
- smallBreakpoints: ["xs", "sm"]
1021
- };
1022
1023
  render() {
1023
1024
  return /*#__PURE__*/React.createElement(PointBreak, {
1024
1025
  render: breakpoint => {
@@ -1030,6 +1031,9 @@
1030
1031
  });
1031
1032
  }
1032
1033
  }
1034
+ DisplaySwitch.defaultProps = {
1035
+ smallBreakpoints: ["xs", "sm"]
1036
+ };
1033
1037
 
1034
1038
  // TODO: Use Fragments when we React 16 is a baseline
1035
1039
  function Accounts$2() {
@@ -1489,14 +1493,14 @@
1489
1493
  }
1490
1494
  }, ColorAppSquircles[appName] ? (/*#__PURE__*/React.createElement(ColorAppSquircles[appName], {
1491
1495
  key: "key1"
1492
- })) : /*#__PURE__*/React.createElement("span", {
1496
+ })) : (/*#__PURE__*/React.createElement("span", {
1493
1497
  key: "key1"
1494
- }), AppSymbols[appName] ? (/*#__PURE__*/React.createElement(AppSymbols[appName], {
1498
+ })), AppSymbols[appName] ? (/*#__PURE__*/React.createElement(AppSymbols[appName], {
1495
1499
  color: "#fff",
1496
1500
  key: "key2"
1497
- })) : /*#__PURE__*/React.createElement("div", {
1501
+ })) : (/*#__PURE__*/React.createElement("div", {
1498
1502
  key: "key3"
1499
- }, "appName not supported"));
1503
+ }, "appName not supported")));
1500
1504
  }
1501
1505
 
1502
1506
  const SQUIRCLE_FILL_COLORS = {
@@ -1527,7 +1531,7 @@
1527
1531
  size = 24,
1528
1532
  ...platformProps
1529
1533
  }) {
1530
- return /*#__PURE__*/React.createElement("svg", _extends({
1534
+ return /*#__PURE__*/React.createElement("svg", {
1531
1535
  "data-logo": "mono-app-icon",
1532
1536
  xmlns: "http://www.w3.org/2000/svg",
1533
1537
  width: size,
@@ -1538,19 +1542,20 @@
1538
1542
  style: {
1539
1543
  display: "block",
1540
1544
  ...style
1541
- }
1542
- }, platformProps), /*#__PURE__*/React.createElement("title", {
1545
+ },
1546
+ ...platformProps
1547
+ }, /*#__PURE__*/React.createElement("title", {
1543
1548
  id: "title"
1544
1549
  }, "Planning Center ", appName, " App Icon"), /*#__PURE__*/React.createElement("desc", {
1545
1550
  id: "desc"
1546
- }, "An image symbolizing the Planning Center ", appName, " app."), appName === "Accounts" ? null : /*#__PURE__*/React.createElement(Squircle, {
1551
+ }, "An image symbolizing the Planning Center ", appName, " app."), appName === "Accounts" ? null : (/*#__PURE__*/React.createElement(Squircle, {
1547
1552
  appName: appName.toLowerCase()
1548
- }), AppSymbols[appName] ? (/*#__PURE__*/React.createElement(AppSymbols[appName], {
1549
- color: appName === "Accounts" ? "var(--t-text-color-default-primary)" : "var(--t-fill-color-neutral-100)"
1550
- })) : /*#__PURE__*/React.createElement("div", null, "appName not supported"));
1553
+ })), AppSymbols[appName] ? (/*#__PURE__*/React.createElement(AppSymbols[appName], {
1554
+ color: appName === "Accounts" ? "var(--t-text-color)" : "var(--t-fill-color-neutral-100)"
1555
+ })) : (/*#__PURE__*/React.createElement("div", null, "appName not supported")));
1551
1556
  }
1552
1557
 
1553
- const fill = "var(--t-text-color-default-primary)";
1558
+ const fill = "var(--t-text-color)";
1554
1559
  function Accounts({
1555
1560
  size = 20
1556
1561
  }) {
@@ -1730,7 +1735,7 @@
1730
1735
  }) {
1731
1736
  return MonoAppText[appName] ? (/*#__PURE__*/React.createElement(MonoAppText[appName], {
1732
1737
  size
1733
- })) : /*#__PURE__*/React.createElement("div", null, "appName not supported");
1738
+ })) : (/*#__PURE__*/React.createElement("div", null, "appName not supported"));
1734
1739
  }
1735
1740
 
1736
1741
  var styles$a = {"unbutton":"unbutton-lEbTR"};
@@ -1741,13 +1746,14 @@
1741
1746
  type = "button",
1742
1747
  ...nativeProps
1743
1748
  }) {
1744
- return /*#__PURE__*/React.createElement("button", _extends({
1749
+ return /*#__PURE__*/React.createElement("button", {
1745
1750
  className: classnames(styles$a.unbutton, className),
1746
1751
  style: {
1747
1752
  ...style
1748
1753
  },
1749
- type: type
1750
- }, nativeProps));
1754
+ type: type,
1755
+ ...nativeProps
1756
+ });
1751
1757
  }
1752
1758
 
1753
1759
  var styles$9 = {"button":"button-XMbeQ","button-accounts":"button-accounts-nNh-z","chevron":"chevron-RRg9k","is-expanded":"is-expanded-zD0A0"};
@@ -1760,33 +1766,35 @@
1760
1766
  style = null,
1761
1767
  ...nativeProps
1762
1768
  }) => {
1763
- return /*#__PURE__*/React.createElement(Unbutton, _extends({
1769
+ return /*#__PURE__*/React.createElement(Unbutton, {
1764
1770
  onClick: onClick,
1765
1771
  className: classnames(styles$9.button, {
1766
1772
  [styles$9["is-expanded"]]: expanded
1767
1773
  }),
1768
1774
  type: "button",
1769
- style: style
1770
- }, nativeProps), appName === "Accounts" ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MonoAppIcon, {
1775
+ style: style,
1776
+ ...nativeProps
1777
+ }, appName === "Accounts" ? (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MonoAppIcon, {
1771
1778
  appName: "Accounts",
1772
1779
  colors: colors
1773
1780
  }), /*#__PURE__*/React.createElement("div", {
1774
1781
  className: styles$9["button-accounts"]
1775
- }, "Account settings")) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ColorAppIcon, {
1782
+ }, "Account settings"))) : (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ColorAppIcon, {
1776
1783
  appName: appName.replace(/[\s-]/, "")
1777
1784
  }), /*#__PURE__*/React.createElement(MonoAppName, {
1778
1785
  appName: appName.replace(/[\s-]/, ""),
1779
1786
  key: "mono-app-name",
1780
1787
  size: 24
1781
- })), /*#__PURE__*/React.createElement(DisclosureChevronIcon, {
1788
+ }))), /*#__PURE__*/React.createElement(DisclosureChevronIcon, {
1782
1789
  className: styles$9.chevron,
1783
1790
  key: "disclosure-chevron-icon"
1784
1791
  }));
1785
1792
  };
1786
1793
 
1787
1794
  function getAppsSwitchProductPath(productName) {
1795
+ var _a, _b;
1788
1796
  const basePath = `/apps/${productName.toLowerCase()}`;
1789
- const referer = window?.location?.pathname?.toString();
1797
+ const referer = (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.pathname) === null || _b === void 0 ? void 0 : _b.toString();
1790
1798
  if (!referer) return basePath;
1791
1799
  const params = new URLSearchParams();
1792
1800
  params.append("referer", referer);
@@ -1810,14 +1818,15 @@
1810
1818
  }) => {
1811
1819
  const [entered, setEntered] = React.useState(false);
1812
1820
  const getBackgroundColor = () => active ? "var(--t-fill-color-neutral-060)" : entered ? "var(--t-fill-color-neutral-080)" : "transparent";
1813
- return /*#__PURE__*/React.createElement(C, _extends({
1821
+ return /*#__PURE__*/React.createElement(C, {
1814
1822
  onMouseEnter: () => setEntered(true),
1815
1823
  onMouseLeave: () => setEntered(false),
1816
1824
  style: {
1817
1825
  ...style,
1818
1826
  backgroundColor: getBackgroundColor()
1819
- }
1820
- }, nativeProps));
1827
+ },
1828
+ ...nativeProps
1829
+ });
1821
1830
  };
1822
1831
 
1823
1832
  class Outsider extends React.Component {
@@ -1849,9 +1858,10 @@
1849
1858
  } else {
1850
1859
  document.addEventListener("click", this.handleOutsideClick, true);
1851
1860
  }
1852
- return /*#__PURE__*/React.createElement("div", _extends({
1853
- ref: c => this.container = c
1854
- }, props));
1861
+ return /*#__PURE__*/React.createElement("div", {
1862
+ ref: c => this.container = c,
1863
+ ...props
1864
+ });
1855
1865
  }
1856
1866
  }
1857
1867
 
@@ -1862,17 +1872,19 @@
1862
1872
  component: C = "div",
1863
1873
  isVisible,
1864
1874
  ...nativeProps
1865
- }) => /*#__PURE__*/React.createElement(C, _extends({
1875
+ }) => (/*#__PURE__*/React.createElement(C, {
1866
1876
  className: classnames(styles$7.popup, {
1867
1877
  [styles$7["is-visible"]]: isVisible
1868
- }, className)
1869
- }, nativeProps));
1878
+ }, className),
1879
+ ...nativeProps
1880
+ }));
1870
1881
 
1871
1882
  const PopupRoot = ({
1872
1883
  ...nativeProps
1873
- }) => /*#__PURE__*/React.createElement("div", _extends({
1874
- className: styles$7["popup-root"]
1875
- }, nativeProps));
1884
+ }) => (/*#__PURE__*/React.createElement("div", {
1885
+ className: styles$7["popup-root"],
1886
+ ...nativeProps
1887
+ }));
1876
1888
 
1877
1889
  const AppsMenu = ({
1878
1890
  appName,
@@ -1911,14 +1923,14 @@
1911
1923
  margin: 0,
1912
1924
  padding: 0
1913
1925
  }
1914
- }, homeProduct && /*#__PURE__*/React.createElement(HoverableListItem, {
1926
+ }, homeProduct && (/*#__PURE__*/React.createElement(HoverableListItem, {
1915
1927
  component: "a",
1916
1928
  "data-pendo": `app-switcher--change-app--${homeProduct.name}`,
1917
1929
  "data-turbolinks": false,
1918
1930
  href: appName === homeProduct.name ? `${pcoUrl(env)("accounts")}/apps/${appName}` : pcoUrl(env)("accounts") + getAppsSwitchProductPath(homeProduct.name),
1919
1931
  style: {
1920
1932
  ...listItemProps,
1921
- borderBottom: "1px solid var(--t-border-color-default-base)"
1933
+ borderBottom: "1px solid var(--t-border-color)"
1922
1934
  }
1923
1935
  }, /*#__PURE__*/React.createElement("div", {
1924
1936
  style: {
@@ -1930,7 +1942,7 @@
1930
1942
  })), /*#__PURE__*/React.createElement(MonoAppName, {
1931
1943
  appName: "Home",
1932
1944
  size: 18
1933
- })), restProducts.map(({
1945
+ }))), restProducts.map(({
1934
1946
  name
1935
1947
  }, i) => {
1936
1948
  const isFirst = i === 0;
@@ -1958,14 +1970,14 @@
1958
1970
  appName: name.replace(/[\s-]/, ""),
1959
1971
  size: 18
1960
1972
  }));
1961
- }), accountsProduct && /*#__PURE__*/React.createElement(HoverableListItem, {
1973
+ }), accountsProduct && (/*#__PURE__*/React.createElement(HoverableListItem, {
1962
1974
  component: "a",
1963
1975
  "data-pendo": `app-switcher--change-app--${accountsProduct.name}`,
1964
1976
  "data-turbolinks": false,
1965
1977
  href: pcoUrl(env)("accounts") + getAppsSwitchProductPath(accountsProduct.name),
1966
1978
  style: {
1967
1979
  ...listItemProps,
1968
- borderTop: "1px solid var(--t-border-color-default-base)",
1980
+ borderTop: "1px solid var(--t-border-color)",
1969
1981
  padding: "0 12px",
1970
1982
  textDecoration: "none"
1971
1983
  }
@@ -1979,15 +1991,15 @@
1979
1991
  width: 22,
1980
1992
  xmlns: "http://www.w3.org/2000/svg"
1981
1993
  }, /*#__PURE__*/React.createElement(Accounts$1, {
1982
- color: "var(--t-icon-color-default-secondary)",
1994
+ color: "var(--t-icon-color-secondary)",
1983
1995
  key: "key2"
1984
1996
  })), /*#__PURE__*/React.createElement("div", {
1985
1997
  style: {
1986
- color: "var(--t-text-color-default-secondary)",
1998
+ color: "var(--t-text-color-secondary)",
1987
1999
  fontSize: "12px",
1988
2000
  lineHeight: "28px"
1989
2001
  }
1990
- }, "Account settings")))));
2002
+ }, "Account settings"))))));
1991
2003
  };
1992
2004
 
1993
2005
  const sortByAttribute = attr => arr => arr.slice().sort((a, b) => a[attr].localeCompare(b[attr]));
@@ -2012,7 +2024,7 @@
2012
2024
  }) => ({
2013
2025
  active,
2014
2026
  name: key,
2015
- url: to ?? href
2027
+ url: to !== null && to !== void 0 ? to : href
2016
2028
  }))
2017
2029
  };
2018
2030
  }
@@ -2034,7 +2046,7 @@
2034
2046
  style,
2035
2047
  ...nativeProps
2036
2048
  }) {
2037
- return /*#__PURE__*/React.createElement("nav", _extends({
2049
+ return /*#__PURE__*/React.createElement("nav", {
2038
2050
  className: "simple",
2039
2051
  "data-pendo": "topbar",
2040
2052
  "aria-label": "topbar-navigation",
@@ -2044,8 +2056,9 @@
2044
2056
  display: "flex",
2045
2057
  height: "var(--topbar-height)",
2046
2058
  ...style
2047
- }
2048
- }, nativeProps), /*#__PURE__*/React.createElement("style", null, `
2059
+ },
2060
+ ...nativeProps
2061
+ }, /*#__PURE__*/React.createElement("style", null, `
2049
2062
  @media only print {
2050
2063
  .simple {
2051
2064
  display: none !important;
@@ -2077,7 +2090,7 @@
2077
2090
  cleanup: !userMenuVisible,
2078
2091
  className: styles$5.popup,
2079
2092
  isVisible: userMenuVisible
2080
- }, /*#__PURE__*/React.createElement("div", null, hasConnectedPeople ? /*#__PURE__*/React.createElement("div", {
2093
+ }, /*#__PURE__*/React.createElement("div", null, hasConnectedPeople ? (/*#__PURE__*/React.createElement("div", {
2081
2094
  style: {
2082
2095
  alignItems: "center",
2083
2096
  backgroundColor: "var(--t-fill-color-neutral-060)",
@@ -2088,7 +2101,7 @@
2088
2101
  }, /*#__PURE__*/React.createElement("div", {
2089
2102
  style: {
2090
2103
  ...IEFlex1,
2091
- color: "var(--t-text-color-default-secondary)",
2104
+ color: "var(--t-text-color-secondary)",
2092
2105
  fontSize: "12px",
2093
2106
  textTransform: "uppercase",
2094
2107
  whiteSpace: "nowrap",
@@ -2110,12 +2123,12 @@
2110
2123
  e.preventDefault();
2111
2124
  },
2112
2125
  style: {
2113
- color: "var(--t-text-color-default-secondary)",
2126
+ color: "var(--t-text-color-secondary)",
2114
2127
  marginLeft: "64px",
2115
2128
  textDecoration: "none",
2116
2129
  ...fontFamily
2117
2130
  }
2118
- }, "unlink"))) : /*#__PURE__*/React.createElement("noscript", null), /*#__PURE__*/React.createElement("style", null, `
2131
+ }, "unlink")))) : (/*#__PURE__*/React.createElement("noscript", null)), /*#__PURE__*/React.createElement("style", null, `
2119
2132
  .NotSmallTopbar__connected-people-list > *:first-child > * { border-top-width: 0 !important }
2120
2133
  `), /*#__PURE__*/React.createElement("ul", {
2121
2134
  className: "NotSmallTopbar__connected-people-list",
@@ -2127,7 +2140,7 @@
2127
2140
  }, connectedPeopleMenuFormatter(connectedPeople).map(({
2128
2141
  id,
2129
2142
  attributes: person
2130
- }) => /*#__PURE__*/React.createElement(HoverableListItem, {
2143
+ }) => (/*#__PURE__*/React.createElement(HoverableListItem, {
2131
2144
  component: "li",
2132
2145
  key: id
2133
2146
  }, /*#__PURE__*/React.createElement("a", {
@@ -2139,8 +2152,8 @@
2139
2152
  e.preventDefault();
2140
2153
  },
2141
2154
  style: {
2142
- borderTop: "1px solid var(--t-border-color-default-base)",
2143
- color: "var(--t-text-color-default-primary)",
2155
+ borderTop: "1px solid var(--t-border-color)",
2156
+ color: "var(--t-text-color)",
2144
2157
  display: "block",
2145
2158
  lineHeight: "48px",
2146
2159
  overflow: "hidden",
@@ -2151,7 +2164,7 @@
2151
2164
  whiteSpace: "nowrap",
2152
2165
  ...fontFamily
2153
2166
  }
2154
- }, person.organization_name))))), /*#__PURE__*/React.createElement(tapestryReact.ThemeProvider, null, hasConnectedPeople && /*#__PURE__*/React.createElement(tapestryReact.Divider, null), /*#__PURE__*/React.createElement("form", {
2167
+ }, person.organization_name)))))), /*#__PURE__*/React.createElement(tapestryReact.ThemeProvider, null, hasConnectedPeople && /*#__PURE__*/React.createElement(tapestryReact.Divider, null), /*#__PURE__*/React.createElement("form", {
2155
2168
  method: "POST",
2156
2169
  action: logoutUrl
2157
2170
  }, /*#__PURE__*/React.createElement(tapestryReact.Button, {
@@ -2181,11 +2194,11 @@
2181
2194
  paddingVertical: 1.5,
2182
2195
  spacing: 4
2183
2196
  }, /*#__PURE__*/React.createElement(tapestryReact.Text, {
2184
- color: "var(--t-text-color-default-secondary)",
2197
+ color: "var(--t-text-color-secondary)",
2185
2198
  lineHeight: "24px"
2186
2199
  }, "Log out"), /*#__PURE__*/React.createElement(tapestryReact.Icon, {
2187
2200
  name: "general.intoBox",
2188
- fill: "var(--t-icon-color-default-secondary)"
2201
+ fill: "var(--t-icon-color-secondary)"
2189
2202
  })))))));
2190
2203
  };
2191
2204
 
@@ -2196,15 +2209,17 @@
2196
2209
  style = null,
2197
2210
  ...nativeProps
2198
2211
  }) => {
2199
- return /*#__PURE__*/React.createElement(C, _extends({
2212
+ return /*#__PURE__*/React.createElement(C, {
2200
2213
  className: className,
2201
2214
  style: {
2202
2215
  ...fontFamily,
2203
2216
  ...style
2204
- }
2205
- }, innerRef && {
2206
- ref: innerRef
2207
- }, nativeProps));
2217
+ },
2218
+ ...(innerRef && {
2219
+ ref: innerRef
2220
+ }),
2221
+ ...nativeProps
2222
+ });
2208
2223
  };
2209
2224
 
2210
2225
  const UserMenuTrigger = ({
@@ -2232,9 +2247,9 @@
2232
2247
  setUserMenuVisible(visible => !visible);
2233
2248
  requestConnectedPeopleFetch();
2234
2249
  }
2235
- }, showOrgName && /*#__PURE__*/React.createElement("span", {
2250
+ }, showOrgName && (/*#__PURE__*/React.createElement("span", {
2236
2251
  className: styles$5["trigger-orgname"]
2237
- }, orgName), /*#__PURE__*/React.createElement(DisclosureChevronIcon, null)));
2252
+ }, orgName)), /*#__PURE__*/React.createElement(DisclosureChevronIcon, null)));
2238
2253
  };
2239
2254
 
2240
2255
  const NotSmallTopbar = ({
@@ -2327,9 +2342,10 @@
2327
2342
  colors,
2328
2343
  ...nativeProps
2329
2344
  }) => {
2330
- return /*#__PURE__*/React.createElement("a", _extends({
2331
- className: classnames(styles$6["route"], className, active && styles$6["is-active"])
2332
- }, nativeProps));
2345
+ return /*#__PURE__*/React.createElement("a", {
2346
+ className: classnames(styles$6["route"], className, active && styles$6["is-active"]),
2347
+ ...nativeProps
2348
+ });
2333
2349
  };
2334
2350
 
2335
2351
  var styles$4 = {"avatar":"avatar-tW-wn"};
@@ -2341,19 +2357,17 @@
2341
2357
  ...nativeProps
2342
2358
  }) {
2343
2359
  const url = incomingUrl || `${pcoUrl(env)("people")}/static/no_photo_thumbnail_gray.svg`;
2344
- return /*#__PURE__*/React.createElement("div", _extends({
2360
+ return /*#__PURE__*/React.createElement("div", {
2345
2361
  className: styles$4.avatar,
2346
2362
  style: {
2347
2363
  backgroundImage: `url(${url})`,
2348
2364
  ...style
2349
- }
2350
- }, nativeProps));
2365
+ },
2366
+ ...nativeProps
2367
+ });
2351
2368
  }
2352
2369
 
2353
2370
  class ClientStorage extends React.Component {
2354
- static defaultProps = {
2355
- method: "localStorage"
2356
- };
2357
2371
  update(value) {
2358
2372
  window[this.props.method].setItem(this.props.item, JSON.stringify(value));
2359
2373
  return this.forceUpdate();
@@ -2362,6 +2376,9 @@
2362
2376
  return /*#__PURE__*/React.createElement(React.Fragment, null, this.props.render(JSON.parse(window[this.props.method].getItem(this.props.item)) || undefined, this.update.bind(this)));
2363
2377
  }
2364
2378
  }
2379
+ ClientStorage.defaultProps = {
2380
+ method: "localStorage"
2381
+ };
2365
2382
 
2366
2383
  var styles$3 = {"appmenu-button":"appmenu-button-b0UvT","appmenu-layer":"appmenu-layer-0IQpN","appmenu-container":"appmenu-container-gackd","appmenu-scroll":"appmenu-scroll-mPSx0","appmenu-list":"appmenu-list-h7clX","appmenu-list-a":"appmenu-list-a-rGIQN","appmenu-list-a--top":"appmenu-list-a--top-RT-2F","appmenu-list-a--bottom":"appmenu-list-a--bottom-YDeBC","appmenu-close-button":"appmenu-close-button-vv9bV","current-route":"current-route-wpJgz","is-active":"is-active-wy8Bg","routes":"routes-Nmt1S","route":"route-kkknQ","profile-button":"profile-button-a2WO2"};
2367
2384
 
@@ -2381,16 +2398,16 @@
2381
2398
  width: 24,
2382
2399
  xmlns: "http://www.w3.org/2000/svg"
2383
2400
  }, /*#__PURE__*/React.createElement(Accounts$1, {
2384
- color: "var(--t-icon-color-default-secondary",
2401
+ color: "var(--t-icon-color-secondary",
2385
2402
  key: "key2"
2386
2403
  })), /*#__PURE__*/React.createElement("span", null, "Account settings"));
2387
2404
  }
2388
2405
 
2389
2406
  const CloseMenuButton = ({
2390
- color = "var(--t-icon-color-default-dim)",
2407
+ color = "var(--t-icon-color-dim)",
2391
2408
  size = 24,
2392
2409
  style = {}
2393
- }) => /*#__PURE__*/React.createElement("button", {
2410
+ }) => (/*#__PURE__*/React.createElement("button", {
2394
2411
  "aria-label": "Close menu",
2395
2412
  type: "button",
2396
2413
  className: styles$3["appmenu-close-button"],
@@ -2402,7 +2419,7 @@
2402
2419
  width: `${size}px`
2403
2420
  },
2404
2421
  "aria-hidden": "true"
2405
- }));
2422
+ })));
2406
2423
 
2407
2424
  const UserMenuAppLockup = ({
2408
2425
  appName: originalAppName
@@ -2426,10 +2443,13 @@
2426
2443
  }));
2427
2444
  };
2428
2445
  const SmallTopbar = ({
2429
- currentRouteComponent = props => /*#__PURE__*/React.createElement("span", props),
2446
+ currentRouteComponent = props => (/*#__PURE__*/React.createElement("span", {
2447
+ ...props
2448
+ })),
2430
2449
  linkToProfile = true,
2431
2450
  ...props
2432
2451
  }) => {
2452
+ var _a, _b;
2433
2453
  const [routesMenuVisible, setRoutesMenuVisible] = React.useState(false);
2434
2454
  const [productSwitcherVisible, setProductSwitcherVisible] = React.useState(false);
2435
2455
  const activeRoute = props.routes.filter(({
@@ -2454,7 +2474,7 @@
2454
2474
  }) => name !== "Home" && name !== "Accounts");
2455
2475
  React.useEffect(() => {
2456
2476
  setRoutesMenuVisible(false);
2457
- }, [activeRoute && activeRoute[0]?.props?.href]);
2477
+ }, [activeRoute && ((_b = (_a = activeRoute[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.href)]);
2458
2478
  return /*#__PURE__*/React.createElement(StyledRoot, {
2459
2479
  style: {
2460
2480
  ...props.style
@@ -2470,11 +2490,11 @@
2470
2490
  }
2471
2491
  }, /*#__PURE__*/React.createElement(ColorAppIcon, {
2472
2492
  appName: props.appName.replace(/[\s-]/, "")
2473
- })), routesMenuVisible && /*#__PURE__*/React.createElement("div", {
2493
+ })), routesMenuVisible && (/*#__PURE__*/React.createElement("div", {
2474
2494
  className: styles$3["routes"]
2475
- }, props.routes), /*#__PURE__*/React.createElement(ClientStorage, {
2495
+ }, props.routes)), /*#__PURE__*/React.createElement(ClientStorage, {
2476
2496
  item: "Topbar:Small:Menus:Products:visibility",
2477
- render: () => /*#__PURE__*/React.createElement("div", {
2497
+ render: () => (/*#__PURE__*/React.createElement("div", {
2478
2498
  className: styles$3["appmenu-layer"],
2479
2499
  style: {
2480
2500
  ...(productSwitcherVisible && {
@@ -2495,10 +2515,10 @@
2495
2515
  },
2496
2516
  className: styles$3["appmenu-container"]
2497
2517
  }, /*#__PURE__*/React.createElement("a", {
2498
- "data-pendo": `app-switcher--change-app--${homeProduct?.name}`,
2518
+ "data-pendo": `app-switcher--change-app--${homeProduct === null || homeProduct === void 0 ? void 0 : homeProduct.name}`,
2499
2519
  "data-turbolinks": false,
2500
2520
  className: classnames(styles$3["appmenu-list-a"], styles$3["appmenu-list-a--top"]),
2501
- href: homeProduct ? pcoUrl(props.env)("accounts") + getAppsSwitchProductPath(homeProduct?.name) : undefined
2521
+ href: homeProduct ? pcoUrl(props.env)("accounts") + getAppsSwitchProductPath(homeProduct === null || homeProduct === void 0 ? void 0 : homeProduct.name) : undefined
2502
2522
  }, /*#__PURE__*/React.createElement(UserMenuAppLockup, {
2503
2523
  appName: homeProduct ? homeProduct.name : props.appName
2504
2524
  })), /*#__PURE__*/React.createElement("div", {
@@ -2508,7 +2528,7 @@
2508
2528
  className: styles$3["appmenu-list"]
2509
2529
  }, appsMenuFormatter(restProducts).map(({
2510
2530
  name
2511
- }) => /*#__PURE__*/React.createElement("li", {
2531
+ }) => (/*#__PURE__*/React.createElement("li", {
2512
2532
  key: name,
2513
2533
  className: styles$3["appmenu-list-li"]
2514
2534
  }, /*#__PURE__*/React.createElement("a", {
@@ -2518,11 +2538,11 @@
2518
2538
  href: pcoUrl(props.env)("accounts") + getAppsSwitchProductPath(name)
2519
2539
  }, /*#__PURE__*/React.createElement(UserMenuAppLockup, {
2520
2540
  appName: name
2521
- })))), accountsProduct && /*#__PURE__*/React.createElement("li", {
2541
+ }))))), accountsProduct && (/*#__PURE__*/React.createElement("li", {
2522
2542
  className: styles$3["appmenu-list-li"]
2523
2543
  }, /*#__PURE__*/React.createElement(AccountSettingsLink, {
2524
2544
  env: props.env
2525
- }))))))
2545
+ }))))))))
2526
2546
  }), /*#__PURE__*/React.createElement("button", {
2527
2547
  type: "button",
2528
2548
  className: classnames(styles$3["current-route"], {
@@ -2535,7 +2555,10 @@
2535
2555
  }, /*#__PURE__*/React.createElement(CurrentRouteComponent, null, capitalize(currentRouteText)), props.routes.length > 0 && /*#__PURE__*/React.createElement(DisclosureChevronIcon, null)), /*#__PURE__*/React.createElement("button", {
2536
2556
  type: "button",
2537
2557
  className: styles$3["profile-button"],
2538
- onClick: () => window.topbar?.openProfile?.()
2558
+ onClick: () => {
2559
+ var _a, _b;
2560
+ return (_b = (_a = window.topbar) === null || _a === void 0 ? void 0 : _a.openProfile) === null || _b === void 0 ? void 0 : _b.call(_a);
2561
+ }
2539
2562
  }, /*#__PURE__*/React.createElement(Avatar, {
2540
2563
  env: props.env,
2541
2564
  url: props.userAvatarPath
@@ -2545,17 +2568,19 @@
2545
2568
  active,
2546
2569
  className,
2547
2570
  ...props
2548
- }) => /*#__PURE__*/React.createElement("a", _extends({
2549
- className: classnames(styles$3["route"], className, active && styles$3["is-active"])
2550
- }, props));
2571
+ }) => (/*#__PURE__*/React.createElement("a", {
2572
+ className: classnames(styles$3["route"], className, active && styles$3["is-active"]),
2573
+ ...props
2574
+ }));
2551
2575
 
2552
2576
  function getLoginProfilePath({
2553
2577
  env,
2554
2578
  appName,
2555
2579
  userId
2556
2580
  }) {
2581
+ var _a, _b;
2557
2582
  const basePath = pcoUrl(env)("login") + `/people/AC${userId}`;
2558
- const pathname = window?.location?.pathname?.toString();
2583
+ const pathname = (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.pathname) === null || _b === void 0 ? void 0 : _b.toString();
2559
2584
  if (!pathname) return basePath;
2560
2585
  const params = new URLSearchParams();
2561
2586
  params.append("return", `${appName}/${pathname}`);
@@ -2660,7 +2685,7 @@
2660
2685
  baseColor: "#2266f7",
2661
2686
  key: "primary"
2662
2687
  }),
2663
- separatorTertiary: "var(--t-border-color-default-base)"
2688
+ separatorTertiary: "var(--t-border-color)"
2664
2689
  },
2665
2690
  icons: {
2666
2691
  churchCenter: churchCenter__namespace,
@@ -2688,9 +2713,10 @@
2688
2713
  className,
2689
2714
  ...props
2690
2715
  }) {
2691
- return /*#__PURE__*/React.createElement("div", _extends({
2692
- className: classnames(styles$2["drawer-wrap"], className, isVisible && styles$2["is-visible"])
2693
- }, props), children);
2716
+ return /*#__PURE__*/React.createElement("div", {
2717
+ className: classnames(styles$2["drawer-wrap"], className, isVisible && styles$2["is-visible"]),
2718
+ ...props
2719
+ }, children);
2694
2720
  }
2695
2721
 
2696
2722
  function DrawerHeader({
@@ -2706,9 +2732,9 @@
2706
2732
  paddingTop: 1
2707
2733
  }, /*#__PURE__*/React.createElement(tapestryReact.Box, {
2708
2734
  flex: 1
2709
- }, children), closeDrawer && /*#__PURE__*/React.createElement(tapestryReact.Button, {
2735
+ }, children), closeDrawer && (/*#__PURE__*/React.createElement(tapestryReact.Button, {
2710
2736
  icon: {
2711
- fill: "var(--t-icon-color-default-dim)",
2737
+ fill: "var(--t-icon-color-dim)",
2712
2738
  name: "general.x",
2713
2739
  size: "md"
2714
2740
  },
@@ -2719,25 +2745,25 @@
2719
2745
  backgroundColor: "var(--t-fill-color-neutral-070)"
2720
2746
  },
2721
2747
  marginTop: 0.25
2722
- }));
2748
+ })));
2723
2749
  }
2724
2750
 
2725
2751
  function DrawerHeading({
2726
2752
  children,
2727
2753
  ...props
2728
2754
  }) {
2729
- return /*#__PURE__*/React.createElement(tapestryReact.Heading, _extends({
2730
- color: "var(--t-text-color-default-headline)",
2755
+ return /*#__PURE__*/React.createElement(tapestryReact.Heading, {
2756
+ color: "var(--t-text-color-headline)",
2731
2757
  letterSpacing: ".002em",
2732
2758
  level: 2,
2733
2759
  lineHeight: "35px",
2734
- weight: 700
2735
- }, props), children);
2760
+ weight: 700,
2761
+ ...props
2762
+ }, children);
2736
2763
  }
2737
2764
 
2738
2765
  // TODO: This component could prob be genrealized to provide overflow-y scroll indication, as well, if needed.
2739
2766
  // `top`/`bottom` // `left`/`right` → `start`/`end`
2740
-
2741
2767
  const INDICATOR_STYLES = {
2742
2768
  bottom: {
2743
2769
  background: "linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.07))",
@@ -2758,22 +2784,20 @@
2758
2784
  const containerRef = React.useRef(null);
2759
2785
  const bottomEdgeRef = React.useRef(null);
2760
2786
  const topEdgeRef = React.useRef(null);
2761
-
2762
2787
  // Perf: should this be debounced?
2763
2788
  const handleResize = () => {
2764
- const container = containerRef?.current;
2789
+ const container = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current;
2765
2790
  if (container) {
2766
2791
  const hasOverflowBottom = container.scrollHeight - container.clientHeight > container.scrollTop + 1;
2767
2792
  setOverflowBottom(hasOverflowBottom);
2768
2793
  }
2769
2794
  };
2770
2795
  React.useEffect(() => {
2771
- const container = containerRef?.current;
2796
+ const container = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current;
2772
2797
  if (!container) {
2773
2798
  return () => {}; // noop
2774
2799
  }
2775
2800
  setOverflowBottom(container.scrollHeight > container.clientHeight);
2776
-
2777
2801
  // setup intersection observers
2778
2802
  const options = {
2779
2803
  root: container,
@@ -2785,15 +2809,14 @@
2785
2809
  const topObserver = new IntersectionObserver(([{
2786
2810
  isIntersecting
2787
2811
  }]) => setOverflowTop(!isIntersecting), options);
2788
- const bottomTarget = bottomEdgeRef?.current;
2789
- const topTarget = topEdgeRef?.current;
2812
+ const bottomTarget = bottomEdgeRef === null || bottomEdgeRef === void 0 ? void 0 : bottomEdgeRef.current;
2813
+ const topTarget = topEdgeRef === null || topEdgeRef === void 0 ? void 0 : topEdgeRef.current;
2790
2814
  if (bottomTarget) {
2791
2815
  bottomObserver.observe(bottomTarget);
2792
2816
  }
2793
2817
  if (topTarget) {
2794
2818
  topObserver.observe(topTarget);
2795
2819
  }
2796
-
2797
2820
  // setup resize observer
2798
2821
  const resizeObserver = new ResizeObserver(handleResize);
2799
2822
  resizeObserver.observe(container);
@@ -2815,7 +2838,7 @@
2815
2838
  edge: "top"
2816
2839
  }), overflowBottom && /*#__PURE__*/React.createElement(OverflowIndicator, {
2817
2840
  edge: "bottom"
2818
- }), /*#__PURE__*/React.createElement(tapestryReact.StackView, _extends({
2841
+ }), /*#__PURE__*/React.createElement(tapestryReact.StackView, {
2819
2842
  basis: 2,
2820
2843
  grow: 1,
2821
2844
  innerRef: containerRef,
@@ -2824,8 +2847,9 @@
2824
2847
  shrink: 1,
2825
2848
  css: {
2826
2849
  overscrollBehavior: "contain"
2827
- }
2828
- }, props), /*#__PURE__*/React.createElement(tapestryReact.Box, {
2850
+ },
2851
+ ...props
2852
+ }, /*#__PURE__*/React.createElement(tapestryReact.Box, {
2829
2853
  innerRef: topEdgeRef
2830
2854
  }), children, /*#__PURE__*/React.createElement(tapestryReact.Box, {
2831
2855
  innerRef: bottomEdgeRef
@@ -2834,15 +2858,16 @@
2834
2858
  const OverflowIndicator = ({
2835
2859
  edge
2836
2860
  }) => {
2837
- return /*#__PURE__*/React.createElement(tapestryReact.Box, _extends({
2861
+ return /*#__PURE__*/React.createElement(tapestryReact.Box, {
2838
2862
  height: 1,
2839
2863
  left: 0,
2840
2864
  pointerEvents: "none",
2841
2865
  position: "absolute",
2842
2866
  right: 0,
2843
2867
  role: "presentation",
2844
- zIndex: 10
2845
- }, INDICATOR_STYLES[edge]));
2868
+ zIndex: 10,
2869
+ ...INDICATOR_STYLES[edge]
2870
+ });
2846
2871
  };
2847
2872
 
2848
2873
  const SwitchView = ({
@@ -2873,7 +2898,7 @@
2873
2898
  }));
2874
2899
  };
2875
2900
 
2876
- var styles$1 = {"color-mode-switcher":"color-mode-switcher-JpczO","color-mode-switcher-label":"color-mode-switcher-label-3jPM2","color-mode-switcher-label-beta":"color-mode-switcher-label-beta-pwv5t","color-mode-switcher-modes":"color-mode-switcher-modes-u-bic"};
2901
+ var styles$1 = {"color-mode-switcher":"color-mode-switcher-JpczO","color-mode-switcher-label":"color-mode-switcher-label-3jPM2","color-mode-switcher-modes":"color-mode-switcher-modes-u-bic"};
2877
2902
 
2878
2903
  const COLOR_MODES = [{
2879
2904
  label: "Light",
@@ -2888,8 +2913,7 @@
2888
2913
  let COLOR_MODE_INSTANCE_COUNTER = 0;
2889
2914
  function ColorModeSwitcher() {
2890
2915
  const {
2891
- colorMode,
2892
- colorModeLaunched
2916
+ colorMode
2893
2917
  } = useStore();
2894
2918
  const updateStore = useUpdateStore();
2895
2919
  const [counter] = React.useState(() => COLOR_MODE_INSTANCE_COUNTER++);
@@ -2897,14 +2921,12 @@
2897
2921
  className: styles$1["color-mode-switcher"]
2898
2922
  }, /*#__PURE__*/React.createElement("legend", {
2899
2923
  className: styles$1["color-mode-switcher-label"]
2900
- }, "Appearance", " ", !colorModeLaunched && /*#__PURE__*/React.createElement("span", {
2901
- className: styles$1["color-mode-switcher-label-beta"]
2902
- }, "beta")), /*#__PURE__*/React.createElement("div", {
2924
+ }, "Appearance", " "), /*#__PURE__*/React.createElement("div", {
2903
2925
  className: styles$1["color-mode-switcher-modes"]
2904
2926
  }, COLOR_MODES.map(({
2905
2927
  value,
2906
2928
  label
2907
- }) => /*#__PURE__*/React.createElement("label", {
2929
+ }) => (/*#__PURE__*/React.createElement("label", {
2908
2930
  key: value
2909
2931
  }, /*#__PURE__*/React.createElement("input", {
2910
2932
  name: `color-mode-${counter}`,
@@ -2921,7 +2943,7 @@
2921
2943
  }
2922
2944
  }), /*#__PURE__*/React.createElement(ColorModeIcon, {
2923
2945
  mode: value
2924
- }), label))));
2946
+ }), label)))));
2925
2947
  }
2926
2948
  function updateColorMode(mode) {
2927
2949
  return apiRequest(railsCsrfFetch, `${window.location.origin}/~api/people/v2/me/color_mode`, {
@@ -2975,8 +2997,7 @@
2975
2997
  }) {
2976
2998
  const {
2977
2999
  mfaConfigured,
2978
- name,
2979
- colorModeSelectionEnabled
3000
+ name
2980
3001
  } = useStore();
2981
3002
  return /*#__PURE__*/React.createElement(tapestryReact.StackView, {
2982
3003
  axis: "vertical",
@@ -3000,17 +3021,17 @@
3000
3021
  }, /*#__PURE__*/React.createElement(DrawerHeading, {
3001
3022
  paddingTop: 0.5,
3002
3023
  lineHeight: 3.25
3003
- }, name), linkToProfile && /*#__PURE__*/React.createElement(tapestryReact.Link, {
3024
+ }, name), linkToProfile && (/*#__PURE__*/React.createElement(tapestryReact.Link, {
3004
3025
  to: profileUrl,
3005
3026
  style: {
3006
- color: "var(--t-icon-color-default-secondary)"
3027
+ color: "var(--t-icon-color-secondary)"
3007
3028
  },
3008
3029
  size: 3,
3009
3030
  onClick: () => setTimeout(() => closeDrawer(), 50)
3010
- }, "My profile"), /*#__PURE__*/React.createElement(tapestryReact.Link, {
3031
+ }, "My profile")), /*#__PURE__*/React.createElement(tapestryReact.Link, {
3011
3032
  to: loginSettingsUrl,
3012
3033
  style: {
3013
- color: "var(--t-icon-color-default-secondary)"
3034
+ color: "var(--t-icon-color-secondary)"
3014
3035
  },
3015
3036
  size: 3
3016
3037
  }, "My login settings"), /*#__PURE__*/React.createElement(tapestryReact.StackView, {
@@ -3021,15 +3042,15 @@
3021
3042
  }, /*#__PURE__*/React.createElement(tapestryReact.Icon, {
3022
3043
  name: mfaConfigured ? "general.lock" : "general.unlock",
3023
3044
  size: "sm",
3024
- color: mfaConfigured ? "var(--t-icon-color-status-success-primary)" : "var(--t-icon-color-status-error-primary)"
3045
+ color: mfaConfigured ? "var(--t-icon-color-status-success)" : "var(--t-icon-color-status-error)"
3025
3046
  }), /*#__PURE__*/React.createElement(tapestryReact.Text, {
3026
3047
  size: 4,
3027
3048
  weight: 400,
3028
- color: "var(--t-text-color-default-secondary)",
3049
+ color: "var(--t-text-color-secondary)",
3029
3050
  wrap: true
3030
3051
  }, "Two-step verification ", mfaConfigured ? "active" : "inactive"))), /*#__PURE__*/React.createElement(tapestryReact.Button, {
3031
3052
  icon: {
3032
- fill: "var(--t-icon-color-default-dim)",
3053
+ fill: "var(--t-icon-color-dim)",
3033
3054
  name: "general.x",
3034
3055
  size: "md"
3035
3056
  },
@@ -3041,7 +3062,7 @@
3041
3062
  hover: {
3042
3063
  backgroundColor: "var(--t-fill-color-neutral-070)"
3043
3064
  }
3044
- })), colorModeSelectionEnabled && /*#__PURE__*/React.createElement(tapestryReact.GridView, {
3065
+ })), /*#__PURE__*/React.createElement(tapestryReact.GridView, {
3045
3066
  padding: 2
3046
3067
  }, /*#__PURE__*/React.createElement(ColorModeSwitcher, null)), /*#__PURE__*/React.createElement("form", {
3047
3068
  method: "POST",
@@ -3071,8 +3092,8 @@
3071
3092
  size: 3
3072
3093
  }, "Log out"), /*#__PURE__*/React.createElement(tapestryReact.Icon, {
3073
3094
  name: "general.intoBox",
3074
- fill: "var(--t-icon-color-default-secondary)"
3075
- })))), hasConnectedPeople && /*#__PURE__*/React.createElement(tapestryReact.StackView, {
3095
+ fill: "var(--t-icon-color-secondary)"
3096
+ })))), hasConnectedPeople && (/*#__PURE__*/React.createElement(tapestryReact.StackView, {
3076
3097
  mediaQueries: {
3077
3098
  sm: {
3078
3099
  display: "none"
@@ -3093,7 +3114,7 @@
3093
3114
  }, connectedPeopleMenuFormatter(connectedPeople).map(({
3094
3115
  id,
3095
3116
  attributes: person
3096
- }) => /*#__PURE__*/React.createElement(tapestryReact.List.Item, {
3117
+ }) => (/*#__PURE__*/React.createElement(tapestryReact.List.Item, {
3097
3118
  key: id,
3098
3119
  onClick: e => {
3099
3120
  requestClearAppsCache();
@@ -3105,7 +3126,7 @@
3105
3126
  padding: 2
3106
3127
  }, /*#__PURE__*/React.createElement(tapestryReact.Text, {
3107
3128
  truncate: true
3108
- }, person.organization_name))), /*#__PURE__*/React.createElement(tapestryReact.List.Item, {
3129
+ }, person.organization_name)))), /*#__PURE__*/React.createElement(tapestryReact.List.Item, {
3109
3130
  onClick: e => {
3110
3131
  requestClearAppsCache();
3111
3132
  requestClearConnectedPeopleCache();
@@ -3117,16 +3138,16 @@
3117
3138
  underline: false
3118
3139
  }, /*#__PURE__*/React.createElement(tapestryReact.Text, {
3119
3140
  size: 3
3120
- }, "Unlink my accounts")))));
3141
+ }, "Unlink my accounts"))))));
3121
3142
  }
3122
3143
 
3123
- var ActionType = /*#__PURE__*/function (ActionType) {
3144
+ var ActionType;
3145
+ (function (ActionType) {
3124
3146
  ActionType["close"] = "close";
3125
3147
  ActionType["mount"] = "mount";
3126
3148
  ActionType["open"] = "open";
3127
3149
  ActionType["unmount"] = "unmount";
3128
- return ActionType;
3129
- }(ActionType || {});
3150
+ })(ActionType || (ActionType = {}));
3130
3151
  const initialState = {
3131
3152
  currentContent: null,
3132
3153
  open: false
@@ -3224,7 +3245,7 @@
3224
3245
  hits,
3225
3246
  results
3226
3247
  } = reactInstantsearchCore.useHits();
3227
- const groups = results?.hits.reduce((acc, hit) => {
3248
+ const groups = results === null || results === void 0 ? void 0 : results.hits.reduce((acc, hit) => {
3228
3249
  const key = hit.category.title;
3229
3250
  if (!acc[key]) {
3230
3251
  acc[key] = [];
@@ -3249,7 +3270,7 @@
3249
3270
  onChange: e => setQuery(e.target.value),
3250
3271
  onSelect: selectedValue => handleSearchSelect(selectedValue, indexName),
3251
3272
  placement: "bottom-start"
3252
- }, !hits.length && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(tapestryReact.StackView, {
3273
+ }, !hits.length && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(tapestryReact.StackView, {
3253
3274
  axis: "horizontal",
3254
3275
  alignment: "center",
3255
3276
  paddingHorizontal: 2,
@@ -3258,7 +3279,7 @@
3258
3279
  color: "neutralDarker",
3259
3280
  size: 4,
3260
3281
  whiteSpace: "normal"
3261
- }, "No results match your search"))), groups && Object.keys(groups).map(key => {
3282
+ }, "No results match your search")))), groups && Object.keys(groups).map(key => {
3262
3283
  const hits = groups[key];
3263
3284
  return /*#__PURE__*/React.createElement(React.Fragment, {
3264
3285
  key: key
@@ -3277,11 +3298,11 @@
3277
3298
  size: 5,
3278
3299
  color: "foregroundSecondary",
3279
3300
  fontWeight: 500
3280
- }, key)), hits.map(hit => /*#__PURE__*/React.createElement(HitResult, {
3301
+ }, key)), hits.map(hit => (/*#__PURE__*/React.createElement(HitResult, {
3281
3302
  key: hit.objectID,
3282
3303
  hit: hit,
3283
3304
  index: resultIndex++
3284
- })));
3305
+ }))));
3285
3306
  })));
3286
3307
  };
3287
3308
 
@@ -3360,15 +3381,16 @@
3360
3381
  dark,
3361
3382
  style,
3362
3383
  ...props
3363
- }) => /*#__PURE__*/React.createElement("div", _extends({
3384
+ }) => (/*#__PURE__*/React.createElement("div", {
3364
3385
  style: {
3365
- color: "var(--t-text-color-default-primary)",
3386
+ color: "var(--t-text-color)",
3366
3387
  fontSize: "12px",
3367
3388
  fontWeight: 400,
3368
3389
  textTransform: "uppercase",
3369
3390
  ...style
3370
- }
3371
- }, props));
3391
+ },
3392
+ ...props
3393
+ }));
3372
3394
 
3373
3395
  const NotificationItem = ({
3374
3396
  mobile = false,
@@ -3418,7 +3440,7 @@
3418
3440
  onClick: handleClick,
3419
3441
  style: {
3420
3442
  alignItems: "flex-start",
3421
- borderBottom: showBottomBorder || !isLast ? "1px solid var(--t-border-color-default-base)" : "none",
3443
+ borderBottom: showBottomBorder || !isLast ? "1px solid var(--t-border-color)" : "none",
3422
3444
  cursor: "pointer",
3423
3445
  display: "flex",
3424
3446
  overflow: "hidden",
@@ -3455,14 +3477,14 @@
3455
3477
  }
3456
3478
  }, appName), /*#__PURE__*/React.createElement("h1", {
3457
3479
  style: {
3458
- color: "var(--t-text-color-default-headline)",
3480
+ color: "var(--t-text-color-headline)",
3459
3481
  fontSize: "16px",
3460
3482
  fontWeight: 500,
3461
3483
  lineHeight: "1.3em",
3462
3484
  margin: 0,
3463
3485
  userSelect: "none"
3464
3486
  }
3465
- }, title)), !mobile && /*#__PURE__*/React.createElement(tapestryReact.Dropdown, {
3487
+ }, title)), !mobile && (/*#__PURE__*/React.createElement(tapestryReact.Dropdown, {
3466
3488
  icon: {
3467
3489
  name: "general.threeDots"
3468
3490
  },
@@ -3479,21 +3501,21 @@
3479
3501
  e.stopPropagation();
3480
3502
  onToggleRead();
3481
3503
  }
3482
- }, "Mark ", isRead ? "unread" : "as read"), notification.taskUrl ? /*#__PURE__*/React.createElement(tapestryReact.Dropdown.Item, {
3504
+ }, "Mark ", isRead ? "unread" : "as read"), notification.taskUrl ? (/*#__PURE__*/React.createElement(tapestryReact.Dropdown.Item, {
3483
3505
  onClick: e => {
3484
3506
  e.preventDefault();
3485
3507
  e.stopPropagation();
3486
3508
  window.location.href = notification.taskUrl;
3487
3509
  }
3488
- }, "Open task") : /*#__PURE__*/React.createElement(tapestryReact.Dropdown.Item, {
3510
+ }, "Open task")) : (/*#__PURE__*/React.createElement(tapestryReact.Dropdown.Item, {
3489
3511
  onClick: e => {
3490
3512
  e.preventDefault();
3491
3513
  e.stopPropagation();
3492
3514
  onCreateTask(notification);
3493
3515
  }
3494
- }, "Create task"))), /*#__PURE__*/React.createElement("div", {
3516
+ }, "Create task"))))), /*#__PURE__*/React.createElement("div", {
3495
3517
  style: {
3496
- color: "var(--t-text-color-default-primary)",
3518
+ color: "var(--t-text-color)",
3497
3519
  fontSize: "12px",
3498
3520
  paddingLeft: "12px",
3499
3521
  userSelect: "none"
@@ -3505,22 +3527,22 @@
3505
3527
  context,
3506
3528
  description,
3507
3529
  title = "No notifications"
3508
- }) => /*#__PURE__*/React.createElement(tapestryReact.StackView, {
3530
+ }) => (/*#__PURE__*/React.createElement(tapestryReact.StackView, {
3509
3531
  alignment: "center",
3510
3532
  distribution: "center",
3511
3533
  padding: 4
3512
3534
  }, /*#__PURE__*/React.createElement(BlankStateIcon, {
3513
3535
  id: context
3514
3536
  }), /*#__PURE__*/React.createElement(tapestryReact.Heading, {
3515
- color: "var(--t-text-color-default-headline)",
3537
+ color: "var(--t-text-color-headline)",
3516
3538
  fontWeight: 500,
3517
3539
  marginTop: 1,
3518
3540
  size: 3
3519
3541
  }, title), /*#__PURE__*/React.createElement(tapestryReact.Text, {
3520
3542
  align: "center",
3521
- color: "var(--t-text-color-default-primary)",
3543
+ color: "var(--t-text-color)",
3522
3544
  size: 4
3523
- }, description));
3545
+ }, description)));
3524
3546
 
3525
3547
  const notificationsOrganizer = notifications => {
3526
3548
  const {
@@ -3546,6 +3568,7 @@
3546
3568
  };
3547
3569
  };
3548
3570
  const buildNotificationFromApiResponse = (resp, json) => {
3571
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3549
3572
  const findInIncluded = ({
3550
3573
  type,
3551
3574
  id
@@ -3554,24 +3577,23 @@
3554
3577
  return i.type === type && i.id === id;
3555
3578
  });
3556
3579
  };
3557
- const appName = findInIncluded(resp.relationships.app.data, json.included)?.attributes?.name;
3558
-
3580
+ const appName = (_b = (_a = findInIncluded(resp.relationships.app.data, json.included)) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b.name;
3559
3581
  // There is technically the possibility that there are multiple web payloads
3560
3582
  // returned from the API endpoint. However, at this point I'm not sure in
3561
3583
  // which situations that would be the case. For v1 of this feature, we'll
3562
3584
  // assume that there is only one web payload we need to worry about and it is
3563
3585
  // the first in the array that is returned.
3564
- const notificationData = JSON.parse(findInIncluded({
3565
- id: resp?.relationships?.web_payloads?.data[0]?.id,
3586
+ const notificationData = JSON.parse((_g = (_f = findInIncluded({
3587
+ id: (_e = (_d = (_c = resp === null || resp === void 0 ? void 0 : resp.relationships) === null || _c === void 0 ? void 0 : _c.web_payloads) === null || _d === void 0 ? void 0 : _d.data[0]) === null || _e === void 0 ? void 0 : _e.id,
3566
3588
  type: "Payload"
3567
- }, json.included)?.attributes?.content);
3589
+ }, json.included)) === null || _f === void 0 ? void 0 : _f.attributes) === null || _g === void 0 ? void 0 : _g.content);
3568
3590
  return {
3569
3591
  appName,
3570
3592
  createdAt: new Date(resp.attributes.created_at),
3571
3593
  id: resp.id,
3572
- isRead: resp.attributes.read_at?.length > 0,
3573
- link: notificationData?.link,
3574
- title: notificationData?.title
3594
+ isRead: ((_h = resp.attributes.read_at) === null || _h === void 0 ? void 0 : _h.length) > 0,
3595
+ link: notificationData === null || notificationData === void 0 ? void 0 : notificationData.link,
3596
+ title: notificationData === null || notificationData === void 0 ? void 0 : notificationData.title
3575
3597
  };
3576
3598
  };
3577
3599
  const useNotifications = ({
@@ -3670,7 +3692,6 @@
3670
3692
  }).then(e => {
3671
3693
  if (!e.ok) {
3672
3694
  // TODO: show an alert or something?
3673
-
3674
3695
  setIsLoading(false);
3675
3696
  setHasError(true);
3676
3697
  // Rollback any optimistic UI updates
@@ -3703,7 +3724,6 @@
3703
3724
  }, []);
3704
3725
  const handleToggleRead = async notification => {
3705
3726
  const action = notification.isRead ? "unread" : "read";
3706
-
3707
3727
  // optimistic UI update
3708
3728
  setNotifications(notifications => notifications.map(n => notification.id == n.id ? {
3709
3729
  ...n,
@@ -3716,7 +3736,6 @@
3716
3736
  };
3717
3737
  const handleMarkAllAsRead = () => {
3718
3738
  const unreadIds = unread.map(n => n.id);
3719
-
3720
3739
  // optimistic UI update
3721
3740
  setNotifications(notifications => notifications.map(n => unreadIds.includes(n.id) ? {
3722
3741
  ...n,
@@ -3741,23 +3760,25 @@
3741
3760
  onClick,
3742
3761
  title,
3743
3762
  ...props
3744
- }) => /*#__PURE__*/React.createElement(tapestryReact.StackView, _extends({
3745
- color: disabled ? "var(--t-text-color-default-disabled)" : "var(--t-text-color-interaction-primary)",
3763
+ }) => (/*#__PURE__*/React.createElement(tapestryReact.StackView, {
3764
+ color: disabled ? "var(--t-text-color-disabled)" : "var(--t-text-color-interaction)",
3746
3765
  cursor: disabled ? "default" : "pointer",
3747
3766
  fontSize: 5,
3748
3767
  fontWeight: 600,
3749
3768
  userSelect: "none",
3750
- onClick: !disabled && onClick
3751
- }, props), title);
3769
+ onClick: !disabled && onClick,
3770
+ ...props
3771
+ }, title));
3752
3772
  const SectionHeaderTitle = ({
3753
3773
  ...props
3754
- }) => /*#__PURE__*/React.createElement(tapestryReact.Heading, _extends({
3755
- color: "var(--t-text-color-default-headline)",
3774
+ }) => (/*#__PURE__*/React.createElement(tapestryReact.Heading, {
3775
+ color: "var(--t-text-color-headline)",
3756
3776
  lineHeight: 2,
3757
3777
  size: 5,
3758
3778
  textTransform: "uppercase",
3759
- userSelect: "none"
3760
- }, props));
3779
+ userSelect: "none",
3780
+ ...props
3781
+ }));
3761
3782
  function NotificationsComponent({
3762
3783
  closeDrawer
3763
3784
  }) {
@@ -3801,17 +3822,17 @@
3801
3822
  alignment: "center",
3802
3823
  axis: "horizontal",
3803
3824
  spacing: 1
3804
- }, /*#__PURE__*/React.createElement(DrawerHeading, null, "Notifications"), isLoading && /*#__PURE__*/React.createElement(tapestryReact.Spinner, {
3825
+ }, /*#__PURE__*/React.createElement(DrawerHeading, null, "Notifications"), isLoading && (/*#__PURE__*/React.createElement(tapestryReact.Spinner, {
3805
3826
  color: "var(--t-fill-color-neutral-030)",
3806
3827
  thickness: 2,
3807
3828
  trackColor: "var(--t-fill-color-neutral-080)"
3808
- }), hasError && /*#__PURE__*/React.createElement(ExclamationTriangle, {
3829
+ })), hasError && (/*#__PURE__*/React.createElement(ExclamationTriangle, {
3809
3830
  fill: "hsl(8 60% 47%)",
3810
3831
  size: 16
3811
- })), read.length > 0 && /*#__PURE__*/React.createElement(SectionHeaderButton, {
3832
+ }))), read.length > 0 && (/*#__PURE__*/React.createElement(SectionHeaderButton, {
3812
3833
  onClick: () => setShowRead(showRead => !showRead),
3813
3834
  title: `${showRead ? "Hide" : "Show"} read`
3814
- }))), /*#__PURE__*/React.createElement(ScrollContainer, null, /*#__PURE__*/React.createElement(tapestryReact.StackView, {
3835
+ })))), /*#__PURE__*/React.createElement(ScrollContainer, null, /*#__PURE__*/React.createElement(tapestryReact.StackView, {
3815
3836
  alignment: "stretch",
3816
3837
  spacing: 2
3817
3838
  }, /*#__PURE__*/React.createElement("div", {
@@ -3823,25 +3844,26 @@
3823
3844
  margin: 0,
3824
3845
  padding: "4px 0"
3825
3846
  }
3826
- }, !isLoading && unread.length === 0 && /*#__PURE__*/React.createElement(NotificationsMenuBlankState, _extends({
3847
+ }, !isLoading && unread.length === 0 && (/*#__PURE__*/React.createElement(NotificationsMenuBlankState, {
3827
3848
  context: "toolbar",
3828
- description: `When you have ${read.length > 0 ? "unread " : ""}notifications they will show up here.`
3829
- }, read.length > 0 && {
3830
- title: "No unread notifications"
3831
- })), unread.length > 0 && /*#__PURE__*/React.createElement(tapestryReact.StackView, {
3849
+ description: `When you have ${read.length > 0 ? "unread " : ""}notifications they will show up here.`,
3850
+ ...(read.length > 0 && {
3851
+ title: "No unread notifications"
3852
+ })
3853
+ })), unread.length > 0 && (/*#__PURE__*/React.createElement(tapestryReact.StackView, {
3832
3854
  axis: "horizontal",
3833
3855
  alignment: "center",
3834
3856
  distribution: "space-between",
3835
3857
  padding: 2
3836
- }, /*#__PURE__*/React.createElement(SectionHeaderTitle, null, "Unread"), unread.length > 0 && /*#__PURE__*/React.createElement(SectionHeaderButton, {
3858
+ }, /*#__PURE__*/React.createElement(SectionHeaderTitle, null, "Unread"), unread.length > 0 && (/*#__PURE__*/React.createElement(SectionHeaderButton, {
3837
3859
  onClick: () => handleMarkAllAsRead(),
3838
3860
  title: `Mark ${unread.length} as read`
3839
- })), /*#__PURE__*/React.createElement(reactTransitionGroup.TransitionGroup, {
3861
+ })))), /*#__PURE__*/React.createElement(reactTransitionGroup.TransitionGroup, {
3840
3862
  exit: false
3841
- }, unread.map((notification, idx) => /*#__PURE__*/React.createElement(reactTransitionGroup.Transition, {
3863
+ }, unread.map((notification, idx) => (/*#__PURE__*/React.createElement(reactTransitionGroup.Transition, {
3842
3864
  key: notification.id,
3843
3865
  timeout: 0
3844
- }, state => /*#__PURE__*/React.createElement("div", {
3866
+ }, state => (/*#__PURE__*/React.createElement("div", {
3845
3867
  style: {
3846
3868
  ...defaultStyle,
3847
3869
  ...transitionStyles[state]
@@ -3853,15 +3875,17 @@
3853
3875
  onToggleRead: () => handleToggleRead(notification),
3854
3876
  onCreateTask: handleCreateTask,
3855
3877
  showBottomBorder: read.length > 0,
3856
- notification
3857
- }))))), read.length > 0 && showRead && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionHeaderTitle, {
3878
+ ...{
3879
+ notification
3880
+ }
3881
+ }))))))), read.length > 0 && showRead && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionHeaderTitle, {
3858
3882
  padding: 2
3859
3883
  }, "Read"), /*#__PURE__*/React.createElement(reactTransitionGroup.TransitionGroup, {
3860
3884
  exit: false
3861
- }, read.map(notification => /*#__PURE__*/React.createElement(reactTransitionGroup.Transition, {
3885
+ }, read.map(notification => (/*#__PURE__*/React.createElement(reactTransitionGroup.Transition, {
3862
3886
  key: notification.id,
3863
3887
  timeout: 0
3864
- }, state => /*#__PURE__*/React.createElement("div", {
3888
+ }, state => (/*#__PURE__*/React.createElement("div", {
3865
3889
  style: {
3866
3890
  ...defaultStyle,
3867
3891
  ...transitionStyles[state]
@@ -3875,8 +3899,10 @@
3875
3899
  onToggleRead: () => handleToggleRead(notification),
3876
3900
  onCreateTask: handleCreateTask,
3877
3901
  showBottomBorder: true,
3878
- notification
3879
- })))))))))));
3902
+ ...{
3903
+ notification
3904
+ }
3905
+ }))))))))))))));
3880
3906
  }
3881
3907
  const Notifications = {
3882
3908
  component: NotificationsComponent,
@@ -3936,18 +3962,20 @@
3936
3962
  onClick,
3937
3963
  ...rest
3938
3964
  }) {
3939
- return /*#__PURE__*/React.createElement(tapestryReact.StackView, _extends({
3965
+ return /*#__PURE__*/React.createElement(tapestryReact.StackView, {
3940
3966
  as: "button",
3941
3967
  axis: "horizontal",
3942
3968
  distribution: "space-between",
3943
3969
  alignment: "center",
3944
3970
  paddingBottom: 0.75,
3945
3971
  onClick: () => onClick(),
3946
- spacing: 1
3947
- }, rest), children, badge && /*#__PURE__*/React.createElement(tapestryReact.Badge, _extends({
3972
+ spacing: 1,
3973
+ ...rest
3974
+ }, children, badge && /*#__PURE__*/React.createElement(tapestryReact.Badge, {
3948
3975
  size: "sm",
3949
- fontWeight: "600"
3950
- }, badge)));
3976
+ fontWeight: "600",
3977
+ ...badge
3978
+ }));
3951
3979
  }
3952
3980
  function TasksComponent({
3953
3981
  closeDrawer,
@@ -3969,7 +3997,7 @@
3969
3997
  });
3970
3998
  }, []);
3971
3999
  const pendoTrackEvent = React.useCallback((event, properties = {}) => {
3972
- if (!window?.pendo) {
4000
+ if (!(window === null || window === void 0 ? void 0 : window.pendo)) {
3973
4001
  return console.warn("`window.pendo` is undefined");
3974
4002
  }
3975
4003
  window.pendo.track(event, properties);
@@ -4024,7 +4052,7 @@
4024
4052
  } = useStore();
4025
4053
  const joltIsV2 = useJoltIsV2(joltPromise);
4026
4054
  const joltChannel = useJoltChannelSubscription({
4027
- channelName: requestedJoltChannel?.channelName,
4055
+ channelName: requestedJoltChannel === null || requestedJoltChannel === void 0 ? void 0 : requestedJoltChannel.channelName,
4028
4056
  disconnectJoltOnUnmount,
4029
4057
  enabled: !!requestedJoltChannel,
4030
4058
  env,
@@ -4044,13 +4072,13 @@
4044
4072
  },
4045
4073
  joltPromise
4046
4074
  });
4047
- return joltIsV2 ? /*#__PURE__*/React.createElement(JoltEffectV2, {
4075
+ return joltIsV2 ? (/*#__PURE__*/React.createElement(JoltEffectV2, {
4048
4076
  channel: joltChannel,
4049
4077
  onMessage: onMessage
4050
- }) : /*#__PURE__*/React.createElement(JoltEffectV1, {
4078
+ })) : (/*#__PURE__*/React.createElement(JoltEffectV1, {
4051
4079
  channel: joltChannel,
4052
4080
  onMessage: onMessage
4053
- });
4081
+ }));
4054
4082
  }
4055
4083
  function JoltEffectV2({
4056
4084
  channel,
@@ -4112,26 +4140,20 @@
4112
4140
  }
4113
4141
 
4114
4142
  // TLDR; This hook is used to sync the fragment route in the browser's url without causing an annoying flicker.
4115
-
4116
4143
  // It has a couple of interrelated responsibilities whose relationship may not be obvious:
4117
-
4118
4144
  // First:
4119
4145
  // It listens for messages from the child frame that indicate that the frame has navigated to a new path.
4120
4146
  // When this happens, it updates the fragment route in the browser's url.
4121
4147
  // We also track the internal path of the child frame in a ref so that we can compare it to the fragment route in the browser's url.
4122
-
4123
4148
  // Second:
4124
4149
  // It compares the current fragment route against the internal path of the child frame.
4125
4150
  // The only time that these would ever diverge is if the user manually changes the fragment route in the browser's url.
4126
4151
  // When they are not the same, we update the src attribute of the iframe to match the fragment route in the browser's url.
4127
-
4128
4152
  // You may be asking yourself, why all this complexity?
4129
4153
  // Why not just update the src attribute of the iframe every time the fragment route changes?
4130
-
4131
4154
  // The answer:
4132
4155
  // If you change an iframes src attribute, it will reload the iframe and cause a very annoying flicker.
4133
4156
  // It's not a rerender bug. It's a browser behavior that we can't control.
4134
-
4135
4157
  function useStableIframeSrcAttributeAndSyncFragmentRoute({
4136
4158
  currentPath,
4137
4159
  setFragmentRoute,
@@ -4145,7 +4167,6 @@
4145
4167
  const unencodedPath = event.data.payload.replace(/^\/?topbar/, "") // Maybe this should happen on the child side of things?
4146
4168
  .replace(/^\/+/, "");
4147
4169
  internalPathOfChatRef.current = unencodedPath;
4148
-
4149
4170
  // URL encode the payload's query string for the fragment route
4150
4171
  // so possible query params don't get dropped by the fragment router
4151
4172
  setFragmentRoute(encodeQueryString(unencodedPath));
@@ -4289,8 +4310,9 @@
4289
4310
 
4290
4311
  const DURATION = 100;
4291
4312
  function isToolPathExemptFromStorage(toolName, path) {
4313
+ var _a, _b;
4292
4314
  const tool = toolsRouteMap[toolName];
4293
- return tool?.storageExemptPaths?.includes(path) ?? false;
4315
+ return (_b = (_a = tool === null || tool === void 0 ? void 0 : tool.storageExemptPaths) === null || _a === void 0 ? void 0 : _a.includes(path)) !== null && _b !== void 0 ? _b : false;
4294
4316
  }
4295
4317
  const TOOLS_MAP = {
4296
4318
  Chat,
@@ -4335,7 +4357,7 @@
4335
4357
  userId
4336
4358
  } = {
4337
4359
  ...storeData,
4338
- ...(env === "development" ? _storeDataOverride ?? {} : {})
4360
+ ...(env === "development" ? _storeDataOverride !== null && _storeDataOverride !== void 0 ? _storeDataOverride : {} : {})
4339
4361
  };
4340
4362
  const updateStore = useUpdateStore();
4341
4363
  React.useEffect(() => {
@@ -4346,7 +4368,6 @@
4346
4368
  document.body.style.overflow = "auto";
4347
4369
  }
4348
4370
  }, [open]);
4349
-
4350
4371
  // Listen for external close requests from store
4351
4372
  React.useEffect(() => {
4352
4373
  const unsubscribe = store$1.subscribe(state => {
@@ -4369,7 +4390,6 @@
4369
4390
  window.topbar.openProfile = () => handleToolOnClick(Profile);
4370
4391
  window.topbar.openHelpdesk = () => handleToolOnClick(Helpdesk);
4371
4392
  window.openHelpdesk = window.topbar.openHelpdesk; /* TODO: Remove when products have migrated to window.topbar.openHelpdesk */
4372
-
4373
4393
  return () => {
4374
4394
  delete window.topbar.openProfile;
4375
4395
  delete window.topbar.openHelpdesk;
@@ -4435,30 +4455,31 @@
4435
4455
  }
4436
4456
  }, [toolbarFragmentRoute, toolStateCookie]);
4437
4457
  React.useEffect(() => {
4438
- if (toolbarFragmentRoute?.tool && (currentContent !== toolsRouteMap[toolbarFragmentRoute.tool] || !open)) {
4458
+ if ((toolbarFragmentRoute === null || toolbarFragmentRoute === void 0 ? void 0 : toolbarFragmentRoute.tool) && (currentContent !== toolsRouteMap[toolbarFragmentRoute.tool] || !open)) {
4439
4459
  setToolAndOpenDrawer(toolsRouteMap[toolbarFragmentRoute.tool]);
4440
4460
  }
4441
- }, [setToolAndOpenDrawer, toolbarFragmentRoute?.tool, currentContent, open]);
4461
+ }, [setToolAndOpenDrawer, toolbarFragmentRoute === null || toolbarFragmentRoute === void 0 ? void 0 : toolbarFragmentRoute.tool, currentContent, open]);
4442
4462
  const toggleDrawer = content => {
4443
4463
  if (!open) {
4444
4464
  return openDrawer(content);
4445
4465
  }
4446
- return currentContent?.name === content.name ? closeDrawer() : openDrawer(content);
4466
+ return (currentContent === null || currentContent === void 0 ? void 0 : currentContent.name) === content.name ? closeDrawer() : openDrawer(content);
4447
4467
  };
4448
4468
  const {
4449
4469
  displayChatIcon,
4450
4470
  unreadIndicator
4451
4471
  } = useChatConfig({
4452
- disconnectJoltOnUnmount: storeData?.disconnectJoltOnUnmount,
4472
+ disconnectJoltOnUnmount: storeData === null || storeData === void 0 ? void 0 : storeData.disconnectJoltOnUnmount,
4453
4473
  env,
4454
4474
  isEnabled: Boolean(userId),
4455
- joltPromise: storeData?.joltPromise,
4475
+ joltPromise: storeData === null || storeData === void 0 ? void 0 : storeData.joltPromise,
4456
4476
  userId
4457
4477
  });
4458
4478
  const TOOLS = [Notifications, Tasks, displayChatIcon && Chat].filter(Boolean);
4459
4479
  const handleToolOnClick = tool => {
4480
+ var _a;
4460
4481
  toggleDrawer(tool);
4461
- document.getElementById(`toolbarDrawer${tool.name}`)?.scrollTo({
4482
+ (_a = document.getElementById(`toolbarDrawer${tool.name}`)) === null || _a === void 0 ? void 0 : _a.scrollTo({
4462
4483
  behavior: "smooth",
4463
4484
  top: 0
4464
4485
  });
@@ -4468,7 +4489,7 @@
4468
4489
  appName,
4469
4490
  closeDrawer,
4470
4491
  connectedPeople: connectedPeople || [],
4471
- hasConnectedPeople: storeData?.hasConnectedPeople || false,
4492
+ hasConnectedPeople: (storeData === null || storeData === void 0 ? void 0 : storeData.hasConnectedPeople) || false,
4472
4493
  linkToProfile,
4473
4494
  loginSettingsUrl,
4474
4495
  logoutUrl,
@@ -4483,13 +4504,13 @@
4483
4504
  }
4484
4505
  };
4485
4506
  const onChangePath = React.useCallback(path => {
4486
- onChangeToolbarFragmentRoute(currentContent?.name.toLowerCase(), path);
4487
- }, [currentContent?.name]);
4488
- const routeIsForCurrentTool = toolbarFragmentRoute?.tool && toolsRouteMap[toolbarFragmentRoute.tool] === currentContent;
4507
+ onChangeToolbarFragmentRoute(currentContent === null || currentContent === void 0 ? void 0 : currentContent.name.toLowerCase(), path);
4508
+ }, [currentContent === null || currentContent === void 0 ? void 0 : currentContent.name]);
4509
+ const routeIsForCurrentTool = (toolbarFragmentRoute === null || toolbarFragmentRoute === void 0 ? void 0 : toolbarFragmentRoute.tool) && toolsRouteMap[toolbarFragmentRoute.tool] === currentContent;
4489
4510
  const currentToolProps = {
4490
4511
  appName,
4491
4512
  closeDrawer,
4492
- currentPath: routeIsForCurrentTool ? toolbarFragmentRoute?.path : null,
4513
+ currentPath: routeIsForCurrentTool ? toolbarFragmentRoute === null || toolbarFragmentRoute === void 0 ? void 0 : toolbarFragmentRoute.path : null,
4493
4514
  env,
4494
4515
  helpdeskConfig,
4495
4516
  isOpen: open,
@@ -4532,17 +4553,19 @@
4532
4553
  "aria-label": `Open ${tool.name} drawer`,
4533
4554
  "data-pendo": getDataPendoAttribute(tool.name),
4534
4555
  key: tool.name
4535
- }, !indicator && /*#__PURE__*/React.createElement(ToolbarButtonIcon, {
4556
+ }, !indicator && (/*#__PURE__*/React.createElement(ToolbarButtonIcon, {
4536
4557
  path: tool.icons.staticPath
4537
- }), indicator && /*#__PURE__*/React.createElement(ToolbarButtonIcon, {
4558
+ })), indicator && (/*#__PURE__*/React.createElement(ToolbarButtonIcon, {
4538
4559
  path: tool.icons.staticDotPath,
4539
4560
  dot: true
4540
- }));
4561
+ })));
4541
4562
  })), /*#__PURE__*/React.createElement(DrawerWrap, {
4542
4563
  isVisible: open
4543
- }, mounted && /*#__PURE__*/React.createElement(Drawer, {
4564
+ }, mounted && (/*#__PURE__*/React.createElement(Drawer, {
4544
4565
  id: `toolbarDrawer${currentContent.name}`
4545
- }, /*#__PURE__*/React.createElement(currentContent.component, currentToolProps)))));
4566
+ }, /*#__PURE__*/React.createElement(currentContent.component, {
4567
+ ...currentToolProps
4568
+ }))))));
4546
4569
  }
4547
4570
  const ToolbarButton = ({
4548
4571
  children,
@@ -4551,12 +4574,13 @@
4551
4574
  onClick,
4552
4575
  ...restProps
4553
4576
  }) => {
4554
- return /*#__PURE__*/React.createElement("button", _extends({
4577
+ return /*#__PURE__*/React.createElement("button", {
4555
4578
  type: "button",
4556
4579
  className: classnames(styles["toolbar-button"], className, current && styles["is-current"]),
4557
4580
  onClick: onClick,
4558
- "data-toolbar-link": "true"
4559
- }, restProps), children);
4581
+ "data-toolbar-link": "true",
4582
+ ...restProps
4583
+ }, children);
4560
4584
  };
4561
4585
  function ToolbarButtonIcon({
4562
4586
  dot,
@@ -4573,12 +4597,12 @@
4573
4597
  fillRule: "evenodd",
4574
4598
  clipRule: "evenodd",
4575
4599
  d: path
4576
- }), dot && /*#__PURE__*/React.createElement("circle", {
4577
- fill: "var(--t-icon-color-status-error-primary)",
4600
+ }), dot && (/*#__PURE__*/React.createElement("circle", {
4601
+ fill: "var(--t-icon-color-status-error)",
4578
4602
  cx: "24",
4579
4603
  cy: "8",
4580
4604
  r: "4"
4581
- }));
4605
+ })));
4582
4606
  }
4583
4607
  function getDataPendoAttribute(toolName) {
4584
4608
  if (toolName === "Chat") {