1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654 |
- /* Generated by the Nim Compiler v2.3.1 */
- var framePtr = null;
- var excHandler = 0;
- var lastJSError = null;
- var NTI33554466 = {size: 0,kind: 1,base: null,node: null,finalizer: null};
- var NTI704643086 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
- var NTI33554435 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
- var NTI939524176 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
- var NTI939524183 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
- var NTI134217745 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
- var NTI134217749 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
- var NTI134217751 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
- var NTI33555167 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
- var NTI33555175 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
- var NTI33554450 = {size: 0,kind: 29,base: null,node: null,finalizer: null};
- var NTI33555174 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
- var NTI33555171 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
- var NTI33555172 = {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 NTI33554449 = {size: 0,kind: 28,base: null,node: null,finalizer: null};
- 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;
- var NNI33555172 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
- NTI33555172.node = NNI33555172;
- NTI33555174.base = NTI33555171;
- NTI33555175.base = NTI33555171;
- var NNI33555171 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI33555174, 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: NTI33555175, name: "up", sons: null}]};
- NTI33555171.node = NNI33555171;
- var NNI33555167 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
- NTI33555167.node = NNI33555167;
- NTI33555171.base = NTI33555167;
- NTI33555172.base = NTI33555171;
- NTI134217741.base = NTI33555172;
- NTI134217743.base = NTI134217741;
- var NNI134217751 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
- NTI134217751.node = NNI134217751;
- NTI134217751.base = NTI33555172;
- var NNI134217749 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
- NTI134217749.node = NNI134217749;
- NTI134217749.base = NTI33555172;
- var NNI134217745 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
- NTI134217745.node = NNI134217745;
- NTI134217745.base = NTI33555172;
- var NNI939524183 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI939524176, name: "a", sons: null},
- {kind: 1, offset: "b", len: 0, typ: NTI33554435, name: "b", sons: null}]};
- NTI939524183.node = NNI939524183;
- var NNI704643086 = {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}]};
- NTI704643086.node = NNI704643086;
- 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_33557321 = null;
- switch (ti_p2.kind) {
- case 21:
- case 22:
- case 23:
- case 5:
- if (!(isFatPointer__system_u2869(ti_p2))) {
- result_33557321 = src_p1;
- }
- else {
- result_33557321 = [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_33557321 = dest_p0;
-
- break;
- case 18:
- case 17:
- if (!((ti_p2.base == null))) {
- result_33557321 = nimCopy(dest_p0, src_p1, ti_p2.base);
- }
- else {
- if ((ti_p2.kind == 17)) {
- result_33557321 = (dest_p0 === null || dest_p0 === undefined) ? {m_type: ti_p2} : dest_p0;
- }
- else {
- result_33557321 = (dest_p0 === null || dest_p0 === undefined) ? {} : dest_p0;
- }
- }
- nimCopyAux(result_33557321, 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_33557321 = dest_p0;
- } else {
- if (src_p1 === null) {
- result_33557321 = null;
- }
- else {
- if (dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) {
- dest_p0 = new Array(src_p1.length);
- }
- result_33557321 = dest_p0;
- for (var i = 0; i < src_p1.length; ++i) {
- result_33557321[i] = nimCopy(result_33557321[i], src_p1[i], ti_p2.base);
- }
- }
- }
-
- break;
- case 24:
- case 27:
- if (src_p1 === null) {
- result_33557321 = null;
- }
- else {
- if (dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) {
- dest_p0 = new Array(src_p1.length);
- }
- result_33557321 = dest_p0;
- for (var i = 0; i < src_p1.length; ++i) {
- result_33557321[i] = nimCopy(result_33557321[i], src_p1[i], ti_p2.base);
- }
- }
-
- break;
- case 28:
- if (src_p1 !== null) {
- result_33557321 = src_p1.slice(0);
- }
-
- break;
- default:
- result_33557321 = src_p1;
- break;
- }
- return result_33557321;
- }
- function mnewString(len_p0) {
- var result = new Array(len_p0);
- for (var i = 0; i < len_p0; i++) {result[i] = 0;}
- return result;
-
-
- }
- function toJSStr(s_p0) {
- var result_33556910 = null;
- var res_33556964 = newSeq__system_u2507((s_p0).length);
- var i_33556965 = 0;
- var j_33556966 = 0;
- Label1: {
- Label2: while (true) {
- if (!(i_33556965 < (s_p0).length)) break Label2;
- var c_33556967 = s_p0[i_33556965];
- if ((c_33556967 < 128)) {
- res_33556964[j_33556966] = String.fromCharCode(c_33556967);
- i_33556965 += 1;
- }
- else {
- var helper_33556993 = newSeq__system_u2507(0);
- Label3: {
- Label4: while (true) {
- if (!true) break Label4;
- var code_33556994 = c_33556967.toString(16);
- if ((((code_33556994) == null ? 0 : (code_33556994).length) == 1)) {
- helper_33556993.push("%0");;
- }
- else {
- helper_33556993.push("%");;
- }
-
- helper_33556993.push(code_33556994);;
- i_33556965 += 1;
- if ((((s_p0).length <= i_33556965) || (s_p0[i_33556965] < 128))) {
- break Label3;
- }
-
- c_33556967 = s_p0[i_33556965];
- }
- };
- ++excHandler;
- try {
- res_33556964[j_33556966] = decodeURIComponent(helper_33556993.join(""));
- --excHandler;
- } catch (EXCEPTION) {
- var prevJSError = lastJSError;
- lastJSError = EXCEPTION;
- --excHandler;
- res_33556964[j_33556966] = helper_33556993.join("");
- lastJSError = prevJSError;
- } finally {
- }
- }
-
- j_33556966 += 1;
- }
- };
- if (res_33556964.length < j_33556966) { for (var i = res_33556964.length ; i < j_33556966 ; ++i) res_33556964.push(null); }
- else { res_33556964.length = j_33556966; };
- result_33556910 = res_33556964.join("");
- return result_33556910;
- }
- function raiseException(e_p0, ename_p1) {
- e_p0.name = ename_p1;
- if ((excHandler == 0)) {
- unhandledException(e_p0);
- }
-
- throw e_p0;
-
- }
- function addInt(a_p0, b_p1) {
- var result = a_p0 + b_p1;
- checkOverflowInt(result);
- return result;
-
-
- }
- function chckRange(i_p0, a_p1, b_p2) {
- var result_33557361 = 0;
- BeforeRet: {
- if (((a_p1 <= i_p0) && (i_p0 <= b_p2))) {
- result_33557361 = i_p0;
- break BeforeRet;
- }
- else {
- raiseRangeError();
- }
-
- };
- return result_33557361;
- }
- function chckIndx(i_p0, a_p1, b_p2) {
- var result_33557356 = 0;
- BeforeRet: {
- if (((a_p1 <= i_p0) && (i_p0 <= b_p2))) {
- result_33557356 = i_p0;
- break BeforeRet;
- }
- else {
- raiseIndexError(i_p0, a_p1, b_p2);
- }
-
- };
- return result_33557356;
- }
- function makeNimstrLit(c_p0) {
- var result = [];
- for (var i = 0; i < c_p0.length; ++i) {
- result[i] = c_p0.charCodeAt(i);
- }
- return result;
-
-
- }
- function subInt(a_p0, b_p1) {
- var result = a_p0 - b_p1;
- checkOverflowInt(result);
- return result;
-
-
- }
- 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_33557148 = 0;
- BeforeRet: {
- if ((b_p1 <= a_p0)) {
- Temporary1 = a_p0;
- }
- else {
- Temporary1 = b_p1;
- }
-
- result_33557148 = Temporary1;
- break BeforeRet;
- };
- return result_33557148;
- }
- function nimMin(a_p0, b_p1) {
- var Temporary1;
- var result_33557144 = 0;
- BeforeRet: {
- if ((a_p0 <= b_p1)) {
- Temporary1 = a_p0;
- }
- else {
- Temporary1 = b_p1;
- }
-
- result_33557144 = Temporary1;
- break BeforeRet;
- };
- return result_33557144;
- }
- function addChar(x_p0, c_p1) {
- x_p0.push(c_p1);
-
- }
- var objectID_1157628082 = [0];
- function setTheme(theme_p0) {
- document.documentElement.setAttribute("data-theme", theme_p0);
- window.localStorage.setItem("theme", theme_p0);
-
- }
- function isFatPointer__system_u2869(ti_p0) {
- var result_33557303 = false;
- BeforeRet: {
- result_33557303 = !((ConstSet1[ti_p0.base.kind] != undefined));
- break BeforeRet;
- };
- return result_33557303;
- }
- 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 add__system_u1942(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_u2507(len_p0) {
- var result_33556943 = [];
- result_33556943 = new Array(len_p0); for (var i = 0 ; i < len_p0 ; ++i) { result_33556943[i] = null; }
- return result_33556943;
- }
- function unhandledException(e_p0) {
- var buf_33556658 = [[]];
- if (!(((e_p0.message).length == 0))) {
- buf_33556658[0].push.apply(buf_33556658[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]);;
- buf_33556658[0].push.apply(buf_33556658[0], e_p0.message);;
- }
- else {
- buf_33556658[0].push.apply(buf_33556658[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]);;
- }
-
- buf_33556658[0].push.apply(buf_33556658[0], [32,91]);;
- add__system_u1942(buf_33556658, 0, e_p0.name);
- buf_33556658[0].push.apply(buf_33556658[0], [93,10]);;
- var cbuf_33556659 = toJSStr(buf_33556658[0]);
- if (typeof(Error) !== "undefined") {
- throw new Error(cbuf_33556659);
- }
- else {
- throw cbuf_33556659;
- }
-
-
- }
- 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 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 addChars__stdZprivateZdigitsutils_u202(result_p0, result_p0_Idx, x_p1, start_p2, n_p3) {
- var Temporary1;
- var old_301990096 = (result_p0[result_p0_Idx]).length;
- if (result_p0[result_p0_Idx].length < (Temporary1 = chckRange(addInt(old_301990096, n_p3), 0, 2147483647), 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_301990110 = 0;
- var i_553649367 = 0;
- Label3: {
- Label4: while (true) {
- if (!(i_553649367 < n_p3)) break Label4;
- iHEX60gensym4_301990110 = i_553649367;
- result_p0[result_p0_Idx][chckIndx(addInt(old_301990096, iHEX60gensym4_301990110), 0, (result_p0[result_p0_Idx]).length - 1)] = x_p1.charCodeAt(chckIndx(addInt(start_p2, iHEX60gensym4_301990110), 0, (x_p1).length - 1));
- i_553649367 = addInt(i_553649367, 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_u8(x_p0) {
- var result_385875978 = [[]];
- result_385875978[0] = nimCopy(null, [], NTI33554449);
- addInt__stdZprivateZdigitsutils_u241(result_385875978, 0, x_p0);
- return result_385875978[0];
- }
- 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_u8(i_p0),[32,110,111,116,32,105,110,32],HEX24__systemZdollars_u8(a_p1),[32,46,46,32],HEX24__systemZdollars_u8(b_p2));
- }
-
- raiseException({message: nimCopy(null, Temporary1, NTI33554449), parent: null, m_type: NTI134217749, name: null, trace: [], up: null}, "IndexDefect");
-
- }
- function sysFatal__stdZassertions_u44(message_p1) {
- raiseException({message: nimCopy(null, message_p1, NTI33554449), m_type: NTI134217745, parent: null, name: null, trace: [], up: null}, "AssertionDefect");
-
- }
- function raiseAssert__stdZassertions_u42(msg_p0) {
- sysFatal__stdZassertions_u44(msg_p0);
-
- }
- function failedAssertImpl__stdZassertions_u84(msg_p0) {
- raiseAssert__stdZassertions_u42(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_553648192 = null;
- var colontmp__553649358 = [];
- colontmp__553649358 = document.getElementsByClassName("pragmadots");
- var i_553649360 = 0;
- var L_553649361 = (colontmp__553649358).length;
- Label2: {
- Label3: while (true) {
- if (!(i_553649360 < L_553649361)) break Label3;
- pragmaDots_553648192 = colontmp__553649358[chckIndx(i_553649360, 0, (colontmp__553649358).length - 1)];
- Temporary4 = HEX3Aanonymous__dochack_u65.bind(null); Temporary4.ClP_0 = HEX3Aanonymous__dochack_u65; Temporary4.ClE_0 = null;
- pragmaDots_553648192.onclick = Temporary4;
- i_553649360 += 1;
- if (!(((colontmp__553649358).length == L_553649361))) {
- failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
- }
-
- }
- };
- };
-
- }
- function isWhitespace__dochack_u408(x_p0) {
- var result_553648538 = false;
- result_553648538 = (((x_p0.nodeName == "#text") && !/\S/.test(x_p0.textContent)) || (x_p0.nodeName == "#comment"));
- return result_553648538;
- }
- 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_553648549 = {heading: null, kids: [], sortId: (father_p1.kids).length, doSort: false};
- var i_553648550 = 0;
- Label1: {
- Label2: while (true) {
- if (!(i_553648550 < x_p0.childNodes.length)) break Label2;
- var nxt_553648551 = addInt(i_553648550, 1);
- Label3: {
- Label4: while (true) {
- if (!(nxt_553648551 < x_p0.childNodes.length)) Temporary5 = false; else { Temporary5 = isWhitespace__dochack_u408(x_p0.childNodes[nxt_553648551]); } if (!Temporary5) break Label4;
- nxt_553648551 = addInt(nxt_553648551, 1);
- }
- };
- if (!(nxt_553648551 < x_p0.childNodes.length)) Temporary8 = false; else { Temporary8 = (x_p0.childNodes[i_553648550].nodeName == "LI"); } if (!Temporary8) Temporary7 = false; else { Temporary7 = (x_p0.childNodes[i_553648550].childNodes.length == 1); } if (!Temporary7) Temporary6 = false; else { Temporary6 = (x_p0.childNodes[nxt_553648551].nodeName == "UL"); } if (Temporary6) {
- var e_553648564 = {heading: x_p0.childNodes[i_553648550].childNodes[0], kids: [], sortId: (f_553648549.kids).length, doSort: false};
- var it_553648565 = x_p0.childNodes[nxt_553648551];
- Label9: {
- var j_553648570 = 0;
- var colontmp__553649374 = 0;
- colontmp__553649374 = it_553648565.childNodes.length;
- var i_553649375 = 0;
- Label10: {
- Label11: while (true) {
- if (!(i_553649375 < colontmp__553649374)) break Label11;
- j_553648570 = i_553649375;
- toToc__dochack_u411(it_553648565.childNodes[j_553648570], e_553648564);
- i_553649375 = addInt(i_553649375, 1);
- }
- };
- };
- f_553648549.kids.push(e_553648564);;
- i_553648550 = addInt(nxt_553648551, 1);
- }
- else {
- toToc__dochack_u411(x_p0.childNodes[i_553648550], f_553648549);
- i_553648550 = addInt(i_553648550, 1);
- }
-
- }
- };
- father_p1.kids.push(f_553648549);;
- }
- else {
- if (isWhitespace__dochack_u408(x_p0)) {
- }
- else {
- if ((x_p0.nodeName == "LI")) {
- var idx_553648588 = [];
- Label12: {
- var i_553648593 = 0;
- var colontmp__553649378 = 0;
- colontmp__553649378 = x_p0.childNodes.length;
- var i_553649379 = 0;
- Label13: {
- Label14: while (true) {
- if (!(i_553649379 < colontmp__553649378)) break Label14;
- i_553648593 = i_553649379;
- if (!(isWhitespace__dochack_u408(x_p0.childNodes[i_553648593]))) {
- idx_553648588.push(i_553648593);;
- }
-
- i_553649379 = addInt(i_553649379, 1);
- }
- };
- };
- if (!((idx_553648588).length == 2)) Temporary15 = false; else { Temporary15 = (x_p0.childNodes[idx_553648588[chckIndx(1, 0, (idx_553648588).length - 1)]].nodeName == "UL"); } if (Temporary15) {
- var e_553648609 = {heading: x_p0.childNodes[idx_553648588[chckIndx(0, 0, (idx_553648588).length - 1)]], kids: [], sortId: (father_p1.kids).length, doSort: false};
- var it_553648610 = x_p0.childNodes[idx_553648588[chckIndx(1, 0, (idx_553648588).length - 1)]];
- Label16: {
- var j_553648615 = 0;
- var colontmp__553649382 = 0;
- colontmp__553649382 = it_553648610.childNodes.length;
- var i_553649383 = 0;
- Label17: {
- Label18: while (true) {
- if (!(i_553649383 < colontmp__553649382)) break Label18;
- j_553648615 = i_553649383;
- toToc__dochack_u411(it_553648610.childNodes[j_553648615], e_553648609);
- i_553649383 = addInt(i_553649383, 1);
- }
- };
- };
- father_p1.kids.push(e_553648609);;
- }
- else {
- Label19: {
- var i_553648624 = 0;
- var colontmp__553649386 = 0;
- colontmp__553649386 = x_p0.childNodes.length;
- var i_553649387 = 0;
- Label20: {
- Label21: while (true) {
- if (!(i_553649387 < colontmp__553649386)) break Label21;
- i_553648624 = i_553649387;
- toToc__dochack_u411(x_p0.childNodes[i_553648624], father_p1);
- i_553649387 = addInt(i_553649387, 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_553648347 = 0;
- var colontmp__553649390 = 0;
- colontmp__553649390 = (x_p0.kids).length;
- var i_553649391 = 0;
- Label2: {
- Label3: while (true) {
- if (!(i_553649391 < colontmp__553649390)) break Label3;
- i_553648347 = i_553649391;
- items_p2[items_p2_Idx].push(x_p0.kids[chckIndx(i_553648347, 0, (x_p0.kids).length - 1)].heading);;
- i_553649391 = addInt(i_553649391, 1);
- }
- };
- };
- }
- else {
- Label4: {
- var k_553648373 = null;
- var i_553649395 = 0;
- var L_553649396 = (x_p0.kids).length;
- Label5: {
- Label6: while (true) {
- if (!(i_553649395 < L_553649396)) break Label6;
- k_553648373 = x_p0.kids[chckIndx(i_553649395, 0, (x_p0.kids).length - 1)];
- extractItems__dochack_u199(k_553648373, heading_p1, items_p2, items_p2_Idx);
- i_553649395 += 1;
- if (!(((x_p0.kids).length == L_553649396))) {
- failedAssertImpl__stdZassertions_u84(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_553648261 = null;
- result_553648261 = document.createElement(tag_p0);
- Label1: {
- var k_553648275 = null;
- var i_553649408 = 0;
- Label2: {
- Label3: while (true) {
- if (!(i_553649408 < (kids_p1).length)) break Label3;
- k_553648275 = kids_p1[chckIndx(i_553649408, 0, (kids_p1).length - 1)];
- result_553648261.appendChild(k_553648275);
- i_553649408 += 1;
- }
- };
- };
- return result_553648261;
- }
- function text__dochack_u155(s_p0) {
- var result_553648285 = null;
- result_553648285 = document.createTextNode(s_p0);
- return result_553648285;
- }
- function uncovered__dochack_u600(x_p0) {
- var Temporary1;
- var result_553648730 = 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_553648730 = Temporary1;
- break BeforeRet;
- }
-
- result_553648730 = {heading: x_p0.heading, kids: [], sortId: x_p0.sortId, doSort: x_p0.doSort};
- Label2: {
- var k_553648745 = null;
- var i_553649415 = 0;
- var L_553649416 = (x_p0.kids).length;
- Label3: {
- Label4: while (true) {
- if (!(i_553649415 < L_553649416)) break Label4;
- k_553648745 = x_p0.kids[chckIndx(i_553649415, 0, (x_p0.kids).length - 1)];
- var y_553648746 = uncovered__dochack_u600(k_553648745);
- if (!((y_553648746 == null))) {
- result_553648730.kids.push(y_553648746);;
- }
-
- i_553649415 += 1;
- if (!(((x_p0.kids).length == L_553649416))) {
- failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
- }
-
- }
- };
- };
- if (((result_553648730.kids).length == 0)) {
- result_553648730 = null;
- }
-
- };
- return result_553648730;
- }
- function mergeTocs__dochack_u630(orig_p0, news_p1) {
- var result_553648761 = null;
- result_553648761 = uncovered__dochack_u600(orig_p0);
- if ((result_553648761 == null)) {
- result_553648761 = news_p1;
- }
- else {
- Label1: {
- var i_553648773 = 0;
- var colontmp__553649411 = 0;
- colontmp__553649411 = (news_p1.kids).length;
- var i_553649412 = 0;
- Label2: {
- Label3: while (true) {
- if (!(i_553649412 < colontmp__553649411)) break Label3;
- i_553648773 = i_553649412;
- result_553648761.kids.push(news_p1.kids[chckIndx(i_553648773, 0, (news_p1.kids).length - 1)]);;
- i_553649412 = addInt(i_553649412, 1);
- }
- };
- };
- }
-
- return result_553648761;
- }
- function buildToc__dochack_u650(orig_p0, types_p1, procs_p2) {
- var result_553648782 = null;
- var newStuff_553648787 = {heading: null, kids: [], doSort: true, sortId: 0};
- Label1: {
- var t_553648791 = null;
- var i_553649403 = 0;
- var L_553649404 = (types_p1).length;
- Label2: {
- Label3: while (true) {
- if (!(i_553649403 < L_553649404)) break Label3;
- t_553648791 = types_p1[chckIndx(i_553649403, 0, (types_p1).length - 1)];
- var c_553648796 = {heading: t_553648791.cloneNode(true), kids: [], doSort: true, sortId: 0};
- t_553648791.__karaxMarker__ = true;
- Label4: {
- var p_553648800 = null;
- var i_553649400 = 0;
- var L_553649401 = (procs_p2).length;
- Label5: {
- Label6: while (true) {
- if (!(i_553649400 < L_553649401)) break Label6;
- p_553648800 = procs_p2[chckIndx(i_553649400, 0, (procs_p2).length - 1)];
- if (!(p_553648800.hasOwnProperty('__karaxMarker__'))) {
- var xx_553648801 = p_553648800.parentNode.getElementsByClassName("attachedType");
- if ((((xx_553648801).length == 1) && (xx_553648801[chckIndx(0, 0, (xx_553648801).length - 1)].textContent == t_553648791.textContent))) {
- var q_553648806 = tree__dochack_u130("A", [text__dochack_u155(p_553648800.title)]);
- q_553648806.setAttribute("href", p_553648800.getAttribute("href"));
- c_553648796.kids.push({heading: q_553648806, kids: [], sortId: 0, doSort: false});;
- p_553648800.__karaxMarker__ = true;
- }
-
- }
-
- i_553649400 += 1;
- if (!(((procs_p2).length == L_553649401))) {
- failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
- }
-
- }
- };
- };
- newStuff_553648787.kids.push(c_553648796);;
- i_553649403 += 1;
- if (!(((types_p1).length == L_553649404))) {
- failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
- }
-
- }
- };
- };
- result_553648782 = mergeTocs__dochack_u630(orig_p0, newStuff_553648787);
- return result_553648782;
- }
- function add__dochack_u148(parent_p0, kid_p1) {
- if (((parent_p0.nodeName == "TR") && ((kid_p1.nodeName == "TD") || (kid_p1.nodeName == "TH")))) {
- var k_553648279 = document.createElement("TD");
- k_553648279.appendChild(kid_p1);
- parent_p0.appendChild(k_553648279);
- }
- 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_553648429 = 0;
- BeforeRet: {
- if ((!((a_p0.heading == null)) && !((b_p1.heading == null)))) {
- var x_553648438 = a_p0.heading.textContent;
- var y_553648439 = b_p1.heading.textContent;
- if ((x_553648438 < y_553648439)) {
- result_553648429 = (-1);
- break BeforeRet;
- }
-
- if ((y_553648439 < x_553648438)) {
- result_553648429 = 1;
- break BeforeRet;
- }
-
- result_553648429 = 0;
- break BeforeRet;
- }
- else {
- result_553648429 = subInt(a_p0.sortId, b_p1.sortId);
- break BeforeRet;
- }
-
- };
- return result_553648429;
- }
- var result_553648409 = null;
- BeforeRet: {
- if ((x_p0 == null)) {
- result_553648409 = null;
- break BeforeRet;
- }
-
- if (((x_p0.kids).length == 0)) {
- if ((x_p0.heading == null)) {
- result_553648409 = null;
- break BeforeRet;
- }
-
- result_553648409 = x_p0.heading.cloneNode(true);
- break BeforeRet;
- }
-
- result_553648409 = tree__dochack_u130("DIV", []);
- if ((!((x_p0.heading == null)) && !(x_p0.heading.hasOwnProperty('__karaxMarker__')))) {
- add__dochack_u148(result_553648409, x_p0.heading.cloneNode(true));
- }
-
- var ul_553648425 = tree__dochack_u130("UL", []);
- if (isRoot_p1) {
- setClass__dochack_u152(ul_553648425, "simple simple-toc");
- }
- else {
- setClass__dochack_u152(ul_553648425, "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_553648451 = null;
- var i_553649419 = 0;
- var L_553649420 = (x_p0.kids).length;
- Label3: {
- Label4: while (true) {
- if (!(i_553649419 < L_553649420)) break Label4;
- k_553648451 = x_p0.kids[chckIndx(i_553649419, 0, (x_p0.kids).length - 1)];
- var y_553648452 = toHtml__dochack_u278(k_553648451, false);
- if (!((y_553648452 == null))) {
- add__dochack_u148(ul_553648425, tree__dochack_u130("LI", [y_553648452]));
- }
-
- i_553649419 += 1;
- if (!(((x_p0.kids).length == L_553649420))) {
- failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
- }
-
- }
- };
- };
- if (!((ul_553648425.childNodes.length == 0))) {
- add__dochack_u148(result_553648409, ul_553648425);
- }
-
- if ((result_553648409.childNodes.length == 0)) {
- result_553648409 = null;
- }
-
- };
- return result_553648409;
- }
- function replaceById__dochack_u158(id_p0, newTree_p1) {
- var x_553648289 = document.getElementById(id_p0);
- x_553648289.parentNode.replaceChild(newTree_p1, x_553648289);
- 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_553648840 = document.getElementById("toc-list");
- if ((alternative_553648835[0] == null)) {
- var tt_553648848 = {heading: null, kids: [], sortId: 0, doSort: false};
- toToc__dochack_u411(toc_553648840, tt_553648848);
- tt_553648848 = tt_553648848.kids[chckIndx(0, 0, (tt_553648848.kids).length - 1)];
- var types_553648853 = [[]];
- var procs_553648858 = [[]];
- extractItems__dochack_u199(tt_553648848, "Types", types_553648853, 0);
- extractItems__dochack_u199(tt_553648848, "Procs", procs_553648858, 0);
- extractItems__dochack_u199(tt_553648848, "Converters", procs_553648858, 0);
- extractItems__dochack_u199(tt_553648848, "Methods", procs_553648858, 0);
- extractItems__dochack_u199(tt_553648848, "Templates", procs_553648858, 0);
- extractItems__dochack_u199(tt_553648848, "Macros", procs_553648858, 0);
- extractItems__dochack_u199(tt_553648848, "Iterators", procs_553648858, 0);
- var ntoc_553648859 = buildToc__dochack_u650(tt_553648848, types_553648853[0], procs_553648858[0]);
- var x_553648860 = toHtml__dochack_u278(ntoc_553648859, true);
- alternative_553648835[0] = tree__dochack_u130("DIV", [x_553648860]);
- }
-
- if ((value_p0 == "type")) {
- replaceById__dochack_u158("tocRoot", alternative_553648835[0]);
- }
- else {
- replaceById__dochack_u158("tocRoot", tree__dochack_u130("DIV", []));
- }
-
- togglevis__dochack_u708(document.getElementById("toc-list"));
-
- }
- function HEX5BHEX5D__pureZstrutils_u1307(s_p0, x_p1) {
- var result_721421600 = [];
- var a_721421602 = x_p1.a;
- var L_721421604 = addInt(subInt(subInt((s_p0).length, x_p1.b), a_721421602), 1);
- result_721421600 = nimCopy(null, mnewString(chckRange(L_721421604, 0, 2147483647)), NTI33554449);
- Label1: {
- var i_721421609 = 0;
- var i_553649429 = 0;
- Label2: {
- Label3: while (true) {
- if (!(i_553649429 < L_721421604)) break Label3;
- i_721421609 = i_553649429;
- result_721421600[chckIndx(i_721421609, 0, (result_721421600).length - 1)] = s_p0[chckIndx(addInt(i_721421609, a_721421602), 0, (s_p0).length - 1)];
- i_553649429 = addInt(i_553649429, 1);
- }
- };
- };
- return result_721421600;
- }
- function HEX2EHEX2E__stdZenumutils_u105(a_p0, b_p1) {
- var result_939524208 = ({a: 0, b: 0});
- result_939524208 = nimCopy(result_939524208, {a: a_p0, b: b_p1}, NTI939524183);
- return result_939524208;
- }
- async function loadIndex__dochack_u928() {
- var result_553649058 = null;
- BeforeRet: {
- var indexURL_553649064 = document.getElementById("indexLink").getAttribute("href");
- var rootURL_553649090 = HEX5BHEX5D__pureZstrutils_u1307(cstrToNimstr(indexURL_553649064), HEX2EHEX2E__stdZenumutils_u105(0, 14));
- var resp_553649102 = (await (await fetch(indexURL_553649064)).text());
- var indexElem_553649103 = document.createElement("div");
- indexElem_553649103.innerHTML = resp_553649102;
- Label1: {
- var href_553649125 = null;
- var colontmp__553649423 = [];
- colontmp__553649423 = indexElem_553649103.getElementsByClassName("reference");
- var i_553649425 = 0;
- var L_553649426 = (colontmp__553649423).length;
- Label2: {
- Label3: while (true) {
- if (!(i_553649425 < L_553649426)) break Label3;
- href_553649125 = colontmp__553649423[chckIndx(i_553649425, 0, (colontmp__553649423).length - 1)];
- href_553649125.setAttribute("href", toJSStr((rootURL_553649090).concat(cstrToNimstr(href_553649125.getAttribute("href")))));
- db_553648877[0].push(href_553649125);;
- contents_553648878[0].push(href_553649125.getAttribute("data-doc-search-tag"));;
- i_553649425 += 1;
- if (!(((colontmp__553649423).length == L_553649426))) {
- failedAssertImpl__stdZassertions_u84(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it"));
- }
-
- }
- };
- };
- result_553649058 = undefined;
- break BeforeRet;
- };
- return result_553649058;
- }
- function then__dochack_u1107(future_p0, onSuccess_p1, onReject_p2) {
- var result_553649241 = null;
- BeforeRet: {
- var ret_553649251 = null;
- ret_553649251 = future_p0.then(onSuccess_p1, onReject_p2);
- result_553649241 = ret_553649251;
- break BeforeRet;
- };
- return result_553649241;
- }
- function nsuToLowerAsciiChar(c_p0) {
- var result_721420374 = 0;
- if ((ConstSet2[c_p0] != undefined)) {
- result_721420374 = (c_p0 ^ 32);
- }
- else {
- result_721420374 = c_p0;
- }
-
- return result_721420374;
- }
- function fuzzyMatch__fuzzysearch_u16(pattern_p0, str_p1) {
- var Temporary4;
- var Temporary5;
- var Temporary6;
- var Temporary7;
- var Temporary8;
- var result_704643093 = {Field0: 0, Field1: false};
- var scoreState_704643094 = (-100);
- var headerMatched_704643095 = false;
- var unmatchedLeadingCharCount_704643096 = 0;
- var consecutiveMatchCount_704643097 = 0;
- var strIndex_704643098 = 0;
- var patIndex_704643099 = 0;
- var score_704643100 = 0;
- Label1: {
- Label2: while (true) {
- if (!((strIndex_704643098 < ((str_p1) == null ? 0 : (str_p1).length)) && (patIndex_704643099 < ((pattern_p0) == null ? 0 : (pattern_p0).length)))) break Label2;
- Label3: {
- var patternChar_704643103 = nsuToLowerAsciiChar(pattern_p0.charCodeAt(chckIndx(patIndex_704643099, 0, (pattern_p0).length - 1)));
- var strChar_704643104 = nsuToLowerAsciiChar(str_p1.charCodeAt(chckIndx(strIndex_704643098, 0, (str_p1).length - 1)));
- if ((ConstSet3[patternChar_704643103] != undefined)) {
- patIndex_704643099 = addInt(patIndex_704643099, 1);
- break Label3;
- }
-
- if ((ConstSet4[strChar_704643104] != undefined)) {
- strIndex_704643098 = addInt(strIndex_704643098, 1);
- break Label3;
- }
-
- if ((!(headerMatched_704643095) && (strChar_704643104 == 58))) {
- headerMatched_704643095 = true;
- scoreState_704643094 = (-100);
- score_704643100 = ((Math.floor((0.5 * score_704643100))) | 0);
- patIndex_704643099 = 0;
- strIndex_704643098 = addInt(strIndex_704643098, 1);
- break Label3;
- }
-
- if ((strChar_704643104 == patternChar_704643103)) {
- switch (scoreState_704643094) {
- case (-100):
- case 20:
- scoreState_704643094 = 10;
- break;
- case 0:
- scoreState_704643094 = 5;
- score_704643100 = addInt(score_704643100, scoreState_704643094);
- break;
- case 10:
- case 5:
- consecutiveMatchCount_704643097 = addInt(consecutiveMatchCount_704643097, 1);
- scoreState_704643094 = 5;
- score_704643100 = addInt(score_704643100, mulInt(5, consecutiveMatchCount_704643097));
- if ((scoreState_704643094 == 10)) {
- score_704643100 = addInt(score_704643100, 10);
- }
-
- var onBoundary_704643156 = (patIndex_704643099 == ((pattern_p0) == null ? -1 : (pattern_p0).length - 1));
- if ((!(onBoundary_704643156) && (strIndex_704643098 < ((str_p1) == null ? -1 : (str_p1).length - 1)))) {
- var nextPatternChar_704643157 = nsuToLowerAsciiChar(pattern_p0.charCodeAt(chckIndx(addInt(patIndex_704643099, 1), 0, (pattern_p0).length - 1)));
- var nextStrChar_704643158 = nsuToLowerAsciiChar(str_p1.charCodeAt(chckIndx(addInt(strIndex_704643098, 1), 0, (str_p1).length - 1)));
- if (!!((ConstSet5[nextStrChar_704643158] != undefined))) Temporary4 = false; else { Temporary4 = !((nextStrChar_704643158 == nextPatternChar_704643157)); } onBoundary_704643156 = Temporary4;
- }
-
- if (onBoundary_704643156) {
- scoreState_704643094 = 20;
- score_704643100 = addInt(score_704643100, scoreState_704643094);
- }
-
- break;
- case (-1):
- case (-3):
- if (!((ConstSet6[str_p1.charCodeAt(chckIndx(subInt(strIndex_704643098, 1), 0, (str_p1).length - 1))] != undefined))) Temporary5 = true; else { if (!(ConstSet7[str_p1.charCodeAt(chckIndx(subInt(strIndex_704643098, 1), 0, (str_p1).length - 1))] != undefined)) Temporary6 = false; else { Temporary6 = (ConstSet8[str_p1.charCodeAt(chckIndx(strIndex_704643098, 0, (str_p1).length - 1))] != undefined); } Temporary5 = Temporary6; } var isLeadingChar_704643182 = Temporary5;
- if (isLeadingChar_704643182) {
- scoreState_704643094 = 10;
- }
- else {
- scoreState_704643094 = 0;
- score_704643100 = addInt(score_704643100, scoreState_704643094);
- }
-
- break;
- }
- patIndex_704643099 = addInt(patIndex_704643099, 1);
- }
- else {
- switch (scoreState_704643094) {
- case (-100):
- scoreState_704643094 = (-3);
- score_704643100 = addInt(score_704643100, scoreState_704643094);
- break;
- case 5:
- scoreState_704643094 = (-1);
- score_704643100 = addInt(score_704643100, scoreState_704643094);
- consecutiveMatchCount_704643097 = 0;
- break;
- case (-3):
- if ((unmatchedLeadingCharCount_704643096 < 3)) {
- scoreState_704643094 = (-3);
- score_704643100 = addInt(score_704643100, scoreState_704643094);
- }
-
- unmatchedLeadingCharCount_704643096 = addInt(unmatchedLeadingCharCount_704643096, 1);
- break;
- default:
- scoreState_704643094 = (-1);
- score_704643100 = addInt(score_704643100, scoreState_704643094);
- break;
- }
- }
-
- strIndex_704643098 = addInt(strIndex_704643098, 1);
- };
- }
- };
- if (!(patIndex_704643099 == ((pattern_p0) == null ? 0 : (pattern_p0).length))) Temporary7 = false; else { if ((strIndex_704643098 == ((str_p1) == null ? 0 : (str_p1).length))) Temporary8 = true; else { Temporary8 = !((ConstSet9[str_p1.charCodeAt(chckIndx(strIndex_704643098, 0, (str_p1).length - 1))] != undefined)); } Temporary7 = Temporary8; } if (Temporary7) {
- score_704643100 = addInt(score_704643100, 10);
- }
-
- var colontmp__553649442 = nimMax(0, score_704643100);
- var colontmp__553649443 = (0 < score_704643100);
- result_704643093 = nimCopy(result_704643093, {Field0: colontmp__553649442, Field1: colontmp__553649443}, NTI704643086);
- return result_704643093;
- }
- function escapeCString__dochack_u751(x_p0, x_p0_Idx) {
- var s_553648881 = [];
- Label1: {
- var c_553648882 = 0;
- var iHEX60gensym13_553649446 = 0;
- var nHEX60gensym13_553649447 = ((x_p0[x_p0_Idx]) == null ? 0 : (x_p0[x_p0_Idx]).length);
- Label2: {
- Label3: while (true) {
- if (!(iHEX60gensym13_553649446 < nHEX60gensym13_553649447)) break Label3;
- c_553648882 = x_p0[x_p0_Idx].charCodeAt(chckIndx(iHEX60gensym13_553649446, 0, (x_p0[x_p0_Idx]).length - 1));
- switch (c_553648882) {
- case 60:
- s_553648881.push.apply(s_553648881, [38,108,116,59]);;
- break;
- case 62:
- s_553648881.push.apply(s_553648881, [38,103,116,59]);;
- break;
- default:
- addChar(s_553648881, c_553648882);;
- break;
- }
- iHEX60gensym13_553649446 += 1;
- }
- };
- };
- x_p0[x_p0_Idx] = toJSStr(s_553648881);
-
- }
- function dosearch__dochack_u755(value_p0) {
- var Temporary5;
- function HEX3Aanonymous__dochack_u783(a_p0, b_p1) {
- var result_553648924 = 0;
- result_553648924 = subInt(b_p1["Field1"], a_p0["Field1"]);
- return result_553648924;
- }
- var result_553648885 = null;
- BeforeRet: {
- if (((db_553648877[0]).length == 0)) {
- break BeforeRet;
- }
-
- var ul_553648889 = tree__dochack_u130("UL", []);
- result_553648885 = tree__dochack_u130("DIV", []);
- setClass__dochack_u152(result_553648885, "search_results");
- var matches_553648894 = [];
- Label1: {
- var i_553648902 = 0;
- var colontmp__553649433 = 0;
- colontmp__553649433 = (db_553648877[0]).length;
- var i_553649434 = 0;
- Label2: {
- Label3: while (true) {
- if (!(i_553649434 < colontmp__553649433)) break Label3;
- i_553648902 = i_553649434;
- Label4: {
- var c_553648903 = contents_553648878[0][chckIndx(i_553648902, 0, (contents_553648878[0]).length - 1)];
- if (((c_553648903 == "Examples") || (c_553648903 == "PEG construction"))) {
- break Label4;
- }
-
- var tmpTuple_553648904 = fuzzyMatch__fuzzysearch_u16(value_p0, c_553648903);
- var score_553648905 = tmpTuple_553648904["Field0"];
- var matched_553648906 = tmpTuple_553648904["Field1"];
- if (matched_553648906) {
- matches_553648894.push({Field0: db_553648877[0][chckIndx(i_553648902, 0, (db_553648877[0]).length - 1)], Field1: score_553648905});;
- }
-
- };
- i_553649434 = addInt(i_553649434, 1);
- }
- };
- };
- Temporary5 = HEX3Aanonymous__dochack_u783.bind(null); Temporary5.ClP_0 = HEX3Aanonymous__dochack_u783; Temporary5.ClE_0 = null;
- matches_553648894.sort(Temporary5);
- Label6: {
- var i_553648941 = 0;
- var colontmp__553649437 = 0;
- colontmp__553649437 = nimMin((matches_553648894).length, 29);
- var i_553649438 = 0;
- Label7: {
- Label8: while (true) {
- if (!(i_553649438 < colontmp__553649437)) break Label8;
- i_553648941 = i_553649438;
- matches_553648894[chckIndx(i_553648941, 0, (matches_553648894).length - 1)]["Field0"].innerHTML = matches_553648894[chckIndx(i_553648941, 0, (matches_553648894).length - 1)]["Field0"].getAttribute("data-doc-search-tag");
- escapeCString__dochack_u751(matches_553648894[chckIndx(i_553648941, 0, (matches_553648894).length - 1)]["Field0"], "innerHTML");
- add__dochack_u148(ul_553648889, tree__dochack_u130("LI", [matches_553648894[chckIndx(i_553648941, 0, (matches_553648894).length - 1)]["Field0"]]));
- i_553649438 = addInt(i_553649438, 1);
- }
- };
- };
- if ((ul_553648889.childNodes.length == 0)) {
- add__dochack_u148(result_553648885, tree__dochack_u130("B", [text__dochack_u155("no search results")]));
- }
- else {
- add__dochack_u148(result_553648885, tree__dochack_u130("B", [text__dochack_u155("search results")]));
- add__dochack_u148(result_553648885, ul_553648889);
- }
-
- };
- return result_553648885;
- }
- function hideSearch__dochack_u1090() {
- if (!((oldtoc_553649214[0] == null))) {
- replaceById__dochack_u158("tocRoot", oldtoc_553649214[0]);
- }
-
-
- }
- function runSearch__dochack_u1094() {
- var elem_553649223 = document.getElementById("searchInput");
- var value_553649224 = elem_553649223.value;
- if (!((value_553649224 == ""))) {
- if ((oldtoc_553649214[0] == null)) {
- oldtoc_553649214[0] = document.getElementById("tocRoot");
- }
-
- var results_553649228 = dosearch__dochack_u755(value_553649224);
- replaceById__dochack_u158("tocRoot", results_553649228);
- }
- else {
- hideSearch__dochack_u1090();
- }
-
-
- }
- function search() {
- var Temporary1;
- if ((loadIndexFut_553649217[0] == null)) {
- loadIndexFut_553649217[0] = loadIndex__dochack_u928();
- (then__dochack_u1107(loadIndexFut_553649217[0], runSearch__dochack_u1094, null));
- }
-
- if (!((timer_553649215[0] == null))) {
- clearTimeout(timer_553649215[0]);
- }
-
- Temporary1 = runSearch__dochack_u1094.bind(null); Temporary1.ClP_0 = runSearch__dochack_u1094; Temporary1.ClE_0 = null;
- timer_553649215[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_553649305 = document.getElementById("searchInput");
- searchElem_553649305.focus();
- searchElem_553649305.parentElement.scrollIntoView();
- runSearch__dochack_u1094();
- }
-
-
- }
- var Temporary3;
- function HEX3Aanonymous__dochack_u1210(e_p0) {
- hideSearch__dochack_u1090();
-
- }
- var Temporary4;
- var t_553648167 = window.localStorage.getItem("theme");
- if ((t_553648167 == null)) {
- Temporary1 = "auto";
- }
- else {
- Temporary1 = t_553648167;
- }
- setTheme(Temporary1);
- var alternative_553648835 = [null];
- var db_553648877 = [[]];
- var contents_553648878 = [[]];
- var oldtoc_553649214 = [null];
- var timer_553649215 = [null];
- var loadIndexFut_553649217 = [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);
|