@probelabs/probe 0.6.0-rc266 → 0.6.0-rc267

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/cjs/index.cjs CHANGED
@@ -13966,7 +13966,7 @@ var require_fxp = __commonJS({
13966
13966
  }, o: (t6, e6) => Object.prototype.hasOwnProperty.call(t6, e6), r: (t6) => {
13967
13967
  "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t6, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t6, "__esModule", { value: true });
13968
13968
  } }, e5 = {};
13969
- t5.r(e5), t5.d(e5, { XMLBuilder: () => dt, XMLParser: () => it, XMLValidator: () => gt });
13969
+ t5.r(e5), t5.d(e5, { XMLBuilder: () => gt, XMLParser: () => it, XMLValidator: () => xt });
13970
13970
  const n5 = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", i5 = new RegExp("^[" + n5 + "][" + n5 + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
13971
13971
  function s5(t6, e6) {
13972
13972
  const n6 = [];
@@ -13988,90 +13988,90 @@ var require_fxp = __commonJS({
13988
13988
  const n6 = [];
13989
13989
  let i6 = false, s6 = false;
13990
13990
  "\uFEFF" === t6[0] && (t6 = t6.substr(1));
13991
- for (let o6 = 0; o6 < t6.length; o6++) if ("<" === t6[o6] && "?" === t6[o6 + 1]) {
13992
- if (o6 += 2, o6 = u5(t6, o6), o6.err) return o6;
13991
+ for (let r6 = 0; r6 < t6.length; r6++) if ("<" === t6[r6] && "?" === t6[r6 + 1]) {
13992
+ if (r6 += 2, r6 = u5(t6, r6), r6.err) return r6;
13993
13993
  } else {
13994
- if ("<" !== t6[o6]) {
13995
- if (l5(t6[o6])) continue;
13996
- return m5("InvalidChar", "char '" + t6[o6] + "' is not expected.", b5(t6, o6));
13994
+ if ("<" !== t6[r6]) {
13995
+ if (l5(t6[r6])) continue;
13996
+ return m5("InvalidChar", "char '" + t6[r6] + "' is not expected.", N(t6, r6));
13997
13997
  }
13998
13998
  {
13999
- let a6 = o6;
14000
- if (o6++, "!" === t6[o6]) {
14001
- o6 = h5(t6, o6);
13999
+ let o6 = r6;
14000
+ if (r6++, "!" === t6[r6]) {
14001
+ r6 = d5(t6, r6);
14002
14002
  continue;
14003
14003
  }
14004
14004
  {
14005
- let d6 = false;
14006
- "/" === t6[o6] && (d6 = true, o6++);
14007
- let p6 = "";
14008
- for (; o6 < t6.length && ">" !== t6[o6] && " " !== t6[o6] && " " !== t6[o6] && "\n" !== t6[o6] && "\r" !== t6[o6]; o6++) p6 += t6[o6];
14009
- if (p6 = p6.trim(), "/" === p6[p6.length - 1] && (p6 = p6.substring(0, p6.length - 1), o6--), !r5(p6)) {
14005
+ let a6 = false;
14006
+ "/" === t6[r6] && (a6 = true, r6++);
14007
+ let h6 = "";
14008
+ for (; r6 < t6.length && ">" !== t6[r6] && " " !== t6[r6] && " " !== t6[r6] && "\n" !== t6[r6] && "\r" !== t6[r6]; r6++) h6 += t6[r6];
14009
+ if (h6 = h6.trim(), "/" === h6[h6.length - 1] && (h6 = h6.substring(0, h6.length - 1), r6--), !b5(h6)) {
14010
14010
  let e7;
14011
- return e7 = 0 === p6.trim().length ? "Invalid space after '<'." : "Tag '" + p6 + "' is an invalid name.", m5("InvalidTag", e7, b5(t6, o6));
14011
+ return e7 = 0 === h6.trim().length ? "Invalid space after '<'." : "Tag '" + h6 + "' is an invalid name.", m5("InvalidTag", e7, N(t6, r6));
14012
14012
  }
14013
- const c6 = f5(t6, o6);
14014
- if (false === c6) return m5("InvalidAttr", "Attributes for '" + p6 + "' have open quote.", b5(t6, o6));
14015
- let E3 = c6.value;
14016
- if (o6 = c6.index, "/" === E3[E3.length - 1]) {
14017
- const n7 = o6 - E3.length;
14018
- E3 = E3.substring(0, E3.length - 1);
14019
- const s7 = g5(E3, e6);
14020
- if (true !== s7) return m5(s7.err.code, s7.err.msg, b5(t6, n7 + s7.err.line));
14013
+ const p6 = c5(t6, r6);
14014
+ if (false === p6) return m5("InvalidAttr", "Attributes for '" + h6 + "' have open quote.", N(t6, r6));
14015
+ let f6 = p6.value;
14016
+ if (r6 = p6.index, "/" === f6[f6.length - 1]) {
14017
+ const n7 = r6 - f6.length;
14018
+ f6 = f6.substring(0, f6.length - 1);
14019
+ const s7 = g5(f6, e6);
14020
+ if (true !== s7) return m5(s7.err.code, s7.err.msg, N(t6, n7 + s7.err.line));
14021
14021
  i6 = true;
14022
- } else if (d6) {
14023
- if (!c6.tagClosed) return m5("InvalidTag", "Closing tag '" + p6 + "' doesn't have proper closing.", b5(t6, o6));
14024
- if (E3.trim().length > 0) return m5("InvalidTag", "Closing tag '" + p6 + "' can't have attributes or invalid starting.", b5(t6, a6));
14025
- if (0 === n6.length) return m5("InvalidTag", "Closing tag '" + p6 + "' has not been opened.", b5(t6, a6));
14022
+ } else if (a6) {
14023
+ if (!p6.tagClosed) return m5("InvalidTag", "Closing tag '" + h6 + "' doesn't have proper closing.", N(t6, r6));
14024
+ if (f6.trim().length > 0) return m5("InvalidTag", "Closing tag '" + h6 + "' can't have attributes or invalid starting.", N(t6, o6));
14025
+ if (0 === n6.length) return m5("InvalidTag", "Closing tag '" + h6 + "' has not been opened.", N(t6, o6));
14026
14026
  {
14027
14027
  const e7 = n6.pop();
14028
- if (p6 !== e7.tagName) {
14029
- let n7 = b5(t6, e7.tagStartPos);
14030
- return m5("InvalidTag", "Expected closing tag '" + e7.tagName + "' (opened in line " + n7.line + ", col " + n7.col + ") instead of closing tag '" + p6 + "'.", b5(t6, a6));
14028
+ if (h6 !== e7.tagName) {
14029
+ let n7 = N(t6, e7.tagStartPos);
14030
+ return m5("InvalidTag", "Expected closing tag '" + e7.tagName + "' (opened in line " + n7.line + ", col " + n7.col + ") instead of closing tag '" + h6 + "'.", N(t6, o6));
14031
14031
  }
14032
14032
  0 == n6.length && (s6 = true);
14033
14033
  }
14034
14034
  } else {
14035
- const r6 = g5(E3, e6);
14036
- if (true !== r6) return m5(r6.err.code, r6.err.msg, b5(t6, o6 - E3.length + r6.err.line));
14037
- if (true === s6) return m5("InvalidXml", "Multiple possible root nodes found.", b5(t6, o6));
14038
- -1 !== e6.unpairedTags.indexOf(p6) || n6.push({ tagName: p6, tagStartPos: a6 }), i6 = true;
14035
+ const a7 = g5(f6, e6);
14036
+ if (true !== a7) return m5(a7.err.code, a7.err.msg, N(t6, r6 - f6.length + a7.err.line));
14037
+ if (true === s6) return m5("InvalidXml", "Multiple possible root nodes found.", N(t6, r6));
14038
+ -1 !== e6.unpairedTags.indexOf(h6) || n6.push({ tagName: h6, tagStartPos: o6 }), i6 = true;
14039
14039
  }
14040
- for (o6++; o6 < t6.length; o6++) if ("<" === t6[o6]) {
14041
- if ("!" === t6[o6 + 1]) {
14042
- o6++, o6 = h5(t6, o6);
14040
+ for (r6++; r6 < t6.length; r6++) if ("<" === t6[r6]) {
14041
+ if ("!" === t6[r6 + 1]) {
14042
+ r6++, r6 = d5(t6, r6);
14043
14043
  continue;
14044
14044
  }
14045
- if ("?" !== t6[o6 + 1]) break;
14046
- if (o6 = u5(t6, ++o6), o6.err) return o6;
14047
- } else if ("&" === t6[o6]) {
14048
- const e7 = x5(t6, o6);
14049
- if (-1 == e7) return m5("InvalidChar", "char '&' is not expected.", b5(t6, o6));
14050
- o6 = e7;
14051
- } else if (true === s6 && !l5(t6[o6])) return m5("InvalidXml", "Extra text at the end", b5(t6, o6));
14052
- "<" === t6[o6] && o6--;
14045
+ if ("?" !== t6[r6 + 1]) break;
14046
+ if (r6 = u5(t6, ++r6), r6.err) return r6;
14047
+ } else if ("&" === t6[r6]) {
14048
+ const e7 = x5(t6, r6);
14049
+ if (-1 == e7) return m5("InvalidChar", "char '&' is not expected.", N(t6, r6));
14050
+ r6 = e7;
14051
+ } else if (true === s6 && !l5(t6[r6])) return m5("InvalidXml", "Extra text at the end", N(t6, r6));
14052
+ "<" === t6[r6] && r6--;
14053
14053
  }
14054
14054
  }
14055
14055
  }
14056
- return i6 ? 1 == n6.length ? m5("InvalidTag", "Unclosed tag '" + n6[0].tagName + "'.", b5(t6, n6[0].tagStartPos)) : !(n6.length > 0) || m5("InvalidXml", "Invalid '" + JSON.stringify(n6.map(((t7) => t7.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m5("InvalidXml", "Start tag expected.", 1);
14056
+ return i6 ? 1 == n6.length ? m5("InvalidTag", "Unclosed tag '" + n6[0].tagName + "'.", N(t6, n6[0].tagStartPos)) : !(n6.length > 0) || m5("InvalidXml", "Invalid '" + JSON.stringify(n6.map((t7) => t7.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m5("InvalidXml", "Start tag expected.", 1);
14057
14057
  }
14058
14058
  function l5(t6) {
14059
14059
  return " " === t6 || " " === t6 || "\n" === t6 || "\r" === t6;
14060
14060
  }
14061
14061
  function u5(t6, e6) {
14062
14062
  const n6 = e6;
14063
- for (; e6 < t6.length; e6++) if ("?" != t6[e6] && " " != t6[e6]) ;
14064
- else {
14063
+ for (; e6 < t6.length; e6++) if ("?" == t6[e6] || " " == t6[e6]) {
14065
14064
  const i6 = t6.substr(n6, e6 - n6);
14066
- if (e6 > 5 && "xml" === i6) return m5("InvalidXml", "XML declaration allowed only at the start of the document.", b5(t6, e6));
14065
+ if (e6 > 5 && "xml" === i6) return m5("InvalidXml", "XML declaration allowed only at the start of the document.", N(t6, e6));
14067
14066
  if ("?" == t6[e6] && ">" == t6[e6 + 1]) {
14068
14067
  e6++;
14069
14068
  break;
14070
14069
  }
14070
+ continue;
14071
14071
  }
14072
14072
  return e6;
14073
14073
  }
14074
- function h5(t6, e6) {
14074
+ function d5(t6, e6) {
14075
14075
  if (t6.length > e6 + 5 && "-" === t6[e6 + 1] && "-" === t6[e6 + 2]) {
14076
14076
  for (e6 += 3; e6 < t6.length; e6++) if ("-" === t6[e6] && "-" === t6[e6 + 1] && ">" === t6[e6 + 2]) {
14077
14077
  e6 += 2;
@@ -14089,11 +14089,11 @@ var require_fxp = __commonJS({
14089
14089
  }
14090
14090
  return e6;
14091
14091
  }
14092
- const d5 = '"', p5 = "'";
14093
- function f5(t6, e6) {
14092
+ const h5 = '"', p5 = "'";
14093
+ function c5(t6, e6) {
14094
14094
  let n6 = "", i6 = "", s6 = false;
14095
14095
  for (; e6 < t6.length; e6++) {
14096
- if (t6[e6] === d5 || t6[e6] === p5) "" === i6 ? i6 = t6[e6] : i6 !== t6[e6] || (i6 = "");
14096
+ if (t6[e6] === h5 || t6[e6] === p5) "" === i6 ? i6 = t6[e6] : i6 !== t6[e6] || (i6 = "");
14097
14097
  else if (">" === t6[e6] && "" === i6) {
14098
14098
  s6 = true;
14099
14099
  break;
@@ -14102,16 +14102,16 @@ var require_fxp = __commonJS({
14102
14102
  }
14103
14103
  return "" === i6 && { value: n6, index: e6, tagClosed: s6 };
14104
14104
  }
14105
- const c5 = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
14105
+ const f5 = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
14106
14106
  function g5(t6, e6) {
14107
- const n6 = s5(t6, c5), i6 = {};
14107
+ const n6 = s5(t6, f5), i6 = {};
14108
14108
  for (let t7 = 0; t7 < n6.length; t7++) {
14109
- if (0 === n6[t7][1].length) return m5("InvalidAttr", "Attribute '" + n6[t7][2] + "' has no space in starting.", N(n6[t7]));
14110
- if (void 0 !== n6[t7][3] && void 0 === n6[t7][4]) return m5("InvalidAttr", "Attribute '" + n6[t7][2] + "' is without value.", N(n6[t7]));
14111
- if (void 0 === n6[t7][3] && !e6.allowBooleanAttributes) return m5("InvalidAttr", "boolean attribute '" + n6[t7][2] + "' is not allowed.", N(n6[t7]));
14109
+ if (0 === n6[t7][1].length) return m5("InvalidAttr", "Attribute '" + n6[t7][2] + "' has no space in starting.", y2(n6[t7]));
14110
+ if (void 0 !== n6[t7][3] && void 0 === n6[t7][4]) return m5("InvalidAttr", "Attribute '" + n6[t7][2] + "' is without value.", y2(n6[t7]));
14111
+ if (void 0 === n6[t7][3] && !e6.allowBooleanAttributes) return m5("InvalidAttr", "boolean attribute '" + n6[t7][2] + "' is not allowed.", y2(n6[t7]));
14112
14112
  const s6 = n6[t7][2];
14113
- if (!E2(s6)) return m5("InvalidAttr", "Attribute '" + s6 + "' is an invalid name.", N(n6[t7]));
14114
- if (i6.hasOwnProperty(s6)) return m5("InvalidAttr", "Attribute '" + s6 + "' is repeated.", N(n6[t7]));
14113
+ if (!E2(s6)) return m5("InvalidAttr", "Attribute '" + s6 + "' is an invalid name.", y2(n6[t7]));
14114
+ if (Object.prototype.hasOwnProperty.call(i6, s6)) return m5("InvalidAttr", "Attribute '" + s6 + "' is repeated.", y2(n6[t7]));
14115
14115
  i6[s6] = 1;
14116
14116
  }
14117
14117
  return true;
@@ -14139,49 +14139,52 @@ var require_fxp = __commonJS({
14139
14139
  function E2(t6) {
14140
14140
  return r5(t6);
14141
14141
  }
14142
- function b5(t6, e6) {
14142
+ function b5(t6) {
14143
+ return r5(t6);
14144
+ }
14145
+ function N(t6, e6) {
14143
14146
  const n6 = t6.substring(0, e6).split(/\r?\n/);
14144
14147
  return { line: n6.length, col: n6[n6.length - 1].length + 1 };
14145
14148
  }
14146
- function N(t6) {
14149
+ function y2(t6) {
14147
14150
  return t6.startIndex + t6[1].length;
14148
14151
  }
14149
- const y2 = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t6, e6) {
14152
+ const T = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t6, e6) {
14150
14153
  return e6;
14151
14154
  }, attributeValueProcessor: function(t6, e6) {
14152
14155
  return e6;
14153
14156
  }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t6, e6, n6) {
14154
14157
  return t6;
14155
- }, captureMetaData: false };
14156
- function T(t6) {
14157
- return "boolean" == typeof t6 ? { enabled: t6, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, allowedTags: null, tagFilter: null } : "object" == typeof t6 && null !== t6 ? { enabled: false !== t6.enabled, maxEntitySize: t6.maxEntitySize ?? 1e4, maxExpansionDepth: t6.maxExpansionDepth ?? 10, maxTotalExpansions: t6.maxTotalExpansions ?? 1e3, maxExpandedLength: t6.maxExpandedLength ?? 1e5, allowedTags: t6.allowedTags ?? null, tagFilter: t6.tagFilter ?? null } : T(true);
14158
+ }, captureMetaData: false, maxNestedTags: 100, strictReservedNames: true };
14159
+ function w5(t6) {
14160
+ return "boolean" == typeof t6 ? { enabled: t6, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, allowedTags: null, tagFilter: null } : "object" == typeof t6 && null !== t6 ? { enabled: false !== t6.enabled, maxEntitySize: t6.maxEntitySize ?? 1e4, maxExpansionDepth: t6.maxExpansionDepth ?? 10, maxTotalExpansions: t6.maxTotalExpansions ?? 1e3, maxExpandedLength: t6.maxExpandedLength ?? 1e5, allowedTags: t6.allowedTags ?? null, tagFilter: t6.tagFilter ?? null } : w5(true);
14158
14161
  }
14159
- const w5 = function(t6) {
14160
- const e6 = Object.assign({}, y2, t6);
14161
- return e6.processEntities = T(e6.processEntities), e6;
14162
+ const v5 = function(t6) {
14163
+ const e6 = Object.assign({}, T, t6);
14164
+ return e6.processEntities = w5(e6.processEntities), e6;
14162
14165
  };
14163
- let v5;
14164
- v5 = "function" != typeof Symbol ? "@@xmlMetadata" : Symbol("XML Node Metadata");
14166
+ let O;
14167
+ O = "function" != typeof Symbol ? "@@xmlMetadata" : Symbol("XML Node Metadata");
14165
14168
  class I2 {
14166
14169
  constructor(t6) {
14167
- this.tagname = t6, this.child = [], this[":@"] = {};
14170
+ this.tagname = t6, this.child = [], this[":@"] = /* @__PURE__ */ Object.create(null);
14168
14171
  }
14169
14172
  add(t6, e6) {
14170
14173
  "__proto__" === t6 && (t6 = "#__proto__"), this.child.push({ [t6]: e6 });
14171
14174
  }
14172
14175
  addChild(t6, e6) {
14173
- "__proto__" === t6.tagname && (t6.tagname = "#__proto__"), t6[":@"] && Object.keys(t6[":@"]).length > 0 ? this.child.push({ [t6.tagname]: t6.child, ":@": t6[":@"] }) : this.child.push({ [t6.tagname]: t6.child }), void 0 !== e6 && (this.child[this.child.length - 1][v5] = { startIndex: e6 });
14176
+ "__proto__" === t6.tagname && (t6.tagname = "#__proto__"), t6[":@"] && Object.keys(t6[":@"]).length > 0 ? this.child.push({ [t6.tagname]: t6.child, ":@": t6[":@"] }) : this.child.push({ [t6.tagname]: t6.child }), void 0 !== e6 && (this.child[this.child.length - 1][O] = { startIndex: e6 });
14174
14177
  }
14175
14178
  static getMetaDataSymbol() {
14176
- return v5;
14179
+ return O;
14177
14180
  }
14178
14181
  }
14179
- class O {
14182
+ class P {
14180
14183
  constructor(t6) {
14181
14184
  this.suppressValidationErr = !t6, this.options = t6;
14182
14185
  }
14183
14186
  readDocType(t6, e6) {
14184
- const n6 = {};
14187
+ const n6 = /* @__PURE__ */ Object.create(null);
14185
14188
  if ("O" !== t6[e6 + 3] || "C" !== t6[e6 + 4] || "T" !== t6[e6 + 5] || "Y" !== t6[e6 + 6] || "P" !== t6[e6 + 7] || "E" !== t6[e6 + 8]) throw new Error("Invalid Tag instead of DOCTYPE");
14186
14189
  {
14187
14190
  e6 += 9;
@@ -14190,23 +14193,23 @@ var require_fxp = __commonJS({
14190
14193
  if (r6 ? "-" === t6[e6 - 1] && "-" === t6[e6 - 2] && (r6 = false, i6--) : i6--, 0 === i6) break;
14191
14194
  } else "[" === t6[e6] ? s6 = true : o6 += t6[e6];
14192
14195
  else {
14193
- if (s6 && A2(t6, "!ENTITY", e6)) {
14196
+ if (s6 && S(t6, "!ENTITY", e6)) {
14194
14197
  let i7, s7;
14195
14198
  if (e6 += 7, [i7, s7, e6] = this.readEntityExp(t6, e6 + 1, this.suppressValidationErr), -1 === s7.indexOf("&")) {
14196
14199
  const t7 = i7.replace(/[.\-+*:]/g, "\\.");
14197
14200
  n6[i7] = { regx: RegExp(`&${t7};`, "g"), val: s7 };
14198
14201
  }
14199
- } else if (s6 && A2(t6, "!ELEMENT", e6)) {
14202
+ } else if (s6 && S(t6, "!ELEMENT", e6)) {
14200
14203
  e6 += 8;
14201
14204
  const { index: n7 } = this.readElementExp(t6, e6 + 1);
14202
14205
  e6 = n7;
14203
- } else if (s6 && A2(t6, "!ATTLIST", e6)) e6 += 8;
14204
- else if (s6 && A2(t6, "!NOTATION", e6)) {
14206
+ } else if (s6 && S(t6, "!ATTLIST", e6)) e6 += 8;
14207
+ else if (s6 && S(t6, "!NOTATION", e6)) {
14205
14208
  e6 += 9;
14206
14209
  const { index: n7 } = this.readNotationExp(t6, e6 + 1, this.suppressValidationErr);
14207
14210
  e6 = n7;
14208
14211
  } else {
14209
- if (!A2(t6, "!--", e6)) throw new Error("Invalid DOCTYPE");
14212
+ if (!S(t6, "!--", e6)) throw new Error("Invalid DOCTYPE");
14210
14213
  r6 = true;
14211
14214
  }
14212
14215
  i6++, o6 = "";
@@ -14216,10 +14219,10 @@ var require_fxp = __commonJS({
14216
14219
  return { entities: n6, i: e6 };
14217
14220
  }
14218
14221
  readEntityExp(t6, e6) {
14219
- e6 = P(t6, e6);
14222
+ e6 = A2(t6, e6);
14220
14223
  let n6 = "";
14221
14224
  for (; e6 < t6.length && !/\s/.test(t6[e6]) && '"' !== t6[e6] && "'" !== t6[e6]; ) n6 += t6[e6], e6++;
14222
- if (S(n6), e6 = P(t6, e6), !this.suppressValidationErr) {
14225
+ if (C2(n6), e6 = A2(t6, e6), !this.suppressValidationErr) {
14223
14226
  if ("SYSTEM" === t6.substring(e6, e6 + 6).toUpperCase()) throw new Error("External entities are not supported");
14224
14227
  if ("%" === t6[e6]) throw new Error("Parameter entities are not supported");
14225
14228
  }
@@ -14228,15 +14231,15 @@ var require_fxp = __commonJS({
14228
14231
  return [n6, i6, --e6];
14229
14232
  }
14230
14233
  readNotationExp(t6, e6) {
14231
- e6 = P(t6, e6);
14234
+ e6 = A2(t6, e6);
14232
14235
  let n6 = "";
14233
14236
  for (; e6 < t6.length && !/\s/.test(t6[e6]); ) n6 += t6[e6], e6++;
14234
- !this.suppressValidationErr && S(n6), e6 = P(t6, e6);
14237
+ !this.suppressValidationErr && C2(n6), e6 = A2(t6, e6);
14235
14238
  const i6 = t6.substring(e6, e6 + 6).toUpperCase();
14236
14239
  if (!this.suppressValidationErr && "SYSTEM" !== i6 && "PUBLIC" !== i6) throw new Error(`Expected SYSTEM or PUBLIC, found "${i6}"`);
14237
- e6 += i6.length, e6 = P(t6, e6);
14240
+ e6 += i6.length, e6 = A2(t6, e6);
14238
14241
  let s6 = null, r6 = null;
14239
- if ("PUBLIC" === i6) [e6, s6] = this.readIdentifierVal(t6, e6, "publicIdentifier"), '"' !== t6[e6 = P(t6, e6)] && "'" !== t6[e6] || ([e6, r6] = this.readIdentifierVal(t6, e6, "systemIdentifier"));
14242
+ if ("PUBLIC" === i6) [e6, s6] = this.readIdentifierVal(t6, e6, "publicIdentifier"), '"' !== t6[e6 = A2(t6, e6)] && "'" !== t6[e6] || ([e6, r6] = this.readIdentifierVal(t6, e6, "systemIdentifier"));
14240
14243
  else if ("SYSTEM" === i6 && ([e6, r6] = this.readIdentifierVal(t6, e6, "systemIdentifier"), !this.suppressValidationErr && !r6)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
14241
14244
  return { notationName: n6, publicIdentifier: s6, systemIdentifier: r6, index: --e6 };
14242
14245
  }
@@ -14249,13 +14252,13 @@ var require_fxp = __commonJS({
14249
14252
  return [++e6, i6];
14250
14253
  }
14251
14254
  readElementExp(t6, e6) {
14252
- e6 = P(t6, e6);
14255
+ e6 = A2(t6, e6);
14253
14256
  let n6 = "";
14254
14257
  for (; e6 < t6.length && !/\s/.test(t6[e6]); ) n6 += t6[e6], e6++;
14255
14258
  if (!this.suppressValidationErr && !r5(n6)) throw new Error(`Invalid element name: "${n6}"`);
14256
14259
  let i6 = "";
14257
- if ("E" === t6[e6 = P(t6, e6)] && A2(t6, "MPTY", e6)) e6 += 4;
14258
- else if ("A" === t6[e6] && A2(t6, "NY", e6)) e6 += 2;
14260
+ if ("E" === t6[e6 = A2(t6, e6)] && S(t6, "MPTY", e6)) e6 += 4;
14261
+ else if ("A" === t6[e6] && S(t6, "NY", e6)) e6 += 2;
14259
14262
  else if ("(" === t6[e6]) {
14260
14263
  for (e6++; e6 < t6.length && ")" !== t6[e6]; ) i6 += t6[e6], e6++;
14261
14264
  if (")" !== t6[e6]) throw new Error("Unterminated content model");
@@ -14263,24 +14266,24 @@ var require_fxp = __commonJS({
14263
14266
  return { elementName: n6, contentModel: i6.trim(), index: e6 };
14264
14267
  }
14265
14268
  readAttlistExp(t6, e6) {
14266
- e6 = P(t6, e6);
14269
+ e6 = A2(t6, e6);
14267
14270
  let n6 = "";
14268
14271
  for (; e6 < t6.length && !/\s/.test(t6[e6]); ) n6 += t6[e6], e6++;
14269
- S(n6), e6 = P(t6, e6);
14272
+ C2(n6), e6 = A2(t6, e6);
14270
14273
  let i6 = "";
14271
14274
  for (; e6 < t6.length && !/\s/.test(t6[e6]); ) i6 += t6[e6], e6++;
14272
- if (!S(i6)) throw new Error(`Invalid attribute name: "${i6}"`);
14273
- e6 = P(t6, e6);
14275
+ if (!C2(i6)) throw new Error(`Invalid attribute name: "${i6}"`);
14276
+ e6 = A2(t6, e6);
14274
14277
  let s6 = "";
14275
14278
  if ("NOTATION" === t6.substring(e6, e6 + 8).toUpperCase()) {
14276
- if (s6 = "NOTATION", "(" !== t6[e6 = P(t6, e6 += 8)]) throw new Error(`Expected '(', found "${t6[e6]}"`);
14279
+ if (s6 = "NOTATION", "(" !== t6[e6 = A2(t6, e6 += 8)]) throw new Error(`Expected '(', found "${t6[e6]}"`);
14277
14280
  e6++;
14278
14281
  let n7 = [];
14279
14282
  for (; e6 < t6.length && ")" !== t6[e6]; ) {
14280
14283
  let i7 = "";
14281
14284
  for (; e6 < t6.length && "|" !== t6[e6] && ")" !== t6[e6]; ) i7 += t6[e6], e6++;
14282
- if (i7 = i7.trim(), !S(i7)) throw new Error(`Invalid notation name: "${i7}"`);
14283
- n7.push(i7), "|" === t6[e6] && (e6++, e6 = P(t6, e6));
14285
+ if (i7 = i7.trim(), !C2(i7)) throw new Error(`Invalid notation name: "${i7}"`);
14286
+ n7.push(i7), "|" === t6[e6] && (e6++, e6 = A2(t6, e6));
14284
14287
  }
14285
14288
  if (")" !== t6[e6]) throw new Error("Unterminated list of notations");
14286
14289
  e6++, s6 += " (" + n7.join("|") + ")";
@@ -14289,45 +14292,43 @@ var require_fxp = __commonJS({
14289
14292
  const n7 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
14290
14293
  if (!this.suppressValidationErr && !n7.includes(s6.toUpperCase())) throw new Error(`Invalid attribute type: "${s6}"`);
14291
14294
  }
14292
- e6 = P(t6, e6);
14295
+ e6 = A2(t6, e6);
14293
14296
  let r6 = "";
14294
14297
  return "#REQUIRED" === t6.substring(e6, e6 + 8).toUpperCase() ? (r6 = "#REQUIRED", e6 += 8) : "#IMPLIED" === t6.substring(e6, e6 + 7).toUpperCase() ? (r6 = "#IMPLIED", e6 += 7) : [e6, r6] = this.readIdentifierVal(t6, e6, "ATTLIST"), { elementName: n6, attributeName: i6, attributeType: s6, defaultValue: r6, index: e6 };
14295
14298
  }
14296
14299
  }
14297
- const P = (t6, e6) => {
14300
+ const A2 = (t6, e6) => {
14298
14301
  for (; e6 < t6.length && /\s/.test(t6[e6]); ) e6++;
14299
14302
  return e6;
14300
14303
  };
14301
- function A2(t6, e6, n6) {
14304
+ function S(t6, e6, n6) {
14302
14305
  for (let i6 = 0; i6 < e6.length; i6++) if (e6[i6] !== t6[n6 + i6 + 1]) return false;
14303
14306
  return true;
14304
14307
  }
14305
- function S(t6) {
14308
+ function C2(t6) {
14306
14309
  if (r5(t6)) return t6;
14307
14310
  throw new Error(`Invalid entity name ${t6}`);
14308
14311
  }
14309
- const C2 = /^[-+]?0x[a-fA-F0-9]+$/, $ = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, V = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
14310
- const D2 = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
14311
- function L(t6) {
14312
- return "function" == typeof t6 ? t6 : Array.isArray(t6) ? (e6) => {
14313
- for (const n6 of t6) {
14314
- if ("string" == typeof n6 && e6 === n6) return true;
14315
- if (n6 instanceof RegExp && n6.test(e6)) return true;
14316
- }
14317
- } : () => false;
14318
- }
14319
- class F2 {
14312
+ const $ = /^[-+]?0x[a-fA-F0-9]+$/, V = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, D2 = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
14313
+ const j5 = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
14314
+ class L {
14320
14315
  constructor(t6) {
14321
- if (this.options = t6, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t7, e6) => K(e6, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t7, e6) => K(e6, 16, "&#x") } }, this.addExternalEntities = j5, this.parseXml = B2, this.parseTextData = M, this.resolveNameSpace = _, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q5, this.saveTextToParentTag = G2, this.addChild = R, this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) {
14316
+ var e6;
14317
+ if (this.options = t6, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t7, e7) => K(e7, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t7, e7) => K(e7, 16, "&#x") } }, this.addExternalEntities = F2, this.parseXml = R, this.parseTextData = M, this.resolveNameSpace = k5, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q5, this.saveTextToParentTag = G2, this.addChild = B2, this.ignoreAttributesFn = "function" == typeof (e6 = this.options.ignoreAttributes) ? e6 : Array.isArray(e6) ? (t7) => {
14318
+ for (const n6 of e6) {
14319
+ if ("string" == typeof n6 && t7 === n6) return true;
14320
+ if (n6 instanceof RegExp && n6.test(t7)) return true;
14321
+ }
14322
+ } : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) {
14322
14323
  this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set();
14323
14324
  for (let t7 = 0; t7 < this.options.stopNodes.length; t7++) {
14324
- const e6 = this.options.stopNodes[t7];
14325
- "string" == typeof e6 && (e6.startsWith("*.") ? this.stopNodesWildcard.add(e6.substring(2)) : this.stopNodesExact.add(e6));
14325
+ const e7 = this.options.stopNodes[t7];
14326
+ "string" == typeof e7 && (e7.startsWith("*.") ? this.stopNodesWildcard.add(e7.substring(2)) : this.stopNodesExact.add(e7));
14326
14327
  }
14327
14328
  }
14328
14329
  }
14329
14330
  }
14330
- function j5(t6) {
14331
+ function F2(t6) {
14331
14332
  const e6 = Object.keys(t6);
14332
14333
  for (let n6 = 0; n6 < e6.length; n6++) {
14333
14334
  const i6 = e6[n6], s6 = i6.replace(/[.\-+*:]/g, "\\.");
@@ -14341,7 +14342,7 @@ var require_fxp = __commonJS({
14341
14342
  return null == i7 ? t6 : typeof i7 != typeof t6 || i7 !== t6 ? i7 : this.options.trimValues || t6.trim() === t6 ? Z(t6, this.options.parseTagValue, this.options.numberParseOptions) : t6;
14342
14343
  }
14343
14344
  }
14344
- function _(t6) {
14345
+ function k5(t6) {
14345
14346
  if (this.options.removeNSPrefix) {
14346
14347
  const e6 = t6.split(":"), n6 = "/" === t6.charAt(0) ? "/" : "";
14347
14348
  if ("xmlns" === e6[0]) return "";
@@ -14349,10 +14350,10 @@ var require_fxp = __commonJS({
14349
14350
  }
14350
14351
  return t6;
14351
14352
  }
14352
- const k5 = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
14353
+ const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
14353
14354
  function U(t6, e6, n6) {
14354
14355
  if (true !== this.options.ignoreAttributes && "string" == typeof t6) {
14355
- const i6 = s5(t6, k5), r6 = i6.length, o6 = {};
14356
+ const i6 = s5(t6, _), r6 = i6.length, o6 = {};
14356
14357
  for (let t7 = 0; t7 < r6; t7++) {
14357
14358
  const s6 = this.resolveNameSpace(i6[t7][1]);
14358
14359
  if (this.ignoreAttributesFn(s6, e6)) continue;
@@ -14371,12 +14372,12 @@ var require_fxp = __commonJS({
14371
14372
  return o6;
14372
14373
  }
14373
14374
  }
14374
- const B2 = function(t6) {
14375
+ const R = function(t6) {
14375
14376
  t6 = t6.replace(/\r\n?/g, "\n");
14376
14377
  const e6 = new I2("!xml");
14377
14378
  let n6 = e6, i6 = "", s6 = "";
14378
14379
  this.entityExpansionCount = 0, this.currentExpandedLength = 0;
14379
- const r6 = new O(this.options.processEntities);
14380
+ const r6 = new P(this.options.processEntities);
14380
14381
  for (let o6 = 0; o6 < t6.length; o6++) if ("<" === t6[o6]) if ("/" === t6[o6 + 1]) {
14381
14382
  const e7 = z2(t6, ">", o6, "Closing Tag is not closed.");
14382
14383
  let r7 = t6.substring(o6 + 2, e7).trim();
@@ -14416,26 +14417,27 @@ var require_fxp = __commonJS({
14416
14417
  } else {
14417
14418
  let r7 = W(t6, o6, this.options.removeNSPrefix), a6 = r7.tagName;
14418
14419
  const l6 = r7.rawTagName;
14419
- let u6 = r7.tagExp, h6 = r7.attrExpPresent, d6 = r7.closeIndex;
14420
+ let u6 = r7.tagExp, d6 = r7.attrExpPresent, h6 = r7.closeIndex;
14420
14421
  if (this.options.transformTagName) {
14421
14422
  const t7 = this.options.transformTagName(a6);
14422
14423
  u6 === a6 && (u6 = t7), a6 = t7;
14423
14424
  }
14425
+ if (this.options.strictReservedNames && (a6 === this.options.commentPropName || a6 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${a6}`);
14424
14426
  n6 && i6 && "!xml" !== n6.tagname && (i6 = this.saveTextToParentTag(i6, n6, s6, false));
14425
14427
  const p6 = n6;
14426
14428
  p6 && -1 !== this.options.unpairedTags.indexOf(p6.tagname) && (n6 = this.tagsNodeStack.pop(), s6 = s6.substring(0, s6.lastIndexOf("."))), a6 !== e6.tagname && (s6 += s6 ? "." + a6 : a6);
14427
- const f6 = o6;
14429
+ const c6 = o6;
14428
14430
  if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s6, a6)) {
14429
14431
  let e7 = "";
14430
14432
  if (u6.length > 0 && u6.lastIndexOf("/") === u6.length - 1) "/" === a6[a6.length - 1] ? (a6 = a6.substr(0, a6.length - 1), s6 = s6.substr(0, s6.length - 1), u6 = a6) : u6 = u6.substr(0, u6.length - 1), o6 = r7.closeIndex;
14431
14433
  else if (-1 !== this.options.unpairedTags.indexOf(a6)) o6 = r7.closeIndex;
14432
14434
  else {
14433
- const n7 = this.readStopNodeData(t6, l6, d6 + 1);
14435
+ const n7 = this.readStopNodeData(t6, l6, h6 + 1);
14434
14436
  if (!n7) throw new Error(`Unexpected end of ${l6}`);
14435
14437
  o6 = n7.i, e7 = n7.tagContent;
14436
14438
  }
14437
14439
  const i7 = new I2(a6);
14438
- a6 !== u6 && h6 && (i7[":@"] = this.buildAttributesMap(u6, s6, a6)), e7 && (e7 = this.parseTextData(e7, a6, s6, true, h6, true, true)), s6 = s6.substr(0, s6.lastIndexOf(".")), i7.add(this.options.textNodeName, e7), this.addChild(n6, i7, s6, f6);
14440
+ a6 !== u6 && d6 && (i7[":@"] = this.buildAttributesMap(u6, s6, a6)), e7 && (e7 = this.parseTextData(e7, a6, s6, true, d6, true, true)), s6 = s6.substr(0, s6.lastIndexOf(".")), i7.add(this.options.textNodeName, e7), this.addChild(n6, i7, s6, c6);
14439
14441
  } else {
14440
14442
  if (u6.length > 0 && u6.lastIndexOf("/") === u6.length - 1) {
14441
14443
  if ("/" === a6[a6.length - 1] ? (a6 = a6.substr(0, a6.length - 1), s6 = s6.substr(0, s6.length - 1), u6 = a6) : u6 = u6.substr(0, u6.length - 1), this.options.transformTagName) {
@@ -14443,18 +14445,26 @@ var require_fxp = __commonJS({
14443
14445
  u6 === a6 && (u6 = t8), a6 = t8;
14444
14446
  }
14445
14447
  const t7 = new I2(a6);
14446
- a6 !== u6 && h6 && (t7[":@"] = this.buildAttributesMap(u6, s6, a6)), this.addChild(n6, t7, s6, f6), s6 = s6.substr(0, s6.lastIndexOf("."));
14448
+ a6 !== u6 && d6 && (t7[":@"] = this.buildAttributesMap(u6, s6, a6)), this.addChild(n6, t7, s6, c6), s6 = s6.substr(0, s6.lastIndexOf("."));
14447
14449
  } else {
14448
- const t7 = new I2(a6);
14449
- this.tagsNodeStack.push(n6), a6 !== u6 && h6 && (t7[":@"] = this.buildAttributesMap(u6, s6, a6)), this.addChild(n6, t7, s6, f6), n6 = t7;
14450
+ if (-1 !== this.options.unpairedTags.indexOf(a6)) {
14451
+ const t7 = new I2(a6);
14452
+ a6 !== u6 && d6 && (t7[":@"] = this.buildAttributesMap(u6, s6)), this.addChild(n6, t7, s6, c6), s6 = s6.substr(0, s6.lastIndexOf(".")), o6 = r7.closeIndex;
14453
+ continue;
14454
+ }
14455
+ {
14456
+ const t7 = new I2(a6);
14457
+ if (this.tagsNodeStack.length > this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
14458
+ this.tagsNodeStack.push(n6), a6 !== u6 && d6 && (t7[":@"] = this.buildAttributesMap(u6, s6, a6)), this.addChild(n6, t7, s6, c6), n6 = t7;
14459
+ }
14450
14460
  }
14451
- i6 = "", o6 = d6;
14461
+ i6 = "", o6 = h6;
14452
14462
  }
14453
14463
  }
14454
14464
  else i6 += t6[o6];
14455
14465
  return e6.child;
14456
14466
  };
14457
- function R(t6, e6, n6, i6) {
14467
+ function B2(t6, e6, n6, i6) {
14458
14468
  this.options.captureMetaData || (i6 = void 0);
14459
14469
  const s6 = this.options.updateTag(e6.tagname, n6, e6[":@"]);
14460
14470
  false === s6 || ("string" == typeof s6 ? (e6.tagname = s6, t6.addChild(e6, i6)) : t6.addChild(e6, i6));
@@ -14515,12 +14525,12 @@ var require_fxp = __commonJS({
14515
14525
  const o6 = s6.index, a6 = r6.search(/\s/);
14516
14526
  let l6 = r6, u6 = true;
14517
14527
  -1 !== a6 && (l6 = r6.substring(0, a6), r6 = r6.substring(a6 + 1).trimStart());
14518
- const h6 = l6;
14528
+ const d6 = l6;
14519
14529
  if (n6) {
14520
14530
  const t7 = l6.indexOf(":");
14521
14531
  -1 !== t7 && (l6 = l6.substr(t7 + 1), u6 = l6 !== s6.data.substr(t7 + 1));
14522
14532
  }
14523
- return { tagName: l6, tagExp: r6, closeIndex: o6, attrExpPresent: u6, rawTagName: h6 };
14533
+ return { tagName: l6, tagExp: r6, closeIndex: o6, attrExpPresent: u6, rawTagName: d6 };
14524
14534
  }
14525
14535
  function q5(t6, e6, n6) {
14526
14536
  const i6 = n6;
@@ -14541,19 +14551,19 @@ var require_fxp = __commonJS({
14541
14551
  if (e6 && "string" == typeof t6) {
14542
14552
  const e7 = t6.trim();
14543
14553
  return "true" === e7 || "false" !== e7 && (function(t7, e8 = {}) {
14544
- if (e8 = Object.assign({}, V, e8), !t7 || "string" != typeof t7) return t7;
14554
+ if (e8 = Object.assign({}, D2, e8), !t7 || "string" != typeof t7) return t7;
14545
14555
  let n7 = t7.trim();
14546
14556
  if (void 0 !== e8.skipLike && e8.skipLike.test(n7)) return t7;
14547
14557
  if ("0" === t7) return 0;
14548
- if (e8.hex && C2.test(n7)) return (function(t8) {
14558
+ if (e8.hex && $.test(n7)) return (function(t8) {
14549
14559
  if (parseInt) return parseInt(t8, 16);
14550
14560
  if (Number.parseInt) return Number.parseInt(t8, 16);
14551
14561
  if (window && window.parseInt) return window.parseInt(t8, 16);
14552
14562
  throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
14553
14563
  })(n7);
14554
- if (-1 !== n7.search(/.+[eE].+/)) return (function(t8, e9, n8) {
14564
+ if (n7.includes("e") || n7.includes("E")) return (function(t8, e9, n8) {
14555
14565
  if (!n8.eNotation) return t8;
14556
- const i7 = e9.match(D2);
14566
+ const i7 = e9.match(j5);
14557
14567
  if (i7) {
14558
14568
  let s6 = i7[1] || "";
14559
14569
  const r6 = -1 === i7[3].indexOf("e") ? "E" : "e", o6 = i7[2], a6 = s6 ? t8[o6.length + 1] === r6 : t8[o6.length] === r6;
@@ -14562,7 +14572,7 @@ var require_fxp = __commonJS({
14562
14572
  return t8;
14563
14573
  })(t7, n7, e8);
14564
14574
  {
14565
- const s6 = $.exec(n7);
14575
+ const s6 = V.exec(n7);
14566
14576
  if (s6) {
14567
14577
  const r6 = s6[1] || "", o6 = s6[2];
14568
14578
  let a6 = (i6 = s6[3]) && -1 !== i6.indexOf(".") ? ("." === (i6 = i6.replace(/0+$/, "")) ? i6 = "0" : "." === i6[0] ? i6 = "0" + i6 : "." === i6[i6.length - 1] && (i6 = i6.substring(0, i6.length - 1)), i6) : i6;
@@ -14570,7 +14580,7 @@ var require_fxp = __commonJS({
14570
14580
  if (!e8.leadingZeros && (o6.length > 1 || 1 === o6.length && !l6)) return t7;
14571
14581
  {
14572
14582
  const i7 = Number(n7), s7 = String(i7);
14573
- if (0 === i7 || -0 === i7) return i7;
14583
+ if (0 === i7) return i7;
14574
14584
  if (-1 !== s7.search(/[eE]/)) return e8.eNotation ? i7 : t7;
14575
14585
  if (-1 !== n7.indexOf(".")) return "0" === s7 || s7 === a6 || s7 === `${r6}${a6}` ? i7 : t7;
14576
14586
  let l7 = o6 ? a6 : n7;
@@ -14604,7 +14614,7 @@ var require_fxp = __commonJS({
14604
14614
  if (o6[a6]) {
14605
14615
  let t7 = H2(o6[a6], e6, l6);
14606
14616
  const n7 = nt(t7, e6);
14607
- void 0 !== o6[Q] && (t7[Q] = o6[Q]), o6[":@"] ? et(t7, o6[":@"], l6, e6) : 1 !== Object.keys(t7).length || void 0 === t7[e6.textNodeName] || e6.alwaysCreateTextNode ? 0 === Object.keys(t7).length && (e6.alwaysCreateTextNode ? t7[e6.textNodeName] = "" : t7 = "") : t7 = t7[e6.textNodeName], void 0 !== s6[a6] && s6.hasOwnProperty(a6) ? (Array.isArray(s6[a6]) || (s6[a6] = [s6[a6]]), s6[a6].push(t7)) : e6.isArray(a6, l6, n7) ? s6[a6] = [t7] : s6[a6] = t7;
14617
+ o6[":@"] ? et(t7, o6[":@"], l6, e6) : 1 !== Object.keys(t7).length || void 0 === t7[e6.textNodeName] || e6.alwaysCreateTextNode ? 0 === Object.keys(t7).length && (e6.alwaysCreateTextNode ? t7[e6.textNodeName] = "" : t7 = "") : t7 = t7[e6.textNodeName], void 0 !== o6[Q] && "object" == typeof t7 && null !== t7 && (t7[Q] = o6[Q]), void 0 !== s6[a6] && Object.prototype.hasOwnProperty.call(s6, a6) ? (Array.isArray(s6[a6]) || (s6[a6] = [s6[a6]]), s6[a6].push(t7)) : e6.isArray(a6, l6, n7) ? s6[a6] = [t7] : s6[a6] = t7;
14608
14618
  }
14609
14619
  }
14610
14620
  }
@@ -14632,7 +14642,7 @@ var require_fxp = __commonJS({
14632
14642
  }
14633
14643
  class it {
14634
14644
  constructor(t6) {
14635
- this.externalEntities = {}, this.options = w5(t6);
14645
+ this.externalEntities = {}, this.options = v5(t6);
14636
14646
  }
14637
14647
  parse(t6, e6) {
14638
14648
  if ("string" != typeof t6 && t6.toString) t6 = t6.toString();
@@ -14642,7 +14652,7 @@ var require_fxp = __commonJS({
14642
14652
  const n7 = a5(t6, e6);
14643
14653
  if (true !== n7) throw Error(`${n7.err.msg}:${n7.err.line}:${n7.err.col}`);
14644
14654
  }
14645
- const n6 = new F2(this.options);
14655
+ const n6 = new L(this.options);
14646
14656
  n6.addExternalEntities(this.externalEntities);
14647
14657
  const i6 = n6.parseXml(t6);
14648
14658
  return this.options.preserveOrder || void 0 === i6 ? i6 : J2(i6, this.options);
@@ -14663,6 +14673,13 @@ var require_fxp = __commonJS({
14663
14673
  }
14664
14674
  function rt(t6, e6, n6, i6) {
14665
14675
  let s6 = "", r6 = false;
14676
+ if (!Array.isArray(t6)) {
14677
+ if (null != t6) {
14678
+ let n7 = t6.toString();
14679
+ return n7 = ut(n7, e6), n7;
14680
+ }
14681
+ return "";
14682
+ }
14666
14683
  for (let o6 = 0; o6 < t6.length; o6++) {
14667
14684
  const a6 = t6[o6], l6 = ot(a6);
14668
14685
  if (void 0 === l6) continue;
@@ -14686,10 +14703,10 @@ var require_fxp = __commonJS({
14686
14703
  o7 = 0 !== o7.length ? " " + o7 : "", s6 += n7 + `<${l6}${o7}${t7}?>`, r6 = true;
14687
14704
  continue;
14688
14705
  }
14689
- let h6 = i6;
14690
- "" !== h6 && (h6 += e6.indentBy);
14691
- const d6 = i6 + `<${l6}${at3(a6[":@"], e6)}`, p6 = rt(a6[l6], e6, u6, h6);
14692
- -1 !== e6.unpairedTags.indexOf(l6) ? e6.suppressUnpairedNode ? s6 += d6 + ">" : s6 += d6 + "/>" : p6 && 0 !== p6.length || !e6.suppressEmptyNode ? p6 && p6.endsWith(">") ? s6 += d6 + `>${p6}${i6}</${l6}>` : (s6 += d6 + ">", p6 && "" !== i6 && (p6.includes("/>") || p6.includes("</")) ? s6 += i6 + e6.indentBy + p6 + i6 : s6 += p6, s6 += `</${l6}>`) : s6 += d6 + "/>", r6 = true;
14706
+ let d6 = i6;
14707
+ "" !== d6 && (d6 += e6.indentBy);
14708
+ const h6 = i6 + `<${l6}${at3(a6[":@"], e6)}`, p6 = rt(a6[l6], e6, u6, d6);
14709
+ -1 !== e6.unpairedTags.indexOf(l6) ? e6.suppressUnpairedNode ? s6 += h6 + ">" : s6 += h6 + "/>" : p6 && 0 !== p6.length || !e6.suppressEmptyNode ? p6 && p6.endsWith(">") ? s6 += h6 + `>${p6}${i6}</${l6}>` : (s6 += h6 + ">", p6 && "" !== i6 && (p6.includes("/>") || p6.includes("</")) ? s6 += i6 + e6.indentBy + p6 + i6 : s6 += p6, s6 += `</${l6}>`) : s6 += h6 + "/>", r6 = true;
14693
14710
  }
14694
14711
  return s6;
14695
14712
  }
@@ -14697,13 +14714,13 @@ var require_fxp = __commonJS({
14697
14714
  const e6 = Object.keys(t6);
14698
14715
  for (let n6 = 0; n6 < e6.length; n6++) {
14699
14716
  const i6 = e6[n6];
14700
- if (t6.hasOwnProperty(i6) && ":@" !== i6) return i6;
14717
+ if (Object.prototype.hasOwnProperty.call(t6, i6) && ":@" !== i6) return i6;
14701
14718
  }
14702
14719
  }
14703
14720
  function at3(t6, e6) {
14704
14721
  let n6 = "";
14705
14722
  if (t6 && !e6.ignoreAttributes) for (let i6 in t6) {
14706
- if (!t6.hasOwnProperty(i6)) continue;
14723
+ if (!Object.prototype.hasOwnProperty.call(t6, i6)) continue;
14707
14724
  let s6 = e6.attributeValueProcessor(i6, t6[i6]);
14708
14725
  s6 = ut(s6, e6), true === s6 && e6.suppressBooleanAttributes ? n6 += ` ${i6.substr(e6.attributeNamePrefix.length)}` : n6 += ` ${i6.substr(e6.attributeNamePrefix.length)}="${s6}"`;
14709
14726
  }
@@ -14721,15 +14738,21 @@ var require_fxp = __commonJS({
14721
14738
  }
14722
14739
  return t6;
14723
14740
  }
14724
- const ht = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t6, e6) {
14741
+ const dt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t6, e6) {
14725
14742
  return e6;
14726
14743
  }, attributeValueProcessor: function(t6, e6) {
14727
14744
  return e6;
14728
14745
  }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&amp;" }, { regex: new RegExp(">", "g"), val: "&gt;" }, { regex: new RegExp("<", "g"), val: "&lt;" }, { regex: new RegExp("'", "g"), val: "&apos;" }, { regex: new RegExp('"', "g"), val: "&quot;" }], processEntities: true, stopNodes: [], oneListGroup: false };
14729
- function dt(t6) {
14730
- this.options = Object.assign({}, ht, t6), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
14746
+ function ht(t6) {
14747
+ var e6;
14748
+ this.options = Object.assign({}, dt, t6), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
14731
14749
  return false;
14732
- } : (this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ct), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ft, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
14750
+ } : (this.ignoreAttributesFn = "function" == typeof (e6 = this.options.ignoreAttributes) ? e6 : Array.isArray(e6) ? (t7) => {
14751
+ for (const n6 of e6) {
14752
+ if ("string" == typeof n6 && t7 === n6) return true;
14753
+ if (n6 instanceof RegExp && n6.test(t7)) return true;
14754
+ }
14755
+ } : () => false, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ft), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ct, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
14733
14756
  return "";
14734
14757
  }, this.tagEndChar = ">", this.newLine = "");
14735
14758
  }
@@ -14737,15 +14760,15 @@ var require_fxp = __commonJS({
14737
14760
  const s6 = this.j2x(t6, n6 + 1, i6.concat(e6));
14738
14761
  return void 0 !== t6[this.options.textNodeName] && 1 === Object.keys(t6).length ? this.buildTextValNode(t6[this.options.textNodeName], e6, s6.attrStr, n6) : this.buildObjectNode(s6.val, e6, s6.attrStr, n6);
14739
14762
  }
14740
- function ft(t6) {
14763
+ function ct(t6) {
14741
14764
  return this.options.indentBy.repeat(t6);
14742
14765
  }
14743
- function ct(t6) {
14766
+ function ft(t6) {
14744
14767
  return !(!t6.startsWith(this.options.attributeNamePrefix) || t6 === this.options.textNodeName) && t6.substr(this.attrPrefixLen);
14745
14768
  }
14746
- dt.prototype.build = function(t6) {
14769
+ ht.prototype.build = function(t6) {
14747
14770
  return this.options.preserveOrder ? st(t6, this.options) : (Array.isArray(t6) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t6 = { [this.options.arrayNodeName]: t6 }), this.j2x(t6, 0, []).val);
14748
- }, dt.prototype.j2x = function(t6, e6, n6) {
14771
+ }, ht.prototype.j2x = function(t6, e6, n6) {
14749
14772
  let i6 = "", s6 = "";
14750
14773
  const r6 = n6.join(".");
14751
14774
  for (let o6 in t6) if (Object.prototype.hasOwnProperty.call(t6, o6)) if (void 0 === t6[o6]) this.isAttribute(o6) && (s6 += "");
@@ -14780,18 +14803,18 @@ var require_fxp = __commonJS({
14780
14803
  for (let s7 = 0; s7 < n7; s7++) i6 += this.buildAttrPairStr(e7[s7], "" + t6[o6][e7[s7]]);
14781
14804
  } else s6 += this.processTextOrObjNode(t6[o6], o6, e6, n6);
14782
14805
  return { attrStr: i6, val: s6 };
14783
- }, dt.prototype.buildAttrPairStr = function(t6, e6) {
14806
+ }, ht.prototype.buildAttrPairStr = function(t6, e6) {
14784
14807
  return e6 = this.options.attributeValueProcessor(t6, "" + e6), e6 = this.replaceEntitiesValue(e6), this.options.suppressBooleanAttributes && "true" === e6 ? " " + t6 : " " + t6 + '="' + e6 + '"';
14785
- }, dt.prototype.buildObjectNode = function(t6, e6, n6, i6) {
14808
+ }, ht.prototype.buildObjectNode = function(t6, e6, n6, i6) {
14786
14809
  if ("" === t6) return "?" === e6[0] ? this.indentate(i6) + "<" + e6 + n6 + "?" + this.tagEndChar : this.indentate(i6) + "<" + e6 + n6 + this.closeTag(e6) + this.tagEndChar;
14787
14810
  {
14788
14811
  let s6 = "</" + e6 + this.tagEndChar, r6 = "";
14789
14812
  return "?" === e6[0] && (r6 = "?", s6 = ""), !n6 && "" !== n6 || -1 !== t6.indexOf("<") ? false !== this.options.commentPropName && e6 === this.options.commentPropName && 0 === r6.length ? this.indentate(i6) + `<!--${t6}-->` + this.newLine : this.indentate(i6) + "<" + e6 + n6 + r6 + this.tagEndChar + t6 + this.indentate(i6) + s6 : this.indentate(i6) + "<" + e6 + n6 + r6 + ">" + t6 + s6;
14790
14813
  }
14791
- }, dt.prototype.closeTag = function(t6) {
14814
+ }, ht.prototype.closeTag = function(t6) {
14792
14815
  let e6 = "";
14793
14816
  return -1 !== this.options.unpairedTags.indexOf(t6) ? this.options.suppressUnpairedNode || (e6 = "/") : e6 = this.options.suppressEmptyNode ? "/" : `></${t6}`, e6;
14794
- }, dt.prototype.buildTextValNode = function(t6, e6, n6, i6) {
14817
+ }, ht.prototype.buildTextValNode = function(t6, e6, n6, i6) {
14795
14818
  if (false !== this.options.cdataPropName && e6 === this.options.cdataPropName) return this.indentate(i6) + `<![CDATA[${t6}]]>` + this.newLine;
14796
14819
  if (false !== this.options.commentPropName && e6 === this.options.commentPropName) return this.indentate(i6) + `<!--${t6}-->` + this.newLine;
14797
14820
  if ("?" === e6[0]) return this.indentate(i6) + "<" + e6 + n6 + "?" + this.tagEndChar;
@@ -14799,14 +14822,14 @@ var require_fxp = __commonJS({
14799
14822
  let s6 = this.options.tagValueProcessor(e6, t6);
14800
14823
  return s6 = this.replaceEntitiesValue(s6), "" === s6 ? this.indentate(i6) + "<" + e6 + n6 + this.closeTag(e6) + this.tagEndChar : this.indentate(i6) + "<" + e6 + n6 + ">" + s6 + "</" + e6 + this.tagEndChar;
14801
14824
  }
14802
- }, dt.prototype.replaceEntitiesValue = function(t6) {
14825
+ }, ht.prototype.replaceEntitiesValue = function(t6) {
14803
14826
  if (t6 && t6.length > 0 && this.options.processEntities) for (let e6 = 0; e6 < this.options.entities.length; e6++) {
14804
14827
  const n6 = this.options.entities[e6];
14805
14828
  t6 = t6.replace(n6.regex, n6.val);
14806
14829
  }
14807
14830
  return t6;
14808
14831
  };
14809
- const gt = { validate: a5 };
14832
+ const gt = ht, xt = { validate: a5 };
14810
14833
  module2.exports = e5;
14811
14834
  })();
14812
14835
  }
@@ -14826,7 +14849,8 @@ var require_xml_parser = __commonJS({
14826
14849
  ignoreDeclaration: true,
14827
14850
  parseTagValue: false,
14828
14851
  trimValues: false,
14829
- tagValueProcessor: (_, val) => val.trim() === "" && val.includes("\n") ? "" : void 0
14852
+ tagValueProcessor: (_, val) => val.trim() === "" && val.includes("\n") ? "" : void 0,
14853
+ maxNestedTags: 1024
14830
14854
  });
14831
14855
  parser.addEntity("#xD", "\r");
14832
14856
  parser.addEntity("#10", "\n");
@@ -19379,7 +19403,7 @@ var require_package2 = __commonJS({
19379
19403
  module2.exports = {
19380
19404
  name: "@aws-sdk/client-bedrock-runtime",
19381
19405
  description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
19382
- version: "3.1000.0",
19406
+ version: "3.1001.0",
19383
19407
  scripts: {
19384
19408
  build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
19385
19409
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
@@ -19403,54 +19427,54 @@ var require_package2 = __commonJS({
19403
19427
  dependencies: {
19404
19428
  "@aws-crypto/sha256-browser": "5.2.0",
19405
19429
  "@aws-crypto/sha256-js": "5.2.0",
19406
- "@aws-sdk/core": "^3.973.15",
19407
- "@aws-sdk/credential-provider-node": "^3.972.14",
19430
+ "@aws-sdk/core": "^3.973.16",
19431
+ "@aws-sdk/credential-provider-node": "^3.972.15",
19408
19432
  "@aws-sdk/eventstream-handler-node": "^3.972.9",
19409
19433
  "@aws-sdk/middleware-eventstream": "^3.972.6",
19410
19434
  "@aws-sdk/middleware-host-header": "^3.972.6",
19411
19435
  "@aws-sdk/middleware-logger": "^3.972.6",
19412
19436
  "@aws-sdk/middleware-recursion-detection": "^3.972.6",
19413
- "@aws-sdk/middleware-user-agent": "^3.972.15",
19414
- "@aws-sdk/middleware-websocket": "^3.972.10",
19437
+ "@aws-sdk/middleware-user-agent": "^3.972.16",
19438
+ "@aws-sdk/middleware-websocket": "^3.972.11",
19415
19439
  "@aws-sdk/region-config-resolver": "^3.972.6",
19416
- "@aws-sdk/token-providers": "3.1000.0",
19440
+ "@aws-sdk/token-providers": "3.1001.0",
19417
19441
  "@aws-sdk/types": "^3.973.4",
19418
19442
  "@aws-sdk/util-endpoints": "^3.996.3",
19419
19443
  "@aws-sdk/util-user-agent-browser": "^3.972.6",
19420
- "@aws-sdk/util-user-agent-node": "^3.973.0",
19444
+ "@aws-sdk/util-user-agent-node": "^3.973.1",
19421
19445
  "@smithy/config-resolver": "^4.4.9",
19422
- "@smithy/core": "^3.23.6",
19446
+ "@smithy/core": "^3.23.7",
19423
19447
  "@smithy/eventstream-serde-browser": "^4.2.10",
19424
19448
  "@smithy/eventstream-serde-config-resolver": "^4.3.10",
19425
19449
  "@smithy/eventstream-serde-node": "^4.2.10",
19426
- "@smithy/fetch-http-handler": "^5.3.11",
19450
+ "@smithy/fetch-http-handler": "^5.3.12",
19427
19451
  "@smithy/hash-node": "^4.2.10",
19428
19452
  "@smithy/invalid-dependency": "^4.2.10",
19429
19453
  "@smithy/middleware-content-length": "^4.2.10",
19430
- "@smithy/middleware-endpoint": "^4.4.20",
19431
- "@smithy/middleware-retry": "^4.4.37",
19454
+ "@smithy/middleware-endpoint": "^4.4.21",
19455
+ "@smithy/middleware-retry": "^4.4.38",
19432
19456
  "@smithy/middleware-serde": "^4.2.11",
19433
19457
  "@smithy/middleware-stack": "^4.2.10",
19434
19458
  "@smithy/node-config-provider": "^4.3.10",
19435
- "@smithy/node-http-handler": "^4.4.12",
19459
+ "@smithy/node-http-handler": "^4.4.13",
19436
19460
  "@smithy/protocol-http": "^5.3.10",
19437
- "@smithy/smithy-client": "^4.12.0",
19461
+ "@smithy/smithy-client": "^4.12.1",
19438
19462
  "@smithy/types": "^4.13.0",
19439
19463
  "@smithy/url-parser": "^4.2.10",
19440
19464
  "@smithy/util-base64": "^4.3.1",
19441
19465
  "@smithy/util-body-length-browser": "^4.2.1",
19442
19466
  "@smithy/util-body-length-node": "^4.2.2",
19443
- "@smithy/util-defaults-mode-browser": "^4.3.36",
19444
- "@smithy/util-defaults-mode-node": "^4.2.39",
19467
+ "@smithy/util-defaults-mode-browser": "^4.3.37",
19468
+ "@smithy/util-defaults-mode-node": "^4.2.40",
19445
19469
  "@smithy/util-endpoints": "^3.3.1",
19446
19470
  "@smithy/util-middleware": "^4.2.10",
19447
19471
  "@smithy/util-retry": "^4.2.10",
19448
- "@smithy/util-stream": "^4.5.15",
19472
+ "@smithy/util-stream": "^4.5.16",
19449
19473
  "@smithy/util-utf8": "^4.2.1",
19450
19474
  tslib: "^2.6.2"
19451
19475
  },
19452
19476
  devDependencies: {
19453
- "@smithy/snapshot-testing": "^1.0.7",
19477
+ "@smithy/snapshot-testing": "^1.0.8",
19454
19478
  "@tsconfig/node20": "20.1.8",
19455
19479
  "@types/node": "^20.14.8",
19456
19480
  concurrently: "7.0.0",
@@ -20166,7 +20190,7 @@ var init_package = __esm({
20166
20190
  "node_modules/@aws-sdk/nested-clients/package.json"() {
20167
20191
  package_default = {
20168
20192
  name: "@aws-sdk/nested-clients",
20169
- version: "3.996.3",
20193
+ version: "3.996.4",
20170
20194
  description: "Nested clients for AWS SDK packages.",
20171
20195
  main: "./dist-cjs/index.js",
20172
20196
  module: "./dist-es/index.js",
@@ -20195,37 +20219,37 @@ var init_package = __esm({
20195
20219
  dependencies: {
20196
20220
  "@aws-crypto/sha256-browser": "5.2.0",
20197
20221
  "@aws-crypto/sha256-js": "5.2.0",
20198
- "@aws-sdk/core": "^3.973.15",
20222
+ "@aws-sdk/core": "^3.973.16",
20199
20223
  "@aws-sdk/middleware-host-header": "^3.972.6",
20200
20224
  "@aws-sdk/middleware-logger": "^3.972.6",
20201
20225
  "@aws-sdk/middleware-recursion-detection": "^3.972.6",
20202
- "@aws-sdk/middleware-user-agent": "^3.972.15",
20226
+ "@aws-sdk/middleware-user-agent": "^3.972.16",
20203
20227
  "@aws-sdk/region-config-resolver": "^3.972.6",
20204
20228
  "@aws-sdk/types": "^3.973.4",
20205
20229
  "@aws-sdk/util-endpoints": "^3.996.3",
20206
20230
  "@aws-sdk/util-user-agent-browser": "^3.972.6",
20207
- "@aws-sdk/util-user-agent-node": "^3.973.0",
20231
+ "@aws-sdk/util-user-agent-node": "^3.973.1",
20208
20232
  "@smithy/config-resolver": "^4.4.9",
20209
- "@smithy/core": "^3.23.6",
20210
- "@smithy/fetch-http-handler": "^5.3.11",
20233
+ "@smithy/core": "^3.23.7",
20234
+ "@smithy/fetch-http-handler": "^5.3.12",
20211
20235
  "@smithy/hash-node": "^4.2.10",
20212
20236
  "@smithy/invalid-dependency": "^4.2.10",
20213
20237
  "@smithy/middleware-content-length": "^4.2.10",
20214
- "@smithy/middleware-endpoint": "^4.4.20",
20215
- "@smithy/middleware-retry": "^4.4.37",
20238
+ "@smithy/middleware-endpoint": "^4.4.21",
20239
+ "@smithy/middleware-retry": "^4.4.38",
20216
20240
  "@smithy/middleware-serde": "^4.2.11",
20217
20241
  "@smithy/middleware-stack": "^4.2.10",
20218
20242
  "@smithy/node-config-provider": "^4.3.10",
20219
- "@smithy/node-http-handler": "^4.4.12",
20243
+ "@smithy/node-http-handler": "^4.4.13",
20220
20244
  "@smithy/protocol-http": "^5.3.10",
20221
- "@smithy/smithy-client": "^4.12.0",
20245
+ "@smithy/smithy-client": "^4.12.1",
20222
20246
  "@smithy/types": "^4.13.0",
20223
20247
  "@smithy/url-parser": "^4.2.10",
20224
20248
  "@smithy/util-base64": "^4.3.1",
20225
20249
  "@smithy/util-body-length-browser": "^4.2.1",
20226
20250
  "@smithy/util-body-length-node": "^4.2.2",
20227
- "@smithy/util-defaults-mode-browser": "^4.3.36",
20228
- "@smithy/util-defaults-mode-node": "^4.2.39",
20251
+ "@smithy/util-defaults-mode-browser": "^4.3.37",
20252
+ "@smithy/util-defaults-mode-node": "^4.2.40",
20229
20253
  "@smithy/util-endpoints": "^3.3.1",
20230
20254
  "@smithy/util-middleware": "^4.2.10",
20231
20255
  "@smithy/util-retry": "^4.2.10",
@@ -20330,17 +20354,30 @@ var require_dist_cjs51 = __commonJS({
20330
20354
  }
20331
20355
  return ["md/nodejs", node_process.versions.node];
20332
20356
  };
20333
- var getTypeScriptPackageJsonPath = (dirname6 = "") => {
20334
- let nodeModulesPath;
20357
+ var SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/;
20358
+ var getSanitizedTypeScriptVersion = (version2 = "") => {
20359
+ const match2 = version2.match(SEMVER_REGEX);
20360
+ if (!match2) {
20361
+ return void 0;
20362
+ }
20363
+ const [major, minor, patch, prerelease] = [match2[1], match2[2], match2[3], match2[4]];
20364
+ return prerelease ? `${major}.${minor}.${patch}-${prerelease}` : `${major}.${minor}.${patch}`;
20365
+ };
20366
+ var typescriptPackageJsonPath = node_path.join("node_modules", "typescript", "package.json");
20367
+ var getTypeScriptPackageJsonPaths = (dirname6) => {
20368
+ const cwdPath = node_path.join(process.cwd(), typescriptPackageJsonPath);
20369
+ if (!dirname6) {
20370
+ return [cwdPath];
20371
+ }
20335
20372
  const normalizedPath = node_path.normalize(dirname6);
20336
20373
  const parts = normalizedPath.split(node_path.sep);
20337
20374
  const nodeModulesIndex = parts.indexOf("node_modules");
20338
- if (nodeModulesIndex !== -1) {
20339
- nodeModulesPath = parts.slice(0, nodeModulesIndex).join(node_path.sep);
20340
- } else {
20341
- nodeModulesPath = dirname6;
20375
+ const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(node_path.sep) : dirname6;
20376
+ const parentDirPath = node_path.join(parentDir, typescriptPackageJsonPath);
20377
+ if (cwdPath === parentDirPath) {
20378
+ return [cwdPath];
20342
20379
  }
20343
- return node_path.join(nodeModulesPath, "node_modules", "typescript", "package.json");
20380
+ return [parentDirPath, cwdPath];
20344
20381
  };
20345
20382
  var tscVersion;
20346
20383
  var getTypeScriptUserAgentPair = async () => {
@@ -20349,18 +20386,22 @@ var require_dist_cjs51 = __commonJS({
20349
20386
  } else if (typeof tscVersion === "string") {
20350
20387
  return ["md/tsc", tscVersion];
20351
20388
  }
20352
- try {
20353
- const packageJson = await promises.readFile(getTypeScriptPackageJsonPath(__dirname), "utf-8");
20354
- const { version: version2 } = JSON.parse(packageJson);
20355
- if (typeof version2 !== "string") {
20356
- tscVersion = null;
20357
- return void 0;
20389
+ const dirname6 = typeof __dirname !== "undefined" ? __dirname : void 0;
20390
+ for (const typescriptPackageJsonPath2 of getTypeScriptPackageJsonPaths(dirname6)) {
20391
+ try {
20392
+ const packageJson = await promises.readFile(typescriptPackageJsonPath2, "utf-8");
20393
+ const { version: version2 } = JSON.parse(packageJson);
20394
+ const sanitizedVersion = getSanitizedTypeScriptVersion(version2);
20395
+ if (typeof sanitizedVersion !== "string") {
20396
+ continue;
20397
+ }
20398
+ tscVersion = sanitizedVersion;
20399
+ return ["md/tsc", tscVersion];
20400
+ } catch {
20358
20401
  }
20359
- tscVersion = version2;
20360
- return ["md/tsc", tscVersion];
20361
- } catch {
20362
- tscVersion = null;
20363
20402
  }
20403
+ tscVersion = null;
20404
+ return void 0;
20364
20405
  };
20365
20406
  var crtAvailability = {
20366
20407
  isCrtAvailable: false
@@ -21459,9 +21500,9 @@ var init_sso_oidc = __esm({
21459
21500
  }
21460
21501
  });
21461
21502
 
21462
- // node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js
21503
+ // node_modules/@aws-sdk/token-providers/dist-cjs/index.js
21463
21504
  var require_dist_cjs56 = __commonJS({
21464
- "node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2) {
21505
+ "node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2) {
21465
21506
  "use strict";
21466
21507
  var client = (init_client(), __toCommonJS(client_exports));
21467
21508
  var httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
@@ -25294,155 +25335,8 @@ var require_dist_cjs63 = __commonJS({
25294
25335
  }
25295
25336
  });
25296
25337
 
25297
- // node_modules/@aws-sdk/token-providers/dist-cjs/index.js
25298
- var require_dist_cjs64 = __commonJS({
25299
- "node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2) {
25300
- "use strict";
25301
- var client = (init_client(), __toCommonJS(client_exports));
25302
- var httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
25303
- var propertyProvider = require_dist_cjs24();
25304
- var sharedIniFileLoader = require_dist_cjs42();
25305
- var node_fs = require("node:fs");
25306
- var fromEnvSigningName = ({ logger: logger2, signingName } = {}) => async () => {
25307
- logger2?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
25308
- if (!signingName) {
25309
- throw new propertyProvider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger2 });
25310
- }
25311
- const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName);
25312
- if (!(bearerTokenKey in process.env)) {
25313
- throw new propertyProvider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger2 });
25314
- }
25315
- const token = { token: process.env[bearerTokenKey] };
25316
- client.setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
25317
- return token;
25318
- };
25319
- var EXPIRE_WINDOW_MS = 5 * 60 * 1e3;
25320
- var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
25321
- var getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
25322
- const { SSOOIDCClient: SSOOIDCClient2 } = await Promise.resolve().then(() => (init_sso_oidc(), sso_oidc_exports));
25323
- const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
25324
- const ssoOidcClient = new SSOOIDCClient2(Object.assign({}, init.clientConfig ?? {}, {
25325
- region: ssoRegion ?? init.clientConfig?.region,
25326
- logger: coalesce("logger"),
25327
- userAgentAppId: coalesce("userAgentAppId")
25328
- }));
25329
- return ssoOidcClient;
25330
- };
25331
- var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
25332
- const { CreateTokenCommand: CreateTokenCommand2 } = await Promise.resolve().then(() => (init_sso_oidc(), sso_oidc_exports));
25333
- const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
25334
- return ssoOidcClient.send(new CreateTokenCommand2({
25335
- clientId: ssoToken.clientId,
25336
- clientSecret: ssoToken.clientSecret,
25337
- refreshToken: ssoToken.refreshToken,
25338
- grantType: "refresh_token"
25339
- }));
25340
- };
25341
- var validateTokenExpiry = (token) => {
25342
- if (token.expiration && token.expiration.getTime() < Date.now()) {
25343
- throw new propertyProvider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
25344
- }
25345
- };
25346
- var validateTokenKey = (key, value, forRefresh = false) => {
25347
- if (typeof value === "undefined") {
25348
- throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
25349
- }
25350
- };
25351
- var { writeFile: writeFile2 } = node_fs.promises;
25352
- var writeSSOTokenToFile = (id, ssoToken) => {
25353
- const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id);
25354
- const tokenString = JSON.stringify(ssoToken, null, 2);
25355
- return writeFile2(tokenFilepath, tokenString);
25356
- };
25357
- var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
25358
- var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
25359
- init.logger?.debug("@aws-sdk/token-providers - fromSso");
25360
- const profiles = await sharedIniFileLoader.parseKnownFiles(init);
25361
- const profileName = sharedIniFileLoader.getProfileName({
25362
- profile: init.profile ?? callerClientConfig?.profile
25363
- });
25364
- const profile = profiles[profileName];
25365
- if (!profile) {
25366
- throw new propertyProvider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
25367
- } else if (!profile["sso_session"]) {
25368
- throw new propertyProvider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
25369
- }
25370
- const ssoSessionName = profile["sso_session"];
25371
- const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
25372
- const ssoSession = ssoSessions[ssoSessionName];
25373
- if (!ssoSession) {
25374
- throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
25375
- }
25376
- for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
25377
- if (!ssoSession[ssoSessionRequiredKey]) {
25378
- throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
25379
- }
25380
- }
25381
- ssoSession["sso_start_url"];
25382
- const ssoRegion = ssoSession["sso_region"];
25383
- let ssoToken;
25384
- try {
25385
- ssoToken = await sharedIniFileLoader.getSSOTokenFromFile(ssoSessionName);
25386
- } catch (e5) {
25387
- throw new propertyProvider.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
25388
- }
25389
- validateTokenKey("accessToken", ssoToken.accessToken);
25390
- validateTokenKey("expiresAt", ssoToken.expiresAt);
25391
- const { accessToken, expiresAt } = ssoToken;
25392
- const existingToken = { token: accessToken, expiration: new Date(expiresAt) };
25393
- if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
25394
- return existingToken;
25395
- }
25396
- if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {
25397
- validateTokenExpiry(existingToken);
25398
- return existingToken;
25399
- }
25400
- validateTokenKey("clientId", ssoToken.clientId, true);
25401
- validateTokenKey("clientSecret", ssoToken.clientSecret, true);
25402
- validateTokenKey("refreshToken", ssoToken.refreshToken, true);
25403
- try {
25404
- lastRefreshAttemptTime.setTime(Date.now());
25405
- const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
25406
- validateTokenKey("accessToken", newSsoOidcToken.accessToken);
25407
- validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
25408
- const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);
25409
- try {
25410
- await writeSSOTokenToFile(ssoSessionName, {
25411
- ...ssoToken,
25412
- accessToken: newSsoOidcToken.accessToken,
25413
- expiresAt: newTokenExpiration.toISOString(),
25414
- refreshToken: newSsoOidcToken.refreshToken
25415
- });
25416
- } catch (error2) {
25417
- }
25418
- return {
25419
- token: newSsoOidcToken.accessToken,
25420
- expiration: newTokenExpiration
25421
- };
25422
- } catch (error2) {
25423
- validateTokenExpiry(existingToken);
25424
- return existingToken;
25425
- }
25426
- };
25427
- var fromStatic = ({ token, logger: logger2 }) => async () => {
25428
- logger2?.debug("@aws-sdk/token-providers - fromStatic");
25429
- if (!token || !token.token) {
25430
- throw new propertyProvider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
25431
- }
25432
- return token;
25433
- };
25434
- var nodeProvider = (init = {}) => propertyProvider.memoize(propertyProvider.chain(fromSso(init), async () => {
25435
- throw new propertyProvider.TokenProviderError("Could not load token from any providers", false);
25436
- }), (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, (token) => token.expiration !== void 0);
25437
- exports2.fromEnvSigningName = fromEnvSigningName;
25438
- exports2.fromSso = fromSso;
25439
- exports2.fromStatic = fromStatic;
25440
- exports2.nodeProvider = nodeProvider;
25441
- }
25442
- });
25443
-
25444
25338
  // node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js
25445
- var require_dist_cjs65 = __commonJS({
25339
+ var require_dist_cjs64 = __commonJS({
25446
25340
  "node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js"(exports2) {
25447
25341
  "use strict";
25448
25342
  var eventstreamSerdeUniversal = require_dist_cjs35();
@@ -28124,11 +28018,11 @@ var require_runtimeConfig = __commonJS({
28124
28018
  var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
28125
28019
  var credential_provider_node_1 = require_dist_cjs62();
28126
28020
  var eventstream_handler_node_1 = require_dist_cjs63();
28127
- var token_providers_1 = require_dist_cjs64();
28021
+ var token_providers_1 = require_dist_cjs56();
28128
28022
  var util_user_agent_node_1 = require_dist_cjs51();
28129
28023
  var config_resolver_1 = require_dist_cjs39();
28130
28024
  var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports));
28131
- var eventstream_serde_node_1 = require_dist_cjs65();
28025
+ var eventstream_serde_node_1 = require_dist_cjs64();
28132
28026
  var hash_node_1 = require_dist_cjs52();
28133
28027
  var middleware_retry_1 = require_dist_cjs47();
28134
28028
  var node_config_provider_1 = require_dist_cjs43();
@@ -28200,7 +28094,7 @@ var require_runtimeConfig = __commonJS({
28200
28094
  });
28201
28095
 
28202
28096
  // node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js
28203
- var require_dist_cjs66 = __commonJS({
28097
+ var require_dist_cjs65 = __commonJS({
28204
28098
  "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js"(exports2) {
28205
28099
  "use strict";
28206
28100
  var middlewareEventstream = require_dist_cjs3();
@@ -29045,13 +28939,13 @@ var import_client_bedrock_runtime, import_client_bedrock_runtime2, import_client
29045
28939
  var init_dist3 = __esm({
29046
28940
  "node_modules/@ai-sdk/amazon-bedrock/dist/index.mjs"() {
29047
28941
  init_dist2();
29048
- import_client_bedrock_runtime = __toESM(require_dist_cjs66(), 1);
28942
+ import_client_bedrock_runtime = __toESM(require_dist_cjs65(), 1);
29049
28943
  init_dist();
29050
- import_client_bedrock_runtime2 = __toESM(require_dist_cjs66(), 1);
28944
+ import_client_bedrock_runtime2 = __toESM(require_dist_cjs65(), 1);
29051
28945
  init_dist();
29052
28946
  init_dist();
29053
28947
  init_dist2();
29054
- import_client_bedrock_runtime3 = __toESM(require_dist_cjs66(), 1);
28948
+ import_client_bedrock_runtime3 = __toESM(require_dist_cjs65(), 1);
29055
28949
  generateFileId = createIdGenerator({ prefix: "file", size: 16 });
29056
28950
  BedrockChatLanguageModel = class {
29057
28951
  constructor(modelId, settings, config) {
@@ -107472,7 +107366,9 @@ var init_ProbeAgent = __esm({
107472
107366
  return nativeTools;
107473
107367
  }
107474
107368
  for (const [toolName, toolImpl] of Object.entries(this.toolImplementations)) {
107475
- const { schema, description } = this._getToolSchemaAndDescription(toolName);
107369
+ const toolInfo = this._getToolSchemaAndDescription(toolName);
107370
+ if (!toolInfo) continue;
107371
+ const { schema, description } = toolInfo;
107476
107372
  if (schema && description) {
107477
107373
  nativeTools[toolName] = wrapTool(toolName, schema, description, toolImpl.execute);
107478
107374
  }