@local-civics/hub-ui 0.1.127 → 0.1.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -952,19 +952,19 @@ const sprite = {
952
952
  }
953
953
  };
954
954
 
955
- var __defProp$g = Object.defineProperty;
956
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
957
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
958
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
959
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
960
- var __spreadValues$g = (a, b) => {
955
+ var __defProp$f = Object.defineProperty;
956
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
957
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
958
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
959
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
960
+ var __spreadValues$f = (a, b) => {
961
961
  for (var prop in b || (b = {}))
962
- if (__hasOwnProp$g.call(b, prop))
963
- __defNormalProp$g(a, prop, b[prop]);
964
- if (__getOwnPropSymbols$g)
965
- for (var prop of __getOwnPropSymbols$g(b)) {
966
- if (__propIsEnum$g.call(b, prop))
967
- __defNormalProp$g(a, prop, b[prop]);
962
+ if (__hasOwnProp$f.call(b, prop))
963
+ __defNormalProp$f(a, prop, b[prop]);
964
+ if (__getOwnPropSymbols$f)
965
+ for (var prop of __getOwnPropSymbols$f(b)) {
966
+ if (__propIsEnum$f.call(b, prop))
967
+ __defNormalProp$f(a, prop, b[prop]);
968
968
  }
969
969
  return a;
970
970
  };
@@ -983,9 +983,9 @@ const Icon$1 = (props) => {
983
983
  },
984
984
  /* @__PURE__ */ React.createElement("title", null, props.name),
985
985
  contents.map((v, k) => {
986
- return v.d && /* @__PURE__ */ React.createElement("path", __spreadValues$g({ key: k }, v));
986
+ return v.d && /* @__PURE__ */ React.createElement("path", __spreadValues$f({ key: k }, v));
987
987
  }),
988
- contents.map((v, k) => v.r && /* @__PURE__ */ React.createElement("circle", __spreadValues$g({ key: k }, v)))
988
+ contents.map((v, k) => v.r && /* @__PURE__ */ React.createElement("circle", __spreadValues$f({ key: k }, v)))
989
989
  );
990
990
  };
991
991
 
