@novely/solid-renderer 0.51.0-next.1 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.jsx CHANGED
@@ -1,4 +1,4 @@
1
- // ../../node_modules/.pnpm/solid-js@1.9.4/node_modules/solid-js/dist/solid.js
1
+ // ../../node_modules/.pnpm/solid-js@1.9.7/node_modules/solid-js/dist/solid.js
2
2
  var sharedConfig = {
3
3
  context: void 0,
4
4
  registry: void 0,
@@ -25,6 +25,7 @@ function nextHydrateContext() {
25
25
  count: 0
26
26
  };
27
27
  }
28
+ var IS_DEV = false;
28
29
  var equalFn = (a, b) => a === b;
29
30
  var $PROXY = Symbol("solid-proxy");
30
31
  var SUPPORTS_PROXY = typeof Proxy === "function";
@@ -199,12 +200,12 @@ function useContext(context) {
199
200
  }
200
201
  function children(fn) {
201
202
  const children2 = createMemo(fn);
202
- const memo = createMemo(() => resolveChildren(children2()));
203
- memo.toArray = () => {
204
- const c = memo();
203
+ const memo2 = createMemo(() => resolveChildren(children2()));
204
+ memo2.toArray = () => {
205
+ const c = memo2();
205
206
  return Array.isArray(c) ? c : c != null ? [c] : [];
206
207
  };
207
- return memo;
208
+ return memo2;
208
209
  }
209
210
  var SuspenseContext;
210
211
  function readSignal() {
@@ -265,7 +266,7 @@ function writeSignal(node, value, isComp) {
265
266
  }
266
267
  if (Updates.length > 1e6) {
267
268
  Updates = [];
268
- if (false) ;
269
+ if (IS_DEV) ;
269
270
  throw new Error();
270
271
  }
271
272
  }, false);
