stagebook 0.3.0 → 0.3.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.
@@ -1227,17 +1227,20 @@ function YouTubeControls({
1227
1227
 
1228
1228
 
1229
1229
 
1230
-
1231
1230
  var PlaybackContext = _react.createContext.call(void 0, null);
1232
1231
  function PlaybackProvider({ children }) {
1233
1232
  const [handles, setHandles] = _react.useState.call(void 0,
1234
1233
  () => /* @__PURE__ */ new Map()
1235
1234
  );
1236
1235
  const register = _react.useCallback.call(void 0, (name, handle) => {
1237
- setHandles((prev) => new Map(prev).set(name, handle));
1236
+ setHandles((prev) => {
1237
+ if (prev.get(name) === handle) return prev;
1238
+ return new Map(prev).set(name, handle);
1239
+ });
1238
1240
  }, []);
1239
1241
  const unregister = _react.useCallback.call(void 0, (name) => {
1240
1242
  setHandles((prev) => {
1243
+ if (!prev.has(name)) return prev;
1241
1244
  const next = new Map(prev);
1242
1245
  next.delete(name);
1243
1246
  return next;
@@ -1251,17 +1254,17 @@ function PlaybackProvider({ children }) {
1251
1254
  }
1252
1255
  function useRegisterPlayback(name, handle) {
1253
1256
  const ctx = _react.useContext.call(void 0, PlaybackContext);
1254
- const handleRef = _react.useRef.call(void 0, handle);
1255
- handleRef.current = handle;
1257
+ const register = _optionalChain([ctx, 'optionalAccess', _25 => _25.register]);
1258
+ const unregister = _optionalChain([ctx, 'optionalAccess', _26 => _26.unregister]);
1256
1259
  _react.useEffect.call(void 0, () => {
1257
- if (!ctx) return;
1258
- ctx.register(name, handle);
1259
- return () => ctx.unregister(name);
1260
- }, [name, ctx, handle]);
1260
+ if (!register || !unregister) return;
1261
+ register(name, handle);
1262
+ return () => unregister(name);
1263
+ }, [name, handle, register, unregister]);
1261
1264
  }
1262
1265
  function usePlayback(source) {
1263
1266
  const ctx = _react.useContext.call(void 0, PlaybackContext);
1264
- return _optionalChain([ctx, 'optionalAccess', _25 => _25.handles, 'access', _26 => _26.get, 'call', _27 => _27(source)]);
1267
+ return _optionalChain([ctx, 'optionalAccess', _27 => _27.handles, 'access', _28 => _28.get, 'call', _29 => _29(source)]);
1265
1268
  }
1266
1269
 
1267
1270
  // src/components/elements/mediaPlayer/waveformCapture.ts
@@ -1433,7 +1436,7 @@ function MediaPlayer({
1433
1436
  return;
1434
1437
  const buckets = computeBucketCount(duration, BUCKETS_PER_SECOND2);
1435
1438
  if (buckets === 0) return;
1436
- if (peaksRef.current.length === channelCount && _optionalChain([peaksRef, 'access', _28 => _28.current, 'access', _29 => _29[0], 'optionalAccess', _30 => _30.length]) === buckets * 2)
1439
+ if (peaksRef.current.length === channelCount && _optionalChain([peaksRef, 'access', _30 => _30.current, 'access', _31 => _31[0], 'optionalAccess', _32 => _32.length]) === buckets * 2)
1437
1440
  return;
1438
1441
  peaksRef.current = createPeaksArrays(channelCount, buckets);
1439
1442
  }, [channelCount, duration]);
@@ -1492,15 +1495,15 @@ function MediaPlayer({
1492
1495
  const handle = _react.useMemo.call(void 0,
1493
1496
  () => ({
1494
1497
  play: () => {
1495
- void _optionalChain([videoRef, 'access', _31 => _31.current, 'optionalAccess', _32 => _32.play, 'call', _33 => _33()]);
1498
+ void _optionalChain([videoRef, 'access', _33 => _33.current, 'optionalAccess', _34 => _34.play, 'call', _35 => _35()]);
1496
1499
  },
1497
- pause: () => _optionalChain([videoRef, 'access', _34 => _34.current, 'optionalAccess', _35 => _35.pause, 'call', _36 => _36()]),
1500
+ pause: () => _optionalChain([videoRef, 'access', _36 => _36.current, 'optionalAccess', _37 => _37.pause, 'call', _38 => _38()]),
1498
1501
  seekTo: (s) => {
1499
1502
  if (videoRef.current) videoRef.current.currentTime = s;
1500
1503
  },
1501
- getCurrentTime: () => _nullishCoalesce(_optionalChain([videoRef, 'access', _37 => _37.current, 'optionalAccess', _38 => _38.currentTime]), () => ( 0)),
1502
- getDuration: () => _nullishCoalesce(_optionalChain([videoRef, 'access', _39 => _39.current, 'optionalAccess', _40 => _40.duration]), () => ( 0)),
1503
- isPaused: () => _nullishCoalesce(_optionalChain([videoRef, 'access', _41 => _41.current, 'optionalAccess', _42 => _42.paused]), () => ( true)),
1504
+ getCurrentTime: () => _nullishCoalesce(_optionalChain([videoRef, 'access', _39 => _39.current, 'optionalAccess', _40 => _40.currentTime]), () => ( 0)),
1505
+ getDuration: () => _nullishCoalesce(_optionalChain([videoRef, 'access', _41 => _41.current, 'optionalAccess', _42 => _42.duration]), () => ( 0)),
1506
+ isPaused: () => _nullishCoalesce(_optionalChain([videoRef, 'access', _43 => _43.current, 'optionalAccess', _44 => _44.paused]), () => ( true)),
1504
1507
  isYouTube: false,
1505
1508
  get channelCount() {
1506
1509
  return channelCount;
@@ -1605,7 +1608,7 @@ function MediaPlayer({
1605
1608
  setIsPaused(true);
1606
1609
  recordEvent("ended", e.currentTarget.currentTime);
1607
1610
  if (submitOnComplete) {
1608
- _optionalChain([onComplete, 'optionalCall', _43 => _43()]);
1611
+ _optionalChain([onComplete, 'optionalCall', _45 => _45()]);
1609
1612
  }
1610
1613
  },
1611
1614
  [recordEvent, submitOnComplete, onComplete]
@@ -1637,7 +1640,7 @@ function MediaPlayer({
1637
1640
  };
1638
1641
  const friendly = err ? _nullishCoalesce(codeMessages[err.code], () => ( `Error code ${String(err.code)}`)) : "Unknown error";
1639
1642
  console.error(
1640
- `[MediaPlayer] Video error (code ${_optionalChain([err, 'optionalAccess', _44 => _44.code])}): ${_nullishCoalesce(_optionalChain([err, 'optionalAccess', _45 => _45.message]), () => ( "unknown"))}`
1643
+ `[MediaPlayer] Video error (code ${_optionalChain([err, 'optionalAccess', _46 => _46.code])}): ${_nullishCoalesce(_optionalChain([err, 'optionalAccess', _47 => _47.message]), () => ( "unknown"))}`
1641
1644
  );
1642
1645
  setLoadError(friendly);
1643
1646
  },
@@ -1660,12 +1663,12 @@ function MediaPlayer({
1660
1663
  stopAtReachedRef.current = true;
1661
1664
  e.currentTarget.pause();
1662
1665
  recordEvent("stopAt", ct);
1663
- if (submitOnComplete) _optionalChain([onComplete, 'optionalCall', _46 => _46()]);
1666
+ if (submitOnComplete) _optionalChain([onComplete, 'optionalCall', _48 => _48()]);
1664
1667
  return;
1665
1668
  }
1666
1669
  if (cues.length > 0) {
1667
1670
  const active = cues.find((c) => ct >= c.startTime && ct <= c.endTime);
1668
- setCaptionText(_nullishCoalesce(_optionalChain([active, 'optionalAccess', _47 => _47.text]), () => ( null)));
1671
+ setCaptionText(_nullishCoalesce(_optionalChain([active, 'optionalAccess', _49 => _49.text]), () => ( null)));
1669
1672
  }
1670
1673
  },
1671
1674
  [stopAt, cues, recordEvent, submitOnComplete, onComplete]
@@ -1915,8 +1918,8 @@ function MediaPlayer({
1915
1918
  }
1916
1919
  }, []);
1917
1920
  const ytOnPlayPause = _react.useCallback.call(void 0, () => {
1918
- if (isPaused) _optionalChain([ytHandle, 'optionalAccess', _48 => _48.play, 'call', _49 => _49()]);
1919
- else _optionalChain([ytHandle, 'optionalAccess', _50 => _50.pause, 'call', _51 => _51()]);
1921
+ if (isPaused) _optionalChain([ytHandle, 'optionalAccess', _50 => _50.play, 'call', _51 => _51()]);
1922
+ else _optionalChain([ytHandle, 'optionalAccess', _52 => _52.pause, 'call', _53 => _53()]);
1920
1923
  }, [isPaused, ytHandle]);
1921
1924
  const ytOnSeekBack = _react.useCallback.call(void 0, () => {
1922
1925
  seek(-1);
@@ -1930,25 +1933,25 @@ function MediaPlayer({
1930
1933
  scrubWasPlayingRef.current = true;
1931
1934
  ytHandle.pause();
1932
1935
  }
1933
- _optionalChain([ytHandle, 'optionalAccess', _52 => _52.seekTo, 'call', _53 => _53(t)]);
1936
+ _optionalChain([ytHandle, 'optionalAccess', _54 => _54.seekTo, 'call', _55 => _55(t)]);
1934
1937
  setCurrentTime(t);
1935
1938
  },
1936
1939
  [ytHandle]
1937
1940
  );
1938
1941
  const ytOnScrubMove = _react.useCallback.call(void 0,
1939
1942
  (t) => {
1940
- _optionalChain([ytHandle, 'optionalAccess', _54 => _54.seekTo, 'call', _55 => _55(t)]);
1943
+ _optionalChain([ytHandle, 'optionalAccess', _56 => _56.seekTo, 'call', _57 => _57(t)]);
1941
1944
  setCurrentTime(t);
1942
1945
  },
1943
1946
  [ytHandle]
1944
1947
  );
1945
1948
  const ytOnScrubEnd = _react.useCallback.call(void 0,
1946
1949
  (t) => {
1947
- _optionalChain([ytHandle, 'optionalAccess', _56 => _56.seekTo, 'call', _57 => _57(t)]);
1950
+ _optionalChain([ytHandle, 'optionalAccess', _58 => _58.seekTo, 'call', _59 => _59(t)]);
1948
1951
  setCurrentTime(t);
1949
1952
  if (scrubWasPlayingRef.current) {
1950
1953
  scrubWasPlayingRef.current = false;
1951
- _optionalChain([ytHandle, 'optionalAccess', _58 => _58.play, 'call', _59 => _59()]);
1954
+ _optionalChain([ytHandle, 'optionalAccess', _60 => _60.play, 'call', _61 => _61()]);
1952
1955
  }
1953
1956
  },
1954
1957
  [ytHandle]
@@ -2024,7 +2027,7 @@ function MediaPlayer({
2024
2027
  if (stopAtReachedRef.current) {
2025
2028
  stopAtReachedRef.current = false;
2026
2029
  recordEvent("stopAt", t);
2027
- if (submitOnComplete) _optionalChain([onComplete, 'optionalCall', _60 => _60()]);
2030
+ if (submitOnComplete) _optionalChain([onComplete, 'optionalCall', _62 => _62()]);
2028
2031
  return;
2029
2032
  }
2030
2033
  recordEvent("pause", t);
@@ -2033,7 +2036,7 @@ function MediaPlayer({
2033
2036
  setIsPaused(true);
2034
2037
  setCurrentTime(t);
2035
2038
  recordEvent("ended", t);
2036
- if (submitOnComplete) _optionalChain([onComplete, 'optionalCall', _61 => _61()]);
2039
+ if (submitOnComplete) _optionalChain([onComplete, 'optionalCall', _63 => _63()]);
2037
2040
  }
2038
2041
  }
2039
2042
  ),
@@ -2976,7 +2979,7 @@ function SelectionOverlay({
2976
2979
  const handlePointerCancel = _react.useCallback.call(void 0,
2977
2980
  (e) => {
2978
2981
  releasePointer(e);
2979
- if (_optionalChain([dragRef, 'access', _62 => _62.current, 'optionalAccess', _63 => _63.beganDrag])) onEndDrag();
2982
+ if (_optionalChain([dragRef, 'access', _64 => _64.current, 'optionalAccess', _65 => _65.beganDrag])) onEndDrag();
2980
2983
  dragRef.current = null;
2981
2984
  setDragPreview(null);
2982
2985
  },
@@ -3440,7 +3443,7 @@ function Minimap({
3440
3443
  [eventToTime, duration, zoomLevel, onViewportChange]
3441
3444
  );
3442
3445
  const handlePointerUp = _react.useCallback.call(void 0, (e) => {
3443
- if (_optionalChain([dragRef, 'access', _64 => _64.current, 'optionalAccess', _65 => _65.pointerId]) === e.pointerId) {
3446
+ if (_optionalChain([dragRef, 'access', _66 => _66.current, 'optionalAccess', _67 => _67.pointerId]) === e.pointerId) {
3444
3447
  dragRef.current = null;
3445
3448
  try {
3446
3449
  e.currentTarget.releasePointerCapture(e.pointerId);
@@ -3933,7 +3936,7 @@ function Timeline({
3933
3936
  const containerElRef = _react.useRef.call(void 0, null);
3934
3937
  const containerRef = _react.useCallback.call(void 0, (el) => {
3935
3938
  containerElRef.current = el;
3936
- _optionalChain([observerRef, 'access', _66 => _66.current, 'optionalAccess', _67 => _67.disconnect, 'call', _68 => _68()]);
3939
+ _optionalChain([observerRef, 'access', _68 => _68.current, 'optionalAccess', _69 => _69.disconnect, 'call', _70 => _70()]);
3937
3940
  observerRef.current = null;
3938
3941
  if (!el) return;
3939
3942
  setContainerWidth(el.getBoundingClientRect().width);
@@ -3948,7 +3951,7 @@ function Timeline({
3948
3951
  }, []);
3949
3952
  _react.useEffect.call(void 0, () => {
3950
3953
  return () => {
3951
- _optionalChain([observerRef, 'access', _69 => _69.current, 'optionalAccess', _70 => _70.disconnect, 'call', _71 => _71()]);
3954
+ _optionalChain([observerRef, 'access', _71 => _71.current, 'optionalAccess', _72 => _72.disconnect, 'call', _73 => _73()]);
3952
3955
  observerRef.current = null;
3953
3956
  };
3954
3957
  }, []);
@@ -4043,7 +4046,7 @@ function Timeline({
4043
4046
  }, []);
4044
4047
  _react.useEffect.call(void 0, () => {
4045
4048
  if (zoomLevel <= 1) return;
4046
- const duration2 = _nullishCoalesce(_optionalChain([handleRef, 'access', _72 => _72.current, 'optionalAccess', _73 => _73.getDuration, 'call', _74 => _74()]), () => ( 0));
4049
+ const duration2 = _nullishCoalesce(_optionalChain([handleRef, 'access', _74 => _74.current, 'optionalAccess', _75 => _75.getDuration, 'call', _76 => _76()]), () => ( 0));
4047
4050
  if (duration2 <= 0) return;
4048
4051
  const visibleDuration2 = duration2 / zoomLevel;
4049
4052
  const lastT = lastPlayheadRef.current;
@@ -4076,7 +4079,7 @@ function Timeline({
4076
4079
  }
4077
4080
  }, [currentTime, isPaused, zoomLevel, viewportStart]);
4078
4081
  const onZoomIn = _react.useCallback.call(void 0, () => {
4079
- const duration2 = _nullishCoalesce(_optionalChain([handleRef, 'access', _75 => _75.current, 'optionalAccess', _76 => _76.getDuration, 'call', _77 => _77()]), () => ( 0));
4082
+ const duration2 = _nullishCoalesce(_optionalChain([handleRef, 'access', _77 => _77.current, 'optionalAccess', _78 => _78.getDuration, 'call', _79 => _79()]), () => ( 0));
4080
4083
  if (duration2 <= 0) return;
4081
4084
  const newZoom = zoomIn(zoomLevel);
4082
4085
  if (newZoom === zoomLevel) return;
@@ -4092,7 +4095,7 @@ function Timeline({
4092
4095
  );
4093
4096
  }, [zoomLevel, viewportStart, currentTime]);
4094
4097
  const onZoomOut = _react.useCallback.call(void 0, () => {
4095
- const duration2 = _nullishCoalesce(_optionalChain([handleRef, 'access', _78 => _78.current, 'optionalAccess', _79 => _79.getDuration, 'call', _80 => _80()]), () => ( 0));
4098
+ const duration2 = _nullishCoalesce(_optionalChain([handleRef, 'access', _80 => _80.current, 'optionalAccess', _81 => _81.getDuration, 'call', _82 => _82()]), () => ( 0));
4096
4099
  if (duration2 <= 0) return;
4097
4100
  const newZoom = zoomOut(zoomLevel);
4098
4101
  if (newZoom === zoomLevel) return;
@@ -4109,7 +4112,7 @@ function Timeline({
4109
4112
  }, [zoomLevel, viewportStart, currentTime]);
4110
4113
  const onMinimapPan = _react.useCallback.call(void 0,
4111
4114
  (newStart) => {
4112
- const duration2 = _nullishCoalesce(_optionalChain([handleRef, 'access', _81 => _81.current, 'optionalAccess', _82 => _82.getDuration, 'call', _83 => _83()]), () => ( 0));
4115
+ const duration2 = _nullishCoalesce(_optionalChain([handleRef, 'access', _83 => _83.current, 'optionalAccess', _84 => _84.getDuration, 'call', _85 => _85()]), () => ( 0));
4113
4116
  setViewportStart(clampViewportStart(newStart, duration2, zoomLevel));
4114
4117
  },
4115
4118
  [zoomLevel]
@@ -4135,7 +4138,7 @@ function Timeline({
4135
4138
  if (!action) return;
4136
4139
  e.preventDefault();
4137
4140
  e.stopPropagation();
4138
- const dur = _nullishCoalesce(_optionalChain([handleRef, 'access', _84 => _84.current, 'optionalAccess', _85 => _85.getDuration, 'call', _86 => _86()]), () => ( 0));
4141
+ const dur = _nullishCoalesce(_optionalChain([handleRef, 'access', _86 => _86.current, 'optionalAccess', _87 => _87.getDuration, 'call', _88 => _88()]), () => ( 0));
4139
4142
  const clampToMedia = (t) => {
4140
4143
  if (Number.isFinite(dur) && dur > 0) {
4141
4144
  return Math.max(0, Math.min(t, dur));
@@ -4152,7 +4155,7 @@ function Timeline({
4152
4155
  handle: action.handle,
4153
4156
  time: t
4154
4157
  });
4155
- _optionalChain([handleRef, 'access', _87 => _87.current, 'optionalAccess', _88 => _88.seekTo, 'call', _89 => _89(t)]);
4158
+ _optionalChain([handleRef, 'access', _89 => _89.current, 'optionalAccess', _90 => _90.seekTo, 'call', _91 => _91(t)]);
4156
4159
  break;
4157
4160
  }
4158
4161
  case "repositionPoint": {
@@ -4163,7 +4166,7 @@ function Timeline({
4163
4166
  index: action.index,
4164
4167
  time: t
4165
4168
  });
4166
- _optionalChain([handleRef, 'access', _90 => _90.current, 'optionalAccess', _91 => _91.seekTo, 'call', _92 => _92(t)]);
4169
+ _optionalChain([handleRef, 'access', _92 => _92.current, 'optionalAccess', _93 => _93.seekTo, 'call', _94 => _94(t)]);
4167
4170
  break;
4168
4171
  }
4169
4172
  case "switchHandle":
@@ -4210,7 +4213,7 @@ function Timeline({
4210
4213
  );
4211
4214
  const labels = [];
4212
4215
  for (let i = 0; i < channelCount; i++) {
4213
- labels.push(_nullishCoalesce(_optionalChain([trackLabels, 'optionalAccess', _93 => _93[i]]), () => ( `Position ${String(i)}`)));
4216
+ labels.push(_nullishCoalesce(_optionalChain([trackLabels, 'optionalAccess', _95 => _95[i]]), () => ( `Position ${String(i)}`)));
4214
4217
  }
4215
4218
  const tracksHeight = channelCount * TRACK_HEIGHT;
4216
4219
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -4333,7 +4336,7 @@ function Timeline({
4333
4336
  setIsDragging(true);
4334
4337
  },
4335
4338
  onEndDrag: () => setIsDragging(false),
4336
- onRequestFocus: () => _optionalChain([containerElRef, 'access', _94 => _94.current, 'optionalAccess', _95 => _95.focus, 'call', _96 => _96({ preventScroll: true })])
4339
+ onRequestFocus: () => _optionalChain([containerElRef, 'access', _96 => _96.current, 'optionalAccess', _97 => _97.focus, 'call', _98 => _98({ preventScroll: true })])
4337
4340
  }
4338
4341
  ),
4339
4342
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -4457,7 +4460,7 @@ var blockquoteStyle2 = {
4457
4460
  function Markdown({ text, resolveURL }) {
4458
4461
  let displayText = text;
4459
4462
  if (resolveURL) {
4460
- displayText = _optionalChain([text, 'optionalAccess', _97 => _97.replace, 'call', _98 => _98(
4463
+ displayText = _optionalChain([text, 'optionalAccess', _99 => _99.replace, 'call', _100 => _100(
4461
4464
  /!\[(.*?)\]\((.*?)\)/g,
4462
4465
  (_match, alt, path) => {
4463
4466
  if (path.startsWith("http://") || path.startsWith("https://")) {
@@ -4850,7 +4853,7 @@ function Slider({
4850
4853
  const handleChange = (e) => {
4851
4854
  const newValue = parseFloat(e.target.value);
4852
4855
  setLocalValue(newValue);
4853
- _optionalChain([onChange, 'optionalCall', _99 => _99(newValue)]);
4856
+ _optionalChain([onChange, 'optionalCall', _101 => _101(newValue)]);
4854
4857
  };
4855
4858
  const handleClick = (e) => {
4856
4859
  if (localValue !== void 0 && localValue !== null) return;
@@ -4861,7 +4864,7 @@ function Slider({
4861
4864
  const newValue = Math.round(rawValue / interval) * interval;
4862
4865
  const clampedValue = Math.max(min, Math.min(max, newValue));
4863
4866
  setLocalValue(clampedValue);
4864
- _optionalChain([onChange, 'optionalCall', _100 => _100(clampedValue)]);
4867
+ _optionalChain([onChange, 'optionalCall', _102 => _102(clampedValue)]);
4865
4868
  };
4866
4869
  const getPosition = (pt) => (pt - min) / (max - min) * 100;
4867
4870
  const hasValue = localValue !== void 0 && localValue !== null;
@@ -5267,7 +5270,7 @@ function Prompt({
5267
5270
  maxLength
5268
5271
  }
5269
5272
  ),
5270
- promptType === "openResponse" && shared && _optionalChain([renderSharedNotepad, 'optionalCall', _101 => _101({
5273
+ promptType === "openResponse" && shared && _optionalChain([renderSharedNotepad, 'optionalCall', _103 => _103({
5271
5274
  padName: name,
5272
5275
  defaultText: responses.join("\n"),
5273
5276
  rows
@@ -5541,7 +5544,7 @@ function Element({ element, onSubmit, stageDuration }) {
5541
5544
  element.file ? ` "${element.file}"` : "",
5542
5545
  ":",
5543
5546
  " ",
5544
- _optionalChain([parsed, 'access', _102 => _102.error, 'access', _103 => _103.issues, 'access', _104 => _104[0], 'optionalAccess', _105 => _105.message])
5547
+ _optionalChain([parsed, 'access', _104 => _104.error, 'access', _105 => _105.issues, 'access', _106 => _106[0], 'optionalAccess', _107 => _107.message])
5545
5548
  ]
5546
5549
  }
5547
5550
  );
@@ -5652,9 +5655,9 @@ function Element({ element, onSubmit, stageDuration }) {
5652
5655
  }
5653
5656
  );
5654
5657
  case "talkMeter":
5655
- return _nullishCoalesce(_optionalChain([renderTalkMeter, 'optionalCall', _106 => _106()]), () => ( null));
5658
+ return _nullishCoalesce(_optionalChain([renderTalkMeter, 'optionalCall', _108 => _108()]), () => ( null));
5656
5659
  case "sharedNotepad":
5657
- return _nullishCoalesce(_optionalChain([renderSharedNotepad, 'optionalCall', _107 => _107({
5660
+ return _nullishCoalesce(_optionalChain([renderSharedNotepad, 'optionalCall', _109 => _109({
5658
5661
  padName: _nullishCoalesce(element.name, () => ( ""))
5659
5662
  })]), () => ( null));
5660
5663
  case "qualtrics": {
@@ -5673,7 +5676,7 @@ function Element({ element, onSubmit, stageDuration }) {
5673
5676
  case "survey": {
5674
5677
  const surveyName = _nullishCoalesce(element.surveyName, () => ( ""));
5675
5678
  const surveyKey = _nullishCoalesce(element.name, () => ( surveyName));
5676
- return _nullishCoalesce(_optionalChain([renderSurvey, 'optionalCall', _108 => _108({
5679
+ return _nullishCoalesce(_optionalChain([renderSurvey, 'optionalCall', _110 => _110({
5677
5680
  surveyName,
5678
5681
  onComplete: (results) => {
5679
5682
  wrappedSave(`survey_${surveyKey}`, results);
@@ -5682,7 +5685,7 @@ function Element({ element, onSubmit, stageDuration }) {
5682
5685
  })]), () => ( null));
5683
5686
  }
5684
5687
  case "discussion":
5685
- return _nullishCoalesce(_optionalChain([renderDiscussion, 'optionalCall', _109 => _109(element)]), () => ( null));
5688
+ return _nullishCoalesce(_optionalChain([renderDiscussion, 'optionalCall', _111 => _111(element)]), () => ( null));
5686
5689
  default:
5687
5690
  console.warn(`Unknown element type: ${element.type}`);
5688
5691
  return null;