Files
Baradb/clients/nim-allographer/docs/v2/dochack.js
T
dimgigov 6bfc5b3a3c
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled
feat(clients): add nim-allographer client with BaraDB driver support
- Pure Nim wire protocol client (async + sync, no C FFI)
- Query Builder: fluent API, SQL generator, execution, transactions
- Schema Builder: create/alter/drop tables, column operations
- Connection pool with aging and timeout handling
- ORM integration via compile-time DB_BARADB switch
- Tests: test_open, test_query
- Documentation: README.md, PLAN_BARADB.md
2026-05-21 15:49:11 +03:00

1729 lines
54 KiB
JavaScript

/* Generated by the Nim Compiler v2.2.8 */
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
var NTI33554466 = {size: 0,kind: 1,base: null,node: null,finalizer: null};
var NTI738197518 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
var NTI33554435 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
var NTI973078610 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
var NTI973078617 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
var NTI134217751 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI134217741 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI134217743 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI134217745 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555179 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555187 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
var NTI33554450 = {size: 0,kind: 29,base: null,node: null,finalizer: null};
var NTI33555186 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
var NTI33555183 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555184 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI134217749 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33554449 = {size: 0,kind: 28,base: null,node: null,finalizer: null};
var NNI134217749 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI134217749.node = NNI134217749;
var NNI33555184 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555184.node = NNI33555184;
NTI33555186.base = NTI33555183;
NTI33555187.base = NTI33555183;
var NNI33555183 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI33555186, name: "parent", sons: null},
{kind: 1, offset: "name", len: 0, typ: NTI33554450, name: "name", sons: null},
{kind: 1, offset: "message", len: 0, typ: NTI33554449, name: "msg", sons: null},
{kind: 1, offset: "trace", len: 0, typ: NTI33554449, name: "trace", sons: null},
{kind: 1, offset: "up", len: 0, typ: NTI33555187, name: "up", sons: null}]};
NTI33555183.node = NNI33555183;
var NNI33555179 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555179.node = NNI33555179;
NTI33555183.base = NTI33555179;
NTI33555184.base = NTI33555183;
NTI134217749.base = NTI33555184;
var NNI134217745 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI134217745.node = NNI134217745;
NTI134217745.base = NTI33555184;
var NNI134217743 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI134217743.node = NNI134217743;
var NNI134217741 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI134217741.node = NNI134217741;
NTI134217741.base = NTI33555184;
NTI134217743.base = NTI134217741;
var NNI134217751 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI134217751.node = NNI134217751;
NTI134217751.base = NTI33555184;
var NNI973078617 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI973078610, name: "a", sons: null},
{kind: 1, offset: "b", len: 0, typ: NTI33554435, name: "b", sons: null}]};
NTI973078617.node = NNI973078617;
var NNI738197518 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554435, name: "Field0", sons: null},
{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]};
NTI738197518.node = NNI738197518;
function setConstr() {
var result = {};
for (var i = 0; i < arguments.length; ++i) {
var x = arguments[i];
if (typeof(x) == "object") {
for (var j = x[0]; j <= x[1]; ++j) {
result[j] = true;
}
} else {
result[x] = true;
}
}
return result;
}
var ConstSet1 = setConstr(17, 16, 4, 18, 27, 19, 23, 22, 21);
function nimCopy(dest_p0, src_p1, ti_p2) {
var result_33557360 = null;
switch (ti_p2.kind) {
case 21:
case 22:
case 23:
case 5:
if (!(isFatPointer__system_u2908(ti_p2))) {
result_33557360 = src_p1;
}
else {
result_33557360 = [src_p1[0], src_p1[1]];
}
break;
case 19:
if (dest_p0 === null || dest_p0 === undefined) {
dest_p0 = {};
}
else {
for (var key in dest_p0) { delete dest_p0[key]; }
}
for (var key in src_p1) { dest_p0[key] = src_p1[key]; }
result_33557360 = dest_p0;
break;
case 18:
case 17:
if (!((ti_p2.base == null))) {
result_33557360 = nimCopy(dest_p0, src_p1, ti_p2.base);
}
else {
if ((ti_p2.kind == 17)) {
result_33557360 = (dest_p0 === null || dest_p0 === undefined) ? {m_type: ti_p2} : dest_p0;
}
else {
result_33557360 = (dest_p0 === null || dest_p0 === undefined) ? {} : dest_p0;
}
}
nimCopyAux(result_33557360, src_p1, ti_p2.node);
break;
case 4:
case 16:
if(ArrayBuffer.isView(src_p1)) {
if(dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) {
dest_p0 = new src_p1.constructor(src_p1);
} else {
dest_p0.set(src_p1, 0);
}
result_33557360 = dest_p0;
} else {
if (src_p1 === null) {
result_33557360 = null;
}
else {
if (dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) {
dest_p0 = new Array(src_p1.length);
}
result_33557360 = dest_p0;
for (var i = 0; i < src_p1.length; ++i) {
result_33557360[i] = nimCopy(result_33557360[i], src_p1[i], ti_p2.base);
}
}
}
break;
case 24:
case 27:
if (src_p1 === null) {
result_33557360 = null;
}
else {
if (dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) {
dest_p0 = new Array(src_p1.length);
}
result_33557360 = dest_p0;
for (var i = 0; i < src_p1.length; ++i) {
result_33557360[i] = nimCopy(result_33557360[i], src_p1[i], ti_p2.base);
}
}
break;
case 28:
if (src_p1 !== null) {
result_33557360 = src_p1.slice(0);
}
break;
default:
result_33557360 = src_p1;
break;
}
return result_33557360;
}
function mnewString(len_p0) {
var result = new Array(len_p0);
for (var i = 0; i < len_p0; i++) {result[i] = 0;}
return result;
}
function nimAddStrStr(x_p0, y_p1) {
var L = y_p1.length;
for (var i = 0; i < L; ++i) {
x_p0.push(y_p1[i]);
}
}
function isObj(obj_p0, subclass_p1) {
var result_33557473 = false;
BeforeRet: {
var x_33557474 = obj_p0;
if ((x_33557474 == subclass_p1)) {
result_33557473 = true;
break BeforeRet;
}
Label1: {
Label2: while (true) {
if (!!((x_33557474 == subclass_p1))) break Label2;
if ((x_33557474 == null)) {
result_33557473 = false;
break BeforeRet;
}
x_33557474 = x_33557474.base;
}
};
result_33557473 = true;
break BeforeRet;
};
return result_33557473;
}
function toJSStr(s_p0) {
var result_33556949 = null;
var res_33557003 = newSeq__system_u2546((s_p0).length);
var i_33557004 = 0;
var j_33557005 = 0;
Label1: {
Label2: while (true) {
if (!(i_33557004 < (s_p0).length)) break Label2;
var c_33557006 = s_p0[i_33557004];
if ((c_33557006 < 128)) {
res_33557003[j_33557005] = String.fromCharCode(c_33557006);
i_33557004 += 1;
}
else {
var helper_33557032 = newSeq__system_u2546(0);
Label3: {
Label4: while (true) {
if (!true) break Label4;
var code_33557033 = c_33557006.toString(16);
if ((((code_33557033) == null ? 0 : (code_33557033).length) == 1)) {
helper_33557032.push("%0");;
}
else {
helper_33557032.push("%");;
}
helper_33557032.push(code_33557033);;
i_33557004 += 1;
if ((((s_p0).length <= i_33557004) || (s_p0[i_33557004] < 128))) {
break Label3;
}
c_33557006 = s_p0[i_33557004];
}
};
++excHandler;
try {
res_33557003[j_33557005] = decodeURIComponent(helper_33557032.join(""));
--excHandler;
} catch (EXCEPTION) {
var prevJSError = lastJSError;
lastJSError = EXCEPTION;
--excHandler;
raiseDefect();
res_33557003[j_33557005] = helper_33557032.join("");
lastJSError = prevJSError;
} finally {
}
}
j_33557005 += 1;
}
};
if (res_33557003.length < j_33557005) { for (var i = res_33557003.length ; i < j_33557005 ; ++i) res_33557003.push(null); }
else { res_33557003.length = j_33557005; };
result_33556949 = res_33557003.join("");
return result_33556949;
}
function raiseException(e_p0, ename_p1) {
e_p0.name = ename_p1;
if ((excHandler == 0)) {
unhandledException(e_p0);
}
throw e_p0;
}
function chckIndx(i_p0, a_p1, b_p2) {
var result_33557395 = 0;
BeforeRet: {
if (((a_p1 <= i_p0) && (i_p0 <= b_p2))) {
result_33557395 = i_p0;
break BeforeRet;
}
else {
raiseIndexError(i_p0, a_p1, b_p2);
}
};
return result_33557395;
}
function makeNimstrLit(c_p0) {
var result = [];
for (var i = 0; i < c_p0.length; ++i) {
result[i] = c_p0.charCodeAt(i);
}
return result;
}
function addInt(a_p0, b_p1) {
var result = a_p0 + b_p1;
checkOverflowInt(result);
return result;
}
function subInt(a_p0, b_p1) {
var result = a_p0 - b_p1;
checkOverflowInt(result);
return result;
}
function chckRange(i_p0, a_p1, b_p2) {
var result_33557400 = 0;
BeforeRet: {
if (((a_p1 <= i_p0) && (i_p0 <= b_p2))) {
result_33557400 = i_p0;
break BeforeRet;
}
else {
raiseRangeError();
}
};
return result_33557400;
}
function cstrToNimstr(c_p0) {
var ln = c_p0.length;
var result = new Array(ln);
var r = 0;
for (var i = 0; i < ln; ++i) {
var ch = c_p0.charCodeAt(i);
if (ch < 128) {
result[r] = ch;
}
else {
if (ch < 2048) {
result[r] = (ch >> 6) | 192;
}
else {
if (ch < 55296 || ch >= 57344) {
result[r] = (ch >> 12) | 224;
}
else {
++i;
ch = 65536 + (((ch & 1023) << 10) | (c_p0.charCodeAt(i) & 1023));
result[r] = (ch >> 18) | 240;
++r;
result[r] = ((ch >> 12) & 63) | 128;
}
++r;
result[r] = ((ch >> 6) & 63) | 128;
}
++r;
result[r] = (ch & 63) | 128;
}
++r;
}
return result;
}
var ConstSet2 = setConstr([65, 90]);
var ConstSet3 = setConstr(95, 32, 46);
var ConstSet4 = setConstr(95, 32, 46);
function mulInt(a_p0, b_p1) {
var result = a_p0 * b_p1;
checkOverflowInt(result);
return result;
}
var ConstSet5 = setConstr([97, 122]);
var ConstSet6 = setConstr([65, 90], [97, 122]);
var ConstSet7 = setConstr([97, 122]);
var ConstSet8 = setConstr([65, 90]);
var ConstSet9 = setConstr([65, 90], [97, 122]);
function nimMax(a_p0, b_p1) {
var Temporary1;
var result_33557187 = 0;
BeforeRet: {
if ((b_p1 <= a_p0)) {
Temporary1 = a_p0;
}
else {
Temporary1 = b_p1;
}
result_33557187 = Temporary1;
break BeforeRet;
};
return result_33557187;
}
function nimMin(a_p0, b_p1) {
var Temporary1;
var result_33557183 = 0;
BeforeRet: {
if ((a_p0 <= b_p1)) {
Temporary1 = a_p0;
}
else {
Temporary1 = b_p1;
}
result_33557183 = Temporary1;
break BeforeRet;
};
return result_33557183;
}
function addChar(x_p0, c_p1) {
x_p0.push(c_p1);
}
var objectID_1191182514 = [0];
function setTheme(theme_p0) {
document.documentElement.setAttribute("data-theme", theme_p0);
window.localStorage.setItem("theme", theme_p0);
}
function isFatPointer__system_u2908(ti_p0) {
var result_33557342 = false;
BeforeRet: {
result_33557342 = !((ConstSet1[ti_p0.base.kind] != undefined));
break BeforeRet;
};
return result_33557342;
}
function nimCopyAux(dest_p0, src_p1, n_p2) {
switch (n_p2.kind) {
case 0:
break;
case 1:
dest_p0[n_p2.offset] = nimCopy(dest_p0[n_p2.offset], src_p1[n_p2.offset], n_p2.typ);
break;
case 2:
for (var i = 0; i < n_p2.sons.length; i++) {
nimCopyAux(dest_p0, src_p1, n_p2.sons[i]);
}
break;
case 3:
dest_p0[n_p2.offset] = nimCopy(dest_p0[n_p2.offset], src_p1[n_p2.offset], n_p2.typ);
for (var i = 0; i < n_p2.sons.length; ++i) {
nimCopyAux(dest_p0, src_p1, n_p2.sons[i][1]);
}
break;
}
}
function addChars__stdZprivateZdigitsutils_u202(result_p0, result_p0_Idx, x_p1, start_p2, n_p3) {
var Temporary1;
var old_335544528 = (result_p0[result_p0_Idx]).length;
if (result_p0[result_p0_Idx].length < (Temporary1 = (old_335544528 + n_p3), Temporary1)) { for (var i = result_p0[result_p0_Idx].length; i < Temporary1; ++i) result_p0[result_p0_Idx].push(0); }
else {result_p0[result_p0_Idx].length = Temporary1; };
Label2: {
var iHEX60gensym4_335544542 = 0;
var i_587203799 = 0;
Label3: {
Label4: while (true) {
if (!(i_587203799 < n_p3)) break Label4;
iHEX60gensym4_335544542 = i_587203799;
result_p0[result_p0_Idx][(old_335544528 + iHEX60gensym4_335544542)] = x_p1.charCodeAt((start_p2 + iHEX60gensym4_335544542));
i_587203799 += 1;
}
};
};
}
function addChars__stdZprivateZdigitsutils_u198(result_p0, result_p0_Idx, x_p1) {
addChars__stdZprivateZdigitsutils_u202(result_p0, result_p0_Idx, x_p1, 0, ((x_p1) == null ? 0 : (x_p1).length));
}
function addInt__stdZprivateZdigitsutils_u223(result_p0, result_p0_Idx, x_p1) {
addChars__stdZprivateZdigitsutils_u198(result_p0, result_p0_Idx, ((x_p1) + ""));
}
function addInt__stdZprivateZdigitsutils_u241(result_p0, result_p0_Idx, x_p1) {
addInt__stdZprivateZdigitsutils_u223(result_p0, result_p0_Idx, BigInt(x_p1));
}
function HEX24__systemZdollars_u14(xHEX60gensym0_p0) {
var result_402653200 = [[]];
result_402653200[0] = nimCopy(null, [], NTI33554449);
addInt__stdZprivateZdigitsutils_u241(result_402653200, 0, xHEX60gensym0_p0);
return result_402653200[0];
}
function add__system_u1972(x_p0, x_p0_Idx, y_p1) {
if (x_p0[x_p0_Idx] === null) { x_p0[x_p0_Idx] = []; }
var off = x_p0[x_p0_Idx].length;
x_p0[x_p0_Idx].length += y_p1.length;
for (var i = 0; i < y_p1.length; ++i) {
x_p0[x_p0_Idx][off+i] = y_p1.charCodeAt(i);
}
}
function newSeq__system_u2546(len_p0) {
var result_33556982 = [];
result_33556982 = new Array(len_p0); for (var i = 0 ; i < len_p0 ; ++i) { result_33556982[i] = null; }
return result_33556982;
}
function isNimException__system_u2043() {
return lastJSError && lastJSError.m_type;
}
function getCurrentException() {
var result_33556478 = null;
if (isNimException__system_u2043()) {
result_33556478 = lastJSError;
}
return result_33556478;
}
function raiseDefect() {
if (isNimException__system_u2043()) {
var e_33556694 = getCurrentException();
if (isObj(e_33556694.m_type, NTI33555184)) {
if ((excHandler == 0)) {
unhandledException(e_33556694);
}
throw e_33556694;
}
}
}
function unhandledException(e_p0) {
var buf_33556688 = [[]];
if (!(((e_p0.message).length == 0))) {
nimAddStrStr(buf_33556688[0], [69,114,114,111,114,58,32,117,110,104,97,110,100,108,101,100,32,101,120,99,101,112,116,105,111,110,58,32]);;
nimAddStrStr(buf_33556688[0], e_p0.message);;
}
else {
nimAddStrStr(buf_33556688[0], [69,114,114,111,114,58,32,117,110,104,97,110,100,108,101,100,32,101,120,99,101,112,116,105,111,110]);;
}
nimAddStrStr(buf_33556688[0], [32,91]);;
add__system_u1972(buf_33556688, 0, e_p0.name);
nimAddStrStr(buf_33556688[0], [93,10]);;
var cbuf_33556689 = toJSStr(buf_33556688[0]);
if (typeof(Error) !== "undefined") {
throw new Error(cbuf_33556689);
}
else {
throw cbuf_33556689;
}
}
function raiseIndexError(i_p0, a_p1, b_p2) {
var Temporary1;
if ((b_p2 < a_p1)) {
Temporary1 = [105,110,100,101,120,32,111,117,116,32,111,102,32,98,111,117,110,100,115,44,32,116,104,101,32,99,111,110,116,97,105,110,101,114,32,105,115,32,101,109,112,116,121];
}
else {
Temporary1 = ([105,110,100,101,120,32]).concat(HEX24__systemZdollars_u14(i_p0),[32,110,111,116,32,105,110,32],HEX24__systemZdollars_u14(a_p1),[32,46,46,32],HEX24__systemZdollars_u14(b_p2));
}
raiseException({message: nimCopy(null, Temporary1, NTI33554449), parent: null, m_type: NTI134217749, name: null, trace: [], up: null}, "IndexDefect");
}
function sysFatal__stdZassertions_u46(message_p1) {
raiseException({message: nimCopy(null, message_p1, NTI33554449), m_type: NTI134217745, parent: null, name: null, trace: [], up: null}, "AssertionDefect");
}
function raiseAssert__stdZassertions_u44(msg_p0) {
sysFatal__stdZassertions_u46(msg_p0);
}
function failedAssertImpl__stdZassertions_u86(msg_p0) {
raiseAssert__stdZassertions_u44(msg_p0);
}
function onDOMLoaded(e_p0) {
var Temporary4;
function HEX3Aanonymous__dochack_u65(event_p0) {
event_p0.target.parentNode.style.display = "none";
event_p0.target.parentNode.nextSibling.style.display = "inline";
}
document.getElementById("theme-select").value = window.localStorage.getItem("theme");
Label1: {
var pragmaDots_587202624 = null;
var colontmp__587203790 = [];
colontmp__587203790 = document.getElementsByClassName("pragmadots");
var i_587203792 = 0;
var L_587203793 = (colontmp__587203790).length;
Label2: {
Label3: while (true) {
if (!(i_587203792 < L_587203793)) break Label3;
pragmaDots_587202624 = colontmp__587203790[chckIndx(i_587203792, 0, (colontmp__587203790).length - 1)];
Temporary4 = HEX3Aanonymous__dochack_u65.bind(null); Temporary4.ClP_0 = HEX3Aanonymous__dochack_u65; Temporary4.ClE_0 = null;
pragmaDots_587202624.onclick = Temporary4;
i_587203792 += 1;
if (!(((colontmp__587203790).length == L_587203793))) {
failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
}
function raiseOverflow() {
raiseException({message: [111,118,101,114,45,32,111,114,32,117,110,100,101,114,102,108,111,119], parent: null, m_type: NTI134217743, name: null, trace: [], up: null}, "OverflowDefect");
}
function checkOverflowInt(a_p0) {
if (a_p0 > 2147483647 || a_p0 < -2147483648) raiseOverflow();
}
function isWhitespace__dochack_u408(x_p0) {
var result_587202970 = false;
result_587202970 = (((x_p0.nodeName == "#text") && !/\S/.test(x_p0.textContent)) || (x_p0.nodeName == "#comment"));
return result_587202970;
}
function toToc__dochack_u411(x_p0, father_p1) {
var Temporary5;
var Temporary6;
var Temporary7;
var Temporary8;
var Temporary15;
if ((x_p0.nodeName == "UL")) {
var f_587202981 = {heading: null, kids: [], sortId: (father_p1.kids).length, doSort: false};
var i_587202982 = 0;
Label1: {
Label2: while (true) {
if (!(i_587202982 < x_p0.childNodes.length)) break Label2;
var nxt_587202983 = addInt(i_587202982, 1);
Label3: {
Label4: while (true) {
if (!(nxt_587202983 < x_p0.childNodes.length)) Temporary5 = false; else { Temporary5 = isWhitespace__dochack_u408(x_p0.childNodes[nxt_587202983]); } if (!Temporary5) break Label4;
nxt_587202983 = addInt(nxt_587202983, 1);
}
};
if (!(nxt_587202983 < x_p0.childNodes.length)) Temporary8 = false; else { Temporary8 = (x_p0.childNodes[i_587202982].nodeName == "LI"); } if (!Temporary8) Temporary7 = false; else { Temporary7 = (x_p0.childNodes[i_587202982].childNodes.length == 1); } if (!Temporary7) Temporary6 = false; else { Temporary6 = (x_p0.childNodes[nxt_587202983].nodeName == "UL"); } if (Temporary6) {
var e_587202996 = {heading: x_p0.childNodes[i_587202982].childNodes[0], kids: [], sortId: (f_587202981.kids).length, doSort: false};
var it_587202997 = x_p0.childNodes[nxt_587202983];
Label9: {
var j_587203002 = 0;
var colontmp__587203807 = 0;
colontmp__587203807 = it_587202997.childNodes.length;
var i_587203808 = 0;
Label10: {
Label11: while (true) {
if (!(i_587203808 < colontmp__587203807)) break Label11;
j_587203002 = i_587203808;
toToc__dochack_u411(it_587202997.childNodes[j_587203002], e_587202996);
i_587203808 = addInt(i_587203808, 1);
}
};
};
f_587202981.kids.push(e_587202996);;
i_587202982 = addInt(nxt_587202983, 1);
}
else {
toToc__dochack_u411(x_p0.childNodes[i_587202982], f_587202981);
i_587202982 = addInt(i_587202982, 1);
}
}
};
father_p1.kids.push(f_587202981);;
}
else {
if (isWhitespace__dochack_u408(x_p0)) {
}
else {
if ((x_p0.nodeName == "LI")) {
var idx_587203020 = [];
Label12: {
var i_587203025 = 0;
var colontmp__587203811 = 0;
colontmp__587203811 = x_p0.childNodes.length;
var i_587203812 = 0;
Label13: {
Label14: while (true) {
if (!(i_587203812 < colontmp__587203811)) break Label14;
i_587203025 = i_587203812;
if (!(isWhitespace__dochack_u408(x_p0.childNodes[i_587203025]))) {
idx_587203020.push(i_587203025);;
}
i_587203812 = addInt(i_587203812, 1);
}
};
};
if (!((idx_587203020).length == 2)) Temporary15 = false; else { Temporary15 = (x_p0.childNodes[idx_587203020[chckIndx(1, 0, (idx_587203020).length - 1)]].nodeName == "UL"); } if (Temporary15) {
var e_587203041 = {heading: x_p0.childNodes[idx_587203020[chckIndx(0, 0, (idx_587203020).length - 1)]], kids: [], sortId: (father_p1.kids).length, doSort: false};
var it_587203042 = x_p0.childNodes[idx_587203020[chckIndx(1, 0, (idx_587203020).length - 1)]];
Label16: {
var j_587203047 = 0;
var colontmp__587203815 = 0;
colontmp__587203815 = it_587203042.childNodes.length;
var i_587203816 = 0;
Label17: {
Label18: while (true) {
if (!(i_587203816 < colontmp__587203815)) break Label18;
j_587203047 = i_587203816;
toToc__dochack_u411(it_587203042.childNodes[j_587203047], e_587203041);
i_587203816 = addInt(i_587203816, 1);
}
};
};
father_p1.kids.push(e_587203041);;
}
else {
Label19: {
var i_587203056 = 0;
var colontmp__587203819 = 0;
colontmp__587203819 = x_p0.childNodes.length;
var i_587203820 = 0;
Label20: {
Label21: while (true) {
if (!(i_587203820 < colontmp__587203819)) break Label21;
i_587203056 = i_587203820;
toToc__dochack_u411(x_p0.childNodes[i_587203056], father_p1);
i_587203820 = addInt(i_587203820, 1);
}
};
};
}
}
else {
father_p1.kids.push({heading: x_p0, kids: [], sortId: (father_p1.kids).length, doSort: false});;
}
}}
}
function extractItems__dochack_u199(x_p0, heading_p1, items_p2, items_p2_Idx) {
BeforeRet: {
if ((x_p0 == null)) {
break BeforeRet;
}
if ((!((x_p0.heading == null)) && (x_p0.heading.textContent == heading_p1))) {
Label1: {
var i_587202779 = 0;
var colontmp__587203823 = 0;
colontmp__587203823 = (x_p0.kids).length;
var i_587203824 = 0;
Label2: {
Label3: while (true) {
if (!(i_587203824 < colontmp__587203823)) break Label3;
i_587202779 = i_587203824;
items_p2[items_p2_Idx].push(x_p0.kids[chckIndx(i_587202779, 0, (x_p0.kids).length - 1)].heading);;
i_587203824 = addInt(i_587203824, 1);
}
};
};
}
else {
Label4: {
var k_587202805 = null;
var i_587203828 = 0;
var L_587203829 = (x_p0.kids).length;
Label5: {
Label6: while (true) {
if (!(i_587203828 < L_587203829)) break Label6;
k_587202805 = x_p0.kids[chckIndx(i_587203828, 0, (x_p0.kids).length - 1)];
extractItems__dochack_u199(k_587202805, heading_p1, items_p2, items_p2_Idx);
i_587203828 += 1;
if (!(((x_p0.kids).length == L_587203829))) {
failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
}
};
}
function tree__dochack_u130(tag_p0, kids_p1) {
var result_587202693 = null;
result_587202693 = document.createElement(tag_p0);
Label1: {
var k_587202707 = null;
var i_587203841 = 0;
Label2: {
Label3: while (true) {
if (!(i_587203841 < (kids_p1).length)) break Label3;
k_587202707 = kids_p1[chckIndx(i_587203841, 0, (kids_p1).length - 1)];
result_587202693.appendChild(k_587202707);
i_587203841 += 1;
}
};
};
return result_587202693;
}
function text__dochack_u155(s_p0) {
var result_587202717 = null;
result_587202717 = document.createTextNode(s_p0);
return result_587202717;
}
function uncovered__dochack_u600(x_p0) {
var Temporary1;
var result_587203162 = null;
BeforeRet: {
if ((((x_p0.kids).length == 0) && !((x_p0.heading == null)))) {
if (!(x_p0.heading.hasOwnProperty('__karaxMarker__'))) {
Temporary1 = x_p0;
}
else {
Temporary1 = null;
}
result_587203162 = Temporary1;
break BeforeRet;
}
result_587203162 = {heading: x_p0.heading, kids: [], sortId: x_p0.sortId, doSort: x_p0.doSort};
Label2: {
var k_587203177 = null;
var i_587203848 = 0;
var L_587203849 = (x_p0.kids).length;
Label3: {
Label4: while (true) {
if (!(i_587203848 < L_587203849)) break Label4;
k_587203177 = x_p0.kids[chckIndx(i_587203848, 0, (x_p0.kids).length - 1)];
var y_587203178 = uncovered__dochack_u600(k_587203177);
if (!((y_587203178 == null))) {
result_587203162.kids.push(y_587203178);;
}
i_587203848 += 1;
if (!(((x_p0.kids).length == L_587203849))) {
failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
if (((result_587203162.kids).length == 0)) {
result_587203162 = null;
}
};
return result_587203162;
}
function mergeTocs__dochack_u630(orig_p0, news_p1) {
var result_587203193 = null;
result_587203193 = uncovered__dochack_u600(orig_p0);
if ((result_587203193 == null)) {
result_587203193 = news_p1;
}
else {
Label1: {
var i_587203205 = 0;
var colontmp__587203844 = 0;
colontmp__587203844 = (news_p1.kids).length;
var i_587203845 = 0;
Label2: {
Label3: while (true) {
if (!(i_587203845 < colontmp__587203844)) break Label3;
i_587203205 = i_587203845;
result_587203193.kids.push(news_p1.kids[chckIndx(i_587203205, 0, (news_p1.kids).length - 1)]);;
i_587203845 = addInt(i_587203845, 1);
}
};
};
}
return result_587203193;
}
function buildToc__dochack_u650(orig_p0, types_p1, procs_p2) {
var result_587203214 = null;
var newStuff_587203219 = {heading: null, kids: [], doSort: true, sortId: 0};
Label1: {
var t_587203223 = null;
var i_587203836 = 0;
var L_587203837 = (types_p1).length;
Label2: {
Label3: while (true) {
if (!(i_587203836 < L_587203837)) break Label3;
t_587203223 = types_p1[chckIndx(i_587203836, 0, (types_p1).length - 1)];
var c_587203228 = {heading: t_587203223.cloneNode(true), kids: [], doSort: true, sortId: 0};
t_587203223.__karaxMarker__ = true;
Label4: {
var p_587203232 = null;
var i_587203833 = 0;
var L_587203834 = (procs_p2).length;
Label5: {
Label6: while (true) {
if (!(i_587203833 < L_587203834)) break Label6;
p_587203232 = procs_p2[chckIndx(i_587203833, 0, (procs_p2).length - 1)];
if (!(p_587203232.hasOwnProperty('__karaxMarker__'))) {
var xx_587203233 = p_587203232.parentNode.getElementsByClassName("attachedType");
if ((((xx_587203233).length == 1) && (xx_587203233[chckIndx(0, 0, (xx_587203233).length - 1)].textContent == t_587203223.textContent))) {
var q_587203238 = tree__dochack_u130("A", [text__dochack_u155(p_587203232.title)]);
q_587203238.setAttribute("href", p_587203232.getAttribute("href"));
c_587203228.kids.push({heading: q_587203238, kids: [], sortId: 0, doSort: false});;
p_587203232.__karaxMarker__ = true;
}
}
i_587203833 += 1;
if (!(((procs_p2).length == L_587203834))) {
failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
newStuff_587203219.kids.push(c_587203228);;
i_587203836 += 1;
if (!(((types_p1).length == L_587203837))) {
failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
result_587203214 = mergeTocs__dochack_u630(orig_p0, newStuff_587203219);
return result_587203214;
}
function add__dochack_u148(parent_p0, kid_p1) {
if (((parent_p0.nodeName == "TR") && ((kid_p1.nodeName == "TD") || (kid_p1.nodeName == "TH")))) {
var k_587202711 = document.createElement("TD");
k_587202711.appendChild(kid_p1);
parent_p0.appendChild(k_587202711);
}
else {
parent_p0.appendChild(kid_p1);
}
}
function setClass__dochack_u152(e_p0, value_p1) {
e_p0.setAttribute("class", value_p1);
}
function toHtml__dochack_u278(x_p0, isRoot_p1) {
var Temporary1;
function HEX3Aanonymous__dochack_u298(a_p0, b_p1) {
var result_587202861 = 0;
BeforeRet: {
if ((!((a_p0.heading == null)) && !((b_p1.heading == null)))) {
var x_587202870 = a_p0.heading.textContent;
var y_587202871 = b_p1.heading.textContent;
if ((x_587202870 < y_587202871)) {
result_587202861 = (-1);
break BeforeRet;
}
if ((y_587202871 < x_587202870)) {
result_587202861 = 1;
break BeforeRet;
}
result_587202861 = 0;
break BeforeRet;
}
else {
result_587202861 = subInt(a_p0.sortId, b_p1.sortId);
break BeforeRet;
}
};
return result_587202861;
}
var result_587202841 = null;
BeforeRet: {
if ((x_p0 == null)) {
result_587202841 = null;
break BeforeRet;
}
if (((x_p0.kids).length == 0)) {
if ((x_p0.heading == null)) {
result_587202841 = null;
break BeforeRet;
}
result_587202841 = x_p0.heading.cloneNode(true);
break BeforeRet;
}
result_587202841 = tree__dochack_u130("DIV", []);
if ((!((x_p0.heading == null)) && !(x_p0.heading.hasOwnProperty('__karaxMarker__')))) {
add__dochack_u148(result_587202841, x_p0.heading.cloneNode(true));
}
var ul_587202857 = tree__dochack_u130("UL", []);
if (isRoot_p1) {
setClass__dochack_u152(ul_587202857, "simple simple-toc");
}
else {
setClass__dochack_u152(ul_587202857, "simple");
}
if (x_p0.doSort) {
Temporary1 = HEX3Aanonymous__dochack_u298.bind(null); Temporary1.ClP_0 = HEX3Aanonymous__dochack_u298; Temporary1.ClE_0 = null;
x_p0.kids.sort(Temporary1);
}
Label2: {
var k_587202883 = null;
var i_587203852 = 0;
var L_587203853 = (x_p0.kids).length;
Label3: {
Label4: while (true) {
if (!(i_587203852 < L_587203853)) break Label4;
k_587202883 = x_p0.kids[chckIndx(i_587203852, 0, (x_p0.kids).length - 1)];
var y_587202884 = toHtml__dochack_u278(k_587202883, false);
if (!((y_587202884 == null))) {
add__dochack_u148(ul_587202857, tree__dochack_u130("LI", [y_587202884]));
}
i_587203852 += 1;
if (!(((x_p0.kids).length == L_587203853))) {
failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
if (!((ul_587202857.childNodes.length == 0))) {
add__dochack_u148(result_587202841, ul_587202857);
}
if ((result_587202841.childNodes.length == 0)) {
result_587202841 = null;
}
};
return result_587202841;
}
function replaceById__dochack_u158(id_p0, newTree_p1) {
var x_587202721 = document.getElementById(id_p0);
x_587202721.parentNode.replaceChild(newTree_p1, x_587202721);
newTree_p1.id = id_p0;
}
function togglevis__dochack_u708(d_p0) {
if ((d_p0.style.display == "none")) {
d_p0.style.display = "inline";
}
else {
d_p0.style.display = "none";
}
}
function groupBy(value_p0) {
var toc_587203272 = document.getElementById("toc-list");
if ((alternative_587203267[0] == null)) {
var tt_587203280 = {heading: null, kids: [], sortId: 0, doSort: false};
toToc__dochack_u411(toc_587203272, tt_587203280);
tt_587203280 = tt_587203280.kids[chckIndx(0, 0, (tt_587203280.kids).length - 1)];
var types_587203285 = [[]];
var procs_587203290 = [[]];
extractItems__dochack_u199(tt_587203280, "Types", types_587203285, 0);
extractItems__dochack_u199(tt_587203280, "Procs", procs_587203290, 0);
extractItems__dochack_u199(tt_587203280, "Converters", procs_587203290, 0);
extractItems__dochack_u199(tt_587203280, "Methods", procs_587203290, 0);
extractItems__dochack_u199(tt_587203280, "Templates", procs_587203290, 0);
extractItems__dochack_u199(tt_587203280, "Macros", procs_587203290, 0);
extractItems__dochack_u199(tt_587203280, "Iterators", procs_587203290, 0);
var ntoc_587203291 = buildToc__dochack_u650(tt_587203280, types_587203285[0], procs_587203290[0]);
var x_587203292 = toHtml__dochack_u278(ntoc_587203291, true);
alternative_587203267[0] = tree__dochack_u130("DIV", [x_587203292]);
}
if ((value_p0 == "type")) {
replaceById__dochack_u158("tocRoot", alternative_587203267[0]);
}
else {
replaceById__dochack_u158("tocRoot", tree__dochack_u130("DIV", []));
}
togglevis__dochack_u708(document.getElementById("toc-list"));
}
function raiseRangeError() {
raiseException({message: [118,97,108,117,101,32,111,117,116,32,111,102,32,114,97,110,103,101], parent: null, m_type: NTI134217751, name: null, trace: [], up: null}, "RangeDefect");
}
function HEX5BHEX5D__pureZstrutils_u1308(s_p0, x_p1) {
var result_754976033 = [];
var a_754976035 = x_p1.a;
var L_754976037 = addInt(subInt(subInt((s_p0).length, x_p1.b), a_754976035), 1);
result_754976033 = nimCopy(null, mnewString(chckRange(L_754976037, 0, 2147483647)), NTI33554449);
Label1: {
var i_754976042 = 0;
var i_587203862 = 0;
Label2: {
Label3: while (true) {
if (!(i_587203862 < L_754976037)) break Label3;
i_754976042 = i_587203862;
result_754976033[chckIndx(i_754976042, 0, (result_754976033).length - 1)] = s_p0[chckIndx(addInt(i_754976042, a_754976035), 0, (s_p0).length - 1)];
i_587203862 = addInt(i_587203862, 1);
}
};
};
return result_754976033;
}
function HEX2EHEX2E__stdZenumutils_u105(a_p0, b_p1) {
var result_973078640 = ({a: 0, b: 0});
result_973078640 = nimCopy(result_973078640, {a: a_p0, b: b_p1}, NTI973078617);
return result_973078640;
}
async function loadIndex__dochack_u928() {
var result_587203490 = null;
BeforeRet: {
var indexURL_587203496 = document.getElementById("indexLink").getAttribute("href");
var rootURL_587203522 = HEX5BHEX5D__pureZstrutils_u1308(cstrToNimstr(indexURL_587203496), HEX2EHEX2E__stdZenumutils_u105(0, 14));
var resp_587203534 = (await (await fetch(indexURL_587203496)).text());
var indexElem_587203535 = document.createElement("div");
indexElem_587203535.innerHTML = resp_587203534;
Label1: {
var href_587203557 = null;
var colontmp__587203856 = [];
colontmp__587203856 = indexElem_587203535.getElementsByClassName("reference");
var i_587203858 = 0;
var L_587203859 = (colontmp__587203856).length;
Label2: {
Label3: while (true) {
if (!(i_587203858 < L_587203859)) break Label3;
href_587203557 = colontmp__587203856[chckIndx(i_587203858, 0, (colontmp__587203856).length - 1)];
href_587203557.setAttribute("href", toJSStr((rootURL_587203522).concat(cstrToNimstr(href_587203557.getAttribute("href")))));
db_587203309[0].push(href_587203557);;
contents_587203310[0].push(href_587203557.getAttribute("data-doc-search-tag"));;
i_587203858 += 1;
if (!(((colontmp__587203856).length == L_587203859))) {
failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
result_587203490 = undefined;
break BeforeRet;
};
return result_587203490;
}
function then__dochack_u1107(future_p0, onSuccess_p1, onReject_p2) {
var result_587203673 = null;
BeforeRet: {
var ret_587203683 = null;
ret_587203683 = future_p0.then(onSuccess_p1, onReject_p2);
result_587203673 = ret_587203683;
break BeforeRet;
};
return result_587203673;
}
function nsuToLowerAsciiChar(c_p0) {
var result_754974807 = 0;
if ((ConstSet2[c_p0] != undefined)) {
result_754974807 = (c_p0 ^ 32);
}
else {
result_754974807 = c_p0;
}
return result_754974807;
}
function fuzzyMatch__fuzzysearch_u16(pattern_p0, str_p1) {
var Temporary4;
var Temporary5;
var Temporary6;
var Temporary7;
var Temporary8;
var result_738197525 = {Field0: 0, Field1: false};
var scoreState_738197526 = (-100);
var headerMatched_738197527 = false;
var unmatchedLeadingCharCount_738197528 = 0;
var consecutiveMatchCount_738197529 = 0;
var strIndex_738197530 = 0;
var patIndex_738197531 = 0;
var score_738197532 = 0;
Label1: {
Label2: while (true) {
if (!((strIndex_738197530 < ((str_p1) == null ? 0 : (str_p1).length)) && (patIndex_738197531 < ((pattern_p0) == null ? 0 : (pattern_p0).length)))) break Label2;
Label3: {
var patternChar_738197535 = nsuToLowerAsciiChar(pattern_p0.charCodeAt(chckIndx(patIndex_738197531, 0, (pattern_p0).length - 1)));
var strChar_738197536 = nsuToLowerAsciiChar(str_p1.charCodeAt(chckIndx(strIndex_738197530, 0, (str_p1).length - 1)));
if ((ConstSet3[patternChar_738197535] != undefined)) {
patIndex_738197531 = addInt(patIndex_738197531, 1);
break Label3;
}
if ((ConstSet4[strChar_738197536] != undefined)) {
strIndex_738197530 = addInt(strIndex_738197530, 1);
break Label3;
}
if ((!(headerMatched_738197527) && (strChar_738197536 == 58))) {
headerMatched_738197527 = true;
scoreState_738197526 = (-100);
score_738197532 = chckRange(Number(BigInt(Math.trunc(Math.floor((0.5 * score_738197532))))), (-2147483648), 2147483647);
patIndex_738197531 = 0;
strIndex_738197530 = addInt(strIndex_738197530, 1);
break Label3;
}
if ((strChar_738197536 == patternChar_738197535)) {
switch (scoreState_738197526) {
case (-100):
case 20:
scoreState_738197526 = 10;
break;
case 0:
scoreState_738197526 = 5;
score_738197532 = addInt(score_738197532, scoreState_738197526);
break;
case 10:
case 5:
consecutiveMatchCount_738197529 = addInt(consecutiveMatchCount_738197529, 1);
scoreState_738197526 = 5;
score_738197532 = addInt(score_738197532, mulInt(5, consecutiveMatchCount_738197529));
if ((scoreState_738197526 == 10)) {
score_738197532 = addInt(score_738197532, 10);
}
var onBoundary_738197588 = (patIndex_738197531 == ((pattern_p0) == null ? -1 : (pattern_p0).length - 1));
if ((!(onBoundary_738197588) && (strIndex_738197530 < ((str_p1) == null ? -1 : (str_p1).length - 1)))) {
var nextPatternChar_738197589 = nsuToLowerAsciiChar(pattern_p0.charCodeAt(chckIndx(addInt(patIndex_738197531, 1), 0, (pattern_p0).length - 1)));
var nextStrChar_738197590 = nsuToLowerAsciiChar(str_p1.charCodeAt(chckIndx(addInt(strIndex_738197530, 1), 0, (str_p1).length - 1)));
if (!!((ConstSet5[nextStrChar_738197590] != undefined))) Temporary4 = false; else { Temporary4 = !((nextStrChar_738197590 == nextPatternChar_738197589)); } onBoundary_738197588 = Temporary4;
}
if (onBoundary_738197588) {
scoreState_738197526 = 20;
score_738197532 = addInt(score_738197532, scoreState_738197526);
}
break;
case (-1):
case (-3):
if (!((ConstSet6[str_p1.charCodeAt(chckIndx(subInt(strIndex_738197530, 1), 0, (str_p1).length - 1))] != undefined))) Temporary5 = true; else { if (!(ConstSet7[str_p1.charCodeAt(chckIndx(subInt(strIndex_738197530, 1), 0, (str_p1).length - 1))] != undefined)) Temporary6 = false; else { Temporary6 = (ConstSet8[str_p1.charCodeAt(chckIndx(strIndex_738197530, 0, (str_p1).length - 1))] != undefined); } Temporary5 = Temporary6; } var isLeadingChar_738197614 = Temporary5;
if (isLeadingChar_738197614) {
scoreState_738197526 = 10;
}
else {
scoreState_738197526 = 0;
score_738197532 = addInt(score_738197532, scoreState_738197526);
}
break;
}
patIndex_738197531 = addInt(patIndex_738197531, 1);
}
else {
switch (scoreState_738197526) {
case (-100):
scoreState_738197526 = (-3);
score_738197532 = addInt(score_738197532, scoreState_738197526);
break;
case 5:
scoreState_738197526 = (-1);
score_738197532 = addInt(score_738197532, scoreState_738197526);
consecutiveMatchCount_738197529 = 0;
break;
case (-3):
if ((unmatchedLeadingCharCount_738197528 < 3)) {
scoreState_738197526 = (-3);
score_738197532 = addInt(score_738197532, scoreState_738197526);
}
unmatchedLeadingCharCount_738197528 = addInt(unmatchedLeadingCharCount_738197528, 1);
break;
default:
scoreState_738197526 = (-1);
score_738197532 = addInt(score_738197532, scoreState_738197526);
break;
}
}
strIndex_738197530 = addInt(strIndex_738197530, 1);
};
}
};
if (!(patIndex_738197531 == ((pattern_p0) == null ? 0 : (pattern_p0).length))) Temporary7 = false; else { if ((strIndex_738197530 == ((str_p1) == null ? 0 : (str_p1).length))) Temporary8 = true; else { Temporary8 = !((ConstSet9[str_p1.charCodeAt(chckIndx(strIndex_738197530, 0, (str_p1).length - 1))] != undefined)); } Temporary7 = Temporary8; } if (Temporary7) {
score_738197532 = addInt(score_738197532, 10);
}
var colontmp__587203875 = nimMax(0, score_738197532);
var colontmp__587203876 = (0 < score_738197532);
result_738197525 = nimCopy(result_738197525, {Field0: colontmp__587203875, Field1: colontmp__587203876}, NTI738197518);
return result_738197525;
}
function escapeCString__dochack_u751(x_p0, x_p0_Idx) {
var s_587203313 = [];
Label1: {
var c_587203314 = 0;
var iHEX60gensym13_587203879 = 0;
var nHEX60gensym13_587203880 = ((x_p0[x_p0_Idx]) == null ? 0 : (x_p0[x_p0_Idx]).length);
Label2: {
Label3: while (true) {
if (!(iHEX60gensym13_587203879 < nHEX60gensym13_587203880)) break Label3;
c_587203314 = x_p0[x_p0_Idx].charCodeAt(chckIndx(iHEX60gensym13_587203879, 0, (x_p0[x_p0_Idx]).length - 1));
switch (c_587203314) {
case 60:
nimAddStrStr(s_587203313, [38,108,116,59]);;
break;
case 62:
nimAddStrStr(s_587203313, [38,103,116,59]);;
break;
default:
addChar(s_587203313, c_587203314);;
break;
}
iHEX60gensym13_587203879 += 1;
}
};
};
x_p0[x_p0_Idx] = toJSStr(s_587203313);
}
function dosearch__dochack_u755(value_p0) {
var Temporary5;
function HEX3Aanonymous__dochack_u783(a_p0, b_p1) {
var result_587203356 = 0;
result_587203356 = subInt(b_p1["Field1"], a_p0["Field1"]);
return result_587203356;
}
var result_587203317 = null;
BeforeRet: {
if (((db_587203309[0]).length == 0)) {
break BeforeRet;
}
var ul_587203321 = tree__dochack_u130("UL", []);
result_587203317 = tree__dochack_u130("DIV", []);
setClass__dochack_u152(result_587203317, "search_results");
var matches_587203326 = [];
Label1: {
var i_587203334 = 0;
var colontmp__587203866 = 0;
colontmp__587203866 = (db_587203309[0]).length;
var i_587203867 = 0;
Label2: {
Label3: while (true) {
if (!(i_587203867 < colontmp__587203866)) break Label3;
i_587203334 = i_587203867;
Label4: {
var c_587203335 = contents_587203310[0][chckIndx(i_587203334, 0, (contents_587203310[0]).length - 1)];
if (((c_587203335 == "Examples") || (c_587203335 == "PEG construction"))) {
break Label4;
}
var tmpTuple_587203336 = fuzzyMatch__fuzzysearch_u16(value_p0, c_587203335);
var score_587203337 = tmpTuple_587203336["Field0"];
var matched_587203338 = tmpTuple_587203336["Field1"];
if (matched_587203338) {
matches_587203326.push({Field0: db_587203309[0][chckIndx(i_587203334, 0, (db_587203309[0]).length - 1)], Field1: score_587203337});;
}
};
i_587203867 = addInt(i_587203867, 1);
}
};
};
Temporary5 = HEX3Aanonymous__dochack_u783.bind(null); Temporary5.ClP_0 = HEX3Aanonymous__dochack_u783; Temporary5.ClE_0 = null;
matches_587203326.sort(Temporary5);
Label6: {
var i_587203373 = 0;
var colontmp__587203870 = 0;
colontmp__587203870 = nimMin((matches_587203326).length, 29);
var i_587203871 = 0;
Label7: {
Label8: while (true) {
if (!(i_587203871 < colontmp__587203870)) break Label8;
i_587203373 = i_587203871;
matches_587203326[chckIndx(i_587203373, 0, (matches_587203326).length - 1)]["Field0"].innerHTML = matches_587203326[chckIndx(i_587203373, 0, (matches_587203326).length - 1)]["Field0"].getAttribute("data-doc-search-tag");
escapeCString__dochack_u751(matches_587203326[chckIndx(i_587203373, 0, (matches_587203326).length - 1)]["Field0"], "innerHTML");
add__dochack_u148(ul_587203321, tree__dochack_u130("LI", [matches_587203326[chckIndx(i_587203373, 0, (matches_587203326).length - 1)]["Field0"]]));
i_587203871 = addInt(i_587203871, 1);
}
};
};
if ((ul_587203321.childNodes.length == 0)) {
add__dochack_u148(result_587203317, tree__dochack_u130("B", [text__dochack_u155("no search results")]));
}
else {
add__dochack_u148(result_587203317, tree__dochack_u130("B", [text__dochack_u155("search results")]));
add__dochack_u148(result_587203317, ul_587203321);
}
};
return result_587203317;
}
function hideSearch__dochack_u1090() {
if (!((oldtoc_587203646[0] == null))) {
replaceById__dochack_u158("tocRoot", oldtoc_587203646[0]);
}
}
function runSearch__dochack_u1094() {
var elem_587203655 = document.getElementById("searchInput");
var value_587203656 = elem_587203655.value;
if (!((value_587203656 == ""))) {
if ((oldtoc_587203646[0] == null)) {
oldtoc_587203646[0] = document.getElementById("tocRoot");
}
var results_587203660 = dosearch__dochack_u755(value_587203656);
replaceById__dochack_u158("tocRoot", results_587203660);
}
else {
hideSearch__dochack_u1090();
}
}
function search() {
var Temporary1;
if ((loadIndexFut_587203649[0] == null)) {
loadIndexFut_587203649[0] = loadIndex__dochack_u928();
(then__dochack_u1107(loadIndexFut_587203649[0], runSearch__dochack_u1094, null));
}
if (!((timer_587203647[0] == null))) {
clearTimeout(timer_587203647[0]);
}
Temporary1 = runSearch__dochack_u1094.bind(null); Temporary1.ClP_0 = runSearch__dochack_u1094; Temporary1.ClE_0 = null;
timer_587203647[0] = setTimeout(Temporary1, 400);
}
function copyToClipboard() {
function updatePreTags() {
const allPreTags = document.querySelectorAll("pre:not(.line-nums)")
allPreTags.forEach((e) => {
const div = document.createElement("div")
div.classList.add("copyToClipBoard")
const preTag = document.createElement("pre")
preTag.innerHTML = e.innerHTML
const button = document.createElement("button")
button.value = e.textContent.replace('...', '')
button.classList.add("copyToClipBoardBtn")
button.style.cursor = "pointer"
div.appendChild(preTag)
div.appendChild(button)
e.outerHTML = div.outerHTML
})
}
function copyTextToClipboard(e) {
const clipBoardContent = e.target.value
navigator.clipboard.writeText(clipBoardContent).then(function() {
e.target.style.setProperty("--clipboard-image", "var(--clipboard-image-selected)")
}, function(err) {
console.error("Could not copy text: ", err);
});
}
window.addEventListener("click", (e) => {
if (e.target.classList.contains("copyToClipBoardBtn")) {
copyTextToClipboard(e)
}
})
window.addEventListener("mouseover", (e) => {
if (e.target.nodeName === "PRE") {
e.target.nextElementSibling.style.setProperty("--clipboard-image", "var(--clipboard-image-normal)")
}
})
window.addEventListener("DOMContentLoaded", updatePreTags)
}
var Temporary1;
var Temporary2;
function HEX3Aanonymous__dochack_u1175(e_p0) {
if ((e_p0.key == "/")) {
e_p0.preventDefault();
var searchElem_587203737 = document.getElementById("searchInput");
searchElem_587203737.focus();
searchElem_587203737.parentElement.scrollIntoView();
runSearch__dochack_u1094();
}
}
var Temporary3;
function HEX3Aanonymous__dochack_u1210(e_p0) {
hideSearch__dochack_u1090();
}
var Temporary4;
var t_587202599 = window.localStorage.getItem("theme");
if ((t_587202599 == null)) {
Temporary1 = "auto";
}
else {
Temporary1 = t_587202599;
}
setTheme(Temporary1);
var alternative_587203267 = [null];
var db_587203309 = [[]];
var contents_587203310 = [[]];
var oldtoc_587203646 = [null];
var timer_587203647 = [null];
var loadIndexFut_587203649 = [null];
Temporary2 = HEX3Aanonymous__dochack_u1175.bind(null); Temporary2.ClP_0 = HEX3Aanonymous__dochack_u1175; Temporary2.ClE_0 = null;
window.addEventListener("keypress", Temporary2, false);
Temporary3 = HEX3Aanonymous__dochack_u1210.bind(null); Temporary3.ClP_0 = HEX3Aanonymous__dochack_u1210; Temporary3.ClE_0 = null;
window.addEventListener("hashchange", Temporary3, false);
copyToClipboard();
Temporary4 = onDOMLoaded.bind(null); Temporary4.ClP_0 = onDOMLoaded; Temporary4.ClE_0 = null;
window.addEventListener("DOMContentLoaded", Temporary4, false);