@asm-agent/coding-agent 0.8.6 → 0.8.8
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/CHANGELOG.md +8 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/__init__.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/_winjob.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/bash.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/harness.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/mcp.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/mcp_base.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/src/rlm/__pycache__/repl.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/test/__pycache__/test_agent_message_skill.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/test/__pycache__/test_bash.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/test/__pycache__/test_harness.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/test/__pycache__/test_mcp.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/test/__pycache__/test_mcp_base.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/test/__pycache__/test_repl.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/test/__pycache__/test_subagent_registry.cpython-313.pyc +0 -0
- package/dist/asm-agent-runtime/test/__pycache__/test_winjob.cpython-313.pyc +0 -0
- package/dist/bundle/{anthropic-CILMWJ23.js → anthropic-OFECORE7.js} +1 -1
- package/dist/bundle/{azure-openai-responses-TPNZ54LG.js → azure-openai-responses-AOVTLR6N.js} +2 -2
- package/dist/bundle/{bundled-modules-SKYRKITN.js → bundled-modules-JQCJDEIY.js} +4 -4
- package/dist/bundle/{chunk-EFDSSG52.js → chunk-7TB7CGPV.js} +319 -292
- package/dist/bundle/{chunk-IYXHHLR6.js → chunk-A65OM3TZ.js} +1 -1
- package/dist/bundle/{chunk-J6ATXG62.js → chunk-CMMSLBAW.js} +12 -8
- package/dist/bundle/{chunk-YYVQTKC6.js → chunk-JC2TT4MZ.js} +88 -4
- package/dist/bundle/{chunk-7QIBGY2R.js → chunk-M67RGWDQ.js} +597 -191
- package/dist/bundle/{cli-main-O3HK7MNQ.js → cli-main-FNHDQGQD.js} +4 -4
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/{compile-UQNZ2TRI.js → compile-BYYUFOG3.js} +1 -1
- package/dist/bundle/{google-3TL5FKLN.js → google-RVJL6RIQ.js} +1 -1
- package/dist/bundle/{google-vertex-WVFMK6QO.js → google-vertex-EZTRRRH6.js} +1 -1
- package/dist/bundle/{main-4QYKME2K.js → main-IYXIIAJN.js} +4 -4
- package/dist/bundle/{mistral-QV2OSBWW.js → mistral-FSGKSMA7.js} +1 -1
- package/dist/bundle/{openai-codex-responses-J2GJ2FAO.js → openai-codex-responses-VM5Y564D.js} +2 -2
- package/dist/bundle/{openai-completions-W622H2EL.js → openai-completions-X46FOQDN.js} +5 -2
- package/dist/bundle/{openai-responses-V75QG5T7.js → openai-responses-SOQNEPBE.js} +2 -2
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +9 -1
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/ollama-models.d.ts +6 -0
- package/dist/core/ollama-models.d.ts.map +1 -0
- package/dist/core/ollama-models.js +77 -0
- package/dist/core/ollama-models.js.map +1 -0
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +1 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/skills/request-report/SKILL.md +19 -0
- package/docs/models.md +2 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +5 -5
- package/skills/request-report/SKILL.md +19 -0
|
@@ -288,7 +288,7 @@ import {
|
|
|
288
288
|
_Object_,
|
|
289
289
|
result_exports,
|
|
290
290
|
value_exports
|
|
291
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-CMMSLBAW.js";
|
|
292
292
|
import {
|
|
293
293
|
parseJsonWithRepair,
|
|
294
294
|
parseStreamingJson,
|
|
@@ -331,7 +331,7 @@ import {
|
|
|
331
331
|
getSupportedThinkingLevels,
|
|
332
332
|
modelsAreEqual,
|
|
333
333
|
supportsFastMode
|
|
334
|
-
} from "./chunk-
|
|
334
|
+
} from "./chunk-M67RGWDQ.js";
|
|
335
335
|
import {
|
|
336
336
|
__commonJS,
|
|
337
337
|
__export,
|
|
@@ -357,9 +357,9 @@ var require_polyfills = __commonJS({
|
|
|
357
357
|
}
|
|
358
358
|
if (typeof process.chdir === "function") {
|
|
359
359
|
chdir = process.chdir;
|
|
360
|
-
process.chdir = function(
|
|
360
|
+
process.chdir = function(d) {
|
|
361
361
|
cwd = null;
|
|
362
|
-
chdir.call(process,
|
|
362
|
+
chdir.call(process, d);
|
|
363
363
|
};
|
|
364
364
|
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
|
|
365
365
|
}
|
|
@@ -1921,13 +1921,13 @@ var require_index_min = __commonJS({
|
|
|
1921
1921
|
"../../node_modules/lru-cache/dist/commonjs/node/index.min.js"(exports) {
|
|
1922
1922
|
"use strict";
|
|
1923
1923
|
var j2 = (u, t) => () => (t || u((t = { exports: {} }).exports, t), t.exports);
|
|
1924
|
-
var I2 = j2((
|
|
1924
|
+
var I2 = j2((O) => {
|
|
1925
1925
|
"use strict";
|
|
1926
|
-
Object.defineProperty(
|
|
1927
|
-
|
|
1926
|
+
Object.defineProperty(O, "__esModule", { value: true });
|
|
1927
|
+
O.tracing = O.metrics = void 0;
|
|
1928
1928
|
var U2 = __require("node:diagnostics_channel");
|
|
1929
|
-
|
|
1930
|
-
|
|
1929
|
+
O.metrics = (0, U2.channel)("lru-cache:metrics");
|
|
1930
|
+
O.tracing = (0, U2.tracingChannel)("lru-cache");
|
|
1931
1931
|
});
|
|
1932
1932
|
var P2 = j2((R2) => {
|
|
1933
1933
|
"use strict";
|
|
@@ -1940,14 +1940,14 @@ var require_index_min = __commonJS({
|
|
|
1940
1940
|
var g = I2();
|
|
1941
1941
|
var N = P2();
|
|
1942
1942
|
var C2 = () => g.metrics.hasSubscribers || g.tracing.hasSubscribers;
|
|
1943
|
-
var
|
|
1943
|
+
var k2 = /* @__PURE__ */ new Set();
|
|
1944
1944
|
var G2 = typeof process == "object" && process ? process : {};
|
|
1945
1945
|
var V2 = (u, t, e, i) => {
|
|
1946
1946
|
typeof G2.emitWarning == "function" ? G2.emitWarning(u, t, e, i) : console.error(`[${e}] ${t}: ${u}`);
|
|
1947
1947
|
};
|
|
1948
|
-
var q2 = (u) => !
|
|
1949
|
-
var
|
|
1950
|
-
var H2 = (u) =>
|
|
1948
|
+
var q2 = (u) => !k2.has(u);
|
|
1949
|
+
var T2 = (u) => !!u && u === Math.floor(u) && u > 0 && isFinite(u);
|
|
1950
|
+
var H2 = (u) => T2(u) ? u <= Math.pow(2, 8) ? Uint8Array : u <= Math.pow(2, 16) ? Uint16Array : u <= Math.pow(2, 32) ? Uint32Array : u <= Number.MAX_SAFE_INTEGER ? W2 : null : null;
|
|
1951
1951
|
var W2 = class extends Array {
|
|
1952
1952
|
constructor(t) {
|
|
1953
1953
|
super(t), this.fill(0);
|
|
@@ -1975,7 +1975,7 @@ var require_index_min = __commonJS({
|
|
|
1975
1975
|
return this.heap[--this.length];
|
|
1976
1976
|
}
|
|
1977
1977
|
};
|
|
1978
|
-
var
|
|
1978
|
+
var M2 = class u {
|
|
1979
1979
|
#o;
|
|
1980
1980
|
#c;
|
|
1981
1981
|
#m;
|
|
@@ -2057,30 +2057,30 @@ var require_index_min = __commonJS({
|
|
|
2057
2057
|
return this.#S;
|
|
2058
2058
|
}
|
|
2059
2059
|
constructor(t) {
|
|
2060
|
-
let { max: e = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: o, updateAgeOnHas: l3, allowStale: h, dispose: r, onInsert: c, disposeAfter: w, noDisposeOnSet: y2, noUpdateTTL:
|
|
2060
|
+
let { max: e = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: o, updateAgeOnHas: l3, allowStale: h, dispose: r, onInsert: c, disposeAfter: w, noDisposeOnSet: y2, noUpdateTTL: d, maxSize: p = 0, maxEntrySize: f2 = 0, sizeCalculation: _2, fetchMethod: a, memoMethod: S2, noDeleteOnFetchRejection: F2, noDeleteOnStaleGet: b2, allowStaleOnFetchRejection: m2, allowStaleOnFetchAbort: A2, ignoreFetchAbort: z2, backgroundFetchSize: x2 = 1, perf: v2 } = t;
|
|
2061
2061
|
if (this.backgroundFetchSize = x2, v2 !== void 0 && typeof v2?.now != "function") throw new TypeError("perf option must have a now() method if specified");
|
|
2062
|
-
if (this.#w = v2 ?? N.defaultPerf, e !== 0 && !
|
|
2063
|
-
let
|
|
2064
|
-
if (!
|
|
2062
|
+
if (this.#w = v2 ?? N.defaultPerf, e !== 0 && !T2(e)) throw new TypeError("max option must be a nonnegative integer");
|
|
2063
|
+
let E = e ? H2(e) : Array;
|
|
2064
|
+
if (!E) throw new Error("invalid max value: " + e);
|
|
2065
2065
|
if (this.#o = e, this.#c = p, this.maxEntrySize = f2 || this.#c, this.sizeCalculation = _2, this.sizeCalculation) {
|
|
2066
2066
|
if (!this.#c && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
2067
2067
|
if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
|
|
2068
2068
|
}
|
|
2069
2069
|
if (S2 !== void 0 && typeof S2 != "function") throw new TypeError("memoMethod must be a function if defined");
|
|
2070
2070
|
if (this.#j = S2, a !== void 0 && typeof a != "function") throw new TypeError("fetchMethod must be a function if specified");
|
|
2071
|
-
if (this.#x = a, this.#U = !!a, this.#s = /* @__PURE__ */ new Map(), this.#i = Array.from({ length: e }).fill(void 0), this.#t = Array.from({ length: e }).fill(void 0), this.#l = new
|
|
2072
|
-
if (this.#c !== 0 && !
|
|
2073
|
-
if (!
|
|
2071
|
+
if (this.#x = a, this.#U = !!a, this.#s = /* @__PURE__ */ new Map(), this.#i = Array.from({ length: e }).fill(void 0), this.#t = Array.from({ length: e }).fill(void 0), this.#l = new E(e), this.#u = new E(e), this.#a = 0, this.#h = 0, this.#_ = L2.create(e), this.#n = 0, this.#b = 0, typeof r == "function" && (this.#m = r), typeof c == "function" && (this.#W = c), typeof w == "function" ? (this.#S = w, this.#r = []) : (this.#S = void 0, this.#r = void 0), this.#T = !!this.#m, this.#R = !!this.#W, this.#f = !!this.#S, this.noDisposeOnSet = !!y2, this.noUpdateTTL = !!d, this.noDeleteOnFetchRejection = !!F2, this.allowStaleOnFetchRejection = !!m2, this.allowStaleOnFetchAbort = !!A2, this.ignoreFetchAbort = !!z2, this.maxEntrySize !== 0) {
|
|
2072
|
+
if (this.#c !== 0 && !T2(this.#c)) throw new TypeError("maxSize must be a positive integer if specified");
|
|
2073
|
+
if (!T2(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
2074
2074
|
this.#X();
|
|
2075
2075
|
}
|
|
2076
|
-
if (this.allowStale = !!h, this.noDeleteOnStaleGet = !!b2, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!l3, this.ttlResolution =
|
|
2077
|
-
if (!
|
|
2076
|
+
if (this.allowStale = !!h, this.noDeleteOnStaleGet = !!b2, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!l3, this.ttlResolution = T2(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n, this.ttl = i || 0, this.ttl) {
|
|
2077
|
+
if (!T2(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
|
|
2078
2078
|
this.#k();
|
|
2079
2079
|
}
|
|
2080
2080
|
if (this.#o === 0 && this.ttl === 0 && this.#c === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
2081
2081
|
if (!this.ttlAutopurge && !this.#o && !this.#c) {
|
|
2082
2082
|
let D = "LRU_CACHE_UNBOUNDED";
|
|
2083
|
-
q2(D) && (
|
|
2083
|
+
q2(D) && (k2.add(D), V2("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", D, u));
|
|
2084
2084
|
}
|
|
2085
2085
|
}
|
|
2086
2086
|
getRemainingTTL(t) {
|
|
@@ -2149,11 +2149,11 @@ var require_index_min = __commonJS({
|
|
|
2149
2149
|
this.#b = 0, this.#y = t, this.#C = (e) => {
|
|
2150
2150
|
this.#b -= t[e], t[e] = 0;
|
|
2151
2151
|
}, this.#N = (e, i, s, n) => {
|
|
2152
|
-
if (!
|
|
2152
|
+
if (!T2(s)) {
|
|
2153
2153
|
if (this.#e(i)) return this.backgroundFetchSize;
|
|
2154
2154
|
if (n) {
|
|
2155
2155
|
if (typeof n != "function") throw new TypeError("sizeCalculation must be a function");
|
|
2156
|
-
if (s = n(i, e), !
|
|
2156
|
+
if (s = n(i, e), !T2(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
2157
2157
|
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
2158
2158
|
}
|
|
2159
2159
|
return s;
|
|
@@ -2286,24 +2286,24 @@ var require_index_min = __commonJS({
|
|
|
2286
2286
|
r && !c && (r.value = e);
|
|
2287
2287
|
let y2 = this.#N(t, e, i.size || 0, h, r);
|
|
2288
2288
|
if (this.maxEntrySize && y2 > this.maxEntrySize) return this.#v(t, "set"), r && (r.set = "miss", r.maxEntrySizeExceeded = true), this;
|
|
2289
|
-
let
|
|
2290
|
-
if (
|
|
2289
|
+
let d = this.#n === 0 ? void 0 : this.#s.get(t);
|
|
2290
|
+
if (d === void 0) d = this.#n === 0 ? this.#h : this.#_.length !== 0 ? this.#_.pop() : this.#n === this.#o ? this.#P(false) : this.#n, this.#i[d] = t, this.#t[d] = e, this.#s.set(t, d), this.#l[this.#h] = d, this.#u[d] = this.#h, this.#h = d, this.#n++, this.#I(d, y2, r), r && (r.set = "add"), w = false, this.#R && !c && this.#W?.(e, t, "add");
|
|
2291
2291
|
else {
|
|
2292
|
-
this.#M(
|
|
2293
|
-
let p = this.#t[
|
|
2292
|
+
this.#M(d);
|
|
2293
|
+
let p = this.#t[d];
|
|
2294
2294
|
if (e !== p) {
|
|
2295
2295
|
if (!l3) if (this.#e(p)) {
|
|
2296
2296
|
p !== s && p.__abortController.abort(new Error("replaced"));
|
|
2297
2297
|
let { __staleWhileFetching: f2 } = p;
|
|
2298
2298
|
f2 !== void 0 && f2 !== e && (this.#T && this.#m?.(f2, t, "set"), this.#f && this.#r?.push([f2, t, "set"]));
|
|
2299
2299
|
} else this.#T && this.#m?.(p, t, "set"), this.#f && this.#r?.push([p, t, "set"]);
|
|
2300
|
-
if (this.#C(
|
|
2300
|
+
if (this.#C(d), this.#I(d, y2, r), this.#t[d] = e, !c) {
|
|
2301
2301
|
let f2 = p && this.#e(p) ? p.__staleWhileFetching : p, _2 = f2 === void 0 ? "add" : e !== f2 ? "replace" : "update";
|
|
2302
2302
|
r && (r.set = _2, f2 !== void 0 && (r.oldValue = f2)), this.#R && this.onInsert?.(e, t, _2);
|
|
2303
2303
|
}
|
|
2304
2304
|
} else c || (r && (r.set = "update"), this.#R && this.onInsert?.(e, t, "update"));
|
|
2305
2305
|
}
|
|
2306
|
-
if (n !== 0 && !this.#d && this.#k(), this.#d && (w || this.#H(
|
|
2306
|
+
if (n !== 0 && !this.#d && this.#k(), this.#d && (w || this.#H(d, n, o), r && this.#E(r, d)), !l3 && this.#f && this.#r) {
|
|
2307
2307
|
let p = this.#r, f2;
|
|
2308
2308
|
for (; f2 = p?.shift(); ) this.#S?.(...f2);
|
|
2309
2309
|
}
|
|
@@ -2369,11 +2369,11 @@ var require_index_min = __commonJS({
|
|
|
2369
2369
|
let h = { signal: o.signal, options: i, context: s }, r = (f2, _2 = false) => {
|
|
2370
2370
|
let { aborted: a } = o.signal, S2 = i.ignoreFetchAbort && f2 !== void 0, F2 = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && f2 !== void 0);
|
|
2371
2371
|
if (i.status && (a && !_2 ? (i.status.fetchAborted = true, i.status.fetchError = o.signal.reason, S2 && (i.status.fetchAbortIgnored = true)) : i.status.fetchResolved = true), a && !S2 && !_2) return w(o.signal.reason, F2);
|
|
2372
|
-
let b2 =
|
|
2373
|
-
return (m2 ===
|
|
2372
|
+
let b2 = d, m2 = this.#t[e];
|
|
2373
|
+
return (m2 === d || m2 === void 0 && S2 && _2) && (f2 === void 0 ? b2.__staleWhileFetching !== void 0 ? this.#t[e] = b2.__staleWhileFetching : this.#v(t, "fetch") : (i.status && (i.status.fetchUpdated = true), this.#O(t, f2, h.options, b2))), f2;
|
|
2374
2374
|
}, c = (f2) => (i.status && (i.status.fetchRejected = true, i.status.fetchError = f2), w(f2, false)), w = (f2, _2) => {
|
|
2375
|
-
let { aborted: a } = o.signal, S2 = a && i.allowStaleOnFetchAbort, F2 = S2 || i.allowStaleOnFetchRejection, b2 = F2 || i.noDeleteOnFetchRejection, m2 =
|
|
2376
|
-
if (this.#t[e] ===
|
|
2375
|
+
let { aborted: a } = o.signal, S2 = a && i.allowStaleOnFetchAbort, F2 = S2 || i.allowStaleOnFetchRejection, b2 = F2 || i.noDeleteOnFetchRejection, m2 = d;
|
|
2376
|
+
if (this.#t[e] === d && (!b2 || !_2 && m2.__staleWhileFetching === void 0 ? this.#v(t, "fetch") : S2 || (this.#t[e] = m2.__staleWhileFetching)), F2) return i.status && m2.__staleWhileFetching !== void 0 && (i.status.returnedStale = true), m2.__staleWhileFetching;
|
|
2377
2377
|
if (m2.__returned === m2) throw f2;
|
|
2378
2378
|
}, y2 = (f2, _2) => {
|
|
2379
2379
|
let a = this.#x?.(t, n, h);
|
|
@@ -2382,7 +2382,7 @@ var require_index_min = __commonJS({
|
|
|
2382
2382
|
}), a && a instanceof Promise ? a.then((S2) => f2(S2 === void 0 ? void 0 : S2), _2) : a !== void 0 && f2(a);
|
|
2383
2383
|
};
|
|
2384
2384
|
i.status && (i.status.fetchDispatched = true);
|
|
2385
|
-
let
|
|
2385
|
+
let d = new Promise(y2).then(r, c), p = Object.assign(d, { __abortController: o, __staleWhileFetching: n, __returned: void 0 });
|
|
2386
2386
|
return e === void 0 ? (this.#O(t, p, { ...h.options, status: void 0 }), e = this.#s.get(t)) : this.#t[e] = p, p;
|
|
2387
2387
|
}
|
|
2388
2388
|
#e(t) {
|
|
@@ -2398,9 +2398,9 @@ var require_index_min = __commonJS({
|
|
|
2398
2398
|
})), n;
|
|
2399
2399
|
}
|
|
2400
2400
|
async #q(t, e = {}) {
|
|
2401
|
-
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: l3 = this.noDisposeOnSet, size: h = 0, sizeCalculation: r = this.sizeCalculation, noUpdateTTL: c = this.noUpdateTTL, noDeleteOnFetchRejection: w = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: y2 = this.allowStaleOnFetchRejection, ignoreFetchAbort:
|
|
2401
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: l3 = this.noDisposeOnSet, size: h = 0, sizeCalculation: r = this.sizeCalculation, noUpdateTTL: c = this.noUpdateTTL, noDeleteOnFetchRejection: w = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: y2 = this.allowStaleOnFetchRejection, ignoreFetchAbort: d = this.ignoreFetchAbort, allowStaleOnFetchAbort: p = this.allowStaleOnFetchAbort, context: f2, forceRefresh: _2 = false, status: a, signal: S2 } = e;
|
|
2402
2402
|
if (a && (a.op = "fetch", a.key = t, _2 && (a.forceRefresh = true), a.cache = this), !this.#U) return a && (a.fetch = "get"), this.#L(t, { allowStale: i, updateAgeOnGet: s, noDeleteOnStaleGet: n, status: a });
|
|
2403
|
-
let F2 = { allowStale: i, updateAgeOnGet: s, noDeleteOnStaleGet: n, ttl: o, noDisposeOnSet: l3, size: h, sizeCalculation: r, noUpdateTTL: c, noDeleteOnFetchRejection: w, allowStaleOnFetchRejection: y2, allowStaleOnFetchAbort: p, ignoreFetchAbort:
|
|
2403
|
+
let F2 = { allowStale: i, updateAgeOnGet: s, noDeleteOnStaleGet: n, ttl: o, noDisposeOnSet: l3, size: h, sizeCalculation: r, noUpdateTTL: c, noDeleteOnFetchRejection: w, allowStaleOnFetchRejection: y2, allowStaleOnFetchAbort: p, ignoreFetchAbort: d, status: a, signal: S2 }, b2 = this.#s.get(t);
|
|
2404
2404
|
if (b2 === void 0) {
|
|
2405
2405
|
a && (a.fetch = "miss");
|
|
2406
2406
|
let m2 = this.#G(t, b2, F2, f2);
|
|
@@ -2408,8 +2408,8 @@ var require_index_min = __commonJS({
|
|
|
2408
2408
|
} else {
|
|
2409
2409
|
let m2 = this.#t[b2];
|
|
2410
2410
|
if (this.#e(m2)) {
|
|
2411
|
-
let
|
|
2412
|
-
return a && (a.fetch = "inflight",
|
|
2411
|
+
let E = i && m2.__staleWhileFetching !== void 0;
|
|
2412
|
+
return a && (a.fetch = "inflight", E && (a.returnedStale = true)), E ? m2.__staleWhileFetching : m2.__returned = m2;
|
|
2413
2413
|
}
|
|
2414
2414
|
let A2 = this.#p(b2);
|
|
2415
2415
|
if (!_2 && !A2) return a && (a.fetch = "hit"), this.#M(b2), s && this.#D(b2), a && this.#E(a, b2), m2;
|
|
@@ -2518,7 +2518,7 @@ var require_index_min = __commonJS({
|
|
|
2518
2518
|
}
|
|
2519
2519
|
}
|
|
2520
2520
|
};
|
|
2521
|
-
exports.LRUCache =
|
|
2521
|
+
exports.LRUCache = M2;
|
|
2522
2522
|
}
|
|
2523
2523
|
});
|
|
2524
2524
|
|
|
@@ -3482,13 +3482,13 @@ var require_applyReviver = __commonJS({
|
|
|
3482
3482
|
val[i] = v1;
|
|
3483
3483
|
}
|
|
3484
3484
|
} else if (val instanceof Map) {
|
|
3485
|
-
for (const
|
|
3486
|
-
const v0 = val.get(
|
|
3487
|
-
const v1 = applyReviver(reviver, val,
|
|
3485
|
+
for (const k2 of Array.from(val.keys())) {
|
|
3486
|
+
const v0 = val.get(k2);
|
|
3487
|
+
const v1 = applyReviver(reviver, val, k2, v0);
|
|
3488
3488
|
if (v1 === void 0)
|
|
3489
|
-
val.delete(
|
|
3489
|
+
val.delete(k2);
|
|
3490
3490
|
else if (v1 !== v0)
|
|
3491
|
-
val.set(
|
|
3491
|
+
val.set(k2, v1);
|
|
3492
3492
|
}
|
|
3493
3493
|
} else if (val instanceof Set) {
|
|
3494
3494
|
for (const v0 of Array.from(val)) {
|
|
@@ -3501,12 +3501,12 @@ var require_applyReviver = __commonJS({
|
|
|
3501
3501
|
}
|
|
3502
3502
|
}
|
|
3503
3503
|
} else {
|
|
3504
|
-
for (const [
|
|
3505
|
-
const v1 = applyReviver(reviver, val,
|
|
3504
|
+
for (const [k2, v0] of Object.entries(val)) {
|
|
3505
|
+
const v1 = applyReviver(reviver, val, k2, v0);
|
|
3506
3506
|
if (v1 === void 0)
|
|
3507
|
-
delete val[
|
|
3507
|
+
delete val[k2];
|
|
3508
3508
|
else if (v1 !== v0)
|
|
3509
|
-
val[
|
|
3509
|
+
val[k2] = v1;
|
|
3510
3510
|
}
|
|
3511
3511
|
}
|
|
3512
3512
|
}
|
|
@@ -3818,13 +3818,13 @@ var require_Collection = __commonJS({
|
|
|
3818
3818
|
function collectionFromPath(schema, path6, value) {
|
|
3819
3819
|
let v2 = value;
|
|
3820
3820
|
for (let i = path6.length - 1; i >= 0; --i) {
|
|
3821
|
-
const
|
|
3822
|
-
if (typeof
|
|
3821
|
+
const k2 = path6[i];
|
|
3822
|
+
if (typeof k2 === "number" && Number.isInteger(k2) && k2 >= 0) {
|
|
3823
3823
|
const a = [];
|
|
3824
|
-
a[
|
|
3824
|
+
a[k2] = v2;
|
|
3825
3825
|
v2 = a;
|
|
3826
3826
|
} else {
|
|
3827
|
-
v2 = /* @__PURE__ */ new Map([[
|
|
3827
|
+
v2 = /* @__PURE__ */ new Map([[k2, v2]]);
|
|
3828
3828
|
}
|
|
3829
3829
|
}
|
|
3830
3830
|
return createNode.createNode(v2, void 0, {
|
|
@@ -4799,9 +4799,9 @@ var require_Pair = __commonJS({
|
|
|
4799
4799
|
var addPairToJSMap = require_addPairToJSMap();
|
|
4800
4800
|
var identity = require_identity();
|
|
4801
4801
|
function createPair(key, value, ctx) {
|
|
4802
|
-
const
|
|
4802
|
+
const k2 = createNode.createNode(key, void 0, ctx);
|
|
4803
4803
|
const v2 = createNode.createNode(value, void 0, ctx);
|
|
4804
|
-
return new Pair(
|
|
4804
|
+
return new Pair(k2, v2);
|
|
4805
4805
|
}
|
|
4806
4806
|
var Pair = class _Pair {
|
|
4807
4807
|
constructor(key, value = null) {
|
|
@@ -4992,12 +4992,12 @@ var require_YAMLMap = __commonJS({
|
|
|
4992
4992
|
var Pair = require_Pair();
|
|
4993
4993
|
var Scalar = require_Scalar();
|
|
4994
4994
|
function findPair(items, key) {
|
|
4995
|
-
const
|
|
4995
|
+
const k2 = identity.isScalar(key) ? key.value : key;
|
|
4996
4996
|
for (const it2 of items) {
|
|
4997
4997
|
if (identity.isPair(it2)) {
|
|
4998
|
-
if (it2.key === key || it2.key ===
|
|
4998
|
+
if (it2.key === key || it2.key === k2)
|
|
4999
4999
|
return it2;
|
|
5000
|
-
if (identity.isScalar(it2.key) && it2.key.value ===
|
|
5000
|
+
if (identity.isScalar(it2.key) && it2.key.value === k2)
|
|
5001
5001
|
return it2;
|
|
5002
5002
|
}
|
|
5003
5003
|
}
|
|
@@ -5363,8 +5363,8 @@ var require_stringifyNumber = __commonJS({
|
|
|
5363
5363
|
i = n.length;
|
|
5364
5364
|
n += ".";
|
|
5365
5365
|
}
|
|
5366
|
-
let
|
|
5367
|
-
while (
|
|
5366
|
+
let d = minFractionDigits - (n.length - i - 1);
|
|
5367
|
+
while (d-- > 0)
|
|
5368
5368
|
n += "0";
|
|
5369
5369
|
}
|
|
5370
5370
|
return n;
|
|
@@ -6103,10 +6103,10 @@ var require_timestamp = __commonJS({
|
|
|
6103
6103
|
let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);
|
|
6104
6104
|
const tz = match[8];
|
|
6105
6105
|
if (tz && tz !== "Z") {
|
|
6106
|
-
let
|
|
6107
|
-
if (Math.abs(
|
|
6108
|
-
|
|
6109
|
-
date -= 6e4 *
|
|
6106
|
+
let d = parseSexagesimal(tz, false);
|
|
6107
|
+
if (Math.abs(d) < 30)
|
|
6108
|
+
d *= 60;
|
|
6109
|
+
date -= 6e4 * d;
|
|
6110
6110
|
}
|
|
6111
6111
|
return new Date(date);
|
|
6112
6112
|
},
|
|
@@ -6508,9 +6508,9 @@ var require_Document = __commonJS({
|
|
|
6508
6508
|
* recursively wrapping all values as `Scalar` or `Collection` nodes.
|
|
6509
6509
|
*/
|
|
6510
6510
|
createPair(key, value, options = {}) {
|
|
6511
|
-
const
|
|
6511
|
+
const k2 = this.createNode(key, null, options);
|
|
6512
6512
|
const v2 = this.createNode(value, null, options);
|
|
6513
|
-
return new Pair.Pair(
|
|
6513
|
+
return new Pair.Pair(k2, v2);
|
|
6514
6514
|
}
|
|
6515
6515
|
/**
|
|
6516
6516
|
* Removes a value from the document.
|
|
@@ -10805,18 +10805,18 @@ var require_ieee754 = __commonJS({
|
|
|
10805
10805
|
var eBias = eMax >> 1;
|
|
10806
10806
|
var nBits = -7;
|
|
10807
10807
|
var i = isLE ? nBytes - 1 : 0;
|
|
10808
|
-
var
|
|
10808
|
+
var d = isLE ? -1 : 1;
|
|
10809
10809
|
var s = buffer[offset + i];
|
|
10810
|
-
i +=
|
|
10810
|
+
i += d;
|
|
10811
10811
|
e = s & (1 << -nBits) - 1;
|
|
10812
10812
|
s >>= -nBits;
|
|
10813
10813
|
nBits += eLen;
|
|
10814
|
-
for (; nBits > 0; e = e * 256 + buffer[offset + i], i +=
|
|
10814
|
+
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {
|
|
10815
10815
|
}
|
|
10816
10816
|
m2 = e & (1 << -nBits) - 1;
|
|
10817
10817
|
e >>= -nBits;
|
|
10818
10818
|
nBits += mLen;
|
|
10819
|
-
for (; nBits > 0; m2 = m2 * 256 + buffer[offset + i], i +=
|
|
10819
|
+
for (; nBits > 0; m2 = m2 * 256 + buffer[offset + i], i += d, nBits -= 8) {
|
|
10820
10820
|
}
|
|
10821
10821
|
if (e === 0) {
|
|
10822
10822
|
e = 1 - eBias;
|
|
@@ -10835,7 +10835,7 @@ var require_ieee754 = __commonJS({
|
|
|
10835
10835
|
var eBias = eMax >> 1;
|
|
10836
10836
|
var rt2 = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
|
10837
10837
|
var i = isLE ? 0 : nBytes - 1;
|
|
10838
|
-
var
|
|
10838
|
+
var d = isLE ? 1 : -1;
|
|
10839
10839
|
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
10840
10840
|
value = Math.abs(value);
|
|
10841
10841
|
if (isNaN(value) || value === Infinity) {
|
|
@@ -10867,13 +10867,13 @@ var require_ieee754 = __commonJS({
|
|
|
10867
10867
|
e = 0;
|
|
10868
10868
|
}
|
|
10869
10869
|
}
|
|
10870
|
-
for (; mLen >= 8; buffer[offset + i] = m2 & 255, i +=
|
|
10870
|
+
for (; mLen >= 8; buffer[offset + i] = m2 & 255, i += d, m2 /= 256, mLen -= 8) {
|
|
10871
10871
|
}
|
|
10872
10872
|
e = e << mLen | m2;
|
|
10873
10873
|
eLen += mLen;
|
|
10874
|
-
for (; eLen > 0; buffer[offset + i] = e & 255, i +=
|
|
10874
|
+
for (; eLen > 0; buffer[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
|
|
10875
10875
|
}
|
|
10876
|
-
buffer[offset + i -
|
|
10876
|
+
buffer[offset + i - d] |= s * 128;
|
|
10877
10877
|
};
|
|
10878
10878
|
}
|
|
10879
10879
|
});
|
|
@@ -13579,7 +13579,7 @@ function createLazySimpleStream(loadModule) {
|
|
|
13579
13579
|
};
|
|
13580
13580
|
}
|
|
13581
13581
|
function loadAnthropicProviderModule() {
|
|
13582
|
-
anthropicProviderModulePromise ||= import("./anthropic-
|
|
13582
|
+
anthropicProviderModulePromise ||= import("./anthropic-OFECORE7.js").then((module) => {
|
|
13583
13583
|
const provider = module;
|
|
13584
13584
|
return {
|
|
13585
13585
|
stream: provider.streamAnthropic,
|
|
@@ -13589,7 +13589,7 @@ function loadAnthropicProviderModule() {
|
|
|
13589
13589
|
return anthropicProviderModulePromise;
|
|
13590
13590
|
}
|
|
13591
13591
|
function loadAzureOpenAIResponsesProviderModule() {
|
|
13592
|
-
azureOpenAIResponsesProviderModulePromise ||= import("./azure-openai-responses-
|
|
13592
|
+
azureOpenAIResponsesProviderModulePromise ||= import("./azure-openai-responses-AOVTLR6N.js").then((module) => {
|
|
13593
13593
|
const provider = module;
|
|
13594
13594
|
return {
|
|
13595
13595
|
stream: provider.streamAzureOpenAIResponses,
|
|
@@ -13599,7 +13599,7 @@ function loadAzureOpenAIResponsesProviderModule() {
|
|
|
13599
13599
|
return azureOpenAIResponsesProviderModulePromise;
|
|
13600
13600
|
}
|
|
13601
13601
|
function loadGoogleProviderModule() {
|
|
13602
|
-
googleProviderModulePromise ||= import("./google-
|
|
13602
|
+
googleProviderModulePromise ||= import("./google-RVJL6RIQ.js").then((module) => {
|
|
13603
13603
|
const provider = module;
|
|
13604
13604
|
return {
|
|
13605
13605
|
stream: provider.streamGoogle,
|
|
@@ -13609,7 +13609,7 @@ function loadGoogleProviderModule() {
|
|
|
13609
13609
|
return googleProviderModulePromise;
|
|
13610
13610
|
}
|
|
13611
13611
|
function loadGoogleVertexProviderModule() {
|
|
13612
|
-
googleVertexProviderModulePromise ||= import("./google-vertex-
|
|
13612
|
+
googleVertexProviderModulePromise ||= import("./google-vertex-EZTRRRH6.js").then((module) => {
|
|
13613
13613
|
const provider = module;
|
|
13614
13614
|
return {
|
|
13615
13615
|
stream: provider.streamGoogleVertex,
|
|
@@ -13619,7 +13619,7 @@ function loadGoogleVertexProviderModule() {
|
|
|
13619
13619
|
return googleVertexProviderModulePromise;
|
|
13620
13620
|
}
|
|
13621
13621
|
function loadMistralProviderModule() {
|
|
13622
|
-
mistralProviderModulePromise ||= import("./mistral-
|
|
13622
|
+
mistralProviderModulePromise ||= import("./mistral-FSGKSMA7.js").then((module) => {
|
|
13623
13623
|
const provider = module;
|
|
13624
13624
|
return {
|
|
13625
13625
|
stream: provider.streamMistral,
|
|
@@ -13629,7 +13629,7 @@ function loadMistralProviderModule() {
|
|
|
13629
13629
|
return mistralProviderModulePromise;
|
|
13630
13630
|
}
|
|
13631
13631
|
function loadOpenAICodexResponsesProviderModule() {
|
|
13632
|
-
openAICodexResponsesProviderModulePromise ||= import("./openai-codex-responses-
|
|
13632
|
+
openAICodexResponsesProviderModulePromise ||= import("./openai-codex-responses-VM5Y564D.js").then((module) => {
|
|
13633
13633
|
const provider = module;
|
|
13634
13634
|
return {
|
|
13635
13635
|
stream: provider.streamOpenAICodexResponses,
|
|
@@ -13639,7 +13639,7 @@ function loadOpenAICodexResponsesProviderModule() {
|
|
|
13639
13639
|
return openAICodexResponsesProviderModulePromise;
|
|
13640
13640
|
}
|
|
13641
13641
|
function loadOpenAICompletionsProviderModule() {
|
|
13642
|
-
openAICompletionsProviderModulePromise ||= import("./openai-completions-
|
|
13642
|
+
openAICompletionsProviderModulePromise ||= import("./openai-completions-X46FOQDN.js").then((module) => {
|
|
13643
13643
|
const provider = module;
|
|
13644
13644
|
return {
|
|
13645
13645
|
stream: provider.streamOpenAICompletions,
|
|
@@ -13649,7 +13649,7 @@ function loadOpenAICompletionsProviderModule() {
|
|
|
13649
13649
|
return openAICompletionsProviderModulePromise;
|
|
13650
13650
|
}
|
|
13651
13651
|
function loadOpenAIResponsesProviderModule() {
|
|
13652
|
-
openAIResponsesProviderModulePromise ||= import("./openai-responses-
|
|
13652
|
+
openAIResponsesProviderModulePromise ||= import("./openai-responses-SOQNEPBE.js").then((module) => {
|
|
13653
13653
|
const provider = module;
|
|
13654
13654
|
return {
|
|
13655
13655
|
stream: provider.streamOpenAIResponses,
|
|
@@ -24209,110 +24209,110 @@ var Input = class {
|
|
|
24209
24209
|
};
|
|
24210
24210
|
|
|
24211
24211
|
// ../../node_modules/marked/lib/marked.esm.js
|
|
24212
|
-
function
|
|
24212
|
+
function A() {
|
|
24213
24213
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
24214
24214
|
}
|
|
24215
|
-
var R =
|
|
24215
|
+
var R = A();
|
|
24216
24216
|
function j(l3) {
|
|
24217
24217
|
R = l3;
|
|
24218
24218
|
}
|
|
24219
24219
|
var z = { exec: () => null };
|
|
24220
|
-
function
|
|
24220
|
+
function I(l3) {
|
|
24221
24221
|
let e = [];
|
|
24222
24222
|
return (t) => {
|
|
24223
24223
|
let n = Math.max(0, Math.min(3, t - 1)), s = e[n];
|
|
24224
24224
|
return s || (s = l3(n), e[n] = s), s;
|
|
24225
24225
|
};
|
|
24226
24226
|
}
|
|
24227
|
-
function
|
|
24227
|
+
function k(l3, e = "") {
|
|
24228
24228
|
let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (s, r) => {
|
|
24229
24229
|
let i = typeof r == "string" ? r : r.source;
|
|
24230
24230
|
return i = i.replace(m.caret, "$1"), t = t.replace(s, i), n;
|
|
24231
24231
|
}, getRegex: () => new RegExp(t, e) };
|
|
24232
24232
|
return n;
|
|
24233
24233
|
}
|
|
24234
|
-
var
|
|
24234
|
+
var Oe = ((l3 = "") => {
|
|
24235
24235
|
try {
|
|
24236
24236
|
return !!new RegExp("(?<=1)(?<!1)" + l3);
|
|
24237
24237
|
} catch {
|
|
24238
24238
|
return false;
|
|
24239
24239
|
}
|
|
24240
24240
|
})();
|
|
24241
|
-
var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex:
|
|
24242
|
-
var
|
|
24241
|
+
var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((l3) => new RegExp(`^ {0,${l3}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((l3) => new RegExp(`^ {0,${l3}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}#`)), htmlBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: I((l3) => new RegExp(`^ {0,${l3}}>`)) };
|
|
24242
|
+
var Te = /^(?:[ \t]*(?:\n|$))+/;
|
|
24243
24243
|
var we = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
|
|
24244
24244
|
var ye = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
|
|
24245
24245
|
var q = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
|
|
24246
24246
|
var Pe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
|
|
24247
24247
|
var U = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
|
|
24248
24248
|
var oe = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
|
|
24249
|
-
var ae =
|
|
24250
|
-
var Se =
|
|
24249
|
+
var ae = k(oe).replace(/bull/g, U).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
|
|
24250
|
+
var Se = k(oe).replace(/bull/g, U).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
|
|
24251
24251
|
var K = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;
|
|
24252
24252
|
var _e = /^[^\n]+/;
|
|
24253
24253
|
var W = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
|
|
24254
|
-
var $e =
|
|
24255
|
-
var Le =
|
|
24254
|
+
var $e = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", W).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
|
|
24255
|
+
var Le = k(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, U).getRegex();
|
|
24256
24256
|
var Q = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
|
|
24257
24257
|
var X = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
|
|
24258
|
-
var
|
|
24259
|
-
var le = (l3) =>
|
|
24258
|
+
var Ee = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", X).replace("tag", Q).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
|
|
24259
|
+
var le = (l3) => k(K).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", l3).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex();
|
|
24260
24260
|
var ze = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/);
|
|
24261
|
-
var
|
|
24262
|
-
var
|
|
24263
|
-
var J = { blockquote:
|
|
24264
|
-
var se =
|
|
24265
|
-
var
|
|
24266
|
-
var
|
|
24261
|
+
var Me = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/);
|
|
24262
|
+
var Ae = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Me).getRegex();
|
|
24263
|
+
var J = { blockquote: Ae, code: we, def: $e, fences: ye, heading: Pe, hr: q, html: Ee, lheading: ae, list: Le, newline: Te, paragraph: ze, table: z, text: _e };
|
|
24264
|
+
var se = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex();
|
|
24265
|
+
var Ie = { ...J, lheading: Se, table: se, paragraph: k(K).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex() };
|
|
24266
|
+
var Ce = { ...J, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", X).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: z, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: k(K).replace("hr", q).replace("heading", ` *#{1,6} *[^
|
|
24267
24267
|
]`).replace("lheading", ae).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
|
|
24268
24268
|
var Be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
|
|
24269
24269
|
var De = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
|
|
24270
|
-
var
|
|
24270
|
+
var ue = /^( {2,}|\\)\n(?!\s*$)/;
|
|
24271
24271
|
var qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
|
|
24272
24272
|
var _ = /[\p{P}\p{S}]/u;
|
|
24273
|
-
var
|
|
24273
|
+
var C = /[\s\p{P}\p{S}]/u;
|
|
24274
24274
|
var v = /[^\s\p{P}\p{S}]/u;
|
|
24275
|
-
var ve =
|
|
24275
|
+
var ve = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, C).getRegex();
|
|
24276
24276
|
var He = /[\p{Pi}\p{Ps}"']/u;
|
|
24277
|
-
var
|
|
24277
|
+
var pe = /(?!~)[\p{P}\p{S}]/u;
|
|
24278
24278
|
var Ze = /(?!~)[\s\p{P}\p{S}]/u;
|
|
24279
24279
|
var Ge = /(?:[^\s\p{P}\p{S}]|~)/u;
|
|
24280
|
-
var Qe =
|
|
24280
|
+
var Qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Oe ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
|
|
24281
24281
|
var ce = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
|
|
24282
|
-
var Ne =
|
|
24283
|
-
var je =
|
|
24282
|
+
var Ne = k(ce, "u").replace(/punct/g, _).getRegex();
|
|
24283
|
+
var je = k(ce, "u").replace(/punct/g, pe).getRegex();
|
|
24284
24284
|
var Fe = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/;
|
|
24285
|
-
var Ue =
|
|
24285
|
+
var Ue = k(Fe, "u").replace(/openQuote/g, He).replace(/punct/g, _).getRegex();
|
|
24286
24286
|
var he = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
|
|
24287
|
-
var Ke =
|
|
24288
|
-
var We =
|
|
24287
|
+
var Ke = k(he, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
|
|
24288
|
+
var We = k(he, "gu").replace(/notPunctSpace/g, Ge).replace(/punctSpace/g, Ze).replace(/punct/g, pe).getRegex();
|
|
24289
24289
|
var Xe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)";
|
|
24290
|
-
var Je =
|
|
24291
|
-
var Ve =
|
|
24290
|
+
var Je = k(Xe, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
|
|
24291
|
+
var Ve = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
|
|
24292
24292
|
var Ye = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)";
|
|
24293
|
-
var et =
|
|
24294
|
-
var tt =
|
|
24293
|
+
var et = k(Ye, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
|
|
24294
|
+
var tt = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _).getRegex();
|
|
24295
24295
|
var nt = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
|
|
24296
|
-
var rt =
|
|
24297
|
-
var st =
|
|
24298
|
-
var it =
|
|
24299
|
-
var ot =
|
|
24300
|
-
var at =
|
|
24296
|
+
var rt = k(nt, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, C).replace(/punct/g, _).getRegex();
|
|
24297
|
+
var st = k(/\\(punct)/, "gu").replace(/punct/g, _).getRegex();
|
|
24298
|
+
var it = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
|
|
24299
|
+
var ot = k(X).replace("(?:-->|$)", "-->").getRegex();
|
|
24300
|
+
var at = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ot).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
|
|
24301
24301
|
var G = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
|
|
24302
|
-
var lt =
|
|
24303
|
-
var
|
|
24304
|
-
var
|
|
24305
|
-
var
|
|
24302
|
+
var lt = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", G).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
|
|
24303
|
+
var ke = k(/^!?\[(label)\]\[(ref)\]/).replace("label", G).replace("ref", W).getRegex();
|
|
24304
|
+
var de = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", W).getRegex();
|
|
24305
|
+
var ut = k("reflink|nolink(?!\\()", "g").replace("reflink", ke).replace("nolink", de).getRegex();
|
|
24306
24306
|
var ie = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
|
|
24307
|
-
var V = { _backpedal: z, anyPunctuation: st, autolink: it, blockSkip: Qe, br:
|
|
24308
|
-
var
|
|
24309
|
-
var F = { ...V, emStrongRDelimAst: We, emStrongLDelim: je, delLDelim: tt, delRDelim: rt, url:
|
|
24310
|
-
var ct = { ...F, br:
|
|
24311
|
-
var H = { normal: J, gfm:
|
|
24312
|
-
var B = { normal: V, gfm: F, breaks: ct, pedantic:
|
|
24307
|
+
var V = { _backpedal: z, anyPunctuation: st, autolink: it, blockSkip: Qe, br: ue, code: De, del: z, delLDelim: z, delRDelim: z, emStrongLDelim: Ne, emStrongRDelimAst: Ke, emStrongRDelimUnd: Ve, escape: Be, link: lt, nolink: de, punctuation: ve, reflink: ke, reflinkSearch: ut, tag: at, text: qe, url: z };
|
|
24308
|
+
var pt = { ...V, emStrongLDelim: Ue, emStrongRDelimAst: Je, emStrongRDelimUnd: et, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", G).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", G).getRegex() };
|
|
24309
|
+
var F = { ...V, emStrongRDelimAst: We, emStrongLDelim: je, delLDelim: tt, delRDelim: rt, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ie).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: k(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ie).getRegex() };
|
|
24310
|
+
var ct = { ...F, br: k(ue).replace("{2,}", "*").getRegex(), text: k(F.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
|
|
24311
|
+
var H = { normal: J, gfm: Ie, pedantic: Ce };
|
|
24312
|
+
var B = { normal: V, gfm: F, breaks: ct, pedantic: pt };
|
|
24313
24313
|
var ht = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" };
|
|
24314
24314
|
var ge = (l3) => ht[l3];
|
|
24315
|
-
function
|
|
24315
|
+
function T(l3, e) {
|
|
24316
24316
|
if (e) {
|
|
24317
24317
|
if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ge);
|
|
24318
24318
|
} else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ge);
|
|
@@ -24328,9 +24328,9 @@ function Y(l3) {
|
|
|
24328
24328
|
}
|
|
24329
24329
|
function ee(l3, e) {
|
|
24330
24330
|
let t = l3.replace(m.findPipe, (r, i, o) => {
|
|
24331
|
-
let
|
|
24332
|
-
for (; --a >= 0 && o[a] === "\\"; )
|
|
24333
|
-
return
|
|
24331
|
+
let u = false, a = i;
|
|
24332
|
+
for (; --a >= 0 && o[a] === "\\"; ) u = !u;
|
|
24333
|
+
return u ? "|" : " |";
|
|
24334
24334
|
}), n = t.split(m.splitPipe), s = 0;
|
|
24335
24335
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
|
|
24336
24336
|
else for (; n.length < e; ) n.push("");
|
|
@@ -24373,12 +24373,21 @@ function me(l3, e = 0) {
|
|
|
24373
24373
|
return n;
|
|
24374
24374
|
}
|
|
24375
24375
|
function xe(l3, e, t, n, s) {
|
|
24376
|
-
let r = e.href, i = e.title || null, o = l3[1].replace(s.other.outputLinkReplace, "$1");
|
|
24376
|
+
let r = e.href, i = e.title || null, o = l3[1].replace(s.other.outputLinkReplace, "$1"), u = l3[0].charAt(0) === "!";
|
|
24377
24377
|
n.state.inLink = true;
|
|
24378
|
-
let
|
|
24379
|
-
|
|
24378
|
+
let a = n.state.linkEmitted, p = n.state.inRawBlock;
|
|
24379
|
+
n.state.linkEmitted = false;
|
|
24380
|
+
let c = n.inlineTokens(o), h = n.state.linkEmitted;
|
|
24381
|
+
if (n.state.linkEmitted = a, n.state.inLink = false, !u) {
|
|
24382
|
+
if (h) {
|
|
24383
|
+
n.state.inRawBlock = p;
|
|
24384
|
+
return;
|
|
24385
|
+
}
|
|
24386
|
+
n.state.linkEmitted = true;
|
|
24387
|
+
}
|
|
24388
|
+
return { type: u ? "image" : "link", raw: t, href: r, title: i, text: o, tokens: c };
|
|
24380
24389
|
}
|
|
24381
|
-
function
|
|
24390
|
+
function kt(l3, e, t) {
|
|
24382
24391
|
let n = l3.match(t.other.indentCodeCompensation);
|
|
24383
24392
|
if (n === null) return e;
|
|
24384
24393
|
let s = n[1];
|
|
@@ -24412,7 +24421,7 @@ var y = class {
|
|
|
24412
24421
|
fences(e) {
|
|
24413
24422
|
let t = this.rules.block.fences.exec(e);
|
|
24414
24423
|
if (t) {
|
|
24415
|
-
let n = t[0], s =
|
|
24424
|
+
let n = t[0], s = kt(n, t[3] || "", this.rules);
|
|
24416
24425
|
return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: s };
|
|
24417
24426
|
}
|
|
24418
24427
|
}
|
|
@@ -24440,33 +24449,33 @@ var y = class {
|
|
|
24440
24449
|
`).split(`
|
|
24441
24450
|
`), s = "", r = "", i = [];
|
|
24442
24451
|
for (; n.length > 0; ) {
|
|
24443
|
-
let o = false,
|
|
24444
|
-
for (a = 0; a < n.length; a++) if (this.rules.other.blockquoteStart.test(n[a]))
|
|
24445
|
-
else if (!o)
|
|
24452
|
+
let o = false, u = [], a;
|
|
24453
|
+
for (a = 0; a < n.length; a++) if (this.rules.other.blockquoteStart.test(n[a])) u.push(n[a]), o = true;
|
|
24454
|
+
else if (!o) u.push(n[a]);
|
|
24446
24455
|
else break;
|
|
24447
24456
|
n = n.slice(a);
|
|
24448
|
-
let
|
|
24449
|
-
`), c =
|
|
24457
|
+
let p = u.join(`
|
|
24458
|
+
`), c = p.replace(this.rules.other.blockquoteSetextReplace, `
|
|
24450
24459
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
24451
24460
|
s = s ? `${s}
|
|
24452
|
-
${
|
|
24461
|
+
${p}` : p, r = r ? `${r}
|
|
24453
24462
|
${c}` : c;
|
|
24454
24463
|
let h = this.lexer.state.top;
|
|
24455
24464
|
if (this.lexer.state.top = true, this.lexer.blockTokens(c, i, true), this.lexer.state.top = h, n.length === 0) break;
|
|
24456
|
-
let
|
|
24457
|
-
if (
|
|
24458
|
-
if (
|
|
24459
|
-
let
|
|
24460
|
-
`), w =
|
|
24461
|
-
` + g.replace(this.rules.other.blockquoteSetextReplace2, ""),
|
|
24462
|
-
i[i.length - 1] =
|
|
24463
|
-
${g}`, r = r.substring(0, r.length -
|
|
24465
|
+
let d = i.at(-1);
|
|
24466
|
+
if (d?.type === "code") break;
|
|
24467
|
+
if (d?.type === "blockquote") {
|
|
24468
|
+
let O = d, g = n.join(`
|
|
24469
|
+
`), w = O.raw + `
|
|
24470
|
+
` + g.replace(this.rules.other.blockquoteSetextReplace2, ""), E = this.blockquote(w);
|
|
24471
|
+
i[i.length - 1] = E, s = `${s}
|
|
24472
|
+
${g}`, r = r.substring(0, r.length - O.text.length) + E.text;
|
|
24464
24473
|
break;
|
|
24465
|
-
} else if (
|
|
24466
|
-
let
|
|
24474
|
+
} else if (d?.type === "list") {
|
|
24475
|
+
let O = d, g = O.raw + `
|
|
24467
24476
|
` + n.join(`
|
|
24468
24477
|
`), w = this.list(g);
|
|
24469
|
-
i[i.length - 1] = w, s = s.substring(0, s.length -
|
|
24478
|
+
i[i.length - 1] = w, s = s.substring(0, s.length - d.raw.length) + w.raw, r = r.substring(0, r.length - O.raw.length) + w.raw, n = g.substring(i.at(-1).raw.length).split(`
|
|
24470
24479
|
`);
|
|
24471
24480
|
continue;
|
|
24472
24481
|
}
|
|
@@ -24481,44 +24490,44 @@ ${g}`, r = r.substring(0, r.length - T.text.length) + M.text;
|
|
|
24481
24490
|
n = s ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = s ? n : "[*+-]");
|
|
24482
24491
|
let i = this.rules.other.listItemRegex(n), o = false;
|
|
24483
24492
|
for (; e; ) {
|
|
24484
|
-
let a = false,
|
|
24493
|
+
let a = false, p = "", c = "";
|
|
24485
24494
|
if (!(t = i.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
24486
|
-
|
|
24495
|
+
p = t[0], e = e.substring(p.length);
|
|
24487
24496
|
let h = me(t[2].split(`
|
|
24488
|
-
`, 1)[0], t[1].length),
|
|
24489
|
-
`, 1)[0],
|
|
24490
|
-
if (this.options.pedantic ? (g = 2, c = h.trimStart()) :
|
|
24491
|
-
`, e = e.substring(
|
|
24492
|
-
let w = this.rules.other.nextBulletRegex(g),
|
|
24497
|
+
`, 1)[0], t[1].length), d = e.split(`
|
|
24498
|
+
`, 1)[0], O = !h.trim(), g = 0;
|
|
24499
|
+
if (this.options.pedantic ? (g = 2, c = h.trimStart()) : O ? g = t[1].length + 1 : (g = h.search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, c = h.slice(g), g += t[1].length), O && this.rules.other.blankLine.test(d) && (p += d + `
|
|
24500
|
+
`, e = e.substring(d.length + 1), a = true), !a) {
|
|
24501
|
+
let w = this.rules.other.nextBulletRegex(g), E = this.rules.other.hrRegex(g), ne = this.rules.other.fencesBeginRegex(g), re = this.rules.other.headingBeginRegex(g), be = this.rules.other.htmlBeginRegex(g), Re = this.rules.other.blockquoteBeginRegex(g);
|
|
24493
24502
|
for (; e; ) {
|
|
24494
24503
|
let N = e.split(`
|
|
24495
24504
|
`, 1)[0], D;
|
|
24496
|
-
if (
|
|
24497
|
-
if (D.search(this.rules.other.nonSpaceChar) >= g || !
|
|
24505
|
+
if (d = N, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), D = d) : D = d.replace(this.rules.other.tabCharGlobal, " "), ne.test(d) || re.test(d) || be.test(d) || Re.test(d) || w.test(d) || E.test(d)) break;
|
|
24506
|
+
if (D.search(this.rules.other.nonSpaceChar) >= g || !d.trim()) c += `
|
|
24498
24507
|
` + D.slice(g);
|
|
24499
24508
|
else {
|
|
24500
|
-
if (
|
|
24509
|
+
if (O || h.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ne.test(h) || re.test(h) || E.test(h)) break;
|
|
24501
24510
|
c += `
|
|
24502
|
-
` +
|
|
24511
|
+
` + d;
|
|
24503
24512
|
}
|
|
24504
|
-
|
|
24513
|
+
O = !d.trim(), p += N + `
|
|
24505
24514
|
`, e = e.substring(N.length + 1), h = D.slice(g);
|
|
24506
24515
|
}
|
|
24507
24516
|
}
|
|
24508
|
-
r.loose || (o ? r.loose = true : this.rules.other.doubleBlankLine.test(
|
|
24517
|
+
r.loose || (o ? r.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true)), r.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: false, text: c, tokens: [] }), r.raw += p;
|
|
24509
24518
|
}
|
|
24510
|
-
let
|
|
24511
|
-
if (
|
|
24519
|
+
let u = r.items.at(-1);
|
|
24520
|
+
if (u) u.raw = u.raw.trimEnd(), u.text = u.text.trimEnd();
|
|
24512
24521
|
else return;
|
|
24513
24522
|
r.raw = r.raw.trimEnd();
|
|
24514
24523
|
for (let a of r.items) if (this.lexer.state.top = false, a.tokens = this.lexer.blockTokens(a.text, []), !r.loose) {
|
|
24515
|
-
let
|
|
24524
|
+
let p = a.tokens.filter((h) => h.type === "space"), c = p.length > 0 && p.some((h) => this.rules.other.anyLine.test(h.raw));
|
|
24516
24525
|
r.loose = c;
|
|
24517
24526
|
}
|
|
24518
24527
|
for (let a of r.items) {
|
|
24519
|
-
let
|
|
24520
|
-
if (a.task && (
|
|
24521
|
-
a.text = a.text.replace(this.rules.other.listReplaceTask, ""),
|
|
24528
|
+
let p = a.tokens[0];
|
|
24529
|
+
if (a.task && (p?.type === "text" || p?.type === "paragraph")) {
|
|
24530
|
+
a.text = a.text.replace(this.rules.other.listReplaceTask, ""), p.raw = p.raw.replace(this.rules.other.listReplaceTask, ""), p.text = p.text.replace(this.rules.other.listReplaceTask, "");
|
|
24522
24531
|
for (let h = this.lexer.inlineQueue.length - 1; h >= 0; h--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)) {
|
|
24523
24532
|
this.lexer.inlineQueue[h].src = this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask, "");
|
|
24524
24533
|
break;
|
|
@@ -24532,7 +24541,7 @@ ${g}`, r = r.substring(0, r.length - T.text.length) + M.text;
|
|
|
24532
24541
|
}
|
|
24533
24542
|
if (r.loose) for (let a of r.items) {
|
|
24534
24543
|
a.loose = true;
|
|
24535
|
-
for (let
|
|
24544
|
+
for (let p of a.tokens) p.type === "text" && (p.type = "paragraph");
|
|
24536
24545
|
}
|
|
24537
24546
|
return r;
|
|
24538
24547
|
}
|
|
@@ -24561,7 +24570,7 @@ ${g}`, r = r.substring(0, r.length - T.text.length) + M.text;
|
|
|
24561
24570
|
if (n.length === s.length) {
|
|
24562
24571
|
for (let o of s) this.rules.other.tableAlignRight.test(o) ? i.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? i.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? i.align.push("left") : i.align.push(null);
|
|
24563
24572
|
for (let o = 0; o < n.length; o++) i.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: true, align: i.align[o] });
|
|
24564
|
-
for (let o of r) i.rows.push(ee(o, i.header.length).map((
|
|
24573
|
+
for (let o of r) i.rows.push(ee(o, i.header.length).map((u, a) => ({ text: u, tokens: this.lexer.inline(u), header: false, align: i.align[a] })));
|
|
24565
24574
|
return i;
|
|
24566
24575
|
}
|
|
24567
24576
|
}
|
|
@@ -24605,8 +24614,8 @@ ${g}`, r = r.substring(0, r.length - T.text.length) + M.text;
|
|
|
24605
24614
|
let i = fe(t[2], "()");
|
|
24606
24615
|
if (i === -2) return;
|
|
24607
24616
|
if (i > -1) {
|
|
24608
|
-
let
|
|
24609
|
-
t[2] = t[2].substring(0, i), t[0] = t[0].substring(0,
|
|
24617
|
+
let u = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + i;
|
|
24618
|
+
t[2] = t[2].substring(0, i), t[0] = t[0].substring(0, u).trim(), t[3] = "";
|
|
24610
24619
|
}
|
|
24611
24620
|
}
|
|
24612
24621
|
let s = t[2], r = "";
|
|
@@ -24632,25 +24641,25 @@ ${g}`, r = r.substring(0, r.length - T.text.length) + M.text;
|
|
|
24632
24641
|
let s = this.rules.inline.emStrongLDelim.exec(e);
|
|
24633
24642
|
if (!s || !s[1] && !s[2] && !s[3] && !s[4] || s[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
24634
24643
|
if (!(s[1] || s[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
24635
|
-
let i = [...s[0]].length - 1, o,
|
|
24636
|
-
for (
|
|
24644
|
+
let i = [...s[0]].length - 1, o, u, a = i, p = 0, c = s[0][0], h = n === c, d = c === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
24645
|
+
for (d.lastIndex = 0, t = t.slice(-1 * e.length + i); (s = d.exec(t)) !== null; ) {
|
|
24637
24646
|
if (o = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !o) continue;
|
|
24638
|
-
if (
|
|
24639
|
-
a +=
|
|
24647
|
+
if (u = [...o].length, s[3] || s[4]) {
|
|
24648
|
+
a += u;
|
|
24640
24649
|
continue;
|
|
24641
24650
|
} else if (s[5] || s[6]) {
|
|
24642
|
-
if (i % 3 && !((i +
|
|
24643
|
-
|
|
24651
|
+
if (i % 3 && !((i + u) % 3)) {
|
|
24652
|
+
p += u;
|
|
24644
24653
|
continue;
|
|
24645
24654
|
}
|
|
24646
24655
|
if (h) break;
|
|
24647
24656
|
}
|
|
24648
|
-
if (a -=
|
|
24649
|
-
|
|
24650
|
-
let
|
|
24651
|
-
if (Math.min(i,
|
|
24652
|
-
let
|
|
24653
|
-
return { type: "em", raw: g, text:
|
|
24657
|
+
if (a -= u, a > 0) continue;
|
|
24658
|
+
u = Math.min(u, u + a + p);
|
|
24659
|
+
let O = [...s[0]][0].length, g = e.slice(0, i + s.index + O + u);
|
|
24660
|
+
if (Math.min(i, u) % 2) {
|
|
24661
|
+
let E = g.slice(1, -1);
|
|
24662
|
+
return { type: "em", raw: g, text: E, tokens: this.lexer.inlineTokens(E) };
|
|
24654
24663
|
}
|
|
24655
24664
|
let w = g.slice(2, -2);
|
|
24656
24665
|
return { type: "strong", raw: g, text: w, tokens: this.lexer.inlineTokens(w) };
|
|
@@ -24672,17 +24681,17 @@ ${g}`, r = r.substring(0, r.length - T.text.length) + M.text;
|
|
|
24672
24681
|
let s = this.rules.inline.delLDelim.exec(e);
|
|
24673
24682
|
if (!s) return;
|
|
24674
24683
|
if (!(s[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
24675
|
-
let i = [...s[0]].length - 1, o,
|
|
24676
|
-
for (
|
|
24677
|
-
if (o = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !o || (
|
|
24684
|
+
let i = [...s[0]].length - 1, o, u, a = i, p = this.rules.inline.delRDelim;
|
|
24685
|
+
for (p.lastIndex = 0, t = t.slice(-1 * e.length + i); (s = p.exec(t)) !== null; ) {
|
|
24686
|
+
if (o = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !o || (u = [...o].length, u !== i)) continue;
|
|
24678
24687
|
if (s[3] || s[4]) {
|
|
24679
|
-
a +=
|
|
24688
|
+
a += u;
|
|
24680
24689
|
continue;
|
|
24681
24690
|
}
|
|
24682
|
-
if (a -=
|
|
24683
|
-
|
|
24684
|
-
let c = [...s[0]][0].length, h = e.slice(0, i + s.index + c +
|
|
24685
|
-
return { type: "del", raw: h, text:
|
|
24691
|
+
if (a -= u, a > 0) continue;
|
|
24692
|
+
u = Math.min(u, u + a);
|
|
24693
|
+
let c = [...s[0]][0].length, h = e.slice(0, i + s.index + c + u), d = h.slice(i, -i);
|
|
24694
|
+
return { type: "del", raw: h, text: d, tokens: this.lexer.inlineTokens(d) };
|
|
24686
24695
|
}
|
|
24687
24696
|
}
|
|
24688
24697
|
}
|
|
@@ -24723,7 +24732,7 @@ var x = class l {
|
|
|
24723
24732
|
inlineQueue;
|
|
24724
24733
|
tokenizer;
|
|
24725
24734
|
constructor(e) {
|
|
24726
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || R, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
|
|
24735
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || R, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, linkEmitted: false, top: true };
|
|
24727
24736
|
let t = { other: m, block: H.normal, inline: B.normal };
|
|
24728
24737
|
this.options.pedantic ? (t.block = H.pedantic, t.inline = B.pedantic) : this.options.gfm && (t.block = H.gfm, this.options.breaks ? t.inline = B.breaks : t.inline = B.gfm), this.tokenizer.rules = t;
|
|
24729
24738
|
}
|
|
@@ -24815,9 +24824,9 @@ var x = class l {
|
|
|
24815
24824
|
}
|
|
24816
24825
|
let i = e;
|
|
24817
24826
|
if (this.options.extensions?.startBlock) {
|
|
24818
|
-
let o = 1 / 0,
|
|
24819
|
-
this.options.extensions.startBlock.forEach((
|
|
24820
|
-
a =
|
|
24827
|
+
let o = 1 / 0, u = e.slice(1), a;
|
|
24828
|
+
this.options.extensions.startBlock.forEach((p) => {
|
|
24829
|
+
a = p.call({ lexer: this }, u), typeof a == "number" && a >= 0 && (o = Math.min(o, a));
|
|
24821
24830
|
}), o < 1 / 0 && o >= 0 && (i = e.substring(0, o + 1));
|
|
24822
24831
|
}
|
|
24823
24832
|
if (this.state.top && (r = this.tokenizer.paragraph(i))) {
|
|
@@ -24847,16 +24856,34 @@ var x = class l {
|
|
|
24847
24856
|
inline(e, t = []) {
|
|
24848
24857
|
return this.inlineQueue.push({ src: e, tokens: t }), t;
|
|
24849
24858
|
}
|
|
24859
|
+
linkInText(e) {
|
|
24860
|
+
if (!e.includes("[")) return false;
|
|
24861
|
+
let t = this.tokenizer.rules.inline.link;
|
|
24862
|
+
for (let n of e.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t.test(n[0]) && e.charAt(n.index - 1) !== "!") return true;
|
|
24863
|
+
for (let n of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
|
|
24864
|
+
let s = n[0], r = s.lastIndexOf("[");
|
|
24865
|
+
if (!(s.charAt(0) === "!" || !Object.hasOwn(this.tokens.links, s.slice(r + 1, -1))) && !(r > 1 && this.linkInText(s.slice(1, r - 1)))) return true;
|
|
24866
|
+
}
|
|
24867
|
+
return false;
|
|
24868
|
+
}
|
|
24850
24869
|
inlineTokens(e, t = []) {
|
|
24851
24870
|
this.tokenizer.lexer = this;
|
|
24852
24871
|
let n = e;
|
|
24853
|
-
if (this.tokens.links) {
|
|
24854
|
-
let o =
|
|
24855
|
-
|
|
24872
|
+
if (this.tokens.links && e.includes("[")) {
|
|
24873
|
+
let o = this.tokenizer.rules.inline.reflinkSearch, u = (a) => {
|
|
24874
|
+
let p = a.lastIndexOf("[");
|
|
24875
|
+
if (!Object.hasOwn(this.tokens.links, a.slice(p + 1, -1))) return a;
|
|
24876
|
+
if (p > 1 && a.charAt(0) !== "!") {
|
|
24877
|
+
let c = a.slice(1, p - 1);
|
|
24878
|
+
if (this.linkInText(c)) return "[" + c.replace(o, u) + "][" + "a".repeat(a.length - p - 2) + "]";
|
|
24879
|
+
}
|
|
24880
|
+
return "[" + "a".repeat(a.length - 2) + "]";
|
|
24881
|
+
};
|
|
24882
|
+
n = n.replace(o, u);
|
|
24856
24883
|
}
|
|
24857
|
-
n = n.replace(this.tokenizer.rules.inline.anyPunctuation, (o) => "+".repeat(o.length)), n = n.replace(this.tokenizer.rules.inline.blockSkip, (o,
|
|
24858
|
-
let
|
|
24859
|
-
return o.slice(0,
|
|
24884
|
+
n = n.replace(this.tokenizer.rules.inline.anyPunctuation, (o) => "+".repeat(o.length)), n = n.replace(this.tokenizer.rules.inline.blockSkip, (o, u, a) => {
|
|
24885
|
+
let p = a ? a.length : 0;
|
|
24886
|
+
return o.slice(0, p) + "[" + "a".repeat(o.length - p - 2) + "]";
|
|
24860
24887
|
}), n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
24861
24888
|
let s = false, r = "", i = 1 / 0;
|
|
24862
24889
|
for (; e; ) {
|
|
@@ -24910,14 +24937,14 @@ var x = class l {
|
|
|
24910
24937
|
e = e.substring(o.raw.length), t.push(o);
|
|
24911
24938
|
continue;
|
|
24912
24939
|
}
|
|
24913
|
-
let
|
|
24940
|
+
let u = e;
|
|
24914
24941
|
if (this.options.extensions?.startInline) {
|
|
24915
|
-
let a = 1 / 0,
|
|
24942
|
+
let a = 1 / 0, p = e.slice(1), c;
|
|
24916
24943
|
this.options.extensions.startInline.forEach((h) => {
|
|
24917
|
-
c = h.call({ lexer: this },
|
|
24918
|
-
}), a < 1 / 0 && a >= 0 && (
|
|
24944
|
+
c = h.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (a = Math.min(a, c));
|
|
24945
|
+
}), a < 1 / 0 && a >= 0 && (u = e.substring(0, a + 1));
|
|
24919
24946
|
}
|
|
24920
|
-
if (o = this.tokenizer.inlineText(
|
|
24947
|
+
if (o = this.tokenizer.inlineText(u)) {
|
|
24921
24948
|
e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (r = o.raw.slice(-1)), s = true;
|
|
24922
24949
|
let a = t.at(-1);
|
|
24923
24950
|
a?.type === "text" ? (a.raw += o.raw, a.text += o.text) : t.push(o);
|
|
@@ -24948,8 +24975,8 @@ var P = class {
|
|
|
24948
24975
|
code({ text: e, lang: t, escaped: n }) {
|
|
24949
24976
|
let s = (t || "").match(m.notSpaceStart)?.[0], r = e.replace(m.endingNewline, "") + `
|
|
24950
24977
|
`;
|
|
24951
|
-
return s ? '<pre><code class="language-' +
|
|
24952
|
-
` : "<pre><code>" + (n ? r :
|
|
24978
|
+
return s ? '<pre><code class="language-' + T(s) + '">' + (n ? r : T(r, true)) + `</code></pre>
|
|
24979
|
+
` : "<pre><code>" + (n ? r : T(r, true)) + `</code></pre>
|
|
24953
24980
|
`;
|
|
24954
24981
|
}
|
|
24955
24982
|
blockquote({ tokens: e }) {
|
|
@@ -24974,8 +25001,8 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
24974
25001
|
list(e) {
|
|
24975
25002
|
let t = e.ordered, n = e.start, s = "";
|
|
24976
25003
|
for (let o = 0; o < e.items.length; o++) {
|
|
24977
|
-
let
|
|
24978
|
-
s += this.listitem(
|
|
25004
|
+
let u = e.items[o];
|
|
25005
|
+
s += this.listitem(u);
|
|
24979
25006
|
}
|
|
24980
25007
|
let r = t ? "ol" : "ul", i = t && n !== 1 ? ' start="' + n + '"' : "";
|
|
24981
25008
|
return "<" + r + i + `>
|
|
@@ -25027,7 +25054,7 @@ ${e}</tr>
|
|
|
25027
25054
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
25028
25055
|
}
|
|
25029
25056
|
codespan({ text: e }) {
|
|
25030
|
-
return `<code>${
|
|
25057
|
+
return `<code>${T(e, true)}</code>`;
|
|
25031
25058
|
}
|
|
25032
25059
|
br(e) {
|
|
25033
25060
|
return "<br>";
|
|
@@ -25040,18 +25067,18 @@ ${e}</tr>
|
|
|
25040
25067
|
if (r === null) return s;
|
|
25041
25068
|
e = r;
|
|
25042
25069
|
let i = '<a href="' + e + '"';
|
|
25043
|
-
return t && (i += ' title="' +
|
|
25070
|
+
return t && (i += ' title="' + T(t) + '"'), i += ">" + s + "</a>", i;
|
|
25044
25071
|
}
|
|
25045
25072
|
image({ href: e, title: t, text: n, tokens: s }) {
|
|
25046
25073
|
s && (n = this.parser.parseInline(s, this.parser.textRenderer));
|
|
25047
25074
|
let r = Y(e);
|
|
25048
|
-
if (r === null) return
|
|
25075
|
+
if (r === null) return T(n);
|
|
25049
25076
|
e = r;
|
|
25050
|
-
let i = `<img src="${e}" alt="${
|
|
25051
|
-
return t && (i += ` title="${
|
|
25077
|
+
let i = `<img src="${e}" alt="${T(n)}"`;
|
|
25078
|
+
return t && (i += ` title="${T(t)}"`), i += ">", i;
|
|
25052
25079
|
}
|
|
25053
25080
|
text(e) {
|
|
25054
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
25081
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : T(e.text);
|
|
25055
25082
|
}
|
|
25056
25083
|
};
|
|
25057
25084
|
var L = class {
|
|
@@ -25266,7 +25293,7 @@ var S = class {
|
|
|
25266
25293
|
}
|
|
25267
25294
|
};
|
|
25268
25295
|
var Z = class {
|
|
25269
|
-
defaults =
|
|
25296
|
+
defaults = A();
|
|
25270
25297
|
options = this.setOptions;
|
|
25271
25298
|
parse = this.parseMarkdown(true);
|
|
25272
25299
|
parseInline = this.parseMarkdown(false);
|
|
@@ -25312,8 +25339,8 @@ var Z = class {
|
|
|
25312
25339
|
if ("renderer" in r) {
|
|
25313
25340
|
let i = t.renderers[r.name];
|
|
25314
25341
|
i ? t.renderers[r.name] = function(...o) {
|
|
25315
|
-
let
|
|
25316
|
-
return
|
|
25342
|
+
let u = r.renderer.apply(this, o);
|
|
25343
|
+
return u === false && (u = i.apply(this, o)), u;
|
|
25317
25344
|
} : t.renderers[r.name] = r.renderer;
|
|
25318
25345
|
}
|
|
25319
25346
|
if ("tokenizer" in r) {
|
|
@@ -25327,10 +25354,10 @@ var Z = class {
|
|
|
25327
25354
|
for (let i in n.renderer) {
|
|
25328
25355
|
if (!(i in r)) throw new Error(`renderer '${i}' does not exist`);
|
|
25329
25356
|
if (["options", "parser"].includes(i)) continue;
|
|
25330
|
-
let o = i,
|
|
25331
|
-
r[o] = (...
|
|
25332
|
-
let c =
|
|
25333
|
-
return c === false && (c = a.apply(r,
|
|
25357
|
+
let o = i, u = n.renderer[o], a = r[o];
|
|
25358
|
+
r[o] = (...p) => {
|
|
25359
|
+
let c = u.apply(r, p);
|
|
25360
|
+
return c === false && (c = a.apply(r, p)), c || "";
|
|
25334
25361
|
};
|
|
25335
25362
|
}
|
|
25336
25363
|
s.renderer = r;
|
|
@@ -25340,10 +25367,10 @@ var Z = class {
|
|
|
25340
25367
|
for (let i in n.tokenizer) {
|
|
25341
25368
|
if (!(i in r)) throw new Error(`tokenizer '${i}' does not exist`);
|
|
25342
25369
|
if (["options", "rules", "lexer"].includes(i)) continue;
|
|
25343
|
-
let o = i,
|
|
25344
|
-
r[o] = (...
|
|
25345
|
-
let c =
|
|
25346
|
-
return c === false && (c = a.apply(r,
|
|
25370
|
+
let o = i, u = n.tokenizer[o], a = r[o];
|
|
25371
|
+
r[o] = (...p) => {
|
|
25372
|
+
let c = u.apply(r, p);
|
|
25373
|
+
return c === false && (c = a.apply(r, p)), c;
|
|
25347
25374
|
};
|
|
25348
25375
|
}
|
|
25349
25376
|
s.tokenizer = r;
|
|
@@ -25353,21 +25380,21 @@ var Z = class {
|
|
|
25353
25380
|
for (let i in n.hooks) {
|
|
25354
25381
|
if (!(i in r)) throw new Error(`hook '${i}' does not exist`);
|
|
25355
25382
|
if (["options", "block"].includes(i)) continue;
|
|
25356
|
-
let o = i,
|
|
25357
|
-
S.passThroughHooks.has(i) ? r[o] = (
|
|
25383
|
+
let o = i, u = n.hooks[o], a = r[o];
|
|
25384
|
+
S.passThroughHooks.has(i) ? r[o] = (p) => {
|
|
25358
25385
|
if (this.defaults.async && S.passThroughHooksRespectAsync.has(i)) return (async () => {
|
|
25359
|
-
let h = await
|
|
25386
|
+
let h = await u.call(r, p);
|
|
25360
25387
|
return a.call(r, h);
|
|
25361
25388
|
})();
|
|
25362
|
-
let c =
|
|
25389
|
+
let c = u.call(r, p);
|
|
25363
25390
|
return a.call(r, c);
|
|
25364
|
-
} : r[o] = (...
|
|
25391
|
+
} : r[o] = (...p) => {
|
|
25365
25392
|
if (this.defaults.async) return (async () => {
|
|
25366
|
-
let h = await
|
|
25367
|
-
return h === false && (h = await a.apply(r,
|
|
25393
|
+
let h = await u.apply(r, p);
|
|
25394
|
+
return h === false && (h = await a.apply(r, p)), h;
|
|
25368
25395
|
})();
|
|
25369
|
-
let c =
|
|
25370
|
-
return c === false && (c = a.apply(r,
|
|
25396
|
+
let c = u.apply(r, p);
|
|
25397
|
+
return c === false && (c = a.apply(r, p)), c;
|
|
25371
25398
|
};
|
|
25372
25399
|
}
|
|
25373
25400
|
s.hooks = r;
|
|
@@ -25375,8 +25402,8 @@ var Z = class {
|
|
|
25375
25402
|
if (n.walkTokens) {
|
|
25376
25403
|
let r = this.defaults.walkTokens, i = n.walkTokens;
|
|
25377
25404
|
s.walkTokens = function(o) {
|
|
25378
|
-
let
|
|
25379
|
-
return
|
|
25405
|
+
let u = [];
|
|
25406
|
+
return u.push(i.call(this, o)), r && (u = u.concat(r.call(this, o))), u;
|
|
25380
25407
|
};
|
|
25381
25408
|
}
|
|
25382
25409
|
this.defaults = { ...this.defaults, ...s };
|
|
@@ -25398,10 +25425,10 @@ var Z = class {
|
|
|
25398
25425
|
if (typeof n > "u" || n === null) return o(new Error("marked(): input parameter is undefined or null"));
|
|
25399
25426
|
if (typeof n != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
25400
25427
|
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
25401
|
-
let
|
|
25428
|
+
let u = i.hooks ? await i.hooks.preprocess(n) : n, p = await (i.hooks ? await i.hooks.provideLexer(e) : e ? x.lex : x.lexInline)(u, i), c = i.hooks ? await i.hooks.processAllTokens(p) : p;
|
|
25402
25429
|
i.walkTokens && await Promise.all(this.walkTokens(c, i.walkTokens));
|
|
25403
|
-
let
|
|
25404
|
-
return i.hooks ? await i.hooks.postprocess(
|
|
25430
|
+
let d = await (i.hooks ? await i.hooks.provideParser(e) : e ? b.parse : b.parseInline)(c, i);
|
|
25431
|
+
return i.hooks ? await i.hooks.postprocess(d) : d;
|
|
25405
25432
|
})().catch(o);
|
|
25406
25433
|
try {
|
|
25407
25434
|
i.hooks && (n = i.hooks.preprocess(n));
|
|
@@ -25409,8 +25436,8 @@ var Z = class {
|
|
|
25409
25436
|
i.hooks && (a = i.hooks.processAllTokens(a)), i.walkTokens && this.walkTokens(a, i.walkTokens);
|
|
25410
25437
|
let c = (i.hooks ? i.hooks.provideParser(e) : e ? b.parse : b.parseInline)(a, i);
|
|
25411
25438
|
return i.hooks && (c = i.hooks.postprocess(c)), c;
|
|
25412
|
-
} catch (
|
|
25413
|
-
return o(
|
|
25439
|
+
} catch (u) {
|
|
25440
|
+
return o(u);
|
|
25414
25441
|
}
|
|
25415
25442
|
};
|
|
25416
25443
|
}
|
|
@@ -25418,7 +25445,7 @@ var Z = class {
|
|
|
25418
25445
|
return (n) => {
|
|
25419
25446
|
if (n.message += `
|
|
25420
25447
|
Please report this to https://github.com/markedjs/marked.`, e) {
|
|
25421
|
-
let s = "<p>An error occurred:</p><pre>" +
|
|
25448
|
+
let s = "<p>An error occurred:</p><pre>" + T(n.message + "", true) + "</pre>";
|
|
25422
25449
|
return t ? Promise.resolve(s) : s;
|
|
25423
25450
|
}
|
|
25424
25451
|
if (t) return Promise.reject(n);
|
|
@@ -25426,23 +25453,23 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
25426
25453
|
};
|
|
25427
25454
|
}
|
|
25428
25455
|
};
|
|
25429
|
-
var
|
|
25456
|
+
var M = new Z();
|
|
25430
25457
|
function f(l3, e) {
|
|
25431
|
-
return
|
|
25458
|
+
return M.parse(l3, e);
|
|
25432
25459
|
}
|
|
25433
25460
|
f.options = f.setOptions = function(l3) {
|
|
25434
|
-
return
|
|
25461
|
+
return M.setOptions(l3), f.defaults = M.defaults, j(f.defaults), f;
|
|
25435
25462
|
};
|
|
25436
|
-
f.getDefaults =
|
|
25463
|
+
f.getDefaults = A;
|
|
25437
25464
|
f.defaults = R;
|
|
25438
|
-
function
|
|
25439
|
-
return
|
|
25465
|
+
function dt(...l3) {
|
|
25466
|
+
return M.use(...l3), f.defaults = M.defaults, j(f.defaults), f;
|
|
25440
25467
|
}
|
|
25441
|
-
f.use =
|
|
25468
|
+
f.use = dt;
|
|
25442
25469
|
f.walkTokens = function(l3, e) {
|
|
25443
|
-
return
|
|
25470
|
+
return M.walkTokens(l3, e);
|
|
25444
25471
|
};
|
|
25445
|
-
f.parseInline =
|
|
25472
|
+
f.parseInline = M.parseInline;
|
|
25446
25473
|
f.Parser = b;
|
|
25447
25474
|
f.parser = b.parse;
|
|
25448
25475
|
f.Renderer = P;
|
|
@@ -25457,7 +25484,7 @@ var rn = f.setOptions;
|
|
|
25457
25484
|
var sn = f.walkTokens;
|
|
25458
25485
|
var on = f.parseInline;
|
|
25459
25486
|
var ln = b.parse;
|
|
25460
|
-
var
|
|
25487
|
+
var un = x.lex;
|
|
25461
25488
|
|
|
25462
25489
|
// ../tui/src/latex.ts
|
|
25463
25490
|
var SYMBOLS = {
|
|
@@ -27889,7 +27916,7 @@ var ThemeJsonSchema = typebox_exports.Object({
|
|
|
27889
27916
|
var validateThemeJson;
|
|
27890
27917
|
var themeValidatorPromise;
|
|
27891
27918
|
function preloadThemeValidator() {
|
|
27892
|
-
themeValidatorPromise ??= import("./compile-
|
|
27919
|
+
themeValidatorPromise ??= import("./compile-BYYUFOG3.js").then(({ Compile: Compile2 }) => {
|
|
27893
27920
|
validateThemeJson = Compile2(ThemeJsonSchema);
|
|
27894
27921
|
});
|
|
27895
27922
|
return themeValidatorPromise;
|
|
@@ -35440,7 +35467,7 @@ function serializeConversation(messages) {
|
|
|
35440
35467
|
thinkingParts.push(block.thinking);
|
|
35441
35468
|
} else if (block.type === "toolCall") {
|
|
35442
35469
|
const args = block.arguments;
|
|
35443
|
-
const argsStr = Object.entries(args).map(([
|
|
35470
|
+
const argsStr = Object.entries(args).map(([k2, v2]) => `${k2}=${JSON.stringify(v2)}`).join(", ");
|
|
35444
35471
|
toolCalls.push(`${block.name}(${argsStr})`);
|
|
35445
35472
|
}
|
|
35446
35473
|
}
|
|
@@ -38608,7 +38635,7 @@ async function loadExtensionModule(extensionPath) {
|
|
|
38608
38635
|
// (file-path aliases would load a second, divergent copy of each package).
|
|
38609
38636
|
// Also disable tryNative so jiti handles ALL imports (not just the entry point)
|
|
38610
38637
|
// In Node.js/dev: use aliases to resolve to node_modules paths
|
|
38611
|
-
...isBunBinary || isBundledCli ? { virtualModules: (await import("./bundled-modules-
|
|
38638
|
+
...isBunBinary || isBundledCli ? { virtualModules: (await import("./bundled-modules-JQCJDEIY.js")).VIRTUAL_MODULES, tryNative: false } : { alias: getAliases() }
|
|
38612
38639
|
});
|
|
38613
38640
|
const module = await jiti.import(extensionPath, { default: true });
|
|
38614
38641
|
const factory = module;
|
|
@@ -43976,31 +44003,31 @@ function overlapCount(a, b2) {
|
|
|
43976
44003
|
endB = a.length;
|
|
43977
44004
|
}
|
|
43978
44005
|
const map = Array(endB);
|
|
43979
|
-
let
|
|
44006
|
+
let k2 = 0;
|
|
43980
44007
|
map[0] = 0;
|
|
43981
44008
|
for (let j2 = 1; j2 < endB; j2++) {
|
|
43982
|
-
if (b2[j2] == b2[
|
|
43983
|
-
map[j2] = map[
|
|
44009
|
+
if (b2[j2] == b2[k2]) {
|
|
44010
|
+
map[j2] = map[k2];
|
|
43984
44011
|
} else {
|
|
43985
|
-
map[j2] =
|
|
44012
|
+
map[j2] = k2;
|
|
43986
44013
|
}
|
|
43987
|
-
while (
|
|
43988
|
-
|
|
44014
|
+
while (k2 > 0 && b2[j2] != b2[k2]) {
|
|
44015
|
+
k2 = map[k2];
|
|
43989
44016
|
}
|
|
43990
|
-
if (b2[j2] == b2[
|
|
43991
|
-
|
|
44017
|
+
if (b2[j2] == b2[k2]) {
|
|
44018
|
+
k2++;
|
|
43992
44019
|
}
|
|
43993
44020
|
}
|
|
43994
|
-
|
|
44021
|
+
k2 = 0;
|
|
43995
44022
|
for (let i = startA; i < a.length; i++) {
|
|
43996
|
-
while (
|
|
43997
|
-
|
|
44023
|
+
while (k2 > 0 && a[i] != b2[k2]) {
|
|
44024
|
+
k2 = map[k2];
|
|
43998
44025
|
}
|
|
43999
|
-
if (a[i] == b2[
|
|
44000
|
-
|
|
44026
|
+
if (a[i] == b2[k2]) {
|
|
44027
|
+
k2++;
|
|
44001
44028
|
}
|
|
44002
44029
|
}
|
|
44003
|
-
return
|
|
44030
|
+
return k2;
|
|
44004
44031
|
}
|
|
44005
44032
|
function segment(string, segmenter3) {
|
|
44006
44033
|
const parts = [];
|
|
@@ -46002,8 +46029,8 @@ function decodeASCII(bytes) {
|
|
|
46002
46029
|
for (let i = 0; i < bytes.length; i += CHUNK) {
|
|
46003
46030
|
const end = Math.min(bytes.length, i + CHUNK);
|
|
46004
46031
|
const codes = new Array(end - i);
|
|
46005
|
-
for (let j2 = i,
|
|
46006
|
-
codes[
|
|
46032
|
+
for (let j2 = i, k2 = 0; j2 < end; j2++, k2++) {
|
|
46033
|
+
codes[k2] = bytes[j2] & 127;
|
|
46007
46034
|
}
|
|
46008
46035
|
parts.push(String.fromCharCode.apply(null, codes));
|
|
46009
46036
|
}
|
|
@@ -46014,8 +46041,8 @@ function decodeLatin1(bytes) {
|
|
|
46014
46041
|
for (let i = 0; i < bytes.length; i += CHUNK) {
|
|
46015
46042
|
const end = Math.min(bytes.length, i + CHUNK);
|
|
46016
46043
|
const codes = new Array(end - i);
|
|
46017
|
-
for (let j2 = i,
|
|
46018
|
-
codes[
|
|
46044
|
+
for (let j2 = i, k2 = 0; j2 < end; j2++, k2++) {
|
|
46045
|
+
codes[k2] = bytes[j2];
|
|
46019
46046
|
}
|
|
46020
46047
|
parts.push(String.fromCharCode.apply(null, codes));
|
|
46021
46048
|
}
|
|
@@ -49299,9 +49326,9 @@ function createDeferred2() {
|
|
|
49299
49326
|
var liveKernels = /* @__PURE__ */ new Set();
|
|
49300
49327
|
var signalHandlersInstalled = false;
|
|
49301
49328
|
registerSessionResourceCleanup((sessionId) => {
|
|
49302
|
-
for (const
|
|
49303
|
-
if (!sessionId ||
|
|
49304
|
-
void
|
|
49329
|
+
for (const k2 of liveKernels) {
|
|
49330
|
+
if (!sessionId || k2.ownerSessionId === sessionId) {
|
|
49331
|
+
void k2.dispose();
|
|
49305
49332
|
}
|
|
49306
49333
|
}
|
|
49307
49334
|
});
|
|
@@ -49310,7 +49337,7 @@ function installSignalHandlersOnce() {
|
|
|
49310
49337
|
return;
|
|
49311
49338
|
signalHandlersInstalled = true;
|
|
49312
49339
|
const asyncShutdown = async () => {
|
|
49313
|
-
await Promise.allSettled([...liveKernels].map((
|
|
49340
|
+
await Promise.allSettled([...liveKernels].map((k2) => k2.shutdown({ snapshot: true })));
|
|
49314
49341
|
};
|
|
49315
49342
|
process.on("beforeExit", () => {
|
|
49316
49343
|
void asyncShutdown();
|
|
@@ -49322,8 +49349,8 @@ function installSignalHandlersOnce() {
|
|
|
49322
49349
|
void asyncShutdown().finally(() => process.exit(143));
|
|
49323
49350
|
});
|
|
49324
49351
|
process.on("exit", () => {
|
|
49325
|
-
for (const
|
|
49326
|
-
|
|
49352
|
+
for (const k2 of liveKernels)
|
|
49353
|
+
k2.disposeSync();
|
|
49327
49354
|
});
|
|
49328
49355
|
}
|
|
49329
49356
|
|
|
@@ -60007,7 +60034,7 @@ import { resolve as resolve16 } from "node:path";
|
|
|
60007
60034
|
var ASM_AGENT_BUILD_ID_ENV = "ASM_AGENT_BUILD_ID";
|
|
60008
60035
|
var ASM_AGENT_LAUNCHER_PATH_ENV = "ASM_AGENT_LAUNCHER_PATH";
|
|
60009
60036
|
function bundledBuildId() {
|
|
60010
|
-
return false ? void 0 : "v0.8.
|
|
60037
|
+
return false ? void 0 : "v0.8.8-dirty";
|
|
60011
60038
|
}
|
|
60012
60039
|
function getDaemonRuntimeIdentity(environment = process.env) {
|
|
60013
60040
|
const entrypoint = process.argv[1];
|