@floless/app 0.54.1 → 0.56.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.
@@ -6317,14 +6317,14 @@ var require_tools = __commonJS({
6317
6317
  }
6318
6318
  return point < 32 ? JSON.stringify(str) : '"' + result + '"';
6319
6319
  }
6320
- function asJson(obj, msg, num, time) {
6320
+ function asJson(obj, msg, num2, time) {
6321
6321
  if (asJsonChan.hasSubscribers === false) {
6322
- return _asJson.call(this, obj, msg, num, time);
6322
+ return _asJson.call(this, obj, msg, num2, time);
6323
6323
  }
6324
6324
  const store = { instance: this, arguments };
6325
- return asJsonChan.traceSync(_asJson, store, this, obj, msg, num, time);
6325
+ return asJsonChan.traceSync(_asJson, store, this, obj, msg, num2, time);
6326
6326
  }
6327
- function _asJson(obj, msg, num, time) {
6327
+ function _asJson(obj, msg, num2, time) {
6328
6328
  const stringify2 = this[stringifySym];
6329
6329
  const stringifySafe = this[stringifySafeSym];
6330
6330
  const stringifiers = this[stringifiersSym];
@@ -6334,7 +6334,7 @@ var require_tools = __commonJS({
6334
6334
  const formatters = this[formattersSym];
6335
6335
  const messageKey = this[messageKeySym];
6336
6336
  const errorKey = this[errorKeySym];
6337
- let data = this[lsCacheSym][num] + time;
6337
+ let data = this[lsCacheSym][num2] + time;
6338
6338
  data = data + chindings;
6339
6339
  let value;
6340
6340
  if (formatters.log) {
@@ -6959,7 +6959,7 @@ var require_proto = __commonJS({
6959
6959
  function defaultMixinMergeStrategy(mergeObject, mixinObject) {
6960
6960
  return Object.assign(mixinObject, mergeObject);
6961
6961
  }
6962
- function write(_obj, msg, num) {
6962
+ function write(_obj, msg, num2) {
6963
6963
  const t = this[timeSym]();
6964
6964
  const mixin = this[mixinSym];
6965
6965
  const errorKey = this[errorKeySym];
@@ -6981,12 +6981,12 @@ var require_proto = __commonJS({
6981
6981
  }
6982
6982
  }
6983
6983
  if (mixin) {
6984
- obj = mixinMergeStrategy(obj, mixin(obj, num, this));
6984
+ obj = mixinMergeStrategy(obj, mixin(obj, num2, this));
6985
6985
  }
6986
- const s = this[asJsonSym](obj, msg, num, t);
6986
+ const s = this[asJsonSym](obj, msg, num2, t);
6987
6987
  const stream = this[streamSym];
6988
6988
  if (stream[needsMetadataGsym] === true) {
6989
- stream.lastLevel = num;
6989
+ stream.lastLevel = num2;
6990
6990
  stream.lastObj = obj;
6991
6991
  stream.lastMsg = msg;
6992
6992
  stream.lastTime = t.slice(this[timeSliceIndexSym]);
@@ -8513,13 +8513,13 @@ var require_serializer = __commonJS({
8513
8513
  return "" + integer;
8514
8514
  }
8515
8515
  asNumber(i) {
8516
- const num = Number(i);
8517
- if (num !== num) {
8516
+ const num2 = Number(i);
8517
+ if (num2 !== num2) {
8518
8518
  throw new Error(`The value "${i}" cannot be converted to a number.`);
8519
- } else if (num === Infinity || num === -Infinity) {
8519
+ } else if (num2 === Infinity || num2 === -Infinity) {
8520
8520
  return "null";
8521
8521
  } else {
8522
- return "" + num;
8522
+ return "" + num2;
8523
8523
  }
8524
8524
  }
8525
8525
  asBoolean(bool) {
@@ -10711,17 +10711,17 @@ var require_proxy_addr = __commonJS({
10711
10711
  return len2 === 0 ? trustNone : len2 === 1 ? trustSingle(rangeSubnets[0]) : trustMulti(rangeSubnets);
10712
10712
  }
10713
10713
  function parseipNotation(note) {
10714
- const pos = note.lastIndexOf("/");
10715
- const str = pos !== -1 ? note.substring(0, pos) : note;
10714
+ const pos2 = note.lastIndexOf("/");
10715
+ const str = pos2 !== -1 ? note.substring(0, pos2) : note;
10716
10716
  if (!isip(str)) {
10717
10717
  throw new TypeError("invalid IP address: " + str);
10718
10718
  }
10719
10719
  let ip = parseip(str);
10720
- if (pos === -1 && ip.kind() === "ipv6" && ip.isIPv4MappedAddress()) {
10720
+ if (pos2 === -1 && ip.kind() === "ipv6" && ip.isIPv4MappedAddress()) {
10721
10721
  ip = ip.toIPv4Address();
10722
10722
  }
10723
10723
  const max = ip.kind() === "ipv6" ? 128 : 32;
10724
- let range = pos !== -1 ? note.substring(pos + 1, note.length) : null;
10724
+ let range = pos2 !== -1 ? note.substring(pos2 + 1, note.length) : null;
10725
10725
  if (range === null) {
10726
10726
  range = max;
10727
10727
  } else if (DIGIT_REGEXP.test(range)) {
@@ -17085,15 +17085,15 @@ var require_ucs2length = __commonJS({
17085
17085
  function ucs2length(str) {
17086
17086
  const len2 = str.length;
17087
17087
  let length = 0;
17088
- let pos = 0;
17088
+ let pos2 = 0;
17089
17089
  let value;
17090
- while (pos < len2) {
17090
+ while (pos2 < len2) {
17091
17091
  length++;
17092
- value = str.charCodeAt(pos++);
17093
- if (value >= 55296 && value <= 56319 && pos < len2) {
17094
- value = str.charCodeAt(pos);
17092
+ value = str.charCodeAt(pos2++);
17093
+ if (value >= 55296 && value <= 56319 && pos2 < len2) {
17094
+ value = str.charCodeAt(pos2);
17095
17095
  if ((value & 64512) === 56320)
17096
- pos++;
17096
+ pos2++;
17097
17097
  }
17098
17098
  }
17099
17099
  return length;
@@ -19981,14 +19981,14 @@ var require_parseJson = __commonJS({
19981
19981
  Object.defineProperty(exports2, "__esModule", { value: true });
19982
19982
  exports2.parseJsonString = exports2.parseJsonNumber = exports2.parseJson = void 0;
19983
19983
  var rxParseJson = /position\s(\d+)(?: \(line \d+ column \d+\))?$/;
19984
- function parseJson(s, pos) {
19984
+ function parseJson(s, pos2) {
19985
19985
  let endPos;
19986
19986
  parseJson.message = void 0;
19987
19987
  let matches;
19988
- if (pos)
19989
- s = s.slice(pos);
19988
+ if (pos2)
19989
+ s = s.slice(pos2);
19990
19990
  try {
19991
- parseJson.position = pos + s.length;
19991
+ parseJson.position = pos2 + s.length;
19992
19992
  return JSON.parse(s);
19993
19993
  } catch (e) {
19994
19994
  matches = rxParseJson.exec(e.message);
@@ -19999,7 +19999,7 @@ var require_parseJson = __commonJS({
19999
19999
  endPos = +matches[1];
20000
20000
  const c = s[endPos];
20001
20001
  s = s.slice(0, endPos);
20002
- parseJson.position = pos + endPos;
20002
+ parseJson.position = pos2 + endPos;
20003
20003
  try {
20004
20004
  return JSON.parse(s);
20005
20005
  } catch (e1) {
@@ -20012,17 +20012,17 @@ var require_parseJson = __commonJS({
20012
20012
  parseJson.message = void 0;
20013
20013
  parseJson.position = 0;
20014
20014
  parseJson.code = 'require("ajv/dist/runtime/parseJson").parseJson';
20015
- function parseJsonNumber(s, pos, maxDigits) {
20015
+ function parseJsonNumber(s, pos2, maxDigits) {
20016
20016
  let numStr = "";
20017
20017
  let c;
20018
20018
  parseJsonNumber.message = void 0;
20019
- if (s[pos] === "-") {
20019
+ if (s[pos2] === "-") {
20020
20020
  numStr += "-";
20021
- pos++;
20021
+ pos2++;
20022
20022
  }
20023
- if (s[pos] === "0") {
20023
+ if (s[pos2] === "0") {
20024
20024
  numStr += "0";
20025
- pos++;
20025
+ pos2++;
20026
20026
  } else {
20027
20027
  if (!parseDigits(maxDigits)) {
20028
20028
  errorMessage();
@@ -20030,43 +20030,43 @@ var require_parseJson = __commonJS({
20030
20030
  }
20031
20031
  }
20032
20032
  if (maxDigits) {
20033
- parseJsonNumber.position = pos;
20033
+ parseJsonNumber.position = pos2;
20034
20034
  return +numStr;
20035
20035
  }
20036
- if (s[pos] === ".") {
20036
+ if (s[pos2] === ".") {
20037
20037
  numStr += ".";
20038
- pos++;
20038
+ pos2++;
20039
20039
  if (!parseDigits()) {
20040
20040
  errorMessage();
20041
20041
  return void 0;
20042
20042
  }
20043
20043
  }
20044
- if (c = s[pos], c === "e" || c === "E") {
20044
+ if (c = s[pos2], c === "e" || c === "E") {
20045
20045
  numStr += "e";
20046
- pos++;
20047
- if (c = s[pos], c === "+" || c === "-") {
20046
+ pos2++;
20047
+ if (c = s[pos2], c === "+" || c === "-") {
20048
20048
  numStr += c;
20049
- pos++;
20049
+ pos2++;
20050
20050
  }
20051
20051
  if (!parseDigits()) {
20052
20052
  errorMessage();
20053
20053
  return void 0;
20054
20054
  }
20055
20055
  }
20056
- parseJsonNumber.position = pos;
20056
+ parseJsonNumber.position = pos2;
20057
20057
  return +numStr;
20058
20058
  function parseDigits(maxLen) {
20059
20059
  let digit = false;
20060
- while (c = s[pos], c >= "0" && c <= "9" && (maxLen === void 0 || maxLen-- > 0)) {
20060
+ while (c = s[pos2], c >= "0" && c <= "9" && (maxLen === void 0 || maxLen-- > 0)) {
20061
20061
  digit = true;
20062
20062
  numStr += c;
20063
- pos++;
20063
+ pos2++;
20064
20064
  }
20065
20065
  return digit;
20066
20066
  }
20067
20067
  function errorMessage() {
20068
- parseJsonNumber.position = pos;
20069
- parseJsonNumber.message = pos < s.length ? `unexpected token ${s[pos]}` : "unexpected end";
20068
+ parseJsonNumber.position = pos2;
20069
+ parseJsonNumber.message = pos2 < s.length ? `unexpected token ${s[pos2]}` : "unexpected end";
20070
20070
  }
20071
20071
  }
20072
20072
  exports2.parseJsonNumber = parseJsonNumber;
@@ -20085,26 +20085,26 @@ var require_parseJson = __commonJS({
20085
20085
  };
20086
20086
  var CODE_A = "a".charCodeAt(0);
20087
20087
  var CODE_0 = "0".charCodeAt(0);
20088
- function parseJsonString(s, pos) {
20088
+ function parseJsonString(s, pos2) {
20089
20089
  let str = "";
20090
20090
  let c;
20091
20091
  parseJsonString.message = void 0;
20092
20092
  while (true) {
20093
- c = s[pos++];
20093
+ c = s[pos2++];
20094
20094
  if (c === '"')
20095
20095
  break;
20096
20096
  if (c === "\\") {
20097
- c = s[pos];
20097
+ c = s[pos2];
20098
20098
  if (c in escapedChars) {
20099
20099
  str += escapedChars[c];
20100
- pos++;
20100
+ pos2++;
20101
20101
  } else if (c === "u") {
20102
- pos++;
20102
+ pos2++;
20103
20103
  let count = 4;
20104
20104
  let code = 0;
20105
20105
  while (count--) {
20106
20106
  code <<= 4;
20107
- c = s[pos];
20107
+ c = s[pos2];
20108
20108
  if (c === void 0) {
20109
20109
  errorMessage("unexpected end");
20110
20110
  return void 0;
@@ -20118,7 +20118,7 @@ var require_parseJson = __commonJS({
20118
20118
  errorMessage(`unexpected token ${c}`);
20119
20119
  return void 0;
20120
20120
  }
20121
- pos++;
20121
+ pos2++;
20122
20122
  }
20123
20123
  str += String.fromCharCode(code);
20124
20124
  } else {
@@ -20137,10 +20137,10 @@ var require_parseJson = __commonJS({
20137
20137
  }
20138
20138
  }
20139
20139
  }
20140
- parseJsonString.position = pos;
20140
+ parseJsonString.position = pos2;
20141
20141
  return str;
20142
20142
  function errorMessage(msg) {
20143
- parseJsonString.position = pos;
20143
+ parseJsonString.position = pos2;
20144
20144
  parseJsonString.message = msg;
20145
20145
  }
20146
20146
  }
@@ -24673,9 +24673,9 @@ var require_semver = __commonJS({
24673
24673
  } else {
24674
24674
  this.prerelease = m[4].split(".").map((id) => {
24675
24675
  if (/^[0-9]+$/.test(id)) {
24676
- const num = +id;
24677
- if (num >= 0 && num < MAX_SAFE_INTEGER) {
24678
- return num;
24676
+ const num2 = +id;
24677
+ if (num2 >= 0 && num2 < MAX_SAFE_INTEGER) {
24678
+ return num2;
24679
24679
  }
24680
24680
  }
24681
24681
  return id;
@@ -32432,48 +32432,48 @@ var require_set_cookie = __commonJS({
32432
32432
  return [];
32433
32433
  }
32434
32434
  var cookiesStrings = [];
32435
- var pos = 0;
32435
+ var pos2 = 0;
32436
32436
  var start;
32437
32437
  var ch2;
32438
32438
  var lastComma;
32439
32439
  var nextStart;
32440
32440
  var cookiesSeparatorFound;
32441
32441
  function skipWhitespace() {
32442
- while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
32443
- pos += 1;
32442
+ while (pos2 < cookiesString.length && /\s/.test(cookiesString.charAt(pos2))) {
32443
+ pos2 += 1;
32444
32444
  }
32445
- return pos < cookiesString.length;
32445
+ return pos2 < cookiesString.length;
32446
32446
  }
32447
32447
  function notSpecialChar() {
32448
- ch2 = cookiesString.charAt(pos);
32448
+ ch2 = cookiesString.charAt(pos2);
32449
32449
  return ch2 !== "=" && ch2 !== ";" && ch2 !== ",";
32450
32450
  }
32451
- while (pos < cookiesString.length) {
32452
- start = pos;
32451
+ while (pos2 < cookiesString.length) {
32452
+ start = pos2;
32453
32453
  cookiesSeparatorFound = false;
32454
32454
  while (skipWhitespace()) {
32455
- ch2 = cookiesString.charAt(pos);
32455
+ ch2 = cookiesString.charAt(pos2);
32456
32456
  if (ch2 === ",") {
32457
- lastComma = pos;
32458
- pos += 1;
32457
+ lastComma = pos2;
32458
+ pos2 += 1;
32459
32459
  skipWhitespace();
32460
- nextStart = pos;
32461
- while (pos < cookiesString.length && notSpecialChar()) {
32462
- pos += 1;
32460
+ nextStart = pos2;
32461
+ while (pos2 < cookiesString.length && notSpecialChar()) {
32462
+ pos2 += 1;
32463
32463
  }
32464
- if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
32464
+ if (pos2 < cookiesString.length && cookiesString.charAt(pos2) === "=") {
32465
32465
  cookiesSeparatorFound = true;
32466
- pos = nextStart;
32466
+ pos2 = nextStart;
32467
32467
  cookiesStrings.push(cookiesString.substring(start, lastComma));
32468
- start = pos;
32468
+ start = pos2;
32469
32469
  } else {
32470
- pos = lastComma + 1;
32470
+ pos2 = lastComma + 1;
32471
32471
  }
32472
32472
  } else {
32473
- pos += 1;
32473
+ pos2 += 1;
32474
32474
  }
32475
32475
  }
32476
- if (!cookiesSeparatorFound || pos >= cookiesString.length) {
32476
+ if (!cookiesSeparatorFound || pos2 >= cookiesString.length) {
32477
32477
  cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
32478
32478
  }
32479
32479
  }
@@ -34746,22 +34746,22 @@ var require_brace_expressions = __commonJS({
34746
34746
  var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
34747
34747
  var rangesToString = (ranges) => ranges.join("");
34748
34748
  var parseClass = (glob, position) => {
34749
- const pos = position;
34750
- if (glob.charAt(pos) !== "[") {
34749
+ const pos2 = position;
34750
+ if (glob.charAt(pos2) !== "[") {
34751
34751
  throw new Error("not in a brace expression");
34752
34752
  }
34753
34753
  const ranges = [];
34754
34754
  const negs = [];
34755
- let i = pos + 1;
34755
+ let i = pos2 + 1;
34756
34756
  let sawStart = false;
34757
34757
  let uflag = false;
34758
34758
  let escaping = false;
34759
34759
  let negate = false;
34760
- let endPos = pos;
34760
+ let endPos = pos2;
34761
34761
  let rangeStart = "";
34762
34762
  WHILE: while (i < glob.length) {
34763
34763
  const c = glob.charAt(i);
34764
- if ((c === "!" || c === "^") && i === pos + 1) {
34764
+ if ((c === "!" || c === "^") && i === pos2 + 1) {
34765
34765
  negate = true;
34766
34766
  i++;
34767
34767
  continue;
@@ -34782,7 +34782,7 @@ var require_brace_expressions = __commonJS({
34782
34782
  for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
34783
34783
  if (glob.startsWith(cls, i)) {
34784
34784
  if (rangeStart) {
34785
- return ["$.", false, glob.length - pos, true];
34785
+ return ["$.", false, glob.length - pos2, true];
34786
34786
  }
34787
34787
  i += cls.length;
34788
34788
  if (neg)
@@ -34822,16 +34822,16 @@ var require_brace_expressions = __commonJS({
34822
34822
  return ["", false, 0, false];
34823
34823
  }
34824
34824
  if (!ranges.length && !negs.length) {
34825
- return ["$.", false, glob.length - pos, true];
34825
+ return ["$.", false, glob.length - pos2, true];
34826
34826
  }
34827
34827
  if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
34828
34828
  const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
34829
- return [regexpEscape(r), false, endPos - pos, false];
34829
+ return [regexpEscape(r), false, endPos - pos2, false];
34830
34830
  }
34831
34831
  const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
34832
34832
  const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
34833
34833
  const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
34834
- return [comb, uflag, endPos - pos, true];
34834
+ return [comb, uflag, endPos - pos2, true];
34835
34835
  };
34836
34836
  exports2.parseClass = parseClass;
34837
34837
  }
@@ -35067,14 +35067,14 @@ var require_ast = __commonJS({
35067
35067
  }
35068
35068
  return c;
35069
35069
  }
35070
- static #parseAST(str, ast, pos, opt, extDepth) {
35070
+ static #parseAST(str, ast, pos2, opt, extDepth) {
35071
35071
  const maxDepth = opt.maxExtglobRecursion ?? 2;
35072
35072
  let escaping = false;
35073
35073
  let inBrace = false;
35074
35074
  let braceStart = -1;
35075
35075
  let braceNeg = false;
35076
35076
  if (ast.type === null) {
35077
- let i2 = pos;
35077
+ let i2 = pos2;
35078
35078
  let acc2 = "";
35079
35079
  while (i2 < str.length) {
35080
35080
  const c = str.charAt(i2++);
@@ -35114,7 +35114,7 @@ var require_ast = __commonJS({
35114
35114
  ast.push(acc2);
35115
35115
  return i2;
35116
35116
  }
35117
- let i = pos + 1;
35117
+ let i = pos2 + 1;
35118
35118
  let part = new _a2(null, ast);
35119
35119
  const parts = [];
35120
35120
  let acc = "";
@@ -35173,7 +35173,7 @@ var require_ast = __commonJS({
35173
35173
  }
35174
35174
  ast.type = null;
35175
35175
  ast.#hasMagic = void 0;
35176
- ast.#parts = [str.substring(pos - 1)];
35176
+ ast.#parts = [str.substring(pos2 - 1)];
35177
35177
  return i;
35178
35178
  }
35179
35179
  #canAdoptWithSpace(child) {
@@ -41036,24 +41036,24 @@ var require_dist5 = __commonJS({
41036
41036
  var DAY = HOUR * 24;
41037
41037
  var YEAR = DAY * 365.25;
41038
41038
  function parse(val) {
41039
- var num, arr = val.toLowerCase().match(RGX);
41040
- if (arr != null && (num = parseFloat(arr[1]))) {
41041
- if (arr[3] != null) return num * SEC;
41042
- if (arr[4] != null) return num * MIN;
41043
- if (arr[5] != null) return num * HOUR;
41044
- if (arr[6] != null) return num * DAY;
41045
- if (arr[7] != null) return num * DAY * 7;
41046
- if (arr[8] != null) return num * YEAR;
41047
- return num;
41039
+ var num2, arr = val.toLowerCase().match(RGX);
41040
+ if (arr != null && (num2 = parseFloat(arr[1]))) {
41041
+ if (arr[3] != null) return num2 * SEC;
41042
+ if (arr[4] != null) return num2 * MIN;
41043
+ if (arr[5] != null) return num2 * HOUR;
41044
+ if (arr[6] != null) return num2 * DAY;
41045
+ if (arr[7] != null) return num2 * DAY * 7;
41046
+ if (arr[8] != null) return num2 * YEAR;
41047
+ return num2;
41048
41048
  }
41049
41049
  }
41050
41050
  function fmt(val, pfx, str, long) {
41051
- var num = (val | 0) === val ? val : ~~(val + 0.5);
41052
- return pfx + num + (long ? " " + str + (num != 1 ? "s" : "") : str[0]);
41051
+ var num2 = (val | 0) === val ? val : ~~(val + 0.5);
41052
+ return pfx + num2 + (long ? " " + str + (num2 != 1 ? "s" : "") : str[0]);
41053
41053
  }
41054
- function format(num, long) {
41055
- var pfx = num < 0 ? "-" : "", abs = num < 0 ? -num : num;
41056
- if (abs < SEC) return num + (long ? " ms" : "ms");
41054
+ function format(num2, long) {
41055
+ var pfx = num2 < 0 ? "-" : "", abs = num2 < 0 ? -num2 : num2;
41056
+ if (abs < SEC) return num2 + (long ? " ms" : "ms");
41057
41057
  if (abs < MIN) return fmt(abs / SEC, pfx, "second", long);
41058
41058
  if (abs < HOUR) return fmt(abs / MIN, pfx, "minute", long);
41059
41059
  if (abs < DAY) return fmt(abs / HOUR, pfx, "hour", long);
@@ -45784,9 +45784,9 @@ var require_stringifyNumber = __commonJS({
45784
45784
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
45785
45785
  if (typeof value === "bigint")
45786
45786
  return String(value);
45787
- const num = typeof value === "number" ? value : Number(value);
45788
- if (!isFinite(num))
45789
- return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
45787
+ const num2 = typeof value === "number" ? value : Number(value);
45788
+ if (!isFinite(num2))
45789
+ return isNaN(num2) ? ".nan" : num2 < 0 ? "-.inf" : ".inf";
45790
45790
  let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
45791
45791
  if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
45792
45792
  let i = n.indexOf(".");
@@ -45826,8 +45826,8 @@ var require_float = __commonJS({
45826
45826
  test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
45827
45827
  resolve: (str) => parseFloat(str),
45828
45828
  stringify(node) {
45829
- const num = Number(node.value);
45830
- return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);
45829
+ const num2 = Number(node.value);
45830
+ return isFinite(num2) ? num2.toExponential() : stringifyNumber.stringifyNumber(node);
45831
45831
  }
45832
45832
  };
45833
45833
  var float = {
@@ -46266,8 +46266,8 @@ var require_float2 = __commonJS({
46266
46266
  test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
46267
46267
  resolve: (str) => parseFloat(str.replace(/_/g, "")),
46268
46268
  stringify(node) {
46269
- const num = Number(node.value);
46270
- return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);
46269
+ const num2 = Number(node.value);
46270
+ return isFinite(num2) ? num2.toExponential() : stringifyNumber.stringifyNumber(node);
46271
46271
  }
46272
46272
  };
46273
46273
  var float = {
@@ -46469,23 +46469,23 @@ var require_timestamp2 = __commonJS({
46469
46469
  function parseSexagesimal(str, asBigInt) {
46470
46470
  const sign = str[0];
46471
46471
  const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
46472
- const num = (n) => asBigInt ? BigInt(n) : Number(n);
46473
- const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
46474
- return sign === "-" ? num(-1) * res : res;
46472
+ const num2 = (n) => asBigInt ? BigInt(n) : Number(n);
46473
+ const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num2(60) + num2(p), num2(0));
46474
+ return sign === "-" ? num2(-1) * res : res;
46475
46475
  }
46476
46476
  function stringifySexagesimal(node) {
46477
46477
  let { value } = node;
46478
- let num = (n) => n;
46478
+ let num2 = (n) => n;
46479
46479
  if (typeof value === "bigint")
46480
- num = (n) => BigInt(n);
46480
+ num2 = (n) => BigInt(n);
46481
46481
  else if (isNaN(value) || !isFinite(value))
46482
46482
  return stringifyNumber.stringifyNumber(node);
46483
46483
  let sign = "";
46484
46484
  if (value < 0) {
46485
46485
  sign = "-";
46486
- value *= num(-1);
46486
+ value *= num2(-1);
46487
46487
  }
46488
- const _60 = num(60);
46488
+ const _60 = num2(60);
46489
46489
  const parts = [value % _60];
46490
46490
  if (value < 60) {
46491
46491
  parts.unshift(0);
@@ -47113,28 +47113,28 @@ var require_errors5 = __commonJS({
47113
47113
  "node_modules/yaml/dist/errors.js"(exports2) {
47114
47114
  "use strict";
47115
47115
  var YAMLError = class extends Error {
47116
- constructor(name, pos, code, message) {
47116
+ constructor(name, pos2, code, message) {
47117
47117
  super();
47118
47118
  this.name = name;
47119
47119
  this.code = code;
47120
47120
  this.message = message;
47121
- this.pos = pos;
47121
+ this.pos = pos2;
47122
47122
  }
47123
47123
  };
47124
47124
  var YAMLParseError = class extends YAMLError {
47125
- constructor(pos, code, message) {
47126
- super("YAMLParseError", pos, code, message);
47125
+ constructor(pos2, code, message) {
47126
+ super("YAMLParseError", pos2, code, message);
47127
47127
  }
47128
47128
  };
47129
47129
  var YAMLWarning = class extends YAMLError {
47130
- constructor(pos, code, message) {
47131
- super("YAMLWarning", pos, code, message);
47130
+ constructor(pos2, code, message) {
47131
+ super("YAMLWarning", pos2, code, message);
47132
47132
  }
47133
47133
  };
47134
47134
  var prettifyError = (src, lc2) => (error) => {
47135
47135
  if (error.pos[0] === -1)
47136
47136
  return;
47137
- error.linePos = error.pos.map((pos) => lc2.linePos(pos));
47137
+ error.linePos = error.pos.map((pos2) => lc2.linePos(pos2));
47138
47138
  const { line, col } = error.linePos[0];
47139
47139
  error.message += ` at line ${line}, column ${col}`;
47140
47140
  let ci = col - 1;
@@ -48117,8 +48117,8 @@ var require_resolve_flow_scalar = __commonJS({
48117
48117
  return source;
48118
48118
  let res = match[1];
48119
48119
  let sep4 = " ";
48120
- let pos = first.lastIndex;
48121
- line.lastIndex = pos;
48120
+ let pos2 = first.lastIndex;
48121
+ line.lastIndex = pos2;
48122
48122
  while (match = line.exec(source)) {
48123
48123
  if (match[1] === "") {
48124
48124
  if (sep4 === "\n")
@@ -48129,10 +48129,10 @@ var require_resolve_flow_scalar = __commonJS({
48129
48129
  res += sep4 + match[1];
48130
48130
  sep4 = " ";
48131
48131
  }
48132
- pos = line.lastIndex;
48132
+ pos2 = line.lastIndex;
48133
48133
  }
48134
48134
  const last = /[ \t]*(.*)/sy;
48135
- last.lastIndex = pos;
48135
+ last.lastIndex = pos2;
48136
48136
  match = last.exec(source);
48137
48137
  return res + sep4 + (match?.[1] ?? "");
48138
48138
  }
@@ -48332,10 +48332,10 @@ var require_compose_scalar = __commonJS({
48332
48332
  var require_util_empty_scalar_position = __commonJS({
48333
48333
  "node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports2) {
48334
48334
  "use strict";
48335
- function emptyScalarPosition(offset, before, pos) {
48335
+ function emptyScalarPosition(offset, before, pos2) {
48336
48336
  if (before) {
48337
- pos ?? (pos = before.length);
48338
- for (let i = pos - 1; i >= 0; --i) {
48337
+ pos2 ?? (pos2 = before.length);
48338
+ for (let i = pos2 - 1; i >= 0; --i) {
48339
48339
  let st = before[i];
48340
48340
  switch (st.type) {
48341
48341
  case "space":
@@ -48425,10 +48425,10 @@ var require_compose_node = __commonJS({
48425
48425
  node.srcToken = token;
48426
48426
  return node;
48427
48427
  }
48428
- function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {
48428
+ function composeEmptyNode(ctx, offset, before, pos2, { spaceBefore, comment, anchor, tag, end }, onError) {
48429
48429
  const token = {
48430
48430
  type: "scalar",
48431
- offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos),
48431
+ offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos2),
48432
48432
  indent: -1,
48433
48433
  source: ""
48434
48434
  };
@@ -48559,11 +48559,11 @@ var require_composer = __commonJS({
48559
48559
  this.errors = [];
48560
48560
  this.warnings = [];
48561
48561
  this.onError = (source, code, message, warning) => {
48562
- const pos = getErrorPos(source);
48562
+ const pos2 = getErrorPos(source);
48563
48563
  if (warning)
48564
- this.warnings.push(new errors.YAMLWarning(pos, code, message));
48564
+ this.warnings.push(new errors.YAMLWarning(pos2, code, message));
48565
48565
  else
48566
- this.errors.push(new errors.YAMLParseError(pos, code, message));
48566
+ this.errors.push(new errors.YAMLParseError(pos2, code, message));
48567
48567
  };
48568
48568
  this.directives = new directives.Directives({ version: options.version || "1.2" });
48569
48569
  this.options = options;
@@ -48634,9 +48634,9 @@ ${cb}` : comment;
48634
48634
  switch (token.type) {
48635
48635
  case "directive":
48636
48636
  this.directives.add(token.source, (offset, message, warning) => {
48637
- const pos = getErrorPos(token);
48638
- pos[0] += offset;
48639
- this.onError(pos, "BAD_DIRECTIVE", message, warning);
48637
+ const pos2 = getErrorPos(token);
48638
+ pos2[0] += offset;
48639
+ this.onError(pos2, "BAD_DIRECTIVE", message, warning);
48640
48640
  });
48641
48641
  this.prelude.push(token.source);
48642
48642
  this.atDirectives = true;
@@ -48725,8 +48725,8 @@ var require_cst_scalar = __commonJS({
48725
48725
  var stringifyString = require_stringifyString();
48726
48726
  function resolveAsScalar(token, strict = true, onError) {
48727
48727
  if (token) {
48728
- const _onError = (pos, code, message) => {
48729
- const offset = typeof pos === "number" ? pos : Array.isArray(pos) ? pos[0] : pos.offset;
48728
+ const _onError = (pos2, code, message) => {
48729
+ const offset = typeof pos2 === "number" ? pos2 : Array.isArray(pos2) ? pos2[0] : pos2.offset;
48730
48730
  if (onError)
48731
48731
  onError(offset, code, message);
48732
48732
  else
@@ -52856,7 +52856,7 @@ function appVersion() {
52856
52856
  return resolveVersion({
52857
52857
  isSea: isSea2(),
52858
52858
  sqVersionXml: readSqVersionXml(),
52859
- define: true ? "0.54.1" : void 0,
52859
+ define: true ? "0.56.0" : void 0,
52860
52860
  pkgVersion: readPkgVersion()
52861
52861
  });
52862
52862
  }
@@ -52866,7 +52866,7 @@ function resolveChannel(s) {
52866
52866
  return "dev";
52867
52867
  }
52868
52868
  function appChannel() {
52869
- return resolveChannel({ isSea: isSea2(), define: true ? "0.54.1" : void 0 });
52869
+ return resolveChannel({ isSea: isSea2(), define: true ? "0.56.0" : void 0 });
52870
52870
  }
52871
52871
 
52872
52872
  // workflow-update.ts
@@ -53805,6 +53805,388 @@ function bakeContractIntoApp(sourcePath, contract) {
53805
53805
  (0, import_node_fs17.writeFileSync)(sourcePath, doc.toString());
53806
53806
  }
53807
53807
 
53808
+ // steel-joints.ts
53809
+ var GROUPS = {
53810
+ "base-plate": { key: "base-plate", label: "Base plates", color: "#6b7a8d" },
53811
+ // darkest plate grey
53812
+ "washer-plate": { key: "washer-plate", label: "Washer plates", color: "#9aafc3" },
53813
+ anchor: { key: "anchor", label: "Anchor rods", color: "#b0c4d8" },
53814
+ // cool zinc-grey
53815
+ nut: { key: "nut", label: "Nuts", color: "#7a8a9e" },
53816
+ washer: { key: "washer", label: "Washers", color: "#dde4ed" },
53817
+ // lightest zinc
53818
+ weld: { key: "weld", label: "Welds", color: "#f97316" },
53819
+ // weld orange (heat) — off the UI error-red
53820
+ // Shear-plate kit — same muted steel band; the fin plate a touch lighter than the base plate so the
53821
+ // two connection types are tellable apart in a mixed model, bolts on the zinc fastener grey.
53822
+ "shear-plate": { key: "shear-plate", label: "Shear plates", color: "#7d8ba0" },
53823
+ bolt: { key: "bolt", label: "Bolts", color: "#b0c4d8" },
53824
+ // cool zinc-grey (matches the anchor fasteners)
53825
+ stiffener: { key: "stiffener", label: "Stiffeners", color: "#9aafc3" },
53826
+ cope: { key: "cope", label: "Copes", color: "#c2703a" }
53827
+ // a muted cut/burn amber — the removed corner (subtractive; rendered as the notch, not a swatch mesh)
53828
+ };
53829
+ var EMBED = 1;
53830
+ function num(params, key, def) {
53831
+ const v = params?.[key];
53832
+ return typeof v === "number" && isFinite(v) ? v : def;
53833
+ }
53834
+ function pos(params, key, def) {
53835
+ const v = num(params, key, def);
53836
+ return v > 0 ? v : def;
53837
+ }
53838
+ function intMin1(params, key, def) {
53839
+ return Math.max(1, Math.round(num(params, key, def)));
53840
+ }
53841
+ function finite3(a) {
53842
+ return Array.isArray(a) && a.length >= 3 && a.every((n) => typeof n === "number" && isFinite(n));
53843
+ }
53844
+ function spread(n, half) {
53845
+ if (n <= 1) return [0];
53846
+ return Array.from({ length: n }, (_, i) => -half + 2 * half * i / (n - 1));
53847
+ }
53848
+ function profileKind(profile) {
53849
+ const p = (profile || "").toUpperCase().trim();
53850
+ if (/^(W|M|S|HP|UC|UB|UKC|UKB|IPE|HE)/.test(p)) return "I";
53851
+ if (/^(C|MC|PFC)/.test(p)) return "C";
53852
+ if (/^L/.test(p)) return "L";
53853
+ if (/^(HSS|PIPE|TS|SHS|RHS|CHS|TUBE|HSQ)/.test(p)) return "TUBE";
53854
+ return "BOX";
53855
+ }
53856
+ function profileOutline(profile, w, d) {
53857
+ const hw = w / 2, hd = d / 2;
53858
+ switch (profileKind(profile)) {
53859
+ case "I": {
53860
+ const tf = Math.min(d * 0.5, Math.max(d * 0.1, 6)), tw = Math.min(w * 0.5, Math.max(w * 0.1, 5));
53861
+ return [
53862
+ [-hw, -hd],
53863
+ [hw, -hd],
53864
+ [hw, -hd + tf],
53865
+ [tw / 2, -hd + tf],
53866
+ [tw / 2, hd - tf],
53867
+ [hw, hd - tf],
53868
+ [hw, hd],
53869
+ [-hw, hd],
53870
+ [-hw, hd - tf],
53871
+ [-tw / 2, hd - tf],
53872
+ [-tw / 2, -hd + tf],
53873
+ [-hw, -hd + tf]
53874
+ ];
53875
+ }
53876
+ case "C": {
53877
+ const tf = Math.max(d * 0.1, 5), tw = Math.max(w * 0.12, 5);
53878
+ return [[-hw, -hd], [hw, -hd], [hw, -hd + tf], [-hw + tw, -hd + tf], [-hw + tw, hd - tf], [hw, hd - tf], [hw, hd], [-hw, hd]];
53879
+ }
53880
+ case "L": {
53881
+ const t = Math.max(Math.min(w, d) * 0.18, 5);
53882
+ return [[-hw, -hd], [hw, -hd], [hw, -hd + t], [-hw + t, -hd + t], [-hw + t, hd], [-hw, hd]];
53883
+ }
53884
+ default:
53885
+ return [[-hw, -hd], [hw, -hd], [hw, hd], [-hw, hd]];
53886
+ }
53887
+ }
53888
+ function expandBasePlate(joint, col) {
53889
+ const p = joint.params;
53890
+ const base = col.from[2] <= col.to[2] ? col.from : col.to;
53891
+ const [bx, by, bz] = base;
53892
+ const { w, d } = col.dims;
53893
+ const thickness = pos(p, "thickness", 25);
53894
+ const margin = Math.max(0, num(p, "margin", 75));
53895
+ const width = pos(p, "plateWidth", Math.max(w, d) + 2 * margin);
53896
+ const depth = pos(p, "plateDepth", Math.max(w, d) + 2 * margin);
53897
+ const boltDia = pos(p, "boltDia", 24);
53898
+ const clearance = num(p, "holeClearance", 6);
53899
+ const edge = num(p, "edgeDist", Math.max(1.5 * boltDia, 40));
53900
+ const cols = intMin1(p, "boltCols", 2);
53901
+ const rows = intMin1(p, "boltRows", 2);
53902
+ const weldLeg = num(p, "weldLeg", 8);
53903
+ const projBelow = num(p, "projBelow", 75);
53904
+ const nutH = pos(p, "nutHeight", 0.8 * boltDia);
53905
+ const nutAF = pos(p, "nutAcrossFlats", 1.6 * boltDia);
53906
+ const wpSide = pos(p, "washerPlateSide", 2.5 * boltDia);
53907
+ const wpThick = pos(p, "washerPlateThickness", Math.max(0.35 * boltDia, 8));
53908
+ const washerOD = pos(p, "washerOuter", 2 * boltDia);
53909
+ const washerID = boltDia + 3;
53910
+ const washerH = pos(p, "washerThickness", Math.max(0.25 * boltDia, 4));
53911
+ const levelingNut = p?.["levelingNut"] !== false;
53912
+ const SEAT = 0.5;
53913
+ const plateTop = bz + EMBED, plateBottom = plateTop - thickness;
53914
+ const us = spread(cols, Math.max(0, width / 2 - edge));
53915
+ const vs = spread(rows, Math.max(0, depth / 2 - edge));
53916
+ const holes = [];
53917
+ const kit = [];
53918
+ let k = 0;
53919
+ for (const v of vs) {
53920
+ for (const u of us) {
53921
+ const ax = bx + u, ay = by + v, jid = joint.id;
53922
+ holes.push({ u, v, d: boltDia + clearance });
53923
+ const wpBot = plateTop + SEAT, wpTop = wpBot + wpThick, washerTop = wpTop + washerH, fnTop = washerTop + nutH;
53924
+ kit.push(
53925
+ { id: `${jid}:rod${k}`, group: "anchor", kind: "rod", from: [ax, ay, plateBottom - projBelow], to: [ax, ay, fnTop + 0.4 * boltDia], d: boltDia, meta: { label: `Anchor rod \u2300${boltDia}` } },
53926
+ { id: `${jid}:wp${k}`, group: "washer-plate", kind: "plate", center: [ax, ay, wpBot + wpThick / 2], uDir: [1, 0, 0], vDir: [0, 1, 0], width: wpSide, depth: wpSide, thickness: wpThick, holes: [{ u: 0, v: 0, d: boltDia + 2 }], meta: { label: `Washer plate ${Math.round(wpSide)}\xD7${Math.round(wpSide)}\xD7${Math.round(wpThick)}` } },
53927
+ { id: `${jid}:wsh${k}`, group: "washer", kind: "washer", from: [ax, ay, wpTop], to: [ax, ay, washerTop], dOuter: washerOD, dInner: washerID, meta: { label: `Washer \u2300${Math.round(washerOD)}` } },
53928
+ { id: `${jid}:fn${k}`, group: "nut", kind: "nut", from: [ax, ay, washerTop], to: [ax, ay, fnTop], acrossFlats: nutAF, meta: { label: `Nut M${boltDia}` } }
53929
+ );
53930
+ if (levelingNut) kit.push({ id: `${jid}:ln${k}`, group: "nut", kind: "nut", from: [ax, ay, plateBottom - SEAT - nutH], to: [ax, ay, plateBottom - SEAT], acrossFlats: nutAF, meta: { label: `Leveling nut M${boltDia}` } });
53931
+ k++;
53932
+ }
53933
+ }
53934
+ const plate = {
53935
+ id: `${joint.id}:plate`,
53936
+ group: "base-plate",
53937
+ kind: "plate",
53938
+ center: [bx, by, plateBottom + thickness / 2],
53939
+ // plate top seats the column (= bz + EMBED); body hangs below
53940
+ uDir: [1, 0, 0],
53941
+ vDir: [0, 1, 0],
53942
+ width,
53943
+ depth,
53944
+ thickness,
53945
+ holes,
53946
+ meta: { label: `Base plate ${Math.round(width)}\xD7${Math.round(depth)}\xD7${Math.round(thickness)}` }
53947
+ };
53948
+ const weld = {
53949
+ id: `${joint.id}:weld`,
53950
+ group: "weld",
53951
+ kind: "weld",
53952
+ path: profileOutline(col.profile, w, d).map(([u, vv]) => [bx + u, by + vv, bz]),
53953
+ leg: weldLeg,
53954
+ meta: { label: `Fillet ${weldLeg}` }
53955
+ };
53956
+ return [plate, ...kit, weld];
53957
+ }
53958
+ function webHalfThk(profile, w) {
53959
+ return profileKind(profile) === "I" ? Math.min(w * 0.5, Math.max(w * 0.1, 5)) / 2 : 0;
53960
+ }
53961
+ function flangeThk(profile, d) {
53962
+ return profileKind(profile) === "I" ? Math.min(d * 0.5, Math.max(d * 0.1, 6)) : d / 2;
53963
+ }
53964
+ var clamp = (x, lo, hi) => Math.max(lo, Math.min(hi, x));
53965
+ function supportWorkZAt(support, pt) {
53966
+ const a = support.from, b = support.to;
53967
+ const dx = b[0] - a[0], dy = b[1] - a[1];
53968
+ const len2 = dx * dx + dy * dy;
53969
+ if (!(len2 > 1e-9)) return a[2];
53970
+ const t = clamp(((pt[0] - a[0]) * dx + (pt[1] - a[1]) * dy) / len2, 0, 1);
53971
+ return a[2] + (b[2] - a[2]) * t;
53972
+ }
53973
+ function beamCopes(beam, support, at, params) {
53974
+ if (!support || !finite3(support.from) || !finite3(support.to) || !support.dims || !(support.dims.d > 0) || !(support.dims.w > 0)) return {};
53975
+ if (!finite3(beam.from) || !finite3(beam.to) || !beam.dims || !(beam.dims.d > 0) || !(beam.dims.w > 0)) return {};
53976
+ if (profileKind(support.profile) !== "I") return {};
53977
+ const endPt = at === "end1" ? beam.to : beam.from;
53978
+ const gap = Math.max(0, num(params, "clearance", 12.7));
53979
+ const beamMidZ = endPt[2] + (typeof beam.posOffset === "number" && isFinite(beam.posOffset) ? beam.posOffset : 0);
53980
+ const beamTopZ = beamMidZ + beam.dims.d / 2, beamBotZ = beamMidZ - beam.dims.d / 2;
53981
+ const supMidZ = supportWorkZAt(support, endPt) + (typeof support.posOffset === "number" && isFinite(support.posOffset) ? support.posOffset : 0);
53982
+ const supTopZ = supMidZ + support.dims.d / 2, supBotZ = supMidZ - support.dims.d / 2;
53983
+ const tfS = flangeThk(support.profile, support.dims.d);
53984
+ const kClear = Math.max(0, num(params, "copeKClear", 12.7));
53985
+ const minLen = Math.max(0, num(params, "copeMinLength", 31.75));
53986
+ const kBand = tfS + kClear;
53987
+ const webLo = supBotZ + kBand, webHi = supTopZ - kBand;
53988
+ if (!(webLo < webHi && beamTopZ > webLo && beamBotZ < webHi)) return {};
53989
+ const length = Math.max(support.dims.w / 2 + gap, minLen);
53990
+ const out = {};
53991
+ if (beamTopZ > webHi) out.top = { depth: clamp(beamTopZ - (webHi - gap), 0, beam.dims.d), length };
53992
+ if (beamBotZ < webLo) out.bottom = { depth: clamp(webLo + gap - beamBotZ, 0, beam.dims.d), length };
53993
+ return out;
53994
+ }
53995
+ var IN = 25.4;
53996
+ function aiscBoltLength(gripMm, diaMm) {
53997
+ const Q = IN / 4;
53998
+ const raw = gripMm + diaMm + Q;
53999
+ const step = raw > 5 * IN ? 2 * Q : Q;
54000
+ return Math.ceil((raw - 1e-6) / step) * step;
54001
+ }
54002
+ function expandShearPlate(joint, beam, support) {
54003
+ const p = joint.params;
54004
+ const atEnd1 = joint.at === "end1";
54005
+ const endPt = atEnd1 ? beam.to : beam.from;
54006
+ const farPt = atEnd1 ? beam.from : beam.to;
54007
+ let ux = farPt[0] - endPt[0], uy = farPt[1] - endPt[1];
54008
+ const hLen = Math.hypot(ux, uy);
54009
+ if (!(hLen > 1e-6)) return [];
54010
+ ux /= hLen;
54011
+ uy /= hLen;
54012
+ const uDir = [ux, uy, 0];
54013
+ const vDir = [0, 0, 1];
54014
+ const nDir = [uy, -ux, 0];
54015
+ const posOff = typeof beam.posOffset === "number" && isFinite(beam.posOffset) ? beam.posOffset : 0;
54016
+ const webZ = endPt[2] + posOff;
54017
+ const P = (u, v, n) => [
54018
+ endPt[0] + uDir[0] * u + nDir[0] * n,
54019
+ endPt[1] + uDir[1] * u + nDir[1] * n,
54020
+ webZ + v
54021
+ ];
54022
+ const thickness = pos(p, "plateThickness", 10);
54023
+ const width = pos(p, "plateWidth", 120);
54024
+ const boltDia = pos(p, "boltDia", 20);
54025
+ const cols = intMin1(p, "boltCols", 1);
54026
+ const rows = intMin1(p, "boltRows", 3);
54027
+ const pitch = pos(p, "boltPitch", 70);
54028
+ const holeClr = num(p, "holeClearance", 2);
54029
+ const edge = Math.max(0, num(p, "edgeDist", Math.max(1.5 * boltDia, 30)));
54030
+ const weldLeg = num(p, "weldLeg", 6);
54031
+ const clearance = Math.max(0, num(p, "clearance", 12.7));
54032
+ const stiffener = p?.["stiffener"] === true;
54033
+ const height = pos(p, "plateHeight", (rows - 1) * pitch + 2 * edge);
54034
+ const twHalf = webHalfThk(beam.profile, beam.dims.w);
54035
+ const webSide = num(p, "webSide", 1) >= 0 ? 1 : -1;
54036
+ const pOff = webSide * (twHalf + thickness / 2);
54037
+ const edgeV = Math.min(edge, height * 0.4);
54038
+ const pV = rows > 1 ? Math.min(pitch, Math.max(0, height - 2 * edgeV) / (rows - 1)) : 0;
54039
+ const vOffs = Array.from({ length: rows }, (_, i) => (i - (rows - 1) / 2) * pV);
54040
+ const edgeU = Math.min(edge, width * 0.4);
54041
+ const regHi = Math.max(edgeU, width - edgeU);
54042
+ const regLo = Math.min(clearance + edgeU, regHi);
54043
+ const cU = (regLo + regHi) / 2;
54044
+ const pU = cols > 1 ? Math.min(pitch, (regHi - regLo) / (cols - 1)) : 0;
54045
+ const uOffs = Array.from({ length: cols }, (_, j) => cU + (j - (cols - 1) / 2) * pU);
54046
+ const nutH = 0.8 * boltDia, nutAF = 1.6 * boltDia;
54047
+ const plateOuterN = webSide * (twHalf + thickness);
54048
+ const webFarN = -webSide * twHalf;
54049
+ const headTipN = plateOuterN + webSide * nutH;
54050
+ const nutTipN = webFarN - webSide * nutH;
54051
+ const grade = p?.["boltGrade"] === "A490" ? "A490" : "A325";
54052
+ const grip = thickness + 2 * twHalf;
54053
+ const boltLen = aiscBoltLength(grip, boltDia);
54054
+ const callout = `\u2300${Math.round(boltDia)} ${grade} \xD7 ${Math.round(boltLen)}`;
54055
+ const holes = [];
54056
+ const bolts = [];
54057
+ let k = 0;
54058
+ for (const v of vOffs) {
54059
+ for (const u of uOffs) {
54060
+ const jid = joint.id;
54061
+ holes.push({ u: u - width / 2, v, d: boltDia + holeClr });
54062
+ bolts.push(
54063
+ // the shank = the AISC bolt LENGTH, from under the head (plate outer face) into the connection
54064
+ { id: `${jid}:bolt${k}`, group: "bolt", kind: "rod", from: P(u, v, plateOuterN), to: P(u, v, plateOuterN - webSide * boltLen), d: boltDia, meta: { label: `Bolt ${callout}` } },
54065
+ { id: `${jid}:head${k}`, group: "nut", kind: "nut", from: P(u, v, plateOuterN), to: P(u, v, headTipN), acrossFlats: nutAF, meta: { label: `Bolt head ${callout}` } },
54066
+ { id: `${jid}:nut${k}`, group: "nut", kind: "nut", from: P(u, v, webFarN), to: P(u, v, nutTipN), acrossFlats: nutAF, meta: { label: `Bolt nut ${callout}` } }
54067
+ );
54068
+ k++;
54069
+ }
54070
+ }
54071
+ const plate = {
54072
+ id: `${joint.id}:plate`,
54073
+ group: "shear-plate",
54074
+ kind: "plate",
54075
+ center: P(width / 2, 0, pOff),
54076
+ uDir,
54077
+ vDir,
54078
+ // welded edge at u=0 (the support); lapped on the webSide face; cantilevered +uDir toward the beam
54079
+ width,
54080
+ depth: height,
54081
+ thickness,
54082
+ holes,
54083
+ meta: { label: `Shear plate ${Math.round(width)}\xD7${Math.round(height)}\xD7${Math.round(thickness)}` }
54084
+ };
54085
+ const weld = {
54086
+ id: `${joint.id}:weld`,
54087
+ group: "weld",
54088
+ kind: "weld",
54089
+ closed: false,
54090
+ path: [P(0, -height / 2, pOff), P(0, height / 2, pOff)],
54091
+ leg: weldLeg,
54092
+ meta: { label: `Fillet ${weldLeg}` }
54093
+ };
54094
+ const parts = [plate, ...bolts, weld];
54095
+ if (stiffener) {
54096
+ if (support && support.role === "beam" && finite3(support.from) && finite3(support.to) && support.dims && support.dims.d > 0 && support.dims.w > 0) {
54097
+ const supPosOff = typeof support.posOffset === "number" && isFinite(support.posOffset) ? support.posOffset : 0;
54098
+ const twGirder = webHalfThk(support.profile, support.dims.w) * 2;
54099
+ const stiffH = support.dims.d * 0.9;
54100
+ const stiffW = Math.max(support.dims.w / 2 - twGirder / 2, thickness * 2);
54101
+ const girderCentZ = endPt[2] + supPosOff;
54102
+ const cu = -(twGirder / 2 + stiffW / 2);
54103
+ const center = [endPt[0] + uDir[0] * cu, endPt[1] + uDir[1] * cu, girderCentZ];
54104
+ parts.push({ id: `${joint.id}:stiff`, group: "stiffener", kind: "plate", center, uDir, vDir, width: stiffW, depth: stiffH, thickness, holes: [], meta: { label: `Stiffener ${Math.round(stiffW)}\xD7${Math.round(stiffH)}\xD7${Math.round(thickness)}` } });
54105
+ const wfx = endPt[0] - uDir[0] * (twGirder / 2), wfy = endPt[1] - uDir[1] * (twGirder / 2);
54106
+ parts.push({ id: `${joint.id}:stiffweld`, group: "weld", kind: "weld", closed: false, path: [[wfx, wfy, girderCentZ - stiffH / 2], [wfx, wfy, girderCentZ + stiffH / 2]], leg: weldLeg, meta: { label: `Fillet ${weldLeg}` } });
54107
+ } else {
54108
+ const oppOff = -webSide * (twHalf + thickness / 2);
54109
+ parts.push({ id: `${joint.id}:stiff`, group: "stiffener", kind: "plate", center: P(width / 2, 0, oppOff), uDir, vDir, width, depth: height, thickness, holes: [], meta: { label: `Stiffener ${Math.round(width)}\xD7${Math.round(height)}\xD7${Math.round(thickness)}` } });
54110
+ parts.push({ id: `${joint.id}:stiffweld`, group: "weld", kind: "weld", closed: false, path: [P(0, -height / 2, oppOff), P(0, height / 2, oppOff)], leg: weldLeg, meta: { label: `Fillet ${weldLeg}` } });
54111
+ }
54112
+ }
54113
+ const cope = beamCopes(beam, support, joint.at ?? "end0", p);
54114
+ const copeRadius = pos(p, "copeRadius", 12.7);
54115
+ const MIN_COPE = 1;
54116
+ const pushCope = (side, dec) => {
54117
+ if (!(dec.depth > MIN_COPE)) return;
54118
+ const lenU = dec.length + clearance;
54119
+ const vC = side === "top" ? beam.dims.d / 2 - dec.depth / 2 : -beam.dims.d / 2 + dec.depth / 2;
54120
+ parts.push({
54121
+ id: `${joint.id}:cope-${side}`,
54122
+ group: "cope",
54123
+ kind: "cut",
54124
+ member: beam.id,
54125
+ center: P(lenU / 2, vC, 0),
54126
+ uDir,
54127
+ vDir,
54128
+ width: lenU,
54129
+ depth: dec.depth,
54130
+ thickness: beam.dims.w + 2,
54131
+ radius: copeRadius,
54132
+ meta: { label: `${side === "top" ? "Top" : "Bottom"} cope ${Math.round(dec.length)}\xD7${Math.round(dec.depth)}` }
54133
+ });
54134
+ };
54135
+ if (cope.top) pushCope("top", cope.top);
54136
+ if (cope.bottom) pushCope("bottom", cope.bottom);
54137
+ return parts;
54138
+ }
54139
+ function expandJoints(joints, memberGeo) {
54140
+ const elements = [];
54141
+ const skipped = [];
54142
+ const usedGroups = /* @__PURE__ */ new Set();
54143
+ (joints ?? []).forEach((j, i) => {
54144
+ if (!j || !j.id || !j.main) {
54145
+ skipped.push(j?.id || `joint#${i}`);
54146
+ return;
54147
+ }
54148
+ if (j.kind === "base-plate") {
54149
+ const col = memberGeo.get(j.main);
54150
+ if (!col || col.role !== "column") {
54151
+ skipped.push(j.id);
54152
+ return;
54153
+ }
54154
+ if (!finite3(col.from) || !finite3(col.to) || !col.dims || !(col.dims.w > 0) || !(col.dims.d > 0)) {
54155
+ skipped.push(j.id);
54156
+ return;
54157
+ }
54158
+ for (const part of expandBasePlate(j, col)) {
54159
+ elements.push(part);
54160
+ usedGroups.add(part.group);
54161
+ }
54162
+ } else if (j.kind === "shear-plate") {
54163
+ const beam = memberGeo.get(j.main);
54164
+ if (!beam || beam.role !== "beam") {
54165
+ skipped.push(j.id);
54166
+ return;
54167
+ }
54168
+ if (!finite3(beam.from) || !finite3(beam.to) || !beam.dims || !(beam.dims.w > 0) || !(beam.dims.d > 0)) {
54169
+ skipped.push(j.id);
54170
+ return;
54171
+ }
54172
+ const support = j.secondaries && j.secondaries[0] ? memberGeo.get(j.secondaries[0]) : void 0;
54173
+ const parts = expandShearPlate(j, beam, support);
54174
+ if (!parts.length) {
54175
+ skipped.push(j.id);
54176
+ return;
54177
+ }
54178
+ for (const part of parts) {
54179
+ elements.push(part);
54180
+ if (part.kind !== "cut") usedGroups.add(part.group);
54181
+ }
54182
+ } else {
54183
+ skipped.push(j.id);
54184
+ }
54185
+ });
54186
+ const groups = [...usedGroups].map((k) => GROUPS[k]);
54187
+ return { elements, groups, skipped };
54188
+ }
54189
+
53808
54190
  // contract-to-scene.ts
53809
54191
  var FT_TO_MM = 304.8;
53810
54192
  var IN_TO_MM = 25.4;
@@ -53850,9 +54232,20 @@ function dispToMm(pt, ptPerFt) {
53850
54232
  function contractToScene(contractInput) {
53851
54233
  const contract = contractInput ?? {};
53852
54234
  const elements = [];
54235
+ const memberGeo = /* @__PURE__ */ new Map();
53853
54236
  const skipped = [];
53854
54237
  const profileOrder = [];
53855
54238
  const seenProfile = /* @__PURE__ */ new Set();
54239
+ const beamClear = /* @__PURE__ */ new Map();
54240
+ for (const j of contract.joints ?? []) {
54241
+ if (!j || j.kind !== "shear-plate" || !j.main || j.at !== "end0" && j.at !== "end1") continue;
54242
+ const pc = j.params?.["clearance"];
54243
+ const cl = typeof pc === "number" && isFinite(pc) ? Math.max(0, pc) : 12.7;
54244
+ const cur = beamClear.get(j.main) ?? { e0: 0, e1: 0 };
54245
+ if (j.at === "end0") cur.e0 = Math.max(cur.e0, cl);
54246
+ else cur.e1 = Math.max(cur.e1, cl);
54247
+ beamClear.set(j.main, cur);
54248
+ }
53856
54249
  for (const plan of contract.plans ?? []) {
53857
54250
  const ptPerFt = plan.pt_per_ft && plan.pt_per_ft > 0 ? plan.pt_per_ft : 1;
53858
54251
  const defaultTosMm = (plan.default_tos ?? 0) * IN_TO_MM;
@@ -53871,19 +54264,37 @@ function contractToScene(contractInput) {
53871
54264
  const [bx, by] = dispToMm(m.wp[1], ptPerFt);
53872
54265
  let from;
53873
54266
  let to;
54267
+ let workFrom;
54268
+ let workTo;
54269
+ let posOffset = 0;
53874
54270
  if (m.role === "column") {
53875
54271
  const bos = m.col?.bos != null ? m.col.bos * IN_TO_MM : 0;
53876
54272
  const tos = m.col?.tos != null ? m.col.tos * IN_TO_MM : defaultTosMm;
53877
54273
  from = [ax, ay, bos];
53878
54274
  to = [ax, ay, tos];
54275
+ workFrom = from;
54276
+ workTo = to;
53879
54277
  } else {
53880
54278
  const z0 = m.ends?.[0]?.tos != null ? m.ends[0].tos * IN_TO_MM : defaultTosMm;
53881
54279
  const z1 = m.ends?.[1]?.tos != null ? m.ends[1].tos * IN_TO_MM : defaultTosMm;
53882
- const pos = depthPosition(m.position, Math.abs(z1 - z0), Math.hypot(bx - ax, by - ay));
53883
- const zoff = pos === "top" ? -dims.d / 2 : pos === "bottom" ? dims.d / 2 : 0;
54280
+ workFrom = [ax, ay, z0];
54281
+ workTo = [bx, by, z1];
54282
+ const pos2 = depthPosition(m.position, Math.abs(z1 - z0), Math.hypot(bx - ax, by - ay));
54283
+ const zoff = pos2 === "top" ? -dims.d / 2 : pos2 === "bottom" ? dims.d / 2 : 0;
54284
+ posOffset = zoff;
53884
54285
  from = [ax, ay, z0 + zoff];
53885
54286
  to = [bx, by, z1 + zoff];
53886
54287
  }
54288
+ memberGeo.set(m.id, { id: m.id, role: m.role === "column" ? "column" : "beam", from: workFrom, to: workTo, dims: { w: dims.w, d: dims.d }, profile, posOffset });
54289
+ const clr = beamClear.get(m.id);
54290
+ if (clr && m.role !== "column") {
54291
+ const dx = to[0] - from[0], dy = to[1] - from[1], dz = to[2] - from[2];
54292
+ const L = Math.hypot(dx, dy, dz) || 1;
54293
+ const ex = dx / L, ey = dy / L, ez = dz / L;
54294
+ const e0 = Math.min(Math.max(0, clr.e0), L * 0.4), e1 = Math.min(Math.max(0, clr.e1), L * 0.4);
54295
+ if (e0 > 0) from = [from[0] + ex * e0, from[1] + ey * e0, from[2] + ez * e0];
54296
+ if (e1 > 0) to = [to[0] - ex * e1, to[1] - ey * e1, to[2] - ez * e1];
54297
+ }
53887
54298
  elements.push({ id: m.id, group: profile, kind: "box", from, to, section: { w: dims.w, d: dims.d }, meta: { profile } });
53888
54299
  }
53889
54300
  }
@@ -53892,6 +54303,10 @@ function contractToScene(contractInput) {
53892
54303
  label: profile,
53893
54304
  color: pickColor(profile, i, contract)
53894
54305
  }));
54306
+ const joints = expandJoints(contract.joints, memberGeo);
54307
+ for (const part of joints.elements) elements.push(part);
54308
+ for (const g of joints.groups) groups.push(g);
54309
+ for (const id of joints.skipped) skipped.push(`joint:${id}`);
53895
54310
  return {
53896
54311
  scene: { meta: { name: contract.title || "Steel Model", units: "mm", up: "z" }, groups, elements },
53897
54312
  skipped
@@ -57292,9 +57707,9 @@ var clen = function(cf, cl) {
57292
57707
  l += cf[i] * cl[i];
57293
57708
  return l;
57294
57709
  };
57295
- var wfblk = function(out, pos, dat) {
57710
+ var wfblk = function(out, pos2, dat) {
57296
57711
  var s = dat.length;
57297
- var o = shft(pos + 2);
57712
+ var o = shft(pos2 + 2);
57298
57713
  out[o] = s & 255;
57299
57714
  out[o + 1] = s >> 8;
57300
57715
  out[o + 2] = out[o] ^ 255;
@@ -57374,9 +57789,9 @@ var dflt = function(dat, lvl, plvl, pre, post, st) {
57374
57789
  var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7e3)) + post);
57375
57790
  var w = o.subarray(pre, o.length - post);
57376
57791
  var lst = st.l;
57377
- var pos = (st.r || 0) & 7;
57792
+ var pos2 = (st.r || 0) & 7;
57378
57793
  if (lvl) {
57379
- if (pos)
57794
+ if (pos2)
57380
57795
  w[0] = st.r >> 3;
57381
57796
  var opt = deo[lvl - 1];
57382
57797
  var n = opt >> 13, c = opt & 8191;
@@ -57397,7 +57812,7 @@ var dflt = function(dat, lvl, plvl, pre, post, st) {
57397
57812
  if (wi <= i) {
57398
57813
  var rem = s - i;
57399
57814
  if ((lc_1 > 7e3 || li > 24576) && (rem > 423 || !lst)) {
57400
- pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);
57815
+ pos2 = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos2);
57401
57816
  li = lc_1 = eb = 0, bs = i;
57402
57817
  for (var j = 0; j < 286; ++j)
57403
57818
  lf[j] = 0;
@@ -57451,24 +57866,24 @@ var dflt = function(dat, lvl, plvl, pre, post, st) {
57451
57866
  syms[li++] = dat[i];
57452
57867
  ++lf[dat[i]];
57453
57868
  }
57454
- pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);
57869
+ pos2 = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos2);
57455
57870
  if (!lst) {
57456
- st.r = pos & 7 | w[pos / 8 | 0] << 3;
57457
- pos -= 7;
57871
+ st.r = pos2 & 7 | w[pos2 / 8 | 0] << 3;
57872
+ pos2 -= 7;
57458
57873
  st.h = head, st.p = prev, st.i = i, st.w = wi;
57459
57874
  }
57460
57875
  } else {
57461
57876
  for (var i = st.w || 0; i < s + lst; i += 65535) {
57462
57877
  var e = i + 65535;
57463
57878
  if (e >= s) {
57464
- w[pos / 8 | 0] = lst;
57879
+ w[pos2 / 8 | 0] = lst;
57465
57880
  e = s;
57466
57881
  }
57467
- pos = wfblk(w, pos + 1, dat.subarray(i, e));
57882
+ pos2 = wfblk(w, pos2 + 1, dat.subarray(i, e));
57468
57883
  }
57469
57884
  st.i = s;
57470
57885
  }
57471
- return slc(o, 0, pre + shft(pos) + post);
57886
+ return slc(o, 0, pre + shft(pos2) + post);
57472
57887
  };
57473
57888
  var crct = /* @__PURE__ */ (function() {
57474
57889
  var t = new Int32Array(256);
@@ -58485,16 +58900,16 @@ function memberTons(contract, m) {
58485
58900
  }
58486
58901
  function rollup(members, countWeighted = false) {
58487
58902
  const counts = emptyCounts();
58488
- let num = 0, den = 0, tons = 0;
58903
+ let num2 = 0, den = 0, tons = 0;
58489
58904
  for (const m of members) {
58490
58905
  counts[m.band]++;
58491
58906
  if (m.band === "rfi") continue;
58492
58907
  const w = countWeighted ? 1 : m.tons;
58493
- num += w * BAND_WEIGHT[m.band];
58908
+ num2 += w * BAND_WEIGHT[m.band];
58494
58909
  den += w;
58495
58910
  tons += m.tons;
58496
58911
  }
58497
- return { score: den > 0 ? Math.round(num / den * 100) : null, tons, counts };
58912
+ return { score: den > 0 ? Math.round(num2 / den * 100) : null, tons, counts };
58498
58913
  }
58499
58914
  function bandEnd(end, rows) {
58500
58915
  const row = end.conn ? rows.get(end.conn) : void 0;
@@ -58530,14 +58945,14 @@ function scoreConnections(contractInput) {
58530
58945
  }
58531
58946
  });
58532
58947
  const counts = emptyCounts();
58533
- let num = 0, den = 0;
58948
+ let num2 = 0, den = 0;
58534
58949
  for (const e of byEnd) {
58535
58950
  counts[e.band]++;
58536
58951
  if (e.band === "rfi") continue;
58537
- num += BAND_WEIGHT[e.band];
58952
+ num2 += BAND_WEIGHT[e.band];
58538
58953
  den += 1;
58539
58954
  }
58540
- const category = { score: den > 0 ? Math.round(num / den * 100) : null, tons: 0, counts };
58955
+ const category = { score: den > 0 ? Math.round(num2 / den * 100) : null, tons: 0, counts };
58541
58956
  return { byEnd, category };
58542
58957
  }
58543
58958
  function scoreContract(contractInput) {
@@ -58584,7 +58999,7 @@ function scoreContract(contractInput) {
58584
58999
  const columns = rollup(byMember.filter((m) => m.role === "column"));
58585
59000
  const details = rollupDetails(byDetail);
58586
59001
  const scored = byMember.filter((m) => m.band !== "rfi");
58587
- const num = scored.reduce((s, m) => s + m.tons * BAND_WEIGHT[m.band], 0);
59002
+ const num2 = scored.reduce((s, m) => s + m.tons * BAND_WEIGHT[m.band], 0);
58588
59003
  const den = scored.reduce((s, m) => s + m.tons, 0);
58589
59004
  return {
58590
59005
  byMember,
@@ -58602,7 +59017,7 @@ function scoreContract(contractInput) {
58602
59017
  note: "Approximate in v1 \u2014 precise per-segment binding is Slice 2."
58603
59018
  },
58604
59019
  overall: {
58605
- score: den > 0 ? Math.round(num / den * 100) : null,
59020
+ score: den > 0 ? Math.round(num2 / den * 100) : null,
58606
59021
  tons: den,
58607
59022
  rfiCount: byMember.filter((m) => m.band === "rfi").length
58608
59023
  }
@@ -58614,13 +59029,13 @@ function detailSheet(text) {
58614
59029
  }
58615
59030
  function rollupDetails(details) {
58616
59031
  const counts = emptyCounts();
58617
- let num = 0, den = 0;
59032
+ let num2 = 0, den = 0;
58618
59033
  for (const d of details) {
58619
59034
  counts[d.band]++;
58620
- num += BAND_WEIGHT[d.band];
59035
+ num2 += BAND_WEIGHT[d.band];
58621
59036
  den += 1;
58622
59037
  }
58623
- return { score: den > 0 ? Math.round(num / den * 100) : null, tons: 0, counts };
59038
+ return { score: den > 0 ? Math.round(num2 / den * 100) : null, tons: 0, counts };
58624
59039
  }
58625
59040
 
58626
59041
  // contract-score.ts
@@ -60665,6 +61080,8 @@ var import_yaml8 = __toESM(require_dist6(), 1);
60665
61080
  var PRODUCT_SKILLS = [
60666
61081
  "floless-app-bridge",
60667
61082
  // drive the floless.app CLI / desktop bridge from the user's AI
61083
+ "floless-app-new-workflow",
61084
+ // build a brand-new .flo from scratch, step by step, verifying each step (the create-sibling of onboarding's tour)
60668
61085
  "floless-app-onboarding",
60669
61086
  // guided, re-runnable tour of AWARE + floless.app for new users
60670
61087
  "floless-app-queue",
@@ -62766,9 +63183,9 @@ async function startServer() {
62766
63183
  if (!title || !body) {
62767
63184
  return reply.status(400).send({ ok: false, error: "title and body are required" });
62768
63185
  }
62769
- const clamp = (s, n) => s.length > n ? s.slice(0, n) : s;
63186
+ const clamp2 = (s, n) => s.length > n ? s.slice(0, n) : s;
62770
63187
  const context = b.context && typeof b.context === "object" && !Array.isArray(b.context) && JSON.stringify(b.context).length <= 16e3 ? b.context : void 0;
62771
- const result = await reportIssue({ category, title: clamp(title, 200), body: clamp(body, 12e3), context });
63188
+ const result = await reportIssue({ category, title: clamp2(title, 200), body: clamp2(body, 12e3), context });
62772
63189
  if (result.ok) return { ok: true, ref: result.ref };
62773
63190
  const status = result.error === "signed_out" ? 401 : result.error === "rate_limited" ? 429 : 503;
62774
63191
  return reply.status(status).send({ ok: false, error: result.error });
@@ -63876,6 +64293,18 @@ async function startServer() {
63876
64293
  broadcast({ type: "request-added", request });
63877
64294
  return { ok: true, request };
63878
64295
  });
64296
+ app.post("/api/guide", async (req, reply) => {
64297
+ const { appId } = req.body ?? {};
64298
+ if (!appId) return reply.status(400).send({ ok: false, error: "appId required" });
64299
+ const request = addRequest({ type: "guide", appId });
64300
+ broadcast({ type: "request-added", request });
64301
+ return { ok: true, request };
64302
+ });
64303
+ app.post("/api/guide-new", async (_req, _reply) => {
64304
+ const request = addRequest({ type: "new-workflow" });
64305
+ broadcast({ type: "request-added", request });
64306
+ return { ok: true, request };
64307
+ });
63879
64308
  app.delete("/api/requests/:id", async (req, reply) => {
63880
64309
  if (!deleteRequest(req.params.id)) return reply.status(404).send({ ok: false, error: "request not found" });
63881
64310
  broadcast({ type: "requests-changed" });