@@ -1567,25 +1567,25 @@ const ActivityItem = (props) => {
1567
1567
  return /* @__PURE__ */ React__namespace.createElement("div", { onClick: props.onClick, className: "grow cursor-pointer relative rounded-md min-w-64 h-[22rem] overflow-hidden" }, /* @__PURE__ */ React__namespace.createElement("img", { className: "h-full w-full object-cover", alt: props.headline, src: props.imageURL }), /* @__PURE__ */ React__namespace.createElement("div", { className: "absolute bottom-0 w-full" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "p-5 bg-gray-800/75 w-full" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "text-sm font-bold text-white w-full" }, props.headline), /* @__PURE__ */ React__namespace.createElement("div", { className: "mt-2 flex items-center gap-x-2 w-full" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex-shrink-0 w-6 h-6 text-white fill-white" }, /* @__PURE__ */ React__namespace.createElement(Icon$1, { name: props.pathway || "globe" })), props.pathway && /* @__PURE__ */ React__namespace.createElement("span", { className: "grow" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "text-sm font-medium capitalize text-white w-full" }, props.pathway)), props.xp && /* @__PURE__ */ React__namespace.createElement("div", { className: "text-slate-600 shadow-md whitespace-nowrap font-bold rounded-md text-sm px-5 py-2 bg-cyan-400" }, props.xp, " pts")))));
1568
1568
  };
1569
1569
 
1570
- var __defProp$f = Object.defineProperty;
1571
- var __defProps$d = Object.defineProperties;
1572
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
1573
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
1574
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
1575
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
1576
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1577
- var __spreadValues$f = (a, b) => {
1570
+ var __defProp$e = Object.defineProperty;
1571
+ var __defProps$c = Object.defineProperties;
1572
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
1573
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
1574
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
1575
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
1576
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1577
+ var __spreadValues$e = (a, b) => {
1578
1578
  for (var prop in b || (b = {}))
1579
- if (__hasOwnProp$f.call(b, prop))
1580
- __defNormalProp$f(a, prop, b[prop]);
1581
- if (__getOwnPropSymbols$f)
1582
- for (var prop of __getOwnPropSymbols$f(b)) {
1583
- if (__propIsEnum$f.call(b, prop))
1584
- __defNormalProp$f(a, prop, b[prop]);
1579
+ if (__hasOwnProp$e.call(b, prop))
1580
+ __defNormalProp$e(a, prop, b[prop]);
1581
+ if (__getOwnPropSymbols$e)
1582
+ for (var prop of __getOwnPropSymbols$e(b)) {
1583
+ if (__propIsEnum$e.call(b, prop))
1584
+ __defNormalProp$e(a, prop, b[prop]);
1585
1585
  }
1586
1586
  return a;
1587
1587
  };
1588
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
1588
+ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
1589
1589
  const TagFilter = (props) => {
1590
1590
  const timeTags = ["15 min", "30 min", "45 min", "60 min"];
1591
1591
  const skillTags = ["Civic", "College", "Academic", "Personal"];
@@ -1597,12 +1597,12 @@ const TagFilter = (props) => {
1597
1597
  const [active, setActive] = React.useState(init);
1598
1598
  const onTagClick = (tag) => {
1599
1599
  if (active[tag]) {
1600
- setActive(__spreadProps$d(__spreadValues$f({}, active), { [tag]: false }));
1601
- const tags = Object.entries(__spreadProps$d(__spreadValues$f({}, active), { [tag]: false })).filter(([, active2]) => active2).map(([tag2]) => tag2);
1600
+ setActive(__spreadProps$c(__spreadValues$e({}, active), { [tag]: false }));
1601
+ const tags = Object.entries(__spreadProps$c(__spreadValues$e({}, active), { [tag]: false })).filter(([, active2]) => active2).map(([tag2]) => tag2);
1602
1602
  props.onChange && props.onChange(tags);
1603
1603
  } else {
1604
- setActive(__spreadProps$d(__spreadValues$f({}, active), { [tag]: true }));
1605
- const tags = Object.entries(__spreadProps$d(__spreadValues$f({}, active), { [tag]: true })).filter(([, active2]) => active2).map(([tag2]) => tag2);
1604
+ setActive(__spreadProps$c(__spreadValues$e({}, active), { [tag]: true }));
1605
+ const tags = Object.entries(__spreadProps$c(__spreadValues$e({}, active), { [tag]: true })).filter(([, active2]) => active2).map(([tag2]) => tag2);
1606
1606
  props.onChange && props.onChange(tags);
1607
1607
  }
1608
1608
  };
@@ -1648,25 +1648,25 @@ const debounce = (func, delay) => {
1648
1648
  };
1649
1649
  };
1650
1650
 
1651
- var __defProp$e = Object.defineProperty;
1652
- var __defProps$c = Object.defineProperties;
1653
- var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
1654
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
1655
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
1656
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
1657
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1658
- var __spreadValues$e = (a, b) => {
1651
+ var __defProp$d = Object.defineProperty;
1652
+ var __defProps$b = Object.defineProperties;
1653
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
1654
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
1655
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
1656
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
1657
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1658
+ var __spreadValues$d = (a, b) => {
1659
1659
  for (var prop in b || (b = {}))
1660
- if (__hasOwnProp$e.call(b, prop))
1661
- __defNormalProp$e(a, prop, b[prop]);
1662
- if (__getOwnPropSymbols$e)
1663
- for (var prop of __getOwnPropSymbols$e(b)) {
1664
- if (__propIsEnum$e.call(b, prop))
1665
- __defNormalProp$e(a, prop, b[prop]);
1660
+ if (__hasOwnProp$d.call(b, prop))
1661
+ __defNormalProp$d(a, prop, b[prop]);
1662
+ if (__getOwnPropSymbols$d)
1663
+ for (var prop of __getOwnPropSymbols$d(b)) {
1664
+ if (__propIsEnum$d.call(b, prop))
1665
+ __defNormalProp$d(a, prop, b[prop]);
1666
1666
  }
1667
1667
  return a;
1668
1668
  };
1669
- var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
1669
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
1670
1670
  const ActivityList = (props) => {
1671
1671
  var _a;
1672
1672
  const primary = !props.top ? null : props.top.length > 0 ? props == null ? void 0 : props.top[0] : null;
@@ -1684,14 +1684,14 @@ const ActivityList = (props) => {
1684
1684
  isLoading: props.isLoading,
1685
1685
  primary: !props.search && primary && /* @__PURE__ */ React.createElement(
1686
1686
  ActivityItem,
1687
- __spreadProps$c(__spreadValues$e({}, primary), {
1687
+ __spreadProps$b(__spreadValues$d({}, primary), {
1688
1688
  onClick: () => props.onActivityClick && props.onActivityClick(primary.activityId)
1689
1689
  })
1690
1690
  ),
1691
1691
  top: !props.search && top && top.length > 0 && /* @__PURE__ */ React.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, top.map((activity) => {
1692
1692
  return /* @__PURE__ */ React.createElement(
1693
1693
  ActivityItem,
1694
- __spreadProps$c(__spreadValues$e({
1694
+ __spreadProps$b(__spreadValues$d({
1695
1695
  key: `${activity.activityId}`
1696
1696
  }, activity), {
1697
1697
  onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
@@ -1701,7 +1701,7 @@ const ActivityList = (props) => {
1701
1701
  soonest: !props.search && upcoming && upcoming.length > 0 && /* @__PURE__ */ React.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, upcoming.map((activity) => {
1702
1702
  return /* @__PURE__ */ React.createElement(
1703
1703
  ActivityItem,
1704
- __spreadProps$c(__spreadValues$e({
1704
+ __spreadProps$b(__spreadValues$d({
1705
1705
  key: `${activity.activityId}`
1706
1706
  }, activity), {
1707
1707
  onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
@@ -1711,7 +1711,7 @@ const ActivityList = (props) => {
1711
1711
  milestones: !props.search && props.milestones && props.milestones.length > 0 && /* @__PURE__ */ React.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, props.milestones.map((activity) => {
1712
1712
  return /* @__PURE__ */ React.createElement(
1713
1713
  ActivityItem,
1714
- __spreadProps$c(__spreadValues$e({
1714
+ __spreadProps$b(__spreadValues$d({
1715
1715
  key: `${activity.activityId}`
1716
1716
  }, activity), {
1717
1717
  onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
@@ -1722,7 +1722,7 @@ const ActivityList = (props) => {
1722
1722
  filtered: !!props.search && props.activities && props.activities.length > 0 && /* @__PURE__ */ React.createElement("article", { className: "grid grid-cols-1 md:flex gap-2 overflow-auto" }, props.activities.map((activity) => {
1723
1723
  return /* @__PURE__ */ React.createElement(
1724
1724
  ActivityItem,
1725
- __spreadProps$c(__spreadValues$e({
1725
+ __spreadProps$b(__spreadValues$d({
1726
1726
  key: `${activity.activityId}`
1727
1727
  }, activity), {
1728
1728
  onClick: () => props.onActivityClick && props.onActivityClick(activity.activityId)
@@ -1748,25 +1748,25 @@ const Search$1 = ({ send, value }) => {
1748
1748
  )));
1749
1749
  };
1750
1750
 
1751
- var __defProp$d = Object.defineProperty;
1752
- var __defProps$b = Object.defineProperties;
1753
- var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
1754
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
1755
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
1756
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
1757
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1758
- var __spreadValues$d = (a, b) => {
1751
+ var __defProp$c = Object.defineProperty;
1752
+ var __defProps$a = Object.defineProperties;
1753
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
1754
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
1755
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
1756
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
1757
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1758
+ var __spreadValues$c = (a, b) => {
1759
1759
  for (var prop in b || (b = {}))
1760
- if (__hasOwnProp$d.call(b, prop))
1761
- __defNormalProp$d(a, prop, b[prop]);
1762
- if (__getOwnPropSymbols$d)
1763
- for (var prop of __getOwnPropSymbols$d(b)) {
1764
- if (__propIsEnum$d.call(b, prop))
1765
- __defNormalProp$d(a, prop, b[prop]);
1760
+ if (__hasOwnProp$c.call(b, prop))
1761
+ __defNormalProp$c(a, prop, b[prop]);
1762
+ if (__getOwnPropSymbols$c)
1763
+ for (var prop of __getOwnPropSymbols$c(b)) {
1764
+ if (__propIsEnum$c.call(b, prop))
1765
+ __defNormalProp$c(a, prop, b[prop]);
1766
1766
  }
1767
1767
  return a;
1768
1768
  };
1769
- var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
1769
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
1770
1770
  const ActivityReflection = (props) => {
1771
1771
  const className = builder("w-full md:w-[40rem]").if(!!props.headline, "min-h-[20rem]").build();
1772
1772
  const [reaction, setReaction] = React.useState({
@@ -1774,8 +1774,8 @@ const ActivityReflection = (props) => {
1774
1774
  reflection: props.reflection
1775
1775
  });
1776
1776
  const hasChanges = props.hasChanges || props.canReflect && (props.rating !== reaction.rating || props.reflection !== reaction.reflection);
1777
- const setFeedback = (feedback) => setReaction(__spreadProps$b(__spreadValues$d({}, reaction), { reflection: feedback }));
1778
- const setRating = (rating) => setReaction(__spreadProps$b(__spreadValues$d({}, reaction), { rating }));
1777
+ const setFeedback = (feedback) => setReaction(__spreadProps$a(__spreadValues$c({}, reaction), { reflection: feedback }));
1778
+ const setRating = (rating) => setReaction(__spreadProps$a(__spreadValues$c({}, reaction), { rating }));
1779
1779
  React.useEffect(() => {
1780
1780
  setReaction({
1781
1781
  rating: props.rating,
@@ -1802,7 +1802,7 @@ const ActivityReflection = (props) => {
1802
1802
  defaultValue: props.reflection,
1803
1803
  className: "resize-none text-slate-500 focus:text-slate-600 h-24 mt-1 block w-full px-3 py-2 bg-white border border-slate-300 rounded-md text-sm shadow-sm placeholder-slate-400\n focus:outline-none focus:border-sky-500 focus:ring-1 focus:ring-sky-500\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n invalid:border-pink-500 invalid:text-pink-600\n focus:invalid:border-pink-500 focus:invalid:ring-pink-500"
1804
1804
  }
1805
- ), props.canReflect && /* @__PURE__ */ React.createElement(Rating$1, __spreadProps$b(__spreadValues$d(__spreadValues$d({}, props), reaction), { setRating })))))));
1805
+ ), props.canReflect && /* @__PURE__ */ React.createElement(Rating$1, __spreadProps$a(__spreadValues$c(__spreadValues$c({}, props), reaction), { setRating })))))));
1806
1806
  };
1807
1807
  const Rating$1 = (props) => {
1808
1808
  const maxPoints = 5;
@@ -3208,25 +3208,25 @@ const Overlay = (props) => {
3208
3208
  return /* @__PURE__ */ React__namespace.createElement("div", { className: "flex fixed overscroll-none w-screen h-screen top-0 left-0 bg-gray-300/75 z-30" }, props.children);
3209
3209
  };
3210
3210
 
3211
- var __defProp$c = Object.defineProperty;
3212
- var __defProps$a = Object.defineProperties;
3213
- var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
3214
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
3215
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
3216
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
3217
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3218
- var __spreadValues$c = (a, b) => {
3211
+ var __defProp$b = Object.defineProperty;
3212
+ var __defProps$9 = Object.defineProperties;
3213
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
3214
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
3215
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
3216
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
3217
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3218
+ var __spreadValues$b = (a, b) => {
3219
3219
  for (var prop in b || (b = {}))
3220
- if (__hasOwnProp$c.call(b, prop))
3221
- __defNormalProp$c(a, prop, b[prop]);
3222
- if (__getOwnPropSymbols$c)
3223
- for (var prop of __getOwnPropSymbols$c(b)) {
3224
- if (__propIsEnum$c.call(b, prop))
3225
- __defNormalProp$c(a, prop, b[prop]);
3220
+ if (__hasOwnProp$b.call(b, prop))
3221
+ __defNormalProp$b(a, prop, b[prop]);
3222
+ if (__getOwnPropSymbols$b)
3223
+ for (var prop of __getOwnPropSymbols$b(b)) {
3224
+ if (__propIsEnum$b.call(b, prop))
3225
+ __defNormalProp$b(a, prop, b[prop]);
3226
3226
  }
3227
3227
  return a;
3228
3228
  };
3229
- var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
3229
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
3230
3230
  const Badge = (props) => {
3231
3231
  var _a, _b;
3232
3232
  const [open, setOpen] = React__namespace.useState(props.open || false);
@@ -3244,7 +3244,7 @@ const Badge = (props) => {
3244
3244
  props.onClose();
3245
3245
  }
3246
3246
  };
3247
- return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, !open && /* @__PURE__ */ React__namespace.createElement(BadgeButton, __spreadProps$a(__spreadValues$c({}, props), { progress, target, onClick: onOpen })), open && !!props.preview && /* @__PURE__ */ React__namespace.createElement(BadgeCard, __spreadProps$a(__spreadValues$c({}, props), { onClose })), open && !props.preview && /* @__PURE__ */ React__namespace.createElement(Overlay, null, /* @__PURE__ */ React__namespace.createElement(BadgeCard, __spreadProps$a(__spreadValues$c({}, props), { onClose }))));
3247
+ return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, !open && /* @__PURE__ */ React__namespace.createElement(BadgeButton, __spreadProps$9(__spreadValues$b({}, props), { progress, target, onClick: onOpen })), open && !!props.preview && /* @__PURE__ */ React__namespace.createElement(BadgeCard, __spreadProps$9(__spreadValues$b({}, props), { onClose })), open && !props.preview && /* @__PURE__ */ React__namespace.createElement(Overlay, null, /* @__PURE__ */ React__namespace.createElement(BadgeCard, __spreadProps$9(__spreadValues$b({}, props), { onClose }))));
3248
3248
  };
3249
3249
 
3250
3250
  const BadgeActivity = (props) => {
@@ -3279,25 +3279,25 @@ const BadgeActivity = (props) => {
3279
3279
  })))));
3280
3280
  };
3281
3281
 
3282
- var __defProp$b = Object.defineProperty;
3283
- var __defProps$9 = Object.defineProperties;
3284
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
3285
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
3286
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
3287
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
3288
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3289
- var __spreadValues$b = (a, b) => {
3282
+ var __defProp$a = Object.defineProperty;
3283
+ var __defProps$8 = Object.defineProperties;
3284
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
3285
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
3286
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
3287
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
3288
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3289
+ var __spreadValues$a = (a, b) => {
3290
3290
  for (var prop in b || (b = {}))
3291
- if (__hasOwnProp$b.call(b, prop))
3292
- __defNormalProp$b(a, prop, b[prop]);
3293
- if (__getOwnPropSymbols$b)
3294
- for (var prop of __getOwnPropSymbols$b(b)) {
3295
- if (__propIsEnum$b.call(b, prop))
3296
- __defNormalProp$b(a, prop, b[prop]);
3291
+ if (__hasOwnProp$a.call(b, prop))
3292
+ __defNormalProp$a(a, prop, b[prop]);
3293
+ if (__getOwnPropSymbols$a)
3294
+ for (var prop of __getOwnPropSymbols$a(b)) {
3295
+ if (__propIsEnum$a.call(b, prop))
3296
+ __defNormalProp$a(a, prop, b[prop]);
3297
3297
  }
3298
3298
  return a;
3299
3299
  };
3300
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
3300
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
3301
3301
  const BadgeActivityMenu = (props) => {
3302
3302
  const criteria = props.criteria || [];
3303
3303
  return /* @__PURE__ */ React__namespace.createElement("div", { className: "grid grid-cols-1 gap-y-4 w-full text-zinc-600" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "py-8 px-10 grid grid-cols-1 gap-y-5 rounded-b-md border-b border-x border-zinc-100" }, /* @__PURE__ */ React__namespace.createElement(
@@ -3314,7 +3314,7 @@ const BadgeActivityMenu = (props) => {
3314
3314
  return /* @__PURE__ */ React__namespace.createElement("div", { key: id, className: "grid grid-cols-1 gap-y-8" }, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement("p", { className: "text-lg font-semibold" }, c.displayName), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-sm" }, "Chose one activity to complete.")), /* @__PURE__ */ React__namespace.createElement("div", { className: "grid grid-flow-col auto-cols-max gap-4 px-1 pt-1 pb-2 w-full overflow-x-auto" }, options.map((o, i2) => {
3315
3315
  const id2 = o.activityId || i2;
3316
3316
  const date = o.startTime ? new Date(o.startTime) : null;
3317
- return /* @__PURE__ */ React__namespace.createElement("div", { key: id2, className: "grid grid-cols-1 gap-y-2" }, date && /* @__PURE__ */ React__namespace.createElement("p", null, Intl.DateTimeFormat("en-US", { month: "long" }).format(date), " ", ordNumber$1(date.getDate())), !date && /* @__PURE__ */ React__namespace.createElement("p", { className: "invisible" }, "Online"), /* @__PURE__ */ React__namespace.createElement(BadgeActivity, __spreadProps$9(__spreadValues$b({}, o), { criteriaName: c.displayName })));
3317
+ return /* @__PURE__ */ React__namespace.createElement("div", { key: id2, className: "grid grid-cols-1 gap-y-2" }, date && /* @__PURE__ */ React__namespace.createElement("p", null, Intl.DateTimeFormat("en-US", { month: "long" }).format(date), " ", ordNumber$1(date.getDate())), !date && /* @__PURE__ */ React__namespace.createElement("p", { className: "invisible" }, "Online"), /* @__PURE__ */ React__namespace.createElement(BadgeActivity, __spreadProps$8(__spreadValues$a({}, o), { criteriaName: c.displayName })));
3318
3318
  })));
3319
3319
  })));
3320
3320
  };
@@ -3359,25 +3359,25 @@ const Widget = (props) => {
3359
3359
  return /* @__PURE__ */ React.createElement("article", { className }, !props.headless && /* @__PURE__ */ React.createElement("div", { className: "p-2 bg-gray-200" }), /* @__PURE__ */ React.createElement(Loader, { isLoading: props.isLoading }, /* @__PURE__ */ React.createElement("div", { className: "relative w-full" }, props.children)));
3360
3360
  };
3361
3361
 
3362
- var __defProp$a = Object.defineProperty;
3363
- var __defProps$8 = Object.defineProperties;
3364
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
3365
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
3366
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
3367
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
3368
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3369
- var __spreadValues$a = (a, b) => {
3362
+ var __defProp$9 = Object.defineProperty;
3363
+ var __defProps$7 = Object.defineProperties;
3364
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
3365
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
3366
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
3367
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
3368
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3369
+ var __spreadValues$9 = (a, b) => {
3370
3370
  for (var prop in b || (b = {}))
3371
- if (__hasOwnProp$a.call(b, prop))
3372
- __defNormalProp$a(a, prop, b[prop]);
3373
- if (__getOwnPropSymbols$a)
3374
- for (var prop of __getOwnPropSymbols$a(b)) {
3375
- if (__propIsEnum$a.call(b, prop))
3376
- __defNormalProp$a(a, prop, b[prop]);
3371
+ if (__hasOwnProp$9.call(b, prop))
3372
+ __defNormalProp$9(a, prop, b[prop]);
3373
+ if (__getOwnPropSymbols$9)
3374
+ for (var prop of __getOwnPropSymbols$9(b)) {
3375
+ if (__propIsEnum$9.call(b, prop))
3376
+ __defNormalProp$9(a, prop, b[prop]);
3377
3377
  }
3378
3378
  return a;
3379
3379
  };
3380
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
3380
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
3381
3381
  const DEFAULT_FILTERS = [
3382
3382
  { label: "In Progress" },
3383
3383
  { label: "Completed" },
@@ -3437,7 +3437,7 @@ const BadgeSection = (props) => {
3437
3437
  if (!(opt.label in filters)) {
3438
3438
  return;
3439
3439
  }
3440
- const next = __spreadValues$a({}, filters);
3440
+ const next = __spreadValues$9({}, filters);
3441
3441
  next[opt.label].isActive = !next[opt.label].isActive;
3442
3442
  setFilters(next);
3443
3443
  },
@@ -3463,15 +3463,15 @@ const BadgeSection = (props) => {
3463
3463
  },
3464
3464
  "Grid View?"
3465
3465
  )))), /* @__PURE__ */ React__namespace.createElement("div", null, !!props.readonly && /* @__PURE__ */ React__namespace.createElement("div", { className: layoutClassName }, preview.map((b, i) => {
3466
- return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$8(__spreadValues$a({ key: i }, b), { compact: list, readonly: props.readonly }));
3466
+ return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$7(__spreadValues$9({ key: i }, b), { compact: list, readonly: props.readonly }));
3467
3467
  })), !props.readonly && /* @__PURE__ */ React__namespace.createElement("div", { className: "text-zinc-600 grid grid-cols-1 gap-y-4" }, (isWithoutFilters || "In Progress" in filters && filters["In Progress"].isActive) && progress.length > 0 && /* @__PURE__ */ React__namespace.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React__namespace.createElement("p", { className: "mb-3 text-md underline font-bold" }, "In Progress"), /* @__PURE__ */ React__namespace.createElement("div", { className: layoutClassName }, progress.map((b, i) => {
3468
- return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$8(__spreadValues$a({ key: i }, b), { compact: list }));
3468
+ return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$7(__spreadValues$9({ key: i }, b), { compact: list }));
3469
3469
  }))), (isWithoutFilters || "Completed" in filters && filters["Completed"].isActive) && collected.length > 0 && /* @__PURE__ */ React__namespace.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React__namespace.createElement("p", { className: "mb-3 text-md underline font-bold" }, "Completed"), /* @__PURE__ */ React__namespace.createElement("div", { className: layoutClassName }, collected.map((b, i) => {
3470
- return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$8(__spreadValues$a({ key: i }, b), { compact: list }));
3470
+ return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$7(__spreadValues$9({ key: i }, b), { compact: list }));
3471
3471
  }))), (isWithoutFilters || "Available" in filters && filters["Available"].isActive) && available.length > 0 && /* @__PURE__ */ React__namespace.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React__namespace.createElement("p", { className: "mb-3 text-md underline font-bold" }, "Available"), /* @__PURE__ */ React__namespace.createElement("div", { className: layoutClassName }, available.map((b, i) => {
3472
- return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$8(__spreadValues$a({ key: i }, b), { compact: list }));
3472
+ return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$7(__spreadValues$9({ key: i }, b), { compact: list }));
3473
3473
  }))), (isWithoutFilters || "Locked" in filters && filters["Locked"].isActive) && locked.length > 0 && /* @__PURE__ */ React__namespace.createElement("div", null, showSectionHeaders && /* @__PURE__ */ React__namespace.createElement("p", { className: "mb-3 text-md underline font-bold" }, "Locked"), /* @__PURE__ */ React__namespace.createElement("div", { className: layoutClassName }, locked.map((b, i) => {
3474
- return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$8(__spreadValues$a({ key: i }, b), { compact: list }));
3474
+ return /* @__PURE__ */ React__namespace.createElement(Badge, __spreadProps$7(__spreadValues$9({ key: i }, b), { compact: list }));
3475
3475
  }))))))))));
3476
3476
  };
3477
3477
  const getLayout = (list) => {
@@ -3492,7 +3492,17 @@ const activeFilters = (filters) => {
3492
3492
  };
3493
3493
 
3494
3494
  const BadgeSuccessDialog = (props) => {
3495
- return /* @__PURE__ */ React.createElement(Card, { onClose: props.onClose }, /* @__PURE__ */ React.createElement("div", { className: "w-full px-8 pt-5 pb-12 shadow-sm grid grid-cols-1 gap-4 content-center justify-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "text-zinc-600 w-28 h-28" }, /* @__PURE__ */ React.createElement(Icon, { name: "party popper" })), /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React.createElement("div", { className: "font-bold text-lg" }, /* @__PURE__ */ React.createElement("span", null, "Great Job!")), /* @__PURE__ */ React.createElement("div", { className: "max-w-[22rem]" }, !!props.xp && /* @__PURE__ */ React.createElement("div", { className: "text-sm" }, /* @__PURE__ */ React.createElement("span", null, "You've just earned"), /* @__PURE__ */ React.createElement("span", { className: "ml-1 font-semibold text-green-500" }, props.xp, " XP"), /* @__PURE__ */ React.createElement("span", { className: "ml-1" }, "points!")), !!props.displayName && /* @__PURE__ */ React.createElement("div", { className: "mt-2 text-sm" }, /* @__PURE__ */ React.createElement("span", null, "Check out your new"), /* @__PURE__ */ React.createElement("span", { className: "ml-1 font-semibold" }, props.displayName), /* @__PURE__ */ React.createElement("span", { className: "ml-1" }, "Lv. ", (props.level || 0) + 1, " badge on your profile! Look out for more opportunities to earn!"))))));
3495
+ return /* @__PURE__ */ React.createElement(Card, { onClose: props.onClose }, /* @__PURE__ */ React.createElement("div", { className: "w-full px-8 pt-5 pb-12 shadow-sm grid grid-cols-1 gap-4 content-center justify-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "text-zinc-600 w-28 h-28" }, /* @__PURE__ */ React.createElement(Icon, { name: "party popper" })), /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React.createElement("div", { className: "font-bold text-lg" }, /* @__PURE__ */ React.createElement("span", null, "Great Job!")), /* @__PURE__ */ React.createElement("div", { className: "max-w-[22rem]" }, !!props.xp && /* @__PURE__ */ React.createElement("div", { className: "text-sm" }, /* @__PURE__ */ React.createElement("span", null, "You've just earned"), /* @__PURE__ */ React.createElement("span", { className: "ml-1 font-semibold text-green-500" }, props.xp, " XP"), /* @__PURE__ */ React.createElement("span", { className: "ml-1" }, "points!")), !!props.displayName && /* @__PURE__ */ React.createElement("div", { className: "mt-2 text-sm" }, /* @__PURE__ */ React.createElement("span", null, "Check out your new"), /* @__PURE__ */ React.createElement("span", { className: "ml-1 font-semibold" }, props.displayName), /* @__PURE__ */ React.createElement("span", { className: "ml-1" }, "Lv. ", (props.level || 0) + 1, " badge on your profile! Look out for more opportunities to earn!")))), /* @__PURE__ */ React.createElement("a", { href: "/badges", className: "mt-4" }, /* @__PURE__ */ React.createElement(
3496
+ Button,
3497
+ {
3498
+ color: "sky",
3499
+ size: "md",
3500
+ spacing: "md",
3501
+ border: "rounded",
3502
+ theme: "light",
3503
+ text: "Explore Other Badges"
3504
+ }
3505
+ ))));
3496
3506
  };
3497
3507
 
3498
3508
  const Tab = (props) => {
@@ -3752,25 +3762,25 @@ const linkify = (text) => {
3752
3762
  return replacedText;
3753
3763
  };
3754
3764
 
3755
- var __defProp$9 = Object.defineProperty;
3756
- var __defProps$7 = Object.defineProperties;
3757
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
3758
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
3759
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
3760
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
3761
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3762
- var __spreadValues$9 = (a, b) => {
3765
+ var __defProp$8 = Object.defineProperty;
3766
+ var __defProps$6 = Object.defineProperties;
3767
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
3768
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
3769
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
3770
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
3771
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3772
+ var __spreadValues$8 = (a, b) => {
3763
3773
  for (var prop in b || (b = {}))
3764
- if (__hasOwnProp$9.call(b, prop))
3765
- __defNormalProp$9(a, prop, b[prop]);
3766
- if (__getOwnPropSymbols$9)
3767
- for (var prop of __getOwnPropSymbols$9(b)) {
3768
- if (__propIsEnum$9.call(b, prop))
3769
- __defNormalProp$9(a, prop, b[prop]);
3774
+ if (__hasOwnProp$8.call(b, prop))
3775
+ __defNormalProp$8(a, prop, b[prop]);
3776
+ if (__getOwnPropSymbols$8)
3777
+ for (var prop of __getOwnPropSymbols$8(b)) {
3778
+ if (__propIsEnum$8.call(b, prop))
3779
+ __defNormalProp$8(a, prop, b[prop]);
3770
3780
  }
3771
3781
  return a;
3772
3782
  };
3773
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
3783
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
3774
3784
  const FormItem = (props) => {
3775
3785
  const responses = props.responses || [];
3776
3786
  const notEmpty = responses.length > 0 && responses[0].trim() !== "";
@@ -3797,28 +3807,28 @@ const FormItem = (props) => {
3797
3807
  }
3798
3808
  }, [isTextError]);
3799
3809
  const marginBottom = props.format === "text" ? "-mb-7" : "";
3800
- return /* @__PURE__ */ React.createElement("div", { className: `bg-white rounded-md p-5 shadow-sm grid grid-cols-1 gap-y-8 ${itemContainerError} ${marginBottom}` }, props.displayName && /* @__PURE__ */ React.createElement("div", { className: "flex gap-x-1" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start gap-x-4" }, props.format === "question" && /* @__PURE__ */ React.createElement("div", { className: `${checkIconColor} w-5 h-5 mt-1` }, /* @__PURE__ */ React.createElement(Icon$1, { name: "positive" })), /* @__PURE__ */ React.createElement("div", { className: "grow max-w-lg" }, props.displayName && /* @__PURE__ */ React.createElement("p", { className: "flex-auto text-lg text-slate-600 font-semibold whitespace-pre-line" }, linkify(props.displayName)), props.description && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-slate-400 whitespace-pre-line" }, linkify(props.description)))), props.required && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-rose-600" }, "*")), !props.children && props.format !== "text" && /* @__PURE__ */ React.createElement("div", { className: `${contentMaxWidth} ml-1` }, /* @__PURE__ */ React.createElement(Switch, __spreadProps$7(__spreadValues$9({}, props), { onTextBlur })), showError && /* @__PURE__ */ React.createElement("div", { className: "text-rose-300 flex items-center gap-x-2 mt-4" }, /* @__PURE__ */ React.createElement("div", { className: "w-4 h-4" }, /* @__PURE__ */ React.createElement(Icon$1, { name: "negative" })), /* @__PURE__ */ React.createElement("span", { className: "grow text-sm" }, "Must be a minimum of ", minimum, " characters."))), props.children);
3810
+ return /* @__PURE__ */ React.createElement("div", { className: `bg-white rounded-md p-5 shadow-sm grid grid-cols-1 gap-y-8 ${itemContainerError} ${marginBottom}` }, props.displayName && /* @__PURE__ */ React.createElement("div", { className: "flex gap-x-1" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start gap-x-4" }, props.format === "question" && /* @__PURE__ */ React.createElement("div", { className: `${checkIconColor} w-5 h-5 mt-1` }, /* @__PURE__ */ React.createElement(Icon$1, { name: "positive" })), /* @__PURE__ */ React.createElement("div", { className: "grow max-w-lg" }, props.displayName && /* @__PURE__ */ React.createElement("p", { className: "flex-auto text-lg text-slate-600 font-semibold whitespace-pre-line" }, linkify(props.displayName)), props.description && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-slate-400 whitespace-pre-line" }, linkify(props.description)))), props.required && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-rose-600" }, "*")), !props.children && props.format !== "text" && /* @__PURE__ */ React.createElement("div", { className: `${contentMaxWidth} ml-1` }, /* @__PURE__ */ React.createElement(Switch, __spreadProps$6(__spreadValues$8({}, props), { onTextBlur })), showError && /* @__PURE__ */ React.createElement("div", { className: "text-rose-300 flex items-center gap-x-2 mt-4" }, /* @__PURE__ */ React.createElement("div", { className: "w-4 h-4" }, /* @__PURE__ */ React.createElement(Icon$1, { name: "negative" })), /* @__PURE__ */ React.createElement("span", { className: "grow text-sm" }, "Must be a minimum of ", minimum, " characters."))), props.children);
3801
3811
  };
3802
3812
  const Switch = (props) => {
3803
3813
  switch (true) {
3804
3814
  case props.format === "embed":
3805
- return /* @__PURE__ */ React.createElement(Embed, __spreadValues$9({}, props));
3815
+ return /* @__PURE__ */ React.createElement(Embed, __spreadValues$8({}, props));
3806
3816
  case props.format === "image":
3807
- return /* @__PURE__ */ React.createElement(Image, __spreadValues$9({}, props));
3817
+ return /* @__PURE__ */ React.createElement(Image, __spreadValues$8({}, props));
3808
3818
  case props.questionType === "radio":
3809
- return /* @__PURE__ */ React.createElement(RadioQuestion, __spreadValues$9({}, props));
3819
+ return /* @__PURE__ */ React.createElement(RadioQuestion, __spreadValues$8({}, props));
3810
3820
  case props.questionType === "checkbox":
3811
- return /* @__PURE__ */ React.createElement(CheckboxQuestion, __spreadValues$9({}, props));
3821
+ return /* @__PURE__ */ React.createElement(CheckboxQuestion, __spreadValues$8({}, props));
3812
3822
  case props.questionType === "drop down":
3813
- return /* @__PURE__ */ React.createElement(DropDownQuestion, __spreadValues$9({}, props));
3823
+ return /* @__PURE__ */ React.createElement(DropDownQuestion, __spreadValues$8({}, props));
3814
3824
  case props.questionType === "file upload":
3815
- return /* @__PURE__ */ React.createElement(FileUploadQuestion, __spreadValues$9({}, props));
3825
+ return /* @__PURE__ */ React.createElement(FileUploadQuestion, __spreadValues$8({}, props));
3816
3826
  case props.questionType === "text":
3817
- return /* @__PURE__ */ React.createElement(TextQuestion, __spreadValues$9({}, props));
3827
+ return /* @__PURE__ */ React.createElement(TextQuestion, __spreadValues$8({}, props));
3818
3828
  case props.questionType === "date":
3819
- return /* @__PURE__ */ React.createElement(DateQuestion, __spreadValues$9({}, props));
3829
+ return /* @__PURE__ */ React.createElement(DateQuestion, __spreadValues$8({}, props));
3820
3830
  case props.questionType === "time":
3821
- return /* @__PURE__ */ React.createElement(TimeQuestion, __spreadValues$9({}, props));
3831
+ return /* @__PURE__ */ React.createElement(TimeQuestion, __spreadValues$8({}, props));
3822
3832
  default:
3823
3833
  return null;
3824
3834
  }
@@ -4146,7 +4156,7 @@ const displayNameString = (displayName) => {
4146
4156
  };
4147
4157
 
4148
4158
  const FormSubmitDialog$1 = (props) => {
4149
- return /* @__PURE__ */ React.createElement(Modal, { visible: true, transparent: true, onClose: props.onGoBack }, /* @__PURE__ */ React.createElement("div", { className: "w-full md:w-[24rem] px-8 py-5 shadow-sm grid grid-cols-1 gap-4 content-center justify-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "text-green-500 w-14 h-14" }, /* @__PURE__ */ React.createElement(Icon$1, { name: "positive" })), /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React.createElement("div", { className: "font-bold text-lg" }, /* @__PURE__ */ React.createElement("span", null, "Great Job!")), /* @__PURE__ */ React.createElement("p", { className: "text-sm max-w-[16rem]" }, "Your responses have been submitted.")), /* @__PURE__ */ React.createElement("div", { className: "my-5 grid grid-cols-2 gap-4" }, /* @__PURE__ */ React.createElement(
4159
+ return /* @__PURE__ */ React.createElement(Modal, { visible: true, transparent: true, onClose: props.onEditLesson }, /* @__PURE__ */ React.createElement("div", { className: "w-full md:w-[24rem] px-8 py-5 shadow-sm grid grid-cols-1 gap-4 content-center justify-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "text-green-500 w-14 h-14" }, /* @__PURE__ */ React.createElement(Icon$1, { name: "positive" })), /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React.createElement("div", { className: "font-bold text-lg" }, /* @__PURE__ */ React.createElement("span", null, "Great Job!")), /* @__PURE__ */ React.createElement("p", { className: "text-sm max-w-[16rem]" }, "Your responses have been submitted.")), /* @__PURE__ */ React.createElement("div", { className: "my-5 grid grid-cols-2 gap-4" }, /* @__PURE__ */ React.createElement(
4150
4160
  Button,
4151
4161
  {
4152
4162
  wide: true,
@@ -4154,9 +4164,9 @@ const FormSubmitDialog$1 = (props) => {
4154
4164
  border: "rounded",
4155
4165
  color: "blue",
4156
4166
  theme: "dark",
4157
- text: "Go back",
4167
+ text: "Edit Lesson",
4158
4168
  size: "md",
4159
- onClick: props.onGoBack
4169
+ onClick: props.onEditLesson
4160
4170
  }
4161
4171
  ), /* @__PURE__ */ React.createElement(
4162
4172
  Button,
@@ -4166,32 +4176,32 @@ const FormSubmitDialog$1 = (props) => {
4166
4176
  border: "rounded",
4167
4177
  color: "blue",
4168
4178
  theme: "dark",
4169
- text: "Home",
4179
+ text: "Back to Badge",
4170
4180
  size: "md",
4171
- onClick: props.onHome
4181
+ onClick: props.onBackToBadge
4172
4182
  }
4173
4183
  ))));
4174
4184
  };
4175
4185
 
4176
- var __defProp$8 = Object.defineProperty;
4177
- var __defProps$6 = Object.defineProperties;
4178
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
4179
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
4180
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
4181
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
4182
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4183
- var __spreadValues$8 = (a, b) => {
4186
+ var __defProp$7 = Object.defineProperty;
4187
+ var __defProps$5 = Object.defineProperties;
4188
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
4189
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
4190
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
4191
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
4192
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4193
+ var __spreadValues$7 = (a, b) => {
4184
4194
  for (var prop in b || (b = {}))
4185
- if (__hasOwnProp$8.call(b, prop))
4186
- __defNormalProp$8(a, prop, b[prop]);
4187
- if (__getOwnPropSymbols$8)
4188
- for (var prop of __getOwnPropSymbols$8(b)) {
4189
- if (__propIsEnum$8.call(b, prop))
4190
- __defNormalProp$8(a, prop, b[prop]);
4195
+ if (__hasOwnProp$7.call(b, prop))
4196
+ __defNormalProp$7(a, prop, b[prop]);
4197
+ if (__getOwnPropSymbols$7)
4198
+ for (var prop of __getOwnPropSymbols$7(b)) {
4199
+ if (__propIsEnum$7.call(b, prop))
4200
+ __defNormalProp$7(a, prop, b[prop]);
4191
4201
  }
4192
4202
  return a;
4193
4203
  };
4194
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
4204
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
4195
4205
  const AUTOSAVE_TIMEOUT = 30 * 1e3;
4196
4206
  const MIN_REFLECTION_LENGTH = 0;
4197
4207
  const autoSave = (run, func, callback) => {
@@ -4291,8 +4301,8 @@ const LearningForm = (props) => {
4291
4301
  "div",
4292
4302
  {
4293
4303
  onClick: () => {
4294
- if (props.preview && props.onGoBack) {
4295
- props.onGoBack();
4304
+ if (props.preview && props.onEditLesson) {
4305
+ props.onEditLesson();
4296
4306
  } else {
4297
4307
  setShowExitDialogue(true);
4298
4308
  }
@@ -4302,7 +4312,7 @@ const LearningForm = (props) => {
4302
4312
  /* @__PURE__ */ React.createElement("div", { className: "w-3 h-3 min-w-3" }, /* @__PURE__ */ React.createElement(Icon$1, { name: "leftArrow" })),
4303
4313
  /* @__PURE__ */ React.createElement("span", { className: "text-md" }, "Back")
4304
4314
  ), !!props.displayName && /* @__PURE__ */ React.createElement("h2", { className: "h-max font-semibold text-2xl" }, props.displayName), !!props.description && /* @__PURE__ */ React.createElement("p", { className: "h-max max-h-[14rem] overflow-y-auto whitespace-pre-line" }, props.description), !!props.eta && /* @__PURE__ */ React.createElement("p", { className: "text-sm h-max font-semibold" }, "Estimated Completion Time: ", props.eta)), /* @__PURE__ */ React.createElement("img", { className: "grow h-full max-h-[30rem] w-full object-cover", alt: props.displayName, src: props.imageURL })), /* @__PURE__ */ React.createElement("form", { className: "w-full max-w-[64rem] m-auto grid grid-cols-1 gap-y-12", onSubmit }, items.map((item) => {
4305
- return /* @__PURE__ */ React.createElement(FormItem, __spreadProps$6(__spreadValues$8({ key: item.itemId }, item), { minText: 0, disabled: !!props.preview }));
4315
+ return /* @__PURE__ */ React.createElement(FormItem, __spreadProps$5(__spreadValues$7({ key: item.itemId }, item), { minText: 0, disabled: !!props.preview }));
4306
4316
  }), /* @__PURE__ */ React.createElement(
4307
4317
  FormItem,
4308
4318
  {
@@ -4342,10 +4352,10 @@ const LearningForm = (props) => {
4342
4352
  )), showExitDialogue && /* @__PURE__ */ React.createElement("div", { className: "fixed top-0 left-0 px-4 md:px-2 w-screen h-screen py-5 transition ease-in-out duration-400 bg-gray-200/75 z-40" }, /* @__PURE__ */ React.createElement("div", { className: "flex md:w-max h-screen gap-x-2 justify-items-center content-center m-auto" }, /* @__PURE__ */ React.createElement(
4343
4353
  FormExitDialog$1,
4344
4354
  {
4345
- onYes: () => saveDraft().then(() => props.onGoBack && props.onGoBack()),
4355
+ onYes: () => saveDraft().then(() => props.onEditLesson && props.onEditLesson()),
4346
4356
  onNo: () => setShowExitDialogue(false)
4347
4357
  }
4348
- ))), showSubmitDialogue && /* @__PURE__ */ React.createElement("div", { className: "fixed top-0 left-0 px-4 md:px-2 w-screen h-screen py-5 transition ease-in-out duration-400 bg-gray-200/75 z-40" }, /* @__PURE__ */ React.createElement("div", { className: "flex md:w-max h-screen gap-x-2 justify-items-center content-center m-auto" }, /* @__PURE__ */ React.createElement(FormSubmitDialog$1, { onGoBack: () => setShowSubmitDialogue(false), onHome: props.onHome }))));
4358
+ ))), showSubmitDialogue && /* @__PURE__ */ React.createElement("div", { className: "fixed top-0 left-0 px-4 md:px-2 w-screen h-screen py-5 transition ease-in-out duration-400 bg-gray-200/75 z-40" }, /* @__PURE__ */ React.createElement("div", { className: "flex md:w-max h-screen gap-x-2 justify-items-center content-center m-auto" }, /* @__PURE__ */ React.createElement(FormSubmitDialog$1, { onEditLesson: () => setShowSubmitDialogue(false), onBackToBadge: props.onBackToBadge }))));
4349
4359
  };
4350
4360
  const Rating = (props) => {
4351
4361
  const [confidence, setConfidence] = React.useState(props.rating || -1);
@@ -4381,19 +4391,19 @@ const Rating = (props) => {
4381
4391
  )));
4382
4392
  };
4383
4393
 
4384
- var __defProp$7 = Object.defineProperty;
4385
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
4386
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
4387
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
4388
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4389
- var __spreadValues$7 = (a, b) => {
4394
+ var __defProp$6 = Object.defineProperty;
4395
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
4396
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
4397
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
4398
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4399
+ var __spreadValues$6 = (a, b) => {
4390
4400
  for (var prop in b || (b = {}))
4391
- if (__hasOwnProp$7.call(b, prop))
4392
- __defNormalProp$7(a, prop, b[prop]);
4393
- if (__getOwnPropSymbols$7)
4394
- for (var prop of __getOwnPropSymbols$7(b)) {
4395
- if (__propIsEnum$7.call(b, prop))
4396
- __defNormalProp$7(a, prop, b[prop]);
4401
+ if (__hasOwnProp$6.call(b, prop))
4402
+ __defNormalProp$6(a, prop, b[prop]);
4403
+ if (__getOwnPropSymbols$6)
4404
+ for (var prop of __getOwnPropSymbols$6(b)) {
4405
+ if (__propIsEnum$6.call(b, prop))
4406
+ __defNormalProp$6(a, prop, b[prop]);
4397
4407
  }
4398
4408
  return a;
4399
4409
  };
@@ -4402,7 +4412,7 @@ const NavLink = (props) => {
4402
4412
  const config = defaultConfig();
4403
4413
  withMenu(config, props.menu);
4404
4414
  withName(config, props.name);
4405
- return /* @__PURE__ */ React.createElement(Button, __spreadValues$7({ disabled: props.disabled, active: props.active, onClick }, config));
4415
+ return /* @__PURE__ */ React.createElement(Button, __spreadValues$6({ disabled: props.disabled, active: props.active, onClick }, config));
4406
4416
  };
4407
4417
  const defaultConfig = () => {
4408
4418
  return {};
@@ -4477,25 +4487,25 @@ const withName = (config, name) => {
4477
4487
  }
4478
4488
  };
4479
4489
 
4480
- var __defProp$6 = Object.defineProperty;
4481
- var __defProps$5 = Object.defineProperties;
4482
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
4483
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
4484
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
4485
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
4486
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4487
- var __spreadValues$6 = (a, b) => {
4490
+ var __defProp$5 = Object.defineProperty;
4491
+ var __defProps$4 = Object.defineProperties;
4492
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
4493
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
4494
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
4495
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
4496
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4497
+ var __spreadValues$5 = (a, b) => {
4488
4498
  for (var prop in b || (b = {}))
4489
- if (__hasOwnProp$6.call(b, prop))
4490
- __defNormalProp$6(a, prop, b[prop]);
4491
- if (__getOwnPropSymbols$6)
4492
- for (var prop of __getOwnPropSymbols$6(b)) {
4493
- if (__propIsEnum$6.call(b, prop))
4494
- __defNormalProp$6(a, prop, b[prop]);
4499
+ if (__hasOwnProp$5.call(b, prop))
4500
+ __defNormalProp$5(a, prop, b[prop]);
4501
+ if (__getOwnPropSymbols$5)
4502
+ for (var prop of __getOwnPropSymbols$5(b)) {
4503
+ if (__propIsEnum$5.call(b, prop))
4504
+ __defNormalProp$5(a, prop, b[prop]);
4495
4505
  }
4496
4506
  return a;
4497
4507
  };
4498
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
4508
+ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
4499
4509
  const NavBar = (props) => {
4500
4510
  const className = builder("flex items-center justify-between flex-wrap sticky top-0 z-30 w-full h-16 border-b").append("bg-white px-4 py text-center").append("md:border-t-none md:border-b md:border-monochrome-50 lg:px-36 md:shadow-sm").build();
4501
4511
  const [secondary, setSecondary] = React.useState(false);
@@ -4513,7 +4523,7 @@ const NavBar = (props) => {
4513
4523
  return null;
4514
4524
  })), /* @__PURE__ */ React.createElement("div", { className: "inline-block md:hidden" }, /* @__PURE__ */ React.createElement(NavLink, { onClick: () => setSecondary(!secondary), name: menuIcon })), /* @__PURE__ */ React.createElement("div", { className: secondaryClassName }, React.Children.map(props.children, (Link) => {
4515
4525
  if (Link && Link.props.name !== "home") {
4516
- return /* @__PURE__ */ React.createElement("div", { className: "relative" }, /* @__PURE__ */ React.createElement(NavLink, __spreadProps$5(__spreadValues$6({}, Link.props), { menu: true })));
4526
+ return /* @__PURE__ */ React.createElement("div", { className: "relative" }, /* @__PURE__ */ React.createElement(NavLink, __spreadProps$4(__spreadValues$5({}, Link.props), { menu: true })));
4517
4527
  }
4518
4528
  return null;
4519
4529
  }))));
@@ -4610,28 +4620,28 @@ const LegalAgreement = (props) => {
4610
4620
  )));
4611
4621
  };
4612
4622
 
4613
- var __defProp$5 = Object.defineProperty;
4614
- var __defProps$4 = Object.defineProperties;
4615
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
4616
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
4617
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
4618
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
4619
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4620
- var __spreadValues$5 = (a, b) => {
4623
+ var __defProp$4 = Object.defineProperty;
4624
+ var __defProps$3 = Object.defineProperties;
4625
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
4626
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
4627
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
4628
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
4629
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4630
+ var __spreadValues$4 = (a, b) => {
4621
4631
  for (var prop in b || (b = {}))
4622
- if (__hasOwnProp$5.call(b, prop))
4623
- __defNormalProp$5(a, prop, b[prop]);
4624
- if (__getOwnPropSymbols$5)
4625
- for (var prop of __getOwnPropSymbols$5(b)) {
4626
- if (__propIsEnum$5.call(b, prop))
4627
- __defNormalProp$5(a, prop, b[prop]);
4632
+ if (__hasOwnProp$4.call(b, prop))
4633
+ __defNormalProp$4(a, prop, b[prop]);
4634
+ if (__getOwnPropSymbols$4)
4635
+ for (var prop of __getOwnPropSymbols$4(b)) {
4636
+ if (__propIsEnum$4.call(b, prop))
4637
+ __defNormalProp$4(a, prop, b[prop]);
4628
4638
  }
4629
4639
  return a;
4630
4640
  };
4631
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
4641
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
4632
4642
  const CommunitySearch = (props) => {
4633
4643
  const [accessCode, setAccessCode] = React.useState("");
4634
- return /* @__PURE__ */ React.createElement("div", { className: "w-full md:w-[30rem] bg-white grid grid-cols-1 gap-4 rounded-md border border-slate-200 px-8 py-5 shadow-sm" }, /* @__PURE__ */ React.createElement("div", { className: "text-slate-600" }, /* @__PURE__ */ React.createElement("p", { className: "font-bold text-2xl" }, "Which is your community?"), /* @__PURE__ */ React.createElement("p", { className: "text-sm" }, "Pick your community.")), /* @__PURE__ */ React.createElement(Search, __spreadProps$4(__spreadValues$5({}, props), { autofocus: !accessCode, placeholder: props.name })), !!props.name && /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 grid-cols-1 gap-2" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", { className: "text-sm" }, "Enter the access code for"), /* @__PURE__ */ React.createElement("span", { className: "ml-1 font-semibold text-sm" }, props.name), /* @__PURE__ */ React.createElement("span", { className: "text-sm" }, ".")), /* @__PURE__ */ React.createElement("div", { className: "mt-2 content-center grid grid-cols-3 gap-x-2" }, /* @__PURE__ */ React.createElement(
4644
+ return /* @__PURE__ */ React.createElement("div", { className: "w-full md:w-[30rem] bg-white grid grid-cols-1 gap-4 rounded-md border border-slate-200 px-8 py-5 shadow-sm" }, /* @__PURE__ */ React.createElement("div", { className: "text-slate-600" }, /* @__PURE__ */ React.createElement("p", { className: "font-bold text-2xl" }, "Which is your community?"), /* @__PURE__ */ React.createElement("p", { className: "text-sm" }, "Pick your community.")), /* @__PURE__ */ React.createElement(Search, __spreadProps$3(__spreadValues$4({}, props), { autofocus: !accessCode, placeholder: props.name })), !!props.name && /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 grid-cols-1 gap-2" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", { className: "text-sm" }, "Enter the access code for"), /* @__PURE__ */ React.createElement("span", { className: "ml-1 font-semibold text-sm" }, props.name), /* @__PURE__ */ React.createElement("span", { className: "text-sm" }, ".")), /* @__PURE__ */ React.createElement("div", { className: "mt-2 content-center grid grid-cols-3 gap-x-2" }, /* @__PURE__ */ React.createElement(
4635
4645
  "input",
4636
4646
  {
4637
4647
  disabled: props.disabled,
@@ -4656,39 +4666,11 @@ const CommunitySearch = (props) => {
4656
4666
  )))));
4657
4667
  };
4658
4668
 
4659
- const RoleSelection = (props) => {
4660
- return /* @__PURE__ */ React.createElement("div", { className: "w-full md:w-[24rem] shadow-sm bg-white rounded-md border border-slate-200 px-8 py-5 grid grid-cols-1 gap-4 justify-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 w-14 h-14" }, /* @__PURE__ */ React.createElement(Icon$1, { name: "profile" })), /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React.createElement("p", { className: "font-bold text-2xl" }, "What is your persona?"), /* @__PURE__ */ React.createElement("p", { className: "text-sm" }, "Pick your community persona.")), /* @__PURE__ */ React.createElement("div", { className: "my-5 grid grid-cols-1 md:grid-cols-2 gap-y-2 gap-x-8 justify-between" }, /* @__PURE__ */ React.createElement(
4661
- Button,
4662
- {
4663
- active: props.persona === "student",
4664
- spacing: "md",
4665
- border: "rounded",
4666
- color: "sky",
4667
- theme: "dark",
4668
- text: "Student",
4669
- size: "md",
4670
- onClick: props.onStudent
4671
- }
4672
- ), /* @__PURE__ */ React.createElement(
4673
- Button,
4674
- {
4675
- active: props.persona === "educator",
4676
- spacing: "md",
4677
- border: "rounded",
4678
- color: "slate",
4679
- theme: "dark",
4680
- text: "Educator",
4681
- size: "md",
4682
- onClick: props.onEducator
4683
- }
4684
- )));
4685
- };
4686
-
4687
4669
  const Registration = (props) => {
4688
4670
  const [givenName, setGivenName] = React.useState(props.givenName);
4689
4671
  const [familyName, setFamilyName] = React.useState(props.familyName);
4690
4672
  const [grade, setGrade] = React.useState(props.grade);
4691
- const [impactStatement, setImpactStatement] = React.useState(props.impactStatement);
4673
+ const [impactStatement, setImpactStatement] = React.useState(props.impactStatement || "");
4692
4674
  const onRegister = () => props.onRegister && props.onRegister({
4693
4675
  givenName,
4694
4676
  familyName,
@@ -4758,11 +4740,9 @@ const Registration = (props) => {
4758
4740
  )), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "mb-2 font-semibold text-slate-500 text-sm" }, "Impact Statement"), /* @__PURE__ */ React.createElement(
4759
4741
  "textarea",
4760
4742
  {
4761
- required: true,
4762
- minLength: 100,
4763
4743
  placeholder: "E.g., I would like to encourage my community to become more educated on issues that directly affect us, as well as make sure my community is a place where everyone is welcome.",
4764
4744
  onChange: (e) => setImpactStatement(e.target.value),
4765
- defaultValue: impactStatement || "",
4745
+ defaultValue: impactStatement,
4766
4746
  className: "resize-none text-slate-500 focus:text-slate-600 h-24 mt-1 block w-full px-3 py-2 bg-white border border-slate-300 rounded-md text-sm shadow-sm placeholder-slate-400\n focus:outline-none focus:border-sky-500 focus:ring-1 focus:ring-sky-500\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none"
4767
4747
  }
4768
4748
  )))),
@@ -4781,245 +4761,6 @@ const Registration = (props) => {
4781
4761
  );
4782
4762
  };
4783
4763
 
4784
- var __defProp$4 = Object.defineProperty;
4785
- var __defProps$3 = Object.defineProperties;
4786
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
4787
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
4788
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
4789
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
4790
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4791
- var __spreadValues$4 = (a, b) => {
4792
- for (var prop in b || (b = {}))
4793
- if (__hasOwnProp$4.call(b, prop))
4794
- __defNormalProp$4(a, prop, b[prop]);
4795
- if (__getOwnPropSymbols$4)
4796
- for (var prop of __getOwnPropSymbols$4(b)) {
4797
- if (__propIsEnum$4.call(b, prop))
4798
- __defNormalProp$4(a, prop, b[prop]);
4799
- }
4800
- return a;
4801
- };
4802
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
4803
- const ImpactQuiz = (props) => {
4804
- const [started, setStarted] = React.useState(false);
4805
- const [question, setQuestion] = React.useState(0);
4806
- const initialAnswers = {};
4807
- props.interests && props.interests.map((interest) => {
4808
- initialAnswers[interest] = true;
4809
- });
4810
- const [answers, setAnswers] = React.useState(initialAnswers);
4811
- const setAnswer = (key, interest) => {
4812
- setAnswers(__spreadProps$3(__spreadValues$4({}, answers), { [key]: interest }));
4813
- next();
4814
- };
4815
- const questions = (() => {
4816
- const questions2 = [];
4817
- switch (props.persona) {
4818
- case "educator":
4819
- questions2.push(
4820
- /* @__PURE__ */ React.createElement(
4821
- Question,
4822
- {
4823
- key: "policy & government",
4824
- visible: question === 0,
4825
- answer: answers["policy & government"],
4826
- imageURL: "https://cdn.localcivics.io/rc/event/politics.jpg",
4827
- icon: "policy & government",
4828
- headline: "Voter Registration Assistance",
4829
- summary: "Gain the knowledge and technological skills to help friends and family navigate the voter registration process. You can have a civic impact in your immediate circle \u2014 every vote counts!",
4830
- onAnswer: (interest) => setAnswer("policy & government", interest)
4831
- }
4832
- ),
4833
- /* @__PURE__ */ React.createElement(
4834
- Question,
4835
- {
4836
- key: "arts & culture",
4837
- visible: question === 1,
4838
- answer: answers["arts & culture"],
4839
- imageURL: "https://cdn.localcivics.io/rc/event/culture.jpg",
4840
- icon: "arts & culture",
4841
- headline: "#CreateSeries: Introduction to Drawing & Painting",
4842
- summary: "In our #CreateSeries, students learn directly from experienced artists and connect with like-minded students. Encourage them to flex their creative muscles and pick up some new skills!",
4843
- onAnswer: (interest) => setAnswer("arts & culture", interest)
4844
- }
4845
- ),
4846
- /* @__PURE__ */ React.createElement(
4847
- Question,
4848
- {
4849
- key: "sponsored",
4850
- visible: question === 2,
4851
- answer: answers["sponsored"],
4852
- imageURL: "https://cdn.localcivics.io/rc/event/sponsored.jpg",
4853
- icon: "sponsored",
4854
- headline: "Social Entrepreneurship & Design Thinking",
4855
- summary: "Learn about leaders who have pursued positive social change instead of profits. Then, follow in their footsteps with a design thinking framework to brainstorm innovative solutions for community needs.",
4856
- onAnswer: (interest) => setAnswer("sponsored", interest)
4857
- }
4858
- )
4859
- );
4860
- break;
4861
- default:
4862
- questions2.push(
4863
- /* @__PURE__ */ React.createElement(
4864
- Question,
4865
- {
4866
- key: "policy & government",
4867
- visible: question === 0,
4868
- answer: answers["policy & government"],
4869
- imageURL: "https://cdn.localcivics.io/rc/event/politics.jpg",
4870
- icon: "policy & government",
4871
- headline: "Voter Registration Assistance",
4872
- summary: "Gain the knowledge and technological skills to help friends and family navigate the voter registration process. You can have a civic impact in your immediate circle \u2014 every vote counts!",
4873
- onAnswer: (interest) => setAnswer("policy & government", interest)
4874
- }
4875
- ),
4876
- /* @__PURE__ */ React.createElement(
4877
- Question,
4878
- {
4879
- key: "recreation",
4880
- visible: question === 1,
4881
- answer: answers["recreation"],
4882
- imageURL: "https://cdn.localcivics.io/rc/event/recreation.jpg",
4883
- icon: "recreation",
4884
- headline: "Yin Yoga & Social Justice w/ Shayna Johnson",
4885
- summary: "Get in the flow and foster courage in the face of fear. Learn to work through physical and emotional discomfort as you practice balance, meditation, and relaxation.",
4886
- onAnswer: (interest) => setAnswer("recreation", interest)
4887
- }
4888
- ),
4889
- /* @__PURE__ */ React.createElement(
4890
- Question,
4891
- {
4892
- key: "volunteer",
4893
- visible: question === 2,
4894
- answer: answers["volunteer"],
4895
- imageURL: "https://cdn.localcivics.io/rc/event/volunteer.jpg",
4896
- icon: "volunteer",
4897
- headline: "Harlem Grown Harvest Volunteer",
4898
- summary: "Don\u2019t mind getting your hands dirty? Lend one and learn about the benefits of farming organic at one of the many community gardens in the Harlem area.",
4899
- onAnswer: (interest) => setAnswer("volunteer", interest)
4900
- }
4901
- ),
4902
- /* @__PURE__ */ React.createElement(
4903
- Question,
4904
- {
4905
- key: "arts & culture",
4906
- visible: question === 3,
4907
- answer: answers["arts & culture"],
4908
- imageURL: "https://cdn.localcivics.io/rc/event/culture.jpg",
4909
- icon: "arts & culture",
4910
- headline: "#CreateSeries: Introduction to Drawing & Painting",
4911
- summary: "Flex your creative muscles and pick up some new skills! In our #CreateSeries, learn directly from experienced artists and connect with like-minded students.",
4912
- onAnswer: (interest) => setAnswer("arts & culture", interest)
4913
- }
4914
- ),
4915
- /* @__PURE__ */ React.createElement(
4916
- Question,
4917
- {
4918
- key: "college & career",
4919
- visible: question === 4,
4920
- answer: answers["college & career"],
4921
- imageURL: "https://cdn.localcivics.io/rc/event/college.jpg",
4922
- icon: "college & career",
4923
- headline: "Career Journeys: Tech, Law, & Healthcare",
4924
- summary: "Join us each week and meet diverse professionals representing a wide range of careers. Get all your interests answered and explore your dream jobs with the people who know them best!",
4925
- onAnswer: (interest) => setAnswer("college & career", interest)
4926
- }
4927
- ),
4928
- /* @__PURE__ */ React.createElement(
4929
- Question,
4930
- {
4931
- key: "sponsored",
4932
- visible: question === 5,
4933
- answer: answers["sponsored"],
4934
- imageURL: "https://cdn.localcivics.io/rc/event/sponsored.jpg",
4935
- icon: "sponsored",
4936
- headline: "Social Entrepreneurship & Design Thinking",
4937
- summary: "Learn about leaders who have pursued positive social change instead of profits. Then, follow in their footsteps with a design thinking framework to brainstorm innovative solutions for community needs.",
4938
- onAnswer: (interest) => setAnswer("sponsored", interest)
4939
- }
4940
- )
4941
- );
4942
- break;
4943
- }
4944
- return questions2;
4945
- })();
4946
- const asked = questions.length;
4947
- const [finished, setFinished] = React.useState(asked === 0);
4948
- const start = () => {
4949
- setFinished(asked === 0);
4950
- setStarted(true);
4951
- setQuestion(0);
4952
- };
4953
- const next = () => {
4954
- if (finished) {
4955
- return;
4956
- }
4957
- if (question === asked - 1) {
4958
- setFinished(true);
4959
- return;
4960
- }
4961
- setQuestion(question + 1);
4962
- };
4963
- const restart = () => {
4964
- setQuestion(0);
4965
- setFinished(asked === 0);
4966
- setStarted(false);
4967
- };
4968
- if (!started) {
4969
- return /* @__PURE__ */ React.createElement("div", { className: "w-full md:w-[20rem] bg-white rounded-md border border-slate-200 px-8 py-5 shadow-sm grid grid-cols-1 gap-2 content-center justify-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 w-14 h-14" }, /* @__PURE__ */ React.createElement(Icon$1, { name: "goal" })), /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React.createElement("p", { className: "font-bold text-2xl" }, "Impact Quiz"), /* @__PURE__ */ React.createElement("p", { className: "text-sm max-w-[16rem]" }, "Choose the experiences (if any) that interest you.")), /* @__PURE__ */ React.createElement("div", { className: "my-5" }, /* @__PURE__ */ React.createElement(Button, { spacing: "md", border: "rounded", color: "sky", theme: "dark", text: "Start", size: "md", onClick: start })));
4970
- }
4971
- const interests = [];
4972
- Object.entries(answers).map(([v, interest]) => {
4973
- if (interest) {
4974
- interests.push(v);
4975
- }
4976
- });
4977
- if (finished) {
4978
- return /* @__PURE__ */ React.createElement("div", { className: "w-full md:w-[24rem] rounded-md bg-white border border-slate-200 px-8 py-5 shadow-sm grid grid-cols-1 gap-4 content-center justify-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "text-green-600 w-14 h-14" }, /* @__PURE__ */ React.createElement(Icon$1, { name: "positive" })), /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React.createElement("p", { className: "font-bold text-2xl" }, "Done! Nice work."), /* @__PURE__ */ React.createElement("p", { className: "text-sm max-w-[16rem]" }, "You may continue on or go back to change your answers.")), /* @__PURE__ */ React.createElement("div", { className: "my-5 grid grid-cols-1 md:grid-cols-2 gap-y-2 gap-x-8 justify-between" }, /* @__PURE__ */ React.createElement(Button, { spacing: "md", border: "rounded", color: "slate", theme: "dark", text: "Restart", size: "md", onClick: restart }), /* @__PURE__ */ React.createElement(
4979
- Button,
4980
- {
4981
- spacing: "md",
4982
- border: "rounded",
4983
- color: "sky",
4984
- theme: "dark",
4985
- text: "Continue",
4986
- size: "md",
4987
- onClick: () => props.onFinish && props.onFinish(interests)
4988
- }
4989
- )));
4990
- }
4991
- return /* @__PURE__ */ React.createElement(React.Fragment, null, questions);
4992
- };
4993
- const Question = (props) => {
4994
- if (!props.visible) {
4995
- return null;
4996
- }
4997
- return /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-1 gap-8 content-center" }, /* @__PURE__ */ React.createElement("div", { className: "w-full overflow-hidden max-w-[18rem] md:max-w-[30rem] md:w-[30rem] rounded-md bg-white shadow-sm grid grid-cols-1 md:grid-cols-2" }, /* @__PURE__ */ React.createElement("img", { alt: props.headline, className: "w-full h-full object-cover", src: props.imageURL }), /* @__PURE__ */ React.createElement("div", { className: "p-5" }, /* @__PURE__ */ React.createElement("div", { className: "flex" }, /* @__PURE__ */ React.createElement("div", { className: "h-8 w-8 text-slate-500" }, /* @__PURE__ */ React.createElement(Icon$1, { name: props.icon }))), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-1 text-slate-500" }, /* @__PURE__ */ React.createElement("p", { className: "font-semibold text-lg" }, props.headline), /* @__PURE__ */ React.createElement("p", { className: "text-sm" }, props.summary)))), /* @__PURE__ */ React.createElement("div", { className: "m-auto" }, /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-4" }, /* @__PURE__ */ React.createElement(
4998
- Button,
4999
- {
5000
- spacing: "md",
5001
- border: "rounded",
5002
- color: "rose",
5003
- theme: "dark",
5004
- text: "Not interested",
5005
- size: "md",
5006
- onClick: () => props.onAnswer && props.onAnswer(false)
5007
- }
5008
- ), /* @__PURE__ */ React.createElement(
5009
- Button,
5010
- {
5011
- icon: "accept",
5012
- spacing: "md",
5013
- border: "rounded",
5014
- color: "green",
5015
- theme: "dark",
5016
- text: "Looks cool",
5017
- size: "md",
5018
- onClick: () => props.onAnswer && props.onAnswer(true)
5019
- }
5020
- ))));
5021
- };
5022
-
5023
4764
  const Welcome = (props) => {
5024
4765
  return /* @__PURE__ */ React.createElement("div", { className: "w-full md:w-[24rem] rounded-md bg-white border border-slate-200 px-8 py-5 shadow-sm grid grid-cols-1 gap-4 content-center justify-items-center" }, /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 w-14 h-14" }, /* @__PURE__ */ React.createElement(Icon$1, { name: "explore" })), /* @__PURE__ */ React.createElement("div", { className: "text-slate-600 text-center" }, /* @__PURE__ */ React.createElement("div", { className: "font-bold text-2xl" }, /* @__PURE__ */ React.createElement("span", null, "You're all set"), props.givenName && /* @__PURE__ */ React.createElement("span", { className: "capitalize" }, ", ", props.givenName), /* @__PURE__ */ React.createElement("span", null, "!")), /* @__PURE__ */ React.createElement("p", { className: "text-sm max-w-[16rem]" }, "Click continue to start exploring Local.")), /* @__PURE__ */ React.createElement("div", { className: "my-5 grid grid-cols-1" }, /* @__PURE__ */ React.createElement(
5025
4766
  Button,
@@ -5094,13 +4835,7 @@ const Delegate = (props) => {
5094
4835
  }
5095
4836
  if (!props.hasRegistration) {
5096
4837
  if (!persona) {
5097
- return /* @__PURE__ */ React.createElement(
5098
- RoleSelection,
5099
- {
5100
- onStudent: () => setPersona("student"),
5101
- onEducator: () => setPersona("educator")
5102
- }
5103
- );
4838
+ setPersona("student");
5104
4839
  }
5105
4840
  return /* @__PURE__ */ React.createElement(
5106
4841
  Registration,
@@ -5115,17 +4850,8 @@ const Delegate = (props) => {
5115
4850
  );
5116
4851
  }
5117
4852
  if (!interests && !props.hasInterests) {
5118
- return /* @__PURE__ */ React.createElement(
5119
- ImpactQuiz,
5120
- {
5121
- persona,
5122
- interests: props.interests,
5123
- onFinish: (interests2) => {
5124
- setInterests(true);
5125
- props.onConfigureTenant && props.onConfigureTenant({ interests: interests2 });
5126
- }
5127
- }
5128
- );
4853
+ setInterests(true);
4854
+ props.onConfigureTenant({});
5129
4855
  }
5130
4856
  return /* @__PURE__ */ React.createElement(Welcome, { givenName: props.givenName, onContinue: props.onFinish });
5131
4857
  };