@@ -277,11 +278,7 @@ function updateComputation(node) {
277
278
  if (!node.fn) return;
278
279
  cleanNode(node);
279
280
  const time = ExecCount;
280
- runComputation(
281
- node,
282
- Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value,
283
- time
284
- );
281
+ runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
285
282
  if (Transition && !Transition.running && Transition.sources.has(node)) {
286
283
  queueMicrotask(() => {
287
284
  runUpdates(() => {
@@ -512,8 +509,7 @@ function lookUpstream(node, ignore) {
512
509
  if (source.sources) {
513
510
  const state = runningTransition ? source.tState : source.state;
514
511
  if (state === STALE) {
515
- if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount))
516
- runTop(source);
512
+ if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount)) runTop(source);
517
513
  } else if (state === PENDING) lookUpstream(source, ignore);
518
514
  }
519
515
  }
@@ -589,13 +585,12 @@ function handleError(err, owner = Owner) {
589
585
  const fns = ERROR && owner && owner.context && owner.context[ERROR];
590
586
  const error = castError(err);
591
587
  if (!fns) throw error;
592
- if (Effects)
593
- Effects.push({
594
- fn() {
595
- runErrors(error, fns, owner);
596
- },
597
- state: STALE
598
- });
588
+ if (Effects) Effects.push({
589
+ fn() {
590
+ runErrors(error, fns, owner);
591
+ },
592
+ state: STALE
593
+ });
599
594
  else runErrors(error, fns, owner);
600
595
  }
601
596
  function resolveChildren(children2) {
@@ -613,16 +608,13 @@ function resolveChildren(children2) {
613
608
  function createProvider(id, options) {
614
609
  return function provider(props) {
615
610
  let res;
616
- createRenderEffect(
617
- () => res = untrack(() => {
618
- Owner.context = {
619
- ...Owner.context,
620
- [id]: props.value
621
- };
622
- return children(() => props.children);
623
- }),
624
- void 0
625
- );
611
+ createRenderEffect(() => res = untrack(() => {
612
+ Owner.context = {
613
+ ...Owner.context,
614
+ [id]: props.value
615
+ };
616
+ return children(() => props.children);
617
+ }), void 0);
626
618
  return res;
627
619
  };
628
620
  }
@@ -831,29 +823,25 @@ function mergeProps(...sources) {
831
823
  sources[i] = typeof s === "function" ? (proxy = true, createMemo(s)) : s;
832
824
  }
833
825
  if (SUPPORTS_PROXY && proxy) {
834
- return new Proxy(
835
- {
836
- get(property) {
837
- for (let i = sources.length - 1; i >= 0; i--) {
838
- const v = resolveSource(sources[i])[property];
839
- if (v !== void 0) return v;
840
- }
841
- },
842
- has(property) {
843
- for (let i = sources.length - 1; i >= 0; i--) {
844
- if (property in resolveSource(sources[i])) return true;
845
- }
846
- return false;
847
- },
848
- keys() {
849
- const keys = [];
850
- for (let i = 0; i < sources.length; i++)
851
- keys.push(...Object.keys(resolveSource(sources[i])));
852
- return [...new Set(keys)];
826
+ return new Proxy({
827
+ get(property) {
828
+ for (let i = sources.length - 1; i >= 0; i--) {
829
+ const v = resolveSource(sources[i])[property];
830
+ if (v !== void 0) return v;
853
831
  }
854
832
  },
855
- propTraps
856
- );
833
+ has(property) {
834
+ for (let i = sources.length - 1; i >= 0; i--) {
835
+ if (property in resolveSource(sources[i])) return true;
836
+ }
837
+ return false;
838
+ },
839
+ keys() {
840
+ const keys = [];
841
+ for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
842
+ return [...new Set(keys)];
843
+ }
844
+ }, propTraps);
857
845
  }
858
846
  const sourcesMap = {};
859
847
  const defined = /* @__PURE__ */ Object.create(null);
@@ -893,37 +881,29 @@ function splitProps(props, ...keys) {
893
881
  if (SUPPORTS_PROXY && $PROXY in props) {
894
882
  const blocked = new Set(keys.length > 1 ? keys.flat() : keys[0]);
895
883
  const res = keys.map((k) => {
896
- return new Proxy(
897
- {
898
- get(property) {
899
- return k.includes(property) ? props[property] : void 0;
900
- },
901
- has(property) {
902
- return k.includes(property) && property in props;
903
- },
904
- keys() {
905
- return k.filter((property) => property in props);
906
- }
884
+ return new Proxy({
885
+ get(property) {
886
+ return k.includes(property) ? props[property] : void 0;
907
887
  },
908
- propTraps
909
- );
910
- });
911
- res.push(
912
- new Proxy(
913
- {
914
- get(property) {
915
- return blocked.has(property) ? void 0 : props[property];
916
- },
917
- has(property) {
918
- return blocked.has(property) ? false : property in props;
919
- },
920
- keys() {
921
- return Object.keys(props).filter((k) => !blocked.has(k));
922
- }
888
+ has(property) {
889
+ return k.includes(property) && property in props;
923
890
  },
924
- propTraps
925
- )
926
- );
891
+ keys() {
892
+ return k.filter((property) => property in props);
893
+ }
894
+ }, propTraps);
895
+ });
896
+ res.push(new Proxy({
897
+ get(property) {
898
+ return blocked.has(property) ? void 0 : props[property];
899
+ },
900
+ has(property) {
901
+ return blocked.has(property) ? false : property in props;
902
+ },
903
+ keys() {
904
+ return Object.keys(props).filter((k) => !blocked.has(k));
905
+ }
906
+ }, propTraps));
927
907
  return res;
928
908
  }
929
909
  const otherObject = {};
@@ -966,124 +946,71 @@ function Index(props) {
966
946
  }
967
947
  function Show(props) {
968
948
  const keyed = props.keyed;
969
- const condition = createMemo(() => props.when, void 0, {
970
- equals: (a, b) => keyed ? a === b : !a === !b
949
+ const conditionValue = createMemo(() => props.when, void 0, void 0);
950
+ const condition = keyed ? conditionValue : createMemo(conditionValue, void 0, {
951
+ equals: (a, b) => !a === !b
971
952
  });
972
- return createMemo(
973
- () => {
974
- const c = condition();
975
- if (c) {
976
- const child = props.children;
977
- const fn = typeof child === "function" && child.length > 0;
978
- return fn ? untrack(
979
- () => child(
980
- keyed ? c : () => {
981
- if (!untrack(condition)) throw narrowedError("Show");
982
- return props.when;
983
- }
984
- )
985
- ) : child;
986
- }
987
- return props.fallback;
988
- },
989
- void 0,
990
- void 0
991
- );
953
+ return createMemo(() => {
954
+ const c = condition();
955
+ if (c) {
956
+ const child = props.children;
957
+ const fn = typeof child === "function" && child.length > 0;
958
+ return fn ? untrack(() => child(keyed ? c : () => {
959
+ if (!untrack(condition)) throw narrowedError("Show");
960
+ return conditionValue();
961
+ })) : child;
962
+ }
963
+ return props.fallback;
964
+ }, void 0, void 0);
992
965
  }
993
966
  function Switch(props) {
994
- let keyed = false;
995
- const equals = (a, b) => (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
996
- const conditions = children(() => props.children), evalConditions = createMemo(
997
- () => {
998
- let conds = conditions();
999
- if (!Array.isArray(conds)) conds = [conds];
1000
- for (let i = 0; i < conds.length; i++) {
1001
- const c = conds[i].when;
1002
- if (c) {
1003
- keyed = !!conds[i].keyed;
1004
- return [i, c, conds[i]];
1005
- }
1006
- }
1007
- return [-1];
1008
- },
1009
- void 0,
1010
- {
1011
- equals
967
+ const chs = children(() => props.children);
968
+ const switchFunc = createMemo(() => {
969
+ const ch = chs();
970
+ const mps = Array.isArray(ch) ? ch : [ch];
971
+ let func = () => void 0;
972
+ for (let i = 0; i < mps.length; i++) {
973
+ const index = i;
974
+ const mp = mps[i];
975
+ const prevFunc = func;
976
+ const conditionValue = createMemo(() => prevFunc() ? void 0 : mp.when, void 0, void 0);
977
+ const condition = mp.keyed ? conditionValue : createMemo(conditionValue, void 0, {
978
+ equals: (a, b) => !a === !b
979
+ });
980
+ func = () => prevFunc() || (condition() ? [index, conditionValue, mp] : void 0);
1012
981
  }
1013
- );
1014
- return createMemo(
1015
- () => {
1016
- const [index, when, cond] = evalConditions();
1017
- if (index < 0) return props.fallback;
1018
- const c = cond.children;
1019
- const fn = typeof c === "function" && c.length > 0;
1020
- return fn ? untrack(
1021
- () => c(
1022
- keyed ? when : () => {
1023
- if (untrack(evalConditions)[0] !== index) throw narrowedError("Match");
1024
- return cond.when;
1025
- }
1026
- )
1027
- ) : c;
1028
- },
1029
- void 0,
1030
- void 0
1031
- );
982
+ return func;
983
+ });
984
+ return createMemo(() => {
985
+ const sel = switchFunc()();
986
+ if (!sel) return props.fallback;
987
+ const [index, conditionValue, mp] = sel;
988
+ const child = mp.children;
989
+ const fn = typeof child === "function" && child.length > 0;
990
+ return fn ? untrack(() => child(mp.keyed ? conditionValue() : () => {
991
+ if (untrack(switchFunc)()?.[0] !== index) throw narrowedError("Match");
992
+ return conditionValue();
993
+ })) : child;
994
+ }, void 0, void 0);
1032
995
  }
1033
996
  function Match(props) {
1034
997
  return props;
1035
998
  }
1036
999
 
1037
- // ../../node_modules/.pnpm/solid-js@1.9.4/node_modules/solid-js/web/dist/web.js
1038
- var booleans = [
1039
- "allowfullscreen",
1040
- "async",
1041
- "autofocus",
1042
- "autoplay",
1043
- "checked",
1044
- "controls",
1045
- "default",
1046
- "disabled",
1047
- "formnovalidate",
1048
- "hidden",
1049
- "indeterminate",
1050
- "inert",
1051
- "ismap",
1052
- "loop",
1053
- "multiple",
1054
- "muted",
1055
- "nomodule",
1056
- "novalidate",
1057
- "open",
1058
- "playsinline",
1059
- "readonly",
1060
- "required",
1061
- "reversed",
1062
- "seamless",
1063
- "selected"
1064
- ];
1065
- var Properties = /* @__PURE__ */ new Set([
1066
- "className",
1067
- "value",
1068
- "readOnly",
1069
- "formNoValidate",
1070
- "isMap",
1071
- "noModule",
1072
- "playsInline",
1073
- ...booleans
1074
- ]);
1075
- var ChildProperties = /* @__PURE__ */ new Set([
1076
- "innerHTML",
1077
- "textContent",
1078
- "innerText",
1079
- "children"
1080
- ]);
1000
+ // ../../node_modules/.pnpm/solid-js@1.9.7/node_modules/solid-js/web/dist/web.js
1001
+ var booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
1002
+ var Properties = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
1003
+ var ChildProperties = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]);
1081
1004
  var Aliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
1082
1005
  className: "class",
1083
1006
  htmlFor: "for"
1084
1007
  });
1085
1008
  var PropAliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
1086
1009
  class: "className",
1010
+ novalidate: {
1011
+ $: "noValidate",
1012
+ FORM: 1
1013
+ },
1087
1014
  formnovalidate: {
1088
1015
  $: "formNoValidate",
1089
1016
  BUTTON: 1,
@@ -1111,34 +1038,12 @@ function getPropAlias(prop, tagName) {
1111
1038
  const a = PropAliases[prop];
1112
1039
  return typeof a === "object" ? a[tagName] ? a["$"] : void 0 : a;
1113
1040
  }
1114
- var DelegatedEvents = /* @__PURE__ */ new Set([
1115
- "beforeinput",
1116
- "click",
1117
- "dblclick",
1118
- "contextmenu",
1119
- "focusin",
1120
- "focusout",
1121
- "input",
1122
- "keydown",
1123
- "keyup",
1124
- "mousedown",
1125
- "mousemove",
1126
- "mouseout",
1127
- "mouseover",
1128
- "mouseup",
1129
- "pointerdown",
1130
- "pointermove",
1131
- "pointerout",
1132
- "pointerover",
1133
- "pointerup",
1134
- "touchend",
1135
- "touchmove",
1136
- "touchstart"
1137
- ]);
1041
+ var DelegatedEvents = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
1138
1042
  var SVGNamespace = {
1139
1043
  xlink: "http://www.w3.org/1999/xlink",
1140
1044
  xml: "http://www.w3.org/XML/1998/namespace"
1141
1045
  };
1046
+ var memo = (fn) => createMemo(() => fn());
1142
1047
  function reconcileArrays(parentNode, a, b) {
1143
1048
  let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null;
1144
1049
  while (aStart < aEnd || bStart < bEnd) {
@@ -1199,12 +1104,12 @@ function render(code, element, init, options = {}) {
1199
1104
  element.textContent = "";
1200
1105
  };
1201
1106
  }
1202
- function template(html, isImportNode, isSVG) {
1107
+ function template(html, isImportNode, isSVG, isMathML) {
1203
1108
  let node;
1204
1109
  const create = () => {
1205
- const t = document.createElement("template");
1110
+ const t = isMathML ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
1206
1111
  t.innerHTML = html;
1207
- return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
1112
+ return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;
1208
1113
  };
1209
1114
  const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
1210
1115
  fn.cloneNode = fn;
@@ -1291,9 +1196,7 @@ function style(node, value, prev) {
1291
1196
  function spread(node, props = {}, isSVG, skipChildren) {
1292
1197
  const prevProps = {};
1293
1198
  if (!skipChildren) {
1294
- createRenderEffect(
1295
- () => prevProps.children = insertExpression(node, props.children, prevProps.children)
1296
- );
1199
+ createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
1297
1200
  }
1298
1201
  createRenderEffect(() => typeof props.ref === "function" && use(props.ref, node));
1299
1202
  createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
@@ -1332,8 +1235,7 @@ function toPropertyName(name) {
1332
1235
  }
1333
1236
  function toggleClassKey(node, key, value) {
1334
1237
  const classNames = key.trim().split(/\s+/);
1335
- for (let i = 0, nameLen = classNames.length; i < nameLen; i++)
1336
- node.classList.toggle(classNames[i], value);
1238
+ for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
1337
1239
  }
1338
1240
  function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
1339
1241
  let isCE, isProp, isChildProp, propAlias, forceProp;
@@ -1525,11 +1427,7 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
1525
1427
  } else if (t === "function") {
1526
1428
  if (unwrap) {
1527
1429
  while (typeof item === "function") item = item();
1528
- dynamic = normalizeIncomingArray(
1529
- normalized,
1530
- Array.isArray(item) ? item : [item],
1531
- Array.isArray(prev) ? prev : [prev]
1532
- ) || dynamic;
1430
+ dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
1533
1431
  } else {
1534
1432
  normalized.push(item);
1535
1433
  dynamic = true;
@@ -1554,8 +1452,7 @@ function cleanChildren(parent, current, marker, replacement) {
1554
1452
  const el = current[i];
1555
1453
  if (node !== el) {
1556
1454
  const isParent = el.parentNode === parent;
1557
- if (!inserted && !i)
1558
- isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
1455
+ if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
1559
1456
  else isParent && el.remove();
1560
1457
  } else inserted = true;
1561
1458
  }
@@ -1569,50 +1466,48 @@ function createElement(tagName, isSVG = false) {
1569
1466
  return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName);
1570
1467
  }
1571
1468
  function Portal(props) {
1572
- const { useShadow } = props, marker = document.createTextNode(""), mount = () => props.mount || document.body, owner = getOwner();
1469
+ const {
1470
+ useShadow
1471
+ } = props, marker = document.createTextNode(""), mount = () => props.mount || document.body, owner = getOwner();
1573
1472
  let content;
1574
1473
  let hydrating = !!sharedConfig.context;
1575
- createEffect(
1576
- () => {
1577
- if (hydrating) getOwner().user = hydrating = false;
1578
- content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
1579
- const el = mount();
1580
- if (el instanceof HTMLHeadElement) {
1581
- const [clean2, setClean] = createSignal(false);
1582
- const cleanup = () => setClean(true);
1583
- createRoot((dispose2) => insert(el, () => !clean2() ? content() : dispose2(), null));
1584
- onCleanup(cleanup);
1585
- } else {
1586
- const container = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container.attachShadow ? container.attachShadow({
1587
- mode: "open"
1588
- }) : container;
1589
- Object.defineProperty(container, "_$host", {
1590
- get() {
1591
- return marker.parentNode;
1592
- },
1593
- configurable: true
1594
- });
1595
- insert(renderRoot, content);
1596
- el.appendChild(container);
1597
- props.ref && props.ref(container);
1598
- onCleanup(() => el.removeChild(container));
1599
- }
1600
- },
1601
- void 0,
1602
- {
1603
- render: !hydrating
1474
+ createEffect(() => {
1475
+ if (hydrating) getOwner().user = hydrating = false;
1476
+ content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
1477
+ const el = mount();
1478
+ if (el instanceof HTMLHeadElement) {
1479
+ const [clean2, setClean] = createSignal(false);
1480
+ const cleanup = () => setClean(true);
1481
+ createRoot((dispose2) => insert(el, () => !clean2() ? content() : dispose2(), null));
1482
+ onCleanup(cleanup);
1483
+ } else {
1484
+ const container = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container.attachShadow ? container.attachShadow({
1485
+ mode: "open"
1486
+ }) : container;
1487
+ Object.defineProperty(container, "_$host", {
1488
+ get() {
1489
+ return marker.parentNode;
1490
+ },
1491
+ configurable: true
1492
+ });
1493
+ insert(renderRoot, content);
1494
+ el.appendChild(container);
1495
+ props.ref && props.ref(container);
1496
+ onCleanup(() => el.removeChild(container));
1604
1497
  }
1605
- );
1498
+ }, void 0, {
1499
+ render: !hydrating
1500
+ });
1606
1501
  return marker;
1607
1502
  }
1608
1503
 
1609
- // ../../node_modules/.pnpm/nanostores@0.11.3/node_modules/nanostores/task/index.js
1504
+ // ../../node_modules/.pnpm/nanostores@0.11.4/node_modules/nanostores/task/index.js
1610
1505
  var tasks = 0;
1611
1506
  function cleanTasks() {
1612
1507
  tasks = 0;
1613
1508
  }
1614
1509
 
1615
- // ../../node_modules/.pnpm/nanostores@0.11.3/node_modules/nanostores/clean-stores/index.js
1510
+ // ../../node_modules/.pnpm/nanostores@0.11.4/node_modules/nanostores/clean-stores/index.js
1616
1511
  var clean = Symbol("clean");
1617
1512
  var cleanStores = (...stores) => {
1618
1513
  if (false) {
@@ -1629,7 +1524,7 @@ var cleanStores = (...stores) => {
1629
1524
  }
1630
1525
  };
1631
1526
 
1632
- // ../../node_modules/.pnpm/nanostores@0.11.3/node_modules/nanostores/atom/index.js
1527
+ // ../../node_modules/.pnpm/nanostores@0.11.4/node_modules/nanostores/atom/index.js
1633
1528
  var listenerQueue = [];
1634
1529
  var lqIndex = 0;
1635
1530
  var QUEUE_ITEMS_PER_LISTENER = 4;
@@ -1712,7 +1607,7 @@ var atom = (initialValue) => {
1712
1607
  return $atom;
1713
1608
  };
1714
1609
 
1715
- // ../../node_modules/.pnpm/nanostores@0.11.3/node_modules/nanostores/lifecycle/index.js
1610
+ // ../../node_modules/.pnpm/nanostores@0.11.4/node_modules/nanostores/lifecycle/index.js
1716
1611
  var MOUNT = 5;
1717
1612
  var UNMOUNT = 6;
1718
1613
  var REVERT_MUTATION = 10;
@@ -1782,7 +1677,7 @@ var onMount2 = ($store, initialize) => {
1782
1677
  });
1783
1678
  };
1784
1679
 
1785
- // ../../node_modules/.pnpm/nanostores@0.11.3/node_modules/nanostores/deep-map/path.js
1680
+ // ../../node_modules/.pnpm/nanostores@0.11.4/node_modules/nanostores/deep-map/path.js
1786
1681
  function getPath(obj, path) {
1787
1682
  let allKeys = getAllKeysFromPath(path);
1788
1683
  let res = obj;
@@ -1840,7 +1735,7 @@ function ensureKey(obj, key, nextKey) {
1840
1735
  }
1841
1736
  }
1842
1737
 
1843
- // ../../node_modules/.pnpm/nanostores@0.11.3/node_modules/nanostores/deep-map/index.js
1738
+ // ../../node_modules/.pnpm/nanostores@0.11.4/node_modules/nanostores/deep-map/index.js
1844
1739
  function deepMap(initial = {}) {
1845
1740
  let $deepMap = atom(initial);
1846
1741
  $deepMap.setKey = (key, value) => {
@@ -1853,7 +1748,7 @@ function deepMap(initial = {}) {
1853
1748
  return $deepMap;
1854
1749
  }
1855
1750
 
1856
- // ../../node_modules/.pnpm/yocto-queue@1.1.1/node_modules/yocto-queue/index.js
1751
+ // ../../node_modules/.pnpm/yocto-queue@1.2.1/node_modules/yocto-queue/index.js
1857
1752
  var Node = class {
1858
1753
  value;
1859
1754
  next;
@@ -1909,6 +1804,11 @@ var Queue = class {
1909
1804
  current = current.next;
1910
1805
  }
1911
1806
  }
1807
+ *drain() {
1808
+ while (this.#head) {
1809
+ yield this.dequeue();
1810
+ }
1811
+ }
1912
1812
  };
1913
1813
 
1914
1814
  // ../../node_modules/.pnpm/p-limit@6.2.0/node_modules/p-limit/index.js
@@ -1984,7 +1884,7 @@ function validateConcurrency(concurrency) {
1984
1884
  }
1985
1885
  }
1986
1886
 
1987
- // ../../node_modules/.pnpm/simple-web-audio@0.9.0_postcss@8.5.3/node_modules/simple-web-audio/dist/index.mjs
1887
+ // ../../node_modules/.pnpm/simple-web-audio@0.9.0_postcss@8.5.6/node_modules/simple-web-audio/dist/index.mjs
1988
1888
  var waitForInteraction = (() => {
1989
1889
  const { promise, resolve } = Promise.withResolvers();
1990
1890
  const onUserInteraction = () => {
@@ -2735,8 +2635,7 @@ var handleClearAction = ($rendererState, $contextState, options, context, keep,
2735
2635
  if (!keep.has("text")) {
2736
2636
  $contextState.mutate((s) => s.text, { content: "" });
2737
2637
  }
2738
- const { characters, custom } = $contextState.get();
2739
- for (const character of Object.keys(characters)) {
2638
+ for (const character of Object.keys($contextState.get().characters)) {
2740
2639
  if (!keepCharacters.has(character)) {
2741
2640
  $contextState.mutate((s) => s.characters[character], {
2742
2641
  style: void 0,
@@ -2744,19 +2643,12 @@ var handleClearAction = ($rendererState, $contextState, options, context, keep,
2744
2643
  });
2745
2644
  }
2746
2645
  }
2747
- for (const [id, obj] of Object.entries(custom)) {
2748
- if (!obj) continue;
2749
- if (context.meta.goingBack && obj.fn.skipClearOnGoingBack) continue;
2750
- options.clearCustomAction(context, obj.fn);
2751
- $contextState.mutate((s) => s.custom[id], void 0);
2752
- }
2753
2646
  };
2754
2647
  var handleCustomAction = ($contextState, fn) => {
2755
2648
  if (!$contextState.get().custom[fn.key]) {
2756
2649
  $contextState.mutate((s) => s.custom[fn.key], {
2757
2650
  fn,
2758
- node: null,
2759
- clear: noop
2651
+ node: null
2760
2652
  });
2761
2653
  }
2762
2654
  return {
@@ -2771,17 +2663,6 @@ var handleCustomAction = ($contextState, fn) => {
2771
2663
  }
2772
2664
  );
2773
2665
  },
2774
- setClear(clear) {
2775
- $contextState.mutate(
2776
- (s) => s.custom[fn.key],
2777
- (state) => {
2778
- return {
2779
- ...state,
2780
- clear
2781
- };
2782
- }
2783
- );
2784
- },
2785
2666
  remove() {
2786
2667
  $contextState.mutate((s) => s.custom[fn.key], void 0);
2787
2668
  }
@@ -3187,13 +3068,13 @@ var ControlPanelButtons = (props) => {
3187
3068
  createRenderEffect(() => setAttribute(_el$7, "title", data.t(props.auto() ? "Stop" : "Auto")));
3188
3069
  return _el$7;
3189
3070
  })(), (() => {
3190
- var _el$9 = _tmpl$3(), _el$10 = _el$9.firstChild;
3071
+ var _el$9 = _tmpl$3(), _el$0 = _el$9.firstChild;
3191
3072
  _el$9.$$click = () => {
3192
3073
  data.options.save("auto");
3193
3074
  data.options.exit(true);
3194
3075
  props.openSettings();
3195
3076
  };
3196
- insert(_el$10, () => data.t("Settings"));
3077
+ insert(_el$0, () => data.t("Settings"));
3197
3078
  insert(_el$9, createComponent(Icon, {
3198
3079
  "class": "control-panel__button__icon",
3199
3080
  icon: "#novely-settings-icon"
@@ -3201,31 +3082,31 @@ var ControlPanelButtons = (props) => {
3201
3082
  createRenderEffect(() => setAttribute(_el$9, "title", data.t("Settings")));
3202
3083
  return _el$9;
3203
3084
  })(), (() => {
3204
- var _el$11 = _tmpl$3(), _el$12 = _el$11.firstChild;
3205
- _el$11.$$click = () => {
3085
+ var _el$1 = _tmpl$3(), _el$10 = _el$1.firstChild;
3086
+ _el$1.$$click = () => {
3206
3087
  data.options.exit();
3207
3088
  };
3208
- insert(_el$12, () => data.t("Exit"));
3209
- insert(_el$11, createComponent(Icon, {
3089
+ insert(_el$10, () => data.t("Exit"));
3090
+ insert(_el$1, createComponent(Icon, {
3210
3091
  "class": "control-panel__button__icon",
3211
3092
  icon: "#novely-x-icon"
3212
3093
  }), null);
3213
- createRenderEffect(() => setAttribute(_el$11, "title", data.t("Exit")));
3214
- return _el$11;
3094
+ createRenderEffect(() => setAttribute(_el$1, "title", data.t("Exit")));
3095
+ return _el$1;
3215
3096
  })(), createComponent(Show, {
3216
3097
  get when() {
3217
3098
  return data.media.hyperWide();
3218
3099
  },
3219
3100
  get children() {
3220
- var _el$13 = _tmpl$4();
3221
- _el$13.$$click = () => {
3101
+ var _el$11 = _tmpl$4();
3102
+ _el$11.$$click = () => {
3222
3103
  props.closeDropdown();
3223
3104
  };
3224
- insert(_el$13, createComponent(Icon, {
3105
+ insert(_el$11, createComponent(Icon, {
3225
3106
  icon: "#novely-x-icon"
3226
3107
  }));
3227
- createRenderEffect(() => setAttribute(_el$13, "title", data.t("CloseMenu")));
3228
- return _el$13;
3108
+ createRenderEffect(() => setAttribute(_el$11, "title", data.t("CloseMenu")));
3109
+ return _el$11;
3229
3110
  }
3230
3111
  })];
3231
3112
  };
@@ -3246,7 +3127,7 @@ var DialogName = (props) => {
3246
3127
  get when() {
3247
3128
  return props.mood;
3248
3129
  },
3249
- children: (mood) => [" ", _tmpl$23(), " ", createMemo(mood)]
3130
+ children: (mood) => [" ", _tmpl$23(), " ", memo(mood)]
3250
3131
  }), null);
3251
3132
  createRenderEffect((_p$) => {
3252
3133
  var _v$ = color(), _v$2 = props.character ? 1 : 0, _v$3 = props.character ? "visible" : "hidden";
@@ -3319,7 +3200,7 @@ var Modal = (props) => {
3319
3200
  })();
3320
3201
  };
3321
3202
 
3322
- // ../../node_modules/.pnpm/@solid-primitives+transition-group@1.1.0_solid-js@1.9.4/node_modules/@solid-primitives/transition-group/dist/index.js
3203
+ // ../../node_modules/.pnpm/@solid-primitives+transition-group@1.1.1_solid-js@1.9.7/node_modules/@solid-primitives/transition-group/dist/index.js
3323
3204
  var noop2 = () => {
3324
3205
  };
3325
3206
  var noopTransition = (el, done) => done();
@@ -3385,10 +3266,10 @@ function createSwitchTransition(source, options) {
3385
3266
  return returned;
3386
3267
  }
3387
3268
 
3388
- // ../../node_modules/.pnpm/@solid-primitives+utils@6.3.0_solid-js@1.9.4/node_modules/@solid-primitives/utils/dist/index.js
3269
+ // ../../node_modules/.pnpm/@solid-primitives+utils@6.3.1_solid-js@1.9.7/node_modules/@solid-primitives/utils/dist/index.js
3389
3270
  var access = (v) => typeof v === "function" && !v.length ? v() : v;
3390
3271
 
3391
- // ../../node_modules/.pnpm/@solid-primitives+refs@1.1.0_solid-js@1.9.4/node_modules/@solid-primitives/refs/dist/index.js
3272
+ // ../../node_modules/.pnpm/@solid-primitives+refs@1.1.1_solid-js@1.9.7/node_modules/@solid-primitives/refs/dist/index.js
3392
3273
  var defaultElementPredicate = isServer ? (item) => item != null && typeof item === "object" && "t" in item : (item) => item instanceof Element;
3393
3274
  function getFirstChild(value, predicate) {
3394
3275
  if (predicate(value))
@@ -3409,7 +3290,7 @@ function resolveFirst(fn, predicate = defaultElementPredicate, serverPredicate =
3409
3290
  return createMemo(() => getFirstChild(children2(), isServer ? serverPredicate : predicate));
3410
3291
  }
3411
3292
 
3412
- // ../../node_modules/.pnpm/solid-transition-group@0.2.3_solid-js@1.9.4/node_modules/solid-transition-group/dist/index.js
3293
+ // ../../node_modules/.pnpm/solid-transition-group@0.3.0_solid-js@1.9.7/node_modules/solid-transition-group/dist/index.js
3413
3294
  function createClassnames(props) {
3414
3295
  return createMemo(() => {
3415
3296
  const name = props.name || "s";
@@ -3489,19 +3370,16 @@ var TRANSITION_MODE_MAP = {
3489
3370
  };
3490
3371
  var Transition2 = (props) => {
3491
3372
  const classnames = createClassnames(props);
3492
- return createSwitchTransition(
3493
- resolveFirst(() => props.children),
3494
- {
3495
- mode: TRANSITION_MODE_MAP[props.mode],
3496
- appear: props.appear,
3497
- onEnter(el, done) {
3498
- enterTransition(classnames(), props, el, done);
3499
- },
3500
- onExit(el, done) {
3501
- exitTransition(classnames(), props, el, done);
3502
- }
3373
+ return createSwitchTransition(resolveFirst(() => props.children), {
3374
+ mode: TRANSITION_MODE_MAP[props.mode],
3375
+ appear: props.appear,
3376
+ onEnter(el, done) {
3377
+ enterTransition(classnames(), props, el, done);
3378
+ },
3379
+ onExit(el, done) {
3380
+ exitTransition(classnames(), props, el, done);
3503
3381
  }
3504
- );
3382
+ });
3505
3383
  };
3506
3384
 
3507
3385
  // src/context-state.ts
@@ -3515,7 +3393,7 @@ var { useContextState, removeContextState } = createContextStateRoot(() => {
3515
3393
 
3516
3394
  // src/components/Save.tsx
3517
3395
  var _tmpl$7 = /* @__PURE__ */ template(`<div class=saves__list-item__overlay>`);
3518
- var _tmpl$24 = /* @__PURE__ */ template(`<iframe tabindex=-1 class=saves__list-item__iframe src=about:blank>`, true, false);
3396
+ var _tmpl$24 = /* @__PURE__ */ template(`<iframe tabindex=-1 class=saves__list-item__iframe src=about:blank>`, true, false, false);
3519
3397
  var _tmpl$33 = /* @__PURE__ */ template(`<li class=saves__list-item><div class=saves__list-item__load role=button tabindex=0></div><div class=saves__list-item__description><div></div><div></div></div><button type=reset class="button saves__button-reset"><span>`);
3520
3398
  var _tmpl$42 = /* @__PURE__ */ template(`<div class=saves__list-item__iframe>`);
3521
3399
  var CURRENT_DATE = /* @__PURE__ */ new Date();
@@ -3559,7 +3437,19 @@ var Save = (props) => {
3559
3437
  minute: "numeric"
3560
3438
  }));
3561
3439
  const stringType = t(type === "auto" ? "Automatic" : "Manual");
3440
+ const cleanup = once(() => {
3441
+ try {
3442
+ options.clearCustomActionsAtContext(context);
3443
+ removeContextState(KEY);
3444
+ removeContext(KEY);
3445
+ options.removeContext(KEY);
3446
+ removeShared(KEY);
3447
+ } catch (error) {
3448
+ console.error(error);
3449
+ }
3450
+ });
3562
3451
  const loadSave = () => {
3452
+ cleanup();
3563
3453
  options.set(props.save);
3564
3454
  };
3565
3455
  const removeSave = (date2) => {
@@ -3605,20 +3495,7 @@ var Save = (props) => {
3605
3495
  previewDone();
3606
3496
  }
3607
3497
  });
3608
- onCleanup(() => {
3609
- const state = useContextState(KEY);
3610
- for (const custom of Object.values(state.get().custom)) {
3611
- if (!custom) continue;
3612
- try {
3613
- options.clearCustomAction(context, custom.fn);
3614
- } catch {
3615
- }
3616
- }
3617
- removeContextState(KEY);
3618
- removeContext(KEY);
3619
- options.removeContext(KEY);
3620
- removeShared(KEY);
3621
- });
3498
+ onCleanup(cleanup);
3622
3499
  onCleanup(() => {
3623
3500
  clearTimeout(previewDoneTimeoutId);
3624
3501
  });
@@ -4115,15 +3992,15 @@ var DialogOverview = (props) => {
4115
3992
  return entries();
4116
3993
  },
4117
3994
  children: (entry) => (() => {
4118
- var _el$6 = _tmpl$43(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$7.nextSibling, _el$11 = _el$9.nextSibling, _el$12 = _el$11.firstChild;
3995
+ var _el$6 = _tmpl$43(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$7.nextSibling, _el$1 = _el$9.nextSibling, _el$10 = _el$1.firstChild;
4119
3996
  insert(_el$8, () => removeTagsFromHTML(entry.name));
4120
3997
  insert(_el$9, createComponent(Show, {
4121
3998
  get when() {
4122
3999
  return entry.voice;
4123
4000
  },
4124
4001
  get children() {
4125
- var _el$10 = _tmpl$34();
4126
- _el$10.$$click = async () => {
4002
+ var _el$0 = _tmpl$34();
4003
+ _el$0.$$click = async () => {
4127
4004
  if (!entry.voice) return;
4128
4005
  const voice = props.audio.getAudio("voice", entry.voice);
4129
4006
  const source = currentlyPlayingSource();
@@ -4149,15 +4026,15 @@ var DialogOverview = (props) => {
4149
4026
  });
4150
4027
  }
4151
4028
  };
4152
- insert(_el$10, createComponent(Icon, {
4029
+ insert(_el$0, createComponent(Icon, {
4153
4030
  get icon() {
4154
4031
  return currentlyPlayingSource() === entry.voice ? "#novely-stop-icon" : "#novely-play-icon";
4155
4032
  }
4156
4033
  }));
4157
- return _el$10;
4034
+ return _el$0;
4158
4035
  }
4159
4036
  }));
4160
- insert(_el$12, () => removeTagsFromHTML(entry.text));
4037
+ insert(_el$10, () => removeTagsFromHTML(entry.text));
4161
4038
  return _el$6;
4162
4039
  })()
4163
4040
  })
@@ -4185,7 +4062,7 @@ var Await = (props) => {
4185
4062
  });
4186
4063
  };
4187
4064
 
4188
- // ../../node_modules/.pnpm/@solid-primitives+destructure@0.2.0_solid-js@1.9.4/node_modules/@solid-primitives/destructure/dist/index.js
4065
+ // ../../node_modules/.pnpm/@solid-primitives+destructure@0.2.1_solid-js@1.9.7/node_modules/@solid-primitives/destructure/dist/index.js
4189
4066
  var isReactiveObject = (value) => typeof value === "object" && value !== null;
4190
4067
  function createProxyCache(obj, get) {
4191
4068
  return new Proxy({}, {
@@ -4204,7 +4081,7 @@ function createProxyCache(obj, get) {
4204
4081
  }
4205
4082
  function destructure(source, options) {
4206
4083
  const config = options ?? {};
4207
- const memo = config.memo ?? typeof source === "function";
4084
+ const memo2 = config.memo ?? typeof source === "function";
4208
4085
  const getter = typeof source === "function" ? (key) => () => source()[key] : (key) => () => source[key];
4209
4086
  const obj = access(source);
4210
4087
  if (config.lazy) {
@@ -4212,17 +4089,17 @@ function destructure(source, options) {
4212
4089
  return createProxyCache(obj, (key) => {
4213
4090
  const calc = getter(key);
4214
4091
  if (config.deep && isReactiveObject(obj[key]))
4215
- return runWithOwner(owner, () => destructure(calc, { ...config, memo }));
4216
- return memo ? runWithOwner(owner, () => createMemo(calc, void 0, options)) : calc;
4092
+ return runWithOwner(owner, () => destructure(calc, { ...config, memo: memo2 }));
4093
+ return memo2 ? runWithOwner(owner, () => createMemo(calc, void 0, options)) : calc;
4217
4094
  });
4218
4095
  }
4219
4096
  const result = Array.isArray(obj) ? [] : {};
4220
4097
  for (const [key, value] of Object.entries(obj)) {
4221
4098
  const calc = getter(key);
4222
4099
  if (config.deep && isReactiveObject(value))
4223
- result[key] = destructure(calc, { ...config, memo });
4100
+ result[key] = destructure(calc, { ...config, memo: memo2 });
4224
4101
  else
4225
- result[key] = memo ? createMemo(calc, void 0, options) : calc;
4102
+ result[key] = memo2 ? createMemo(calc, void 0, options) : calc;
4226
4103
  }
4227
4104
  return result;
4228
4105
  }
@@ -4237,12 +4114,12 @@ var _tmpl$62 = /* @__PURE__ */ template(`<button type=submit class="button dialo
4237
4114
  var _tmpl$72 = /* @__PURE__ */ template(`<div class=exit-dialog-buttons><button type=button class=button></button><button type=button class=button>`);
4238
4115
  var _tmpl$82 = /* @__PURE__ */ template(`<button type=button class="button control-panel__button">`);
4239
4116
  var _tmpl$92 = /* @__PURE__ */ template(`<span class=control-panel-container-fix aria-hidden=true>&#8203;`);
4240
- var _tmpl$102 = /* @__PURE__ */ template(`<div class=control-panel-container-backdrop>`);
4241
- var _tmpl$112 = /* @__PURE__ */ template(`<div class=control-panel><div role=menubar class=control-panel-container>`);
4242
- var _tmpl$122 = /* @__PURE__ */ template(`<div class="loading overlay game"><div class=loading__animation><div></div><div></div><div></div><div>`);
4243
- var _tmpl$132 = /* @__PURE__ */ template(`<div><div class=background></div><div class=characters></div><div class=action-dialog><div class=action-dialog-container role=button tabindex=0><div class=action-dialog-content></div></div></div><div></div><div class=action-text role=button tabindex=0></div><div class=action-image>`);
4244
- var _tmpl$14 = /* @__PURE__ */ template(`<button type=button class="button choice-dialog__choice"><span>`);
4245
- var _tmpl$15 = /* @__PURE__ */ template(`<div class=action-image__image-container>`);
4117
+ var _tmpl$0 = /* @__PURE__ */ template(`<div class=control-panel-container-backdrop>`);
4118
+ var _tmpl$1 = /* @__PURE__ */ template(`<div class=control-panel><div role=menubar class=control-panel-container>`);
4119
+ var _tmpl$102 = /* @__PURE__ */ template(`<div class="loading overlay game"><div class=loading__animation><div></div><div></div><div></div><div>`);
4120
+ var _tmpl$112 = /* @__PURE__ */ template(`<div><div class=background></div><div class=characters></div><div class=action-dialog><div class=action-dialog-container role=button tabindex=0><div class=action-dialog-content></div></div></div><div></div><div class=action-text role=button tabindex=0></div><div class=action-image>`);
4121
+ var _tmpl$122 = /* @__PURE__ */ template(`<button type=button class="button choice-dialog__choice"><span>`);
4122
+ var _tmpl$132 = /* @__PURE__ */ template(`<div class=action-image__image-container>`);
4246
4123
  var Game = (props) => {
4247
4124
  const data = useData();
4248
4125
  const {
@@ -4342,7 +4219,7 @@ var Game = (props) => {
4342
4219
  }
4343
4220
  });
4344
4221
  return (() => {
4345
- var _el$ = _tmpl$132(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$7 = _el$5.firstChild, _el$17 = _el$4.nextSibling, _el$18 = _el$17.nextSibling, _el$24 = _el$18.nextSibling;
4222
+ var _el$ = _tmpl$112(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$7 = _el$5.firstChild, _el$15 = _el$4.nextSibling, _el$16 = _el$15.nextSibling, _el$22 = _el$16.nextSibling;
4346
4223
  setAttribute(_el$3, "data-characters", true);
4347
4224
  insert(_el$3, createComponent(For, {
4348
4225
  get each() {
@@ -4446,14 +4323,14 @@ var Game = (props) => {
4446
4323
  return visible();
4447
4324
  },
4448
4325
  get children() {
4449
- var _el$26 = _tmpl$14(), _el$27 = _el$26.firstChild;
4450
- _el$26.$$click = () => {
4326
+ var _el$24 = _tmpl$122(), _el$25 = _el$24.firstChild;
4327
+ _el$24.$$click = () => {
4451
4328
  onSelect();
4452
4329
  if (disabled()) return;
4453
4330
  choice().resolve?.(index);
4454
4331
  };
4455
- insert(_el$27, text2);
4456
- insert(_el$26, createComponent(Show, {
4332
+ insert(_el$25, text2);
4333
+ insert(_el$24, createComponent(Show, {
4457
4334
  when: image !== "",
4458
4335
  get children() {
4459
4336
  return createComponent(Canvas, {
@@ -4468,8 +4345,8 @@ var Game = (props) => {
4468
4345
  });
4469
4346
  }
4470
4347
  }), null);
4471
- createRenderEffect(() => setAttribute(_el$26, "aria-disabled", disabled()));
4472
- return _el$26;
4348
+ createRenderEffect(() => setAttribute(_el$24, "aria-disabled", disabled()));
4349
+ return _el$24;
4473
4350
  }
4474
4351
  });
4475
4352
  }
@@ -4477,7 +4354,7 @@ var Game = (props) => {
4477
4354
  return _el$9;
4478
4355
  })()];
4479
4356
  }
4480
- }), _el$17);
4357
+ }), _el$15);
4481
4358
  insert(_el$, createComponent(Modal, {
4482
4359
  "class": "input-dialog",
4483
4360
  isModal: false,
@@ -4488,22 +4365,22 @@ var Game = (props) => {
4488
4365
  trapFocus: () => !props.isPreview && !exitPromptShown(),
4489
4366
  get children() {
4490
4367
  return [(() => {
4491
- var _el$10 = _tmpl$44();
4492
- insert(_el$10, () => input().label);
4493
- return _el$10;
4494
- })(), createMemo(() => input().element), (() => {
4495
- var _el$11 = _tmpl$52();
4496
- insert(_el$11, () => input().error);
4497
- return _el$11;
4368
+ var _el$0 = _tmpl$44();
4369
+ insert(_el$0, () => input().label);
4370
+ return _el$0;
4371
+ })(), memo(() => input().element), (() => {
4372
+ var _el$1 = _tmpl$52();
4373
+ insert(_el$1, () => input().error);
4374
+ return _el$1;
4498
4375
  })(), (() => {
4499
- var _el$12 = _tmpl$62();
4500
- _el$12.$$click = onInputButtonClick;
4501
- insert(_el$12, () => data.t("Sumbit"));
4502
- createRenderEffect(() => setAttribute(_el$12, "aria-disabled", Boolean(input().error)));
4503
- return _el$12;
4376
+ var _el$10 = _tmpl$62();
4377
+ _el$10.$$click = onInputButtonClick;
4378
+ insert(_el$10, () => data.t("Sumbit"));
4379
+ createRenderEffect(() => setAttribute(_el$10, "aria-disabled", Boolean(input().error)));
4380
+ return _el$10;
4504
4381
  })()];
4505
4382
  }
4506
- }), _el$17);
4383
+ }), _el$15);
4507
4384
  insert(_el$, createComponent(Modal, {
4508
4385
  "class": "exit-dialog",
4509
4386
  isModal: true,
@@ -4511,34 +4388,34 @@ var Game = (props) => {
4511
4388
  trapFocus: () => !props.isPreview && exitPromptShown(),
4512
4389
  get children() {
4513
4390
  return [(() => {
4514
- var _el$13 = _tmpl$26();
4515
- insert(_el$13, () => data.t("ExitDialogWarning"));
4516
- return _el$13;
4391
+ var _el$11 = _tmpl$26();
4392
+ insert(_el$11, () => data.t("ExitDialogWarning"));
4393
+ return _el$11;
4517
4394
  })(), (() => {
4518
- var _el$14 = _tmpl$72(), _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling;
4519
- _el$15.$$click = () => {
4395
+ var _el$12 = _tmpl$72(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
4396
+ _el$13.$$click = () => {
4520
4397
  data.$rendererState.setKey("exitPromptShown", false);
4521
4398
  };
4522
- insert(_el$15, () => data.t("ExitDialogBack"));
4523
- _el$16.$$click = () => {
4399
+ insert(_el$13, () => data.t("ExitDialogBack"));
4400
+ _el$14.$$click = () => {
4524
4401
  data.options.exit(true);
4525
4402
  };
4526
- insert(_el$16, () => data.t("ExitDialogExit"));
4527
- return _el$14;
4403
+ insert(_el$14, () => data.t("ExitDialogExit"));
4404
+ return _el$12;
4528
4405
  })()];
4529
4406
  }
4530
- }), _el$17);
4531
- setAttribute(_el$17, "data-custom", true);
4532
- insert(_el$17, createComponent(For, {
4407
+ }), _el$15);
4408
+ setAttribute(_el$15, "data-custom", true);
4409
+ insert(_el$15, createComponent(For, {
4533
4410
  get each() {
4534
4411
  return customs();
4535
4412
  },
4536
4413
  children: (value) => value.node
4537
4414
  }));
4538
- addEventListener2(_el$18, "keydown", onKey(TextWriter.click, " "), true);
4539
- addEventListener2(_el$18, "keypress", onKey(TextWriter.click, "Enter"));
4540
- addEventListener2(_el$18, "click", TextWriter.click, true);
4541
- insert(_el$18, createComponent(TextWriter.Typewriter, {
4415
+ addEventListener2(_el$16, "keydown", onKey(TextWriter.click, " "), true);
4416
+ addEventListener2(_el$16, "keypress", onKey(TextWriter.click, "Enter"));
4417
+ addEventListener2(_el$16, "click", TextWriter.click, true);
4418
+ insert(_el$16, createComponent(TextWriter.Typewriter, {
4542
4419
  get content() {
4543
4420
  return text().content;
4544
4421
  }
@@ -4548,8 +4425,8 @@ var Game = (props) => {
4548
4425
  return !props.isPreview;
4549
4426
  },
4550
4427
  get children() {
4551
- var _el$19 = _tmpl$112(), _el$23 = _el$19.firstChild;
4552
- insert(_el$19, createComponent(Show, {
4428
+ var _el$17 = _tmpl$1(), _el$21 = _el$17.firstChild;
4429
+ insert(_el$17, createComponent(Show, {
4553
4430
  get when() {
4554
4431
  return data.media.hyperWide();
4555
4432
  },
@@ -4559,46 +4436,46 @@ var Game = (props) => {
4559
4436
  return !controlPanelMenuExpanded();
4560
4437
  },
4561
4438
  get children() {
4562
- var _el$20 = _tmpl$82();
4563
- _el$20.$$click = () => {
4439
+ var _el$18 = _tmpl$82();
4440
+ _el$18.$$click = () => {
4564
4441
  setControlPanelMenuExpanded((prev) => !prev);
4565
4442
  };
4566
- setAttribute(_el$20, "aria-controls", controlPanelMenuID);
4567
- insert(_el$20, createComponent(Icon, {
4443
+ setAttribute(_el$18, "aria-controls", controlPanelMenuID);
4444
+ insert(_el$18, createComponent(Icon, {
4568
4445
  icon: "#novely-list-icon"
4569
4446
  }));
4570
4447
  createRenderEffect((_p$) => {
4571
4448
  var _v$3 = data.t("OpenMenu"), _v$4 = controlPanelMenuExpanded();
4572
- _v$3 !== _p$.e && setAttribute(_el$20, "title", _p$.e = _v$3);
4573
- _v$4 !== _p$.t && setAttribute(_el$20, "aria-expanded", _p$.t = _v$4);
4449
+ _v$3 !== _p$.e && setAttribute(_el$18, "title", _p$.e = _v$3);
4450
+ _v$4 !== _p$.t && setAttribute(_el$18, "aria-expanded", _p$.t = _v$4);
4574
4451
  return _p$;
4575
4452
  }, {
4576
4453
  e: void 0,
4577
4454
  t: void 0
4578
4455
  });
4579
- return _el$20;
4456
+ return _el$18;
4580
4457
  }
4581
4458
  });
4582
4459
  }
4583
- }), _el$23);
4584
- insert(_el$19, createComponent(Show, {
4460
+ }), _el$21);
4461
+ insert(_el$17, createComponent(Show, {
4585
4462
  get when() {
4586
- return createMemo(() => !!(data.media.hyperWide() && controlPanelMenuExpanded()))() && !exitPromptShown();
4463
+ return memo(() => !!(data.media.hyperWide() && controlPanelMenuExpanded()))() && !exitPromptShown();
4587
4464
  },
4588
4465
  get children() {
4589
- return [_tmpl$92(), _tmpl$102()];
4466
+ return [_tmpl$92(), _tmpl$0()];
4590
4467
  }
4591
- }), _el$23);
4468
+ }), _el$21);
4592
4469
  use((element) => {
4593
4470
  clickOutside(element, () => {
4594
4471
  if (untrack(data.media.hyperWide) && untrack(controlPanelMenuExpanded)) {
4595
4472
  setControlPanelMenuExpanded(false);
4596
4473
  }
4597
4474
  });
4598
- }, _el$23);
4599
- setAttribute(_el$23, "id", controlPanelMenuID);
4600
- _el$23.classList.toggle("control-panel-container--center", !!(controls === "inside"));
4601
- insert(_el$23, createComponent(ControlPanelButtons, {
4475
+ }, _el$21);
4476
+ setAttribute(_el$21, "id", controlPanelMenuID);
4477
+ _el$21.classList.toggle("control-panel-container--center", !!(controls === "inside"));
4478
+ insert(_el$21, createComponent(ControlPanelButtons, {
4602
4479
  openSettings: () => {
4603
4480
  data.$rendererState.setKey("screen", "settings");
4604
4481
  },
@@ -4613,17 +4490,17 @@ var Game = (props) => {
4613
4490
  }));
4614
4491
  createRenderEffect((_p$) => {
4615
4492
  var _v$5 = !!(data.media.hyperWide() && !controlPanelMenuExpanded()), _v$6 = !!(data.media.hyperWide() && controlPanelMenuExpanded());
4616
- _v$5 !== _p$.e && _el$23.classList.toggle("control-panel-container--wide-closed", _p$.e = _v$5);
4617
- _v$6 !== _p$.t && _el$23.classList.toggle("control-panel-container--wide-open", _p$.t = _v$6);
4493
+ _v$5 !== _p$.e && _el$21.classList.toggle("control-panel-container--wide-closed", _p$.e = _v$5);
4494
+ _v$6 !== _p$.t && _el$21.classList.toggle("control-panel-container--wide-open", _p$.t = _v$6);
4618
4495
  return _p$;
4619
4496
  }, {
4620
4497
  e: void 0,
4621
4498
  t: void 0
4622
4499
  });
4623
- return _el$19;
4500
+ return _el$17;
4624
4501
  }
4625
- }), _el$24);
4626
- insert(_el$24, createComponent(Index, {
4502
+ }), _el$22);
4503
+ insert(_el$22, createComponent(Index, {
4627
4504
  get each() {
4628
4505
  return images();
4629
4506
  },
@@ -4662,9 +4539,9 @@ var Game = (props) => {
4662
4539
  return image().visible;
4663
4540
  },
4664
4541
  get children() {
4665
- var _el$28 = _tmpl$15();
4666
- insert(_el$28, () => image().image);
4667
- return _el$28;
4542
+ var _el$26 = _tmpl$132();
4543
+ insert(_el$26, () => image().image);
4544
+ return _el$26;
4668
4545
  }
4669
4546
  });
4670
4547
  }
@@ -4683,23 +4560,23 @@ var Game = (props) => {
4683
4560
  return loading();
4684
4561
  },
4685
4562
  get children() {
4686
- return _tmpl$122();
4563
+ return _tmpl$102();
4687
4564
  }
4688
4565
  }), null);
4689
4566
  createRenderEffect((_p$) => {
4690
- var _v$7 = `${props.className || ""} game`, _v$8 = !!props.isPreview, _v$9 = bg().startsWith("url") ? void 0 : bg(), _v$10 = bg().startsWith("url") ? bg() : void 0, _v$11 = charactersCount(), _v$12 = !!dialog().visible, _v$13 = !dialog().visible, _v$14 = !(dialog().miniature.character && dialog().miniature.emotion), _v$15 = !dialog().content, _v$16 = !!props.isPreview, _v$17 = !!Boolean(text().content), _v$18 = !text().content;
4567
+ var _v$7 = `${props.className || ""} game`, _v$8 = !!props.isPreview, _v$9 = bg().startsWith("url") ? void 0 : bg(), _v$0 = bg().startsWith("url") ? bg() : void 0, _v$1 = charactersCount(), _v$10 = !!dialog().visible, _v$11 = !dialog().visible, _v$12 = !(dialog().miniature.character && dialog().miniature.emotion), _v$13 = !dialog().content, _v$14 = !!props.isPreview, _v$15 = !!Boolean(text().content), _v$16 = !text().content;
4691
4568
  _v$7 !== _p$.e && className(_el$, _p$.e = _v$7);
4692
4569
  _v$8 !== _p$.t && _el$.classList.toggle("preview", _p$.t = _v$8);
4693
4570
  _v$9 !== _p$.a && ((_p$.a = _v$9) != null ? _el$2.style.setProperty("background-color", _v$9) : _el$2.style.removeProperty("background-color"));
4694
- _v$10 !== _p$.o && ((_p$.o = _v$10) != null ? _el$2.style.setProperty("background-image", _v$10) : _el$2.style.removeProperty("background-image"));
4695
- _v$11 !== _p$.i && ((_p$.i = _v$11) != null ? _el$3.style.setProperty("--shown-characters-count", _v$11) : _el$3.style.removeProperty("--shown-characters-count"));
4696
- _v$12 !== _p$.n && _el$4.classList.toggle("action-dialog--visible", _p$.n = _v$12);
4697
- _v$13 !== _p$.s && _el$4.classList.toggle("action-dialog--hidden", _p$.s = _v$13);
4698
- _v$14 !== _p$.h && setAttribute(_el$5, "data-no-person", _p$.h = _v$14);
4699
- _v$15 !== _p$.r && setAttribute(_el$5, "aria-disabled", _p$.r = _v$15);
4700
- _v$16 !== _p$.d && _el$7.classList.toggle("action-dialog-content--disable-shadow", _p$.d = _v$16);
4701
- _v$17 !== _p$.l && _el$18.classList.toggle("action-text--shown", _p$.l = _v$17);
4702
- _v$18 !== _p$.u && setAttribute(_el$18, "aria-disabled", _p$.u = _v$18);
4571
+ _v$0 !== _p$.o && ((_p$.o = _v$0) != null ? _el$2.style.setProperty("background-image", _v$0) : _el$2.style.removeProperty("background-image"));
4572
+ _v$1 !== _p$.i && ((_p$.i = _v$1) != null ? _el$3.style.setProperty("--shown-characters-count", _v$1) : _el$3.style.removeProperty("--shown-characters-count"));
4573
+ _v$10 !== _p$.n && _el$4.classList.toggle("action-dialog--visible", _p$.n = _v$10);
4574
+ _v$11 !== _p$.s && _el$4.classList.toggle("action-dialog--hidden", _p$.s = _v$11);
4575
+ _v$12 !== _p$.h && setAttribute(_el$5, "data-no-person", _p$.h = _v$12);
4576
+ _v$13 !== _p$.r && setAttribute(_el$5, "aria-disabled", _p$.r = _v$13);
4577
+ _v$14 !== _p$.d && _el$7.classList.toggle("action-dialog-content--disable-shadow", _p$.d = _v$14);
4578
+ _v$15 !== _p$.l && _el$16.classList.toggle("action-text--shown", _p$.l = _v$15);
4579
+ _v$16 !== _p$.u && setAttribute(_el$16, "aria-disabled", _p$.u = _v$16);
4703
4580
  return _p$;
4704
4581
  }, {
4705
4582
  e: void 0,
@@ -4721,17 +4598,17 @@ var Game = (props) => {
4721
4598
  delegateEvents(["click", "keydown"]);
4722
4599
 
4723
4600
  // src/screens/loading.tsx
4724
- var _tmpl$16 = /* @__PURE__ */ template(`<div class=loading><div class=loading__animation><div></div><div></div><div></div><div>`);
4601
+ var _tmpl$14 = /* @__PURE__ */ template(`<div class=loading><div class=loading__animation><div></div><div></div><div></div><div>`);
4725
4602
  var Loading = (props) => {
4726
4603
  return (() => {
4727
- var _el$ = _tmpl$16();
4604
+ var _el$ = _tmpl$14();
4728
4605
  createRenderEffect(() => _el$.classList.toggle("overlay", !!props.overlay));
4729
4606
  return _el$;
4730
4607
  })();
4731
4608
  };
4732
4609
 
4733
4610
  // src/screens/mainmenu.tsx
4734
- var _tmpl$17 = /* @__PURE__ */ template(`<div class=main-menu><div class=main-menu__controls><button type=button class="button main-menu__button"><span class=main-menu__button__text></span></button><button type=button class="button main-menu__button"><span class=main-menu__button__text></span></button><button type=button class="button main-menu__button"><span class=main-menu__button__text></span></button><button type=button class="button main-menu__button"><span class=main-menu__button__text>`);
4611
+ var _tmpl$15 = /* @__PURE__ */ template(`<div class=main-menu><div class=main-menu__controls><button type=button class="button main-menu__button"><span class=main-menu__button__text></span></button><button type=button class="button main-menu__button"><span class=main-menu__button__text></span></button><button type=button class="button main-menu__button"><span class=main-menu__button__text></span></button><button type=button class="button main-menu__button"><span class=main-menu__button__text>`);
4735
4612
  var _tmpl$27 = /* @__PURE__ */ template(`<button>`);
4736
4613
  var MainMenu = () => {
4737
4614
  const {
@@ -4748,7 +4625,7 @@ var MainMenu = () => {
4748
4625
  $rendererState.mutate((s) => s.screen, screen);
4749
4626
  });
4750
4627
  return (() => {
4751
- var _el$ = _tmpl$17(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$7.nextSibling, _el$10 = _el$9.firstChild;
4628
+ var _el$ = _tmpl$15(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.firstChild;
4752
4629
  _el$3.$$click = () => {
4753
4630
  options.newGame();
4754
4631
  };
@@ -4773,7 +4650,7 @@ var MainMenu = () => {
4773
4650
  _el$9.$$click = () => {
4774
4651
  goto("settings");
4775
4652
  };
4776
- insert(_el$10, () => t("Settings"));
4653
+ insert(_el$0, () => t("Settings"));
4777
4654
  insert(_el$9, createComponent(Icon, {
4778
4655
  icon: "#novely-settings-icon"
4779
4656
  }), null);
@@ -4787,9 +4664,9 @@ var MainMenu = () => {
4787
4664
  return rendererStore().mainmenu;
4788
4665
  },
4789
4666
  children: (item) => (() => {
4790
- var _el$11 = _tmpl$27();
4791
- spread(_el$11, mergeProps(() => item(goto)), false, false);
4792
- return _el$11;
4667
+ var _el$1 = _tmpl$27();
4668
+ spread(_el$1, mergeProps(() => item(goto)), false, false);
4669
+ return _el$1;
4793
4670
  })()
4794
4671
  })
4795
4672
  }), null);
@@ -4799,7 +4676,7 @@ var MainMenu = () => {
4799
4676
  delegateEvents(["click"]);
4800
4677
 
4801
4678
  // src/screens/saves.tsx
4802
- var _tmpl$18 = /* @__PURE__ */ template(`<ol class=saves__list>`);
4679
+ var _tmpl$16 = /* @__PURE__ */ template(`<ol class=saves__list>`);
4803
4680
  var _tmpl$28 = /* @__PURE__ */ template(`<div class=saves><div class=saves__controls><button type=button class="button saves__button"></button></div><div class=saves__list-container>`);
4804
4681
  var _tmpl$36 = /* @__PURE__ */ template(`<div class="saves__list saves__list--empty">`);
4805
4682
  var Saves = () => {
@@ -4885,7 +4762,7 @@ var Saves = () => {
4885
4762
  })();
4886
4763
  },
4887
4764
  get children() {
4888
- var _el$5 = _tmpl$18();
4765
+ var _el$5 = _tmpl$16();
4889
4766
  use(setList, _el$5);
4890
4767
  insert(_el$5, createComponent(For, {
4891
4768
  get each() {
@@ -4916,7 +4793,7 @@ var Saves = () => {
4916
4793
  delegateEvents(["click"]);
4917
4794
 
4918
4795
  // src/screens/settings.tsx
4919
- var _tmpl$19 = /* @__PURE__ */ template(`<div class="root settings"><div class=settings__controls><button type=button class="button settings__button"></button><button type=button class="button settings__button"></button></div><div class=settings__options>`);
4796
+ var _tmpl$17 = /* @__PURE__ */ template(`<div class="root settings"><div class=settings__controls><button type=button class="button settings__button"></button><button type=button class="button settings__button"></button></div><div class=settings__options>`);
4920
4797
  var _tmpl$29 = /* @__PURE__ */ template(`<option>`);
4921
4798
  var Settings = (props) => {
4922
4799
  const {
@@ -4960,7 +4837,7 @@ var Settings = (props) => {
4960
4837
  return fn;
4961
4838
  };
4962
4839
  return (() => {
4963
- var _el$ = _tmpl$19(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
4840
+ var _el$ = _tmpl$17(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
4964
4841
  _el$3.$$click = () => {
4965
4842
  $rendererState.setKey("screen", "mainmenu");
4966
4843
  };
@@ -5065,7 +4942,7 @@ var Settings = (props) => {
5065
4942
  delegateEvents(["click"]);
5066
4943
 
5067
4944
  // src/components/Root.tsx
5068
- var _tmpl$20 = /* @__PURE__ */ template(`<div class=root>`);
4945
+ var _tmpl$18 = /* @__PURE__ */ template(`<div class=root>`);
5069
4946
  var createRootComponent = ({
5070
4947
  $rendererState,
5071
4948
  $contextState,
@@ -5098,7 +4975,7 @@ var createRootComponent = ({
5098
4975
  emitter.emit("screen:change", currentScreen);
5099
4976
  });
5100
4977
  return (() => {
5101
- var _el$ = _tmpl$20();
4978
+ var _el$ = _tmpl$18();
5102
4979
  var _ref$ = setRoot;
5103
4980
  typeof _ref$ === "function" ? use(_ref$, _el$) : setRoot = _el$;
5104
4981
  insert(_el$, createComponent(Provider, {