commit 570d53f3915aed1daee92d652eba24be324a5cec Author: dimgigov Date: Fri May 15 17:24:24 2026 +0300 Initial commit: nimforum with BaraDB backend - Replaced SQLite with BaraDB via TCP wire protocol - Added baradb_client.nim and baradb_sqlite.nim adapter - Renamed SQL keywords: status->usrStatus, key->sessionKey, like->postLike - Added NOW() support for datetime defaults - Switched Jester to asynchttpserver (-d:useStdLib) to avoid thread/GC issues - Frontend built and favicon added diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..90e05c4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..537e525 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,72 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + push: + pull_request: + branches: [master] + schedule: + - cron: '0 0 * * 1' + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + test_stable_and_devel: + runs-on: ubuntu-latest + strategy: + matrix: + chrome: [ 'stable' ] + nim-version: ['stable', 'devel'] + include: + - cache-key: 'stable' + steps: + - uses: actions/checkout@v6 + - name: Checkout submodules + run: git submodule update --init --recursive + + - name: Setup Chrome + uses: browser-actions/setup-chrome@latest + with: + chrome-version: ${{ matrix.chrome }} + + - name: Get Date + id: get-date + run: echo "::set-output name=date::$(date "+%Y-%m-%d")" + shell: bash + + - name: Cache choosenim + uses: actions/cache@v4 + with: + path: ~/.choosenim + key: ${{ runner.os }}-choosenim-${{ matrix.cache-key }} + + - name: Cache nimble + uses: actions/cache@v4 + with: + path: ~/.nimble + key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }} + + - name: Install geckodriver + run: | + sudo apt-get -qq update + sudo apt-get install autoconf libtool libsass-dev libpcre3-dev + wget https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz + mkdir geckodriver + tar -xzf geckodriver-v0.32.0-linux64.tar.gz -C geckodriver + export PATH=$PATH:$PWD/geckodriver + + - name: Install choosenim + run: | + export CHOOSENIM_CHOOSE_VERSION="${{ matrix.nim-version }}" + curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh + sh init.sh -y + export PATH=$HOME/.nimble/bin:$PATH + nimble refresh -y + + - name: Run tests + run: | + export PATH=$HOME/.nimble/bin:$PATH + export MOZ_HEADLESS=1 + nimble -y --mm:refc install + nimble -y test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fe26a8a --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# Wildcard patterns. +*.swp +nimcache/ +*.db* + +# Specific paths +/createdb +/forum +/nimforum.db + +# Binaries +forum +createdb +editdb + +.vscode +forum.json* +browsertester +setup_nimforum +buildcss +nimforum.css + +/src/frontend/forum.js diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6ea9ea9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "frontend/spectre"] + path = frontend/spectre + url = https://github.com/picturepan2/spectre +[submodule "public/css/spectre"] + path = public/css/spectre + url = https://github.com/picturepan2/spectre diff --git a/README.md b/README.md new file mode 100644 index 0000000..2681f85 --- /dev/null +++ b/README.md @@ -0,0 +1,115 @@ +# nimforum + +NimForum is a light-weight forum implementation with many similarities to Discourse. It is implemented in the [Nim](https://nim-lang.org) programming language. + +**This fork uses [BaraDB](https://github.com/yourusername/baradb) instead of SQLite.** BaraDB is a custom database engine that communicates via a TCP wire protocol. The forum connects to a running BaraDB server instead of opening a local SQLite file. + +## Architecture + +``` +┌─────────────┐ HTTP ┌─────────────┐ TCP ┌─────────────┐ +│ Browser │ ◄─────────────► │ nimforum │ ◄────────────► │ BaraDB │ +│ │ │ (Jester) │ (wire proto) │ Server │ +└─────────────┘ └─────────────┘ └─────────────┘ + │ + ▼ + ┌─────────────┐ + │ public/ │ + │ (JS, CSS) │ + └─────────────┘ +``` + +## Why BaraDB? + +This project was created to test and validate BaraDB's SQL compatibility and wire protocol. Running a real-world application like NimForum against BaraDB surfaced many practical issues (reserved keywords, type conversions, async protocol safety) that unit tests alone would not catch. + +## Changes from upstream + +| Area | Upstream | This fork | +|------|----------|-----------| +| Database | SQLite (file) | BaraDB (TCP server) | +| DB driver | `db_connector/db_sqlite` | `baradb_sqlite.nim` (drop-in adapter) | +| Keywords | `status`, `key`, `like` | Renamed to `usrStatus`, `sessionKey`, `postLike` | +| Date/time | `DATETIME('now')` | `NOW()` | +| FTS search | SQLite FTS4 | Disabled (returns empty) | +| HTTP backend | httpbeast (multi-threaded) | asynchttpserver (single-threaded)* | + +\* *Switched to `asynchttpserver` via `-d:useStdLib` because httpbeast's worker threads share the global `db` ref, causing GC corruption and segfaults at startup.* + +## Requirements + +* Nim >= 2.0 +* Nimble +* libsass / libsass-dev (for SCSS compilation) +* A running BaraDB server (see below) + +## Quick start + +### 1. Start BaraDB + +```bash +cd ../Baradb +BARADB_JWT_SECRET=test nimble build_debug +BARADB_JWT_SECRET=test ./build/baradadb +``` + +The server listens on `127.0.0.1:9472` by default. + +### 2. Build and run the forum + +```bash +cd nimforum + +git submodule update --init --recursive + +# Build CSS and frontend JS +nimble frontend + +# Create development database (admin/admin) +nimble devdb + +# Compile and run backend +nimble backend +``` + +The forum will be available at `http://localhost:5000`. + +### Build tasks + +```bash +nimble backend # Compile & run the forum backend +nimble runbackend # Run the compiled backend +nimble frontend # Build CSS + JS frontend assets +nimble devdb # Create a dev database with seed data +nimble testdb # Create a test database +nimble blankdb # Create an empty database +``` + +## Project layout + +``` +nimforum/ +├── src/ +│ ├── forum.nim # Main Jester backend +│ ├── baradb_client.nim # BaraDB wire-protocol client +│ ├── baradb_sqlite.nim # Drop-in db_sqlite adapter +│ ├── setup_nimforum.nim # DB initialization script +│ └── frontend/ # Karax SPA sources +├── public/ +│ ├── js/forum.js # Compiled frontend (generated) +│ ├── css/ # Compiled SASS + Spectre +│ └── images/ +├── Baradb/ # BaraDB source (sibling directory) +└── nimforum.nimble +``` + +## Known issues / limitations + +* **FTS search disabled** — BaraDB does not support SQLite FTS4 virtual tables. The search endpoint returns empty results. +* **No `COLLATE NOCASE`** — Some string comparisons may be case-sensitive where the original was not. +* **Manual `nextId()`** — Auto-increment is simulated with `SELECT COALESCE(MAX(id),0)+1`, which is not atomic under high concurrency. +* **Single-threaded HTTP** — Due to the global `db` ref holding async TCP state, the forum runs on a single async thread. For a busy site you would need per-request DB connections or a connection pool. + +## License + +MIT — see upstream [nimforum](https://github.com/nim-lang/nimforum) for original copyright. diff --git a/config.nims b/config.nims new file mode 100644 index 0000000..8ee48d2 --- /dev/null +++ b/config.nims @@ -0,0 +1,4 @@ +# begin Nimble config (version 2) +when withDir(thisDir(), system.fileExists("nimble.paths")): + include "nimble.paths" +# end Nimble config diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..4e5ca01 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,14 @@ +FROM nimlang/nim:1.6.4-ubuntu + +RUN apt-get update -yqq \ + && apt-get install -y --no-install-recommends \ + libsass-dev \ + sqlite3 \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app +COPY . /app + +# install dependencies +RUN nimble install -Y diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine new file mode 100644 index 0000000..5d78f5f --- /dev/null +++ b/docker/Dockerfile.alpine @@ -0,0 +1,9 @@ +FROM nimlang/nim:1.6.4-alpine + +RUN apk --no-cache add libsass-dev sqlite3 libsass + +WORKDIR /app +COPY . /app + +# install dependencies +RUN nimble install -Y diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..8657235 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3.7" + +services: + forum: + build: + context: ../ + dockerfile: ./docker/Dockerfile + volumes: + - "../:/app" + ports: + - "5000:5000" + entrypoint: "/app/docker/entrypoint.sh" diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100755 index 0000000..d8f5923 --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -eu + +git submodule update --init --recursive + +# setup +nimble c -d:release src/setup_nimforum.nim +./src/setup_nimforum --dev + +# build frontend +nimble c -r src/buildcss +nimble js -d:release src/frontend/forum.nim +mkdir -p public/js +cp src/frontend/forum.js public/js/forum.js + +# build backend +nimble c src/forum.nim +./src/forum diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..3eb168b --- /dev/null +++ b/license.txt @@ -0,0 +1,18 @@ +Copyright (C) 2018 Andreas Rumpf, Dominik Picheta + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/localhost.local/public/css/custom-style.scss b/localhost.local/public/css/custom-style.scss new file mode 100644 index 0000000..6c9e50c --- /dev/null +++ b/localhost.local/public/css/custom-style.scss @@ -0,0 +1,16 @@ +// Use this to customise the styles of your forum. +$primary-color: #6577ac; +$body-font-color: #292929; +$dark-color: #505050; +$label-color: #7cd2ff; +$secondary-btn-color: #f1f1f1; + +// Define nav bar colours. +$body-bg: #ffffff; +$navbar-color: $body-bg; +$navbar-border-color-dark: $body-bg; +$navbar-primary-color: #e80080; + +#main-navbar input#search-box { + border: 1px solid #e6e6e6; +} \ No newline at end of file diff --git a/localhost.local/public/images/logo.png b/localhost.local/public/images/logo.png new file mode 100644 index 0000000..4ac52b7 Binary files /dev/null and b/localhost.local/public/images/logo.png differ diff --git a/mockup/index.html b/mockup/index.html new file mode 100644 index 0000000..b836674 --- /dev/null +++ b/mockup/index.html @@ -0,0 +1,151 @@ + + + + + + + + + The Nim programming language forum + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TopicCategoryUsersRepliesViewsActivity
Few mixed up questions
help
+
+ +
+
+ +
+
+
+
+
+
+
+
554745m
Lexers and parsers in Nim
community
+
+
+
01444m
I need help 2
help
+
+ +
+
+ +
+
+
+
41d
+ + last visit + +
Nim v1.0 is here!
announcement
+
+ +
+
+ +
+
44d
+ + load more threads + +
+
+ + + + \ No newline at end of file diff --git a/mockup/thread.html b/mockup/thread.html new file mode 100644 index 0000000..298bb80 --- /dev/null +++ b/mockup/thread.html @@ -0,0 +1,232 @@ + + + + + + + + + The Nim programming language forum + + + + + + + + + +
+
+

Lexers and parsers in nim

+
community +
+
+
+
+
+ Avatar +
+
+
+
+
+ ErikCampobadal +
+
Jan 2015
+
+
+

Hey! I'm willing to create a programming language using nim.

+ +

It's an educational project. Been reading about compilers for weeks now and I started using tools like flex and bison for lexer and parser. I know nim have a parsing library but nowhere near that level.

+ +

There is an old post (2014) with a similar question so I'm bringing that back a few years later. Is there anything anyone know that could speed up the process of developing a programing language using nim? (I can have c code if needed ofc)

+
+
+ +
+ +
+
+ +
+
+
+
+ +
+
+
+ Avatar +
+
+
+
+
+ twetzel59 +
+
Jan 2015
+
+
+

Wow, I was just reading about the compilation pipeline today!

+ +

I suppose you could use at least the lexing part from a generator like flex, not so sure about using AST generators easily (it's possible).

+ +

Is your language complicated enough to warrant a parser generator or could you just use a custom parser?

+
+
+ +
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+ 3 years later +
+
+
+ +
+
+
+ Avatar +
+
+
+
+
+ dom96 +
+
32m
+
+
+

Let us test this new design a bit, shall we?

+
proc hello(x: int) =
+  echo("Hello ", x)
+
+42.hello()
Output
Hello 42
+ +

The greatest function ever written is hello.

+
+

Designing websites is often a pain.

+
Multi-level baby!
+

True that.

+

I also want to be able to support more detailed quoting:

+
+
+
+ Avatar +
+ Araq: + +
+ Unix is a cancer. +
+

We also want to be able to highlight user mentions:

+

Please let + + @Araq + + know that this forum is awesome.

+
+
+ +
+ +
+
+ +
+
+
+
+ + + +
+
+ +
+
+
+ Replying to "Lexers and parsers in nim" +
+
+ +
+
+
+ +
+
+ + + + \ No newline at end of file diff --git a/nimble.paths b/nimble.paths new file mode 100644 index 0000000..8a60bcc --- /dev/null +++ b/nimble.paths @@ -0,0 +1,18 @@ +--noNimblePath +--path:"/home/ziko/.nimble/pkgs2/httpbeast-0.4.1-b23e57a401057dcb9b7fae1fb8279a6a2ce1d0b8" +--path:"/home/ziko/z-git/nimforurm/OLD/src" +--path:"/home/ziko/.nimble/pkgs2/hmac-0.1.5-e10a18fe2b88ac8f052d03d3f0896a2dd6fbb3d2" +--path:"/home/ziko/.nimble/pkgs2/checksums-0.2.1-d3c7a1d0c0dee8fa089bd7f4d474e005877b608a" +--path:"/home/ziko/.nimble/pkgs2/smtp-0.1.0-0459b084964aa8abd2c1f8119ebdd3d64665001e" +--path:"/home/ziko/.nimble/pkgs2/ws-0.5.0-ae4daf4ae302d0431f3c2d385ae9d2fe767a3246" +--path:"/home/ziko/.nimble/pkgs2/asynctools-0.1.1-54314dceabb06b20908ecb0f2c007e9ff3aaa054" +--path:"/home/ziko/.nimble/pkgs2/nimSHA2-0.1.1-6765d9a04c328c64eb56b3fa90f45690294cc8fd" +--path:"/home/ziko/.nimble/pkgs2/sha1-1.1-2610d27cf248adf98fd9b86e906eb87781ba9d8c" +--path:"/home/ziko/.nimble/pkgs2/dotenv-2.0.2-1e70fc63c286ca3da7592d61dbe501fcea35bc72" +--path:"/home/ziko/.nimble/pkgs2/bcrypt-0.2.1-5d8719a26c03137b6c38dbf13e9a102b985f8d18" +--path:"/home/ziko/.nimble/pkgs2/db_connector-0.1.0-4f2e67d0e4b61af9ac5575509305660b473f01a4" +--path:"/home/ziko/.nimble/pkgs2/recaptcha-1.0.3-3c546c0c85dd0280b22db13cacc7d6eafed28d86/src" +--path:"/home/ziko/.nimble/pkgs2/webdriver-0.2.0-ae36fdd5d717345006969a795f421147d8ff1883/src" +--path:"/home/ziko/.nimble/pkgs2/karax-1.2.2-811f1a29038c95b2438609a474be6fbd3bdc217c" +--path:"/home/ziko/.nimble/pkgs2/jester-0.4.3-57773c731761f05eefa87259f19952d068de93e3" +--path:"/home/ziko/.nimble/pkgs2/sass-0.1.0-c71feb4a550644f9c1b4a84cced99d714bbc7de7/src" diff --git a/nimforum.nimble b/nimforum.nimble new file mode 100644 index 0000000..7e56d43 --- /dev/null +++ b/nimforum.nimble @@ -0,0 +1,70 @@ +# Package +version = "2.6.0" +author = "Dominik Picheta" +description = "The Nim forum" +license = "MIT" + +srcDir = "src" + +bin = @["forum"] + +skipExt = @["nim"] + +# Dependencies + +requires "nim >= 1.0.6" +requires "httpbeast >= 0.4.0" +requires "jester#405be2e" +requires "bcrypt#440c5676ff6" +requires "hmac#9c61ebe2fd134cf97" +requires "recaptcha#d06488e" +requires "sass#649e0701fa5c" +requires "checksums#f8f6bd3" + +requires "karax#45bac6b" + +requires "webdriver#c5e4182" + +when NimMajor > 1: + requires "db_connector >= 0.1.0" + requires "smtp >= 0.1.0" + +# Tasks + +task backend, "Compiles and runs the forum backend": + exec "nimble c --mm:refc src/forum.nim" + exec "./src/forum" + +task runbackend, "Runs the forum backend": + exec "./src/forum" + +task testbackend, "Runs the forum backend in test mode": + exec "nimble c -r --mm:refc -d:skipRateLimitCheck src/forum.nim" + +task frontend, "Builds the necessary JS frontend (with CSS)": + exec "nimble c -r --mm:refc src/buildcss" + exec "nimble js -d:release src/frontend/forum.nim" + mkDir "public/js" + cpFile "src/frontend/forum.js", "public/js/forum.js" + +task minify, "Minifies the JS using Google's closure compiler": + exec "closure-compiler public/js/forum.js --js_output_file public/js/forum.js.opt" + +task testdb, "Creates a test DB (with admin account!)": + exec "nimble c src/setup_nimforum" + exec "./src/setup_nimforum --test" + +task devdb, "Creates a test DB (with admin account!)": + exec "nimble c src/setup_nimforum" + exec "./src/setup_nimforum --dev" + +task blankdb, "Creates a blank DB": + exec "nimble c src/setup_nimforum" + exec "./src/setup_nimforum --blank" + +task test, "Runs tester": + exec "nimble c -y --mm:refc src/forum.nim" + exec "nimble c -y -r -d:actionDelayMs=0 tests/browsertester" + +task fasttest, "Runs tester without recompiling backend": + exec "nimble c -r -d:actionDelayMs=0 tests/browsertester" diff --git a/public/css/nimforum.scss b/public/css/nimforum.scss new file mode 100644 index 0000000..535d6ee --- /dev/null +++ b/public/css/nimforum.scss @@ -0,0 +1,781 @@ +@import "custom-style"; + +// Import full Spectre source code +@import "spectre/src/spectre"; + +// Global styles. +// - TODO: Make these non-global. +.btn, .form-input { + margin-right: $control-padding-x; +} + +table th { + font-size: 0.65rem; +} + +// Spectre fixes. +// - Weird avatar outline. +.avatar { + background: transparent; +} + +// Custom styles. +// - Navigation bar. +$navbar-height: 60px; +$default-category-color: #a3a3a3; +$logo-height: $navbar-height - 20px; + +.navbar-button { + border-color: $navbar-border-color-dark; + background-color: $navbar-primary-color; + color: $navbar-color; + + &:focus { + box-shadow: none; + } + + &:hover { + background-color: darken($navbar-primary-color, 20%); + color: $navbar-color; + border-color: $navbar-border-color-dark; + } +} + +#main-navbar { + background-color: $navbar-color; + + .navbar { + height: $navbar-height; + } + + // Unfortunately we must colour the controls in the navbar manually. + .search-input { + @extend .form-input; + min-width: 120px; + border-color: $navbar-border-color-dark; + } + + .search-input:focus { + box-shadow: none; + border-color: $navbar-border-color-dark; + } + + .btn-primary { + @extend .navbar-button; + } + +} + +#img-logo { + vertical-align: middle; + height: $logo-height; +} + +.menu-right { + // To make sure the user menu doesn't move off the screen. + @media (max-width: 1600px) { + left: auto; + right: 0; + } + position: absolute; +} + +// - Main buttons +.btn-secondary { + background: $secondary-btn-color; + border-color: darken($secondary-btn-color, 5%); + color: invert($secondary-btn-color); + + margin-right: $control-padding-x*2; + + &:hover, &:focus { + background: darken($secondary-btn-color, 5%); + border-color: darken($secondary-btn-color, 10%); + + color: invert($secondary-btn-color); + } + + &:focus { + @include control-shadow(darken($secondary-btn-color, 40%)); + } +} + +#main-buttons { + margin-top: $control-padding-y*2; + margin-bottom: $control-padding-y*2; + + .dropdown > .btn { + @extend .btn-secondary; + } +} + +#category-selection { + .dropdown { + .btn { + margin-right: 0px; + } + } + .plus-btn { + margin-right: 0px; + i { + margin-right: 0px; + } + } +} + +.category-description { + opacity: 0.6; + font-size: small; +} + +.category-status { + font-size: small; + font-weight: bold; + + .topic-count { + margin-left: 5px; + opacity: 0.7; + font-size: small; + } +} + +.category { + white-space: nowrap; +} + +#new-thread { + .modal-container .modal-body { + max-height: none; + } + + .panel-body { + padding-top: $control-padding-y*2; + padding-bottom: $control-padding-y*2; + } + + .form-input[name='subject'] { + margin-bottom: $control-padding-y*2; + } + + textarea.form-input, .panel-body > div { + min-height: 40vh; + } + + .footer { + float: right; + margin-top: $control-padding-y*2; + } +} + +// - Thread table +.thread-title { + a, a:hover { + color: $body-font-color; + text-decoration: none; + } + + a.visited, a:visited { + color: lighten($body-font-color, 40%); + } + + i { + // Icon + margin-right: $control-padding-x-sm; + } +} + +.thread-list { + @extend .container; + @extend .grid-xl; +} + +.category-list { + @extend .thread-list; + + + .category-title { + @extend .thread-title; + a, a:hover { + color: lighten($body-font-color, 10%); + text-decoration: none; + } + } + + .category-description { + opacity: 0.6; + } +} + +#categories-list .category { + border-left: 6px solid; + border-left-color: $default-category-color; +} + +$super-popular-color: #f86713; +$popular-color: darken($super-popular-color, 25%); +$threads-meta-color: #545d70; + +.super-popular-text { + color: $super-popular-color; +} + +.popular-text { + color: $popular-color; +} + +.views-text { + color: $threads-meta-color; +} + +.label-custom { + color: white; + background-color: $label-color; + + font-size: 0.6rem; + padding-left: 0.3rem; + padding-right: 0.3rem; + border-radius: 5rem; +} + +.last-visit-separator { + td { + border-bottom: 1px solid $super-popular-color; + line-height: 0.1rem; + padding: 0; + text-align: center; + } + + span { + color: $super-popular-color; + padding: 0 8px; + font-size: 0.7rem; + background-color: $body-bg; + } +} + +.no-border { + td { + border: none; + } +} + +.category-color { + width: 0; + height: 0; + border: 0.25rem solid $default-category-color; + display: inline-block; + margin-right: 5px; +} + +.load-more-separator { + text-align: center; + color: darken($label-color, 35%); + background-color: lighten($label-color, 15%); + text-transform: uppercase; + font-weight: bold; + font-size: 80%; + cursor: pointer; + + td { + border: none; + padding: $control-padding-x $control-padding-y/2; + } +} + +// - Thread view +.title { + margin-top: $control-padding-y*2; + margin-bottom: $control-padding-y*2; + + p { + font-size: 1.4rem; + font-weight: bold; + + color: darken($dark-color, 20%); + + margin: 0; + } + + i.fas { + margin-right: $control-padding-x-sm; + } +} + +.thread-replies, .thread-time, .views-text, .popular-text, .super-popular-text, .centered-header { + text-align: center; +} + +.thread-users { + text-align: left; +} + +.thread-time { + color: $threads-meta-color; + + &.is-new { + @extend .text-success; + } + + &.is-old { + @extend .text-gray; + } + +} + +// Hide all the avatars but the first on small screens. +@media screen and (max-width: 600px) { + #threads-list a:not(:first-child) > .avatar { + display: none; + } +} + +.posts, .about { + @extend .grid-md; + @extend .container; + margin: 0; + padding: 0; + + margin-bottom: 10rem; // Just some empty space at the bottom. +} + +.post { + @extend .tile; + border-top: 1px solid $border-color; + padding-top: $control-padding-y-lg; + + &:target .post-main, &.highlight .post-main { + animation: highlight 2000ms ease-out; + } +} + +@keyframes highlight { + 0% { + background-color: lighten($primary-color, 20%); + } + 100% { + background-color: inherit; + } +} + +.post-icon { + @extend .tile-icon; +} + +.post-avatar { + @extend .avatar; + font-size: 1.6rem; + height: 2.5rem; + width: 2.5rem; +} + +.post-main { + @extend .tile-content; + + margin-bottom: $control-padding-y-lg*2; + // https://stackoverflow.com/a/41675912/492186 + flex: 1; + min-width: 0; +} + +.post-title { + margin-bottom: $control-padding-y*2; + + &, a, a:visited, a:hover { + color: lighten($body-font-color, 20%); + text-decoration: none; + } + + + .thread-title { + width: 100%; + + a > div { + display: inline-block; + } + } + + .post-username { + font-weight: bold; + display: inline-block; + + i { + margin-left: $control-padding-x; + } + } + + .post-metadata { + float: right; + + .post-replyingTo { + display: inline-block; + margin-right: $control-padding-x; + + i.fa-reply { + transform: rotate(180deg); + } + } + + .post-history { + display: inline-block; + margin-right: $control-padding-x; + + i { + font-size: 90%; + } + + .edit-count { + margin-right: $control-padding-x-sm/2; + } + } + } +} + +.post-content, .about { + img { + max-width: 100%; + } +} + +.post-buttons { + float: right; + + > div { + display: inline-block; + } + + .btn { + background: transparent; + border-color: transparent; + color: darken($secondary-btn-color, 40%); + + margin: 0; + margin-left: $control-padding-y-sm; + } + + .btn:hover { + background: $secondary-btn-color; + border-color: darken($secondary-btn-color, 5%); + color: invert($secondary-btn-color); + } + + .btn:focus { + @include control-shadow(darken($secondary-btn-color, 50%)); + } + + .btn:active { + box-shadow: inset 0 0 .4rem .01rem darken($secondary-btn-color, 80%); + } + + .like-button i:hover, .like-button i.fas { + color: #f783ac; + } + + .like-count { + margin-right: $control-padding-x-sm; + } +} + +#thread-buttons { + border-top: 1px solid $border-color; + width: 100%; + padding-top: $control-padding-y; + padding-bottom: $control-padding-y; + @extend .clearfix; + + .btn { + float: right; + margin-right: 0; + margin-left: $control-padding-x; + } +} + +blockquote { + border-left: 0.2rem solid darken($bg-color, 10%); + background-color: $bg-color; + + .detail { + margin-bottom: $control-padding-y; + color: lighten($body-font-color, 20%); + } +} + +.quote-avatar { + @extend .avatar; + @extend .avatar-sm; +} + +.quote-link { + float: right; +} + +.user-mention { + @extend .chip; + vertical-align: initial; + font-weight: bold; + display: inline-block; + font-size: 85%; + height: inherit; + padding: 0.08rem 0.4rem; + background-color: darken($bg-color-dark, 5%); + + img { + @extend .avatar; + @extend .avatar-sm; + } +} + +.code-buttons { + position: absolute; + bottom: 0; + right: 0; + + .btn-primary { + margin-bottom: $control-padding-y; + } +} + +.execution-result { + @extend .toast; + + h6 { + font-family: $base-font-family; + } +} + +.execution-success { + @extend .toast-success; +} + +.code { + // Don't show the "none". + &[data-lang="none"]::before { + content: ""; + } + + // &:not([data-lang="Nim"]) > .code-buttons { + // display: none; + // } +} +.code-buttons { + display: none; +} + +.post-content { + pre:not(.code) { + overflow: scroll; + } +} + +.information { + @extend .tile; + border-top: 1px solid $border-color; + padding-top: $control-padding-y-lg*2; + padding-bottom: $control-padding-y-lg*2; + color: lighten($body-font-color, 20%); + .information-title { + font-weight: bold; + } + + &.no-border { + border: none; + } +} + +.information-icon { + @extend .tile-icon; + + i { + width: $unit-16; + text-align: center; + font-size: 1rem; + + } +} + +.time-passed { + text-transform: uppercase; +} + +.load-more-posts { + text-align: center; + color: darken($label-color, 35%); + background-color: lighten($label-color, 15%); + border: none; + text-transform: uppercase; + font-weight: bold; + cursor: pointer; + + .information-main { + width: 100%; + text-align: left; + } + + .more-post-count { + color: rgba(darken($label-color, 35%), 0.5); + margin-right: $control-padding-x*2; + float: right; + } +} + +.form-input.post-text-area { + margin-top: $control-padding-y*2; + resize: vertical; +} + +#reply-box { + .panel { + margin-top: $control-padding-y*2; + } +} + +code { + color: $body-font-color; + background-color: $bg-color; +} + +tt { + @extend code; +} + +hr { + background: $border-color; + height: $border-width; + margin: $unit-2 0; + border: 0; +} + +.edit-box { + .edit-buttons { + margin-top: $control-padding-y*2; + + float: right; + + > div { + display: inline-block; + } + } + + .text-error { + margin-top: $control-padding-y*3; + display: inline-block; + } + + .form-input.post-text-area { + margin-bottom: $control-padding-y*2; + } +} + +@import "syntax.scss"; + +// - Profile view + +.profile { + @extend .tile; + margin-top: $control-padding-y*5; +} + +.profile-icon { + @extend .tile-icon; + margin-right: $control-padding-x; +} + +.profile-avatar { + @extend .avatar; + @extend .avatar-xl; + + height: 6.2rem; + width: 6.2rem; +} + +.profile-content { + @extend .tile-content; + padding: $control-padding-x $control-padding-y; +} + +.profile-title { + @extend .tile-title; +} + +.profile-stats { + dl { + border-top: 1px solid $border-color; + border-bottom: 1px solid $border-color; + padding: $control-padding-x $control-padding-y; + } + + dt { + font-weight: normal; + color: lighten($dark-color, 15%); + } + + dt, dd { + display: inline-block; + margin: 0; + margin-right: $control-padding-x; + } + + dd { + margin-right: $control-padding-x-lg; + } +} + +.profile-tabs { + margin-bottom: $control-padding-y-lg*2; +} + +.profile-post { + @extend .post; + + .profile-post-main { + flex: 1; + } + + .profile-post-time { + float: right; + } +} + +.spoiler { + text-shadow: gray 0px 0px 15px; + color: transparent; + -moz-user-select: none; + user-select: none; + cursor: normal; + + &:hover, &:focus { + text-shadow: $body-font-color 0px 0px 0px; + } +} + +.profile-post-title { + @extend .thread-title; +} + +// - Sign up modal + +#signup-modal { + .modal-container .modal-body { + max-height: 60vh; + } +} + +.license-text { + text-align: left; + font-size: 80%; +} + +// - Reset password +#resetpassword { + @extend .grid-sm; + @extend .container; + + .form-input { + display: inline-block; + width: 15rem; + margin-bottom: $control-padding-y*2; + } + + .footer { + margin-top: $control-padding-y*2; + } +} diff --git a/public/css/spectre b/public/css/spectre new file mode 160000 index 0000000..8847251 --- /dev/null +++ b/public/css/spectre @@ -0,0 +1 @@ +Subproject commit 8847251d71b4dac27e8407cbdb71ae89ce156a43 diff --git a/public/css/syntax.scss b/public/css/syntax.scss new file mode 100644 index 0000000..14dfa49 --- /dev/null +++ b/public/css/syntax.scss @@ -0,0 +1,13 @@ +pre .Comment { color:#618f0b; font-style:italic; } +pre .Keyword { color:rgb(39, 141, 182); font-weight:bold; } +pre .Type { color:#128B7D; font-weight:bold; } +pre .Operator { font-weight: bold; } +pre .atr { color:#128B7D; font-weight:bold; font-style:italic; } +pre .def { color:#CAD6E4; font-weight:bold; font-style:italic; } +pre .StringLit { color:rgb(190, 15, 15); font-weight:bold; } +pre .DecNumber, pre .FloatNumber { color:#8AB647; } +pre .tab { border-left:1px dotted rgba(67,168,207,0.4); } +pre .EscapeSequence +{ + color: #C08D12; +} \ No newline at end of file diff --git a/public/images/favicon.png b/public/images/favicon.png new file mode 100644 index 0000000..d7ff9db Binary files /dev/null and b/public/images/favicon.png differ diff --git a/public/images/logo.png b/public/images/logo.png new file mode 120000 index 0000000..c6f6792 --- /dev/null +++ b/public/images/logo.png @@ -0,0 +1 @@ +../../localhost.local/public/images/logo.png \ No newline at end of file diff --git a/public/js/forum.js b/public/js/forum.js new file mode 100644 index 0000000..c47d985 --- /dev/null +++ b/public/js/forum.js @@ -0,0 +1,17908 @@ +/* Generated by the Nim Compiler v2.2.10 */ +var framePtr = null; +var excHandler = 0; +var lastJSError = null; +var NTI2415919203 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2415919425 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2214592670 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2399142003 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2113929783 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2147484076 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2147483841 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2147483996 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2130706523 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2130706825 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2130706662 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2063598914 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2063599046 = {size: 0, kind: 16, base: null, node: null, finalizer: null}; +var NTI2063599143 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI134217753 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI2164261095 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2164261025 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2332033511 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2332033500 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2147483748 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2315256278 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2315256262 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI33555189 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1828716618 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1828716610 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI2147483652 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2147483651 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI2164260867 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI2164260873 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI2164260872 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI2164260871 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI2164260870 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2164260868 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI2332033028 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2332033027 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI2315255834 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2315255820 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2097152099 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2097152098 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2097152097 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2315256102 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2348810274 = {size: 0, kind: 16, base: null, node: null, finalizer: null}; +var NTI2348810529 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2130706716 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2113929572 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2113929729 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2113929229 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2113929392 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2113929616 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2113929601 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1627391017 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1593835826 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1627389977 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1627389955 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1627390125 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1627389982 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI1627389962 = {size: 0, kind: 20, base: null, node: null, finalizer: null}; +var NTI1627390013 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1627390012 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1627390011 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1627389976 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1627389999 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI1627389966 = {size: 0, kind: 20, base: null, node: null, finalizer: null}; +var NTI1627389956 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1627389987 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI1627389963 = {size: 0, kind: 20, base: null, node: null, finalizer: null}; +var NTI1627389991 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI1627389964 = {size: 0, kind: 20, base: null, node: null, finalizer: null}; +var NTI1627389995 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI1627389965 = {size: 0, kind: 20, base: null, node: null, finalizer: null}; +var NTI1627389971 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1627390245 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1627390007 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI1627389968 = {size: 0, kind: 20, base: null, node: null, finalizer: null}; +var NTI1593835762 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1593835751 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1593835744 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1593835702 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1593836311 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1593836432 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2382364745 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1962934322 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1962934402 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1996488970 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI956301382 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI637534265 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI637534264 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1577058465 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1577058462 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1577058459 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1577058307 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1577058308 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1577058320 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2281701556 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2281701480 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2214592875 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2214592776 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2197815469 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1946157215 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2197815406 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1476395011 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI2298478645 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1409286435 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2181038390 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2181038344 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2181038435 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2415919116 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2415919121 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2415919107 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI2415919108 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2415919133 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2415919159 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1325400233 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI2181038306 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1627389972 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2181038097 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2097152105 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2181038083 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2181038135 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1627389970 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1627390003 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI1627389967 = {size: 0, kind: 20, base: null, node: null, finalizer: null}; +var NTI2063598374 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1761607688 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI33555185 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI134217746 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI134217747 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI2063598283 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI33554444 = {size: 0,kind: 44,base: null,node: null,finalizer: null}; +var NTI889192800 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1375731719 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1375731717 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1375731718 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2063598432 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1644167189 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI33554445 = {size: 0,kind: 36,base: null,node: null,finalizer: null}; +var NTI184549379 = {size: 0,kind: 35,base: null,node: null,finalizer: null}; +var NTI1644167173 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1644167172 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI889192451 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI1644167188 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1644167185 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1644167182 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1644167171 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI134217750 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI2113929478 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2130706757 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2063597582 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1929379857 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2097152005 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2097152015 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2097152009 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2097152003 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2097152008 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2097152007 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2097152006 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2097152004 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI2063597574 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2063597573 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI2063597572 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI2063597571 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI2063597636 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI134217742 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI771751959 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1845493770 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400157 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400156 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400155 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400154 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400153 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400152 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400151 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400150 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400149 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400148 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400147 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400146 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400145 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400144 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400143 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400142 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400141 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400140 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400139 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400138 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400137 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400136 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400135 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400134 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400133 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400206 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400094 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400253 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400250 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1325400249 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1325400129 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400252 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1325400130 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400199 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400088 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400188 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400200 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400089 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400187 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400186 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400205 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400093 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400185 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400184 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400201 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400090 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400183 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400191 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400202 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400091 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400190 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400204 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400203 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400092 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400175 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400078 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400189 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400082 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400182 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400081 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1325400079 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1325400181 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400180 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400179 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1325400178 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1325400080 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1476395061 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1476395060 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1409286257 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1409286256 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1409286150 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1409286246 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1409286242 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1409286249 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1409286248 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1409286147 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI1409286247 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1409286244 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1409286255 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1409286254 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1409286253 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1409286252 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1409286251 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1409286250 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1845493769 = {size: 0,kind: 25,base: null,node: null,finalizer: null}; +var NTI1996488708 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1996488707 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI822083617 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI822083613 = {size: 0, kind: 20, base: null, node: null, finalizer: null}; +var NTI1979711492 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI1946157155 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1946157060 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1946157059 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1996488915 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1979711498 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1845493768 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1845493767 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1845493764 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1979711941 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1593835537 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1593835525 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI33554466 = {size: 0,kind: 1,base: null,node: null,finalizer: null}; +var NTI1929379843 = {size: 0, kind: 14, base: null, node: null, finalizer: null}; +var NTI33554439 = {size: 0,kind: 35,base: null,node: null,finalizer: null}; +var NTI1929379844 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1845493763 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1593835523 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1593835527 = {size: 0, kind: 24, base: null, node: null, finalizer: null}; +var NTI1593835526 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1593835524 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; +var NTI1593835573 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI1962934276 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI33554435 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI1107296277 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; +var NTI1107296286 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; +var NTI134217751 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; +var NTI134217745 = {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 NTI1862271053 = {size: 0, kind: 18, 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 NNI1862271053 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554449, name: "Field1", sons: null}]}; +NTI1862271053.node = NNI1862271053; +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 NNI134217745 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI134217745.node = NNI134217745; +NTI134217745.base = NTI33555184; +var NNI134217751 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI134217751.node = NNI134217751; +NTI134217751.base = NTI33555184; +var NNI1107296286 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI1107296277, name: "a", sons: null}, +{kind: 1, offset: "b", len: 0, typ: NTI33554435, name: "b", sons: null}]}; +NTI1107296286.node = NNI1107296286; +var NNI1962934276 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554449, name: "Field1", sons: null}, +{kind: 1, offset: "Field2", len: 0, typ: NTI33554449, name: "Field2", sons: null}]}; +NTI1962934276.node = NNI1962934276; +var NNI1845493763 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "id", len: 0, typ: NTI33554435, name: "id", sons: null}, +{kind: 1, offset: "name", len: 0, typ: NTI33554449, name: "name", sons: null}, +{kind: 1, offset: "description", len: 0, typ: NTI33554449, name: "description", sons: null}, +{kind: 1, offset: "color", len: 0, typ: NTI33554449, name: "color", sons: null}, +{kind: 1, offset: "numTopics", len: 0, typ: NTI33554435, name: "numTopics", sons: null}]}; +NTI1845493763.node = NNI1845493763; +var NNI1929379843 = {kind: 2, offset: 0, typ: null, name: null, len: 9, sons: {"0": {kind: 1, offset: 0, typ: NTI1929379843, name: "AutoSpammer", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1929379843, name: "Spammer", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1929379843, name: "Moderated", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1929379843, name: "Troll", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1929379843, name: "Banned", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1929379843, name: "EmailUnconfirmed", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI1929379843, name: "User", len: 0, sons: null}, +"7": {kind: 1, offset: 7, typ: NTI1929379843, name: "Moderator", len: 0, sons: null}, +"8": {kind: 1, offset: 8, typ: NTI1929379843, name: "Admin", len: 0, sons: null}}}; +NTI1929379843.node = NNI1929379843; +var NNI1929379844 = {kind: 2, len: 7, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "id", len: 0, typ: NTI33554449, name: "id", sons: null}, +{kind: 1, offset: "name", len: 0, typ: NTI33554449, name: "name", sons: null}, +{kind: 1, offset: "avatarUrl", len: 0, typ: NTI33554449, name: "avatarUrl", sons: null}, +{kind: 1, offset: "lastOnline", len: 0, typ: NTI33554439, name: "lastOnline", sons: null}, +{kind: 1, offset: "previousVisitAt", len: 0, typ: NTI33554439, name: "previousVisitAt", sons: null}, +{kind: 1, offset: "rank", len: 0, typ: NTI1929379843, name: "rank", sons: null}, +{kind: 1, offset: "isDeleted", len: 0, typ: NTI33554466, name: "isDeleted", sons: null}]}; +NTI1929379844.node = NNI1929379844; +NTI1593835525.base = NTI1929379844; +var NNI1593835523 = {kind: 2, len: 12, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "id", len: 0, typ: NTI33554435, name: "id", sons: null}, +{kind: 1, offset: "topic", len: 0, typ: NTI33554449, name: "topic", sons: null}, +{kind: 1, offset: "category", len: 0, typ: NTI1845493763, name: "category", sons: null}, +{kind: 1, offset: "author", len: 0, typ: NTI1929379844, name: "author", sons: null}, +{kind: 1, offset: "users", len: 0, typ: NTI1593835525, name: "users", sons: null}, +{kind: 1, offset: "replies", len: 0, typ: NTI33554435, name: "replies", sons: null}, +{kind: 1, offset: "views", len: 0, typ: NTI33554435, name: "views", sons: null}, +{kind: 1, offset: "activity", len: 0, typ: NTI33554439, name: "activity", sons: null}, +{kind: 1, offset: "creation", len: 0, typ: NTI33554439, name: "creation", sons: null}, +{kind: 1, offset: "isLocked", len: 0, typ: NTI33554466, name: "isLocked", sons: null}, +{kind: 1, offset: "isSolved", len: 0, typ: NTI33554466, name: "isSolved", sons: null}, +{kind: 1, offset: "isPinned", len: 0, typ: NTI33554466, name: "isPinned", sons: null}]}; +NTI1593835523.node = NNI1593835523; +NTI1593835527.base = NTI1593835523; +var NNI1593835526 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "threads", len: 0, typ: NTI1593835527, name: "threads", sons: null}, +{kind: 1, offset: "moreCount", len: 0, typ: NTI33554435, name: "moreCount", sons: null}]}; +NTI1593835526.node = NNI1593835526; +NTI1593835524.base = NTI1593835526; +var NNI1593835573 = {kind: 1, offset: "val", len: 0, typ: NTI1593835524, name: "val", sons: null}; +NTI1593835573.node = NNI1593835573; +var NNI1593835537 = {kind: 1, offset: "val", len: 0, typ: NTI1593835524, name: "val", sons: null}; +NTI1593835537.node = NNI1593835537; +NTI1845493768.base = NTI1845493763; +var NNI1845493767 = {kind: 1, offset: "categories", len: 0, typ: NTI1845493768, name: "categories", sons: null}; +NTI1845493767.node = NNI1845493767; +NTI1845493764.base = NTI1845493767; +var NNI1979711941 = {kind: 1, offset: "val", len: 0, typ: NTI1845493764, name: "val", sons: null}; +NTI1979711941.node = NNI1979711941; +var NNI1979711498 = {kind: 1, offset: "val", len: 0, typ: NTI1845493764, name: "val", sons: null}; +NTI1979711498.node = NNI1979711498; +NTI1946157060.base = NTI33554449; +var NNI1946157059 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "errorFields", len: 0, typ: NTI1946157060, name: "errorFields", sons: null}, +{kind: 1, offset: "message", len: 0, typ: NTI33554449, name: "message", sons: null}]}; +NTI1946157059.node = NNI1946157059; +var NNI1996488915 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI1946157059, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI1996488915.node = NNI1996488915; +var NNI1946157155 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI1946157059, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI1946157155.node = NNI1946157155; +NTI822083613.base = NTI822083617; +var NNI1996488708 = {kind: 2, len: 4, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "modalShown", len: 0, typ: NTI33554466, name: "modalShown", sons: null}, +{kind: 1, offset: "loading", len: 0, typ: NTI33554466, name: "loading", sons: null}, +{kind: 1, offset: "error", len: 0, typ: NTI1946157155, name: "error", sons: null}, +{kind: 1, offset: "onAddCategory", len: 0, typ: NTI1845493769, name: "onAddCategory", sons: null}]}; +NTI1996488708.node = NNI1996488708; +var NNI1409286147 = {kind: 2, offset: 0, typ: null, name: null, len: 209, sons: {"0": {kind: 1, offset: 0, typ: NTI1409286147, name: "#text", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1409286147, name: "#int", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1409286147, name: "#bool", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1409286147, name: "#vthunk", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1409286147, name: "#dthunk", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1409286147, name: "#component", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI1409286147, name: "#verbatim", len: 0, sons: null}, +"7": {kind: 1, offset: 7, typ: NTI1409286147, name: "html", len: 0, sons: null}, +"8": {kind: 1, offset: 8, typ: NTI1409286147, name: "head", len: 0, sons: null}, +"9": {kind: 1, offset: 9, typ: NTI1409286147, name: "title", len: 0, sons: null}, +"10": {kind: 1, offset: 10, typ: NTI1409286147, name: "base", len: 0, sons: null}, +"11": {kind: 1, offset: 11, typ: NTI1409286147, name: "link", len: 0, sons: null}, +"12": {kind: 1, offset: 12, typ: NTI1409286147, name: "meta", len: 0, sons: null}, +"13": {kind: 1, offset: 13, typ: NTI1409286147, name: "style", len: 0, sons: null}, +"14": {kind: 1, offset: 14, typ: NTI1409286147, name: "script", len: 0, sons: null}, +"15": {kind: 1, offset: 15, typ: NTI1409286147, name: "noscript", len: 0, sons: null}, +"16": {kind: 1, offset: 16, typ: NTI1409286147, name: "body", len: 0, sons: null}, +"17": {kind: 1, offset: 17, typ: NTI1409286147, name: "section", len: 0, sons: null}, +"18": {kind: 1, offset: 18, typ: NTI1409286147, name: "nav", len: 0, sons: null}, +"19": {kind: 1, offset: 19, typ: NTI1409286147, name: "article", len: 0, sons: null}, +"20": {kind: 1, offset: 20, typ: NTI1409286147, name: "aside", len: 0, sons: null}, +"21": {kind: 1, offset: 21, typ: NTI1409286147, name: "h1", len: 0, sons: null}, +"22": {kind: 1, offset: 22, typ: NTI1409286147, name: "h2", len: 0, sons: null}, +"23": {kind: 1, offset: 23, typ: NTI1409286147, name: "h3", len: 0, sons: null}, +"24": {kind: 1, offset: 24, typ: NTI1409286147, name: "h4", len: 0, sons: null}, +"25": {kind: 1, offset: 25, typ: NTI1409286147, name: "h5", len: 0, sons: null}, +"26": {kind: 1, offset: 26, typ: NTI1409286147, name: "h6", len: 0, sons: null}, +"27": {kind: 1, offset: 27, typ: NTI1409286147, name: "hgroup", len: 0, sons: null}, +"28": {kind: 1, offset: 28, typ: NTI1409286147, name: "header", len: 0, sons: null}, +"29": {kind: 1, offset: 29, typ: NTI1409286147, name: "footer", len: 0, sons: null}, +"30": {kind: 1, offset: 30, typ: NTI1409286147, name: "address", len: 0, sons: null}, +"31": {kind: 1, offset: 31, typ: NTI1409286147, name: "main", len: 0, sons: null}, +"32": {kind: 1, offset: 32, typ: NTI1409286147, name: "p", len: 0, sons: null}, +"33": {kind: 1, offset: 33, typ: NTI1409286147, name: "hr", len: 0, sons: null}, +"34": {kind: 1, offset: 34, typ: NTI1409286147, name: "pre", len: 0, sons: null}, +"35": {kind: 1, offset: 35, typ: NTI1409286147, name: "blockquote", len: 0, sons: null}, +"36": {kind: 1, offset: 36, typ: NTI1409286147, name: "ol", len: 0, sons: null}, +"37": {kind: 1, offset: 37, typ: NTI1409286147, name: "ul", len: 0, sons: null}, +"38": {kind: 1, offset: 38, typ: NTI1409286147, name: "li", len: 0, sons: null}, +"39": {kind: 1, offset: 39, typ: NTI1409286147, name: "dl", len: 0, sons: null}, +"40": {kind: 1, offset: 40, typ: NTI1409286147, name: "dt", len: 0, sons: null}, +"41": {kind: 1, offset: 41, typ: NTI1409286147, name: "dd", len: 0, sons: null}, +"42": {kind: 1, offset: 42, typ: NTI1409286147, name: "figure", len: 0, sons: null}, +"43": {kind: 1, offset: 43, typ: NTI1409286147, name: "figcaption", len: 0, sons: null}, +"44": {kind: 1, offset: 44, typ: NTI1409286147, name: "div", len: 0, sons: null}, +"45": {kind: 1, offset: 45, typ: NTI1409286147, name: "a", len: 0, sons: null}, +"46": {kind: 1, offset: 46, typ: NTI1409286147, name: "em", len: 0, sons: null}, +"47": {kind: 1, offset: 47, typ: NTI1409286147, name: "strong", len: 0, sons: null}, +"48": {kind: 1, offset: 48, typ: NTI1409286147, name: "small", len: 0, sons: null}, +"49": {kind: 1, offset: 49, typ: NTI1409286147, name: "s", len: 0, sons: null}, +"50": {kind: 1, offset: 50, typ: NTI1409286147, name: "cite", len: 0, sons: null}, +"51": {kind: 1, offset: 51, typ: NTI1409286147, name: "quote", len: 0, sons: null}, +"52": {kind: 1, offset: 52, typ: NTI1409286147, name: "dfn", len: 0, sons: null}, +"53": {kind: 1, offset: 53, typ: NTI1409286147, name: "abbr", len: 0, sons: null}, +"54": {kind: 1, offset: 54, typ: NTI1409286147, name: "data", len: 0, sons: null}, +"55": {kind: 1, offset: 55, typ: NTI1409286147, name: "time", len: 0, sons: null}, +"56": {kind: 1, offset: 56, typ: NTI1409286147, name: "code", len: 0, sons: null}, +"57": {kind: 1, offset: 57, typ: NTI1409286147, name: "var", len: 0, sons: null}, +"58": {kind: 1, offset: 58, typ: NTI1409286147, name: "samp", len: 0, sons: null}, +"59": {kind: 1, offset: 59, typ: NTI1409286147, name: "kdb", len: 0, sons: null}, +"60": {kind: 1, offset: 60, typ: NTI1409286147, name: "sub", len: 0, sons: null}, +"61": {kind: 1, offset: 61, typ: NTI1409286147, name: "sup", len: 0, sons: null}, +"62": {kind: 1, offset: 62, typ: NTI1409286147, name: "i", len: 0, sons: null}, +"63": {kind: 1, offset: 63, typ: NTI1409286147, name: "b", len: 0, sons: null}, +"64": {kind: 1, offset: 64, typ: NTI1409286147, name: "u", len: 0, sons: null}, +"65": {kind: 1, offset: 65, typ: NTI1409286147, name: "mark", len: 0, sons: null}, +"66": {kind: 1, offset: 66, typ: NTI1409286147, name: "ruby", len: 0, sons: null}, +"67": {kind: 1, offset: 67, typ: NTI1409286147, name: "rt", len: 0, sons: null}, +"68": {kind: 1, offset: 68, typ: NTI1409286147, name: "rp", len: 0, sons: null}, +"69": {kind: 1, offset: 69, typ: NTI1409286147, name: "bdi", len: 0, sons: null}, +"70": {kind: 1, offset: 70, typ: NTI1409286147, name: "dbo", len: 0, sons: null}, +"71": {kind: 1, offset: 71, typ: NTI1409286147, name: "span", len: 0, sons: null}, +"72": {kind: 1, offset: 72, typ: NTI1409286147, name: "br", len: 0, sons: null}, +"73": {kind: 1, offset: 73, typ: NTI1409286147, name: "wbr", len: 0, sons: null}, +"74": {kind: 1, offset: 74, typ: NTI1409286147, name: "ins", len: 0, sons: null}, +"75": {kind: 1, offset: 75, typ: NTI1409286147, name: "del", len: 0, sons: null}, +"76": {kind: 1, offset: 76, typ: NTI1409286147, name: "img", len: 0, sons: null}, +"77": {kind: 1, offset: 77, typ: NTI1409286147, name: "iframe", len: 0, sons: null}, +"78": {kind: 1, offset: 78, typ: NTI1409286147, name: "embed", len: 0, sons: null}, +"79": {kind: 1, offset: 79, typ: NTI1409286147, name: "object", len: 0, sons: null}, +"80": {kind: 1, offset: 80, typ: NTI1409286147, name: "param", len: 0, sons: null}, +"81": {kind: 1, offset: 81, typ: NTI1409286147, name: "video", len: 0, sons: null}, +"82": {kind: 1, offset: 82, typ: NTI1409286147, name: "audio", len: 0, sons: null}, +"83": {kind: 1, offset: 83, typ: NTI1409286147, name: "source", len: 0, sons: null}, +"84": {kind: 1, offset: 84, typ: NTI1409286147, name: "track", len: 0, sons: null}, +"85": {kind: 1, offset: 85, typ: NTI1409286147, name: "canvas", len: 0, sons: null}, +"86": {kind: 1, offset: 86, typ: NTI1409286147, name: "map", len: 0, sons: null}, +"87": {kind: 1, offset: 87, typ: NTI1409286147, name: "area", len: 0, sons: null}, +"88": {kind: 1, offset: 88, typ: NTI1409286147, name: "animate", len: 0, sons: null}, +"89": {kind: 1, offset: 89, typ: NTI1409286147, name: "animateMotion", len: 0, sons: null}, +"90": {kind: 1, offset: 90, typ: NTI1409286147, name: "animateTransform", len: 0, sons: null}, +"91": {kind: 1, offset: 91, typ: NTI1409286147, name: "circle", len: 0, sons: null}, +"92": {kind: 1, offset: 92, typ: NTI1409286147, name: "clipPath", len: 0, sons: null}, +"93": {kind: 1, offset: 93, typ: NTI1409286147, name: "defs", len: 0, sons: null}, +"94": {kind: 1, offset: 94, typ: NTI1409286147, name: "desc", len: 0, sons: null}, +"95": {kind: 1, offset: 95, typ: NTI1409286147, name: "discard", len: 0, sons: null}, +"96": {kind: 1, offset: 96, typ: NTI1409286147, name: "ellipse", len: 0, sons: null}, +"97": {kind: 1, offset: 97, typ: NTI1409286147, name: "feBlend", len: 0, sons: null}, +"98": {kind: 1, offset: 98, typ: NTI1409286147, name: "feColorMatrix", len: 0, sons: null}, +"99": {kind: 1, offset: 99, typ: NTI1409286147, name: "feComponentTransfer", len: 0, sons: null}, +"100": {kind: 1, offset: 100, typ: NTI1409286147, name: "feComposite", len: 0, sons: null}, +"101": {kind: 1, offset: 101, typ: NTI1409286147, name: "feConvolveMatrix", len: 0, sons: null}, +"102": {kind: 1, offset: 102, typ: NTI1409286147, name: "feDiffuseLighting", len: 0, sons: null}, +"103": {kind: 1, offset: 103, typ: NTI1409286147, name: "feDisplacementMap", len: 0, sons: null}, +"104": {kind: 1, offset: 104, typ: NTI1409286147, name: "feDistantLight", len: 0, sons: null}, +"105": {kind: 1, offset: 105, typ: NTI1409286147, name: "feDropShadow", len: 0, sons: null}, +"106": {kind: 1, offset: 106, typ: NTI1409286147, name: "feFlood", len: 0, sons: null}, +"107": {kind: 1, offset: 107, typ: NTI1409286147, name: "feFuncA", len: 0, sons: null}, +"108": {kind: 1, offset: 108, typ: NTI1409286147, name: "feFuncB", len: 0, sons: null}, +"109": {kind: 1, offset: 109, typ: NTI1409286147, name: "feFuncG", len: 0, sons: null}, +"110": {kind: 1, offset: 110, typ: NTI1409286147, name: "feFuncR", len: 0, sons: null}, +"111": {kind: 1, offset: 111, typ: NTI1409286147, name: "feGaussianBlur", len: 0, sons: null}, +"112": {kind: 1, offset: 112, typ: NTI1409286147, name: "feImage", len: 0, sons: null}, +"113": {kind: 1, offset: 113, typ: NTI1409286147, name: "feMerge", len: 0, sons: null}, +"114": {kind: 1, offset: 114, typ: NTI1409286147, name: "feMergeNode", len: 0, sons: null}, +"115": {kind: 1, offset: 115, typ: NTI1409286147, name: "feMorphology", len: 0, sons: null}, +"116": {kind: 1, offset: 116, typ: NTI1409286147, name: "feOffset", len: 0, sons: null}, +"117": {kind: 1, offset: 117, typ: NTI1409286147, name: "fePointLight", len: 0, sons: null}, +"118": {kind: 1, offset: 118, typ: NTI1409286147, name: "feSpecularLighting", len: 0, sons: null}, +"119": {kind: 1, offset: 119, typ: NTI1409286147, name: "feSpotLight", len: 0, sons: null}, +"120": {kind: 1, offset: 120, typ: NTI1409286147, name: "feTile", len: 0, sons: null}, +"121": {kind: 1, offset: 121, typ: NTI1409286147, name: "feTurbulence", len: 0, sons: null}, +"122": {kind: 1, offset: 122, typ: NTI1409286147, name: "filter", len: 0, sons: null}, +"123": {kind: 1, offset: 123, typ: NTI1409286147, name: "foreignObject", len: 0, sons: null}, +"124": {kind: 1, offset: 124, typ: NTI1409286147, name: "g", len: 0, sons: null}, +"125": {kind: 1, offset: 125, typ: NTI1409286147, name: "image", len: 0, sons: null}, +"126": {kind: 1, offset: 126, typ: NTI1409286147, name: "line", len: 0, sons: null}, +"127": {kind: 1, offset: 127, typ: NTI1409286147, name: "linearGradient", len: 0, sons: null}, +"128": {kind: 1, offset: 128, typ: NTI1409286147, name: "marker", len: 0, sons: null}, +"129": {kind: 1, offset: 129, typ: NTI1409286147, name: "mask", len: 0, sons: null}, +"130": {kind: 1, offset: 130, typ: NTI1409286147, name: "metadata", len: 0, sons: null}, +"131": {kind: 1, offset: 131, typ: NTI1409286147, name: "mpath", len: 0, sons: null}, +"132": {kind: 1, offset: 132, typ: NTI1409286147, name: "path", len: 0, sons: null}, +"133": {kind: 1, offset: 133, typ: NTI1409286147, name: "pattern", len: 0, sons: null}, +"134": {kind: 1, offset: 134, typ: NTI1409286147, name: "polygon", len: 0, sons: null}, +"135": {kind: 1, offset: 135, typ: NTI1409286147, name: "polyline", len: 0, sons: null}, +"136": {kind: 1, offset: 136, typ: NTI1409286147, name: "radialGradient", len: 0, sons: null}, +"137": {kind: 1, offset: 137, typ: NTI1409286147, name: "rect", len: 0, sons: null}, +"138": {kind: 1, offset: 138, typ: NTI1409286147, name: "set", len: 0, sons: null}, +"139": {kind: 1, offset: 139, typ: NTI1409286147, name: "stop", len: 0, sons: null}, +"140": {kind: 1, offset: 140, typ: NTI1409286147, name: "svg", len: 0, sons: null}, +"141": {kind: 1, offset: 141, typ: NTI1409286147, name: "switch", len: 0, sons: null}, +"142": {kind: 1, offset: 142, typ: NTI1409286147, name: "symbol", len: 0, sons: null}, +"143": {kind: 1, offset: 143, typ: NTI1409286147, name: "text", len: 0, sons: null}, +"144": {kind: 1, offset: 144, typ: NTI1409286147, name: "textPath", len: 0, sons: null}, +"145": {kind: 1, offset: 145, typ: NTI1409286147, name: "tspan", len: 0, sons: null}, +"146": {kind: 1, offset: 146, typ: NTI1409286147, name: "unknown", len: 0, sons: null}, +"147": {kind: 1, offset: 147, typ: NTI1409286147, name: "use", len: 0, sons: null}, +"148": {kind: 1, offset: 148, typ: NTI1409286147, name: "view", len: 0, sons: null}, +"149": {kind: 1, offset: 149, typ: NTI1409286147, name: "maction", len: 0, sons: null}, +"150": {kind: 1, offset: 150, typ: NTI1409286147, name: "math", len: 0, sons: null}, +"151": {kind: 1, offset: 151, typ: NTI1409286147, name: "menclose", len: 0, sons: null}, +"152": {kind: 1, offset: 152, typ: NTI1409286147, name: "merror", len: 0, sons: null}, +"153": {kind: 1, offset: 153, typ: NTI1409286147, name: "mfenced", len: 0, sons: null}, +"154": {kind: 1, offset: 154, typ: NTI1409286147, name: "mfrac", len: 0, sons: null}, +"155": {kind: 1, offset: 155, typ: NTI1409286147, name: "mglyph", len: 0, sons: null}, +"156": {kind: 1, offset: 156, typ: NTI1409286147, name: "mi", len: 0, sons: null}, +"157": {kind: 1, offset: 157, typ: NTI1409286147, name: "mlabeledtr", len: 0, sons: null}, +"158": {kind: 1, offset: 158, typ: NTI1409286147, name: "mmultiscripts", len: 0, sons: null}, +"159": {kind: 1, offset: 159, typ: NTI1409286147, name: "mn", len: 0, sons: null}, +"160": {kind: 1, offset: 160, typ: NTI1409286147, name: "mo", len: 0, sons: null}, +"161": {kind: 1, offset: 161, typ: NTI1409286147, name: "mover", len: 0, sons: null}, +"162": {kind: 1, offset: 162, typ: NTI1409286147, name: "mpadded", len: 0, sons: null}, +"163": {kind: 1, offset: 163, typ: NTI1409286147, name: "mphantom", len: 0, sons: null}, +"164": {kind: 1, offset: 164, typ: NTI1409286147, name: "mroot", len: 0, sons: null}, +"165": {kind: 1, offset: 165, typ: NTI1409286147, name: "mrow", len: 0, sons: null}, +"166": {kind: 1, offset: 166, typ: NTI1409286147, name: "ms", len: 0, sons: null}, +"167": {kind: 1, offset: 167, typ: NTI1409286147, name: "mspace", len: 0, sons: null}, +"168": {kind: 1, offset: 168, typ: NTI1409286147, name: "msqrt", len: 0, sons: null}, +"169": {kind: 1, offset: 169, typ: NTI1409286147, name: "mstyle", len: 0, sons: null}, +"170": {kind: 1, offset: 170, typ: NTI1409286147, name: "msub", len: 0, sons: null}, +"171": {kind: 1, offset: 171, typ: NTI1409286147, name: "msubsup", len: 0, sons: null}, +"172": {kind: 1, offset: 172, typ: NTI1409286147, name: "msup", len: 0, sons: null}, +"173": {kind: 1, offset: 173, typ: NTI1409286147, name: "mtable", len: 0, sons: null}, +"174": {kind: 1, offset: 174, typ: NTI1409286147, name: "mtd", len: 0, sons: null}, +"175": {kind: 1, offset: 175, typ: NTI1409286147, name: "mtext", len: 0, sons: null}, +"176": {kind: 1, offset: 176, typ: NTI1409286147, name: "mtr", len: 0, sons: null}, +"177": {kind: 1, offset: 177, typ: NTI1409286147, name: "munder", len: 0, sons: null}, +"178": {kind: 1, offset: 178, typ: NTI1409286147, name: "munderover", len: 0, sons: null}, +"179": {kind: 1, offset: 179, typ: NTI1409286147, name: "semantics", len: 0, sons: null}, +"180": {kind: 1, offset: 180, typ: NTI1409286147, name: "table", len: 0, sons: null}, +"181": {kind: 1, offset: 181, typ: NTI1409286147, name: "caption", len: 0, sons: null}, +"182": {kind: 1, offset: 182, typ: NTI1409286147, name: "colgroup", len: 0, sons: null}, +"183": {kind: 1, offset: 183, typ: NTI1409286147, name: "col", len: 0, sons: null}, +"184": {kind: 1, offset: 184, typ: NTI1409286147, name: "tbody", len: 0, sons: null}, +"185": {kind: 1, offset: 185, typ: NTI1409286147, name: "thead", len: 0, sons: null}, +"186": {kind: 1, offset: 186, typ: NTI1409286147, name: "tfoot", len: 0, sons: null}, +"187": {kind: 1, offset: 187, typ: NTI1409286147, name: "tr", len: 0, sons: null}, +"188": {kind: 1, offset: 188, typ: NTI1409286147, name: "td", len: 0, sons: null}, +"189": {kind: 1, offset: 189, typ: NTI1409286147, name: "th", len: 0, sons: null}, +"190": {kind: 1, offset: 190, typ: NTI1409286147, name: "form", len: 0, sons: null}, +"191": {kind: 1, offset: 191, typ: NTI1409286147, name: "fieldset", len: 0, sons: null}, +"192": {kind: 1, offset: 192, typ: NTI1409286147, name: "legend", len: 0, sons: null}, +"193": {kind: 1, offset: 193, typ: NTI1409286147, name: "label", len: 0, sons: null}, +"194": {kind: 1, offset: 194, typ: NTI1409286147, name: "input", len: 0, sons: null}, +"195": {kind: 1, offset: 195, typ: NTI1409286147, name: "button", len: 0, sons: null}, +"196": {kind: 1, offset: 196, typ: NTI1409286147, name: "select", len: 0, sons: null}, +"197": {kind: 1, offset: 197, typ: NTI1409286147, name: "datalist", len: 0, sons: null}, +"198": {kind: 1, offset: 198, typ: NTI1409286147, name: "optgroup", len: 0, sons: null}, +"199": {kind: 1, offset: 199, typ: NTI1409286147, name: "option", len: 0, sons: null}, +"200": {kind: 1, offset: 200, typ: NTI1409286147, name: "textarea", len: 0, sons: null}, +"201": {kind: 1, offset: 201, typ: NTI1409286147, name: "keygen", len: 0, sons: null}, +"202": {kind: 1, offset: 202, typ: NTI1409286147, name: "output", len: 0, sons: null}, +"203": {kind: 1, offset: 203, typ: NTI1409286147, name: "progress", len: 0, sons: null}, +"204": {kind: 1, offset: 204, typ: NTI1409286147, name: "meter", len: 0, sons: null}, +"205": {kind: 1, offset: 205, typ: NTI1409286147, name: "details", len: 0, sons: null}, +"206": {kind: 1, offset: 206, typ: NTI1409286147, name: "summary", len: 0, sons: null}, +"207": {kind: 1, offset: 207, typ: NTI1409286147, name: "command", len: 0, sons: null}, +"208": {kind: 1, offset: 208, typ: NTI1409286147, name: "menu", len: 0, sons: null}}}; +NTI1409286147.node = NNI1409286147; +NTI1409286248.base = NTI1409286244; +NTI1409286249.base = NTI33554450; +var NNI1409286150 = {kind: 2, offset: 0, typ: null, name: null, len: 37, sons: {"0": {kind: 1, offset: 0, typ: NTI1409286150, name: "onclick", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1409286150, name: "oncontextmenu", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1409286150, name: "ondblclick", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1409286150, name: "onkeyup", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1409286150, name: "onkeydown", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1409286150, name: "onkeypressed", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI1409286150, name: "onfocus", len: 0, sons: null}, +"7": {kind: 1, offset: 7, typ: NTI1409286150, name: "onblur", len: 0, sons: null}, +"8": {kind: 1, offset: 8, typ: NTI1409286150, name: "onchange", len: 0, sons: null}, +"9": {kind: 1, offset: 9, typ: NTI1409286150, name: "onscroll", len: 0, sons: null}, +"10": {kind: 1, offset: 10, typ: NTI1409286150, name: "onmousedown", len: 0, sons: null}, +"11": {kind: 1, offset: 11, typ: NTI1409286150, name: "onmouseenter", len: 0, sons: null}, +"12": {kind: 1, offset: 12, typ: NTI1409286150, name: "onmouseleave", len: 0, sons: null}, +"13": {kind: 1, offset: 13, typ: NTI1409286150, name: "onmousemove", len: 0, sons: null}, +"14": {kind: 1, offset: 14, typ: NTI1409286150, name: "onmouseout", len: 0, sons: null}, +"15": {kind: 1, offset: 15, typ: NTI1409286150, name: "onmouseover", len: 0, sons: null}, +"16": {kind: 1, offset: 16, typ: NTI1409286150, name: "onmouseup", len: 0, sons: null}, +"17": {kind: 1, offset: 17, typ: NTI1409286150, name: "ondrag", len: 0, sons: null}, +"18": {kind: 1, offset: 18, typ: NTI1409286150, name: "ondragend", len: 0, sons: null}, +"19": {kind: 1, offset: 19, typ: NTI1409286150, name: "ondragenter", len: 0, sons: null}, +"20": {kind: 1, offset: 20, typ: NTI1409286150, name: "ondragleave", len: 0, sons: null}, +"21": {kind: 1, offset: 21, typ: NTI1409286150, name: "ondragover", len: 0, sons: null}, +"22": {kind: 1, offset: 22, typ: NTI1409286150, name: "ondragstart", len: 0, sons: null}, +"23": {kind: 1, offset: 23, typ: NTI1409286150, name: "ondrop", len: 0, sons: null}, +"24": {kind: 1, offset: 24, typ: NTI1409286150, name: "onsubmit", len: 0, sons: null}, +"25": {kind: 1, offset: 25, typ: NTI1409286150, name: "oninput", len: 0, sons: null}, +"26": {kind: 1, offset: 26, typ: NTI1409286150, name: "onanimationstart", len: 0, sons: null}, +"27": {kind: 1, offset: 27, typ: NTI1409286150, name: "onanimationend", len: 0, sons: null}, +"28": {kind: 1, offset: 28, typ: NTI1409286150, name: "onanimationiteration", len: 0, sons: null}, +"29": {kind: 1, offset: 29, typ: NTI1409286150, name: "onkeyupenter", len: 0, sons: null}, +"30": {kind: 1, offset: 30, typ: NTI1409286150, name: "onkeyuplater", len: 0, sons: null}, +"31": {kind: 1, offset: 31, typ: NTI1409286150, name: "onload", len: 0, sons: null}, +"32": {kind: 1, offset: 32, typ: NTI1409286150, name: "ontransitioncancel", len: 0, sons: null}, +"33": {kind: 1, offset: 33, typ: NTI1409286150, name: "ontransitionend", len: 0, sons: null}, +"34": {kind: 1, offset: 34, typ: NTI1409286150, name: "ontransitionrun", len: 0, sons: null}, +"35": {kind: 1, offset: 35, typ: NTI1409286150, name: "ontransitionstart", len: 0, sons: null}, +"36": {kind: 1, offset: 36, typ: NTI1409286150, name: "onwheel", len: 0, sons: null}}}; +NTI1409286150.node = NNI1409286150; +var NNI1409286246 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI1409286150, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI1409286256, name: "Field1", sons: null}, +{kind: 1, offset: "Field2", len: 0, typ: NTI1409286257, name: "Field2", sons: null}]}; +NTI1409286246.node = NNI1409286246; +NTI1409286242.base = NTI1409286246; +var NNI1476395061 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI1476395061.node = NNI1476395061; +NTI1476395060.base = NTI1476395061; +NTI1325400179.base = NTI1325400080; +NTI1325400180.base = NTI1325400080; +NTI1325400181.base = NTI1325400080; +var NNI1325400079 = {kind: 2, offset: 0, typ: null, name: null, len: 12, sons: {"1": {kind: 1, offset: 1, typ: NTI1325400079, name: "ElementNode", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1325400079, name: "AttributeNode", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1325400079, name: "TextNode", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1325400079, name: "CDATANode", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1325400079, name: "EntityRefNode", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI1325400079, name: "EntityNode", len: 0, sons: null}, +"7": {kind: 1, offset: 7, typ: NTI1325400079, name: "ProcessingInstructionNode", len: 0, sons: null}, +"8": {kind: 1, offset: 8, typ: NTI1325400079, name: "CommentNode", len: 0, sons: null}, +"9": {kind: 1, offset: 9, typ: NTI1325400079, name: "DocumentNode", len: 0, sons: null}, +"10": {kind: 1, offset: 10, typ: NTI1325400079, name: "DocumentTypeNode", len: 0, sons: null}, +"11": {kind: 1, offset: 11, typ: NTI1325400079, name: "DocumentFragmentNode", len: 0, sons: null}, +"12": {kind: 1, offset: 12, typ: NTI1325400079, name: "NotationNode", len: 0, sons: null}}}; +NTI1325400079.node = NNI1325400079; +var NNI1325400175 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI1325400175.node = NNI1325400175; +NTI1325400175.base = NTI33555179; +NTI1325400078.base = NTI1325400175; +NTI1325400204.base = NTI1325400082; +var NNI1325400203 = {kind: 2, len: 10, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "acceptCharset", len: 0, typ: NTI33554450, name: "acceptCharset", sons: null}, +{kind: 1, offset: "action", len: 0, typ: NTI33554450, name: "action", sons: null}, +{kind: 1, offset: "autocomplete", len: 0, typ: NTI33554450, name: "autocomplete", sons: null}, +{kind: 1, offset: "elements", len: 0, typ: NTI1325400204, name: "elements", sons: null}, +{kind: 1, offset: "encoding", len: 0, typ: NTI33554450, name: "encoding", sons: null}, +{kind: 1, offset: "enctype", len: 0, typ: NTI33554450, name: "enctype", sons: null}, +{kind: 1, offset: "length", len: 0, typ: NTI33554435, name: "length", sons: null}, +{kind: 1, offset: "method", len: 0, typ: NTI33554450, name: "method", sons: null}, +{kind: 1, offset: "noValidate", len: 0, typ: NTI33554466, name: "noValidate", sons: null}, +{kind: 1, offset: "target", len: 0, typ: NTI33554450, name: "target", sons: null}]}; +NTI1325400203.node = NNI1325400203; +NTI1325400203.base = NTI1325400189; +NTI1325400092.base = NTI1325400203; +var NNI1325400202 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "defaultSelected", len: 0, typ: NTI33554466, name: "defaultSelected", sons: null}, +{kind: 1, offset: "selected", len: 0, typ: NTI33554466, name: "selected", sons: null}, +{kind: 1, offset: "selectedIndex", len: 0, typ: NTI33554435, name: "selectedIndex", sons: null}, +{kind: 1, offset: "text", len: 0, typ: NTI33554450, name: "text", sons: null}, +{kind: 1, offset: "value", len: 0, typ: NTI33554450, name: "value", sons: null}]}; +NTI1325400202.node = NNI1325400202; +NTI1325400202.base = NTI1325400189; +NTI1325400091.base = NTI1325400202; +NTI1325400190.base = NTI1325400091; +NTI1325400191.base = NTI1325400091; +var NNI1325400189 = {kind: 2, len: 20, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "className", len: 0, typ: NTI33554450, name: "className", sons: null}, +{kind: 1, offset: "classList", len: 0, typ: NTI1325400078, name: "classList", sons: null}, +{kind: 1, offset: "checked", len: 0, typ: NTI33554466, name: "checked", sons: null}, +{kind: 1, offset: "defaultChecked", len: 0, typ: NTI33554466, name: "defaultChecked", sons: null}, +{kind: 1, offset: "defaultValue", len: 0, typ: NTI33554450, name: "defaultValue", sons: null}, +{kind: 1, offset: "disabled", len: 0, typ: NTI33554466, name: "disabled", sons: null}, +{kind: 1, offset: "form", len: 0, typ: NTI1325400092, name: "form", sons: null}, +{kind: 1, offset: "name", len: 0, typ: NTI33554450, name: "name", sons: null}, +{kind: 1, offset: "readOnly", len: 0, typ: NTI33554466, name: "readOnly", sons: null}, +{kind: 1, offset: "options", len: 0, typ: NTI1325400190, name: "options", sons: null}, +{kind: 1, offset: "selectedOptions", len: 0, typ: NTI1325400191, name: "selectedOptions", sons: null}, +{kind: 1, offset: "clientWidth", len: 0, typ: NTI33554435, name: "clientWidth", sons: null}, +{kind: 1, offset: "clientHeight", len: 0, typ: NTI33554435, name: "clientHeight", sons: null}, +{kind: 1, offset: "contentEditable", len: 0, typ: NTI33554450, name: "contentEditable", sons: null}, +{kind: 1, offset: "isContentEditable", len: 0, typ: NTI33554466, name: "isContentEditable", sons: null}, +{kind: 1, offset: "dir", len: 0, typ: NTI33554450, name: "dir", sons: null}, +{kind: 1, offset: "offsetHeight", len: 0, typ: NTI33554435, name: "offsetHeight", sons: null}, +{kind: 1, offset: "offsetWidth", len: 0, typ: NTI33554435, name: "offsetWidth", sons: null}, +{kind: 1, offset: "offsetLeft", len: 0, typ: NTI33554435, name: "offsetLeft", sons: null}, +{kind: 1, offset: "offsetTop", len: 0, typ: NTI33554435, name: "offsetTop", sons: null}]}; +NTI1325400189.node = NNI1325400189; +NTI1325400189.base = NTI1325400178; +NTI1325400082.base = NTI1325400189; +var NNI1325400201 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "text", len: 0, typ: NTI33554450, name: "text", sons: null}, +{kind: 1, offset: "x", len: 0, typ: NTI33554435, name: "x", sons: null}, +{kind: 1, offset: "y", len: 0, typ: NTI33554435, name: "y", sons: null}]}; +NTI1325400201.node = NNI1325400201; +NTI1325400201.base = NTI1325400189; +NTI1325400090.base = NTI1325400201; +NTI1325400183.base = NTI1325400090; +NTI1325400184.base = NTI1325400092; +var NNI1325400205 = {kind: 2, len: 8, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "border", len: 0, typ: NTI33554435, name: "border", sons: null}, +{kind: 1, offset: "complete", len: 0, typ: NTI33554466, name: "complete", sons: null}, +{kind: 1, offset: "height", len: 0, typ: NTI33554435, name: "height", sons: null}, +{kind: 1, offset: "hspace", len: 0, typ: NTI33554435, name: "hspace", sons: null}, +{kind: 1, offset: "lowsrc", len: 0, typ: NTI33554450, name: "lowsrc", sons: null}, +{kind: 1, offset: "src", len: 0, typ: NTI33554450, name: "src", sons: null}, +{kind: 1, offset: "vspace", len: 0, typ: NTI33554435, name: "vspace", sons: null}, +{kind: 1, offset: "width", len: 0, typ: NTI33554435, name: "width", sons: null}]}; +NTI1325400205.node = NNI1325400205; +NTI1325400205.base = NTI1325400189; +NTI1325400093.base = NTI1325400205; +NTI1325400185.base = NTI1325400093; +NTI1325400186.base = NTI1325400082; +var NNI1325400200 = {kind: 2, len: 6, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "height", len: 0, typ: NTI33554435, name: "height", sons: null}, +{kind: 1, offset: "hspace", len: 0, typ: NTI33554435, name: "hspace", sons: null}, +{kind: 1, offset: "src", len: 0, typ: NTI33554450, name: "src", sons: null}, +{kind: 1, offset: "width", len: 0, typ: NTI33554435, name: "width", sons: null}, +{kind: 1, offset: "type", len: 0, typ: NTI33554450, name: "type", sons: null}, +{kind: 1, offset: "vspace", len: 0, typ: NTI33554435, name: "vspace", sons: null}]}; +NTI1325400200.node = NNI1325400200; +NTI1325400200.base = NTI1325400189; +NTI1325400089.base = NTI1325400200; +NTI1325400187.base = NTI1325400089; +var NNI1325400199 = {kind: 2, len: 4, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "target", len: 0, typ: NTI33554450, name: "target", sons: null}, +{kind: 1, offset: "text", len: 0, typ: NTI33554450, name: "text", sons: null}, +{kind: 1, offset: "x", len: 0, typ: NTI33554435, name: "x", sons: null}, +{kind: 1, offset: "y", len: 0, typ: NTI33554435, name: "y", sons: null}]}; +NTI1325400199.node = NNI1325400199; +NTI1325400199.base = NTI1325400189; +NTI1325400088.base = NTI1325400199; +NTI1325400188.base = NTI1325400088; +var NNI1325400249 = {kind: 1, offset: "then", len: 0, typ: NTI1325400250, name: "then", sons: null}; +NTI1325400249.node = NNI1325400249; +NTI1325400129.base = NTI1325400249; +var NNI1325400252 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "ready", len: 0, typ: NTI1325400129, name: "ready", sons: null}, +{kind: 1, offset: "onloadingdone", len: 0, typ: NTI1325400253, name: "onloadingdone", sons: null}]}; +NTI1325400252.node = NNI1325400252; +NTI1325400130.base = NTI1325400252; +var NNI1325400182 = {kind: 2, len: 25, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "activeElement", len: 0, typ: NTI1325400082, name: "activeElement", sons: null}, +{kind: 1, offset: "documentElement", len: 0, typ: NTI1325400082, name: "documentElement", sons: null}, +{kind: 1, offset: "alinkColor", len: 0, typ: NTI33554450, name: "alinkColor", sons: null}, +{kind: 1, offset: "bgColor", len: 0, typ: NTI33554450, name: "bgColor", sons: null}, +{kind: 1, offset: "body", len: 0, typ: NTI1325400082, name: "body", sons: null}, +{kind: 1, offset: "charset", len: 0, typ: NTI33554450, name: "charset", sons: null}, +{kind: 1, offset: "cookie", len: 0, typ: NTI33554450, name: "cookie", sons: null}, +{kind: 1, offset: "defaultCharset", len: 0, typ: NTI33554450, name: "defaultCharset", sons: null}, +{kind: 1, offset: "fgColor", len: 0, typ: NTI33554450, name: "fgColor", sons: null}, +{kind: 1, offset: "head", len: 0, typ: NTI1325400082, name: "head", sons: null}, +{kind: 1, offset: "hidden", len: 0, typ: NTI33554466, name: "hidden", sons: null}, +{kind: 1, offset: "lastModified", len: 0, typ: NTI33554450, name: "lastModified", sons: null}, +{kind: 1, offset: "linkColor", len: 0, typ: NTI33554450, name: "linkColor", sons: null}, +{kind: 1, offset: "referrer", len: 0, typ: NTI33554450, name: "referrer", sons: null}, +{kind: 1, offset: "title", len: 0, typ: NTI33554450, name: "title", sons: null}, +{kind: 1, offset: "URL", len: 0, typ: NTI33554450, name: "URL", sons: null}, +{kind: 1, offset: "visibilityState", len: 0, typ: NTI33554450, name: "visibilityState", sons: null}, +{kind: 1, offset: "vlinkColor", len: 0, typ: NTI33554450, name: "vlinkColor", sons: null}, +{kind: 1, offset: "anchors", len: 0, typ: NTI1325400183, name: "anchors", sons: null}, +{kind: 1, offset: "forms", len: 0, typ: NTI1325400184, name: "forms", sons: null}, +{kind: 1, offset: "images", len: 0, typ: NTI1325400185, name: "images", sons: null}, +{kind: 1, offset: "applets", len: 0, typ: NTI1325400186, name: "applets", sons: null}, +{kind: 1, offset: "embeds", len: 0, typ: NTI1325400187, name: "embeds", sons: null}, +{kind: 1, offset: "links", len: 0, typ: NTI1325400188, name: "links", sons: null}, +{kind: 1, offset: "fonts", len: 0, typ: NTI1325400130, name: "fonts", sons: null}]}; +NTI1325400182.node = NNI1325400182; +NTI1325400182.base = NTI1325400178; +NTI1325400081.base = NTI1325400182; +var NNI1325400206 = {kind: 2, len: 368, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "alignContent", len: 0, typ: NTI33554450, name: "alignContent", sons: null}, +{kind: 1, offset: "alignItems", len: 0, typ: NTI33554450, name: "alignItems", sons: null}, +{kind: 1, offset: "alignSelf", len: 0, typ: NTI33554450, name: "alignSelf", sons: null}, +{kind: 1, offset: "all", len: 0, typ: NTI33554450, name: "all", sons: null}, +{kind: 1, offset: "animation", len: 0, typ: NTI33554450, name: "animation", sons: null}, +{kind: 1, offset: "animationDelay", len: 0, typ: NTI33554450, name: "animationDelay", sons: null}, +{kind: 1, offset: "animationDirection", len: 0, typ: NTI33554450, name: "animationDirection", sons: null}, +{kind: 1, offset: "animationDuration", len: 0, typ: NTI33554450, name: "animationDuration", sons: null}, +{kind: 1, offset: "animationFillMode", len: 0, typ: NTI33554450, name: "animationFillMode", sons: null}, +{kind: 1, offset: "animationIterationCount", len: 0, typ: NTI33554450, name: "animationIterationCount", sons: null}, +{kind: 1, offset: "animationName", len: 0, typ: NTI33554450, name: "animationName", sons: null}, +{kind: 1, offset: "animationPlayState", len: 0, typ: NTI33554450, name: "animationPlayState", sons: null}, +{kind: 1, offset: "animationTimingFunction", len: 0, typ: NTI33554450, name: "animationTimingFunction", sons: null}, +{kind: 1, offset: "backdropFilter", len: 0, typ: NTI33554450, name: "backdropFilter", sons: null}, +{kind: 1, offset: "backfaceVisibility", len: 0, typ: NTI33554450, name: "backfaceVisibility", sons: null}, +{kind: 1, offset: "background", len: 0, typ: NTI33554450, name: "background", sons: null}, +{kind: 1, offset: "backgroundAttachment", len: 0, typ: NTI33554450, name: "backgroundAttachment", sons: null}, +{kind: 1, offset: "backgroundBlendMode", len: 0, typ: NTI33554450, name: "backgroundBlendMode", sons: null}, +{kind: 1, offset: "backgroundClip", len: 0, typ: NTI33554450, name: "backgroundClip", sons: null}, +{kind: 1, offset: "backgroundColor", len: 0, typ: NTI33554450, name: "backgroundColor", sons: null}, +{kind: 1, offset: "backgroundImage", len: 0, typ: NTI33554450, name: "backgroundImage", sons: null}, +{kind: 1, offset: "backgroundOrigin", len: 0, typ: NTI33554450, name: "backgroundOrigin", sons: null}, +{kind: 1, offset: "backgroundPosition", len: 0, typ: NTI33554450, name: "backgroundPosition", sons: null}, +{kind: 1, offset: "backgroundRepeat", len: 0, typ: NTI33554450, name: "backgroundRepeat", sons: null}, +{kind: 1, offset: "backgroundSize", len: 0, typ: NTI33554450, name: "backgroundSize", sons: null}, +{kind: 1, offset: "blockSize", len: 0, typ: NTI33554450, name: "blockSize", sons: null}, +{kind: 1, offset: "border", len: 0, typ: NTI33554450, name: "border", sons: null}, +{kind: 1, offset: "borderBlock", len: 0, typ: NTI33554450, name: "borderBlock", sons: null}, +{kind: 1, offset: "borderBlockColor", len: 0, typ: NTI33554450, name: "borderBlockColor", sons: null}, +{kind: 1, offset: "borderBlockEnd", len: 0, typ: NTI33554450, name: "borderBlockEnd", sons: null}, +{kind: 1, offset: "borderBlockEndColor", len: 0, typ: NTI33554450, name: "borderBlockEndColor", sons: null}, +{kind: 1, offset: "borderBlockEndStyle", len: 0, typ: NTI33554450, name: "borderBlockEndStyle", sons: null}, +{kind: 1, offset: "borderBlockEndWidth", len: 0, typ: NTI33554450, name: "borderBlockEndWidth", sons: null}, +{kind: 1, offset: "borderBlockStart", len: 0, typ: NTI33554450, name: "borderBlockStart", sons: null}, +{kind: 1, offset: "borderBlockStartColor", len: 0, typ: NTI33554450, name: "borderBlockStartColor", sons: null}, +{kind: 1, offset: "borderBlockStartStyle", len: 0, typ: NTI33554450, name: "borderBlockStartStyle", sons: null}, +{kind: 1, offset: "borderBlockStartWidth", len: 0, typ: NTI33554450, name: "borderBlockStartWidth", sons: null}, +{kind: 1, offset: "borderBlockStyle", len: 0, typ: NTI33554450, name: "borderBlockStyle", sons: null}, +{kind: 1, offset: "borderBlockWidth", len: 0, typ: NTI33554450, name: "borderBlockWidth", sons: null}, +{kind: 1, offset: "borderBottom", len: 0, typ: NTI33554450, name: "borderBottom", sons: null}, +{kind: 1, offset: "borderBottomColor", len: 0, typ: NTI33554450, name: "borderBottomColor", sons: null}, +{kind: 1, offset: "borderBottomLeftRadius", len: 0, typ: NTI33554450, name: "borderBottomLeftRadius", sons: null}, +{kind: 1, offset: "borderBottomRightRadius", len: 0, typ: NTI33554450, name: "borderBottomRightRadius", sons: null}, +{kind: 1, offset: "borderBottomStyle", len: 0, typ: NTI33554450, name: "borderBottomStyle", sons: null}, +{kind: 1, offset: "borderBottomWidth", len: 0, typ: NTI33554450, name: "borderBottomWidth", sons: null}, +{kind: 1, offset: "borderCollapse", len: 0, typ: NTI33554450, name: "borderCollapse", sons: null}, +{kind: 1, offset: "borderColor", len: 0, typ: NTI33554450, name: "borderColor", sons: null}, +{kind: 1, offset: "borderEndEndRadius", len: 0, typ: NTI33554450, name: "borderEndEndRadius", sons: null}, +{kind: 1, offset: "borderEndStartRadius", len: 0, typ: NTI33554450, name: "borderEndStartRadius", sons: null}, +{kind: 1, offset: "borderImage", len: 0, typ: NTI33554450, name: "borderImage", sons: null}, +{kind: 1, offset: "borderImageOutset", len: 0, typ: NTI33554450, name: "borderImageOutset", sons: null}, +{kind: 1, offset: "borderImageRepeat", len: 0, typ: NTI33554450, name: "borderImageRepeat", sons: null}, +{kind: 1, offset: "borderImageSlice", len: 0, typ: NTI33554450, name: "borderImageSlice", sons: null}, +{kind: 1, offset: "borderImageSource", len: 0, typ: NTI33554450, name: "borderImageSource", sons: null}, +{kind: 1, offset: "borderImageWidth", len: 0, typ: NTI33554450, name: "borderImageWidth", sons: null}, +{kind: 1, offset: "borderInline", len: 0, typ: NTI33554450, name: "borderInline", sons: null}, +{kind: 1, offset: "borderInlineColor", len: 0, typ: NTI33554450, name: "borderInlineColor", sons: null}, +{kind: 1, offset: "borderInlineEnd", len: 0, typ: NTI33554450, name: "borderInlineEnd", sons: null}, +{kind: 1, offset: "borderInlineEndColor", len: 0, typ: NTI33554450, name: "borderInlineEndColor", sons: null}, +{kind: 1, offset: "borderInlineEndStyle", len: 0, typ: NTI33554450, name: "borderInlineEndStyle", sons: null}, +{kind: 1, offset: "borderInlineEndWidth", len: 0, typ: NTI33554450, name: "borderInlineEndWidth", sons: null}, +{kind: 1, offset: "borderInlineStart", len: 0, typ: NTI33554450, name: "borderInlineStart", sons: null}, +{kind: 1, offset: "borderInlineStartColor", len: 0, typ: NTI33554450, name: "borderInlineStartColor", sons: null}, +{kind: 1, offset: "borderInlineStartStyle", len: 0, typ: NTI33554450, name: "borderInlineStartStyle", sons: null}, +{kind: 1, offset: "borderInlineStartWidth", len: 0, typ: NTI33554450, name: "borderInlineStartWidth", sons: null}, +{kind: 1, offset: "borderInlineStyle", len: 0, typ: NTI33554450, name: "borderInlineStyle", sons: null}, +{kind: 1, offset: "borderInlineWidth", len: 0, typ: NTI33554450, name: "borderInlineWidth", sons: null}, +{kind: 1, offset: "borderLeft", len: 0, typ: NTI33554450, name: "borderLeft", sons: null}, +{kind: 1, offset: "borderLeftColor", len: 0, typ: NTI33554450, name: "borderLeftColor", sons: null}, +{kind: 1, offset: "borderLeftStyle", len: 0, typ: NTI33554450, name: "borderLeftStyle", sons: null}, +{kind: 1, offset: "borderLeftWidth", len: 0, typ: NTI33554450, name: "borderLeftWidth", sons: null}, +{kind: 1, offset: "borderRadius", len: 0, typ: NTI33554450, name: "borderRadius", sons: null}, +{kind: 1, offset: "borderRight", len: 0, typ: NTI33554450, name: "borderRight", sons: null}, +{kind: 1, offset: "borderRightColor", len: 0, typ: NTI33554450, name: "borderRightColor", sons: null}, +{kind: 1, offset: "borderRightStyle", len: 0, typ: NTI33554450, name: "borderRightStyle", sons: null}, +{kind: 1, offset: "borderRightWidth", len: 0, typ: NTI33554450, name: "borderRightWidth", sons: null}, +{kind: 1, offset: "borderSpacing", len: 0, typ: NTI33554450, name: "borderSpacing", sons: null}, +{kind: 1, offset: "borderStartEndRadius", len: 0, typ: NTI33554450, name: "borderStartEndRadius", sons: null}, +{kind: 1, offset: "borderStartStartRadius", len: 0, typ: NTI33554450, name: "borderStartStartRadius", sons: null}, +{kind: 1, offset: "borderStyle", len: 0, typ: NTI33554450, name: "borderStyle", sons: null}, +{kind: 1, offset: "borderTop", len: 0, typ: NTI33554450, name: "borderTop", sons: null}, +{kind: 1, offset: "borderTopColor", len: 0, typ: NTI33554450, name: "borderTopColor", sons: null}, +{kind: 1, offset: "borderTopLeftRadius", len: 0, typ: NTI33554450, name: "borderTopLeftRadius", sons: null}, +{kind: 1, offset: "borderTopRightRadius", len: 0, typ: NTI33554450, name: "borderTopRightRadius", sons: null}, +{kind: 1, offset: "borderTopStyle", len: 0, typ: NTI33554450, name: "borderTopStyle", sons: null}, +{kind: 1, offset: "borderTopWidth", len: 0, typ: NTI33554450, name: "borderTopWidth", sons: null}, +{kind: 1, offset: "borderWidth", len: 0, typ: NTI33554450, name: "borderWidth", sons: null}, +{kind: 1, offset: "bottom", len: 0, typ: NTI33554450, name: "bottom", sons: null}, +{kind: 1, offset: "boxDecorationBreak", len: 0, typ: NTI33554450, name: "boxDecorationBreak", sons: null}, +{kind: 1, offset: "boxShadow", len: 0, typ: NTI33554450, name: "boxShadow", sons: null}, +{kind: 1, offset: "boxSizing", len: 0, typ: NTI33554450, name: "boxSizing", sons: null}, +{kind: 1, offset: "breakAfter", len: 0, typ: NTI33554450, name: "breakAfter", sons: null}, +{kind: 1, offset: "breakBefore", len: 0, typ: NTI33554450, name: "breakBefore", sons: null}, +{kind: 1, offset: "breakInside", len: 0, typ: NTI33554450, name: "breakInside", sons: null}, +{kind: 1, offset: "captionSide", len: 0, typ: NTI33554450, name: "captionSide", sons: null}, +{kind: 1, offset: "caretColor", len: 0, typ: NTI33554450, name: "caretColor", sons: null}, +{kind: 1, offset: "clear", len: 0, typ: NTI33554450, name: "clear", sons: null}, +{kind: 1, offset: "clip", len: 0, typ: NTI33554450, name: "clip", sons: null}, +{kind: 1, offset: "clipPath", len: 0, typ: NTI33554450, name: "clipPath", sons: null}, +{kind: 1, offset: "color", len: 0, typ: NTI33554450, name: "color", sons: null}, +{kind: 1, offset: "colorAdjust", len: 0, typ: NTI33554450, name: "colorAdjust", sons: null}, +{kind: 1, offset: "columnCount", len: 0, typ: NTI33554450, name: "columnCount", sons: null}, +{kind: 1, offset: "columnFill", len: 0, typ: NTI33554450, name: "columnFill", sons: null}, +{kind: 1, offset: "columnGap", len: 0, typ: NTI33554450, name: "columnGap", sons: null}, +{kind: 1, offset: "columnRule", len: 0, typ: NTI33554450, name: "columnRule", sons: null}, +{kind: 1, offset: "columnRuleColor", len: 0, typ: NTI33554450, name: "columnRuleColor", sons: null}, +{kind: 1, offset: "columnRuleStyle", len: 0, typ: NTI33554450, name: "columnRuleStyle", sons: null}, +{kind: 1, offset: "columnRuleWidth", len: 0, typ: NTI33554450, name: "columnRuleWidth", sons: null}, +{kind: 1, offset: "columnSpan", len: 0, typ: NTI33554450, name: "columnSpan", sons: null}, +{kind: 1, offset: "columnWidth", len: 0, typ: NTI33554450, name: "columnWidth", sons: null}, +{kind: 1, offset: "columns", len: 0, typ: NTI33554450, name: "columns", sons: null}, +{kind: 1, offset: "contain", len: 0, typ: NTI33554450, name: "contain", sons: null}, +{kind: 1, offset: "content", len: 0, typ: NTI33554450, name: "content", sons: null}, +{kind: 1, offset: "counterIncrement", len: 0, typ: NTI33554450, name: "counterIncrement", sons: null}, +{kind: 1, offset: "counterReset", len: 0, typ: NTI33554450, name: "counterReset", sons: null}, +{kind: 1, offset: "counterSet", len: 0, typ: NTI33554450, name: "counterSet", sons: null}, +{kind: 1, offset: "cursor", len: 0, typ: NTI33554450, name: "cursor", sons: null}, +{kind: 1, offset: "direction", len: 0, typ: NTI33554450, name: "direction", sons: null}, +{kind: 1, offset: "display", len: 0, typ: NTI33554450, name: "display", sons: null}, +{kind: 1, offset: "emptyCells", len: 0, typ: NTI33554450, name: "emptyCells", sons: null}, +{kind: 1, offset: "filter", len: 0, typ: NTI33554450, name: "filter", sons: null}, +{kind: 1, offset: "flex", len: 0, typ: NTI33554450, name: "flex", sons: null}, +{kind: 1, offset: "flexBasis", len: 0, typ: NTI33554450, name: "flexBasis", sons: null}, +{kind: 1, offset: "flexDirection", len: 0, typ: NTI33554450, name: "flexDirection", sons: null}, +{kind: 1, offset: "flexFlow", len: 0, typ: NTI33554450, name: "flexFlow", sons: null}, +{kind: 1, offset: "flexGrow", len: 0, typ: NTI33554450, name: "flexGrow", sons: null}, +{kind: 1, offset: "flexShrink", len: 0, typ: NTI33554450, name: "flexShrink", sons: null}, +{kind: 1, offset: "flexWrap", len: 0, typ: NTI33554450, name: "flexWrap", sons: null}, +{kind: 1, offset: "cssFloat", len: 0, typ: NTI33554450, name: "cssFloat", sons: null}, +{kind: 1, offset: "font", len: 0, typ: NTI33554450, name: "font", sons: null}, +{kind: 1, offset: "fontFamily", len: 0, typ: NTI33554450, name: "fontFamily", sons: null}, +{kind: 1, offset: "fontFeatureSettings", len: 0, typ: NTI33554450, name: "fontFeatureSettings", sons: null}, +{kind: 1, offset: "fontKerning", len: 0, typ: NTI33554450, name: "fontKerning", sons: null}, +{kind: 1, offset: "fontLanguageOverride", len: 0, typ: NTI33554450, name: "fontLanguageOverride", sons: null}, +{kind: 1, offset: "fontOpticalSizing", len: 0, typ: NTI33554450, name: "fontOpticalSizing", sons: null}, +{kind: 1, offset: "fontSize", len: 0, typ: NTI33554450, name: "fontSize", sons: null}, +{kind: 1, offset: "fontSizeAdjust", len: 0, typ: NTI33554450, name: "fontSizeAdjust", sons: null}, +{kind: 1, offset: "fontStretch", len: 0, typ: NTI33554450, name: "fontStretch", sons: null}, +{kind: 1, offset: "fontStyle", len: 0, typ: NTI33554450, name: "fontStyle", sons: null}, +{kind: 1, offset: "fontSynthesis", len: 0, typ: NTI33554450, name: "fontSynthesis", sons: null}, +{kind: 1, offset: "fontVariant", len: 0, typ: NTI33554450, name: "fontVariant", sons: null}, +{kind: 1, offset: "fontVariantAlternates", len: 0, typ: NTI33554450, name: "fontVariantAlternates", sons: null}, +{kind: 1, offset: "fontVariantCaps", len: 0, typ: NTI33554450, name: "fontVariantCaps", sons: null}, +{kind: 1, offset: "fontVariantEastAsian", len: 0, typ: NTI33554450, name: "fontVariantEastAsian", sons: null}, +{kind: 1, offset: "fontVariantLigatures", len: 0, typ: NTI33554450, name: "fontVariantLigatures", sons: null}, +{kind: 1, offset: "fontVariantNumeric", len: 0, typ: NTI33554450, name: "fontVariantNumeric", sons: null}, +{kind: 1, offset: "fontVariantPosition", len: 0, typ: NTI33554450, name: "fontVariantPosition", sons: null}, +{kind: 1, offset: "fontVariationSettings", len: 0, typ: NTI33554450, name: "fontVariationSettings", sons: null}, +{kind: 1, offset: "fontWeight", len: 0, typ: NTI33554450, name: "fontWeight", sons: null}, +{kind: 1, offset: "gap", len: 0, typ: NTI33554450, name: "gap", sons: null}, +{kind: 1, offset: "grid", len: 0, typ: NTI33554450, name: "grid", sons: null}, +{kind: 1, offset: "gridArea", len: 0, typ: NTI33554450, name: "gridArea", sons: null}, +{kind: 1, offset: "gridAutoColumns", len: 0, typ: NTI33554450, name: "gridAutoColumns", sons: null}, +{kind: 1, offset: "gridAutoFlow", len: 0, typ: NTI33554450, name: "gridAutoFlow", sons: null}, +{kind: 1, offset: "gridAutoRows", len: 0, typ: NTI33554450, name: "gridAutoRows", sons: null}, +{kind: 1, offset: "gridColumn", len: 0, typ: NTI33554450, name: "gridColumn", sons: null}, +{kind: 1, offset: "gridColumnEnd", len: 0, typ: NTI33554450, name: "gridColumnEnd", sons: null}, +{kind: 1, offset: "gridColumnStart", len: 0, typ: NTI33554450, name: "gridColumnStart", sons: null}, +{kind: 1, offset: "gridRow", len: 0, typ: NTI33554450, name: "gridRow", sons: null}, +{kind: 1, offset: "gridRowEnd", len: 0, typ: NTI33554450, name: "gridRowEnd", sons: null}, +{kind: 1, offset: "gridRowStart", len: 0, typ: NTI33554450, name: "gridRowStart", sons: null}, +{kind: 1, offset: "gridTemplate", len: 0, typ: NTI33554450, name: "gridTemplate", sons: null}, +{kind: 1, offset: "gridTemplateAreas", len: 0, typ: NTI33554450, name: "gridTemplateAreas", sons: null}, +{kind: 1, offset: "gridTemplateColumns", len: 0, typ: NTI33554450, name: "gridTemplateColumns", sons: null}, +{kind: 1, offset: "gridTemplateRows", len: 0, typ: NTI33554450, name: "gridTemplateRows", sons: null}, +{kind: 1, offset: "hangingPunctuation", len: 0, typ: NTI33554450, name: "hangingPunctuation", sons: null}, +{kind: 1, offset: "height", len: 0, typ: NTI33554450, name: "height", sons: null}, +{kind: 1, offset: "hyphens", len: 0, typ: NTI33554450, name: "hyphens", sons: null}, +{kind: 1, offset: "imageOrientation", len: 0, typ: NTI33554450, name: "imageOrientation", sons: null}, +{kind: 1, offset: "imageRendering", len: 0, typ: NTI33554450, name: "imageRendering", sons: null}, +{kind: 1, offset: "inlineSize", len: 0, typ: NTI33554450, name: "inlineSize", sons: null}, +{kind: 1, offset: "inset", len: 0, typ: NTI33554450, name: "inset", sons: null}, +{kind: 1, offset: "insetBlock", len: 0, typ: NTI33554450, name: "insetBlock", sons: null}, +{kind: 1, offset: "insetBlockEnd", len: 0, typ: NTI33554450, name: "insetBlockEnd", sons: null}, +{kind: 1, offset: "insetBlockStart", len: 0, typ: NTI33554450, name: "insetBlockStart", sons: null}, +{kind: 1, offset: "insetInline", len: 0, typ: NTI33554450, name: "insetInline", sons: null}, +{kind: 1, offset: "insetInlineEnd", len: 0, typ: NTI33554450, name: "insetInlineEnd", sons: null}, +{kind: 1, offset: "insetInlineStart", len: 0, typ: NTI33554450, name: "insetInlineStart", sons: null}, +{kind: 1, offset: "isolation", len: 0, typ: NTI33554450, name: "isolation", sons: null}, +{kind: 1, offset: "justifyContent", len: 0, typ: NTI33554450, name: "justifyContent", sons: null}, +{kind: 1, offset: "justifyItems", len: 0, typ: NTI33554450, name: "justifyItems", sons: null}, +{kind: 1, offset: "justifySelf", len: 0, typ: NTI33554450, name: "justifySelf", sons: null}, +{kind: 1, offset: "left", len: 0, typ: NTI33554450, name: "left", sons: null}, +{kind: 1, offset: "letterSpacing", len: 0, typ: NTI33554450, name: "letterSpacing", sons: null}, +{kind: 1, offset: "lineBreak", len: 0, typ: NTI33554450, name: "lineBreak", sons: null}, +{kind: 1, offset: "lineHeight", len: 0, typ: NTI33554450, name: "lineHeight", sons: null}, +{kind: 1, offset: "listStyle", len: 0, typ: NTI33554450, name: "listStyle", sons: null}, +{kind: 1, offset: "listStyleImage", len: 0, typ: NTI33554450, name: "listStyleImage", sons: null}, +{kind: 1, offset: "listStylePosition", len: 0, typ: NTI33554450, name: "listStylePosition", sons: null}, +{kind: 1, offset: "listStyleType", len: 0, typ: NTI33554450, name: "listStyleType", sons: null}, +{kind: 1, offset: "margin", len: 0, typ: NTI33554450, name: "margin", sons: null}, +{kind: 1, offset: "marginBlock", len: 0, typ: NTI33554450, name: "marginBlock", sons: null}, +{kind: 1, offset: "marginBlockEnd", len: 0, typ: NTI33554450, name: "marginBlockEnd", sons: null}, +{kind: 1, offset: "marginBlockStart", len: 0, typ: NTI33554450, name: "marginBlockStart", sons: null}, +{kind: 1, offset: "marginBottom", len: 0, typ: NTI33554450, name: "marginBottom", sons: null}, +{kind: 1, offset: "marginInline", len: 0, typ: NTI33554450, name: "marginInline", sons: null}, +{kind: 1, offset: "marginInlineEnd", len: 0, typ: NTI33554450, name: "marginInlineEnd", sons: null}, +{kind: 1, offset: "marginInlineStart", len: 0, typ: NTI33554450, name: "marginInlineStart", sons: null}, +{kind: 1, offset: "marginLeft", len: 0, typ: NTI33554450, name: "marginLeft", sons: null}, +{kind: 1, offset: "marginRight", len: 0, typ: NTI33554450, name: "marginRight", sons: null}, +{kind: 1, offset: "marginTop", len: 0, typ: NTI33554450, name: "marginTop", sons: null}, +{kind: 1, offset: "mask", len: 0, typ: NTI33554450, name: "mask", sons: null}, +{kind: 1, offset: "maskBorder", len: 0, typ: NTI33554450, name: "maskBorder", sons: null}, +{kind: 1, offset: "maskBorderMode", len: 0, typ: NTI33554450, name: "maskBorderMode", sons: null}, +{kind: 1, offset: "maskBorderOutset", len: 0, typ: NTI33554450, name: "maskBorderOutset", sons: null}, +{kind: 1, offset: "maskBorderRepeat", len: 0, typ: NTI33554450, name: "maskBorderRepeat", sons: null}, +{kind: 1, offset: "maskBorderSlice", len: 0, typ: NTI33554450, name: "maskBorderSlice", sons: null}, +{kind: 1, offset: "maskBorderSource", len: 0, typ: NTI33554450, name: "maskBorderSource", sons: null}, +{kind: 1, offset: "maskBorderWidth", len: 0, typ: NTI33554450, name: "maskBorderWidth", sons: null}, +{kind: 1, offset: "maskClip", len: 0, typ: NTI33554450, name: "maskClip", sons: null}, +{kind: 1, offset: "maskComposite", len: 0, typ: NTI33554450, name: "maskComposite", sons: null}, +{kind: 1, offset: "maskImage", len: 0, typ: NTI33554450, name: "maskImage", sons: null}, +{kind: 1, offset: "maskMode", len: 0, typ: NTI33554450, name: "maskMode", sons: null}, +{kind: 1, offset: "maskOrigin", len: 0, typ: NTI33554450, name: "maskOrigin", sons: null}, +{kind: 1, offset: "maskPosition", len: 0, typ: NTI33554450, name: "maskPosition", sons: null}, +{kind: 1, offset: "maskRepeat", len: 0, typ: NTI33554450, name: "maskRepeat", sons: null}, +{kind: 1, offset: "maskSize", len: 0, typ: NTI33554450, name: "maskSize", sons: null}, +{kind: 1, offset: "maskType", len: 0, typ: NTI33554450, name: "maskType", sons: null}, +{kind: 1, offset: "maxBlockSize", len: 0, typ: NTI33554450, name: "maxBlockSize", sons: null}, +{kind: 1, offset: "maxHeight", len: 0, typ: NTI33554450, name: "maxHeight", sons: null}, +{kind: 1, offset: "maxInlineSize", len: 0, typ: NTI33554450, name: "maxInlineSize", sons: null}, +{kind: 1, offset: "maxWidth", len: 0, typ: NTI33554450, name: "maxWidth", sons: null}, +{kind: 1, offset: "minBlockSize", len: 0, typ: NTI33554450, name: "minBlockSize", sons: null}, +{kind: 1, offset: "minHeight", len: 0, typ: NTI33554450, name: "minHeight", sons: null}, +{kind: 1, offset: "minInlineSize", len: 0, typ: NTI33554450, name: "minInlineSize", sons: null}, +{kind: 1, offset: "minWidth", len: 0, typ: NTI33554450, name: "minWidth", sons: null}, +{kind: 1, offset: "mixBlendMode", len: 0, typ: NTI33554450, name: "mixBlendMode", sons: null}, +{kind: 1, offset: "objectFit", len: 0, typ: NTI33554450, name: "objectFit", sons: null}, +{kind: 1, offset: "objectPosition", len: 0, typ: NTI33554450, name: "objectPosition", sons: null}, +{kind: 1, offset: "offset", len: 0, typ: NTI33554450, name: "offset", sons: null}, +{kind: 1, offset: "offsetAnchor", len: 0, typ: NTI33554450, name: "offsetAnchor", sons: null}, +{kind: 1, offset: "offsetDistance", len: 0, typ: NTI33554450, name: "offsetDistance", sons: null}, +{kind: 1, offset: "offsetPath", len: 0, typ: NTI33554450, name: "offsetPath", sons: null}, +{kind: 1, offset: "offsetRotate", len: 0, typ: NTI33554450, name: "offsetRotate", sons: null}, +{kind: 1, offset: "opacity", len: 0, typ: NTI33554450, name: "opacity", sons: null}, +{kind: 1, offset: "order", len: 0, typ: NTI33554450, name: "order", sons: null}, +{kind: 1, offset: "orphans", len: 0, typ: NTI33554450, name: "orphans", sons: null}, +{kind: 1, offset: "outline", len: 0, typ: NTI33554450, name: "outline", sons: null}, +{kind: 1, offset: "outlineColor", len: 0, typ: NTI33554450, name: "outlineColor", sons: null}, +{kind: 1, offset: "outlineOffset", len: 0, typ: NTI33554450, name: "outlineOffset", sons: null}, +{kind: 1, offset: "outlineStyle", len: 0, typ: NTI33554450, name: "outlineStyle", sons: null}, +{kind: 1, offset: "outlineWidth", len: 0, typ: NTI33554450, name: "outlineWidth", sons: null}, +{kind: 1, offset: "overflow", len: 0, typ: NTI33554450, name: "overflow", sons: null}, +{kind: 1, offset: "overflowAnchor", len: 0, typ: NTI33554450, name: "overflowAnchor", sons: null}, +{kind: 1, offset: "overflowBlock", len: 0, typ: NTI33554450, name: "overflowBlock", sons: null}, +{kind: 1, offset: "overflowInline", len: 0, typ: NTI33554450, name: "overflowInline", sons: null}, +{kind: 1, offset: "overflowWrap", len: 0, typ: NTI33554450, name: "overflowWrap", sons: null}, +{kind: 1, offset: "overflowX", len: 0, typ: NTI33554450, name: "overflowX", sons: null}, +{kind: 1, offset: "overflowY", len: 0, typ: NTI33554450, name: "overflowY", sons: null}, +{kind: 1, offset: "overscrollBehavior", len: 0, typ: NTI33554450, name: "overscrollBehavior", sons: null}, +{kind: 1, offset: "overscrollBehaviorBlock", len: 0, typ: NTI33554450, name: "overscrollBehaviorBlock", sons: null}, +{kind: 1, offset: "overscrollBehaviorInline", len: 0, typ: NTI33554450, name: "overscrollBehaviorInline", sons: null}, +{kind: 1, offset: "overscrollBehaviorX", len: 0, typ: NTI33554450, name: "overscrollBehaviorX", sons: null}, +{kind: 1, offset: "overscrollBehaviorY", len: 0, typ: NTI33554450, name: "overscrollBehaviorY", sons: null}, +{kind: 1, offset: "padding", len: 0, typ: NTI33554450, name: "padding", sons: null}, +{kind: 1, offset: "paddingBlock", len: 0, typ: NTI33554450, name: "paddingBlock", sons: null}, +{kind: 1, offset: "paddingBlockEnd", len: 0, typ: NTI33554450, name: "paddingBlockEnd", sons: null}, +{kind: 1, offset: "paddingBlockStart", len: 0, typ: NTI33554450, name: "paddingBlockStart", sons: null}, +{kind: 1, offset: "paddingBottom", len: 0, typ: NTI33554450, name: "paddingBottom", sons: null}, +{kind: 1, offset: "paddingInline", len: 0, typ: NTI33554450, name: "paddingInline", sons: null}, +{kind: 1, offset: "paddingInlineEnd", len: 0, typ: NTI33554450, name: "paddingInlineEnd", sons: null}, +{kind: 1, offset: "paddingInlineStart", len: 0, typ: NTI33554450, name: "paddingInlineStart", sons: null}, +{kind: 1, offset: "paddingLeft", len: 0, typ: NTI33554450, name: "paddingLeft", sons: null}, +{kind: 1, offset: "paddingRight", len: 0, typ: NTI33554450, name: "paddingRight", sons: null}, +{kind: 1, offset: "paddingTop", len: 0, typ: NTI33554450, name: "paddingTop", sons: null}, +{kind: 1, offset: "pageBreakAfter", len: 0, typ: NTI33554450, name: "pageBreakAfter", sons: null}, +{kind: 1, offset: "pageBreakBefore", len: 0, typ: NTI33554450, name: "pageBreakBefore", sons: null}, +{kind: 1, offset: "pageBreakInside", len: 0, typ: NTI33554450, name: "pageBreakInside", sons: null}, +{kind: 1, offset: "paintOrder", len: 0, typ: NTI33554450, name: "paintOrder", sons: null}, +{kind: 1, offset: "perspective", len: 0, typ: NTI33554450, name: "perspective", sons: null}, +{kind: 1, offset: "perspectiveOrigin", len: 0, typ: NTI33554450, name: "perspectiveOrigin", sons: null}, +{kind: 1, offset: "placeContent", len: 0, typ: NTI33554450, name: "placeContent", sons: null}, +{kind: 1, offset: "placeItems", len: 0, typ: NTI33554450, name: "placeItems", sons: null}, +{kind: 1, offset: "placeSelf", len: 0, typ: NTI33554450, name: "placeSelf", sons: null}, +{kind: 1, offset: "pointerEvents", len: 0, typ: NTI33554450, name: "pointerEvents", sons: null}, +{kind: 1, offset: "position", len: 0, typ: NTI33554450, name: "position", sons: null}, +{kind: 1, offset: "quotes", len: 0, typ: NTI33554450, name: "quotes", sons: null}, +{kind: 1, offset: "resize", len: 0, typ: NTI33554450, name: "resize", sons: null}, +{kind: 1, offset: "right", len: 0, typ: NTI33554450, name: "right", sons: null}, +{kind: 1, offset: "rotate", len: 0, typ: NTI33554450, name: "rotate", sons: null}, +{kind: 1, offset: "rowGap", len: 0, typ: NTI33554450, name: "rowGap", sons: null}, +{kind: 1, offset: "scale", len: 0, typ: NTI33554450, name: "scale", sons: null}, +{kind: 1, offset: "scrollBehavior", len: 0, typ: NTI33554450, name: "scrollBehavior", sons: null}, +{kind: 1, offset: "scrollMargin", len: 0, typ: NTI33554450, name: "scrollMargin", sons: null}, +{kind: 1, offset: "scrollMarginBlock", len: 0, typ: NTI33554450, name: "scrollMarginBlock", sons: null}, +{kind: 1, offset: "scrollMarginBlockEnd", len: 0, typ: NTI33554450, name: "scrollMarginBlockEnd", sons: null}, +{kind: 1, offset: "scrollMarginBlockStart", len: 0, typ: NTI33554450, name: "scrollMarginBlockStart", sons: null}, +{kind: 1, offset: "scrollMarginBottom", len: 0, typ: NTI33554450, name: "scrollMarginBottom", sons: null}, +{kind: 1, offset: "scrollMarginInline", len: 0, typ: NTI33554450, name: "scrollMarginInline", sons: null}, +{kind: 1, offset: "scrollMarginInlineEnd", len: 0, typ: NTI33554450, name: "scrollMarginInlineEnd", sons: null}, +{kind: 1, offset: "scrollMarginInlineStart", len: 0, typ: NTI33554450, name: "scrollMarginInlineStart", sons: null}, +{kind: 1, offset: "scrollMarginLeft", len: 0, typ: NTI33554450, name: "scrollMarginLeft", sons: null}, +{kind: 1, offset: "scrollMarginRight", len: 0, typ: NTI33554450, name: "scrollMarginRight", sons: null}, +{kind: 1, offset: "scrollMarginTop", len: 0, typ: NTI33554450, name: "scrollMarginTop", sons: null}, +{kind: 1, offset: "scrollPadding", len: 0, typ: NTI33554450, name: "scrollPadding", sons: null}, +{kind: 1, offset: "scrollPaddingBlock", len: 0, typ: NTI33554450, name: "scrollPaddingBlock", sons: null}, +{kind: 1, offset: "scrollPaddingBlockEnd", len: 0, typ: NTI33554450, name: "scrollPaddingBlockEnd", sons: null}, +{kind: 1, offset: "scrollPaddingBlockStart", len: 0, typ: NTI33554450, name: "scrollPaddingBlockStart", sons: null}, +{kind: 1, offset: "scrollPaddingBottom", len: 0, typ: NTI33554450, name: "scrollPaddingBottom", sons: null}, +{kind: 1, offset: "scrollPaddingInline", len: 0, typ: NTI33554450, name: "scrollPaddingInline", sons: null}, +{kind: 1, offset: "scrollPaddingInlineEnd", len: 0, typ: NTI33554450, name: "scrollPaddingInlineEnd", sons: null}, +{kind: 1, offset: "scrollPaddingInlineStart", len: 0, typ: NTI33554450, name: "scrollPaddingInlineStart", sons: null}, +{kind: 1, offset: "scrollPaddingLeft", len: 0, typ: NTI33554450, name: "scrollPaddingLeft", sons: null}, +{kind: 1, offset: "scrollPaddingRight", len: 0, typ: NTI33554450, name: "scrollPaddingRight", sons: null}, +{kind: 1, offset: "scrollPaddingTop", len: 0, typ: NTI33554450, name: "scrollPaddingTop", sons: null}, +{kind: 1, offset: "scrollSnapAlign", len: 0, typ: NTI33554450, name: "scrollSnapAlign", sons: null}, +{kind: 1, offset: "scrollSnapStop", len: 0, typ: NTI33554450, name: "scrollSnapStop", sons: null}, +{kind: 1, offset: "scrollSnapType", len: 0, typ: NTI33554450, name: "scrollSnapType", sons: null}, +{kind: 1, offset: "scrollbar3dLightColor", len: 0, typ: NTI33554450, name: "scrollbar3dLightColor", sons: null}, +{kind: 1, offset: "scrollbarArrowColor", len: 0, typ: NTI33554450, name: "scrollbarArrowColor", sons: null}, +{kind: 1, offset: "scrollbarBaseColor", len: 0, typ: NTI33554450, name: "scrollbarBaseColor", sons: null}, +{kind: 1, offset: "scrollbarColor", len: 0, typ: NTI33554450, name: "scrollbarColor", sons: null}, +{kind: 1, offset: "scrollbarDarkshadowColor", len: 0, typ: NTI33554450, name: "scrollbarDarkshadowColor", sons: null}, +{kind: 1, offset: "scrollbarFaceColor", len: 0, typ: NTI33554450, name: "scrollbarFaceColor", sons: null}, +{kind: 1, offset: "scrollbarHighlightColor", len: 0, typ: NTI33554450, name: "scrollbarHighlightColor", sons: null}, +{kind: 1, offset: "scrollbarShadowColor", len: 0, typ: NTI33554450, name: "scrollbarShadowColor", sons: null}, +{kind: 1, offset: "scrollbarTrackColor", len: 0, typ: NTI33554450, name: "scrollbarTrackColor", sons: null}, +{kind: 1, offset: "scrollbarWidth", len: 0, typ: NTI33554450, name: "scrollbarWidth", sons: null}, +{kind: 1, offset: "shapeImageThreshold", len: 0, typ: NTI33554450, name: "shapeImageThreshold", sons: null}, +{kind: 1, offset: "shapeMargin", len: 0, typ: NTI33554450, name: "shapeMargin", sons: null}, +{kind: 1, offset: "shapeOutside", len: 0, typ: NTI33554450, name: "shapeOutside", sons: null}, +{kind: 1, offset: "tabSize", len: 0, typ: NTI33554450, name: "tabSize", sons: null}, +{kind: 1, offset: "tableLayout", len: 0, typ: NTI33554450, name: "tableLayout", sons: null}, +{kind: 1, offset: "textAlign", len: 0, typ: NTI33554450, name: "textAlign", sons: null}, +{kind: 1, offset: "textAlignLast", len: 0, typ: NTI33554450, name: "textAlignLast", sons: null}, +{kind: 1, offset: "textCombineUpright", len: 0, typ: NTI33554450, name: "textCombineUpright", sons: null}, +{kind: 1, offset: "textDecoration", len: 0, typ: NTI33554450, name: "textDecoration", sons: null}, +{kind: 1, offset: "textDecorationColor", len: 0, typ: NTI33554450, name: "textDecorationColor", sons: null}, +{kind: 1, offset: "textDecorationLine", len: 0, typ: NTI33554450, name: "textDecorationLine", sons: null}, +{kind: 1, offset: "textDecorationSkipInk", len: 0, typ: NTI33554450, name: "textDecorationSkipInk", sons: null}, +{kind: 1, offset: "textDecorationStyle", len: 0, typ: NTI33554450, name: "textDecorationStyle", sons: null}, +{kind: 1, offset: "textDecorationThickness", len: 0, typ: NTI33554450, name: "textDecorationThickness", sons: null}, +{kind: 1, offset: "textEmphasis", len: 0, typ: NTI33554450, name: "textEmphasis", sons: null}, +{kind: 1, offset: "textEmphasisColor", len: 0, typ: NTI33554450, name: "textEmphasisColor", sons: null}, +{kind: 1, offset: "textEmphasisPosition", len: 0, typ: NTI33554450, name: "textEmphasisPosition", sons: null}, +{kind: 1, offset: "textEmphasisStyle", len: 0, typ: NTI33554450, name: "textEmphasisStyle", sons: null}, +{kind: 1, offset: "textIndent", len: 0, typ: NTI33554450, name: "textIndent", sons: null}, +{kind: 1, offset: "textJustify", len: 0, typ: NTI33554450, name: "textJustify", sons: null}, +{kind: 1, offset: "textOrientation", len: 0, typ: NTI33554450, name: "textOrientation", sons: null}, +{kind: 1, offset: "textOverflow", len: 0, typ: NTI33554450, name: "textOverflow", sons: null}, +{kind: 1, offset: "textRendering", len: 0, typ: NTI33554450, name: "textRendering", sons: null}, +{kind: 1, offset: "textShadow", len: 0, typ: NTI33554450, name: "textShadow", sons: null}, +{kind: 1, offset: "textTransform", len: 0, typ: NTI33554450, name: "textTransform", sons: null}, +{kind: 1, offset: "textUnderlineOffset", len: 0, typ: NTI33554450, name: "textUnderlineOffset", sons: null}, +{kind: 1, offset: "textUnderlinePosition", len: 0, typ: NTI33554450, name: "textUnderlinePosition", sons: null}, +{kind: 1, offset: "top", len: 0, typ: NTI33554450, name: "top", sons: null}, +{kind: 1, offset: "touchAction", len: 0, typ: NTI33554450, name: "touchAction", sons: null}, +{kind: 1, offset: "transform", len: 0, typ: NTI33554450, name: "transform", sons: null}, +{kind: 1, offset: "transformBox", len: 0, typ: NTI33554450, name: "transformBox", sons: null}, +{kind: 1, offset: "transformOrigin", len: 0, typ: NTI33554450, name: "transformOrigin", sons: null}, +{kind: 1, offset: "transformStyle", len: 0, typ: NTI33554450, name: "transformStyle", sons: null}, +{kind: 1, offset: "transition", len: 0, typ: NTI33554450, name: "transition", sons: null}, +{kind: 1, offset: "transitionDelay", len: 0, typ: NTI33554450, name: "transitionDelay", sons: null}, +{kind: 1, offset: "transitionDuration", len: 0, typ: NTI33554450, name: "transitionDuration", sons: null}, +{kind: 1, offset: "transitionProperty", len: 0, typ: NTI33554450, name: "transitionProperty", sons: null}, +{kind: 1, offset: "transitionTimingFunction", len: 0, typ: NTI33554450, name: "transitionTimingFunction", sons: null}, +{kind: 1, offset: "translate", len: 0, typ: NTI33554450, name: "translate", sons: null}, +{kind: 1, offset: "unicodeBidi", len: 0, typ: NTI33554450, name: "unicodeBidi", sons: null}, +{kind: 1, offset: "verticalAlign", len: 0, typ: NTI33554450, name: "verticalAlign", sons: null}, +{kind: 1, offset: "visibility", len: 0, typ: NTI33554450, name: "visibility", sons: null}, +{kind: 1, offset: "whiteSpace", len: 0, typ: NTI33554450, name: "whiteSpace", sons: null}, +{kind: 1, offset: "widows", len: 0, typ: NTI33554450, name: "widows", sons: null}, +{kind: 1, offset: "width", len: 0, typ: NTI33554450, name: "width", sons: null}, +{kind: 1, offset: "willChange", len: 0, typ: NTI33554450, name: "willChange", sons: null}, +{kind: 1, offset: "wordBreak", len: 0, typ: NTI33554450, name: "wordBreak", sons: null}, +{kind: 1, offset: "wordSpacing", len: 0, typ: NTI33554450, name: "wordSpacing", sons: null}, +{kind: 1, offset: "writingMode", len: 0, typ: NTI33554450, name: "writingMode", sons: null}, +{kind: 1, offset: "zIndex", len: 0, typ: NTI33554450, name: "zIndex", sons: null}]}; +NTI1325400206.node = NNI1325400206; +NTI1325400206.base = NTI33555179; +NTI1325400094.base = NTI1325400206; +var NNI1325400178 = {kind: 2, len: 22, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "attributes", len: 0, typ: NTI1325400179, name: "attributes", sons: null}, +{kind: 1, offset: "childNodes", len: 0, typ: NTI1325400180, name: "childNodes", sons: null}, +{kind: 1, offset: "children", len: 0, typ: NTI1325400181, name: "children", sons: null}, +{kind: 1, offset: "data", len: 0, typ: NTI33554450, name: "data", sons: null}, +{kind: 1, offset: "firstChild", len: 0, typ: NTI1325400080, name: "firstChild", sons: null}, +{kind: 1, offset: "lastChild", len: 0, typ: NTI1325400080, name: "lastChild", sons: null}, +{kind: 1, offset: "nextSibling", len: 0, typ: NTI1325400080, name: "nextSibling", sons: null}, +{kind: 1, offset: "nodeName", len: 0, typ: NTI33554450, name: "nodeName", sons: null}, +{kind: 1, offset: "nodeType", len: 0, typ: NTI1325400079, name: "nodeType", sons: null}, +{kind: 1, offset: "nodeValue", len: 0, typ: NTI33554450, name: "nodeValue", sons: null}, +{kind: 1, offset: "parentNode", len: 0, typ: NTI1325400080, name: "parentNode", sons: null}, +{kind: 1, offset: "content", len: 0, typ: NTI1325400080, name: "content", sons: null}, +{kind: 1, offset: "previousSibling", len: 0, typ: NTI1325400080, name: "previousSibling", sons: null}, +{kind: 1, offset: "ownerDocument", len: 0, typ: NTI1325400081, name: "ownerDocument", sons: null}, +{kind: 1, offset: "innerHTML", len: 0, typ: NTI33554450, name: "innerHTML", sons: null}, +{kind: 1, offset: "outerHTML", len: 0, typ: NTI33554450, name: "outerHTML", sons: null}, +{kind: 1, offset: "innerText", len: 0, typ: NTI33554450, name: "innerText", sons: null}, +{kind: 1, offset: "textContent", len: 0, typ: NTI33554450, name: "textContent", sons: null}, +{kind: 1, offset: "style", len: 0, typ: NTI1325400094, name: "style", sons: null}, +{kind: 1, offset: "baseURI", len: 0, typ: NTI33554450, name: "baseURI", sons: null}, +{kind: 1, offset: "parentElement", len: 0, typ: NTI1325400082, name: "parentElement", sons: null}, +{kind: 1, offset: "isConnected", len: 0, typ: NTI33554466, name: "isConnected", sons: null}]}; +NTI1325400178.node = NNI1325400178; +var NNI1325400133 = {kind: 2, len: 24, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "onabort", len: 0, typ: NTI1325400134, name: "onabort", sons: null}, +{kind: 1, offset: "onblur", len: 0, typ: NTI1325400135, name: "onblur", sons: null}, +{kind: 1, offset: "onchange", len: 0, typ: NTI1325400136, name: "onchange", sons: null}, +{kind: 1, offset: "onclick", len: 0, typ: NTI1325400137, name: "onclick", sons: null}, +{kind: 1, offset: "ondblclick", len: 0, typ: NTI1325400138, name: "ondblclick", sons: null}, +{kind: 1, offset: "onerror", len: 0, typ: NTI1325400139, name: "onerror", sons: null}, +{kind: 1, offset: "onfocus", len: 0, typ: NTI1325400140, name: "onfocus", sons: null}, +{kind: 1, offset: "onkeydown", len: 0, typ: NTI1325400141, name: "onkeydown", sons: null}, +{kind: 1, offset: "onkeypress", len: 0, typ: NTI1325400142, name: "onkeypress", sons: null}, +{kind: 1, offset: "onkeyup", len: 0, typ: NTI1325400143, name: "onkeyup", sons: null}, +{kind: 1, offset: "onload", len: 0, typ: NTI1325400144, name: "onload", sons: null}, +{kind: 1, offset: "onmousedown", len: 0, typ: NTI1325400145, name: "onmousedown", sons: null}, +{kind: 1, offset: "onmousemove", len: 0, typ: NTI1325400146, name: "onmousemove", sons: null}, +{kind: 1, offset: "onmouseout", len: 0, typ: NTI1325400147, name: "onmouseout", sons: null}, +{kind: 1, offset: "onmouseover", len: 0, typ: NTI1325400148, name: "onmouseover", sons: null}, +{kind: 1, offset: "onmouseup", len: 0, typ: NTI1325400149, name: "onmouseup", sons: null}, +{kind: 1, offset: "onreset", len: 0, typ: NTI1325400150, name: "onreset", sons: null}, +{kind: 1, offset: "onselect", len: 0, typ: NTI1325400151, name: "onselect", sons: null}, +{kind: 1, offset: "onstorage", len: 0, typ: NTI1325400152, name: "onstorage", sons: null}, +{kind: 1, offset: "onsubmit", len: 0, typ: NTI1325400153, name: "onsubmit", sons: null}, +{kind: 1, offset: "onunload", len: 0, typ: NTI1325400154, name: "onunload", sons: null}, +{kind: 1, offset: "onloadstart", len: 0, typ: NTI1325400155, name: "onloadstart", sons: null}, +{kind: 1, offset: "onprogress", len: 0, typ: NTI1325400156, name: "onprogress", sons: null}, +{kind: 1, offset: "onloadend", len: 0, typ: NTI1325400157, name: "onloadend", sons: null}]}; +NTI1325400133.node = NNI1325400133; +NTI1325400133.base = NTI33555179; +NTI1325400178.base = NTI1325400133; +NTI1325400080.base = NTI1325400178; +var NNI1409286247 = {kind: 2, len: 10, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "kind", len: 0, typ: NTI1409286147, name: "kind", sons: null}, +{kind: 1, offset: "index", len: 0, typ: NTI33554435, name: "index", sons: null}, +{kind: 1, offset: "id", len: 0, typ: NTI33554450, name: "id", sons: null}, +{kind: 1, offset: "class", len: 0, typ: NTI33554450, name: "class", sons: null}, +{kind: 1, offset: "text", len: 0, typ: NTI33554450, name: "text", sons: null}, +{kind: 1, offset: "kids", len: 0, typ: NTI1409286248, name: "kids", sons: null}, +{kind: 1, offset: "attrs", len: 0, typ: NTI1409286249, name: "attrs", sons: null}, +{kind: 1, offset: "events", len: 0, typ: NTI1409286242, name: "events", sons: null}, +{kind: 1, offset: "style", len: 0, typ: NTI1476395060, name: "style", sons: null}, +{kind: 1, offset: "dom", len: 0, typ: NTI1325400080, name: "dom", sons: null}]}; +NTI1409286247.node = NNI1409286247; +NTI1409286247.base = NTI33555179; +NTI1409286244.base = NTI1409286247; +var NNI1409286250 = {kind: 2, len: 10, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "key", len: 0, typ: NTI33554450, name: "key", sons: null}, +{kind: 1, offset: "renderImpl", len: 0, typ: NTI1409286251, name: "renderImpl", sons: null}, +{kind: 1, offset: "changedImpl", len: 0, typ: NTI1409286252, name: "changedImpl", sons: null}, +{kind: 1, offset: "updatedImpl", len: 0, typ: NTI1409286253, name: "updatedImpl", sons: null}, +{kind: 1, offset: "onAttachImpl", len: 0, typ: NTI1409286254, name: "onAttachImpl", sons: null}, +{kind: 1, offset: "onDetachImpl", len: 0, typ: NTI1409286255, name: "onDetachImpl", sons: null}, +{kind: 1, offset: "version", len: 0, typ: NTI33554435, name: "version", sons: null}, +{kind: 1, offset: "renderedVersion", len: 0, typ: NTI33554435, name: "renderedVersion", sons: null}, +{kind: 1, offset: "expanded", len: 0, typ: NTI1409286244, name: "expanded", sons: null}, +{kind: 1, offset: "debugId", len: 0, typ: NTI33554435, name: "debugId", sons: null}]}; +NTI1409286250.node = NNI1409286250; +NTI1409286250.base = NTI1409286247; +NTI1996488708.base = NTI1409286250; +NTI1996488707.base = NTI1996488708; +var NNI1979711492 = {kind: 2, len: 9, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "list", len: 0, typ: NTI1979711498, name: "list", sons: null}, +{kind: 1, offset: "selectedCategoryID", len: 0, typ: NTI33554435, name: "selectedCategoryID", sons: null}, +{kind: 1, offset: "loading", len: 0, typ: NTI33554466, name: "loading", sons: null}, +{kind: 1, offset: "addEnabled", len: 0, typ: NTI33554466, name: "addEnabled", sons: null}, +{kind: 1, offset: "status", len: 0, typ: NTI822083613, name: "status", sons: null}, +{kind: 1, offset: "error", len: 0, typ: NTI1946157155, name: "error", sons: null}, +{kind: 1, offset: "addCategoryModal", len: 0, typ: NTI1996488707, name: "addCategoryModal", sons: null}, +{kind: 1, offset: "onCategoryChange", len: 0, typ: NTI1845493770, name: "onCategoryChange", sons: null}, +{kind: 1, offset: "onAddCategory", len: 0, typ: NTI1845493769, name: "onAddCategory", sons: null}]}; +NTI1979711492.node = NNI1979711492; +NTI1979711492.base = NTI1409286250; +var NNI771751959 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI771751959.node = NNI771751959; +NTI771751959.base = NTI33555184; +var NNI134217742 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI134217742.node = NNI134217742; +NTI134217742.base = NTI134217741; +NTI2063597573.base = NTI1593835523; +NTI2097152007.base = NTI1929379844; +var NNI2097152003 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "creation", len: 0, typ: NTI33554439, name: "creation", sons: null}, +{kind: 1, offset: "content", len: 0, typ: NTI33554449, name: "content", sons: null}]}; +NTI2097152003.node = NNI2097152003; +NTI2097152008.base = NTI2097152003; +NTI2097152009.base = NTI33554435; +var NNI1929379857 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI1929379844, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI1929379857.node = NNI1929379857; +var NNI2097152005 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "creation", len: 0, typ: NTI33554439, name: "creation", sons: null}, +{kind: 1, offset: "topic", len: 0, typ: NTI33554449, name: "topic", sons: null}, +{kind: 1, offset: "threadId", len: 0, typ: NTI33554435, name: "threadId", sons: null}, +{kind: 1, offset: "postId", len: 0, typ: NTI33554435, name: "postId", sons: null}, +{kind: 1, offset: "author", len: 0, typ: NTI1929379857, name: "author", sons: null}]}; +NTI2097152005.node = NNI2097152005; +var NNI2097152015 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI2097152005, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2097152015.node = NNI2097152015; +var NNI2097152006 = {kind: 2, len: 8, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "id", len: 0, typ: NTI33554435, name: "id", sons: null}, +{kind: 1, offset: "author", len: 0, typ: NTI1929379844, name: "author", sons: null}, +{kind: 1, offset: "likes", len: 0, typ: NTI2097152007, name: "likes", sons: null}, +{kind: 1, offset: "seen", len: 0, typ: NTI33554466, name: "seen", sons: null}, +{kind: 1, offset: "history", len: 0, typ: NTI2097152008, name: "history", sons: null}, +{kind: 1, offset: "info", len: 0, typ: NTI2097152003, name: "info", sons: null}, +{kind: 1, offset: "moreBefore", len: 0, typ: NTI2097152009, name: "moreBefore", sons: null}, +{kind: 1, offset: "replyingTo", len: 0, typ: NTI2097152015, name: "replyingTo", sons: null}]}; +NTI2097152006.node = NNI2097152006; +NTI2097152004.base = NTI2097152006; +NTI2063597574.base = NTI2097152004; +var NNI2063597572 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "thread", len: 0, typ: NTI1593835523, name: "thread", sons: null}, +{kind: 1, offset: "history", len: 0, typ: NTI2063597573, name: "history", sons: null}, +{kind: 1, offset: "posts", len: 0, typ: NTI2063597574, name: "posts", sons: null}]}; +NTI2063597572.node = NNI2063597572; +NTI2063597571.base = NTI2063597572; +var NNI2063597636 = {kind: 1, offset: "val", len: 0, typ: NTI2063597571, name: "val", sons: null}; +NTI2063597636.node = NNI2063597636; +var NNI2063597582 = {kind: 1, offset: "val", len: 0, typ: NTI2063597571, name: "val", sons: null}; +NTI2063597582.node = NNI2063597582; +var NNI2130706757 = {kind: 1, offset: "val", len: 0, typ: NTI2097152004, name: "val", sons: null}; +NTI2130706757.node = NNI2130706757; +var NNI2113929478 = {kind: 1, offset: "val", len: 0, typ: NTI2097152004, name: "val", sons: null}; +NTI2113929478.node = NNI2113929478; +var NNI134217750 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI134217750.node = NNI134217750; +NTI134217750.base = NTI33555184; +var NNI1644167171 = {kind: 2, offset: 0, typ: null, name: null, len: 7, sons: {"0": {kind: 1, offset: 0, typ: NTI1644167171, name: "JNull", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1644167171, name: "JBool", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1644167171, name: "JInt", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1644167171, name: "JFloat", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1644167171, name: "JString", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1644167171, name: "JObject", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI1644167171, name: "JArray", len: 0, sons: null}}}; +NTI1644167171.node = NNI1644167171; +NTI1644167189.base = NTI1644167172; +var NNI1644167173 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "isUnquoted", len: 0, typ: NTI33554466, name: "isUnquoted", sons: null}, +{kind: 3, offset: "kind", len: 7, typ: NTI1644167171, name: "kind", sons: [[setConstr(4), {kind: 1, offset: "str", len: 0, typ: NTI33554449, name: "str", sons: null}], +[setConstr(2), {kind: 1, offset: "num", len: 0, typ: NTI184549379, name: "num", sons: null}], +[setConstr(3), {kind: 1, offset: "fnum", len: 0, typ: NTI33554445, name: "fnum", sons: null}], +[setConstr(1), {kind: 1, offset: "bval", len: 0, typ: NTI33554466, name: "bval", sons: null}], +[setConstr(0), {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}], +[setConstr(5), {kind: 1, offset: "fields", len: 0, typ: NTI1644167182, name: "fields", sons: null}], +[setConstr(6), {kind: 1, offset: "elems", len: 0, typ: NTI1644167189, name: "elems", sons: null}]]}]}; +NTI1644167173.node = NNI1644167173; +NTI1644167172.base = NTI1644167173; +var NNI1644167188 = {kind: 2, len: 4, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI889192451, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554435, name: "Field1", sons: null}, +{kind: 1, offset: "Field2", len: 0, typ: NTI33554449, name: "Field2", sons: null}, +{kind: 1, offset: "Field3", len: 0, typ: NTI1644167172, name: "Field3", sons: null}]}; +NTI1644167188.node = NNI1644167188; +NTI1644167185.base = NTI1644167188; +var NNI1644167182 = {kind: 2, len: 4, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "data", len: 0, typ: NTI1644167185, name: "data", sons: null}, +{kind: 1, offset: "counter", len: 0, typ: NTI33554435, name: "counter", sons: null}, +{kind: 1, offset: "first", len: 0, typ: NTI33554435, name: "first", sons: null}, +{kind: 1, offset: "last", len: 0, typ: NTI33554435, name: "last", sons: null}]}; +NTI1644167182.node = NNI1644167182; +var NNI2063598432 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554449, name: "Field1", sons: null}]}; +NTI2063598432.node = NNI2063598432; +var NNI1375731717 = {kind: 2, offset: 0, typ: null, name: null, len: 6, sons: {"0": {kind: 1, offset: 0, typ: NTI1375731717, name: "pkReplace", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1375731717, name: "pkRemove", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1375731717, name: "pkAppend", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1375731717, name: "pkInsertBefore", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1375731717, name: "pkDetach", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1375731717, name: "pkSame", len: 0, sons: null}}}; +NTI1375731717.node = NNI1375731717; +var NNI1375731718 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "k", len: 0, typ: NTI1375731717, name: "k", sons: null}, +{kind: 1, offset: "parent", len: 0, typ: NTI1325400080, name: "parent", sons: null}, +{kind: 1, offset: "current", len: 0, typ: NTI1325400080, name: "current", sons: null}, +{kind: 1, offset: "newNode", len: 0, typ: NTI1409286244, name: "newNode", sons: null}, +{kind: 1, offset: "oldNode", len: 0, typ: NTI1409286244, name: "oldNode", sons: null}]}; +NTI1375731718.node = NNI1375731718; +var NNI1375731719 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI1409286244, name: "parent", sons: null}, +{kind: 1, offset: "newChild", len: 0, typ: NTI1409286244, name: "newChild", sons: null}, +{kind: 1, offset: "pos", len: 0, typ: NTI33554435, name: "pos", sons: null}]}; +NTI1375731719.node = NNI1375731719; +var NNI889192800 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554444, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554444, name: "Field1", sons: null}]}; +NTI889192800.node = NNI889192800; +NTI2063598283.base = NTI2097152004; +var NNI134217747 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI134217747.node = NNI134217747; +var NNI134217746 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI134217746.node = NNI134217746; +var NNI33555185 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555185.node = NNI33555185; +NTI33555185.base = NTI33555183; +NTI134217746.base = NTI33555185; +NTI134217747.base = NTI134217746; +var NNI1761607688 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI1761607688.node = NNI1761607688; +NTI1761607688.base = NTI134217746; +NTI2063598374.base = NTI33554435; +NTI1627389967.base = NTI1627390003; +var NNI1627389970 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "seconds", len: 0, typ: NTI33554439, name: "seconds", sons: null}, +{kind: 1, offset: "nanosecond", len: 0, typ: NTI1627389967, name: "nanosecond", sons: null}]}; +NTI1627389970.node = NNI1627389970; +var NNI2097152105 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI33554449, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2097152105.node = NNI2097152105; +var NNI2181038083 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "user", len: 0, typ: NTI1929379857, name: "user", sons: null}, +{kind: 1, offset: "recaptchaSiteKey", len: 0, typ: NTI2097152105, name: "recaptchaSiteKey", sons: null}]}; +NTI2181038083.node = NNI2181038083; +var NNI2181038135 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI2181038083, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2181038135.node = NNI2181038135; +var NNI2181038097 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI2181038083, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2181038097.node = NNI2181038097; +var NNI1627389972 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "seconds", len: 0, typ: NTI33554439, name: "seconds", sons: null}, +{kind: 1, offset: "nanosecond", len: 0, typ: NTI1627389967, name: "nanosecond", sons: null}]}; +NTI1627389972.node = NNI1627389972; +var NNI2181038306 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554449, name: "Field1", sons: null}]}; +NTI2181038306.node = NNI2181038306; +var NNI1325400233 = {kind: 2, len: 9, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "hash", len: 0, typ: NTI33554450, name: "hash", sons: null}, +{kind: 1, offset: "host", len: 0, typ: NTI33554450, name: "host", sons: null}, +{kind: 1, offset: "hostname", len: 0, typ: NTI33554450, name: "hostname", sons: null}, +{kind: 1, offset: "href", len: 0, typ: NTI33554450, name: "href", sons: null}, +{kind: 1, offset: "pathname", len: 0, typ: NTI33554450, name: "pathname", sons: null}, +{kind: 1, offset: "port", len: 0, typ: NTI33554450, name: "port", sons: null}, +{kind: 1, offset: "protocol", len: 0, typ: NTI33554450, name: "protocol", sons: null}, +{kind: 1, offset: "search", len: 0, typ: NTI33554450, name: "search", sons: null}, +{kind: 1, offset: "origin", len: 0, typ: NTI33554450, name: "origin", sons: null}]}; +NTI1325400233.node = NNI1325400233; +NTI1325400233.base = NTI33555179; +var NNI2415919107 = {kind: 2, offset: 0, typ: null, name: null, len: 2, sons: {"0": {kind: 1, offset: 0, typ: NTI2415919107, name: "ThreadMatch", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI2415919107, name: "PostMatch", len: 0, sons: null}}}; +NTI2415919107.node = NNI2415919107; +var NNI2415919108 = {kind: 2, len: 7, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "kind", len: 0, typ: NTI2415919107, name: "kind", sons: null}, +{kind: 1, offset: "threadId", len: 0, typ: NTI33554435, name: "threadId", sons: null}, +{kind: 1, offset: "postId", len: 0, typ: NTI33554435, name: "postId", sons: null}, +{kind: 1, offset: "threadTitle", len: 0, typ: NTI33554449, name: "threadTitle", sons: null}, +{kind: 1, offset: "postContent", len: 0, typ: NTI33554449, name: "postContent", sons: null}, +{kind: 1, offset: "author", len: 0, typ: NTI1929379844, name: "author", sons: null}, +{kind: 1, offset: "creation", len: 0, typ: NTI33554439, name: "creation", sons: null}]}; +NTI2415919108.node = NNI2415919108; +NTI2415919133.base = NTI2415919108; +var NNI2415919159 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI2415919133, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2415919159.node = NNI2415919159; +NTI2415919116.base = NTI2415919108; +var NNI2415919121 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI2415919116, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2415919121.node = NNI2415919121; +var NNI2181038435 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI1929379844, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2181038435.node = NNI2181038435; +var NNI2181038344 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI1929379857, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2181038344.node = NNI2181038344; +var NNI2181038390 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI1929379857, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2181038390.node = NNI2181038390; +NTI1409286435.base = NTI33554450; +var NNI1476395011 = {kind: 2, offset: 0, typ: null, name: null, len: 191, sons: {"0": {kind: 1, offset: 0, typ: NTI1476395011, name: "alignContent", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1476395011, name: "alignItems", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1476395011, name: "alignSelf", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1476395011, name: "animation", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1476395011, name: "animationDelay", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1476395011, name: "animationDirection", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI1476395011, name: "animationDuration", len: 0, sons: null}, +"7": {kind: 1, offset: 7, typ: NTI1476395011, name: "animationFillMode", len: 0, sons: null}, +"8": {kind: 1, offset: 8, typ: NTI1476395011, name: "animationIterationCount", len: 0, sons: null}, +"9": {kind: 1, offset: 9, typ: NTI1476395011, name: "animationName", len: 0, sons: null}, +"10": {kind: 1, offset: 10, typ: NTI1476395011, name: "animationTimingFunction", len: 0, sons: null}, +"11": {kind: 1, offset: 11, typ: NTI1476395011, name: "animationPlayState", len: 0, sons: null}, +"12": {kind: 1, offset: 12, typ: NTI1476395011, name: "background", len: 0, sons: null}, +"13": {kind: 1, offset: 13, typ: NTI1476395011, name: "backgroundAttachment", len: 0, sons: null}, +"14": {kind: 1, offset: 14, typ: NTI1476395011, name: "backgroundColor", len: 0, sons: null}, +"15": {kind: 1, offset: 15, typ: NTI1476395011, name: "backgroundImage", len: 0, sons: null}, +"16": {kind: 1, offset: 16, typ: NTI1476395011, name: "backgroundPosition", len: 0, sons: null}, +"17": {kind: 1, offset: 17, typ: NTI1476395011, name: "backgroundRepeat", len: 0, sons: null}, +"18": {kind: 1, offset: 18, typ: NTI1476395011, name: "backgroundClip", len: 0, sons: null}, +"19": {kind: 1, offset: 19, typ: NTI1476395011, name: "backgroundOrigin", len: 0, sons: null}, +"20": {kind: 1, offset: 20, typ: NTI1476395011, name: "backgroundSize", len: 0, sons: null}, +"21": {kind: 1, offset: 21, typ: NTI1476395011, name: "backfaceVisibility", len: 0, sons: null}, +"22": {kind: 1, offset: 22, typ: NTI1476395011, name: "border", len: 0, sons: null}, +"23": {kind: 1, offset: 23, typ: NTI1476395011, name: "borderBottom", len: 0, sons: null}, +"24": {kind: 1, offset: 24, typ: NTI1476395011, name: "borderBottomColor", len: 0, sons: null}, +"25": {kind: 1, offset: 25, typ: NTI1476395011, name: "borderBottomLeftRadius", len: 0, sons: null}, +"26": {kind: 1, offset: 26, typ: NTI1476395011, name: "borderBottomRightRadius", len: 0, sons: null}, +"27": {kind: 1, offset: 27, typ: NTI1476395011, name: "borderBottomStyle", len: 0, sons: null}, +"28": {kind: 1, offset: 28, typ: NTI1476395011, name: "borderBottomWidth", len: 0, sons: null}, +"29": {kind: 1, offset: 29, typ: NTI1476395011, name: "borderCollapse", len: 0, sons: null}, +"30": {kind: 1, offset: 30, typ: NTI1476395011, name: "borderColor", len: 0, sons: null}, +"31": {kind: 1, offset: 31, typ: NTI1476395011, name: "borderImage", len: 0, sons: null}, +"32": {kind: 1, offset: 32, typ: NTI1476395011, name: "borderImageOutset", len: 0, sons: null}, +"33": {kind: 1, offset: 33, typ: NTI1476395011, name: "borderImageRepeat", len: 0, sons: null}, +"34": {kind: 1, offset: 34, typ: NTI1476395011, name: "borderImageSlice", len: 0, sons: null}, +"35": {kind: 1, offset: 35, typ: NTI1476395011, name: "borderImageSource", len: 0, sons: null}, +"36": {kind: 1, offset: 36, typ: NTI1476395011, name: "borderImageWidth", len: 0, sons: null}, +"37": {kind: 1, offset: 37, typ: NTI1476395011, name: "borderLeft", len: 0, sons: null}, +"38": {kind: 1, offset: 38, typ: NTI1476395011, name: "borderLeftColor", len: 0, sons: null}, +"39": {kind: 1, offset: 39, typ: NTI1476395011, name: "borderLeftStyle", len: 0, sons: null}, +"40": {kind: 1, offset: 40, typ: NTI1476395011, name: "borderLeftWidth", len: 0, sons: null}, +"41": {kind: 1, offset: 41, typ: NTI1476395011, name: "borderRadius", len: 0, sons: null}, +"42": {kind: 1, offset: 42, typ: NTI1476395011, name: "borderRight", len: 0, sons: null}, +"43": {kind: 1, offset: 43, typ: NTI1476395011, name: "borderRightColor", len: 0, sons: null}, +"44": {kind: 1, offset: 44, typ: NTI1476395011, name: "borderRightStyle", len: 0, sons: null}, +"45": {kind: 1, offset: 45, typ: NTI1476395011, name: "borderRightWidth", len: 0, sons: null}, +"46": {kind: 1, offset: 46, typ: NTI1476395011, name: "borderSpacing", len: 0, sons: null}, +"47": {kind: 1, offset: 47, typ: NTI1476395011, name: "borderStyle", len: 0, sons: null}, +"48": {kind: 1, offset: 48, typ: NTI1476395011, name: "borderTop", len: 0, sons: null}, +"49": {kind: 1, offset: 49, typ: NTI1476395011, name: "borderTopColor", len: 0, sons: null}, +"50": {kind: 1, offset: 50, typ: NTI1476395011, name: "borderTopLeftRadius", len: 0, sons: null}, +"51": {kind: 1, offset: 51, typ: NTI1476395011, name: "borderTopRightRadius", len: 0, sons: null}, +"52": {kind: 1, offset: 52, typ: NTI1476395011, name: "borderTopStyle", len: 0, sons: null}, +"53": {kind: 1, offset: 53, typ: NTI1476395011, name: "borderTopWidth", len: 0, sons: null}, +"54": {kind: 1, offset: 54, typ: NTI1476395011, name: "borderWidth", len: 0, sons: null}, +"55": {kind: 1, offset: 55, typ: NTI1476395011, name: "bottom", len: 0, sons: null}, +"56": {kind: 1, offset: 56, typ: NTI1476395011, name: "boxDecorationBreak", len: 0, sons: null}, +"57": {kind: 1, offset: 57, typ: NTI1476395011, name: "boxShadow", len: 0, sons: null}, +"58": {kind: 1, offset: 58, typ: NTI1476395011, name: "boxSizing", len: 0, sons: null}, +"59": {kind: 1, offset: 59, typ: NTI1476395011, name: "captionSide", len: 0, sons: null}, +"60": {kind: 1, offset: 60, typ: NTI1476395011, name: "clear", len: 0, sons: null}, +"61": {kind: 1, offset: 61, typ: NTI1476395011, name: "clip", len: 0, sons: null}, +"62": {kind: 1, offset: 62, typ: NTI1476395011, name: "color", len: 0, sons: null}, +"63": {kind: 1, offset: 63, typ: NTI1476395011, name: "columnCount", len: 0, sons: null}, +"64": {kind: 1, offset: 64, typ: NTI1476395011, name: "columnFill", len: 0, sons: null}, +"65": {kind: 1, offset: 65, typ: NTI1476395011, name: "columnGap", len: 0, sons: null}, +"66": {kind: 1, offset: 66, typ: NTI1476395011, name: "columnRule", len: 0, sons: null}, +"67": {kind: 1, offset: 67, typ: NTI1476395011, name: "columnRuleColor", len: 0, sons: null}, +"68": {kind: 1, offset: 68, typ: NTI1476395011, name: "columnRuleStyle", len: 0, sons: null}, +"69": {kind: 1, offset: 69, typ: NTI1476395011, name: "columnRuleWidth", len: 0, sons: null}, +"70": {kind: 1, offset: 70, typ: NTI1476395011, name: "columns", len: 0, sons: null}, +"71": {kind: 1, offset: 71, typ: NTI1476395011, name: "columnSpan", len: 0, sons: null}, +"72": {kind: 1, offset: 72, typ: NTI1476395011, name: "columnWidth", len: 0, sons: null}, +"73": {kind: 1, offset: 73, typ: NTI1476395011, name: "content", len: 0, sons: null}, +"74": {kind: 1, offset: 74, typ: NTI1476395011, name: "counterIncrement", len: 0, sons: null}, +"75": {kind: 1, offset: 75, typ: NTI1476395011, name: "counterReset", len: 0, sons: null}, +"76": {kind: 1, offset: 76, typ: NTI1476395011, name: "cursor", len: 0, sons: null}, +"77": {kind: 1, offset: 77, typ: NTI1476395011, name: "direction", len: 0, sons: null}, +"78": {kind: 1, offset: 78, typ: NTI1476395011, name: "display", len: 0, sons: null}, +"79": {kind: 1, offset: 79, typ: NTI1476395011, name: "emptyCells", len: 0, sons: null}, +"80": {kind: 1, offset: 80, typ: NTI1476395011, name: "filter", len: 0, sons: null}, +"81": {kind: 1, offset: 81, typ: NTI1476395011, name: "flex", len: 0, sons: null}, +"82": {kind: 1, offset: 82, typ: NTI1476395011, name: "flexBasis", len: 0, sons: null}, +"83": {kind: 1, offset: 83, typ: NTI1476395011, name: "flexDirection", len: 0, sons: null}, +"84": {kind: 1, offset: 84, typ: NTI1476395011, name: "flexFlow", len: 0, sons: null}, +"85": {kind: 1, offset: 85, typ: NTI1476395011, name: "flexGrow", len: 0, sons: null}, +"86": {kind: 1, offset: 86, typ: NTI1476395011, name: "flexShrink", len: 0, sons: null}, +"87": {kind: 1, offset: 87, typ: NTI1476395011, name: "flexWrap", len: 0, sons: null}, +"88": {kind: 1, offset: 88, typ: NTI1476395011, name: "cssFloat", len: 0, sons: null}, +"89": {kind: 1, offset: 89, typ: NTI1476395011, name: "font", len: 0, sons: null}, +"90": {kind: 1, offset: 90, typ: NTI1476395011, name: "fontFamily", len: 0, sons: null}, +"91": {kind: 1, offset: 91, typ: NTI1476395011, name: "fontSize", len: 0, sons: null}, +"92": {kind: 1, offset: 92, typ: NTI1476395011, name: "fontSizeAdjust", len: 0, sons: null}, +"93": {kind: 1, offset: 93, typ: NTI1476395011, name: "fontStretch", len: 0, sons: null}, +"94": {kind: 1, offset: 94, typ: NTI1476395011, name: "fontStyle", len: 0, sons: null}, +"95": {kind: 1, offset: 95, typ: NTI1476395011, name: "fontVariant", len: 0, sons: null}, +"96": {kind: 1, offset: 96, typ: NTI1476395011, name: "fontWeight", len: 0, sons: null}, +"97": {kind: 1, offset: 97, typ: NTI1476395011, name: "hangingPunctuation", len: 0, sons: null}, +"98": {kind: 1, offset: 98, typ: NTI1476395011, name: "height", len: 0, sons: null}, +"99": {kind: 1, offset: 99, typ: NTI1476395011, name: "hyphens", len: 0, sons: null}, +"100": {kind: 1, offset: 100, typ: NTI1476395011, name: "icon", len: 0, sons: null}, +"101": {kind: 1, offset: 101, typ: NTI1476395011, name: "imageOrientation", len: 0, sons: null}, +"102": {kind: 1, offset: 102, typ: NTI1476395011, name: "justifyContent", len: 0, sons: null}, +"103": {kind: 1, offset: 103, typ: NTI1476395011, name: "left", len: 0, sons: null}, +"104": {kind: 1, offset: 104, typ: NTI1476395011, name: "letterSpacing", len: 0, sons: null}, +"105": {kind: 1, offset: 105, typ: NTI1476395011, name: "lineHeight", len: 0, sons: null}, +"106": {kind: 1, offset: 106, typ: NTI1476395011, name: "listStyle", len: 0, sons: null}, +"107": {kind: 1, offset: 107, typ: NTI1476395011, name: "listStyleImage", len: 0, sons: null}, +"108": {kind: 1, offset: 108, typ: NTI1476395011, name: "listStylePosition", len: 0, sons: null}, +"109": {kind: 1, offset: 109, typ: NTI1476395011, name: "listStyleType", len: 0, sons: null}, +"110": {kind: 1, offset: 110, typ: NTI1476395011, name: "margin", len: 0, sons: null}, +"111": {kind: 1, offset: 111, typ: NTI1476395011, name: "marginBottom", len: 0, sons: null}, +"112": {kind: 1, offset: 112, typ: NTI1476395011, name: "marginLeft", len: 0, sons: null}, +"113": {kind: 1, offset: 113, typ: NTI1476395011, name: "marginRight", len: 0, sons: null}, +"114": {kind: 1, offset: 114, typ: NTI1476395011, name: "marginTop", len: 0, sons: null}, +"115": {kind: 1, offset: 115, typ: NTI1476395011, name: "maxHeight", len: 0, sons: null}, +"116": {kind: 1, offset: 116, typ: NTI1476395011, name: "maxWidth", len: 0, sons: null}, +"117": {kind: 1, offset: 117, typ: NTI1476395011, name: "minHeight", len: 0, sons: null}, +"118": {kind: 1, offset: 118, typ: NTI1476395011, name: "minWidth", len: 0, sons: null}, +"119": {kind: 1, offset: 119, typ: NTI1476395011, name: "navDown", len: 0, sons: null}, +"120": {kind: 1, offset: 120, typ: NTI1476395011, name: "navIndex", len: 0, sons: null}, +"121": {kind: 1, offset: 121, typ: NTI1476395011, name: "navLeft", len: 0, sons: null}, +"122": {kind: 1, offset: 122, typ: NTI1476395011, name: "navRight", len: 0, sons: null}, +"123": {kind: 1, offset: 123, typ: NTI1476395011, name: "navUp", len: 0, sons: null}, +"124": {kind: 1, offset: 124, typ: NTI1476395011, name: "opacity", len: 0, sons: null}, +"125": {kind: 1, offset: 125, typ: NTI1476395011, name: "order", len: 0, sons: null}, +"126": {kind: 1, offset: 126, typ: NTI1476395011, name: "orphans", len: 0, sons: null}, +"127": {kind: 1, offset: 127, typ: NTI1476395011, name: "outline", len: 0, sons: null}, +"128": {kind: 1, offset: 128, typ: NTI1476395011, name: "outlineColor", len: 0, sons: null}, +"129": {kind: 1, offset: 129, typ: NTI1476395011, name: "outlineOffset", len: 0, sons: null}, +"130": {kind: 1, offset: 130, typ: NTI1476395011, name: "outlineStyle", len: 0, sons: null}, +"131": {kind: 1, offset: 131, typ: NTI1476395011, name: "outlineWidth", len: 0, sons: null}, +"132": {kind: 1, offset: 132, typ: NTI1476395011, name: "overflow", len: 0, sons: null}, +"133": {kind: 1, offset: 133, typ: NTI1476395011, name: "overflowX", len: 0, sons: null}, +"134": {kind: 1, offset: 134, typ: NTI1476395011, name: "overflowY", len: 0, sons: null}, +"135": {kind: 1, offset: 135, typ: NTI1476395011, name: "padding", len: 0, sons: null}, +"136": {kind: 1, offset: 136, typ: NTI1476395011, name: "paddingBottom", len: 0, sons: null}, +"137": {kind: 1, offset: 137, typ: NTI1476395011, name: "paddingLeft", len: 0, sons: null}, +"138": {kind: 1, offset: 138, typ: NTI1476395011, name: "paddingRight", len: 0, sons: null}, +"139": {kind: 1, offset: 139, typ: NTI1476395011, name: "paddingTop", len: 0, sons: null}, +"140": {kind: 1, offset: 140, typ: NTI1476395011, name: "pageBreakAfter", len: 0, sons: null}, +"141": {kind: 1, offset: 141, typ: NTI1476395011, name: "pageBreakBefore", len: 0, sons: null}, +"142": {kind: 1, offset: 142, typ: NTI1476395011, name: "pageBreakInside", len: 0, sons: null}, +"143": {kind: 1, offset: 143, typ: NTI1476395011, name: "perspective", len: 0, sons: null}, +"144": {kind: 1, offset: 144, typ: NTI1476395011, name: "perspectiveOrigin", len: 0, sons: null}, +"145": {kind: 1, offset: 145, typ: NTI1476395011, name: "pointerEvents", len: 0, sons: null}, +"146": {kind: 1, offset: 146, typ: NTI1476395011, name: "position", len: 0, sons: null}, +"147": {kind: 1, offset: 147, typ: NTI1476395011, name: "quotes", len: 0, sons: null}, +"148": {kind: 1, offset: 148, typ: NTI1476395011, name: "resize", len: 0, sons: null}, +"149": {kind: 1, offset: 149, typ: NTI1476395011, name: "right", len: 0, sons: null}, +"150": {kind: 1, offset: 150, typ: NTI1476395011, name: "scrollbar3dLightColor", len: 0, sons: null}, +"151": {kind: 1, offset: 151, typ: NTI1476395011, name: "scrollbarArrowColor", len: 0, sons: null}, +"152": {kind: 1, offset: 152, typ: NTI1476395011, name: "scrollbarBaseColor", len: 0, sons: null}, +"153": {kind: 1, offset: 153, typ: NTI1476395011, name: "scrollbarDarkshadowColor", len: 0, sons: null}, +"154": {kind: 1, offset: 154, typ: NTI1476395011, name: "scrollbarFaceColor", len: 0, sons: null}, +"155": {kind: 1, offset: 155, typ: NTI1476395011, name: "scrollbarHighlightColor", len: 0, sons: null}, +"156": {kind: 1, offset: 156, typ: NTI1476395011, name: "scrollbarShadowColor", len: 0, sons: null}, +"157": {kind: 1, offset: 157, typ: NTI1476395011, name: "scrollbarTrackColor", len: 0, sons: null}, +"158": {kind: 1, offset: 158, typ: NTI1476395011, name: "tableLayout", len: 0, sons: null}, +"159": {kind: 1, offset: 159, typ: NTI1476395011, name: "tabSize", len: 0, sons: null}, +"160": {kind: 1, offset: 160, typ: NTI1476395011, name: "textAlign", len: 0, sons: null}, +"161": {kind: 1, offset: 161, typ: NTI1476395011, name: "textAlignLast", len: 0, sons: null}, +"162": {kind: 1, offset: 162, typ: NTI1476395011, name: "textDecoration", len: 0, sons: null}, +"163": {kind: 1, offset: 163, typ: NTI1476395011, name: "textDecorationColor", len: 0, sons: null}, +"164": {kind: 1, offset: 164, typ: NTI1476395011, name: "textDecorationLine", len: 0, sons: null}, +"165": {kind: 1, offset: 165, typ: NTI1476395011, name: "textDecorationStyle", len: 0, sons: null}, +"166": {kind: 1, offset: 166, typ: NTI1476395011, name: "textIndent", len: 0, sons: null}, +"167": {kind: 1, offset: 167, typ: NTI1476395011, name: "textJustify", len: 0, sons: null}, +"168": {kind: 1, offset: 168, typ: NTI1476395011, name: "textOverflow", len: 0, sons: null}, +"169": {kind: 1, offset: 169, typ: NTI1476395011, name: "textShadow", len: 0, sons: null}, +"170": {kind: 1, offset: 170, typ: NTI1476395011, name: "textTransform", len: 0, sons: null}, +"171": {kind: 1, offset: 171, typ: NTI1476395011, name: "top", len: 0, sons: null}, +"172": {kind: 1, offset: 172, typ: NTI1476395011, name: "transform", len: 0, sons: null}, +"173": {kind: 1, offset: 173, typ: NTI1476395011, name: "transformOrigin", len: 0, sons: null}, +"174": {kind: 1, offset: 174, typ: NTI1476395011, name: "transformStyle", len: 0, sons: null}, +"175": {kind: 1, offset: 175, typ: NTI1476395011, name: "transition", len: 0, sons: null}, +"176": {kind: 1, offset: 176, typ: NTI1476395011, name: "transitionDelay", len: 0, sons: null}, +"177": {kind: 1, offset: 177, typ: NTI1476395011, name: "transitionDuration", len: 0, sons: null}, +"178": {kind: 1, offset: 178, typ: NTI1476395011, name: "transitionProperty", len: 0, sons: null}, +"179": {kind: 1, offset: 179, typ: NTI1476395011, name: "transitionTimingFunction", len: 0, sons: null}, +"180": {kind: 1, offset: 180, typ: NTI1476395011, name: "unicodeBidi", len: 0, sons: null}, +"181": {kind: 1, offset: 181, typ: NTI1476395011, name: "userSelect", len: 0, sons: null}, +"182": {kind: 1, offset: 182, typ: NTI1476395011, name: "verticalAlign", len: 0, sons: null}, +"183": {kind: 1, offset: 183, typ: NTI1476395011, name: "visibility", len: 0, sons: null}, +"184": {kind: 1, offset: 184, typ: NTI1476395011, name: "whiteSpace", len: 0, sons: null}, +"185": {kind: 1, offset: 185, typ: NTI1476395011, name: "width", len: 0, sons: null}, +"186": {kind: 1, offset: 186, typ: NTI1476395011, name: "wordBreak", len: 0, sons: null}, +"187": {kind: 1, offset: 187, typ: NTI1476395011, name: "wordSpacing", len: 0, sons: null}, +"188": {kind: 1, offset: 188, typ: NTI1476395011, name: "wordWrap", len: 0, sons: null}, +"189": {kind: 1, offset: 189, typ: NTI1476395011, name: "widows", len: 0, sons: null}, +"190": {kind: 1, offset: 190, typ: NTI1476395011, name: "zIndex", len: 0, sons: null}}}; +NTI1476395011.node = NNI1476395011; +var NNI2298478645 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI1476395011, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554450, name: "Field1", sons: null}]}; +NTI2298478645.node = NNI2298478645; +var NNI2197815406 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2197815406.node = NNI2197815406; +var NNI1946157215 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI1946157215.node = NNI1946157215; +var NNI2197815469 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2197815469.node = NNI2197815469; +var NNI2214592776 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2214592776.node = NNI2214592776; +var NNI2214592875 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2214592875.node = NNI2214592875; +var NNI2281701480 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2281701480.node = NNI2281701480; +var NNI2281701556 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2281701556.node = NNI2281701556; +var NNI1577058307 = {kind: 2, offset: 0, typ: null, name: null, len: 2, sons: {"0": {kind: 1, offset: 0, typ: NTI1577058307, name: "NodeText", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1577058307, name: "NodeField", len: 0, sons: null}}}; +NTI1577058307.node = NNI1577058307; +var NNI1577058308 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "typ", len: 0, typ: NTI1577058307, name: "typ", sons: null}, +{kind: 1, offset: "text", len: 0, typ: NTI33554449, name: "text", sons: null}, +{kind: 1, offset: "optional", len: 0, typ: NTI33554466, name: "optional", sons: null}]}; +NTI1577058308.node = NNI1577058308; +NTI1577058320.base = NTI1577058308; +var NNI1577058465 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI889192451, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554449, name: "Field1", sons: null}, +{kind: 1, offset: "Field2", len: 0, typ: NTI33554449, name: "Field2", sons: null}]}; +NTI1577058465.node = NNI1577058465; +NTI1577058462.base = NTI1577058465; +var NNI1577058459 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "data", len: 0, typ: NTI1577058462, name: "data", sons: null}, +{kind: 1, offset: "counter", len: 0, typ: NTI33554435, name: "counter", sons: null}]}; +NTI1577058459.node = NNI1577058459; +var NNI637534264 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "n", len: 0, typ: NTI33554449, name: "n", sons: null}, +{kind: 1, offset: "p", len: 0, typ: NTI637534265, name: "p", sons: null}]}; +NTI637534264.node = NNI637534264; +var NNI956301382 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI33554435, name: "a", sons: null}, +{kind: 1, offset: "b", len: 0, typ: NTI33554435, name: "b", sons: null}]}; +NTI956301382.node = NNI956301382; +var NNI1996488970 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI1996488970.node = NNI1996488970; +var NNI1962934402 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI1962934402.node = NNI1962934402; +var NNI1962934322 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI33554435, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI1962934322.node = NNI1962934322; +var NNI2382364745 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2382364745.node = NNI2382364745; +var NNI1593836432 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI1593836432.node = NNI1593836432; +var NNI1593836311 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554466, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI1593836311.node = NNI1593836311; +var NNI1593835702 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI1593835702.node = NNI1593835702; +var NNI1593835744 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI1593835744.node = NNI1593835744; +var NNI1593835751 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI1593835751.node = NNI1593835751; +var NNI1593835762 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI1593835762.node = NNI1593835762; +NTI1627389968.base = NTI1627390007; +var NNI1627390245 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI1627389968, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554435, name: "Field1", sons: null}]}; +NTI1627390245.node = NNI1627390245; +NTI1627389965.base = NTI1627389995; +NTI1627389964.base = NTI1627389991; +NTI1627389963.base = NTI1627389987; +var NNI1627389956 = {kind: 2, offset: 0, typ: null, name: null, len: 7, sons: {"0": {kind: 1, offset: 0, typ: NTI1627389956, name: "Monday", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI1627389956, name: "Tuesday", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1627389956, name: "Wednesday", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1627389956, name: "Thursday", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1627389956, name: "Friday", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1627389956, name: "Saturday", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI1627389956, name: "Sunday", len: 0, sons: null}}}; +NTI1627389956.node = NNI1627389956; +NTI1627389966.base = NTI1627389999; +var NNI1627390011 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "zonedTimeFromTimeImpl", len: 0, typ: NTI1627390012, name: "zonedTimeFromTimeImpl", sons: null}, +{kind: 1, offset: "zonedTimeFromAdjTimeImpl", len: 0, typ: NTI1627390013, name: "zonedTimeFromAdjTimeImpl", sons: null}, +{kind: 1, offset: "name", len: 0, typ: NTI33554449, name: "name", sons: null}]}; +NTI1627390011.node = NNI1627390011; +NTI1627389976.base = NTI1627390011; +var NNI1627389971 = {kind: 2, len: 12, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "nanosecond", len: 0, typ: NTI1627389967, name: "nanosecond", sons: null}, +{kind: 1, offset: "second", len: 0, typ: NTI1627389965, name: "second", sons: null}, +{kind: 1, offset: "minute", len: 0, typ: NTI1627389964, name: "minute", sons: null}, +{kind: 1, offset: "hour", len: 0, typ: NTI1627389963, name: "hour", sons: null}, +{kind: 1, offset: "monthdayZero", len: 0, typ: NTI33554435, name: "monthdayZero", sons: null}, +{kind: 1, offset: "monthZero", len: 0, typ: NTI33554435, name: "monthZero", sons: null}, +{kind: 1, offset: "year", len: 0, typ: NTI33554435, name: "year", sons: null}, +{kind: 1, offset: "weekday", len: 0, typ: NTI1627389956, name: "weekday", sons: null}, +{kind: 1, offset: "yearday", len: 0, typ: NTI1627389966, name: "yearday", sons: null}, +{kind: 1, offset: "isDst", len: 0, typ: NTI33554466, name: "isDst", sons: null}, +{kind: 1, offset: "timezone", len: 0, typ: NTI1627389976, name: "timezone", sons: null}, +{kind: 1, offset: "utcOffset", len: 0, typ: NTI33554435, name: "utcOffset", sons: null}]}; +NTI1627389971.node = NNI1627389971; +NTI1627389971.base = NTI33555179; +NTI1627389962.base = NTI1627389982; +var NNI1627389955 = {kind: 2, offset: 0, typ: null, name: null, len: 12, sons: {"1": {kind: 1, offset: 1, typ: NTI1627389955, name: "January", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI1627389955, name: "February", len: 0, sons: null}, +"3": {kind: 1, offset: 3, typ: NTI1627389955, name: "March", len: 0, sons: null}, +"4": {kind: 1, offset: 4, typ: NTI1627389955, name: "April", len: 0, sons: null}, +"5": {kind: 1, offset: 5, typ: NTI1627389955, name: "May", len: 0, sons: null}, +"6": {kind: 1, offset: 6, typ: NTI1627389955, name: "June", len: 0, sons: null}, +"7": {kind: 1, offset: 7, typ: NTI1627389955, name: "July", len: 0, sons: null}, +"8": {kind: 1, offset: 8, typ: NTI1627389955, name: "August", len: 0, sons: null}, +"9": {kind: 1, offset: 9, typ: NTI1627389955, name: "September", len: 0, sons: null}, +"10": {kind: 1, offset: 10, typ: NTI1627389955, name: "October", len: 0, sons: null}, +"11": {kind: 1, offset: 11, typ: NTI1627389955, name: "November", len: 0, sons: null}, +"12": {kind: 1, offset: 12, typ: NTI1627389955, name: "December", len: 0, sons: null}}}; +NTI1627389955.node = NNI1627389955; +var NNI1627390125 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI1627389962, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI1627389955, name: "Field1", sons: null}, +{kind: 1, offset: "Field2", len: 0, typ: NTI33554435, name: "Field2", sons: null}]}; +NTI1627390125.node = NNI1627390125; +var NNI1627389977 = {kind: 2, len: 3, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "time", len: 0, typ: NTI1627389970, name: "time", sons: null}, +{kind: 1, offset: "utcOffset", len: 0, typ: NTI33554435, name: "utcOffset", sons: null}, +{kind: 1, offset: "isDst", len: 0, typ: NTI33554466, name: "isDst", sons: null}]}; +NTI1627389977.node = NNI1627389977; +var NNI1593835826 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI1593835826.node = NNI1593835826; +var NNI1627391017 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI33554435, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI1627391017.node = NNI1627391017; +var NNI2113929601 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2113929601.node = NNI2113929601; +var NNI2113929616 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2113929616.node = NNI2113929616; +var NNI2113929392 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI33554450, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2113929392.node = NNI2113929392; +var NNI2113929229 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI33554450, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2113929229.node = NNI2113929229; +var NNI2113929729 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2113929729.node = NNI2113929729; +var NNI2113929572 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI1593835523, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2113929572.node = NNI2113929572; +var NNI2130706716 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI1593835523, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2130706716.node = NNI2130706716; +var NNI2348810529 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2348810529.node = NNI2348810529; +NTI2348810274.base = NTI33554435; +NTI2097152098.base = NTI2097152005; +NTI2097152099.base = NTI2097152005; +var NNI2097152097 = {kind: 2, len: 7, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "user", len: 0, typ: NTI1929379844, name: "user", sons: null}, +{kind: 1, offset: "joinTime", len: 0, typ: NTI33554439, name: "joinTime", sons: null}, +{kind: 1, offset: "threads", len: 0, typ: NTI2097152098, name: "threads", sons: null}, +{kind: 1, offset: "posts", len: 0, typ: NTI2097152099, name: "posts", sons: null}, +{kind: 1, offset: "postCount", len: 0, typ: NTI33554435, name: "postCount", sons: null}, +{kind: 1, offset: "threadCount", len: 0, typ: NTI33554435, name: "threadCount", sons: null}, +{kind: 1, offset: "email", len: 0, typ: NTI2097152105, name: "email", sons: null}]}; +NTI2097152097.node = NNI2097152097; +var NNI2315256102 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI2097152097, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2315256102.node = NNI2315256102; +var NNI2315255820 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI2097152097, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2315255820.node = NNI2315255820; +var NNI2164260867 = {kind: 2, offset: 0, typ: null, name: null, len: 3, sons: {"0": {kind: 1, offset: 0, typ: NTI2164260867, name: "DeleteUser", len: 0, sons: null}, +"1": {kind: 1, offset: 1, typ: NTI2164260867, name: "DeletePost", len: 0, sons: null}, +"2": {kind: 1, offset: 2, typ: NTI2164260867, name: "DeleteThread", len: 0, sons: null}}}; +NTI2164260867.node = NNI2164260867; +var NNI2164260870 = {kind: 2, len: 7, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "shown", len: 0, typ: NTI33554466, name: "shown", sons: null}, +{kind: 1, offset: "loading", len: 0, typ: NTI33554466, name: "loading", sons: null}, +{kind: 1, offset: "onDeletePost", len: 0, typ: NTI2164260871, name: "onDeletePost", sons: null}, +{kind: 1, offset: "onDeleteThread", len: 0, typ: NTI2164260872, name: "onDeleteThread", sons: null}, +{kind: 1, offset: "onDeleteUser", len: 0, typ: NTI2164260873, name: "onDeleteUser", sons: null}, +{kind: 1, offset: "error", len: 0, typ: NTI1946157155, name: "error", sons: null}, +{kind: 3, offset: "kind", len: 3, typ: NTI2164260867, name: "kind", sons: [[setConstr(0), {kind: 1, offset: "user", len: 0, typ: NTI1929379844, name: "user", sons: null}], +[setConstr(1), {kind: 1, offset: "post", len: 0, typ: NTI2097152004, name: "post", sons: null}], +[setConstr(2), {kind: 1, offset: "thread", len: 0, typ: NTI1593835523, name: "thread", sons: null}]]}]}; +NTI2164260870.node = NNI2164260870; +NTI2164260868.base = NTI2164260870; +var NNI1828716618 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI1828716618.node = NNI1828716618; +var NNI33555189 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI33555189.node = NNI33555189; +NTI33555189.base = NTI33555179; +NTI1828716618.base = NTI33555189; +NTI1828716610.base = NTI1828716618; +var NNI2147483652 = {kind: 2, len: 7, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "uri", len: 0, typ: NTI33554449, name: "uri", sons: null}, +{kind: 1, offset: "title", len: 0, typ: NTI33554449, name: "title", sons: null}, +{kind: 1, offset: "icon", len: 0, typ: NTI33554449, name: "icon", sons: null}, +{kind: 1, offset: "formData", len: 0, typ: NTI1828716610, name: "formData", sons: null}, +{kind: 1, offset: "error", len: 0, typ: NTI1946157155, name: "error", sons: null}, +{kind: 1, offset: "loading", len: 0, typ: NTI33554466, name: "loading", sons: null}, +{kind: 1, offset: "posted", len: 0, typ: NTI33554466, name: "posted", sons: null}]}; +NTI2147483652.node = NNI2147483652; +NTI2147483651.base = NTI2147483652; +var NNI2332033028 = {kind: 2, len: 8, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "loading", len: 0, typ: NTI33554466, name: "loading", sons: null}, +{kind: 1, offset: "status", len: 0, typ: NTI822083613, name: "status", sons: null}, +{kind: 1, offset: "error", len: 0, typ: NTI1946157155, name: "error", sons: null}, +{kind: 1, offset: "email", len: 0, typ: NTI33554450, name: "email", sons: null}, +{kind: 1, offset: "rank", len: 0, typ: NTI1929379843, name: "rank", sons: null}, +{kind: 1, offset: "deleteModal", len: 0, typ: NTI2164260868, name: "deleteModal", sons: null}, +{kind: 1, offset: "resetPassword", len: 0, typ: NTI2147483651, name: "resetPassword", sons: null}, +{kind: 1, offset: "profile", len: 0, typ: NTI2097152097, name: "profile", sons: null}]}; +NTI2332033028.node = NNI2332033028; +NTI2332033027.base = NTI2332033028; +var NNI2315255834 = {kind: 1, offset: "val", len: 0, typ: NTI2332033027, name: "val", sons: null}; +NTI2315255834.node = NNI2315255834; +var NNI2315256262 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2315256262.node = NNI2315256262; +var NNI2315256278 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2315256278.node = NNI2315256278; +var NNI2147483748 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2147483748.node = NNI2147483748; +var NNI2332033500 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2332033500.node = NNI2332033500; +var NNI2332033511 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2332033511.node = NNI2332033511; +var NNI2164261025 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2164261025.node = NNI2164261025; +var NNI2164261095 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2164261095.node = NNI2164261095; +var NNI134217753 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; +NTI134217753.node = NNI134217753; +NTI134217753.base = NTI33555184; +var NNI2063599143 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554449, name: "Field1", sons: null}]}; +NTI2063599143.node = NNI2063599143; +NTI2063599046.base = NTI33554449; +var NNI2063598914 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2063598914.node = NNI2063598914; +var NNI2130706662 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554449, name: "Field1", sons: null}]}; +NTI2130706662.node = NNI2130706662; +var NNI2130706825 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2130706825.node = NNI2130706825; +var NNI2130706523 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "val", len: 0, typ: NTI33554449, name: "val", sons: null}, +{kind: 1, offset: "has", len: 0, typ: NTI33554466, name: "has", sons: null}]}; +NTI2130706523.node = NNI2130706523; +var NNI2147483996 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2147483996.node = NNI2147483996; +NTI2147483841.base = NTI1929379844; +var NNI2147484076 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2147484076.node = NNI2147484076; +var NNI2113929783 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2113929783.node = NNI2113929783; +var NNI2399142003 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2399142003.node = NNI2399142003; +var NNI2214592670 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; +NTI2214592670.node = NNI2214592670; +var NNI2415919425 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554449, name: "Field0", sons: null}, +{kind: 1, offset: "Field1", len: 0, typ: NTI33554449, name: "Field1", sons: null}]}; +NTI2415919425.node = NNI2415919425; +NTI2415919203.base = NTI2415919108; + +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_33557376 = null; + + switch (ti_p2.kind) { + case 21: + case 22: + case 23: + case 5: + if (!(isFatPointer__system_u2924(ti_p2))) { + result_33557376 = src_p1; + } + else { + result_33557376 = [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_33557376 = dest_p0; + + break; + case 18: + case 17: + if (!((ti_p2.base == null))) { + result_33557376 = nimCopy(dest_p0, src_p1, ti_p2.base); + } + else { + if ((ti_p2.kind == 17)) { + result_33557376 = (dest_p0 === null || dest_p0 === undefined) ? {m_type: ti_p2} : dest_p0; + } + else { + result_33557376 = (dest_p0 === null || dest_p0 === undefined) ? {} : dest_p0; + } + } + nimCopyAux(result_33557376, 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_33557376 = dest_p0; + } else { + if (src_p1 === null) { + result_33557376 = null; + } + else { + if (dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) { + dest_p0 = new Array(src_p1.length); + } + result_33557376 = dest_p0; + for (var i = 0; i < src_p1.length; ++i) { + result_33557376[i] = nimCopy(result_33557376[i], src_p1[i], ti_p2.base); + } + } + } + + break; + case 24: + case 27: + if (src_p1 === null) { + result_33557376 = null; + } + else { + if (dest_p0 === null || dest_p0 === undefined || dest_p0.length != src_p1.length) { + dest_p0 = new Array(src_p1.length); + } + result_33557376 = dest_p0; + for (var i = 0; i < src_p1.length; ++i) { + result_33557376[i] = nimCopy(result_33557376[i], src_p1[i], ti_p2.base); + } + } + + break; + case 28: + if (src_p1 !== null) { + result_33557376 = src_p1.slice(0); + } + + break; + default: + result_33557376 = src_p1; + break; + } + + return result_33557376; + +} + +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_33557489 = false; + + BeforeRet: { + var x_33557490 = obj_p0; + if ((x_33557490 == subclass_p1)) { + result_33557489 = true; + break BeforeRet; + } + + Label1: { + Label2: while (true) { + if (!!((x_33557490 == subclass_p1))) break Label2; + if ((x_33557490 == null)) { + result_33557489 = false; + break BeforeRet; + } + + x_33557490 = x_33557490.base; + } + }; + result_33557489 = true; + break BeforeRet; + }; + + return result_33557489; + +} + +function toJSStr(s_p0) { + var result_33556953 = null; + + var res_33557019 = newSeq__system_u2562((s_p0).length); + var i_33557020 = 0; + var j_33557021 = 0; + Label1: { + Label2: while (true) { + if (!(i_33557020 < (s_p0).length)) break Label2; + var c_33557022 = s_p0[i_33557020]; + if ((c_33557022 < 128)) { + res_33557019[j_33557021] = String.fromCharCode(c_33557022); + i_33557020 += 1; + } + else { + var helper_33557048 = newSeq__system_u2562(0); + Label3: { + Label4: while (true) { + if (!true) break Label4; + var code_33557049 = c_33557022.toString(16); + if ((((code_33557049) == null ? 0 : (code_33557049).length) == 1)) { + helper_33557048.push("%0");; + } + else { + helper_33557048.push("%");; + } + + helper_33557048.push(code_33557049);; + i_33557020 += 1; + if ((((s_p0).length <= i_33557020) || (s_p0[i_33557020] < 128))) { + break Label3; + } + + c_33557022 = s_p0[i_33557020]; + } + }; +++excHandler; + try { + res_33557019[j_33557021] = decodeURIComponent(helper_33557048.join("")); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + res_33557019[j_33557021] = helper_33557048.join(""); + lastJSError = prevJSError; + } finally { + } + } + + j_33557021 += 1; + } + }; + if (res_33557019.length < j_33557021) { for (var i = res_33557019.length ; i < j_33557021 ; ++i) res_33557019.push(null); } + else { res_33557019.length = j_33557021; }; + result_33556953 = res_33557019.join(""); + + return result_33556953; + +} + +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_33557411 = 0; + + BeforeRet: { + if (((a_p1 <= i_p0) && (i_p0 <= b_p2))) { + result_33557411 = i_p0; + break BeforeRet; + } + else { + raiseIndexError(i_p0, a_p1, b_p2); + } + + }; + + return result_33557411; + +} + +function addInt(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; + + + +} + +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_33557416 = 0; + + BeforeRet: { + if (((a_p1 <= i_p0) && (i_p0 <= b_p2))) { + result_33557416 = i_p0; + break BeforeRet; + } + else { + raiseRangeError(); + } + + }; + + return result_33557416; + +} + +function divInt(a_p0, b_p1) { + if (b_p1 == 0) raiseDivByZero(); + if (b_p1 == -1 && a_p0 == 2147483647) raiseOverflow(); + return Math.trunc(a_p0 / b_p1); + + + +} + +function nimMax(a_p0, b_p1) { + var Temporary1; + + var result_33557203 = 0; + + BeforeRet: { + if ((b_p1 <= a_p0)) { + Temporary1 = a_p0; + } + else { + Temporary1 = b_p1; + } + + result_33557203 = Temporary1; + break BeforeRet; + }; + + return result_33557203; + +} + +function mulInt(a_p0, b_p1) { + var result = a_p0 * b_p1; + checkOverflowInt(result); + return result; + + + +} +var ConstSet2 = setConstr(6); + +function raiseFieldError2(f_p0, discVal_p1) { + raiseException({message: (f_p0).concat(discVal_p1,[39]), parent: null, m_type: NTI134217750, name: null, trace: [], up: null}, "FieldDefect"); + + +} + +function makeNimstrLit(c_p0) { + var result = []; + for (var i = 0; i < c_p0.length; ++i) { + result[i] = c_p0.charCodeAt(i); + } + return result; + + + +} + +function nimBoolToStr(x_p0) { + var result_33556475 = []; + + if (x_p0) { + result_33556475 = nimCopy(null, [116,114,117,101], NTI33554449); + } + else { + result_33556475 = nimCopy(null, [102,97,108,115,101], NTI33554449); + } + + + return result_33556475; + +} + +function reprDiscriminant(e_p0, typ_p1) { + var Temporary1; + + var result_33557722 = []; + + switch (typ_p1.kind) { + case 14: + Temporary1 = reprEnum(e_p0, typ_p1); + break; + case 1: + Temporary1 = nimBoolToStr(!((e_p0 == 0))); + break; + default: + Temporary1 = HEX24__systemZdollars_u14(e_p0); + break; + } + result_33557722 = nimCopy(null, Temporary1, NTI33554449); + + return result_33557722; + +} +var ConstSet3 = setConstr(5); +var ConstSet4 = setConstr(6); +var ConstSet5 = setConstr(5); + +function addChar(x_p0, c_p1) { + x_p0.push(c_p1); + + +} +var ConstSet6 = setConstr(4); +var ConstSet7 = setConstr(4); +var ConstSet8 = setConstr(2); +var ConstSet9 = setConstr(3); +var ConstSet10 = setConstr(1); +var ConstSet11 = setConstr(6); + +function cmpClosures(a_p0, b_p1) { + if (a_p0 !== null && a_p0.ClP_0 !== undefined && + b_p1 !== null && b_p1.ClP_0 !== undefined) { + return a_p0.ClP_0 == b_p1.ClP_0 && a_p0.ClE_0 == b_p1.ClE_0; + } else { + return a_p0 == b_p1; + } + + + +} + var toTag_1409286511 = ["#text", "#int", "#bool", "#vthunk", "#dthunk", "#component", "#verbatim", "HTML", "HEAD", "TITLE", "BASE", "LINK", "META", "STYLE", "SCRIPT", "NOSCRIPT", "BODY", "SECTION", "NAV", "ARTICLE", "ASIDE", "H1", "H2", "H3", "H4", "H5", "H6", "HGROUP", "HEADER", "FOOTER", "ADDRESS", "MAIN", "P", "HR", "PRE", "BLOCKQUOTE", "OL", "UL", "LI", "DL", "DT", "DD", "FIGURE", "FIGCAPTION", "DIV", "A", "EM", "STRONG", "SMALL", "S", "CITE", "QUOTE", "DFN", "ABBR", "DATA", "TIME", "CODE", "VAR", "SAMP", "KDB", "SUB", "SUP", "I", "B", "U", "MARK", "RUBY", "RT", "RP", "BDI", "DBO", "SPAN", "BR", "WBR", "INS", "DEL", "IMG", "IFRAME", "EMBED", "OBJECT", "PARAM", "VIDEO", "AUDIO", "SOURCE", "TRACK", "CANVAS", "MAP", "AREA", "ANIMATE", "ANIMATEMOTION", "ANIMATETRANSFORM", "CIRCLE", "CLIPPATH", "DEFS", "DESC", "DISCARD", "ELLIPSE", "FEBLEND", "FECOLORMATRIX", "FECOMPONENTTRANSFER", "FECOMPOSITE", "FECONVOLVEMATRIX", "FEDIFFUSELIGHTING", "FEDISPLACEMENTMAP", "FEDISTANTLIGHT", "FEDROPSHADOW", "FEFLOOD", "FEFUNCA", "FEFUNCB", "FEFUNCG", "FEFUNCR", "FEGAUSSIANBLUR", "FEIMAGE", "FEMERGE", "FEMERGENODE", "FEMORPHOLOGY", "FEOFFSET", "FEPOINTLIGHT", "FESPECULARLIGHTING", "FESPOTLIGHT", "FETILE", "FETURBULENCE", "FILTER", "FOREIGNOBJECT", "G", "IMAGE", "LINE", "LINEARGRADIENT", "MARKER", "MASK", "METADATA", "MPATH", "PATH", "PATTERN", "POLYGON", "POLYLINE", "RADIALGRADIENT", "RECT", "SET", "STOP", "SVG", "SWITCH", "SYMBOL", "TEXT", "TEXTPATH", "TSPAN", "UNKNOWN", "USE", "VIEW", "MACTION", "MATH", "MENCLOSE", "MERROR", "MFENCED", "MFRAC", "MGLYPH", "MI", "MLABELEDTR", "MMULTISCRIPTS", "MN", "MO", "MOVER", "MPADDED", "MPHANTOM", "MROOT", "MROW", "MS", "MSPACE", "MSQRT", "MSTYLE", "MSUB", "MSUBSUP", "MSUP", "MTABLE", "MTD", "MTEXT", "MTR", "MUNDER", "MUNDEROVER", "SEMANTICS", "TABLE", "CAPTION", "COLGROUP", "COL", "TBODY", "THEAD", "TFOOT", "TR", "TD", "TH", "FORM", "FIELDSET", "LEGEND", "LABEL", "INPUT", "BUTTON", "SELECT", "DATALIST", "OPTGROUP", "OPTION", "TEXTAREA", "KEYGEN", "OUTPUT", "PROGRESS", "METER", "DETAILS", "SUMMARY", "COMMAND", "MENU"]; + var toEventName_1409286512 = ["click", "contextmenu", "dblclick", "keyup", "keydown", "keypressed", "focus", "blur", "change", "scroll", "mousedown", "mouseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "drag", "dragend", "dragenter", "dragleave", "dragover", "dragstart", "drop", "submit", "input", "animationstart", "animationend", "animationiteration", "keyupenter", "keyuplater", "load", "transitioncancel", "transitionend", "transitionrun", "transitionstart", "wheel"]; + +function nimMin(a_p0, b_p1) { + var Temporary1; + + var result_33557199 = 0; + + BeforeRet: { + if ((a_p0 <= b_p1)) { + Temporary1 = a_p0; + } + else { + Temporary1 = b_p1; + } + + result_33557199 = Temporary1; + break BeforeRet; + }; + + return result_33557199; + +} + +function eqStrings(a_p0, b_p1) { + if (a_p0 == b_p1) return true; + if (a_p0 === null && b_p1.length == 0) return true; + if (b_p1 === null && a_p0.length == 0) return true; + if ((!a_p0) || (!b_p1)) return false; + var alen = a_p0.length; + if (alen != b_p1.length) return false; + for (var i = 0; i < alen; ++i) + if (a_p0[i] != b_p1[i]) return false; + return true; + + + +} +var ConstSet12 = setConstr(5); +var ConstSet13 = setConstr(4); +var ConstSet14 = setConstr(4); +var ConstSet15 = setConstr(2); +var ConstSet16 = setConstr(2); +var ConstSet17 = setConstr(3); +var ConstSet18 = setConstr(3); +var ConstSet19 = setConstr(1); +var ConstSet20 = setConstr(1); +var ConstSet21 = setConstr(6); +var ConstSet22 = setConstr(6); +var ConstSet23 = setConstr(5); +var ConstSet24 = setConstr(5); +var ConstSet25 = setConstr(5); +var ConstSet26 = setConstr(5); +var ConstSet27 = setConstr(5); +var ConstSet28 = setConstr(6); +var ConstSet29 = setConstr([48, 57]); +var ConstSet30 = setConstr(0, 125); +var ConstSet31 = setConstr([48, 57]); +var ConstSet32 = setConstr([65, 90]); +var ConstSet33 = setConstr([97, 122], [65, 90], [48, 57], [128, 255], 95); +var ConstSet34 = setConstr(6); +var ConstSet35 = setConstr(5, 0); +var ConstSet36 = setConstr(5, 0); +var ConstSet37 = setConstr(2, 4); +var ConstSet38 = setConstr(2, 4); +var ConstSet39 = setConstr([48, 57]); +var ConstSet40 = setConstr([48, 57]); +var ConstSet41 = setConstr([48, 57]); +var ConstSet42 = setConstr(4); +var ConstSet43 = setConstr(2); +var ConstSet44 = setConstr(5); +var ConstSet45 = setConstr(4, 0); +var ConstSet46 = setConstr(4, 0); +var ConstSet47 = setConstr(4); +var ConstSet48 = setConstr(2, 4); +var ConstSet49 = setConstr(2, 4); +var ConstSet50 = setConstr(4); +var ConstSet51 = setConstr(2); +var ConstSet52 = setConstr(4); +var ConstSet53 = setConstr(4); +var ConstSet54 = setConstr([65, 90]); +var ConstSet55 = setConstr(4); +var ConstSet56 = setConstr(1); +var ConstSet57 = setConstr(1); +var ConstSet58 = setConstr(1); +var ConstSet59 = setConstr(6); +var ConstSet60 = setConstr(6); +var ConstSet61 = setConstr(6); +var ConstSet62 = setConstr(6); +var ConstSet63 = setConstr(6); +var ConstSet64 = setConstr(6); +var ConstSet65 = setConstr(6); + var unitWeights_1627390063 = new BigInt64Array([1n, 1000n, 1000000n, 1000000000n, 60000000000n, 3600000000000n, 86400000000000n, 604800000000000n]); + +function divInt64(a_p0, b_p1) { + if (b_p1 == 0n) raiseDivByZero(); + if (b_p1 == -1n && a_p0 == 9223372036854775807n) raiseOverflow(); + return a_p0 / b_p1; + + + +} + +function mulInt64(a_p0, b_p1) { + var result = a_p0 * b_p1; + checkOverflowInt64(result); + return result; + + + +} + +function modInt(a_p0, b_p1) { + if (b_p1 == 0) raiseDivByZero(); + if (b_p1 == -1 && a_p0 == 2147483647) raiseOverflow(); + return Math.trunc(a_p0 % b_p1); + + + +} +var ConstSet66 = setConstr(6); +var ConstSet67 = setConstr(6); + +function rawEcho() { + var buf = ""; + for (var i = 0; i < arguments.length; ++i) { + buf += toJSStr(arguments[i]); + } + console.log(buf); + + + +} + +function addInt64(a_p0, b_p1) { + var result = a_p0 + b_p1; + checkOverflowInt64(result); + return result; + + + +} + +function modInt64(a_p0, b_p1) { + if (b_p1 == 0n) raiseDivByZero(); + if (b_p1 == -1n && a_p0 == 9223372036854775807n) raiseOverflow(); + return a_p0 % b_p1; + + + +} + +function subInt64(a_p0, b_p1) { + var result = a_p0 - b_p1; + checkOverflowInt64(result); + return result; + + + +} + var toStyleAttrName_1476395258 = ["alignContent", "alignItems", "alignSelf", "animation", "animationDelay", "animationDirection", "animationDuration", "animationFillMode", "animationIterationCount", "animationName", "animationTimingFunction", "animationPlayState", "background", "backgroundAttachment", "backgroundColor", "backgroundImage", "backgroundPosition", "backgroundRepeat", "backgroundClip", "backgroundOrigin", "backgroundSize", "backfaceVisibility", "border", "borderBottom", "borderBottomColor", "borderBottomLeftRadius", "borderBottomRightRadius", "borderBottomStyle", "borderBottomWidth", "borderCollapse", "borderColor", "borderImage", "borderImageOutset", "borderImageRepeat", "borderImageSlice", "borderImageSource", "borderImageWidth", "borderLeft", "borderLeftColor", "borderLeftStyle", "borderLeftWidth", "borderRadius", "borderRight", "borderRightColor", "borderRightStyle", "borderRightWidth", "borderSpacing", "borderStyle", "borderTop", "borderTopColor", "borderTopLeftRadius", "borderTopRightRadius", "borderTopStyle", "borderTopWidth", "borderWidth", "bottom", "boxDecorationBreak", "boxShadow", "boxSizing", "captionSide", "clear", "clip", "color", "columnCount", "columnFill", "columnGap", "columnRule", "columnRuleColor", "columnRuleStyle", "columnRuleWidth", "columns", "columnSpan", "columnWidth", "content", "counterIncrement", "counterReset", "cursor", "direction", "display", "emptyCells", "filter", "flex", "flexBasis", "flexDirection", "flexFlow", "flexGrow", "flexShrink", "flexWrap", "cssFloat", "font", "fontFamily", "fontSize", "fontSizeAdjust", "fontStretch", "fontStyle", "fontVariant", "fontWeight", "hangingPunctuation", "height", "hyphens", "icon", "imageOrientation", "justifyContent", "left", "letterSpacing", "lineHeight", "listStyle", "listStyleImage", "listStylePosition", "listStyleType", "margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "maxHeight", "maxWidth", "minHeight", "minWidth", "navDown", "navIndex", "navLeft", "navRight", "navUp", "opacity", "order", "orphans", "outline", "outlineColor", "outlineOffset", "outlineStyle", "outlineWidth", "overflow", "overflowX", "overflowY", "padding", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "pageBreakAfter", "pageBreakBefore", "pageBreakInside", "perspective", "perspectiveOrigin", "pointerEvents", "position", "quotes", "resize", "right", "scrollbar3dLightColor", "scrollbarArrowColor", "scrollbarBaseColor", "scrollbarDarkshadowColor", "scrollbarFaceColor", "scrollbarHighlightColor", "scrollbarShadowColor", "scrollbarTrackColor", "tableLayout", "tabSize", "textAlign", "textAlignLast", "textDecoration", "textDecorationColor", "textDecorationLine", "textDecorationStyle", "textIndent", "textJustify", "textOverflow", "textShadow", "textTransform", "top", "transform", "transformOrigin", "transformStyle", "transition", "transitionDelay", "transitionDuration", "transitionProperty", "transitionTimingFunction", "unicodeBidi", "userSelect", "verticalAlign", "visibility", "whiteSpace", "width", "wordBreak", "wordSpacing", "wordWrap", "widows", "zIndex"]; +var ConstSet68 = setConstr(47, 63); + +function nimCharToStr(x_p0) { + var result_33556478 = []; + + result_33556478 = nimCopy(null, mnewString(1), NTI33554449); + result_33556478[0] = x_p0; + + return result_33556478; + +} +var ConstSet69 = setConstr(63, 64, 92); +var ConstSet70 = setConstr(5, 0); +var ConstSet71 = setConstr(5, 0); +var ConstSet72 = setConstr(6); +var ConstSet73 = setConstr(6); +var ConstSet74 = setConstr([65, 90]); +var ConstSet75 = setConstr(32, 9, 11, 13, 10, 12); +var ConstSet76 = setConstr(5, 0); +var ConstSet77 = setConstr(5, 0); +var ConstSet78 = setConstr(6); +var ConstSet79 = setConstr(6); +var ConstSet80 = setConstr(0, 1, 3, 4); +var ConstSet81 = setConstr(46, 44); +var ConstSet82 = setConstr([65, 90]); +var ConstSet83 = setConstr([97, 122]); + var spec_1593835776 = {fill: 32, align: 0, sign: 45, alternateForm: false, padWithZero: false, minimumWidth: 0, precision: 1, typ: 102, endPosition: 3}; + +function absInt(a_p0) { + var Temporary1; + + var result_33557192 = 0; + + if ((a_p0 < 0)) { + Temporary1 = (a_p0 * (-1)); + } + else { + Temporary1 = a_p0; + } + + result_33557192 = Temporary1; + + return result_33557192; + +} + +function negInt(a_p0) { + var result_33557186 = 0; + + result_33557186 = (a_p0 * (-1)); + + return result_33557186; + +} + var f2_1593835820 = {patterns: [37, 11, 70, 105, 114, 115, 116, 32, 112, 111, 115, 116, 58, 37, 1, 32, 14, 37, 1, 32, 0, 37, 1, 44, 37, 1, 32, 24, 37, 1, 32, 9, 37, 1, 58, 11, 37, 1, 10], formatStr: [39,70,105,114,115,116,32,112,111,115,116,58,39,32,77,77,77,32,100,44,32,121,121,121,121,32,72,72,58,109,109,39,10,39]}; + var DefaultLocale_1627392012 = {MMM: [[74,97,110], [70,101,98], [77,97,114], [65,112,114], [77,97,121], [74,117,110], [74,117,108], [65,117,103], [83,101,112], [79,99,116], [78,111,118], [68,101,99]], MMMM: [[74,97,110,117,97,114,121], [70,101,98,114,117,97,114,121], [77,97,114,99,104], [65,112,114,105,108], [77,97,121], [74,117,110,101], [74,117,108,121], [65,117,103,117,115,116], [83,101,112,116,101,109,98,101,114], [79,99,116,111,98,101,114], [78,111,118,101,109,98,101,114], [68,101,99,101,109,98,101,114]], ddd: [[77,111,110], [84,117,101], [87,101,100], [84,104,117], [70,114,105], [83,97,116], [83,117,110]], dddd: [[77,111,110,100,97,121], [84,117,101,115,100,97,121], [87,101,100,110,101,115,100,97,121], [84,104,117,114,115,100,97,121], [70,114,105,100,97,121], [83,97,116,117,114,100,97,121], [83,117,110,100,97,121]]}; + var daysUntilMonthLeap_1627390202 = new Int32Array([0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]); + var daysUntilMonth_1627390201 = new Int32Array([0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]); + var f2_1593835827 = {patterns: [37, 11, 76, 97, 115, 116, 32, 114, 101, 112, 108, 121, 58, 37, 1, 32, 14, 37, 1, 32, 0, 37, 1, 44, 37, 1, 32, 24, 37, 1, 32, 9, 37, 1, 58, 11], formatStr: [39,76,97,115,116,32,114,101,112,108,121,58,39,32,77,77,77,32,100,44,32,121,121,121,121,32,72,72,58,109,109]}; + var f2_1593835736 = {patterns: [14, 37, 1, 32, 24], formatStr: [77,77,77,32,121,121,121,121]}; + var f2_1593835742 = {patterns: [14, 37, 1, 32, 1], formatStr: [77,77,77,32,100,100]}; +var ConstSet84 = setConstr(2); +var ConstSet85 = setConstr(6); +var ConstSet86 = setConstr(6); +var ConstSet87 = setConstr(6); +var ConstSet88 = setConstr(6); + var f2_2063599379 = {patterns: [14, 37, 1, 32, 0, 37, 1, 44, 37, 1, 32, 24, 37, 1, 32, 9, 37, 1, 58, 11], formatStr: [77,77,77,32,100,44,32,121,121,121,121,32,72,72,58,109,109]}; +var ConstSet89 = setConstr(0); +var ConstSet90 = setConstr(0); +var ConstSet91 = setConstr(1); +var ConstSet92 = setConstr(2); +var ConstSet93 = setConstr(0); +var ConstSet94 = setConstr(1); +var ConstSet95 = setConstr(2); +var ConstSet96 = setConstr([48, 57]); +var ConstSet97 = setConstr([48, 57]); + +function reraiseException() { + if ((lastJSError == null)) { + raiseException({message: [110,111,32,101,120,99,101,112,116,105,111,110,32,116,111,32,114,101,114,97,105,115,101], parent: null, m_type: NTI134217753, name: null, trace: [], up: null}, "ReraiseDefect"); + } + else { + if ((excHandler == 0)) { + if (isNimException__system_u2047()) { + unhandledException(lastJSError); + } + + } + + throw lastJSError; + } + + + +} +var ConstSet98 = setConstr(5, 0); +var ConstSet99 = setConstr(5, 0); +var ConstSet100 = setConstr(8, 7); + var f2_2063599369 = {patterns: [37, 13, 76, 97, 115, 116, 32, 109, 111, 100, 105, 102, 105, 101, 100, 37, 1, 32, 14, 37, 1, 32, 0, 37, 1, 44, 37, 1, 32, 24, 37, 1, 32, 9, 37, 1, 58, 11], formatStr: [39,76,97,115,116,32,109,111,100,105,102,105,101,100,39,32,77,77,77,32,100,44,32,121,121,121,121,32,72,72,58,109,109]}; +var ConstSet101 = setConstr(2); +var ConstSet102 = setConstr(1); +var ConstSet103 = setConstr(6); +var ConstSet104 = setConstr(6); +var ConstSet105 = setConstr(4); +var ConstSet106 = setConstr(4); +var objectID_889192626 = [0]; +var gid_1409286826 = [0]; +var vcomponents_1442840607 = [{}]; +var kxi__ = null; +if (globalThis.utcInstance_1627391768 === undefined) { + globalThis.utcInstance_1627391768 = [null]; +} +if (globalThis.localInstance_1627391769 === undefined) { + globalThis.localInstance_1627391769 = [null]; +} + +function HEX3Aanonymous__addcategorymodal_u28(category_p0) { + +} +var nullCategory_1996488734 = HEX3Aanonymous__addcategorymodal_u28; + +function HEX3Aanonymous__categorypicker_u549(category_p0) { + +} + +function HEX3Aanonymous__categorypicker_u552(oldCategory_p0, newCategory_p1) { + +} +var nullAddCategory_1979712039 = HEX3Aanonymous__categorypicker_u549; +var nullCategoryChange_1979712043 = HEX3Aanonymous__categorypicker_u552; + +function isFatPointer__system_u2924(ti_p0) { + var result_33557358 = false; + + BeforeRet: { + result_33557358 = !((ConstSet1[ti_p0.base.kind] != undefined)); + break BeforeRet; + }; + + return result_33557358; + +} + +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_1962934494 = 0; + Label3: { + Label4: while (true) { + if (!(i_1962934494 < n_p3)) break Label4; + iHEX60gensym4_335544542 = i_1962934494; + result_p0[result_p0_Idx][(old_335544528 + iHEX60gensym4_335544542)] = x_p1.charCodeAt((start_p2 + iHEX60gensym4_335544542)); + i_1962934494 += 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_u2562(len_p0) { + var result_33556998 = []; + + result_33556998 = new Array(len_p0); for (var i = 0 ; i < len_p0 ; ++i) { result_33556998[i] = null; } + return result_33556998; + +} + +function isNimException__system_u2047() { + return lastJSError && lastJSError.m_type; + + +} + +function getCurrentException() { + var result_33556482 = null; + + if (isNimException__system_u2047()) { + result_33556482 = lastJSError; + } + + + return result_33556482; + +} + +function raiseDefect() { + if (isNimException__system_u2047()) { + var e_33556698 = getCurrentException(); + if (isObj(e_33556698.m_type, NTI33555184)) { + if ((excHandler == 0)) { + unhandledException(e_33556698); + } + + throw e_33556698; + } + + } + + + +} + +function unhandledException(e_p0) { + var buf_33556692 = [[]]; + if (!(((e_p0.message).length == 0))) { + nimAddStrStr(buf_33556692[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_33556692[0], e_p0.message);; + } + else { + nimAddStrStr(buf_33556692[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_33556692[0], [32,91]);; + add__system_u1972(buf_33556692, 0, e_p0.name); + nimAddStrStr(buf_33556692[0], [93,10]);; + var cbuf_33556693 = toJSStr(buf_33556692[0]); + if (typeof(Error) !== "undefined") { + throw new Error(cbuf_33556693); + } + else { + throw cbuf_33556693; + } + + + +} + +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 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 nsuFindChar(s_p0, sub_p1, start_p2, last_p3) { + var Temporary1; + + var result_1124075176 = 0; + + BeforeRet: { + result_1124075176 = (-1); + if ((last_p3 < 0)) { + Temporary1 = (s_p0).length - 1; + } + else { + Temporary1 = last_p3; + } + + var last_1124075177 = Temporary1; + Label2: { + var iHEX60gensym174_1124075191 = 0; + var res_1962934503 = start_p2; + Label3: { + Label4: while (true) { + if (!(res_1962934503 <= last_1124075177)) break Label4; + iHEX60gensym174_1124075191 = res_1962934503; + if ((s_p0[chckIndx(iHEX60gensym174_1124075191, 0, (s_p0).length - 1)] == sub_p1)) { + result_1124075176 = iHEX60gensym174_1124075191; + break BeforeRet; + } + + res_1962934503 = addInt(res_1962934503, 1); + } + }; + }; + }; + + return result_1124075176; + +} + +function nsuFindStrA(a_p0, s_p1, sub_p2, start_p3, last_p4) { + var Temporary1; + + var result_1124075155 = 0; + + BeforeRet: { + if ((last_p4 < 0)) { + Temporary1 = (s_p1).length - 1; + } + else { + Temporary1 = last_p4; + } + + var last_1124075156 = Temporary1; + var subLast_1124075157 = subInt((sub_p2).length, 1); + if ((subLast_1124075157 == (-1))) { + result_1124075155 = start_p3; + break BeforeRet; + } + + result_1124075155 = (-1); + var skip_1124075158 = start_p3; + Label2: { + Label3: while (true) { + if (!(subLast_1124075157 <= subInt(last_1124075156, skip_1124075158))) break Label3; + var i_1124075159 = subLast_1124075157; + Label4: { + Label5: while (true) { + if (!(s_p1[chckIndx(addInt(skip_1124075158, i_1124075159), 0, (s_p1).length - 1)] == sub_p2[chckIndx(i_1124075159, 0, (sub_p2).length - 1)])) break Label5; + if ((i_1124075159 == 0)) { + result_1124075155 = skip_1124075158; + break BeforeRet; + } + + i_1124075159 = subInt(i_1124075159, 1); + } + }; + skip_1124075158 = addInt(skip_1124075158, a_p0[chckIndx(s_p1[chckIndx(addInt(skip_1124075158, subLast_1124075157), 0, (s_p1).length - 1)], 0, (a_p0).length - 1)]); + } + }; + }; + + return result_1124075155; + +} + +function fill__pureZstrutils_u1623(a_p0, value_p1) { + var xHEX60gensym170_1124075104 = 0; + Label1: { + Label2: while (true) { + if (!(xHEX60gensym170_1124075104 <= (a_p0).length - 1)) break Label2; + a_p0[chckIndx(xHEX60gensym170_1124075104, 0, (a_p0).length - 1)] = value_p1; + xHEX60gensym170_1124075104 = addInt(xHEX60gensym170_1124075104, 1); + } + }; + + +} + +function nsuInitSkipTable(a_p0, sub_p1) { + var m_1124075094 = (sub_p1).length; + fill__pureZstrutils_u1623(a_p0, m_1124075094); + Label1: { + var i_1124075114 = 0; + var colontmp__1962934508 = 0; + colontmp__1962934508 = subInt(m_1124075094, 1); + var i_1962934509 = 0; + Label2: { + Label3: while (true) { + if (!(i_1962934509 < colontmp__1962934508)) break Label3; + i_1124075114 = i_1962934509; + a_p0[chckIndx(sub_p1[chckIndx(i_1124075114, 0, (sub_p1).length - 1)], 0, (a_p0).length - 1)] = subInt(subInt(m_1124075094, 1), i_1124075114); + i_1962934509 = addInt(i_1962934509, 1); + } + }; + }; + + +} + +function nsuInitNewSkipTable(sub_p0) { + var result_1124075148 = [new Int32Array(256)]; + + nsuInitSkipTable(result_1124075148[0], sub_p0); + + return result_1124075148[0]; + +} + +function nsuFindStr(s_p0, sub_p1, start_p2, last_p3) { + var result_1124075213 = 0; + + BeforeRet: { + if ((subInt((s_p0).length, start_p2) < (sub_p1).length)) { + result_1124075213 = (-1); + break BeforeRet; + } + + if (((sub_p1).length == 1)) { + result_1124075213 = nsuFindChar(s_p0, sub_p1[chckIndx(0, 0, (sub_p1).length - 1)], start_p2, last_p3); + break BeforeRet; + } + + result_1124075213 = nsuFindStrA(nsuInitNewSkipTable(sub_p1), s_p0, sub_p1, start_p2, last_p3); + }; + + return result_1124075213; + +} + +function contains__pureZstrutils_u1879(s_p0, sub_p1) { + var result_1124075354 = false; + + BeforeRet: { + result_1124075354 = (0 <= nsuFindStr(s_p0, sub_p1, 0, (-1))); + break BeforeRet; + }; + + return result_1124075354; + +} + +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 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_1124074785 = []; + + var a_1124074787 = x_p1.a; + var L_1124074789 = addInt(subInt(subInt((s_p0).length, x_p1.b), a_1124074787), 1); + result_1124074785 = nimCopy(null, mnewString(chckRange(L_1124074789, 0, 2147483647)), NTI33554449); + Label1: { + var i_1124074794 = 0; + var i_1962934513 = 0; + Label2: { + Label3: while (true) { + if (!(i_1962934513 < L_1124074789)) break Label3; + i_1124074794 = i_1962934513; + result_1124074785[chckIndx(i_1124074794, 0, (result_1124074785).length - 1)] = s_p0[chckIndx(addInt(i_1124074794, a_1124074787), 0, (s_p0).length - 1)]; + i_1962934513 = addInt(i_1962934513, 1); + } + }; + }; + + return result_1124074785; + +} + +function HEX2EHEX2E__stdZprivateZunderscored95calls_u26(a_p0, b_p1) { + var result_1107296289 = ({a: 0, b: 0}); + + result_1107296289 = nimCopy(result_1107296289, {a: a_p0, b: b_p1}, NTI1107296286); + + return result_1107296289; + +} + +function makeUri__karaxutils_u93(relative_p0, appName_p1, includeHash_p2, search_p3) { + var Temporary1; + + var result_1862271074 = []; + + BeforeRet: { + var relative_1862271075 = nimCopy(null, relative_p0, NTI33554449); + if (!(contains__pureZstrutils_u1879(cstrToNimstr(window.location.pathname), appName_p1))) { + failedAssertImpl__stdZassertions_u86([107,97,114,97,120,117,116,105,108,115,46,110,105,109,40,53,54,44,32,53,41,32,96,97,112,112,78,97,109,101,32,105,110,32,36,119,105,110,100,111,119,46,108,111,99,97,116,105,111,110,46,112,97,116,104,110,97,109,101,96,32]); + } + + if ((relative_1862271075[chckIndx(0, 0, (relative_1862271075).length - 1)] == 47)) { + relative_1862271075 = nimCopy(null, HEX5BHEX5D__pureZstrutils_u1308(relative_1862271075, HEX2EHEX2E__stdZprivateZunderscored95calls_u26(1, 1)), NTI33554449); + } + + if (includeHash_p2) { + Temporary1 = cstrToNimstr(window.location.hash); + } + else { + Temporary1 = []; + } + + result_1862271074 = nimCopy(null, (cstrToNimstr(window.location.protocol)).concat([47,47],cstrToNimstr(window.location.host),appName_p1,relative_1862271075,search_p3,Temporary1), NTI33554449); + break BeforeRet; + }; + + return result_1862271074; + +} + +function makeUri__karaxutils_u123(relative_p0, params_p1, appName_p2, includeHash_p3, reuseSearch_p4) { + var Temporary4; + var Temporary5; + + var result_1862271105 = []; + + var query_1862271106 = []; + Label1: { + var i_1862271115 = 0; + var colontmp__1962934487 = 0; + colontmp__1962934487 = (params_p1).length; + var i_1962934488 = 0; + Label2: { + Label3: while (true) { + if (!(i_1962934488 < colontmp__1962934487)) break Label3; + i_1862271115 = i_1962934488; + var param_1862271116 = nimCopy(null, params_p1[chckIndx(i_1862271115, 0, (params_p1).length - 1)], NTI1862271053); + if (!((i_1862271115 == 0))) { + nimAddStrStr(query_1862271106, [38]);; + } + + nimAddStrStr(query_1862271106, (param_1862271116["Field0"]).concat([61],param_1862271116["Field1"]));; + i_1962934488 = addInt(i_1962934488, 1); + } + }; + }; + if ((0 < (query_1862271106).length)) { + if (reuseSearch_p4) { + Temporary5 = cstrToNimstr(window.location.search); + } + else { + Temporary5 = []; + } + + var search_1862271117 = nimCopy(null, Temporary5, NTI33554449); + if (!(((search_1862271117).length == 0))) { + nimAddStrStr(search_1862271117, [38]);; + } + + nimAddStrStr(search_1862271117, query_1862271106);; + if (!((search_1862271117[chckIndx(0, 0, (search_1862271117).length - 1)] == 63))) { + search_1862271117 = nimCopy(null, ([63]).concat(search_1862271117), NTI33554449); + } + + Temporary4 = makeUri__karaxutils_u93(relative_p0, appName_p2, false, search_1862271117); + } + else { + Temporary4 = makeUri__karaxutils_u93(relative_p0, appName_p2, false, []); + } + + result_1862271105 = nimCopy(null, Temporary4, NTI33554449); + + return result_1862271105; + +} +var buttons_1962934292 = [nimCopy(null, {Field0: [76,97,116,101,115,116], Field1: makeUri__karaxutils_u123([47], [], [47], false, true), Field2: [108,97,116,101,115,116,45,98,116,110]}, NTI1962934276), nimCopy(null, {Field0: [67,97,116,101,103,111,114,105,101,115], Field1: makeUri__karaxutils_u123([47,99,97,116,101,103,111,114,105,101,115], [], [47], false, true), Field2: [99,97,116,101,103,111,114,105,101,115,45,98,116,110]}, NTI1962934276)]; + +function none__threadlist_u76() { + var result_1593835602 = ({val: null}); + + result_1593835602 = nimCopy(result_1593835602, {val: null}, NTI1593835573); + + return result_1593835602; + +} + +function none__threadlist_u73() { + var result_1593835595 = ({val: null}); + + result_1593835595 = nimCopy(result_1593835595, none__threadlist_u76(), NTI1593835537); + + return result_1593835595; + +} + +function none__categorypicker_u628() { + var result_1979712122 = ({val: null}); + + result_1979712122 = nimCopy(result_1979712122, {val: null}, NTI1979711941); + + return result_1979712122; + +} + +function none__categorypicker_u625() { + var result_1979712115 = ({val: null}); + + result_1979712115 = nimCopy(result_1979712115, none__categorypicker_u628(), NTI1979711498); + + return result_1979712115; + +} + +function none__addcategorymodal_u325() { + var result_1996489036 = ({val: ({errorFields: [], message: []}), has: false}); + + result_1996489036 = nimCopy(result_1996489036, {val: ({errorFields: [], message: []}), has: false}, NTI1996488915); + + return result_1996489036; + +} + +function none__addcategorymodal_u322() { + var result_1996489028 = ({val: ({errorFields: [], message: []}), has: false}); + + result_1996489028 = nimCopy(result_1996489028, none__addcategorymodal_u325(), NTI1946157155); + + return result_1996489028; + +} + +function newAddCategoryModal__addcategorymodal_u31(onAddCategory_p0) { + var result_1996488737 = null; + + result_1996488737 = {modalShown: false, loading: false, onAddCategory: onAddCategory_p0, m_type: NTI1996488708, error: ({val: ({errorFields: [], message: []}), has: false}), key: null, renderImpl: null, changedImpl: null, updatedImpl: null, onAttachImpl: null, onDetachImpl: null, version: 0, renderedVersion: 0, expanded: null, debugId: 0, kind: 0, index: 0, id: null, class: null, text: null, kids: [], attrs: [], events: [], style: null, dom: null}; + + return result_1996488737; + +} + +function isNone__categorypicker_u348(self_p0) { + var result_1979711839 = false; + + result_1979711839 = (self_p0.val == null); + + return result_1979711839; + +} + +function get__categorypicker_u341(self_p0) { + var result_1979711832 = null; + var result_1979711832_Idx = 0; + + BeforeRet: { + if (isNone__categorypicker_u348(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_1979711832 = self_p0; result_1979711832_Idx = "val"; + break BeforeRet; + }; + + return [result_1979711832, result_1979711832_Idx]; + +} + +function newSeq__categorypicker_u218(len_p0) { + var result_1979711710 = []; + + result_1979711710 = new Array(len_p0); for (var i = 0 ; i < len_p0 ; ++i) { result_1979711710[i] = ({id: 0, name: [], description: [], color: [], numTopics: 0}); } + return result_1979711710; + +} + +function raiseDivByZero() { + raiseException({message: [100,105,118,105,115,105,111,110,32,98,121,32,122,101,114,111], parent: null, m_type: NTI134217742, name: null, trace: [], up: null}, "DivByZeroDefect"); + + +} + +function HEX2A__pureZalgorithm_u8(x_p0, order_p1) { + var result_1040187403 = 0; + + var y_1040187408 = subInt(order_p1, 1); + result_1040187403 = subInt((x_p0 ^ y_1040187408), y_1040187408); + + return result_1040187403; + +} + +function mergeAlt__categorypicker_u246(a_p0, b_p1, lo_p2, m_p3, hi_p4, cmp_p5, order_p6) { + BeforeRet: { + if ((HEX2A__pureZalgorithm_u8(cmp_p5(a_p0[chckIndx(m_p3, 0, (a_p0).length - 1)], a_p0[chckIndx(addInt(m_p3, 1), 0, (a_p0).length - 1)]), order_p6) <= 0)) { + break BeforeRet; + } + + var j_1979711745 = lo_p2; + if (!((j_1979711745 <= m_p3))) { + failedAssertImpl__stdZassertions_u86([97,108,103,111,114,105,116,104,109,46,110,105,109,40,51,51,56,44,32,51,41,32,96,106,32,60,61,32,109,96,32]); + } + + var bb_1979711751 = 0; + Label1: { + Label2: while (true) { + if (!(j_1979711745 <= m_p3)) break Label2; + b_p1[chckIndx(bb_1979711751, 0, (b_p1).length - 1)] = nimCopy(b_p1[chckIndx(bb_1979711751, 0, (b_p1).length - 1)], a_p0[chckIndx(j_1979711745, 0, (a_p0).length - 1)], NTI1845493763); + bb_1979711751 = addInt(bb_1979711751, 1); + j_1979711745 = addInt(j_1979711745, 1); + } + }; + var i_1979711762 = 0; + var k_1979711763 = lo_p2; + Label3: { + Label4: while (true) { + if (!((k_1979711763 < j_1979711745) && (j_1979711745 <= hi_p4))) break Label4; + if ((HEX2A__pureZalgorithm_u8(cmp_p5(b_p1[chckIndx(i_1979711762, 0, (b_p1).length - 1)], a_p0[chckIndx(j_1979711745, 0, (a_p0).length - 1)]), order_p6) <= 0)) { + a_p0[chckIndx(k_1979711763, 0, (a_p0).length - 1)] = nimCopy(a_p0[chckIndx(k_1979711763, 0, (a_p0).length - 1)], b_p1[chckIndx(i_1979711762, 0, (b_p1).length - 1)], NTI1845493763); + i_1979711762 = addInt(i_1979711762, 1); + } + else { + a_p0[chckIndx(k_1979711763, 0, (a_p0).length - 1)] = nimCopy(a_p0[chckIndx(k_1979711763, 0, (a_p0).length - 1)], a_p0[chckIndx(j_1979711745, 0, (a_p0).length - 1)], NTI1845493763); + j_1979711745 = addInt(j_1979711745, 1); + } + + k_1979711763 = addInt(k_1979711763, 1); + } + }; + Label5: { + Label6: while (true) { + if (!(k_1979711763 < j_1979711745)) break Label6; + a_p0[chckIndx(k_1979711763, 0, (a_p0).length - 1)] = nimCopy(a_p0[chckIndx(k_1979711763, 0, (a_p0).length - 1)], b_p1[chckIndx(i_1979711762, 0, (b_p1).length - 1)], NTI1845493763); + k_1979711763 = addInt(k_1979711763, 1); + i_1979711762 = addInt(i_1979711762, 1); + } + }; + }; + + +} + +function sort__categorypicker_u177(a_p0, cmp_p1, order_p2) { + var n_1979711677 = (a_p0).length; + var b_1979711731 = newSeq__categorypicker_u218(chckRange(divInt(n_1979711677, 2), 0, 2147483647)); + var s_1979711732 = 1; + Label1: { + Label2: while (true) { + if (!(s_1979711732 < n_1979711677)) break Label2; + var m_1979711733 = subInt(subInt(n_1979711677, 1), s_1979711732); + Label3: { + Label4: while (true) { + if (!(0 <= m_1979711733)) break Label4; + mergeAlt__categorypicker_u246(a_p0, b_1979711731, nimMax(addInt(subInt(m_1979711733, s_1979711732), 1), 0), m_1979711733, addInt(m_1979711733, s_1979711732), cmp_p1, order_p2); + m_1979711733 = subInt(m_1979711733, mulInt(s_1979711732, 2)); + } + }; + s_1979711732 = mulInt(s_1979711732, 2); + } + }; + + +} + +function cmpStrings(a_p0, b_p1) { + if (a_p0 == b_p1) return 0; + if (!a_p0) return -1; + if (!b_p1) return 1; + for (var i = 0; i < a_p0.length && i < b_p1.length; i++) { + var result = a_p0[i] - b_p1[i]; + if (result != 0) return result; + } + return a_p0.length - b_p1.length; + + + +} + +function cmp__system_u1456(x_p0, y_p1) { + var result_33557132 = 0; + + result_33557132 = cmpStrings(x_p0, y_p1); + + return result_33557132; + +} + +function cmpNames__category_u20(cat1_p0, cat2_p1) { + var result_1845493783 = 0; + + result_1845493783 = cmp__system_u1456(cat1_p0.name, cat2_p1.name); + + return result_1845493783; + +} + +function select__categorypicker_u556(state_p0, id_p1) { + state_p0.selectedCategoryID = id_p1; + state_p0.version = addInt(state_p0.version, 1); + + +} + +function onCategory__categorypicker_u564(state_p0) { + +function HEX3Aanonymous__categorypicker_u567(category_p0) { + var Temporary1; + var Temporary3; + + var Temporary2 = nimCopy(null, category_p0, NTI1845493763); + (Temporary1 = get__categorypicker_u341(state_p0.list), Temporary1)[0][Temporary1[1]].categories.push(Temporary2);; + sort__categorypicker_u177((Temporary3 = get__categorypicker_u341(state_p0.list), Temporary3)[0][Temporary3[1]].categories, cmpNames__category_u20, 1); + select__categorypicker_u556(state_p0, category_p0.id); + state_p0.onAddCategory(category_p0); + + + } + + var result_1979712054 = null; + + result_1979712054 = HEX3Aanonymous__categorypicker_u567; + + return result_1979712054; + +} + +function newCategoryPicker__categorypicker_u609(onCategoryChange_p0, onAddCategory_p1) { + var result_1979712100 = null; + + result_1979712100 = {list: none__categorypicker_u625(), selectedCategoryID: 0, loading: false, addEnabled: false, status: 200, error: none__addcategorymodal_u322(), onCategoryChange: onCategoryChange_p0, onAddCategory: onAddCategory_p1, m_type: NTI1979711492, addCategoryModal: null, key: null, renderImpl: null, changedImpl: null, updatedImpl: null, onAttachImpl: null, onDetachImpl: null, version: 0, renderedVersion: 0, expanded: null, debugId: 0, kind: 0, index: 0, id: null, class: null, text: null, kids: [], attrs: [], events: [], style: null, dom: null}; + var state_1979712140 = result_1979712100; + result_1979712100.addCategoryModal = newAddCategoryModal__addcategorymodal_u31(onCategory__categorypicker_u564(state_1979712140)); + + return result_1979712100; + +} + +function navigateTo__karaxutils_u142(uri_p0) { + window.history.pushState(0, "", uri_p0); + window.dispatchEvent(new Event("popstate")); + + +} + +function onSelectedCategoryChanged__mainbuttons_u21(oldCategory_p0, newCategory_p1) { + var uri_1962934296 = makeUri__karaxutils_u123(([47,99,47]).concat(HEX24__systemZdollars_u14(newCategory_p1.id)), [], [47], false, true); + navigateTo__karaxutils_u142(toJSStr(uri_1962934296)); + + +} + +function newMainButtons__mainbuttons_u29(onCategoryChange_p0) { + +function HEX3Aanonymous__mainbuttons_u35(oldCategory_p0, newCategory_p1) { + onSelectedCategoryChanged__mainbuttons_u21(oldCategory_p0, newCategory_p1); + result_1962934303.onCategoryChange(oldCategory_p0, newCategory_p1); + + + } + + var result_1962934303 = null; + + result_1962934303 = ({categoryPicker: null, onCategoryChange: null}); + result_1962934303.onCategoryChange = onCategoryChange_p0; + result_1962934303.categoryPicker = newCategoryPicker__categorypicker_u609(HEX3Aanonymous__mainbuttons_u35, nullAddCategory_1979712039); + + return result_1962934303; + +} + +function newState__threadlist_u59() { + +function HEX3Aanonymous__threadlist_u101(oldCategory_p0, newCategory_p1) { + state_1593835578[0].list = nimCopy(state_1593835578[0].list, none__threadlist_u73(), NTI1593835537); + + + } + + var result_1593835580 = null; + + result_1593835580 = {list: none__threadlist_u73(), loading: false, status: 200, mainButtons: newMainButtons__mainbuttons_u29(HEX3Aanonymous__threadlist_u101), refreshList: false}; + + return result_1593835580; + +} +var state_1593835578 = [null]; +state_1593835578[0] = newState__threadlist_u59(); + +function none__postlist_u89() { + var result_2063597663 = ({val: null}); + + result_2063597663 = nimCopy(result_2063597663, {val: null}, NTI2063597636); + + return result_2063597663; + +} + +function none__postlist_u86() { + var result_2063597656 = ({val: null}); + + result_2063597656 = nimCopy(result_2063597656, none__postlist_u89(), NTI2063597582); + + return result_2063597656; + +} + +function none__editbox_u326() { + var result_2130706764 = ({val: null}); + + result_2130706764 = nimCopy(result_2130706764, {val: null}, NTI2130706757); + + return result_2130706764; + +} + +function none__editbox_u323() { + var result_2130706757 = ({val: null}); + + result_2130706757 = nimCopy(result_2130706757, none__editbox_u326(), NTI2113929478); + + return result_2130706757; + +} + +function newReplyBox__replybox_u39(onPost_p0) { + var result_2113929259 = null; + + result_2113929259 = {text: "", onPost: onPost_p0, shown: false, preview: false, loading: false, error: ({val: ({errorFields: [], message: []}), has: false}), rendering: ({val: null, has: false})}; + + return result_2113929259; + +} + +function reprEnum(e_p0, typ_p1) { + var result_33557684 = []; + + var tmp_33557685 = false; + var item_33557686 = typ_p1.node.sons[e_p0]; + tmp_33557685 = item_33557686 !== undefined; + if (tmp_33557685) { + result_33557684 = nimCopy(null, makeNimstrLit(item_33557686.name), NTI33554449); + } + else { + result_33557684 = nimCopy(null, (HEX24__systemZdollars_u14(e_p0)).concat([32,40,105,110,118,97,108,105,100,32,100,97,116,97,33,41]), NTI33554449); + } + + + return result_33557684; + +} + +function len__pureZjson_u2184(t_p0) { + var result_1644169356 = 0; + + result_1644169356 = t_p0.counter; + + return result_1644169356; + +} + +function len__pureZjson_u3028(n_p0) { + var Temporary1; + var Temporary2; + + var result_1644170198 = 0; + + switch (n_p0.kind) { + case 6: + var Temporary1 = n_p0; + if (ConstSet2[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'elems\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + result_1644170198 = (Temporary1.elems).length; + break; + case 5: + var Temporary2 = n_p0; + if (ConstSet3[Temporary2.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fields\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary2.kind, NTI1644167171)); } + result_1644170198 = len__pureZjson_u2184(Temporary2.fields); + break; + default: + result_1644170198 = 0; + break; + } + + return result_1644170198; + +} + +function isFilled__pureZcollectionsZtables_u31(hcode_p0) { + var result_788529185 = false; + + result_788529185 = !((hcode_p0 == 0)); + + return result_788529185; + +} + +function toHexImpl__pureZstrutils_u777(x_p0, len_p1, handleNegative_p2) { + var result_1124074253 = []; + + var n_1124074255 = x_p0; + result_1124074253 = nimCopy(null, mnewString(len_p1), NTI33554449); + Label1: { + var j_1124074261 = 0; + var colontmp__2063599812 = 0; + colontmp__2063599812 = subInt(len_p1, 1); + var res_2063599814 = colontmp__2063599812; + Label2: { + Label3: while (true) { + if (!(0 <= res_2063599814)) break Label3; + j_1124074261 = res_2063599814; + result_1124074253[chckIndx(j_1124074261, 0, (result_1124074253).length - 1)] = [48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70][chckIndx(chckRange(Number((n_1124074255 & 15n)), (-2147483648), 2147483647), 0, ([48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]).length - 1)]; + n_1124074255 = (n_1124074255 >> (BigInt(4) & 63n)); + if (((n_1124074255 == 0n) && handleNegative_p2)) { + n_1124074255 = 18446744073709551615n; + } + + res_2063599814 = subInt(res_2063599814, 1); + } + }; + }; + + return result_1124074253; + +} + +function toHex__pureZstrutils_u2145(x_p0, len_p1) { + var result_1124075621 = []; + + result_1124075621 = nimCopy(null, toHexImpl__pureZstrutils_u777(BigInt.asUintN(64, BigInt(x_p0)), len_p1, (x_p0 < 0)), NTI33554449); + + return result_1124075621; + +} + +function escapeJsonUnquoted__pureZjson_u4319(s_p0, result_p1, result_p1_Idx) { + Label1: { + var c_1644171490 = 0; + var i_2063599808 = 0; + var L_2063599809 = (s_p0).length; + Label2: { + Label3: while (true) { + if (!(i_2063599808 < L_2063599809)) break Label3; + c_1644171490 = s_p0[chckIndx(i_2063599808, 0, (s_p0).length - 1)]; + switch (c_1644171490) { + case 10: + nimAddStrStr(result_p1[result_p1_Idx], [92,110]);; + break; + case 8: + nimAddStrStr(result_p1[result_p1_Idx], [92,98]);; + break; + case 12: + nimAddStrStr(result_p1[result_p1_Idx], [92,102]);; + break; + case 9: + nimAddStrStr(result_p1[result_p1_Idx], [92,116]);; + break; + case 11: + nimAddStrStr(result_p1[result_p1_Idx], [92,117,48,48,48,98]);; + break; + case 13: + nimAddStrStr(result_p1[result_p1_Idx], [92,114]);; + break; + case 34: + nimAddStrStr(result_p1[result_p1_Idx], [92,34]);; + break; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + nimAddStrStr(result_p1[result_p1_Idx], ([92,117,48,48,48]).concat(HEX24__systemZdollars_u14(c_1644171490)));; + break; + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + nimAddStrStr(result_p1[result_p1_Idx], ([92,117,48,48]).concat(toHex__pureZstrutils_u2145(c_1644171490, 2)));; + break; + case 92: + nimAddStrStr(result_p1[result_p1_Idx], [92,92]);; + break; + default: + addChar(result_p1[result_p1_Idx], c_1644171490);; + break; + } + i_2063599808 += 1; + if (!(((s_p0).length == L_2063599809))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(272, 11) `len(a) == L` the length of the string changed while iterating over it")); + } + + } + }; + }; + + +} + +function escapeJson__pureZjson_u4340(s_p0, result_p1, result_p1_Idx) { + nimAddStrStr(result_p1[result_p1_Idx], [34]);; + escapeJsonUnquoted__pureZjson_u4319(s_p0, result_p1, result_p1_Idx); + nimAddStrStr(result_p1[result_p1_Idx], [34]);; + + +} + +function nimFloatToString__stdZformatfloat_u130(a_p0) { + var result_419430532 = null; + + function nimOnlyDigitsOrMinus(n) { + return n.toString().match(/^-?\d+$/); + } + if (Number.isSafeInteger(a_p0)) + result_419430532 = a_p0 === 0 && 1 / a_p0 < 0 ? "-0.0" : a_p0+".0"; + else if (isNaN(a_p0)) // Number.isNaN is since ES6 + result_419430532 = "nan"; // or it'll be "NaN" + else if (!isFinite(a_p0)) // Number.isFinite newer but unnecessary here + result_419430532 = a_p0 > 0 ? "inf" : "-inf"; // or it'll be [-]Infinity + else { + result_419430532 = a_p0+""; + if(nimOnlyDigitsOrMinus(result_419430532)){ + result_419430532 = a_p0+".0"; + } + } + + + return result_419430532; + +} + +function addFloat__system_u3227(result_p0, result_p0_Idx, x_p1) { + add__system_u1972(result_p0, result_p0_Idx, nimFloatToString__stdZformatfloat_u130(x_p1)); + + +} + +function toUgly__pureZjson_u4350(result_p0, result_p0_Idx, node_p1) { + var Temporary2; + var Temporary6; + var Temporary9; + var Temporary10; + var Temporary11; + var Temporary12; + var Temporary13; + var Temporary14; + + var comma_1644171521 = false; + switch (node_p1.kind) { + case 6: + nimAddStrStr(result_p0[result_p0_Idx], [91]);; + Label1: { + var child_1644171525 = null; + var colontmp__2063599795 = []; + var Temporary2 = node_p1; + if (ConstSet4[Temporary2.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'elems\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary2.kind, NTI1644167171)); } + colontmp__2063599795 = Temporary2.elems; + var i_2063599797 = 0; + var L_2063599798 = (colontmp__2063599795).length; + Label3: { + Label4: while (true) { + if (!(i_2063599797 < L_2063599798)) break Label4; + child_1644171525 = colontmp__2063599795[chckIndx(i_2063599797, 0, (colontmp__2063599795).length - 1)]; + if (comma_1644171521) { + nimAddStrStr(result_p0[result_p0_Idx], [44]);; + } + else { + comma_1644171521 = true; + } + + toUgly__pureZjson_u4350(result_p0, result_p0_Idx, child_1644171525); + i_2063599797 += 1; + if (!(((colontmp__2063599795).length == L_2063599798))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + nimAddStrStr(result_p0[result_p0_Idx], [93]);; + break; + case 5: + nimAddStrStr(result_p0[result_p0_Idx], [123]);; + Label5: { + var key_1644171530 = []; + var value_1644171531 = null; + var colontmp__2063599801 = ({data: [], counter: 0, first: 0, last: 0}); + var Temporary6 = node_p1; + if (ConstSet5[Temporary6.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fields\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary6.kind, NTI1644167171)); } + colontmp__2063599801 = nimCopy(colontmp__2063599801, Temporary6.fields, NTI1644167182); + var L_2063599803 = len__pureZjson_u2184(colontmp__2063599801); + if ((0 < colontmp__2063599801.counter)) { + var h_2063599804 = colontmp__2063599801.first; + Label7: { + Label8: while (true) { + if (!(0 <= h_2063599804)) break Label8; + var nxt_2063599806 = colontmp__2063599801.data[chckIndx(h_2063599804, 0, (colontmp__2063599801.data).length - 1)].Field1; + if (isFilled__pureZcollectionsZtables_u31(colontmp__2063599801.data[chckIndx(h_2063599804, 0, (colontmp__2063599801.data).length - 1)].Field0)) { + key_1644171530 = colontmp__2063599801.data[chckIndx(h_2063599804, 0, (colontmp__2063599801.data).length - 1)].Field2; + value_1644171531 = colontmp__2063599801.data[chckIndx(h_2063599804, 0, (colontmp__2063599801.data).length - 1)].Field3; + if (comma_1644171521) { + nimAddStrStr(result_p0[result_p0_Idx], [44]);; + } + else { + comma_1644171521 = true; + } + + escapeJson__pureZjson_u4340(key_1644171530, result_p0, result_p0_Idx); + nimAddStrStr(result_p0[result_p0_Idx], [58]);; + toUgly__pureZjson_u4350(result_p0, result_p0_Idx, value_1644171531); + if (!((len__pureZjson_u2184(colontmp__2063599801) == L_2063599803))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("tables.nim(1822, 11) `len(t) == L` the length of the table changed while iterating over it")); + } + + } + + h_2063599804 = nxt_2063599806; + } + }; + } + + }; + nimAddStrStr(result_p0[result_p0_Idx], [125]);; + break; + case 4: + if (node_p1.isUnquoted) { + var Temporary9 = node_p1; + if (ConstSet6[Temporary9.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary9.kind, NTI1644167171)); } + nimAddStrStr(result_p0[result_p0_Idx], Temporary9.str);; + } + else { + var Temporary10 = node_p1; + if (ConstSet7[Temporary10.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary10.kind, NTI1644167171)); } + escapeJson__pureZjson_u4340(Temporary10.str, result_p0, result_p0_Idx); + } + + break; + case 2: + var Temporary11 = node_p1; + if (ConstSet8[Temporary11.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'num\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary11.kind, NTI1644167171)); } + addInt__stdZprivateZdigitsutils_u223(result_p0, result_p0_Idx, Temporary11.num); + break; + case 3: + var Temporary12 = node_p1; + if (ConstSet9[Temporary12.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fnum\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary12.kind, NTI1644167171)); } + addFloat__system_u3227(result_p0, result_p0_Idx, Temporary12.fnum); + break; + case 1: + var Temporary14 = node_p1; + if (ConstSet10[Temporary14.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'bval\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary14.kind, NTI1644167171)); } + if (Temporary14.bval) { + Temporary13 = [116,114,117,101]; + } + else { + Temporary13 = [102,97,108,115,101]; + } + + nimAddStrStr(result_p0[result_p0_Idx], Temporary13);; + break; + case 0: + nimAddStrStr(result_p0[result_p0_Idx], [110,117,108,108]);; + break; + } + + +} + +function HEX24__pureZjson_u4450(node_p0) { + var result_1644171620 = [[]]; + + result_1644171620[0] = nimCopy(null, mnewString(0), NTI33554449); + toUgly__pureZjson_u4350(result_1644171620, 0, node_p0); + + return result_1644171620[0]; + +} + +function newJArray__pureZjson_u203() { + var result_1644167372 = null; + + result_1644167372 = {kind: 6, elems: [], isUnquoted: false, str: [], num: 0n, fnum: 0.0, bval: false, fields: ({data: [], counter: 0, first: 0, last: 0})}; + + return result_1644167372; + +} + +function add__pureZjson_u349(father_p0, child_p1) { + var Temporary1; + + if (!((father_p0.kind == 6))) { + failedAssertImpl__stdZassertions_u86([106,115,111,110,46,110,105,109,40,51,48,55,44,32,51,41,32,96,102,97,116,104,101,114,46,107,105,110,100,32,61,61,32,74,65,114,114,97,121,96,32]); + } + + var Temporary1 = father_p0; + if (ConstSet11[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'elems\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + Temporary1.elems.push(child_p1);; + + +} + +function HEX25__pureZjson_u1839(n_p0) { + var result_1644169009 = null; + + result_1644169009 = {kind: 2, num: BigInt(n_p0), isUnquoted: false, str: [], fnum: 0.0, bval: false, fields: ({data: [], counter: 0, first: 0, last: 0}), elems: []}; + + return result_1644169009; + +} + +function HEX25__postlist_u1284(elements_p0) { + var result_2063598855 = null; + + result_2063598855 = newJArray__pureZjson_u203(); + Label1: { + var elem_2063598859 = 0; + var i_2063599817 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599817 < (elements_p0).length)) break Label3; + elem_2063598859 = elements_p0[chckIndx(i_2063599817, 0, (elements_p0).length - 1)]; + add__pureZjson_u349(result_2063598855, HEX25__pureZjson_u1839(elem_2063598859)); + i_2063599817 += 1; + } + }; + }; + + return result_2063598855; + +} + +function valueHEX3D__pkgZkaraxZvdom_u419(n_p0, v_p1) { + n_p0.text = v_p1; + + +} + +function value__pkgZkaraxZvdom_u416(n_p0) { + var result_1409286562 = null; + + result_1409286562 = n_p0.text; + + return result_1409286562; + +} + +function addEventShell__pkgZkaraxZkarax_u85(d_p0, name_p1, h_p2) { + d_p0.addEventListener(name_p1, h_p2, false); + if ((d_p0.karaxEvents == null)) { + d_p0.karaxEvents = new Array(0); + } + + d_p0.karaxEvents.push({Field0: name_p1, Field1: h_p2}); + + +} + +function wrapEvent__pkgZkaraxZkarax_u183(d_p0, n_p1, k_p2, action_p3) { + +function laterWrapper__pkgZkaraxZkarax_u267() { + +function HEX3Aanonymous__pkgZkaraxZkarax_u272(ev_p0) { + +function wrapper__pkgZkaraxZkarax_u274() { + var vHEX60gensym15_1375731988 = ev_p0.target.value; + valueHEX3D__pkgZkaraxZvdom_u419(n_1375731982, vHEX60gensym15_1375731988); + if (!(!(cmpClosures(action_1375731981, null)))) { + failedAssertImpl__stdZassertions_u86([107,97,114,97,120,46,110,105,109,40,55,53,44,32,51,41,32,96,97,99,116,105,111,110,32,33,61,32,110,105,108,96,32]); + } + + action_1375731981(ev_p0, n_1375731982); + if (!((value__pkgZkaraxZvdom_u416(n_1375731982) == vHEX60gensym15_1375731988))) { + ev_p0.target.value = value__pkgZkaraxZvdom_u416(n_1375731982); + } + + + + } + + if (!((timer_1375731983 == null))) { + clearTimeout(timer_1375731983); + } + + timer_1375731983 = setTimeout(wrapper__pkgZkaraxZkarax_u274, 400); + + + } + + var result_1375731980 = null; + + var action_1375731981 = action_p3; + var n_1375731982 = n_p1; + var timer_1375731983 = null; + result_1375731980 = HEX3Aanonymous__pkgZkaraxZkarax_u272; + + return result_1375731980; + + } + +function enterWrapper__pkgZkaraxZkarax_u234() { + +function HEX3Aanonymous__pkgZkaraxZkarax_u238(ev_p0) { + if ((ev_p0.keyCode == 13)) { + var vHEX60gensym8_1375731953 = ev_p0.target.value; + valueHEX3D__pkgZkaraxZvdom_u419(n_1375731949, vHEX60gensym8_1375731953); + if (!(!(cmpClosures(action_1375731948, null)))) { + failedAssertImpl__stdZassertions_u86([107,97,114,97,120,46,110,105,109,40,55,53,44,32,51,41,32,96,97,99,116,105,111,110,32,33,61,32,110,105,108,96,32]); + } + + action_1375731948(ev_p0, n_1375731949); + if (!((value__pkgZkaraxZvdom_u416(n_1375731949) == vHEX60gensym8_1375731953))) { + ev_p0.target.value = value__pkgZkaraxZvdom_u416(n_1375731949); + } + + } + + + + } + + var result_1375731947 = null; + + var action_1375731948 = action_p3; + var n_1375731949 = n_p1; + result_1375731947 = HEX3Aanonymous__pkgZkaraxZkarax_u238; + + return result_1375731947; + + } + +function stdWrapper__pkgZkaraxZkarax_u189() { + +function HEX3Aanonymous__pkgZkaraxZkarax_u193(ev_p0) { + if ((((n_1375731904.kind == 200) || (n_1375731904.kind == 194)) || (n_1375731904.kind == 196))) { + var vHEX60gensym1_1375731920 = ev_p0.target.value; + valueHEX3D__pkgZkaraxZvdom_u419(n_1375731904, vHEX60gensym1_1375731920); + if (!(!(cmpClosures(action_1375731903, null)))) { + failedAssertImpl__stdZassertions_u86([107,97,114,97,120,46,110,105,109,40,55,53,44,32,51,41,32,96,97,99,116,105,111,110,32,33,61,32,110,105,108,96,32]); + } + + action_1375731903(ev_p0, n_1375731904); + if (!((value__pkgZkaraxZvdom_u416(n_1375731904) == vHEX60gensym1_1375731920))) { + ev_p0.target.value = value__pkgZkaraxZvdom_u416(n_1375731904); + } + + } + else { + action_1375731903(ev_p0, n_1375731904); + } + + + + } + + var result_1375731902 = null; + + var action_1375731903 = action_p3; + var n_1375731904 = n_p1; + result_1375731902 = HEX3Aanonymous__pkgZkaraxZkarax_u193; + + return result_1375731902; + + } + + var result_1375731900 = null; + + switch (k_p2) { + case 30: + result_1375731900 = laterWrapper__pkgZkaraxZkarax_u267(); + addEventShell__pkgZkaraxZkarax_u85(d_p0, "keyup", result_1375731900); + break; + case 29: + result_1375731900 = enterWrapper__pkgZkaraxZkarax_u234(); + addEventShell__pkgZkaraxZkarax_u85(d_p0, "keyup", result_1375731900); + break; + default: + result_1375731900 = stdWrapper__pkgZkaraxZkarax_u189(); + addEventShell__pkgZkaraxZkarax_u85(d_p0, toEventName_1409286512[chckIndx(k_p2, 0, (toEventName_1409286512).length - 1)], result_1375731900); + break; + } + + return result_1375731900; + +} + +function applyEvents__pkgZkaraxZkarax_u310(n_p0) { + var dest_1375732024 = n_p0.dom; + Label1: { + var i_1375732032 = 0; + var colontmp__2063599844 = 0; + colontmp__2063599844 = (n_p0.events).length; + var i_2063599845 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599845 < colontmp__2063599844)) break Label3; + i_1375732032 = i_2063599845; + n_p0.events[chckIndx(i_1375732032, 0, (n_p0.events).length - 1)]["Field2"] = wrapEvent__pkgZkaraxZkarax_u183(dest_1375732024, n_p0, n_p0.events[chckIndx(i_1375732032, 0, (n_p0.events).length - 1)]["Field0"], n_p0.events[chckIndx(i_1375732032, 0, (n_p0.events).length - 1)]["Field1"]); + i_2063599845 = addInt(i_2063599845, 1); + } + }; + }; + + +} + +function applyStyle__pkgZkaraxZvstyles_u525(n_p0, s_p1) { + n_p0.style = {}; + Label1: { + var i_1476395548 = 0; + var colontmp__2063599848 = 0; + colontmp__2063599848 = subInt(s_p1.length, 1); + var res_2063599849 = 0; + Label2: { + Label3: while (true) { + if (!(res_2063599849 <= colontmp__2063599848)) break Label3; + i_1476395548 = res_2063599849; + n_p0.style[s_p1[i_1476395548]] = s_p1[addInt(i_1476395548, 1)]; + res_2063599849 = addInt(res_2063599849, 2); + } + }; + }; + + +} + +function toDom__pkgZkaraxZkarax_u337(n_p0, useAttachedNode_p1, kxi_p2) { + var result_1375732053 = null; + + BeforeRet: { + if (useAttachedNode_p1) { + if (!((n_p0.dom == null))) { + if (!((n_p0.id == null))) { + kxi_p2.byId[n_p0.id] = n_p0; + } + + result_1375732053 = n_p0.dom; + break BeforeRet; + } + + } + + if ((n_p0.kind == 0)) { + result_1375732053 = document.createTextNode(n_p0.text); + n_p0.dom = result_1375732053; + if (!((n_p0.id == null))) { + kxi__.byId[n_p0.id] = n_p0; + } + + } + else { + if ((n_p0.kind == 6)) { + result_1375732053 = document.createElement("div"); + result_1375732053.innerHTML = n_p0.text; + n_p0.dom = result_1375732053; + if (!((n_p0.id == null))) { + kxi__.byId[n_p0.id] = n_p0; + } + + break BeforeRet; + } + else { + if ((n_p0.kind == 3)) { + var x_1375732093 = vcomponents_1442840607[0][n_p0.text](n_p0.kids); + result_1375732053 = toDom__pkgZkaraxZkarax_u337(x_1375732093, useAttachedNode_p1, kxi_p2); + n_p0.dom = result_1375732053; + if (!((n_p0.id == null))) { + kxi__.byId[n_p0.id] = n_p0; + } + + break BeforeRet; + } + else { + if ((n_p0.kind == 4)) { + result_1375732053 = n_p0.dom; + if (!(!((result_1375732053 == null)))) { + failedAssertImpl__stdZassertions_u86([107,97,114,97,120,46,110,105,109,40,49,55,55,44,32,53,41,32,96,114,101,115,117,108,116,32,33,61,32,110,105,108,96,32]); + } + + n_p0.dom = result_1375732053; + if (!((n_p0.id == null))) { + kxi__.byId[n_p0.id] = n_p0; + } + + break BeforeRet; + } + else { + if ((n_p0.kind == 5)) { + var x_1375732123 = n_p0; + if (!(cmpClosures(x_1375732123.onAttachImpl, null))) { + x_1375732123.onAttachImpl(x_1375732123); + } + + if (!(!(cmpClosures(x_1375732123.renderImpl, null)))) { + failedAssertImpl__stdZassertions_u86([107,97,114,97,120,46,110,105,109,40,49,56,52,44,32,53,41,32,96,120,46,114,101,110,100,101,114,73,109,112,108,32,33,61,32,110,105,108,96,32]); + } + + if ((x_1375732123.expanded == null)) { + x_1375732123.expanded = x_1375732123.renderImpl(x_1375732123); + } + + if (!(!((x_1375732123.expanded == null)))) { + failedAssertImpl__stdZassertions_u86([107,97,114,97,120,46,110,105,109,40,49,56,56,44,32,53,41,32,96,120,46,101,120,112,97,110,100,101,100,32,33,61,32,110,105,108,96,32]); + } + + result_1375732053 = toDom__pkgZkaraxZkarax_u337(x_1375732123.expanded, useAttachedNode_p1, kxi_p2); + n_p0.dom = result_1375732053; + if (!((n_p0.id == null))) { + kxi__.byId[n_p0.id] = n_p0; + } + + break BeforeRet; + } + else { + result_1375732053 = document.createElement(toTag_1409286511[chckIndx(n_p0.kind, 0, (toTag_1409286511).length - 1)]); + n_p0.dom = result_1375732053; + if (!((n_p0.id == null))) { + kxi__.byId[n_p0.id] = n_p0; + } + + Label1: { + var k_1375732162 = null; + Label2: { + var i_2063599829 = 0; + var colontmp__2063599830 = 0; + colontmp__2063599830 = (n_p0.kids).length; + var i_2063599831 = 0; + Label3: { + Label4: while (true) { + if (!(i_2063599831 < colontmp__2063599830)) break Label4; + i_2063599829 = i_2063599831; + k_1375732162 = n_p0.kids[chckIndx(i_2063599829, 0, (n_p0.kids).length - 1)]; + result_1375732053.appendChild(toDom__pkgZkaraxZkarax_u337(k_1375732162, useAttachedNode_p1, kxi_p2)); + i_2063599831 = addInt(i_2063599831, 1); + } + }; + }; + }; + if (!((n_p0.text == null))) { + result_1375732053.value = n_p0.text; + } + + } + }}}} + if (!((n_p0.id == null))) { + result_1375732053.id = n_p0.id; + } + + if (!((n_p0.class == null))) { + result_1375732053.className = n_p0.class; + } + + Label5: { + var k_1375732163 = null; + var v_1375732164 = null; + Label6: { + var i_2063599839 = 0; + var colontmp__2063599840 = 0; + colontmp__2063599840 = subInt((n_p0.attrs).length, 2); + var res_2063599841 = 0; + Label7: { + Label8: while (true) { + if (!(res_2063599841 <= colontmp__2063599840)) break Label8; + i_2063599839 = res_2063599841; + k_1375732163 = n_p0.attrs[chckIndx(i_2063599839, 0, (n_p0.attrs).length - 1)]; + v_1375732164 = n_p0.attrs[chckIndx(addInt(i_2063599839, 1), 0, (n_p0.attrs).length - 1)]; + if (!((v_1375732164 == null))) { + result_1375732053.setAttribute(k_1375732163, v_1375732164); + } + + res_2063599841 = addInt(res_2063599841, 2); + } + }; + }; + }; + applyEvents__pkgZkaraxZkarax_u310(n_p0); + if (((!((kxi_p2 == null)) && (n_p0 == kxi_p2.toFocusV)) && (kxi_p2.toFocus == null))) { + kxi_p2.toFocus = result_1375732053; + } + + if (!((n_p0.style == null))) { + applyStyle__pkgZkaraxZvstyles_u525(result_1375732053, n_p0.style); + } + + }; + + return result_1375732053; + +} + +function replaceById__pkgZkaraxZkarax_u545(id_p0, newTree_p1) { + var x_1375732260 = document.getElementById(id_p0); + x_1375732260.parentNode.replaceChild(newTree_p1, x_1375732260); + newTree_p1.id = id_p0; + + +} + +function len__pkgZkaraxZvdom_u779(x_p0) { + var result_1409286925 = 0; + + result_1409286925 = (x_p0.kids).length; + + return result_1409286925; + +} + +function HEX5BHEX5D__pkgZkaraxZvdom_u786(x_p0, idx_p1) { + var result_1409286933 = null; + + result_1409286933 = x_p0.kids[chckIndx(idx_p1, 0, (x_p0.kids).length - 1)]; + + return result_1409286933; + +} + +function eq__pkgZkaraxZvstyles_u253(a_p0, b_p1) { + var result_1476395264 = false; + + BeforeRet: { + if ((a_p0 == null)) { + if ((b_p1 == null)) { + result_1476395264 = true; + break BeforeRet; + } + else { + result_1476395264 = false; + break BeforeRet; + } + + } + else { + if ((b_p1 == null)) { + result_1476395264 = false; + break BeforeRet; + } + } + if (!((a_p0.length == b_p1.length))) { + result_1476395264 = false; + break BeforeRet; + } + + Label1: { + var i_1476395299 = 0; + var colontmp__2063599875 = 0; + colontmp__2063599875 = a_p0.length; + var i_2063599876 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599876 < colontmp__2063599875)) break Label3; + i_1476395299 = i_2063599876; + if (!((a_p0[i_1476395299] == b_p1[i_1476395299]))) { + result_1476395264 = false; + break BeforeRet; + } + + i_2063599876 = addInt(i_2063599876, 1); + } + }; + }; + result_1476395264 = true; + break BeforeRet; + }; + + return result_1476395264; + +} + +function sameAttrs__pkgZkaraxZvdom_u981(a_p0, b_p1) { + var result_1409287128 = false; + + BeforeRet: { + if (((a_p0.attrs).length == (b_p1.attrs).length)) { + result_1409287128 = true; + Label1: { + var i_1409287142 = 0; + var colontmp__2063599879 = 0; + colontmp__2063599879 = (a_p0.attrs).length; + var i_2063599880 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599880 < colontmp__2063599879)) break Label3; + i_1409287142 = i_2063599880; + if (!((a_p0.attrs[chckIndx(i_1409287142, 0, (a_p0.attrs).length - 1)] == b_p1.attrs[chckIndx(i_1409287142, 0, (b_p1.attrs).length - 1)]))) { + result_1409287128 = false; + break BeforeRet; + } + + i_2063599880 = addInt(i_2063599880, 1); + } + }; + }; + } + + }; + + return result_1409287128; + +} + +function eq__pkgZkaraxZkarax_u558(a_p0, b_p1, recursive_p2) { + var result_1375732274 = 0; + + BeforeRet: { + if (!((a_p0.kind == b_p1.kind))) { + result_1375732274 = 1; + break BeforeRet; + } + + if (!((a_p0.id == b_p1.id))) { + result_1375732274 = 1; + break BeforeRet; + } + + result_1375732274 = 3; + if (!((a_p0.index == b_p1.index))) { + result_1375732274 = 1; + break BeforeRet; + } + + if ((a_p0.kind == 0)) { + if (!((a_p0.text == b_p1.text))) { + result_1375732274 = 1; + break BeforeRet; + } + + } + else { + if ((a_p0.kind == 3)) { + if (!((a_p0.text == b_p1.text))) { + result_1375732274 = 1; + break BeforeRet; + } + + if (!((len__pkgZkaraxZvdom_u779(a_p0) == len__pkgZkaraxZvdom_u779(b_p1)))) { + result_1375732274 = 1; + break BeforeRet; + } + + Label1: { + var i_1375732291 = 0; + var colontmp__2063599867 = 0; + colontmp__2063599867 = len__pkgZkaraxZvdom_u779(a_p0); + var i_2063599868 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599868 < colontmp__2063599867)) break Label3; + i_1375732291 = i_2063599868; + if ((eq__pkgZkaraxZkarax_u558(HEX5BHEX5D__pkgZkaraxZvdom_u786(a_p0, i_1375732291), HEX5BHEX5D__pkgZkaraxZvdom_u786(b_p1, i_1375732291), recursive_p2) == 1)) { + result_1375732274 = 1; + break BeforeRet; + } + + i_2063599868 = addInt(i_2063599868, 1); + } + }; + }; + } + else { + if ((a_p0.kind == 4)) { + if ((a_p0.dom == b_p1.dom)) { + result_1375732274 = 3; + break BeforeRet; + } + else { + result_1375732274 = 1; + break BeforeRet; + } + + } + else { + if ((a_p0.kind == 6)) { + if (!((a_p0.text == b_p1.text))) { + result_1375732274 = 1; + break BeforeRet; + } + + } + else { + if ((b_p1.kind == 5)) { + if (!((a_p0.text == b_p1.text))) { + result_1375732274 = 1; + break BeforeRet; + } + + if (!((a_p0.key == b_p1.key))) { + result_1375732274 = 1; + break BeforeRet; + } + + result_1375732274 = 0; + break BeforeRet; + } + }}}} + if (((!((a_p0.class == b_p1.class)) || !(eq__pkgZkaraxZvstyles_u253(a_p0.style, b_p1.style))) || !(sameAttrs__pkgZkaraxZvdom_u981(a_p0, b_p1)))) { + result_1375732274 = 2; + break BeforeRet; + } + + if (recursive_p2) { + if (!((len__pkgZkaraxZvdom_u779(a_p0) == len__pkgZkaraxZvdom_u779(b_p1)))) { + result_1375732274 = 1; + break BeforeRet; + } + + Label4: { + var i_1375732317 = 0; + var colontmp__2063599871 = 0; + colontmp__2063599871 = len__pkgZkaraxZvdom_u779(a_p0); + var i_2063599872 = 0; + Label5: { + Label6: while (true) { + if (!(i_2063599872 < colontmp__2063599871)) break Label6; + i_1375732317 = i_2063599872; + if (!((eq__pkgZkaraxZkarax_u558(HEX5BHEX5D__pkgZkaraxZvdom_u786(a_p0, i_1375732317), HEX5BHEX5D__pkgZkaraxZvdom_u786(b_p1, i_1375732317), true) == 3))) { + result_1375732274 = 1; + break BeforeRet; + } + + i_2063599872 = addInt(i_2063599872, 1); + } + }; + }; + } + + break BeforeRet; + }; + + return result_1375732274; + +} + +function updateStyles__pkgZkaraxZkarax_u626(newNode_p0, oldNode_p1) { + if (!((oldNode_p1.dom == null))) { + if (!((newNode_p0.style == null))) { + applyStyle__pkgZkaraxZvstyles_u525(oldNode_p1.dom, newNode_p0.style); + } + else { + oldNode_p1.dom.style = {m_type: NTI1325400206, alignContent: null, alignItems: null, alignSelf: null, all: null, animation: null, animationDelay: null, animationDirection: null, animationDuration: null, animationFillMode: null, animationIterationCount: null, animationName: null, animationPlayState: null, animationTimingFunction: null, backdropFilter: null, backfaceVisibility: null, background: null, backgroundAttachment: null, backgroundBlendMode: null, backgroundClip: null, backgroundColor: null, backgroundImage: null, backgroundOrigin: null, backgroundPosition: null, backgroundRepeat: null, backgroundSize: null, blockSize: null, border: null, borderBlock: null, borderBlockColor: null, borderBlockEnd: null, borderBlockEndColor: null, borderBlockEndStyle: null, borderBlockEndWidth: null, borderBlockStart: null, borderBlockStartColor: null, borderBlockStartStyle: null, borderBlockStartWidth: null, borderBlockStyle: null, borderBlockWidth: null, borderBottom: null, borderBottomColor: null, borderBottomLeftRadius: null, borderBottomRightRadius: null, borderBottomStyle: null, borderBottomWidth: null, borderCollapse: null, borderColor: null, borderEndEndRadius: null, borderEndStartRadius: null, borderImage: null, borderImageOutset: null, borderImageRepeat: null, borderImageSlice: null, borderImageSource: null, borderImageWidth: null, borderInline: null, borderInlineColor: null, borderInlineEnd: null, borderInlineEndColor: null, borderInlineEndStyle: null, borderInlineEndWidth: null, borderInlineStart: null, borderInlineStartColor: null, borderInlineStartStyle: null, borderInlineStartWidth: null, borderInlineStyle: null, borderInlineWidth: null, borderLeft: null, borderLeftColor: null, borderLeftStyle: null, borderLeftWidth: null, borderRadius: null, borderRight: null, borderRightColor: null, borderRightStyle: null, borderRightWidth: null, borderSpacing: null, borderStartEndRadius: null, borderStartStartRadius: null, borderStyle: null, borderTop: null, borderTopColor: null, borderTopLeftRadius: null, borderTopRightRadius: null, borderTopStyle: null, borderTopWidth: null, borderWidth: null, bottom: null, boxDecorationBreak: null, boxShadow: null, boxSizing: null, breakAfter: null, breakBefore: null, breakInside: null, captionSide: null, caretColor: null, clear: null, clip: null, clipPath: null, color: null, colorAdjust: null, columnCount: null, columnFill: null, columnGap: null, columnRule: null, columnRuleColor: null, columnRuleStyle: null, columnRuleWidth: null, columnSpan: null, columnWidth: null, columns: null, contain: null, content: null, counterIncrement: null, counterReset: null, counterSet: null, cursor: null, direction: null, display: null, emptyCells: null, filter: null, flex: null, flexBasis: null, flexDirection: null, flexFlow: null, flexGrow: null, flexShrink: null, flexWrap: null, cssFloat: null, font: null, fontFamily: null, fontFeatureSettings: null, fontKerning: null, fontLanguageOverride: null, fontOpticalSizing: null, fontSize: null, fontSizeAdjust: null, fontStretch: null, fontStyle: null, fontSynthesis: null, fontVariant: null, fontVariantAlternates: null, fontVariantCaps: null, fontVariantEastAsian: null, fontVariantLigatures: null, fontVariantNumeric: null, fontVariantPosition: null, fontVariationSettings: null, fontWeight: null, gap: null, grid: null, gridArea: null, gridAutoColumns: null, gridAutoFlow: null, gridAutoRows: null, gridColumn: null, gridColumnEnd: null, gridColumnStart: null, gridRow: null, gridRowEnd: null, gridRowStart: null, gridTemplate: null, gridTemplateAreas: null, gridTemplateColumns: null, gridTemplateRows: null, hangingPunctuation: null, height: null, hyphens: null, imageOrientation: null, imageRendering: null, inlineSize: null, inset: null, insetBlock: null, insetBlockEnd: null, insetBlockStart: null, insetInline: null, insetInlineEnd: null, insetInlineStart: null, isolation: null, justifyContent: null, justifyItems: null, justifySelf: null, left: null, letterSpacing: null, lineBreak: null, lineHeight: null, listStyle: null, listStyleImage: null, listStylePosition: null, listStyleType: null, margin: null, marginBlock: null, marginBlockEnd: null, marginBlockStart: null, marginBottom: null, marginInline: null, marginInlineEnd: null, marginInlineStart: null, marginLeft: null, marginRight: null, marginTop: null, mask: null, maskBorder: null, maskBorderMode: null, maskBorderOutset: null, maskBorderRepeat: null, maskBorderSlice: null, maskBorderSource: null, maskBorderWidth: null, maskClip: null, maskComposite: null, maskImage: null, maskMode: null, maskOrigin: null, maskPosition: null, maskRepeat: null, maskSize: null, maskType: null, maxBlockSize: null, maxHeight: null, maxInlineSize: null, maxWidth: null, minBlockSize: null, minHeight: null, minInlineSize: null, minWidth: null, mixBlendMode: null, objectFit: null, objectPosition: null, offset: null, offsetAnchor: null, offsetDistance: null, offsetPath: null, offsetRotate: null, opacity: null, order: null, orphans: null, outline: null, outlineColor: null, outlineOffset: null, outlineStyle: null, outlineWidth: null, overflow: null, overflowAnchor: null, overflowBlock: null, overflowInline: null, overflowWrap: null, overflowX: null, overflowY: null, overscrollBehavior: null, overscrollBehaviorBlock: null, overscrollBehaviorInline: null, overscrollBehaviorX: null, overscrollBehaviorY: null, padding: null, paddingBlock: null, paddingBlockEnd: null, paddingBlockStart: null, paddingBottom: null, paddingInline: null, paddingInlineEnd: null, paddingInlineStart: null, paddingLeft: null, paddingRight: null, paddingTop: null, pageBreakAfter: null, pageBreakBefore: null, pageBreakInside: null, paintOrder: null, perspective: null, perspectiveOrigin: null, placeContent: null, placeItems: null, placeSelf: null, pointerEvents: null, position: null, quotes: null, resize: null, right: null, rotate: null, rowGap: null, scale: null, scrollBehavior: null, scrollMargin: null, scrollMarginBlock: null, scrollMarginBlockEnd: null, scrollMarginBlockStart: null, scrollMarginBottom: null, scrollMarginInline: null, scrollMarginInlineEnd: null, scrollMarginInlineStart: null, scrollMarginLeft: null, scrollMarginRight: null, scrollMarginTop: null, scrollPadding: null, scrollPaddingBlock: null, scrollPaddingBlockEnd: null, scrollPaddingBlockStart: null, scrollPaddingBottom: null, scrollPaddingInline: null, scrollPaddingInlineEnd: null, scrollPaddingInlineStart: null, scrollPaddingLeft: null, scrollPaddingRight: null, scrollPaddingTop: null, scrollSnapAlign: null, scrollSnapStop: null, scrollSnapType: null, scrollbar3dLightColor: null, scrollbarArrowColor: null, scrollbarBaseColor: null, scrollbarColor: null, scrollbarDarkshadowColor: null, scrollbarFaceColor: null, scrollbarHighlightColor: null, scrollbarShadowColor: null, scrollbarTrackColor: null, scrollbarWidth: null, shapeImageThreshold: null, shapeMargin: null, shapeOutside: null, tabSize: null, tableLayout: null, textAlign: null, textAlignLast: null, textCombineUpright: null, textDecoration: null, textDecorationColor: null, textDecorationLine: null, textDecorationSkipInk: null, textDecorationStyle: null, textDecorationThickness: null, textEmphasis: null, textEmphasisColor: null, textEmphasisPosition: null, textEmphasisStyle: null, textIndent: null, textJustify: null, textOrientation: null, textOverflow: null, textRendering: null, textShadow: null, textTransform: null, textUnderlineOffset: null, textUnderlinePosition: null, top: null, touchAction: null, transform: null, transformBox: null, transformOrigin: null, transformStyle: null, transition: null, transitionDelay: null, transitionDuration: null, transitionProperty: null, transitionTimingFunction: null, translate: null, unicodeBidi: null, verticalAlign: null, visibility: null, whiteSpace: null, widows: null, width: null, willChange: null, wordBreak: null, wordSpacing: null, writingMode: null, zIndex: null}; + } + + oldNode_p1.dom.className = newNode_p0.class; + } + + oldNode_p1.style = newNode_p0.style; + oldNode_p1.class = newNode_p0.class; + + +} + +function takeOverAttr__pkgZkaraxZvdom_u771(newNode_p0, oldNode_p1) { + oldNode_p1.attrs = newNode_p0.attrs; + + +} + +function updateAttributes__pkgZkaraxZkarax_u1036(newNode_p0, oldNode_p1) { + if (!((oldNode_p1.dom == null))) { + Label1: { + var k_1375732755 = null; + var __1375732756 = null; + Label2: { + var i_2063599884 = 0; + var colontmp__2063599885 = 0; + colontmp__2063599885 = subInt((oldNode_p1.attrs).length, 2); + var res_2063599886 = 0; + Label3: { + Label4: while (true) { + if (!(res_2063599886 <= colontmp__2063599885)) break Label4; + i_2063599884 = res_2063599886; + k_1375732755 = oldNode_p1.attrs[chckIndx(i_2063599884, 0, (oldNode_p1.attrs).length - 1)]; + __1375732756 = oldNode_p1.attrs[chckIndx(addInt(i_2063599884, 1), 0, (oldNode_p1.attrs).length - 1)]; + oldNode_p1.dom.removeAttribute(k_1375732755); + res_2063599886 = addInt(res_2063599886, 2); + } + }; + }; + }; + Label5: { + var k_1375732757 = null; + var v_1375732758 = null; + Label6: { + var i_2063599890 = 0; + var colontmp__2063599891 = 0; + colontmp__2063599891 = subInt((newNode_p0.attrs).length, 2); + var res_2063599892 = 0; + Label7: { + Label8: while (true) { + if (!(res_2063599892 <= colontmp__2063599891)) break Label8; + i_2063599890 = res_2063599892; + k_1375732757 = newNode_p0.attrs[chckIndx(i_2063599890, 0, (newNode_p0.attrs).length - 1)]; + v_1375732758 = newNode_p0.attrs[chckIndx(addInt(i_2063599890, 1), 0, (newNode_p0.attrs).length - 1)]; + if (!((v_1375732758 == null))) { + oldNode_p1.dom.setAttribute(k_1375732757, v_1375732758); + } + + res_2063599892 = addInt(res_2063599892, 2); + } + }; + }; + }; + } + + takeOverAttr__pkgZkaraxZvdom_u771(newNode_p0, oldNode_p1); + + +} + +function getAttr__pkgZkaraxZvdom_u758(n_p0, key_p1) { + var result_1409286905 = null; + + BeforeRet: { + Label1: { + var i_1409286914 = 0; + var colontmp__2063599895 = 0; + colontmp__2063599895 = subInt((n_p0.attrs).length, 2); + var res_2063599896 = 0; + Label2: { + Label3: while (true) { + if (!(res_2063599896 <= colontmp__2063599895)) break Label3; + i_1409286914 = res_2063599896; + if ((n_p0.attrs[chckIndx(i_1409286914, 0, (n_p0.attrs).length - 1)] == key_p1)) { + result_1409286905 = n_p0.attrs[chckIndx(addInt(i_1409286914, 1), 0, (n_p0.attrs).length - 1)]; + break BeforeRet; + } + + res_2063599896 = addInt(res_2063599896, 2); + } + }; + }; + }; + + return result_1409286905; + +} + +function removeAllEventHandlers__pkgZkaraxZkarax_u141(d_p0) { + if (!((d_p0.karaxEvents == null))) { + Label1: { + var i_1375731870 = 0; + var colontmp__2063599899 = 0; + colontmp__2063599899 = d_p0.karaxEvents.length; + var i_2063599900 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599900 < colontmp__2063599899)) break Label3; + i_1375731870 = i_2063599900; + d_p0.removeEventListener(d_p0.karaxEvents[i_1375731870]["Field0"], d_p0.karaxEvents[i_1375731870]["Field1"], false); + i_2063599900 = addInt(i_2063599900, 1); + } + }; + }; + } + + + +} + +function mergeEvents__pkgZkaraxZkarax_u1047(newNode_p0, oldNode_p1, kxi_p2) { + var d_1375732763 = oldNode_p1.dom; + if (!((d_1375732763 == null))) { + removeAllEventHandlers__pkgZkaraxZkarax_u141(d_1375732763); + } + + oldNode_p1.events = newNode_p0.events; + applyEvents__pkgZkaraxZkarax_u310(oldNode_p1); + + +} + +function addPatch__pkgZkaraxZkarax_u1056(kxi_p0, ka_p1, parenta_p2, currenta_p3, na_p4, oldNode_p5) { + var L_1375732775 = kxi_p0.patchLen; + if (((kxi_p0.patches).length <= L_1375732775)) { + kxi_p0.patches.push({k: ka_p1, parent: parenta_p2, current: currenta_p3, newNode: na_p4, oldNode: oldNode_p5});; + } + else { + kxi_p0.patches[chckIndx(L_1375732775, 0, (kxi_p0.patches).length - 1)].k = ka_p1; + kxi_p0.patches[chckIndx(L_1375732775, 0, (kxi_p0.patches).length - 1)].parent = parenta_p2; + kxi_p0.patches[chckIndx(L_1375732775, 0, (kxi_p0.patches).length - 1)].current = currenta_p3; + kxi_p0.patches[chckIndx(L_1375732775, 0, (kxi_p0.patches).length - 1)].newNode = na_p4; + kxi_p0.patches[chckIndx(L_1375732775, 0, (kxi_p0.patches).length - 1)].oldNode = oldNode_p5; + } + + kxi_p0.patchLen = addInt(kxi_p0.patchLen, 1); + + +} + +function diff__pkgZkaraxZkarax_u1220(newNode_p0, oldNode_p1, parent_p2, current_p3, kxi_p4) { + var Temporary1; + + BeforeRet: { + var result_1375732938 = eq__pkgZkaraxZkarax_u558(newNode_p0, oldNode_p1, false); + switch (result_1375732938) { + case 0: + kxi_p4.components.push({oldNode: oldNode_p1, newNode: newNode_p0, parent: parent_p2, current: current_p3});; + break; + case 3: + case 2: + newNode_p0.dom = oldNode_p1.dom; + if ((result_1375732938 == 2)) { + updateStyles__pkgZkaraxZkarax_u626(newNode_p0, oldNode_p1); + updateAttributes__pkgZkaraxZkarax_u1036(newNode_p0, oldNode_p1); + if ((oldNode_p1.kind == 0)) { + oldNode_p1.text = newNode_p0.text; + oldNode_p1.dom.nodeValue = newNode_p0.text; + } + + if ((oldNode_p1.kind == 194)) { + oldNode_p1.dom.value = newNode_p0.text; + var checked_1375732955 = getAttr__pkgZkaraxZvdom_u758(newNode_p0, "checked"); + if ((checked_1375732955 == null)) { + Temporary1 = false; + } + else { + Temporary1 = true; + } + + oldNode_p1.dom.checked = Temporary1; + } + + } + + if ((!(((newNode_p0.events).length == 0)) || !(((oldNode_p1.events).length == 0)))) { + mergeEvents__pkgZkaraxZkarax_u1047(newNode_p0, oldNode_p1, kxi_p4); + } + + var newLength_1375732962 = len__pkgZkaraxZvdom_u779(newNode_p0); + var oldLength_1375732963 = len__pkgZkaraxZvdom_u779(oldNode_p1); + if (((newLength_1375732962 == 0) && (oldLength_1375732963 == 0))) { + break BeforeRet; + } + + var minLength_1375732964 = nimMin(newLength_1375732962, oldLength_1375732963); + if (!((oldNode_p1.kind == newNode_p0.kind))) { + failedAssertImpl__stdZassertions_u86([107,97,114,97,120,46,110,105,109,40,52,57,56,44,32,53,41,32,96,111,108,100,78,111,100,101,46,107,105,110,100,32,61,61,32,110,101,119,78,111,100,101,46,107,105,110,100,96,32]); + } + + var commonPrefix_1375732974 = 0; + Label2: { + Label3: while (true) { + if (!(commonPrefix_1375732974 < minLength_1375732964)) break Label3; + if ((eq__pkgZkaraxZkarax_u558(HEX5BHEX5D__pkgZkaraxZvdom_u786(newNode_p0, commonPrefix_1375732974), HEX5BHEX5D__pkgZkaraxZvdom_u786(oldNode_p1, commonPrefix_1375732974), true) == 3)) { + addPatch__pkgZkaraxZkarax_u1056(kxi_p4, 5, null, null, HEX5BHEX5D__pkgZkaraxZvdom_u786(newNode_p0, commonPrefix_1375732974), HEX5BHEX5D__pkgZkaraxZvdom_u786(oldNode_p1, commonPrefix_1375732974)); + commonPrefix_1375732974 = addInt(commonPrefix_1375732974, 1); + } + else { + break Label2; + } + + } + }; + var oldPos_1375732984 = subInt(oldLength_1375732963, 1); + var newPos_1375732985 = subInt(newLength_1375732962, 1); + Label4: { + Label5: while (true) { + if (!((commonPrefix_1375732974 <= oldPos_1375732984) && (commonPrefix_1375732974 <= newPos_1375732985))) break Label5; + if ((eq__pkgZkaraxZkarax_u558(HEX5BHEX5D__pkgZkaraxZvdom_u786(newNode_p0, newPos_1375732985), HEX5BHEX5D__pkgZkaraxZvdom_u786(oldNode_p1, oldPos_1375732984), true) == 3)) { + addPatch__pkgZkaraxZkarax_u1056(kxi_p4, 5, null, null, HEX5BHEX5D__pkgZkaraxZvdom_u786(newNode_p0, newPos_1375732985), HEX5BHEX5D__pkgZkaraxZvdom_u786(oldNode_p1, oldPos_1375732984)); + oldPos_1375732984 = subInt(oldPos_1375732984, 1); + newPos_1375732985 = subInt(newPos_1375732985, 1); + } + else { + break Label4; + } + + } + }; + var pos_1375733000 = addInt(nimMin(oldPos_1375732984, newPos_1375732985), 1); + Label6: { + var i_1375733005 = 0; + var colontmp__2063599854 = 0; + colontmp__2063599854 = subInt(pos_1375733000, 1); + var res_2063599855 = commonPrefix_1375732974; + Label7: { + Label8: while (true) { + if (!(res_2063599855 <= colontmp__2063599854)) break Label8; + i_1375733005 = res_2063599855; + diff__pkgZkaraxZkarax_u1220(HEX5BHEX5D__pkgZkaraxZvdom_u786(newNode_p0, i_1375733005), HEX5BHEX5D__pkgZkaraxZvdom_u786(oldNode_p1, i_1375733005), current_p3, HEX5BHEX5D__pkgZkaraxZvdom_u786(oldNode_p1, i_1375733005).dom, kxi_p4); + res_2063599855 = addInt(res_2063599855, 1); + } + }; + }; + if ((addInt(oldPos_1375732984, 1) == oldLength_1375732963)) { + Label9: { + var i_1375733010 = 0; + var res_2063599858 = pos_1375733000; + Label10: { + Label11: while (true) { + if (!(res_2063599858 <= newPos_1375732985)) break Label11; + i_1375733010 = res_2063599858; + addPatch__pkgZkaraxZkarax_u1056(kxi_p4, 2, current_p3, null, HEX5BHEX5D__pkgZkaraxZvdom_u786(newNode_p0, i_1375733010), null); + res_2063599858 = addInt(res_2063599858, 1); + } + }; + }; + } + else { + var before_1375733011 = current_p3.childNodes[chckIndx(addInt(oldPos_1375732984, 1), 0, (current_p3.childNodes).length - 1)]; + Label12: { + var i_1375733016 = 0; + var res_2063599861 = pos_1375733000; + Label13: { + Label14: while (true) { + if (!(res_2063599861 <= newPos_1375732985)) break Label14; + i_1375733016 = res_2063599861; + addPatch__pkgZkaraxZkarax_u1056(kxi_p4, 3, current_p3, before_1375733011, HEX5BHEX5D__pkgZkaraxZvdom_u786(newNode_p0, i_1375733016), null); + res_2063599861 = addInt(res_2063599861, 1); + } + }; + }; + } + + Label15: { + var i_1375733021 = 0; + var res_2063599864 = pos_1375733000; + Label16: { + Label17: while (true) { + if (!(res_2063599864 <= oldPos_1375732984)) break Label17; + i_1375733021 = res_2063599864; + addPatch__pkgZkaraxZkarax_u1056(kxi__, 4, null, null, null, HEX5BHEX5D__pkgZkaraxZvdom_u786(oldNode_p1, i_1375733021)); + addPatch__pkgZkaraxZkarax_u1056(kxi_p4, 1, current_p3, current_p3.childNodes[chckIndx(i_1375733021, 0, (current_p3.childNodes).length - 1)], null, null); + res_2063599864 = addInt(res_2063599864, 1); + } + }; + }; + break; + case 1: + addPatch__pkgZkaraxZkarax_u1056(kxi__, 4, null, null, null, oldNode_p1); + addPatch__pkgZkaraxZkarax_u1056(kxi_p4, 0, parent_p2, current_p3, newNode_p0, null); + break; + case 4: + if (true) { + failedAssertImpl__stdZassertions_u86([107,97,114,97,120,46,110,105,109,40,53,52,48,44,32,50,54,41,32,96,102,97,108,115,101,96,32,101,113,32,114,101,116,117,114,110,101,100,32,117,115,101,110,101,119,78,111,100,101]); + } + + break; + } + }; + + +} + +function applyComponents__pkgZkaraxZkarax_u1334(kxi_p0) { + var i_1375733048 = 0; + Label1: { + Label2: while (true) { + if (!(i_1375733048 < (kxi_p0.components).length)) break Label2; + var x_1375733053 = kxi_p0.components[chckIndx(i_1375733048, 0, (kxi_p0.components).length - 1)].oldNode; + var newNode_1375733054 = kxi_p0.components[chckIndx(i_1375733048, 0, (kxi_p0.components).length - 1)].newNode; + if ((!(cmpClosures(x_1375733053.changedImpl, null)) && x_1375733053.changedImpl(x_1375733053, newNode_1375733054))) { + var current_1375733059 = kxi_p0.components[chckIndx(i_1375733048, 0, (kxi_p0.components).length - 1)].current; + var parent_1375733060 = kxi_p0.components[chckIndx(i_1375733048, 0, (kxi_p0.components).length - 1)].parent; + x_1375733053.updatedImpl(x_1375733053, newNode_1375733054); + var oldExpanded_1375733061 = x_1375733053.expanded; + x_1375733053.expanded = x_1375733053.renderImpl(x_1375733053); + x_1375733053.renderedVersion = x_1375733053.version; + if ((oldExpanded_1375733061 == null)) { + addPatch__pkgZkaraxZkarax_u1056(kxi__, 4, null, null, null, x_1375733053); + addPatch__pkgZkaraxZkarax_u1056(kxi_p0, 0, parent_1375733060, current_1375733059, x_1375733053.expanded, null); + } + else { + diff__pkgZkaraxZkarax_u1220(x_1375733053.expanded, oldExpanded_1375733061, parent_1375733060, current_1375733059, kxi_p0); + } + + } + + i_1375733048 = addInt(i_1375733048, 1); + } + }; + if (kxi_p0.components.length < 0) { for (var i = kxi_p0.components.length ; i < 0 ; ++i) kxi_p0.components.push(({oldNode: null, newNode: null, parent: null, current: null})); } + else { kxi_p0.components.length = 0; }; + + +} + +function moveDom__pkgZkaraxZkarax_u1150(dest_p0, src_p1) { + dest_p0.dom = src_p1.dom; + src_p1.dom = null; + if (!((dest_p0.id == null))) { + kxi__.byId[dest_p0.id] = dest_p0; + } + + if (!((len__pkgZkaraxZvdom_u779(dest_p0) == len__pkgZkaraxZvdom_u779(src_p1)))) { + failedAssertImpl__stdZassertions_u86([107,97,114,97,120,46,110,105,109,40,51,57,51,44,32,51,41,32,96,100,101,115,116,46,108,101,110,32,61,61,32,115,114,99,46,108,101,110,96,32]); + } + + Label1: { + var i_1375732880 = 0; + var colontmp__2063599910 = 0; + colontmp__2063599910 = len__pkgZkaraxZvdom_u779(dest_p0); + var i_2063599911 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599911 < colontmp__2063599910)) break Label3; + i_1375732880 = i_2063599911; + moveDom__pkgZkaraxZkarax_u1150(HEX5BHEX5D__pkgZkaraxZvdom_u786(dest_p0, i_1375732880), HEX5BHEX5D__pkgZkaraxZvdom_u786(src_p1, i_1375732880)); + i_2063599911 = addInt(i_2063599911, 1); + } + }; + }; + + +} + +function HEX5BHEX5DHEX3D__pkgZkaraxZvdom_u790(x_p0, idx_p1, y_p2) { + x_p0.kids[chckIndx(idx_p1, 0, (x_p0.kids).length - 1)] = y_p2; + + +} + +function applyPatch__pkgZkaraxZkarax_u1169(kxi_p0) { + Label1: { + var i_1375732887 = 0; + var i_2063599904 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599904 < kxi_p0.patchLen)) break Label3; + i_1375732887 = i_2063599904; + var p_1375732888 = nimCopy(null, kxi_p0.patches[chckIndx(i_1375732887, 0, (kxi_p0.patches).length - 1)], NTI1375731718); + switch (p_1375732888.k) { + case 0: + var nn_1375732889 = toDom__pkgZkaraxZkarax_u337(p_1375732888.newNode, true, kxi_p0); + if ((p_1375732888.parent == null)) { + replaceById__pkgZkaraxZkarax_u545(kxi_p0.rootId, nn_1375732889); + } + else { + if ((p_1375732888.current.parentNode == p_1375732888.parent)) { + p_1375732888.parent.replaceChild(nn_1375732889, p_1375732888.current); + } + else { + p_1375732888.parent.appendChild(nn_1375732889); + } + + } + + break; + case 5: + moveDom__pkgZkaraxZkarax_u1150(p_1375732888.newNode, p_1375732888.oldNode); + break; + case 1: + p_1375732888.parent.removeChild(p_1375732888.current); + break; + case 2: + var nn_1375732898 = toDom__pkgZkaraxZkarax_u337(p_1375732888.newNode, true, kxi_p0); + p_1375732888.parent.appendChild(nn_1375732898); + break; + case 3: + var nn_1375732899 = toDom__pkgZkaraxZkarax_u337(p_1375732888.newNode, true, kxi_p0); + p_1375732888.parent.insertBefore(nn_1375732899, p_1375732888.current); + break; + case 4: + var n_1375732900 = p_1375732888.oldNode; + if (!((n_1375732900.id == null))) { + delete kxi_p0.byId[n_1375732900.id]; + } + + if ((n_1375732900.kind == 5)) { + var x_1375732910 = n_1375732900; + if (!(cmpClosures(x_1375732910.onDetachImpl, null))) { + x_1375732910.onDetachImpl(x_1375732910); + } + + } + + if (!(kxi_p0.surpressRedraws)) { + n_1375732900.dom = null; + } + + break; + } + i_2063599904 = addInt(i_2063599904, 1); + } + }; + }; + kxi_p0.patchLen = 0; + Label4: { + var i_1375732919 = 0; + var i_2063599907 = 0; + Label5: { + Label6: while (true) { + if (!(i_2063599907 < kxi_p0.patchLenV)) break Label6; + i_1375732919 = i_2063599907; + var p_1375732920 = nimCopy(null, kxi_p0.patchesV[chckIndx(i_1375732919, 0, (kxi_p0.patchesV).length - 1)], NTI1375731719); + HEX5BHEX5DHEX3D__pkgZkaraxZvdom_u790(p_1375732920.parent, p_1375732920.pos, p_1375732920.newChild); + if (!(!((p_1375732920.newChild.dom == null)))) { + failedAssertImpl__stdZassertions_u86([107,97,114,97,120,46,110,105,109,40,52,51,50,44,32,53,41,32,96,112,46,110,101,119,67,104,105,108,100,46,100,111,109,32,33,61,32,110,105,108,96,32]); + } + + i_2063599907 = addInt(i_2063599907, 1); + } + }; + }; + kxi_p0.patchLenV = 0; + + +} + +function dodraw__pkgZkaraxZkarax_u1422(kxi_p0) { + +function HEX3Aanonymous__pkgZkaraxZkarax_u1427() { + dodraw__pkgZkaraxZkarax_u1422(kxi_p0); + + + } + + BeforeRet: { + if ((kxi_p0.renderer == null)) { + break BeforeRet; + } + + kxi_p0.renderId = 0; + if (kxi_p0.rendering) { + kxi_p0.renderId = window.requestAnimationFrame(HEX3Aanonymous__pkgZkaraxZkarax_u1427); + break BeforeRet; + } + + kxi_p0.rendering = true; + var rdata_1375733140 = {hashPart: window.location.hash}; + var newtree_1375733141 = kxi_p0.renderer(rdata_1375733140); + kxi_p0.runCount = addInt(kxi_p0.runCount, 1); + newtree_1375733141.id = kxi_p0.rootId; + kxi_p0.toFocus = null; + if ((kxi_p0.currentTree == null)) { + var asdom_1375733151 = toDom__pkgZkaraxZkarax_u337(newtree_1375733141, true, kxi_p0); + replaceById__pkgZkaraxZkarax_u545(kxi_p0.rootId, asdom_1375733151); + } + else { + var olddom_1375733152 = document.getElementById(kxi_p0.rootId); + diff__pkgZkaraxZkarax_u1220(newtree_1375733141, kxi_p0.currentTree, null, olddom_1375733152, kxi_p0); + } + + applyComponents__pkgZkaraxZkarax_u1334(kxi_p0); + applyPatch__pkgZkaraxZkarax_u1169(kxi_p0); + kxi_p0.currentTree = newtree_1375733141; + if (!((kxi_p0.postRenderCallback == null))) { + kxi_p0.postRenderCallback(rdata_1375733140); + } + + if (!((kxi_p0.toFocus == null))) { + kxi_p0.toFocus.focus(); + } + + kxi_p0.rendering = false; + }; + + +} + +function redraw__pkgZkaraxZkarax_u1484(kxi_p0) { + +function HEX3Aanonymous__pkgZkaraxZkarax_u1486() { + dodraw__pkgZkaraxZkarax_u1422(kxi_p0); + + + } + + if ((kxi_p0.renderId == 0)) { + kxi_p0.renderId = window.requestAnimationFrame(HEX3Aanonymous__pkgZkaraxZkarax_u1486); + } + + + +} + +function ajax__pkgZkaraxZkajax_u171(meth_p0, url_p1, headers_p2, data_p3, cont_p4, doRedraw_p5, kxi_p6, useBinary_p7, blob_p8) { + +function contWrapper__pkgZkaraxZkajax_u184(httpStatus_p0, response_p1) { + cont_p4(httpStatus_p0, response_p1); + if (doRedraw_p5) { + redraw__pkgZkaraxZkarax_u1484(kxi_p6); + } + + + +} + +function HEX3Aanonymous__pkgZkaraxZkajax_u194() { + if ((this.readyState == 4)) { + if ((this.status == 200)) { + contWrapper__pkgZkaraxZkajax_u184(this.status, this.responseText); + } + else { + contWrapper__pkgZkaraxZkajax_u184(this.status, this.responseText); + } + + } + + + + } + + var ajax_1879048380 = new XMLHttpRequest(); + ajax_1879048380.open(meth_p0, url_p1, true); + Label1: { + var a_1879048384 = null; + var b_1879048385 = null; + var i_2063599821 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599821 < (headers_p2).length)) break Label3; + a_1879048384 = headers_p2[chckIndx(i_2063599821, 0, (headers_p2).length - 1)]["Field0"]; + b_1879048385 = headers_p2[chckIndx(i_2063599821, 0, (headers_p2).length - 1)]["Field1"]; + ajax_1879048380.setRequestHeader(a_1879048384, b_1879048385); + i_2063599821 += 1; + } + }; + }; + ajax_1879048380.onreadystatechange = HEX3Aanonymous__pkgZkaraxZkajax_u194; + if (useBinary_p7) { + ajax_1879048380.send(blob_p8); + } + else { + ajax_1879048380.send(data_p3); + } + + + +} + +function ajaxGet__pkgZkaraxZkajax_u215(url_p0, headers_p1, cont_p2, doRedraw_p3, kxi_p4) { + ajax__pkgZkaraxZkajax_u171("GET", url_p0, headers_p1, null, cont_p2, doRedraw_p3, kxi_p4, false, null); + + +} + +function getVarType__pureZjson_u5217(x_p0, isRawNumber_p1, isRawNumber_p1_Idx) { + var Temporary1; + + var result_1644172388 = 0; + + BeforeRet: { + result_1644172388 = 0; + switch (toJSStr(cstrToNimstr(Object.prototype.toString.call(x_p0)))) { + case "[object Array]": + result_1644172388 = 6; + break BeforeRet; + break; + case "[object Object]": + result_1644172388 = 5; + break BeforeRet; + break; + case "[object Number]": + if (!Number.isInteger(x_p0)) Temporary1 = false; else { Temporary1 = !(((1.0 / x_p0) == -Infinity)); } if (Temporary1) { + if (Number.isSafeInteger(x_p0)) { + result_1644172388 = 2; + break BeforeRet; + } + else { + isRawNumber_p1[isRawNumber_p1_Idx] = true; + result_1644172388 = 4; + break BeforeRet; + } + + } + else { + result_1644172388 = 3; + break BeforeRet; + } + + break; + case "[object Boolean]": + result_1644172388 = 1; + break BeforeRet; + break; + case "[object Null]": + result_1644172388 = 0; + break BeforeRet; + break; + case "[object String]": + result_1644172388 = 4; + break BeforeRet; + break; + default: + if (true) { + failedAssertImpl__stdZassertions_u86([106,115,111,110,46,110,105,109,40,57,57,52,44,32,49,49,41,32,96,102,97,108,115,101,96,32]); + } + + break; + } + }; + + return result_1644172388; + +} + +function len__pureZjson_u5238(x_p0) { + var result_1644172408 = 0; + + result_1644172408 = x_p0.length; + + + return result_1644172408; + +} + +function nextPowerOfTwo__pureZmath_u226(x_p0) { + var result_939524324 = 0; + + result_939524324 = (x_p0 - 1); + result_939524324 = (result_939524324 | (result_939524324 >> (16 & 31))); + result_939524324 = (result_939524324 | (result_939524324 >> (8 & 31))); + result_939524324 = (result_939524324 | (result_939524324 >> (4 & 31))); + result_939524324 = (result_939524324 | (result_939524324 >> (2 & 31))); + result_939524324 = (result_939524324 | (result_939524324 >> (1 & 31))); + result_939524324 += (1 + ((x_p0 <= 0) ? 1 : 0)); + + return result_939524324; + +} + +function slotsNeeded__pureZcollectionsZtables_u42(count_p0) { + var result_788529196 = 0; + + result_788529196 = nextPowerOfTwo__pureZmath_u226(addInt(addInt(divInt(count_p0, 2), count_p0), 4)); + + return result_788529196; + +} + +function initOrderedTable__pureZjson_u150(initialSize_p0) { + var result_1644167322 = ({data: [], counter: 0, first: 0, last: 0}); + + result_1644167322 = nimCopy(result_1644167322, ({data: [], counter: 0, first: 0, last: 0}), NTI1644167182); + var correctSizeHEX60gensym0_1644167331 = slotsNeeded__pureZcollectionsZtables_u42(chckRange(initialSize_p0, 0, 2147483647)); + result_1644167322.counter = 0; + result_1644167322.data = new Array(chckRange(correctSizeHEX60gensym0_1644167331, 0, 2147483647)); for (var i = 0 ; i < chckRange(correctSizeHEX60gensym0_1644167331, 0, 2147483647) ; ++i) { result_1644167322.data[i] = {Field0: 0, Field1: 0, Field2: [], Field3: null}; } result_1644167322.first = (-1); + result_1644167322.last = (-1); + + return result_1644167322; + +} + +function newJObject__pureZjson_u136() { + var result_1644167305 = null; + + result_1644167305 = {kind: 5, fields: initOrderedTable__pureZjson_u150(2), isUnquoted: false, str: [], num: 0n, fnum: 0.0, bval: false, elems: []}; + + return result_1644167305; + +} + +function lenU__pureZhashes_u502(s_p0) { + var result_889192952 = 0n; + + result_889192952 = BigInt.asUintN(64, BigInt((s_p0).length)); + + return result_889192952; + +} + +function load8e__pureZhashes_u390(s_p0, o_p1) { + var result_889192841 = 0n; + + result_889192841 = (((((((BigInt.asUintN(64, BigInt(s_p0[chckIndx(addInt(o_p1, 7), 0, (s_p0).length - 1)]) << (BigInt(56) & 63n)) | BigInt.asUintN(64, BigInt(s_p0[chckIndx(addInt(o_p1, 6), 0, (s_p0).length - 1)]) << (BigInt(48) & 63n))) | BigInt.asUintN(64, BigInt(s_p0[chckIndx(addInt(o_p1, 5), 0, (s_p0).length - 1)]) << (BigInt(40) & 63n))) | BigInt.asUintN(64, BigInt(s_p0[chckIndx(addInt(o_p1, 4), 0, (s_p0).length - 1)]) << (BigInt(32) & 63n))) | BigInt.asUintN(64, BigInt(s_p0[chckIndx(addInt(o_p1, 3), 0, (s_p0).length - 1)]) << (BigInt(24) & 63n))) | BigInt.asUintN(64, BigInt(s_p0[chckIndx(addInt(o_p1, 2), 0, (s_p0).length - 1)]) << (BigInt(16) & 63n))) | BigInt.asUintN(64, BigInt(s_p0[chckIndx(addInt(o_p1, 1), 0, (s_p0).length - 1)]) << (BigInt(8) & 63n))) | BigInt(s_p0[chckIndx(addInt(o_p1, 0), 0, (s_p0).length - 1)])); + + return result_889192841; + +} + +function load8__pureZhashes_u426(s_p0, o_p1) { + var result_889192877 = 0n; + + result_889192877 = load8e__pureZhashes_u390(s_p0, o_p1); + + return result_889192877; + +} + +function rotR__pureZhashes_u515(v_p0, bits_p1) { + var result_889192966 = 0n; + + result_889192966 = ((v_p0 >> (BigInt(bits_p1) & 63n)) | BigInt.asUintN(64, v_p0 << (BigInt(subInt(64, bits_p1)) & 63n))); + + return result_889192966; + +} + +function len16__pureZhashes_u527(u_p0, v_p1, mul_p2) { + var result_889192979 = 0n; + + var a_889192980 = BigInt.asUintN(64, ((u_p0 ^ v_p1) * mul_p2)); + a_889192980 = (a_889192980 ^ (a_889192980 >> (BigInt(47) & 63n))); + var b_889192985 = BigInt.asUintN(64, ((v_p1 ^ a_889192980) * mul_p2)); + b_889192985 = (b_889192985 ^ (b_889192985 >> (BigInt(47) & 63n))); + result_889192979 = BigInt.asUintN(64, (b_889192985 * mul_p2)); + + return result_889192979; + +} + +function load4e__pureZhashes_u374(s_p0, o_p1) { + var result_889192825 = 0; + + result_889192825 = (((((((((s_p0[chckIndx(addInt(o_p1, 3), 0, (s_p0).length - 1)] >>> 0) << (24 & 31)) >>> 0) | (((s_p0[chckIndx(addInt(o_p1, 2), 0, (s_p0).length - 1)] >>> 0) << (16 & 31)) >>> 0)) >>> 0) | (((s_p0[chckIndx(addInt(o_p1, 1), 0, (s_p0).length - 1)] >>> 0) << (8 & 31)) >>> 0)) >>> 0) | (s_p0[chckIndx(addInt(o_p1, 0), 0, (s_p0).length - 1)] >>> 0)) >>> 0); + + return result_889192825; + +} + +function load4__pureZhashes_u422(s_p0, o_p1) { + var result_889192873 = 0; + + result_889192873 = load4e__pureZhashes_u374(s_p0, o_p1); + + return result_889192873; + +} + +function shiftMix__pureZhashes_u508(v_p0) { + var result_889192958 = 0n; + + result_889192958 = (v_p0 ^ (v_p0 >> (BigInt(47) & 63n))); + + return result_889192958; + +} + +function len0_16__pureZhashes_u542(s_p0) { + var Temporary1; + + var result_889192992 = 0n; + + if ((8 <= (s_p0).length)) { + var mul_889192996 = BigInt.asUintN(64, (11160318154034397263n + BigInt.asUintN(64, (2n * lenU__pureZhashes_u502(s_p0))))); + var a_889192997 = BigInt.asUintN(64, (load8__pureZhashes_u426(s_p0, 0) + 11160318154034397263n)); + var b_889193001 = load8__pureZhashes_u426(s_p0, subInt((s_p0).length, 8)); + var c_889193002 = BigInt.asUintN(64, (BigInt.asUintN(64, (rotR__pureZhashes_u515(b_889193001, 37) * mul_889192996)) + a_889192997)); + var d_889193003 = BigInt.asUintN(64, (BigInt.asUintN(64, (rotR__pureZhashes_u515(a_889192997, 25) + b_889193001)) * mul_889192996)); + Temporary1 = len16__pureZhashes_u527(c_889193002, d_889193003, mul_889192996); + } + else { + if ((4 <= (s_p0).length)) { + var mul_889193007 = BigInt.asUintN(64, (11160318154034397263n + BigInt.asUintN(64, (2n * lenU__pureZhashes_u502(s_p0))))); + var a_889193008 = BigInt(load4__pureZhashes_u422(s_p0, 0)); + Temporary1 = len16__pureZhashes_u527(BigInt.asUintN(64, (lenU__pureZhashes_u502(s_p0) + BigInt.asUintN(64, a_889193008 << (BigInt(3) & 63n)))), BigInt(load4__pureZhashes_u422(s_p0, subInt((s_p0).length, 4))), mul_889193007); + } + else { + if ((0 < (s_p0).length)) { + var a_889193019 = (s_p0[chckIndx(0, 0, (s_p0).length - 1)] >>> 0); + var b_889193027 = (s_p0[chckIndx(((s_p0).length >> (1 & 31)), 0, (s_p0).length - 1)] >>> 0); + var c_889193031 = (s_p0[chckIndx(subInt((s_p0).length, 1), 0, (s_p0).length - 1)] >>> 0); + var y_889193036 = ((a_889193019 + ((b_889193027 << (8 & 31)) >>> 0)) >>> 0); + var z_889193041 = BigInt.asUintN(64, (lenU__pureZhashes_u502(s_p0) + BigInt(((c_889193031 << (2 & 31)) >>> 0)))); + Temporary1 = BigInt.asUintN(64, (shiftMix__pureZhashes_u508((BigInt.asUintN(64, (BigInt(y_889193036) * 11160318154034397263n)) ^ BigInt.asUintN(64, (z_889193041 * 14097894508562428199n)))) * 11160318154034397263n)); + } + else { + Temporary1 = 11160318154034397263n; + } + }} + result_889192992 = Temporary1; + + return result_889192992; + +} + +function len17_32__pureZhashes_u594(s_p0) { + var result_889193044 = 0n; + + var mul_889193045 = BigInt.asUintN(64, (11160318154034397263n + BigInt.asUintN(64, (2n * lenU__pureZhashes_u502(s_p0))))); + var a_889193046 = BigInt.asUintN(64, (load8__pureZhashes_u426(s_p0, 0) * 13011662864482103923n)); + var b_889193047 = load8__pureZhashes_u426(s_p0, 8); + var c_889193051 = BigInt.asUintN(64, (load8__pureZhashes_u426(s_p0, subInt((s_p0).length, 8)) * mul_889193045)); + var d_889193055 = BigInt.asUintN(64, (load8__pureZhashes_u426(s_p0, subInt((s_p0).length, 16)) * 11160318154034397263n)); + result_889193044 = len16__pureZhashes_u527(BigInt.asUintN(64, (BigInt.asUintN(64, (rotR__pureZhashes_u515(BigInt.asUintN(64, (a_889193046 + b_889193047)), 43) + rotR__pureZhashes_u515(c_889193051, 30))) + d_889193055)), BigInt.asUintN(64, (BigInt.asUintN(64, (a_889193046 + rotR__pureZhashes_u515(BigInt.asUintN(64, (b_889193047 + 11160318154034397263n)), 18))) + c_889193051)), mul_889193045); + + return result_889193044; + +} + +function len33_64__pureZhashes_u608(s_p0) { + var result_889193058 = 0n; + + var mul_889193059 = BigInt.asUintN(64, (11160318154034397263n + BigInt.asUintN(64, (2n * lenU__pureZhashes_u502(s_p0))))); + var a_889193060 = BigInt.asUintN(64, (load8__pureZhashes_u426(s_p0, 0) * 11160318154034397263n)); + var b_889193061 = load8__pureZhashes_u426(s_p0, 8); + var c_889193065 = BigInt.asUintN(64, (load8__pureZhashes_u426(s_p0, subInt((s_p0).length, 8)) * mul_889193059)); + var d_889193069 = BigInt.asUintN(64, (load8__pureZhashes_u426(s_p0, subInt((s_p0).length, 16)) * 11160318154034397263n)); + var y_889193070 = BigInt.asUintN(64, (BigInt.asUintN(64, (rotR__pureZhashes_u515(BigInt.asUintN(64, (a_889193060 + b_889193061)), 43) + rotR__pureZhashes_u515(c_889193065, 30))) + d_889193069)); + var z_889193071 = len16__pureZhashes_u527(y_889193070, BigInt.asUintN(64, (BigInt.asUintN(64, (a_889193060 + rotR__pureZhashes_u515(BigInt.asUintN(64, (b_889193061 + 11160318154034397263n)), 18))) + c_889193065)), mul_889193059); + var e_889193072 = BigInt.asUintN(64, (load8__pureZhashes_u426(s_p0, 16) * mul_889193059)); + var f_889193073 = load8__pureZhashes_u426(s_p0, 24); + var g_889193077 = BigInt.asUintN(64, (BigInt.asUintN(64, (y_889193070 + load8__pureZhashes_u426(s_p0, subInt((s_p0).length, 32)))) * mul_889193059)); + var h_889193081 = BigInt.asUintN(64, (BigInt.asUintN(64, (z_889193071 + load8__pureZhashes_u426(s_p0, subInt((s_p0).length, 24)))) * mul_889193059)); + result_889193058 = len16__pureZhashes_u527(BigInt.asUintN(64, (BigInt.asUintN(64, (rotR__pureZhashes_u515(BigInt.asUintN(64, (e_889193072 + f_889193073)), 43) + rotR__pureZhashes_u515(g_889193077, 30))) + h_889193081)), BigInt.asUintN(64, (BigInt.asUintN(64, (e_889193072 + rotR__pureZhashes_u515(BigInt.asUintN(64, (f_889193073 + a_889193060)), 18))) + g_889193077)), mul_889193059); + + return result_889193058; + +} + +function weakLen32withSeeds2__pureZhashes_u639(w_p0, x_p1, y_p2, z_p3, a_p4, b_p5) { + var result_889193094 = {Field0: 0n, Field1: 0n}; + + var a_889193095 = BigInt.asUintN(64, (a_p4 + w_p0)); + var b_889193096 = rotR__pureZhashes_u515(BigInt.asUintN(64, (BigInt.asUintN(64, (b_p5 + a_889193095)) + z_p3)), 21); + var c_889193097 = a_889193095; + a_889193095 = BigInt.asUintN(64, a_889193095 + BigInt(x_p1)); + a_889193095 = BigInt.asUintN(64, a_889193095 + BigInt(y_p2)); + b_889193096 = BigInt.asUintN(64, b_889193096 + BigInt(rotR__pureZhashes_u515(a_889193095, 44))); + result_889193094["Field0"] = BigInt.asUintN(64, (a_889193095 + z_p3)); + result_889193094["Field1"] = BigInt.asUintN(64, (b_889193096 + c_889193097)); + + return result_889193094; + +} + +function weakLen32withSeeds__pureZhashes_u662(s_p0, o_p1, a_p2, b_p3) { + var result_889193115 = {Field0: 0n, Field1: 0n}; + + result_889193115 = nimCopy(result_889193115, weakLen32withSeeds2__pureZhashes_u639(load8__pureZhashes_u426(s_p0, o_p1), load8__pureZhashes_u426(s_p0, addInt(o_p1, 8)), load8__pureZhashes_u426(s_p0, addInt(o_p1, 16)), load8__pureZhashes_u426(s_p0, addInt(o_p1, 24)), a_p2, b_p3), NTI889192800); + + return result_889193115; + +} + +function hashFarm__pureZhashes_u685(s_p0) { + var result_889193135 = 0n; + + BeforeRet: { + if (((s_p0).length <= 16)) { + result_889193135 = len0_16__pureZhashes_u542(s_p0); + break BeforeRet; + } + + if (((s_p0).length <= 32)) { + result_889193135 = len17_32__pureZhashes_u594(s_p0); + break BeforeRet; + } + + if (((s_p0).length <= 64)) { + result_889193135 = len33_64__pureZhashes_u608(s_p0); + break BeforeRet; + } + + var o_889193146 = 0; + var x_889193147 = 81n; + var y_889193148 = 2480279821605975764n; + var z_889193149 = BigInt.asUintN(64, (shiftMix__pureZhashes_u508(BigInt.asUintN(64, (BigInt.asUintN(64, (y_889193148 * 11160318154034397263n)) + 113n))) * 11160318154034397263n)); + var v_889193155 = nimCopy(null, {Field0: 0n, Field1: 0n}, NTI889192800); + var w_889193160 = nimCopy(null, {Field0: 0n, Field1: 0n}, NTI889192800); + x_889193147 = BigInt.asUintN(64, (BigInt.asUintN(64, (x_889193147 * 11160318154034397263n)) + load8__pureZhashes_u426(s_p0, 0))); + var eos_889193164 = mulInt(divInt(subInt((s_p0).length, 1), 64), 64); + var last64_889193168 = subInt(addInt(eos_889193164, (subInt((s_p0).length, 1) & 63)), 63); + Label1: { + Label2: while (true) { + if (!true) break Label2; + x_889193147 = BigInt.asUintN(64, (rotR__pureZhashes_u515(BigInt.asUintN(64, (BigInt.asUintN(64, (BigInt.asUintN(64, (x_889193147 + y_889193148)) + v_889193155["Field0"])) + load8__pureZhashes_u426(s_p0, addInt(o_889193146, 8)))), 37) * 13011662864482103923n)); + y_889193148 = BigInt.asUintN(64, (rotR__pureZhashes_u515(BigInt.asUintN(64, (BigInt.asUintN(64, (y_889193148 + v_889193155["Field1"])) + load8__pureZhashes_u426(s_p0, addInt(o_889193146, 48)))), 42) * 13011662864482103923n)); + x_889193147 = (x_889193147 ^ w_889193160["Field1"]); + y_889193148 = BigInt.asUintN(64, y_889193148 + BigInt(BigInt.asUintN(64, (v_889193155["Field0"] + load8__pureZhashes_u426(s_p0, addInt(o_889193146, 40)))))); + z_889193149 = BigInt.asUintN(64, (rotR__pureZhashes_u515(BigInt.asUintN(64, (z_889193149 + w_889193160["Field0"])), 33) * 13011662864482103923n)); + v_889193155 = nimCopy(v_889193155, weakLen32withSeeds__pureZhashes_u662(s_p0, addInt(o_889193146, 0), BigInt.asUintN(64, (v_889193155["Field1"] * 13011662864482103923n)), BigInt.asUintN(64, (x_889193147 + w_889193160["Field0"]))), NTI889192800); + w_889193160 = nimCopy(w_889193160, weakLen32withSeeds__pureZhashes_u662(s_p0, addInt(o_889193146, 32), BigInt.asUintN(64, (z_889193149 + w_889193160["Field1"])), BigInt.asUintN(64, (y_889193148 + load8__pureZhashes_u426(s_p0, addInt(o_889193146, 16))))), NTI889192800); + var HEX3Atmp_2063599927 = z_889193149; + z_889193149 = x_889193147; + x_889193147 = HEX3Atmp_2063599927; + o_889193146 = addInt(o_889193146, 64); + if ((o_889193146 == eos_889193164)) { + break Label1; + } + + } + }; + var mul_889193186 = BigInt.asUintN(64, (13011662864482103923n + BigInt.asUintN(64, (z_889193149 & 255n) << (BigInt(1) & 63n)))); + o_889193146 = last64_889193168; + w_889193160["Field0"] = BigInt.asUintN(64, w_889193160["Field0"] + BigInt((BigInt.asUintN(64, (lenU__pureZhashes_u502(s_p0) - 1n)) & 63n))); + v_889193155["Field0"] = BigInt.asUintN(64, v_889193155["Field0"] + BigInt(w_889193160["Field0"])); + w_889193160["Field0"] = BigInt.asUintN(64, w_889193160["Field0"] + BigInt(v_889193155["Field0"])); + x_889193147 = BigInt.asUintN(64, (rotR__pureZhashes_u515(BigInt.asUintN(64, (BigInt.asUintN(64, (BigInt.asUintN(64, (x_889193147 + y_889193148)) + v_889193155["Field0"])) + load8__pureZhashes_u426(s_p0, addInt(o_889193146, 8)))), 37) * mul_889193186)); + y_889193148 = BigInt.asUintN(64, (rotR__pureZhashes_u515(BigInt.asUintN(64, (BigInt.asUintN(64, (y_889193148 + v_889193155["Field1"])) + load8__pureZhashes_u426(s_p0, addInt(o_889193146, 48)))), 42) * mul_889193186)); + x_889193147 = (x_889193147 ^ BigInt.asUintN(64, (w_889193160["Field1"] * 9n))); + y_889193148 = BigInt.asUintN(64, y_889193148 + BigInt(BigInt.asUintN(64, (BigInt.asUintN(64, (v_889193155["Field0"] * 9n)) + load8__pureZhashes_u426(s_p0, addInt(o_889193146, 40)))))); + z_889193149 = BigInt.asUintN(64, (rotR__pureZhashes_u515(BigInt.asUintN(64, (z_889193149 + w_889193160["Field0"])), 33) * mul_889193186)); + v_889193155 = nimCopy(v_889193155, weakLen32withSeeds__pureZhashes_u662(s_p0, addInt(o_889193146, 0), BigInt.asUintN(64, (v_889193155["Field1"] * mul_889193186)), BigInt.asUintN(64, (x_889193147 + w_889193160["Field0"]))), NTI889192800); + w_889193160 = nimCopy(w_889193160, weakLen32withSeeds__pureZhashes_u662(s_p0, addInt(o_889193146, 32), BigInt.asUintN(64, (z_889193149 + w_889193160["Field1"])), BigInt.asUintN(64, (y_889193148 + load8__pureZhashes_u426(s_p0, addInt(o_889193146, 16))))), NTI889192800); + var HEX3Atmp_2063599928 = z_889193149; + z_889193149 = x_889193147; + x_889193147 = HEX3Atmp_2063599928; + result_889193135 = len16__pureZhashes_u527(BigInt.asUintN(64, (BigInt.asUintN(64, (len16__pureZhashes_u527(v_889193155["Field0"], w_889193160["Field0"], mul_889193186) + BigInt.asUintN(64, (shiftMix__pureZhashes_u508(y_889193148) * 14097894508562428199n)))) + z_889193149)), BigInt.asUintN(64, (len16__pureZhashes_u527(v_889193155["Field1"], w_889193160["Field1"], mul_889193186) + x_889193147)), mul_889193186); + }; + + return result_889193135; + +} + +function hash__pureZhashes_u761(x_p0) { + var result_889193211 = 0; + + result_889193211 = Number(BigInt.asIntN(32, hashFarm__pureZhashes_u685((x_p0.slice(0, (x_p0).length - 1 + 1))))); + + return result_889193211; + +} + +function nextTry__pureZcollectionsZtables_u34(h_p0, maxHash_p1) { + var result_788529189 = 0; + + result_788529189 = (addInt(h_p0, 1) & maxHash_p1); + + return result_788529189; + +} + +function rawGet__pureZjson_u483(t_p0, key_p1, hc_p2, hc_p2_Idx) { + var result_1644167657 = 0; + + BeforeRet: { + hc_p2[hc_p2_Idx] = hash__pureZhashes_u761(key_p1); + if ((hc_p2[hc_p2_Idx] == 0)) { + hc_p2[hc_p2_Idx] = 314159265; + } + + if (((t_p0.data).length == 0)) { + result_1644167657 = (-1); + break BeforeRet; + } + + var h_1644167707 = (hc_p2[hc_p2_Idx] & (t_p0.data).length - 1); + Label1: { + Label2: while (true) { + if (!isFilled__pureZcollectionsZtables_u31(t_p0.data[chckIndx(h_1644167707, 0, (t_p0.data).length - 1)].Field0)) break Label2; + if (((t_p0.data[chckIndx(h_1644167707, 0, (t_p0.data).length - 1)].Field0 == hc_p2[hc_p2_Idx]) && eqStrings(t_p0.data[chckIndx(h_1644167707, 0, (t_p0.data).length - 1)].Field2, key_p1))) { + result_1644167657 = h_1644167707; + break BeforeRet; + } + + h_1644167707 = nextTry__pureZcollectionsZtables_u34(h_1644167707, (t_p0.data).length - 1); + } + }; + result_1644167657 = subInt((-1), h_1644167707); + }; + + return result_1644167657; + +} + +function mustRehash__pureZjson_u804(t_p0) { + var result_1644167975 = false; + + if (!((t_p0.counter < (t_p0.data).length))) { + failedAssertImpl__stdZassertions_u86([104,97,115,104,99,111,109,109,111,110,46,110,105,109,40,51,52,44,32,57,41,32,96,10,116,46,99,111,117,110,116,101,114,32,60,32,116,46,100,97,116,97,76,101,110,96,32]); + } + + result_1644167975 = (((t_p0.data).length < addInt(t_p0.counter, divInt(t_p0.counter, 2))) || (subInt((t_p0.data).length, t_p0.counter) < 4)); + + return result_1644167975; + +} + +function rawInsert__pureZjson_u1338(t_p0, data_p1, data_p1_Idx, key_p2, val_p3, hc_p4, h_p5) { + data_p1[data_p1_Idx][chckIndx(h_p5, 0, (data_p1[data_p1_Idx]).length - 1)].Field2 = nimCopy(null, key_p2, NTI33554449); + data_p1[data_p1_Idx][chckIndx(h_p5, 0, (data_p1[data_p1_Idx]).length - 1)].Field3 = val_p3; + data_p1[data_p1_Idx][chckIndx(h_p5, 0, (data_p1[data_p1_Idx]).length - 1)].Field0 = hc_p4; + data_p1[data_p1_Idx][chckIndx(h_p5, 0, (data_p1[data_p1_Idx]).length - 1)].Field1 = (-1); + if ((t_p0.first < 0)) { + t_p0.first = h_p5; + } + + if ((0 <= t_p0.last)) { + data_p1[data_p1_Idx][chckIndx(t_p0.last, 0, (data_p1[data_p1_Idx]).length - 1)].Field1 = h_p5; + } + + t_p0.last = h_p5; + + +} + +function enlarge__pureZjson_u955(t_p0) { + var Temporary5; + var Temporary6; + + var n_1644168129 = []; + n_1644168129 = new Array(chckRange(mulInt((t_p0.data).length, 2), 0, 2147483647)); for (var i = 0 ; i < chckRange(mulInt((t_p0.data).length, 2), 0, 2147483647) ; ++i) { n_1644168129[i] = {Field0: 0, Field1: 0, Field2: [], Field3: null}; } var h_1644168177 = t_p0.first; + t_p0.first = (-1); + t_p0.last = (-1); + var HEX3Atmp_2063599931 = nimCopy(null, t_p0.data, NTI1644167185); + t_p0.data = n_1644168129; + n_1644168129 = HEX3Atmp_2063599931; + Label1: { + Label2: while (true) { + if (!(0 <= h_1644168177)) break Label2; + var nxt_1644168231 = n_1644168129[chckIndx(h_1644168177, 0, (n_1644168129).length - 1)].Field1; + var eh_1644168281 = n_1644168129[chckIndx(h_1644168177, 0, (n_1644168129).length - 1)].Field0; + if (isFilled__pureZcollectionsZtables_u31(eh_1644168281)) { + var j_1644168285 = (eh_1644168281 & (t_p0.data).length - 1); + Label3: { + Label4: while (true) { + if (!isFilled__pureZcollectionsZtables_u31(t_p0.data[chckIndx(j_1644168285, 0, (t_p0.data).length - 1)].Field0)) break Label4; + j_1644168285 = nextTry__pureZcollectionsZtables_u34(j_1644168285, (t_p0.data).length - 1); + } + }; + Temporary5 = n_1644168129[chckIndx(h_1644168177, 0, (n_1644168129).length - 1)].Field2; + n_1644168129[chckIndx(h_1644168177, 0, (n_1644168129).length - 1)].Field2 = []; + Temporary6 = n_1644168129[chckIndx(h_1644168177, 0, (n_1644168129).length - 1)].Field3; + n_1644168129[chckIndx(h_1644168177, 0, (n_1644168129).length - 1)].Field3 = null; + rawInsert__pureZjson_u1338(t_p0, t_p0, "data", Temporary5, Temporary6, n_1644168129[chckIndx(h_1644168177, 0, (n_1644168129).length - 1)].Field0, j_1644168285); + } + + h_1644168177 = nxt_1644168231; + } + }; + + +} + +function rawGetKnownHC__pureZjson_u1600(t_p0, key_p1, hc_p2) { + var result_1644168774 = 0; + + BeforeRet: { + if (((t_p0.data).length == 0)) { + result_1644168774 = (-1); + break BeforeRet; + } + + var h_1644168821 = (hc_p2 & (t_p0.data).length - 1); + Label1: { + Label2: while (true) { + if (!isFilled__pureZcollectionsZtables_u31(t_p0.data[chckIndx(h_1644168821, 0, (t_p0.data).length - 1)].Field0)) break Label2; + if (((t_p0.data[chckIndx(h_1644168821, 0, (t_p0.data).length - 1)].Field0 == hc_p2) && eqStrings(t_p0.data[chckIndx(h_1644168821, 0, (t_p0.data).length - 1)].Field2, key_p1))) { + result_1644168774 = h_1644168821; + break BeforeRet; + } + + h_1644168821 = nextTry__pureZcollectionsZtables_u34(h_1644168821, (t_p0.data).length - 1); + } + }; + result_1644168774 = subInt((-1), h_1644168821); + }; + + return result_1644168774; + +} + +function HEX5BHEX5DHEX3D__pureZjson_u414(t_p0, key_p1, val_p2) { + if (((t_p0.data).length == 0)) { + var correctSizeHEX60gensym13_1644167633 = slotsNeeded__pureZcollectionsZtables_u42(32); + t_p0.counter = 0; + t_p0.data = new Array(chckRange(correctSizeHEX60gensym13_1644167633, 0, 2147483647)); for (var i = 0 ; i < chckRange(correctSizeHEX60gensym13_1644167633, 0, 2147483647) ; ++i) { t_p0.data[i] = {Field0: 0, Field1: 0, Field2: [], Field3: null}; } t_p0.first = (-1); + t_p0.last = (-1); + } + + var hc_1644167642 = [0]; + var index_1644167873 = rawGet__pureZjson_u483(t_p0, key_p1, hc_1644167642, 0); + if ((0 <= index_1644167873)) { + t_p0.data[chckIndx(index_1644167873, 0, (t_p0.data).length - 1)].Field3 = val_p2; + } + else { + if (((t_p0.data).length == 0)) { + var correctSizeHEX60gensym18_1644167967 = slotsNeeded__pureZcollectionsZtables_u42(32); + t_p0.counter = 0; + t_p0.data = new Array(chckRange(correctSizeHEX60gensym18_1644167967, 0, 2147483647)); for (var i = 0 ; i < chckRange(correctSizeHEX60gensym18_1644167967, 0, 2147483647) ; ++i) { t_p0.data[i] = {Field0: 0, Field1: 0, Field2: [], Field3: null}; } t_p0.first = (-1); + t_p0.last = (-1); + } + + if (mustRehash__pureZjson_u804(t_p0)) { + enlarge__pureZjson_u955(t_p0); + index_1644167873 = rawGetKnownHC__pureZjson_u1600(t_p0, key_p1, hc_1644167642[0]); + } + + index_1644167873 = subInt((-1), index_1644167873); + rawInsert__pureZjson_u1338(t_p0, t_p0, "data", key_p1, val_p2, hc_1644167642[0], index_1644167873); + t_p0.counter = addInt(t_p0.counter, 1); + } + + + +} + +function HEX5BHEX5DHEX3D__pureZjson_u1973(obj_p0, key_p1, val_p2) { + var Temporary1; + + if (!((obj_p0.kind == 5))) { + failedAssertImpl__stdZassertions_u86([106,115,111,110,46,110,105,109,40,51,57,54,44,32,57,41,32,96,111,98,106,46,107,105,110,100,32,61,61,32,74,79,98,106,101,99,116,96,32]); + } + + var Temporary1 = obj_p0; + if (ConstSet12[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fields\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + HEX5BHEX5DHEX3D__pureZjson_u414(Temporary1.fields, key_p1, val_p2); + + +} + +function newJInt__pureZjson_u125(n_p0) { + var result_1644167295 = null; + + result_1644167295 = {kind: 2, num: n_p0, isUnquoted: false, str: [], fnum: 0.0, bval: false, fields: ({data: [], counter: 0, first: 0, last: 0}), elems: []}; + + return result_1644167295; + +} + +function newJFloat__pureZjson_u128(n_p0) { + var result_1644167298 = null; + + result_1644167298 = {kind: 3, fnum: n_p0, isUnquoted: false, str: [], num: 0n, bval: false, fields: ({data: [], counter: 0, first: 0, last: 0}), elems: []}; + + return result_1644167298; + +} + +function newJRawNumber__pureZjson_u122(s_p0) { + var result_1644167292 = null; + + result_1644167292 = {kind: 4, str: nimCopy(null, s_p0, NTI33554449), isUnquoted: true, num: 0n, fnum: 0.0, bval: false, fields: ({data: [], counter: 0, first: 0, last: 0}), elems: []}; + + return result_1644167292; + +} + +function newJString__pureZjson_u42(s_p0) { + var result_1644167212 = null; + + result_1644167212 = {kind: 4, str: nimCopy(null, s_p0, NTI33554449), isUnquoted: false, num: 0n, fnum: 0.0, bval: false, fields: ({data: [], counter: 0, first: 0, last: 0}), elems: []}; + + return result_1644167212; + +} + +function newJBool__pureZjson_u131(b_p0) { + var result_1644167301 = null; + + result_1644167301 = {kind: 1, bval: b_p0, isUnquoted: false, str: [], num: 0n, fnum: 0.0, fields: ({data: [], counter: 0, first: 0, last: 0}), elems: []}; + + return result_1644167301; + +} + +function newJNull__pureZjson_u134() { + var result_1644167303 = null; + + result_1644167303 = {kind: 0, isUnquoted: false, str: [], num: 0n, fnum: 0.0, bval: false, fields: ({data: [], counter: 0, first: 0, last: 0}), elems: []}; + + return result_1644167303; + +} + +function convertObject__pureZjson_u5241(x_p0) { + var result_1644172411 = null; + + var isRawNumber_1644172412 = [false]; + switch (getVarType__pureZjson_u5217(x_p0, isRawNumber_1644172412, 0)) { + case 6: + result_1644172411 = newJArray__pureZjson_u203(); + Label1: { + var i_1644172417 = 0; + var colontmp__2063599923 = 0; + colontmp__2063599923 = len__pureZjson_u5238(x_p0); + var i_2063599924 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599924 < colontmp__2063599923)) break Label3; + i_1644172417 = i_2063599924; + add__pureZjson_u349(result_1644172411, convertObject__pureZjson_u5241(x_p0[i_1644172417])); + i_2063599924 = addInt(i_2063599924, 1); + } + }; + }; + break; + case 5: + result_1644172411 = newJObject__pureZjson_u136(); + for (var property in x_p0) { + if (x_p0.hasOwnProperty(property)) { + + var nimProperty_1644172418 = null; + var nimValue_1644172419 = null; + nimProperty_1644172418 = property; nimValue_1644172419 = x_p0[property]; + HEX5BHEX5DHEX3D__pureZjson_u1973(result_1644172411, cstrToNimstr(nimProperty_1644172418), convertObject__pureZjson_u5241(nimValue_1644172419)); + }} + break; + case 2: + result_1644172411 = newJInt__pureZjson_u125(BigInt((x_p0))); + break; + case 3: + result_1644172411 = newJFloat__pureZjson_u128((x_p0)); + break; + case 4: + if (isRawNumber_1644172412[0]) { + var value_1644172428 = null; + value_1644172428 = x_p0.toString(); + result_1644172411 = newJRawNumber__pureZjson_u122(cstrToNimstr(value_1644172428)); + } + else { + result_1644172411 = newJString__pureZjson_u42(cstrToNimstr((x_p0))); + } + + break; + case 1: + result_1644172411 = newJBool__pureZjson_u131((x_p0)); + break; + case 0: + result_1644172411 = newJNull__pureZjson_u134(); + break; + } + + return result_1644172411; + +} + +function parseJson__pureZjson_u5269(buffer_p0) { + var result_1644172439 = null; + + BeforeRet: { + result_1644172439 = convertObject__pureZjson_u5241(JSON.parse(toJSStr(buffer_p0))); + break BeforeRet; + }; + + return result_1644172439; + +} + +function HEX3DHEX3D__pureZjson_u2117(x_p0, y_p1) { + var result_1644169289 = false; + + BeforeRet: { + var sameObject_1644169297 = false; + sameObject_1644169297 = x_p0 === y_p1; + if (sameObject_1644169297) { + result_1644169289 = true; + break BeforeRet; + } + + if (!(((x_p0).length == (y_p1).length))) { + result_1644169289 = false; + break BeforeRet; + } + + Label1: { + var i_1644169311 = 0; + var colontmp__2063599944 = 0; + colontmp__2063599944 = subInt((x_p0).length, 1); + var res_2063599945 = 0; + Label2: { + Label3: while (true) { + if (!(res_2063599945 <= colontmp__2063599944)) break Label3; + i_1644169311 = res_2063599945; + if (!(HEX3DHEX3D__pureZjson_u2100(x_p0[chckIndx(i_1644169311, 0, (x_p0).length - 1)], y_p1[chckIndx(i_1644169311, 0, (y_p1).length - 1)]))) { + result_1644169289 = false; + break BeforeRet; + } + + res_2063599945 = addInt(res_2063599945, 1); + } + }; + }; + result_1644169289 = true; + break BeforeRet; + }; + + return result_1644169289; + +} + +function hasKey__pureZjson_u2584(t_p0, key_p1) { + var result_1644169757 = false; + + var hc_1644169762 = [0]; + result_1644169757 = (0 <= rawGet__pureZjson_u483(t_p0, key_p1, hc_1644169762, 0)); + + return result_1644169757; + +} + +function rawGet__pureZjson_u2665(t_p0, key_p1, hc_p2, hc_p2_Idx) { + var result_1644169839 = 0; + + BeforeRet: { + hc_p2[hc_p2_Idx] = hash__pureZhashes_u761(key_p1); + if ((hc_p2[hc_p2_Idx] == 0)) { + hc_p2[hc_p2_Idx] = 314159265; + } + + if (((t_p0.data).length == 0)) { + result_1644169839 = (-1); + break BeforeRet; + } + + var h_1644169889 = (hc_p2[hc_p2_Idx] & (t_p0.data).length - 1); + Label1: { + Label2: while (true) { + if (!isFilled__pureZcollectionsZtables_u31(t_p0.data[chckIndx(h_1644169889, 0, (t_p0.data).length - 1)].Field0)) break Label2; + if (((t_p0.data[chckIndx(h_1644169889, 0, (t_p0.data).length - 1)].Field0 == hc_p2[hc_p2_Idx]) && eqStrings(t_p0.data[chckIndx(h_1644169889, 0, (t_p0.data).length - 1)].Field2, key_p1))) { + result_1644169839 = h_1644169889; + break BeforeRet; + } + + h_1644169889 = nextTry__pureZcollectionsZtables_u34(h_1644169889, (t_p0.data).length - 1); + } + }; + result_1644169839 = subInt((-1), h_1644169889); + }; + + return result_1644169839; + +} + +function raiseKeyError__pureZhttpcore_u949(key_p0) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(key_p0), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + + +} + +function HEX5BHEX5D__pureZjson_u2658(t_p0, key_p1) { + var result_1644169831 = null; + var result_1644169831_Idx = 0; + + var hcHEX60gensym97_1644169832 = [0]; + var indexHEX60gensym97_1644170040 = rawGet__pureZjson_u2665(t_p0, key_p1, hcHEX60gensym97_1644169832, 0); + if ((0 <= indexHEX60gensym97_1644170040)) { + result_1644169831 = t_p0.data[chckIndx(indexHEX60gensym97_1644170040, 0, (t_p0.data).length - 1)]; result_1644169831_Idx = "Field3"; + } + else { + raiseKeyError__pureZhttpcore_u949(key_p1); + } + + + return [result_1644169831, result_1644169831_Idx]; + +} + +function HEX3DHEX3D__pureZjson_u2100(a_p0, b_p1) { + var Temporary1; + var Temporary2; + var Temporary3; + var Temporary4; + var Temporary5; + var Temporary6; + var Temporary7; + var Temporary8; + var Temporary9; + var Temporary10; + var Temporary11; + var Temporary12; + var Temporary14; + var Temporary17; + var Temporary18; + var Temporary19; + + var result_1644169271 = false; + + BeforeRet: { + if ((a_p0 == null)) { + if ((b_p1 == null)) { + result_1644169271 = true; + break BeforeRet; + } + + result_1644169271 = false; + break BeforeRet; + } + else { + if (((b_p1 == null) || !((a_p0.kind == b_p1.kind)))) { + result_1644169271 = false; + break BeforeRet; + } + else { + switch (a_p0.kind) { + case 4: + var Temporary1 = a_p0; + if (ConstSet13[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + var Temporary2 = b_p1; + if (ConstSet14[Temporary2.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary2.kind, NTI1644167171)); } + result_1644169271 = eqStrings(Temporary1.str, Temporary2.str); + break; + case 2: + var Temporary3 = a_p0; + if (ConstSet15[Temporary3.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'num\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary3.kind, NTI1644167171)); } + var Temporary4 = b_p1; + if (ConstSet16[Temporary4.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'num\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary4.kind, NTI1644167171)); } + result_1644169271 = (Temporary3.num == Temporary4.num); + break; + case 3: + var Temporary5 = a_p0; + if (ConstSet17[Temporary5.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fnum\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary5.kind, NTI1644167171)); } + var Temporary6 = b_p1; + if (ConstSet18[Temporary6.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fnum\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary6.kind, NTI1644167171)); } + result_1644169271 = (Temporary5.fnum == Temporary6.fnum); + break; + case 1: + var Temporary7 = a_p0; + if (ConstSet19[Temporary7.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'bval\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary7.kind, NTI1644167171)); } + var Temporary8 = b_p1; + if (ConstSet20[Temporary8.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'bval\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary8.kind, NTI1644167171)); } + result_1644169271 = (Temporary7.bval == Temporary8.bval); + break; + case 0: + result_1644169271 = true; + break; + case 6: + var Temporary9 = a_p0; + if (ConstSet21[Temporary9.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'elems\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary9.kind, NTI1644167171)); } + var Temporary10 = b_p1; + if (ConstSet22[Temporary10.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'elems\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary10.kind, NTI1644167171)); } + result_1644169271 = HEX3DHEX3D__pureZjson_u2117(Temporary9.elems, Temporary10.elems); + break; + case 5: + var Temporary11 = a_p0; + if (ConstSet23[Temporary11.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fields\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary11.kind, NTI1644167171)); } + var Temporary12 = b_p1; + if (ConstSet24[Temporary12.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fields\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary12.kind, NTI1644167171)); } + if (!((len__pureZjson_u2184(Temporary11.fields) == len__pureZjson_u2184(Temporary12.fields)))) { + result_1644169271 = false; + break BeforeRet; + } + + Label13: { + var key_1644169714 = []; + var val_1644169715 = null; + var colontmp__2063599938 = ({data: [], counter: 0, first: 0, last: 0}); + var Temporary14 = a_p0; + if (ConstSet25[Temporary14.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fields\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary14.kind, NTI1644167171)); } + colontmp__2063599938 = nimCopy(colontmp__2063599938, Temporary14.fields, NTI1644167182); + var L_2063599939 = len__pureZjson_u2184(colontmp__2063599938); + if ((0 < colontmp__2063599938.counter)) { + var h_2063599940 = colontmp__2063599938.first; + Label15: { + Label16: while (true) { + if (!(0 <= h_2063599940)) break Label16; + var nxt_2063599942 = colontmp__2063599938.data[chckIndx(h_2063599940, 0, (colontmp__2063599938.data).length - 1)].Field1; + if (isFilled__pureZcollectionsZtables_u31(colontmp__2063599938.data[chckIndx(h_2063599940, 0, (colontmp__2063599938.data).length - 1)].Field0)) { + key_1644169714 = colontmp__2063599938.data[chckIndx(h_2063599940, 0, (colontmp__2063599938.data).length - 1)].Field2; + val_1644169715 = colontmp__2063599938.data[chckIndx(h_2063599940, 0, (colontmp__2063599938.data).length - 1)].Field3; + var Temporary17 = b_p1; + if (ConstSet26[Temporary17.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fields\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary17.kind, NTI1644167171)); } + if (!(hasKey__pureZjson_u2584(Temporary17.fields, key_1644169714))) { + result_1644169271 = false; + break BeforeRet; + } + + var Temporary18 = b_p1; + if (ConstSet27[Temporary18.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fields\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary18.kind, NTI1644167171)); } + if (!(HEX3DHEX3D__pureZjson_u2100((Temporary19 = HEX5BHEX5D__pureZjson_u2658(Temporary18.fields, key_1644169714), Temporary19)[0][Temporary19[1]], val_1644169715))) { + result_1644169271 = false; + break BeforeRet; + } + + if (!((len__pureZjson_u2184(colontmp__2063599938) == L_2063599939))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("tables.nim(1822, 11) `len(t) == L` the length of the table changed while iterating over it")); + } + + } + + h_2063599940 = nxt_2063599942; + } + }; + } + + }; + result_1644169271 = true; + break; + } + } + } + }; + + return result_1644169271; + +} + +function invalidFormatString__pureZstrutils_u2474(formatstr_p0) { + raiseException({message: ([105,110,118,97,108,105,100,32,102,111,114,109,97,116,32,115,116,114,105,110,103,58,32]).concat(formatstr_p0), parent: null, m_type: NTI134217746, name: null, trace: [], up: null}, "ValueError"); + + +} + +function toLowerAscii__stdZprivateZstrimpl_u1(c_p0) { + var result_1258291203 = 0; + + if ((ConstSet32[c_p0] != undefined)) { + result_1258291203 = chckRange(addInt(c_p0, 32), 0, 255); + } + else { + result_1258291203 = c_p0; + } + + + return result_1258291203; + +} + +function nsuCmpIgnoreStyle(a_p0, b_p1) { + var Temporary7; + var Temporary8; + + var result_1124073687 = 0; + + BeforeRet: { + var aLenHEX60gensym24_1124073696 = (a_p0).length; + var bLenHEX60gensym24_1124073697 = (b_p1).length; + var iHEX60gensym24_1124073698 = 0; + var jHEX60gensym24_1124073699 = 0; + Label1: { + Label2: while (true) { + if (!true) break Label2; + Label3: { + Label4: while (true) { + if (!((iHEX60gensym24_1124073698 < aLenHEX60gensym24_1124073696) && (a_p0[iHEX60gensym24_1124073698] == 95))) break Label4; + iHEX60gensym24_1124073698 += 1; + } + }; + Label5: { + Label6: while (true) { + if (!((jHEX60gensym24_1124073699 < bLenHEX60gensym24_1124073697) && (b_p1[jHEX60gensym24_1124073699] == 95))) break Label6; + jHEX60gensym24_1124073699 += 1; + } + }; + if ((iHEX60gensym24_1124073698 < aLenHEX60gensym24_1124073696)) { + Temporary7 = toLowerAscii__stdZprivateZstrimpl_u1(a_p0[iHEX60gensym24_1124073698]); + } + else { + Temporary7 = 0; + } + + var aaHEX60gensym24_1124073710 = Temporary7; + if ((jHEX60gensym24_1124073699 < bLenHEX60gensym24_1124073697)) { + Temporary8 = toLowerAscii__stdZprivateZstrimpl_u1(b_p1[jHEX60gensym24_1124073699]); + } + else { + Temporary8 = 0; + } + + var bbHEX60gensym24_1124073711 = Temporary8; + result_1124073687 = (aaHEX60gensym24_1124073710 - bbHEX60gensym24_1124073711); + if (!((result_1124073687 == 0))) { + break BeforeRet; + } + + if ((aLenHEX60gensym24_1124073696 <= iHEX60gensym24_1124073698)) { + if ((bLenHEX60gensym24_1124073697 <= jHEX60gensym24_1124073699)) { + result_1124073687 = 0; + break BeforeRet; + } + + result_1124073687 = (-1); + break BeforeRet; + } + else { + if ((bLenHEX60gensym24_1124073697 <= jHEX60gensym24_1124073699)) { + result_1124073687 = 1; + break BeforeRet; + } + } + iHEX60gensym24_1124073698 += 1; + jHEX60gensym24_1124073699 += 1; + } + }; + }; + + return result_1124073687; + +} + +function findNormalized__pureZstrutils_u2461(x_p0, inArray_p1) { + var result_1124075936 = 0; + + BeforeRet: { + var i_1124075937 = 0; + Label1: { + Label2: while (true) { + if (!(i_1124075937 < (inArray_p1).length - 1)) break Label2; + if ((nsuCmpIgnoreStyle(x_p0, inArray_p1[chckIndx(i_1124075937, 0, (inArray_p1).length - 1)]) == 0)) { + result_1124075936 = i_1124075937; + break BeforeRet; + } + + i_1124075937 = addInt(i_1124075937, 2); + } + }; + result_1124075936 = (-1); + break BeforeRet; + }; + + return result_1124075936; + +} + +function substr__system_u3776(s_p0, first_p1, last_p2) { + var result_33558212 = []; + + var first_33558213 = nimMax(first_p1, 0); + var last_33558214 = nimMin(last_p2, (s_p0).length - 1); + var L_33558215 = nimMax(addInt(subInt(last_33558214, first_33558213), 1), 0); + result_33558212 = nimCopy(null, mnewString(chckRange(L_33558215, 0, 2147483647)), NTI33554449); + Label1: { + var i_33558225 = 0; + var i_1409286509 = 0; + Label2: { + Label3: while (true) { + if (!(i_1409286509 < L_33558215)) break Label3; + i_33558225 = i_1409286509; + result_33558212[chckIndx(i_33558225, 0, (result_33558212).length - 1)] = s_p0[chckIndx(addInt(i_33558225, first_33558213), 0, (s_p0).length - 1)]; + i_1409286509 = addInt(i_1409286509, 1); + } + }; + }; + + return result_33558212; + +} + +function nsuAddf(s_p0, s_p0_Idx, formatstr_p1, a_p2) { + var Temporary5; + var Temporary6; + var Temporary9; + var Temporary12; + + var i_1124075954 = 0; + var num_1124075955 = 0; + Label1: { + Label2: while (true) { + if (!(i_1124075954 < (formatstr_p1).length)) break Label2; + if (((formatstr_p1[chckIndx(i_1124075954, 0, (formatstr_p1).length - 1)] == 36) && (addInt(i_1124075954, 1) < (formatstr_p1).length))) { + switch (formatstr_p1[chckIndx(addInt(i_1124075954, 1), 0, (formatstr_p1).length - 1)]) { + case 35: + if (((a_p2).length - 1 < num_1124075955)) { + invalidFormatString__pureZstrutils_u2474(formatstr_p1); + } + + nimAddStrStr(s_p0[s_p0_Idx], a_p2[chckIndx(num_1124075955, 0, (a_p2).length - 1)]);; + i_1124075954 = addInt(i_1124075954, 2); + num_1124075955 = addInt(num_1124075955, 1); + break; + case 36: + addChar(s_p0[s_p0_Idx], 36);; + i_1124075954 = addInt(i_1124075954, 2); + break; + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 45: + var j_1124075974 = 0; + i_1124075954 = addInt(i_1124075954, 1); + var negative_1124075980 = (formatstr_p1[chckIndx(i_1124075954, 0, (formatstr_p1).length - 1)] == 45); + if (negative_1124075980) { + i_1124075954 = addInt(i_1124075954, 1); + } + + Label3: { + Label4: while (true) { + if (!(i_1124075954 < (formatstr_p1).length)) Temporary5 = false; else { Temporary5 = (ConstSet29[formatstr_p1[chckIndx(i_1124075954, 0, (formatstr_p1).length - 1)]] != undefined); } if (!Temporary5) break Label4; + j_1124075974 = subInt(addInt(mulInt(j_1124075974, 10), formatstr_p1[chckIndx(i_1124075954, 0, (formatstr_p1).length - 1)]), 48); + i_1124075954 = addInt(i_1124075954, 1); + } + }; + if (!(negative_1124075980)) { + Temporary6 = subInt(j_1124075974, 1); + } + else { + Temporary6 = subInt((a_p2).length, j_1124075974); + } + + var idx_1124076005 = Temporary6; + if (((idx_1124076005 < 0) || ((a_p2).length - 1 < idx_1124076005))) { + invalidFormatString__pureZstrutils_u2474(formatstr_p1); + } + + nimAddStrStr(s_p0[s_p0_Idx], a_p2[chckIndx(idx_1124076005, 0, (a_p2).length - 1)]);; + break; + case 123: + var j_1124076009 = addInt(i_1124075954, 2); + var k_1124076010 = 0; + var negative_1124076011 = (formatstr_p1[chckIndx(j_1124076009, 0, (formatstr_p1).length - 1)] == 45); + if (negative_1124076011) { + j_1124076009 = addInt(j_1124076009, 1); + } + + var isNumber_1124076017 = 0; + Label7: { + Label8: while (true) { + if (!((j_1124076009 < (formatstr_p1).length) && !((ConstSet30[formatstr_p1[chckIndx(j_1124076009, 0, (formatstr_p1).length - 1)]] != undefined)))) break Label8; + if ((ConstSet31[formatstr_p1[chckIndx(j_1124076009, 0, (formatstr_p1).length - 1)]] != undefined)) { + k_1124076010 = subInt(addInt(mulInt(k_1124076010, 10), formatstr_p1[chckIndx(j_1124076009, 0, (formatstr_p1).length - 1)]), 48); + if ((isNumber_1124076017 == 0)) { + isNumber_1124076017 = 1; + } + + } + else { + isNumber_1124076017 = (-1); + } + + j_1124076009 = addInt(j_1124076009, 1); + } + }; + if ((isNumber_1124076017 == 1)) { + if (!(negative_1124076011)) { + Temporary9 = subInt(k_1124076010, 1); + } + else { + Temporary9 = subInt((a_p2).length, k_1124076010); + } + + var idx_1124076040 = Temporary9; + if (((idx_1124076040 < 0) || ((a_p2).length - 1 < idx_1124076040))) { + invalidFormatString__pureZstrutils_u2474(formatstr_p1); + } + + nimAddStrStr(s_p0[s_p0_Idx], a_p2[chckIndx(idx_1124076040, 0, (a_p2).length - 1)]);; + } + else { + var x_1124076044 = findNormalized__pureZstrutils_u2461(substr__system_u3776(formatstr_p1, addInt(i_1124075954, 2), subInt(j_1124076009, 1)), a_p2); + if (((0 <= x_1124076044) && (x_1124076044 < (a_p2).length - 1))) { + nimAddStrStr(s_p0[s_p0_Idx], a_p2[chckIndx(addInt(x_1124076044, 1), 0, (a_p2).length - 1)]);; + } + else { + invalidFormatString__pureZstrutils_u2474(formatstr_p1); + } + + } + + i_1124075954 = addInt(j_1124076009, 1); + break; + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 116: + case 117: + case 118: + case 119: + case 120: + case 121: + case 122: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 89: + case 90: + case 128: + case 129: + case 130: + case 131: + case 132: + case 133: + case 134: + case 135: + case 136: + case 137: + case 138: + case 139: + case 140: + case 141: + case 142: + case 143: + case 144: + case 145: + case 146: + case 147: + case 148: + case 149: + case 150: + case 151: + case 152: + case 153: + case 154: + case 155: + case 156: + case 157: + case 158: + case 159: + case 160: + case 161: + case 162: + case 163: + case 164: + case 165: + case 166: + case 167: + case 168: + case 169: + case 170: + case 171: + case 172: + case 173: + case 174: + case 175: + case 176: + case 177: + case 178: + case 179: + case 180: + case 181: + case 182: + case 183: + case 184: + case 185: + case 186: + case 187: + case 188: + case 189: + case 190: + case 191: + case 192: + case 193: + case 194: + case 195: + case 196: + case 197: + case 198: + case 199: + case 200: + case 201: + case 202: + case 203: + case 204: + case 205: + case 206: + case 207: + case 208: + case 209: + case 210: + case 211: + case 212: + case 213: + case 214: + case 215: + case 216: + case 217: + case 218: + case 219: + case 220: + case 221: + case 222: + case 223: + case 224: + case 225: + case 226: + case 227: + case 228: + case 229: + case 230: + case 231: + case 232: + case 233: + case 234: + case 235: + case 236: + case 237: + case 238: + case 239: + case 240: + case 241: + case 242: + case 243: + case 244: + case 245: + case 246: + case 247: + case 248: + case 249: + case 250: + case 251: + case 252: + case 253: + case 254: + case 255: + case 95: + var j_1124076048 = addInt(i_1124075954, 1); + Label10: { + Label11: while (true) { + if (!(j_1124076048 < (formatstr_p1).length)) Temporary12 = false; else { Temporary12 = (ConstSet33[formatstr_p1[chckIndx(j_1124076048, 0, (formatstr_p1).length - 1)]] != undefined); } if (!Temporary12) break Label11; + j_1124076048 = addInt(j_1124076048, 1); + } + }; + var x_1124076058 = findNormalized__pureZstrutils_u2461(substr__system_u3776(formatstr_p1, addInt(i_1124075954, 1), subInt(j_1124076048, 1)), a_p2); + if (((0 <= x_1124076058) && (x_1124076058 < (a_p2).length - 1))) { + nimAddStrStr(s_p0[s_p0_Idx], a_p2[chckIndx(addInt(x_1124076058, 1), 0, (a_p2).length - 1)]);; + } + else { + invalidFormatString__pureZstrutils_u2474(formatstr_p1); + } + + i_1124075954 = j_1124076048; + break; + default: + invalidFormatString__pureZstrutils_u2474(formatstr_p1); + break; + } + } + else { + addChar(s_p0[s_p0_Idx], formatstr_p1[chckIndx(i_1124075954, 0, (formatstr_p1).length - 1)]);; + i_1124075954 = addInt(i_1124075954, 1); + } + + } + }; + + +} + +function nsuFormatOpenArray(formatstr_p0, a_p1) { + var result_1124076070 = [[]]; + + result_1124076070[0] = nimCopy(null, mnewString(0), NTI33554449); + nsuAddf(result_1124076070, 0, formatstr_p0, a_p1); + + return result_1124076070[0]; + +} + +function addQuoted__pureZjson_u5412(s_p0, s_p0_Idx, x_p1) { + nimAddStrStr(s_p0[s_p0_Idx], reprEnum(x_p1, NTI1644167171));; + + +} + +function collectionToString__pureZjson_u5378(x_p0, prefix_p1, separator_p2, suffix_p3) { + var result_1644172552 = [[]]; + + result_1644172552[0] = nimCopy(null, prefix_p1, NTI33554449); + var firstElement_1644172553 = true; + Label1: { + var value_1644172576 = 0; + var i_2063599958 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599958 <= 6)) break Label3; + if ((x_p0[i_2063599958] != undefined)) { + value_1644172576 = i_2063599958; + if (firstElement_1644172553) { + firstElement_1644172553 = false; + } + else { + nimAddStrStr(result_1644172552[0], separator_p2);; + } + + addQuoted__pureZjson_u5412(result_1644172552, 0, value_1644172576); + } + + i_2063599958 += 1; + } + }; + }; + nimAddStrStr(result_1644172552[0], suffix_p3);; + + return result_1644172552[0]; + +} + +function HEX24__pureZjson_u5374(x_p0) { + var result_1644172545 = []; + + result_1644172545 = nimCopy(null, collectionToString__pureZjson_u5378(x_p0, [123], [44,32], [125]), NTI33554449); + + return result_1644172545; + +} + +function new__postlist_u529() { + var result_2063598100 = null; + + BeforeRet: { + var r_2063598102 = null; + r_2063598102 = ({id: 0, author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), likes: [], seen: false, history: [], info: ({creation: 0n, content: []}), moreBefore: [], replyingTo: ({val: ({creation: 0n, topic: [], threadId: 0, postId: 0, author: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false})}), has: false})}); + result_2063598100 = r_2063598102; + break BeforeRet; + }; + + return result_2063598100; + +} + +function integerOutOfRangeError__pureZparseutils_u325() { + raiseException({message: [80,97,114,115,101,100,32,105,110,116,101,103,101,114,32,111,117,116,115,105,100,101,32,111,102,32,118,97,108,105,100,32,114,97,110,103,101], parent: null, m_type: NTI134217746, name: null, trace: [], up: null}, "ValueError"); + + +} + +function rawParseUInt__pureZparseutils_u461(s_p0, b_p1, b_p1_Idx) { + var Temporary1; + var Temporary2; + var Temporary5; + + var result_1140851152 = 0; + + var res_1140851153 = 0n; + var i_1140851154 = 0; + if (!((i_1140851154 < subInt((s_p0).length, 1)) && (s_p0[chckIndx(i_1140851154, 0, (s_p0).length - 1)] == 45))) Temporary1 = false; else { Temporary1 = (ConstSet39[s_p0[chckIndx(addInt(i_1140851154, 1), 0, (s_p0).length - 1)]] != undefined); } if (Temporary1) { + integerOutOfRangeError__pureZparseutils_u325(); + } + + if (((i_1140851154 < (s_p0).length) && (s_p0[chckIndx(i_1140851154, 0, (s_p0).length - 1)] == 43))) { + i_1140851154 = addInt(i_1140851154, 1); + } + + if (!(i_1140851154 < (s_p0).length)) Temporary2 = false; else { Temporary2 = (ConstSet40[s_p0[chckIndx(i_1140851154, 0, (s_p0).length - 1)]] != undefined); } if (Temporary2) { + b_p1[b_p1_Idx] = 0n; + Label3: { + Label4: while (true) { + if (!(i_1140851154 < (s_p0).length)) Temporary5 = false; else { Temporary5 = (ConstSet41[s_p0[chckIndx(i_1140851154, 0, (s_p0).length - 1)]] != undefined); } if (!Temporary5) break Label4; + if ((1844674407370955161n < res_1140851153)) { + integerOutOfRangeError__pureZparseutils_u325(); + } + + res_1140851153 = BigInt.asUintN(64, (res_1140851153 * 10n)); + var prev_1140851188 = res_1140851153; + res_1140851153 = BigInt.asUintN(64, res_1140851153 + BigInt(BigInt.asUintN(64, BigInt(subInt(s_p0[chckIndx(i_1140851154, 0, (s_p0).length - 1)], 48))))); + if ((res_1140851153 < prev_1140851188)) { + integerOutOfRangeError__pureZparseutils_u325(); + } + + i_1140851154 = addInt(i_1140851154, 1); + Label6: { + Label7: while (true) { + if (!((i_1140851154 < (s_p0).length) && (s_p0[chckIndx(i_1140851154, 0, (s_p0).length - 1)] == 95))) break Label7; + i_1140851154 = addInt(i_1140851154, 1); + } + }; + } + }; + b_p1[b_p1_Idx] = res_1140851153; + result_1140851152 = i_1140851154; + } + else { + result_1140851152 = 0; + } + + + return result_1140851152; + +} + +function npuParseBiggestUInt(s_p0, number_p1, number_p1_Idx) { + var result_1140851215 = 0; + + var res_1140851216 = [0n]; + result_1140851215 = rawParseUInt__pureZparseutils_u461(s_p0, res_1140851216, 0); + if (!((result_1140851215 == 0))) { + number_p1[number_p1_Idx] = res_1140851216[0]; + } + + + return result_1140851215; + +} + +function parseBiggestUInt__pureZparseutils_u925(s_p0, number_p1, number_p1_Idx, start_p2) { + var result_1140851617 = 0; + + result_1140851617 = npuParseBiggestUInt((s_p0.slice(start_p2, (s_p0).length - 1 + 1)), number_p1, number_p1_Idx); + + return result_1140851617; + +} + +function nsuParseBiggestUInt(s_p0) { + var result_1124074346 = [0n]; + + result_1124074346[0] = 0n; + var L_1124074347 = parseBiggestUInt__pureZparseutils_u925(s_p0, result_1124074346, 0, 0); + if ((!((L_1124074347 == (s_p0).length)) || (L_1124074347 == 0))) { + raiseException({message: ([105,110,118,97,108,105,100,32,117,110,115,105,103,110,101,100,32,105,110,116,101,103,101,114,58,32]).concat(s_p0), parent: null, m_type: NTI134217746, name: null, trace: [], up: null}, "ValueError"); + } + + + return result_1124074346[0]; + +} + +function initFromJson__addcategorymodal_u150(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + var Temporary2; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet37[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym7_1996488875 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet38), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym7_1996488875, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + switch (jsonNode_p1.kind) { + case 4: + var Temporary1 = jsonNode_p1; + if (ConstSet42[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + var x_1996488877 = nsuParseBiggestUInt(Temporary1.str); + dst_p0[dst_p0_Idx] = Number(BigInt.asIntN(32, x_1996488877)); + break; + default: + var Temporary2 = jsonNode_p1; + if (ConstSet43[Temporary2.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'num\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary2.kind, NTI1644167171)); } + dst_p0[dst_p0_Idx] = chckRange(Number(Temporary2.num), (-2147483648), 2147483647); + break; + } + + +} + +function getOrDefault__pureZjson_u3422(t_p0, key_p1) { + var result_1644170595 = null; + + result_1644170595 = null; + var hcHEX60gensym58_1644170603 = [0]; + var indexHEX60gensym58_1644170610 = rawGet__pureZjson_u2665(t_p0, key_p1, hcHEX60gensym58_1644170603, 0); + if ((0 <= indexHEX60gensym58_1644170610)) { + result_1644170595 = t_p0.data[chckIndx(indexHEX60gensym58_1644170610, 0, (t_p0.data).length - 1)].Field3; + } + + + return result_1644170595; + +} + +function getOrDefault__pureZjson_u3507(node_p0, key_p1) { + var Temporary1; + + var result_1644170678 = null; + + if ((!((node_p0 == null)) && (node_p0.kind == 5))) { + var Temporary1 = node_p0; + if (ConstSet44[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'fields\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + result_1644170678 = getOrDefault__pureZjson_u3422(Temporary1.fields, key_p1); + } + else { + result_1644170678 = null; + } + + + return result_1644170678; + +} + +function initFromJson__pureZjson_u5295(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet45[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym98_1644172608 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet46), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym98_1644172608, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if ((jsonNode_p1.kind == 0)) { + dst_p0[dst_p0_Idx] = nimCopy(null, [], NTI33554449); + } + else { + var Temporary1 = jsonNode_p1; + if (ConstSet47[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + dst_p0[dst_p0_Idx] = nimCopy(null, Temporary1.str, NTI33554449); + } + + + +} + +function initFromJson__threadlist_u522(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + var Temporary2; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet48[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym47_1593836063 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet49), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym47_1593836063, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + switch (jsonNode_p1.kind) { + case 4: + var Temporary1 = jsonNode_p1; + if (ConstSet50[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + var x_1593836065 = nsuParseBiggestUInt(Temporary1.str); + dst_p0[dst_p0_Idx] = BigInt.asIntN(64, x_1593836065); + break; + default: + var Temporary2 = jsonNode_p1; + if (ConstSet51[Temporary2.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'num\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary2.kind, NTI1644167171)); } + dst_p0[dst_p0_Idx] = Temporary2.num; + break; + } + + +} + +function nimIdentNormalize__pureZstrutils_u123(s_p0) { + var result_1124073597 = []; + + BeforeRet: { + result_1124073597 = nimCopy(null, mnewString(chckRange((s_p0).length, 0, 2147483647)), NTI33554449); + if (((s_p0).length == 0)) { + break BeforeRet; + } + + result_1124073597[chckIndx(0, 0, (result_1124073597).length - 1)] = s_p0[chckIndx(0, 0, (s_p0).length - 1)]; + var j_1124073598 = 1; + Label1: { + var i_1124073603 = 0; + var colontmp__822087638 = 0; + colontmp__822087638 = subInt((s_p0).length, 1); + var res_822087639 = 1; + Label2: { + Label3: while (true) { + if (!(res_822087639 <= colontmp__822087638)) break Label3; + i_1124073603 = res_822087639; + if ((ConstSet54[s_p0[chckIndx(i_1124073603, 0, (s_p0).length - 1)]] != undefined)) { + result_1124073597[chckIndx(j_1124073598, 0, (result_1124073597).length - 1)] = chckRange(addInt(s_p0[chckIndx(i_1124073603, 0, (s_p0).length - 1)], 32), 0, 255); + j_1124073598 = addInt(j_1124073598, 1); + } + else { + if (!((s_p0[chckIndx(i_1124073603, 0, (s_p0).length - 1)] == 95))) { + result_1124073597[chckIndx(j_1124073598, 0, (result_1124073597).length - 1)] = s_p0[chckIndx(i_1124073603, 0, (s_p0).length - 1)]; + j_1124073598 = addInt(j_1124073598, 1); + } + } + res_822087639 = addInt(res_822087639, 1); + } + }; + }; + if (!((j_1124073598 == (s_p0).length))) { + if (result_1124073597.length < chckRange(j_1124073598, 0, 2147483647)) { for (var i = result_1124073597.length; i < chckRange(j_1124073598, 0, 2147483647); ++i) result_1124073597.push(0); } + else {result_1124073597.length = chckRange(j_1124073598, 0, 2147483647); }; + } + + }; + + return result_1124073597; + +} + +function parseEnum__threadlist_u594(s_p0) { + var Temporary1; + + var result_1593836117 = 0; + + switch (toJSStr(nimIdentNormalize__pureZstrutils_u123(s_p0))) { + case "Autospammer": + Temporary1 = 0; + break; + case "Spammer": + Temporary1 = 1; + break; + case "Moderated": + Temporary1 = 2; + break; + case "Troll": + Temporary1 = 3; + break; + case "Banned": + Temporary1 = 4; + break; + case "Emailunconfirmed": + Temporary1 = 5; + break; + case "User": + Temporary1 = 6; + break; + case "Moderator": + Temporary1 = 7; + break; + case "Admin": + Temporary1 = 8; + break; + default: + raiseException({message: ([73,110,118,97,108,105,100,32,101,110,117,109,32,118,97,108,117,101,58,32]).concat(s_p0), parent: null, m_type: NTI134217746, name: null, trace: [], up: null}, "ValueError"); + break; + } + result_1593836117 = Temporary1; + + return result_1593836117; + +} + +function getStr__pureZjson_u241(n_p0, default_p1) { + var Temporary1; + + var result_1644167412 = []; + + BeforeRet: { + if (((n_p0 == null) || !((n_p0.kind == 4)))) { + result_1644167412 = nimCopy(null, default_p1, NTI33554449); + break BeforeRet; + } + else { + var Temporary1 = n_p0; + if (ConstSet55[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'str\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + result_1644167412 = nimCopy(null, Temporary1.str, NTI33554449); + break BeforeRet; + } + + }; + + return result_1644167412; + +} + +function initFromJson__threadlist_u562(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet52[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym51_1593836099 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet53), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym51_1593836099, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + dst_p0[dst_p0_Idx] = parseEnum__threadlist_u594(getStr__pureZjson_u241(jsonNode_p1, [])); + + +} + +function initFromJson__pureZjson_u5299(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet56[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym102_1644172666 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet57), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym102_1644172666, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + var Temporary1 = jsonNode_p1; + if (ConstSet58[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'bval\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + dst_p0[dst_p0_Idx] = Temporary1.bval; + + +} + +function initFromJson__threadlist_u504(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_1593836030 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,105,100]);; + initFromJson__pureZjson_u5295(dst_p0, "id", getOrDefault__pureZjson_u3507(jsonNode_p1, [105,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593836030, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593836030, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593836030, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,110,97,109,101]);; + initFromJson__pureZjson_u5295(dst_p0, "name", getOrDefault__pureZjson_u3507(jsonNode_p1, [110,97,109,101]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593836030, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593836030, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593836030, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,97,118,97,116,97,114,85,114,108]);; + initFromJson__pureZjson_u5295(dst_p0, "avatarUrl", getOrDefault__pureZjson_u3507(jsonNode_p1, [97,118,97,116,97,114,85,114,108]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593836030, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593836030, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593836030, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,108,97,115,116,79,110,108,105,110,101]);; + initFromJson__threadlist_u522(dst_p0, "lastOnline", getOrDefault__pureZjson_u3507(jsonNode_p1, [108,97,115,116,79,110,108,105,110,101]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593836030, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593836030, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593836030, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,112,114,101,118,105,111,117,115,86,105,115,105,116,65,116]);; + initFromJson__threadlist_u522(dst_p0, "previousVisitAt", getOrDefault__pureZjson_u3507(jsonNode_p1, [112,114,101,118,105,111,117,115,86,105,115,105,116,65,116]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593836030, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593836030, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593836030, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,114,97,110,107]);; + initFromJson__threadlist_u562(dst_p0, "rank", getOrDefault__pureZjson_u3507(jsonNode_p1, [114,97,110,107]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593836030, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593836030, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593836030, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,105,115,68,101,108,101,116,101,100]);; + initFromJson__pureZjson_u5299(dst_p0, "isDeleted", getOrDefault__pureZjson_u3507(jsonNode_p1, [105,115,68,101,108,101,116,101,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593836030, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593836030, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593836030, 0, 2147483647); }; + + +} + +function HEX5BHEX5D__pureZjson_u3153(node_p0, index_p1) { + var Temporary1; + var Temporary2; + + var result_1644170324 = null; + + BeforeRet: { + if (!(!((node_p0 == null)))) { + failedAssertImpl__stdZassertions_u86([106,115,111,110,46,110,105,109,40,53,51,49,44,32,57,41,32,96,110,111,116,32,105,115,78,105,108,40,110,111,100,101,41,96,32]); + } + + if (!((node_p0.kind == 6))) { + failedAssertImpl__stdZassertions_u86([106,115,111,110,46,110,105,109,40,53,51,50,44,32,57,41,32,96,110,111,100,101,46,107,105,110,100,32,61,61,32,74,65,114,114,97,121,96,32]); + } + + var Temporary1 = node_p0; + if (ConstSet61[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'elems\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + result_1644170324 = (Temporary2 = Temporary1.elems, Temporary2)[chckIndx(index_p1, 0, (Temporary2).length - 1)]; + break BeforeRet; + }; + + return result_1644170324; + +} + +function initFromJson__threadlist_u647(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet59[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym58_1593836184 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet60), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym58_1593836184, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if (dst_p0[dst_p0_Idx].length < (Temporary1 = chckRange(len__pureZjson_u3028(jsonNode_p1), 0, 2147483647), Temporary1)) { for (var i = dst_p0[dst_p0_Idx].length ; i < Temporary1 ; ++i) dst_p0[dst_p0_Idx].push(({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false})); } + else { dst_p0[dst_p0_Idx].length = Temporary1; }; + var orignalJsonPathLen_1593836190 = (jsonPath_p2[jsonPath_p2_Idx]).length; + Label2: { + var i_1593836195 = 0; + var colontmp__2063599963 = 0; + colontmp__2063599963 = len__pureZjson_u3028(jsonNode_p1); + var i_2063599964 = 0; + Label3: { + Label4: while (true) { + if (!(i_2063599964 < colontmp__2063599963)) break Label4; + i_1593836195 = i_2063599964; + addChar(jsonPath_p2[jsonPath_p2_Idx], 91);; + addInt__stdZprivateZdigitsutils_u241(jsonPath_p2, jsonPath_p2_Idx, i_1593836195); + addChar(jsonPath_p2[jsonPath_p2_Idx], 93);; + initFromJson__threadlist_u504(dst_p0[dst_p0_Idx][chckIndx(i_1593836195, 0, (dst_p0[dst_p0_Idx]).length - 1)], HEX5BHEX5D__pureZjson_u3153(jsonNode_p1, i_1593836195), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(orignalJsonPathLen_1593836190, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(orignalJsonPathLen_1593836190, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(orignalJsonPathLen_1593836190, 0, 2147483647); }; + i_2063599964 = addInt(i_2063599964, 1); + } + }; + }; + + +} + +function initFromJson__postlist_u661(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_2063598235 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,99,114,101,97,116,105,111,110]);; + initFromJson__threadlist_u522(dst_p0, "creation", getOrDefault__pureZjson_u3507(jsonNode_p1, [99,114,101,97,116,105,111,110]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598235, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598235, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598235, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,99,111,110,116,101,110,116]);; + initFromJson__pureZjson_u5295(dst_p0, "content", getOrDefault__pureZjson_u3507(jsonNode_p1, [99,111,110,116,101,110,116]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598235, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598235, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598235, 0, 2147483647); }; + + +} + +function initFromJson__postlist_u632(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet62[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym28_2063598217 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet63), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym28_2063598217, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if (dst_p0[dst_p0_Idx].length < (Temporary1 = chckRange(len__pureZjson_u3028(jsonNode_p1), 0, 2147483647), Temporary1)) { for (var i = dst_p0[dst_p0_Idx].length ; i < Temporary1 ; ++i) dst_p0[dst_p0_Idx].push(({creation: 0n, content: []})); } + else { dst_p0[dst_p0_Idx].length = Temporary1; }; + var orignalJsonPathLen_2063598223 = (jsonPath_p2[jsonPath_p2_Idx]).length; + Label2: { + var i_2063598228 = 0; + var colontmp__2063599967 = 0; + colontmp__2063599967 = len__pureZjson_u3028(jsonNode_p1); + var i_2063599968 = 0; + Label3: { + Label4: while (true) { + if (!(i_2063599968 < colontmp__2063599967)) break Label4; + i_2063598228 = i_2063599968; + addChar(jsonPath_p2[jsonPath_p2_Idx], 91);; + addInt__stdZprivateZdigitsutils_u241(jsonPath_p2, jsonPath_p2_Idx, i_2063598228); + addChar(jsonPath_p2[jsonPath_p2_Idx], 93);; + initFromJson__postlist_u661(dst_p0[dst_p0_Idx][chckIndx(i_2063598228, 0, (dst_p0[dst_p0_Idx]).length - 1)], HEX5BHEX5D__pureZjson_u3153(jsonNode_p1, i_2063598228), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(orignalJsonPathLen_2063598223, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(orignalJsonPathLen_2063598223, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(orignalJsonPathLen_2063598223, 0, 2147483647); }; + i_2063599968 = addInt(i_2063599968, 1); + } + }; + }; + + +} + +function initFromJson__postlist_u698(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet64[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym35_2063598283 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet65), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym35_2063598283, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if (dst_p0[dst_p0_Idx].length < (Temporary1 = chckRange(len__pureZjson_u3028(jsonNode_p1), 0, 2147483647), Temporary1)) { for (var i = dst_p0[dst_p0_Idx].length ; i < Temporary1 ; ++i) dst_p0[dst_p0_Idx].push(0); } + else { dst_p0[dst_p0_Idx].length = Temporary1; }; + var orignalJsonPathLen_2063598289 = (jsonPath_p2[jsonPath_p2_Idx]).length; + Label2: { + var i_2063598294 = 0; + var colontmp__2063599971 = 0; + colontmp__2063599971 = len__pureZjson_u3028(jsonNode_p1); + var i_2063599972 = 0; + Label3: { + Label4: while (true) { + if (!(i_2063599972 < colontmp__2063599971)) break Label4; + i_2063598294 = i_2063599972; + addChar(jsonPath_p2[jsonPath_p2_Idx], 91);; + addInt__stdZprivateZdigitsutils_u241(jsonPath_p2, jsonPath_p2_Idx, i_2063598294); + addChar(jsonPath_p2[jsonPath_p2_Idx], 93);; + initFromJson__addcategorymodal_u150(dst_p0[dst_p0_Idx], chckIndx(i_2063598294, 0, (dst_p0[dst_p0_Idx]).length - 1), HEX5BHEX5D__pureZjson_u3153(jsonNode_p1, i_2063598294), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(orignalJsonPathLen_2063598289, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(orignalJsonPathLen_2063598289, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(orignalJsonPathLen_2063598289, 0, 2147483647); }; + i_2063599972 = addInt(i_2063599972, 1); + } + }; + }; + + +} + +function some__postlist_u768(val_p0) { + var result_2063598339 = ({val: ({creation: 0n, topic: [], threadId: 0, postId: 0, author: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false})}), has: false}); + + result_2063598339 = nimCopy(result_2063598339, {has: true, val: nimCopy(null, val_p0, NTI2097152005)}, NTI2097152015); + + return result_2063598339; + +} + +function some__postbutton_u223(val_p0) { + var result_2147483874 = ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}); + + result_2147483874 = nimCopy(result_2147483874, {has: true, val: nimCopy(null, val_p0, NTI1929379844)}, NTI1929379857); + + return result_2147483874; + +} + +function isNone__user_u60(self_p0) { + var result_1929379903 = false; + + result_1929379903 = !(self_p0.has); + + return result_1929379903; + +} + +function get__postlist_u956(self_p0) { + var result_2063598527 = null; + + BeforeRet: { + if (isNone__user_u60(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2063598527 = self_p0.val; + break BeforeRet; + }; + + return result_2063598527; + +} + +function initFromJson__postlist_u929(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + if ((!(HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) && !((jsonNode_p1.kind == 0)))) { + dst_p0 = nimCopy(dst_p0, some__postbutton_u223(({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false})), NTI1929379857); + initFromJson__threadlist_u504(get__postlist_u956(dst_p0), jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx); + } + + + +} + +function initFromJson__postlist_u867(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_2063598441 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,99,114,101,97,116,105,111,110]);; + initFromJson__threadlist_u522(dst_p0, "creation", getOrDefault__pureZjson_u3507(jsonNode_p1, [99,114,101,97,116,105,111,110]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598441, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598441, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598441, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,116,111,112,105,99]);; + initFromJson__pureZjson_u5295(dst_p0, "topic", getOrDefault__pureZjson_u3507(jsonNode_p1, [116,111,112,105,99]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598441, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598441, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598441, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,116,104,114,101,97,100,73,100]);; + initFromJson__addcategorymodal_u150(dst_p0, "threadId", getOrDefault__pureZjson_u3507(jsonNode_p1, [116,104,114,101,97,100,73,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598441, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598441, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598441, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,112,111,115,116,73,100]);; + initFromJson__addcategorymodal_u150(dst_p0, "postId", getOrDefault__pureZjson_u3507(jsonNode_p1, [112,111,115,116,73,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598441, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598441, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598441, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,97,117,116,104,111,114]);; + initFromJson__postlist_u929(dst_p0.author, getOrDefault__pureZjson_u3507(jsonNode_p1, [97,117,116,104,111,114]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598441, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598441, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598441, 0, 2147483647); }; + + +} + +function isNone__postlist_u845(self_p0) { + var result_2063598416 = false; + + result_2063598416 = !(self_p0.has); + + return result_2063598416; + +} + +function get__postlist_u838(self_p0) { + var result_2063598409 = null; + + BeforeRet: { + if (isNone__postlist_u845(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2063598409 = self_p0.val; + break BeforeRet; + }; + + return result_2063598409; + +} + +function initFromJson__postlist_u753(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + if ((!(HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) && !((jsonNode_p1.kind == 0)))) { + dst_p0 = nimCopy(dst_p0, some__postlist_u768(({creation: 0n, topic: [], threadId: 0, postId: 0, author: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false})})), NTI2097152015); + initFromJson__postlist_u867(get__postlist_u838(dst_p0), jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx); + } + + + +} + +function initFromJson__postlist_u580(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_2063598154 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,105,100]);; + initFromJson__addcategorymodal_u150(dst_p0, "id", getOrDefault__pureZjson_u3507(jsonNode_p1, [105,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598154, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598154, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598154, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,97,117,116,104,111,114]);; + initFromJson__threadlist_u504(dst_p0.author, getOrDefault__pureZjson_u3507(jsonNode_p1, [97,117,116,104,111,114]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598154, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598154, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598154, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,108,105,107,101,115]);; + initFromJson__threadlist_u647(dst_p0, "likes", getOrDefault__pureZjson_u3507(jsonNode_p1, [108,105,107,101,115]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598154, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598154, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598154, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,115,101,101,110]);; + initFromJson__pureZjson_u5299(dst_p0, "seen", getOrDefault__pureZjson_u3507(jsonNode_p1, [115,101,101,110]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598154, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598154, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598154, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,104,105,115,116,111,114,121]);; + initFromJson__postlist_u632(dst_p0, "history", getOrDefault__pureZjson_u3507(jsonNode_p1, [104,105,115,116,111,114,121]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598154, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598154, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598154, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,105,110,102,111]);; + initFromJson__postlist_u661(dst_p0.info, getOrDefault__pureZjson_u3507(jsonNode_p1, [105,110,102,111]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598154, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598154, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598154, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,109,111,114,101,66,101,102,111,114,101]);; + initFromJson__postlist_u698(dst_p0, "moreBefore", getOrDefault__pureZjson_u3507(jsonNode_p1, [109,111,114,101,66,101,102,111,114,101]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598154, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598154, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598154, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,114,101,112,108,121,105,110,103,84,111]);; + initFromJson__postlist_u753(dst_p0.replyingTo, getOrDefault__pureZjson_u3507(jsonNode_p1, [114,101,112,108,121,105,110,103,84,111]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598154, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598154, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598154, 0, 2147483647); }; + + +} + +function initFromJson__postlist_u506(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet35[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym15_2063598091 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet36), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym15_2063598091, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if ((jsonNode_p1.kind == 0)) { + dst_p0[dst_p0_Idx] = null; + } + else { + dst_p0[dst_p0_Idx] = new__postlist_u529(); + initFromJson__postlist_u580(dst_p0[dst_p0_Idx], jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx); + } + + + +} + +function initFromJson__postlist_u477(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet28[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym11_2063598062 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet34), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym11_2063598062, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if (dst_p0[dst_p0_Idx].length < (Temporary1 = chckRange(len__pureZjson_u3028(jsonNode_p1), 0, 2147483647), Temporary1)) { for (var i = dst_p0[dst_p0_Idx].length ; i < Temporary1 ; ++i) dst_p0[dst_p0_Idx].push(null); } + else { dst_p0[dst_p0_Idx].length = Temporary1; }; + var orignalJsonPathLen_2063598068 = (jsonPath_p2[jsonPath_p2_Idx]).length; + Label2: { + var i_2063598073 = 0; + var colontmp__2063599934 = 0; + colontmp__2063599934 = len__pureZjson_u3028(jsonNode_p1); + var i_2063599935 = 0; + Label3: { + Label4: while (true) { + if (!(i_2063599935 < colontmp__2063599934)) break Label4; + i_2063598073 = i_2063599935; + addChar(jsonPath_p2[jsonPath_p2_Idx], 91);; + addInt__stdZprivateZdigitsutils_u241(jsonPath_p2, jsonPath_p2_Idx, i_2063598073); + addChar(jsonPath_p2[jsonPath_p2_Idx], 93);; + initFromJson__postlist_u506(dst_p0[dst_p0_Idx], chckIndx(i_2063598073, 0, (dst_p0[dst_p0_Idx]).length - 1), HEX5BHEX5D__pureZjson_u3153(jsonNode_p1, i_2063598073), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(orignalJsonPathLen_2063598068, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(orignalJsonPathLen_2063598068, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(orignalJsonPathLen_2063598068, 0, 2147483647); }; + i_2063599935 = addInt(i_2063599935, 1); + } + }; + }; + + +} + +function to__postlist_u1075(node_p0) { + var result_2063598648 = [[]]; + + var jsonPath_2063598649 = [[]]; + result_2063598648[0] = nimCopy(null, [], NTI2063598283); + initFromJson__postlist_u477(result_2063598648, 0, node_p0, jsonPath_2063598649, 0); + + return result_2063598648[0]; + +} + +function insert__postlist_u1135(x_p0, x_p0_Idx, item_p1, i_p2) { + var it_2063598728 = null; + x_p0[x_p0_Idx] = x_p0[x_p0_Idx] || []; x_p0[x_p0_Idx].splice(i_p2, 0, it_2063598728); + x_p0[x_p0_Idx][chckIndx(i_p2, 0, (x_p0[x_p0_Idx]).length - 1)] = item_p1; + + +} + +function isNone__postlist_u300(self_p0) { + var result_2063597871 = false; + + result_2063597871 = (self_p0.val == null); + + return result_2063597871; + +} + +function get__postlist_u293(self_p0) { + var result_2063597864 = null; + var result_2063597864_Idx = 0; + + BeforeRet: { + if (isNone__postlist_u300(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2063597864 = self_p0; result_2063597864_Idx = "val"; + break BeforeRet; + }; + + return [result_2063597864, result_2063597864_Idx]; + +} + +function find__postlist_u1230(a_p0, item_p1) { + var result_2063598803 = 0; + + BeforeRet: { + result_2063598803 = 0; + Label1: { + var i_2063598807 = 0; + var i_2063599976 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599976 < (a_p0).length)) break Label3; + i_2063598807 = a_p0[chckIndx(i_2063599976, 0, (a_p0).length - 1)]; + if ((i_2063598807 == item_p1)) { + break BeforeRet; + } + + result_2063598803 = addInt(result_2063598803, 1); + i_2063599976 += 1; + } + }; + }; + result_2063598803 = (-1); + }; + + return result_2063598803; + +} + +function contains__postlist_u1225(a_p0, item_p1) { + var result_2063598797 = false; + + BeforeRet: { + result_2063598797 = (0 <= find__postlist_u1230(a_p0, item_p1)); + break BeforeRet; + }; + + return result_2063598797; + +} + +function onMorePosts__postlist_u1070(httpStatus_p0, response_p1, start_p2) { + var Temporary4; + var Temporary5; + var Temporary6; + var Temporary7; + + BeforeRet: { + state_2063597821[0].loading = false; + state_2063597821[0].status = chckRange(httpStatus_p0, 0, 599); + if (!((state_2063597821[0].status == 200))) { + break BeforeRet; + } + + var parsed_2063598642 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var list_2063598676 = to__postlist_u1075(parsed_2063598642); + var idsLoaded_2063598681 = []; + Label1: { + var i_2063598690 = 0; + var colontmp__2063599914 = 0; + colontmp__2063599914 = (list_2063598676).length; + var i_2063599915 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599915 < colontmp__2063599914)) break Label3; + i_2063598690 = i_2063599915; + insert__postlist_u1135((Temporary4 = get__postlist_u293(state_2063597821[0].list), Temporary4)[0][Temporary4[1]], "posts", list_2063598676[chckIndx(i_2063598690, 0, (list_2063598676).length - 1)], chckRange(addInt(i_2063598690, start_p2), 0, 2147483647)); + idsLoaded_2063598681.push(list_2063598676[chckIndx(i_2063598690, 0, (list_2063598676).length - 1)].id);; + i_2063599915 = addInt(i_2063599915, 1); + } + }; + }; + var postIndex_2063598736 = addInt(start_p2, (list_2063598676).length); + if ((postIndex_2063598736 < ((Temporary5 = get__postlist_u293(state_2063597821[0].list), Temporary5)[0][Temporary5[1]].posts).length)) { + var post_2063598764 = (Temporary7 = (Temporary6 = get__postlist_u293(state_2063597821[0].list), Temporary6)[0][Temporary6[1]].posts, Temporary7)[chckIndx(postIndex_2063598736, 0, (Temporary7).length - 1)]; + var newPostIds_2063598769 = []; + Label8: { + var id_2063598792 = 0; + var i_2063599919 = 0; + var L_2063599920 = (post_2063598764.moreBefore).length; + Label9: { + Label10: while (true) { + if (!(i_2063599919 < L_2063599920)) break Label10; + id_2063598792 = post_2063598764.moreBefore[chckIndx(i_2063599919, 0, (post_2063598764.moreBefore).length - 1)]; + if (!(contains__postlist_u1225(idsLoaded_2063598681, id_2063598792))) { + newPostIds_2063598769.push(id_2063598792);; + } + + i_2063599919 += 1; + if (!(((post_2063598764.moreBefore).length == L_2063599920))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + post_2063598764.moreBefore = nimCopy(null, newPostIds_2063598769, NTI2063598374); + } + + }; + + +} + +function loadMore__postlist_u1281(start_p0, ids_p1) { + +function HEX3Aanonymous__postlist_u1297(s_p0, r_p1) { + onMorePosts__postlist_u1070(s_p0, r_p1, start_p0); + + + } + + BeforeRet: { + if (state_2063597821[0].loading) { + break BeforeRet; + } + + state_2063597821[0].loading = true; + var uri_2063598860 = makeUri__karaxutils_u123([115,112,101,99,105,102,105,99,95,112,111,115,116,115,46,106,115,111,110], [nimCopy(null, {Field0: [105,100,115], Field1: HEX24__pureZjson_u4450(HEX25__postlist_u1284(ids_p1))}, NTI2063598432)], [47], false, true); + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(uri_2063598860), [], HEX3Aanonymous__postlist_u1297, true, kxi__); + }; + + +} + +function onReplyPosted__postlist_u57(id_p0) { + var Temporary1; + + loadMore__postlist_u1281(((Temporary1 = get__postlist_u293(state_2063597821[0].list), Temporary1)[0][Temporary1[1]].posts).length, [id_p0]); + + +} + +function newEditBox__editbox_u39(onEditPosted_p0, onEditCancel_p1) { + var result_2130706475 = null; + + result_2130706475 = {box: newReplyBox__replybox_u39(null), onEditPosted: onEditPosted_p0, onEditCancel: onEditCancel_p1, status: 200, post: null, rawContent: ({val: null, has: false}), loading: false, error: ({val: ({errorFields: [], message: []}), has: false})}; + + return result_2130706475; + +} + +function toUnix__pureZtimes_u1196(t_p0) { + var result_1627391150 = 0n; + + result_1627391150 = t_p0.seconds; + + return result_1627391150; + +} + +function checkOverflowInt64(a_p0) { + if (a_p0 > 9223372036854775807n || a_p0 < -9223372036854775808n) raiseOverflow(); + + + +} + +function convert__pureZtimes_u567(unitFrom_p0, unitTo_p1, quantity_p2) { + var Temporary1; + + var result_1627390524 = 0; + + if ((unitFrom_p0 < unitTo_p1)) { + Temporary1 = chckRange(Number(divInt64(BigInt(quantity_p2), divInt64(unitWeights_1627390063[chckIndx(unitTo_p1, 0, (unitWeights_1627390063).length - 1)], unitWeights_1627390063[chckIndx(unitFrom_p0, 0, (unitWeights_1627390063).length - 1)]))), (-2147483648), 2147483647); + } + else { + Temporary1 = chckRange(Number(mulInt64(divInt64(unitWeights_1627390063[chckIndx(unitFrom_p0, 0, (unitWeights_1627390063).length - 1)], unitWeights_1627390063[chckIndx(unitTo_p1, 0, (unitWeights_1627390063).length - 1)]), BigInt(quantity_p2))), (-2147483648), 2147483647); + } + + result_1627390524 = Temporary1; + + return result_1627390524; + +} + +function initTime__pureZtimes_u1169(unix_p0, nanosecond_p1) { + var result_1627391124 = ({seconds: 0n, nanosecond: 0}); + + result_1627391124 = nimCopy(result_1627391124, {seconds: unix_p0, nanosecond: nimCopy(null, nanosecond_p1, NTI1627389967)}, NTI1627389970); + + return result_1627391124; + +} + +function getTime__pureZtimes_u1247() { + var result_1627391200 = ({seconds: 0n, nanosecond: 0}); + + var millis_1627391205 = new Date().getTime(); + var seconds_1627391211 = convert__pureZtimes_u567(2, 3, millis_1627391205); + var nanos_1627391222 = convert__pureZtimes_u567(2, 0, modInt(millis_1627391205, convert__pureZtimes_u567(3, 2, 1))); + result_1627391200 = nimCopy(result_1627391200, initTime__pureZtimes_u1169(BigInt(seconds_1627391211), chckRange(nanos_1627391222, 0, 999999999)), NTI1627389970); + + return result_1627391200; + +} + +function onEditPosted__postlist_u62(id_p0, content_p1, subject_p2) { + var Temporary1; + + state_2063597821[0].editing = nimCopy(state_2063597821[0].editing, none__editbox_u323(), NTI2113929478); + var list_2063598952 = (Temporary1 = get__postlist_u293(state_2063597821[0].list), Temporary1)[0][Temporary1[1]]; + Label2: { + var i_2063598960 = 0; + var colontmp__2063599979 = 0; + colontmp__2063599979 = (list_2063598952.posts).length; + var i_2063599980 = 0; + Label3: { + Label4: while (true) { + if (!(i_2063599980 < colontmp__2063599979)) break Label4; + i_2063598960 = i_2063599980; + if ((list_2063598952.posts[chckIndx(i_2063598960, 0, (list_2063598952.posts).length - 1)].id == id_p0)) { + list_2063598952.posts[chckIndx(i_2063598960, 0, (list_2063598952.posts).length - 1)].history.push({creation: toUnix__pureZtimes_u1196(getTime__pureZtimes_u1247()), content: nimCopy(null, content_p1, NTI33554449)});; + break Label2; + } + + i_2063599980 = addInt(i_2063599980, 1); + } + }; + }; + + +} + +function onEditCancelled__postlist_u67() { + state_2063597821[0].editing = nimCopy(state_2063597821[0].editing, none__editbox_u323(), NTI2113929478); + + +} + +function newLikeButton__postbutton_u176() { + var result_2147483825 = null; + + result_2147483825 = {error: ({val: ({errorFields: [], message: []}), has: false}), loading: false}; + + return result_2147483825; + +} + +function newDeleteModal__delete_u114(onDeletePost_p0, onDeleteThread_p1, onDeleteUser_p2) { + var result_2164260988 = null; + + result_2164260988 = {shown: false, onDeletePost: onDeletePost_p0, onDeleteThread: onDeleteThread_p1, onDeleteUser: onDeleteUser_p2, loading: false, error: ({val: ({errorFields: [], message: []}), has: false}), kind: 0, user: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), post: null, thread: ({id: 0, topic: [], category: ({id: 0, name: [], description: [], color: [], numTopics: 0}), author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), users: [], replies: 0, views: 0, activity: 0n, creation: 0n, isLocked: false, isSolved: false, isPinned: false})}; + + return result_2164260988; + +} + +function keepIf__postlist_u1442(s_p0, s_p0_Idx, pred_p1) { + var pos_2063599015 = 0; + Label1: { + var i_2063599023 = 0; + var colontmp__2063599983 = 0; + colontmp__2063599983 = (s_p0[s_p0_Idx]).length; + var i_2063599984 = 0; + Label2: { + Label3: while (true) { + if (!(i_2063599984 < colontmp__2063599983)) break Label3; + i_2063599023 = i_2063599984; + if (pred_p1(s_p0[s_p0_Idx][chckIndx(i_2063599023, 0, (s_p0[s_p0_Idx]).length - 1)])) { + if (!((pos_2063599015 == i_2063599023))) { + s_p0[s_p0_Idx][chckIndx(pos_2063599015, 0, (s_p0[s_p0_Idx]).length - 1)] = s_p0[s_p0_Idx][chckIndx(i_2063599023, 0, (s_p0[s_p0_Idx]).length - 1)]; + } + + pos_2063599015 += 1; + } + + i_2063599984 = addInt(i_2063599984, 1); + } + }; + }; + if (s_p0[s_p0_Idx].length < chckRange(pos_2063599015, 0, 2147483647)) { for (var i = s_p0[s_p0_Idx].length ; i < chckRange(pos_2063599015, 0, 2147483647) ; ++i) s_p0[s_p0_Idx].push(null); } + else { s_p0[s_p0_Idx].length = chckRange(pos_2063599015, 0, 2147483647); }; + + +} + +function onDeletePost__postlist_u68(post_p0) { + var Temporary1; + +function HEX3Aanonymous__postlist_u1434(x_p0) { + var result_2063599009 = false; + + result_2063599009 = !((x_p0.id == post_p0.id)); + + return result_2063599009; + + } + + keepIf__postlist_u1442((Temporary1 = get__postlist_u293(state_2063597821[0].list), Temporary1)[0][Temporary1[1]], "posts", HEX3Aanonymous__postlist_u1434); + + +} + +function onDeleteThread__postlist_u70(thread_p0) { + window.location.href = toJSStr(makeUri__karaxutils_u123([47], [], [47], false, true)); + + +} + +function newLockButton__postbutton_u526() { + var result_2147484175 = null; + + result_2147484175 = {error: ({val: ({errorFields: [], message: []}), has: false}), loading: false}; + + return result_2147484175; + +} + +function newPinButton__postbutton_u702() { + var result_2147484351 = null; + + result_2147484351 = {error: ({val: ({errorFields: [], message: []}), has: false}), loading: false}; + + return result_2147484351; + +} + +function ajaxPost__pkgZkaraxZkajax_u195(url_p0, headers_p1, data_p2, cont_p3, doRedraw_p4, kxi_p5) { + ajax__pkgZkaraxZkajax_u171("POST", url_p0, headers_p1, data_p2, cont_p3, doRedraw_p4, kxi_p5, false, null); + + +} + +function initFromJson__addcategorymodal_u238(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet66[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym14_1996488959 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet67), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym14_1996488959, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if (dst_p0[dst_p0_Idx].length < (Temporary1 = chckRange(len__pureZjson_u3028(jsonNode_p1), 0, 2147483647), Temporary1)) { for (var i = dst_p0[dst_p0_Idx].length ; i < Temporary1 ; ++i) dst_p0[dst_p0_Idx].push([]); } + else { dst_p0[dst_p0_Idx].length = Temporary1; }; + var orignalJsonPathLen_1996488965 = (jsonPath_p2[jsonPath_p2_Idx]).length; + Label2: { + var i_1996488970 = 0; + var colontmp__2063599987 = 0; + colontmp__2063599987 = len__pureZjson_u3028(jsonNode_p1); + var i_2063599988 = 0; + Label3: { + Label4: while (true) { + if (!(i_2063599988 < colontmp__2063599987)) break Label4; + i_1996488970 = i_2063599988; + addChar(jsonPath_p2[jsonPath_p2_Idx], 91);; + addInt__stdZprivateZdigitsutils_u241(jsonPath_p2, jsonPath_p2_Idx, i_1996488970); + addChar(jsonPath_p2[jsonPath_p2_Idx], 93);; + initFromJson__pureZjson_u5295(dst_p0[dst_p0_Idx], chckIndx(i_1996488970, 0, (dst_p0[dst_p0_Idx]).length - 1), HEX5BHEX5D__pureZjson_u3153(jsonNode_p1, i_1996488970), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(orignalJsonPathLen_1996488965, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(orignalJsonPathLen_1996488965, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(orignalJsonPathLen_1996488965, 0, 2147483647); }; + i_2063599988 = addInt(i_2063599988, 1); + } + }; + }; + + +} + +function initFromJson__addcategorymodal_u227(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_1996488937 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,101,114,114,111,114,70,105,101,108,100,115]);; + initFromJson__addcategorymodal_u238(dst_p0, "errorFields", getOrDefault__pureZjson_u3507(jsonNode_p1, [101,114,114,111,114,70,105,101,108,100,115]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1996488937, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1996488937, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1996488937, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,109,101,115,115,97,103,101]);; + initFromJson__pureZjson_u5295(dst_p0, "message", getOrDefault__pureZjson_u3507(jsonNode_p1, [109,101,115,115,97,103,101]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1996488937, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1996488937, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1996488937, 0, 2147483647); }; + + +} + +function to__addcategorymodal_u215(node_p0) { + var result_1996488924 = [({errorFields: [], message: []})]; + + var jsonPath_1996488925 = [[]]; + result_1996488924[0] = nimCopy(result_1996488924[0], ({errorFields: [], message: []}), NTI1946157059); + initFromJson__addcategorymodal_u227(result_1996488924[0], node_p0, jsonPath_1996488925, 0); + + return result_1996488924[0]; + +} + +function some__addcategorymodal_u274(val_p0) { + var result_1996488981 = ({val: ({errorFields: [], message: []}), has: false}); + + result_1996488981 = nimCopy(result_1996488981, {has: true, val: nimCopy(null, val_p0, NTI1946157059)}, NTI1946157155); + + return result_1996488981; + +} + +function getCurrentExceptionMsg__system_u2067() { + var result_33556500 = []; + + BeforeRet: { + if (!((lastJSError == null))) { + if (isNimException__system_u2047()) { + result_33556500 = nimCopy(null, lastJSError.message, NTI33554449); + break BeforeRet; + } + else { + var msg_33556505 = null; + if (lastJSError.message !== undefined) { + msg_33556505 = lastJSError.message; + } + + if (!((msg_33556505 == null))) { + result_33556500 = nimCopy(null, cstrToNimstr(msg_33556505), NTI33554449); + break BeforeRet; + } + + } + + } + + result_33556500 = nimCopy(null, [], NTI33554449); + break BeforeRet; + }; + + return result_33556500; + +} + +function onCategoryPost__postlist_u254(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + state_p2.loading = false; + var statusHEX60gensym0_2063597829 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym0_2063597829 == 200)) { + } + else { +++excHandler; + try { + var parsedHEX60gensym0_2063597830 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym0_2063597836 = to__addcategorymodal_u215(parsedHEX60gensym0_2063597830); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym0_2063597836), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onCategoryChanged__postlist_u59(oldCategory_p0, newCategory_p1) { + var Temporary1; + +function HEX3Aanonymous__postlist_u333(s_p0, r_p1) { + onCategoryPost__postlist_u254(s_p0, r_p1, state_2063597821[0]); + + + } + + var uri_2063597850 = makeUri__karaxutils_u123([47,117,112,100,97,116,101,84,104,114,101,97,100], [], [47], false, true); + var formData_2063597851 = new FormData(); + formData_2063597851.append("threadId", toJSStr(HEX24__systemZdollars_u14((Temporary1 = get__postlist_u293(state_2063597821[0].list), Temporary1)[0][Temporary1[1]].thread.id))); + formData_2063597851.append("category", toJSStr(HEX24__systemZdollars_u14(newCategory_p1.id))); + state_2063597821[0].loading = true; + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2063597850), [], (formData_2063597851), HEX3Aanonymous__postlist_u333, true, kxi__); + + +} + +function newState__postlist_u72() { + var result_2063597641 = null; + + result_2063597641 = {list: none__postlist_u86(), loading: false, status: 200, error: none__addcategorymodal_u322(), replyingTo: none__editbox_u323(), replyBox: newReplyBox__replybox_u39(onReplyPosted__postlist_u57), editBox: newEditBox__editbox_u39(onEditPosted__postlist_u62, onEditCancelled__postlist_u67), likeButton: newLikeButton__postbutton_u176(), deleteModal: newDeleteModal__delete_u114(onDeletePost__postlist_u68, onDeleteThread__postlist_u70, null), lockButton: newLockButton__postbutton_u526(), pinButton: newPinButton__postbutton_u702(), categoryPicker: newCategoryPicker__categorypicker_u609(onCategoryChanged__postlist_u59, nullAddCategory_1979712039), editing: ({val: null})}; + + return result_2063597641; + +} +var state_2063597821 = [newState__postlist_u72()]; + +function none__header_u61() { + var result_2181038148 = ({val: ({user: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}), recaptchaSiteKey: ({val: [], has: false})}), has: false}); + + result_2181038148 = nimCopy(result_2181038148, {val: ({user: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}), recaptchaSiteKey: ({val: [], has: false})}), has: false}, NTI2181038135); + + return result_2181038148; + +} + +function none__header_u58() { + var result_2181038140 = ({val: ({user: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}), recaptchaSiteKey: ({val: [], has: false})}), has: false}); + + result_2181038140 = nimCopy(result_2181038140, none__header_u61(), NTI2181038097); + + return result_2181038140; + +} + +function newResetPasswordModal__resetpassword_u231() { + var result_2214592744 = null; + + result_2214592744 = {shown: false, loading: false, error: ({val: ({errorFields: [], message: []}), has: false}), sent: false}; + + return result_2214592744; + +} + +function newLoginModal__login_u94(onLogIn_p0, onSignUp_p1) { + var result_2197815394 = null; + + result_2197815394 = {shown: false, onLogIn: onLogIn_p0, onSignUp: onSignUp_p1, resetPasswordModal: newResetPasswordModal__resetpassword_u231(), loading: false, error: ({val: ({errorFields: [], message: []}), has: false})}; + + return result_2197815394; + +} + +function fromUnix__pureZtimes_u1193(unix_p0) { + var result_1627391147 = ({seconds: 0n, nanosecond: 0}); + + result_1627391147 = nimCopy(result_1627391147, initTime__pureZtimes_u1169(unix_p0, 0), NTI1627389970); + + return result_1627391147; + +} + +function convert__pureZtimes_u471(unitFrom_p0, unitTo_p1, quantity_p2) { + var Temporary1; + + var result_1627390428 = 0n; + + if ((unitFrom_p0 < unitTo_p1)) { + Temporary1 = divInt64(quantity_p2, divInt64(unitWeights_1627390063[chckIndx(unitTo_p1, 0, (unitWeights_1627390063).length - 1)], unitWeights_1627390063[chckIndx(unitFrom_p0, 0, (unitWeights_1627390063).length - 1)])); + } + else { + Temporary1 = mulInt64(divInt64(unitWeights_1627390063[chckIndx(unitFrom_p0, 0, (unitWeights_1627390063).length - 1)], unitWeights_1627390063[chckIndx(unitTo_p1, 0, (unitWeights_1627390063).length - 1)]), quantity_p2); + } + + result_1627390428 = Temporary1; + + return result_1627390428; + +} + +function normalize__pureZtimes_u552(seconds_p0, nanoseconds_p1) { + var result_1627390508 = ({seconds: 0n, nanosecond: 0}); + + result_1627390508 = nimCopy(result_1627390508, ({seconds: 0n, nanosecond: 0}), NTI1627389972); + result_1627390508.seconds = addInt64(seconds_p0, convert__pureZtimes_u471(0, 3, nanoseconds_p1)); + var nanosecond_1627390529 = modInt64(nanoseconds_p1, BigInt(convert__pureZtimes_u567(3, 0, 1))); + if ((nanosecond_1627390529 < 0n)) { + nanosecond_1627390529 = addInt64(nanosecond_1627390529, BigInt(BigInt(convert__pureZtimes_u567(3, 0, 1)))); + result_1627390508.seconds = subInt64(result_1627390508.seconds, BigInt(1n)); + } + + result_1627390508.nanosecond = chckRange(chckRange(Number(nanosecond_1627390529), (-2147483648), 2147483647), 0, 999999999); + + return result_1627390508; + +} + +function ntDiffTime(a_p0, b_p1) { + var result_1627391242 = ({seconds: 0n, nanosecond: 0}); + + result_1627391242 = nimCopy(result_1627391242, normalize__pureZtimes_u552(subInt64(a_p0.seconds, b_p1.seconds), BigInt(subInt(a_p0.nanosecond, b_p1.nanosecond))), NTI1627389972); + + return result_1627391242; + +} + +function inMinutes__pureZtimes_u728(dur_p0) { + var result_1627390682 = 0n; + + var correctionHEX60gensym23_1627390689 = ((dur_p0.seconds < 0n) && (0 < dur_p0.nanosecond)); + result_1627390682 = convert__pureZtimes_u471(3, 4, addInt64(dur_p0.seconds, BigInt((correctionHEX60gensym23_1627390689 ? 1 : 0)))); + + return result_1627390682; + +} + +function some__header_u325(val_p0) { + var result_2181038408 = ({val: ({user: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}), recaptchaSiteKey: ({val: [], has: false})}), has: false}); + + result_2181038408 = nimCopy(result_2181038408, {has: true, val: nimCopy(null, val_p0, NTI2181038083)}, NTI2181038097); + + return result_2181038408; + +} + +function some__header_u253(val_p0) { + var result_2181038336 = ({val: [], has: false}); + + result_2181038336 = nimCopy(result_2181038336, {has: true, val: nimCopy(null, val_p0, NTI33554449)}, NTI2097152105); + + return result_2181038336; + +} + +function isNone__resetpassword_u334(self_p0) { + var result_2214592849 = false; + + result_2214592849 = !(self_p0.has); + + return result_2214592849; + +} + +function get__header_u268(self_p0) { + var result_2181038351 = null; + var result_2181038351_Idx = 0; + + BeforeRet: { + if (isNone__resetpassword_u334(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2181038351 = self_p0; result_2181038351_Idx = "val"; + break BeforeRet; + }; + + return [result_2181038351, result_2181038351_Idx]; + +} + +function initFromJson__header_u239(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if ((!(HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) && !((jsonNode_p1.kind == 0)))) { + dst_p0 = nimCopy(dst_p0, some__header_u253([]), NTI2097152105); + initFromJson__pureZjson_u5295((Temporary1 = get__header_u268(dst_p0), Temporary1)[0], Temporary1[1], jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx); + } + + + +} + +function initFromJson__header_u172(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_2181038258 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,117,115,101,114]);; + initFromJson__postlist_u929(dst_p0.user, getOrDefault__pureZjson_u3507(jsonNode_p1, [117,115,101,114]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2181038258, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2181038258, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2181038258, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,114,101,99,97,112,116,99,104,97,83,105,116,101,75,101,121]);; + initFromJson__header_u239(dst_p0.recaptchaSiteKey, getOrDefault__pureZjson_u3507(jsonNode_p1, [114,101,99,97,112,116,99,104,97,83,105,116,101,75,101,121]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2181038258, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2181038258, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2181038258, 0, 2147483647); }; + + +} + +function to__header_u160(node_p0) { + var result_2181038245 = [({user: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}), recaptchaSiteKey: ({val: [], has: false})})]; + + var jsonPath_2181038246 = [[]]; + result_2181038245[0] = nimCopy(result_2181038245[0], ({user: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}), recaptchaSiteKey: ({val: [], has: false})}), NTI2181038083); + initFromJson__header_u172(result_2181038245[0], node_p0, jsonPath_2181038246, 0); + + return result_2181038245[0]; + +} + +function onStatus__header_u156(httpStatus_p0, response_p1) { + BeforeRet: { + state_2181038120[0].loading = false; + state_2181038120[0].status = chckRange(httpStatus_p0, 0, 599); + if (!((state_2181038120[0].status == 200))) { + break BeforeRet; + } + + var parsed_2181038239 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + state_2181038120[0].data = nimCopy(state_2181038120[0].data, some__header_u325(to__header_u160(parsed_2181038239)), NTI2181038097); + state_2181038120[0].lastUpdate = nimCopy(state_2181038120[0].lastUpdate, getTime__pureZtimes_u1247(), NTI1627389970); + }; + + +} + +function getStatus__header_u41(logout_p0) { + BeforeRet: { + if (state_2181038120[0].loading) { + break BeforeRet; + } + + var diff_2181038413 = ntDiffTime(getTime__pureZtimes_u1247(), state_2181038120[0].lastUpdate); + if ((inMinutes__pureZtimes_u728(diff_2181038413) < 5n)) { + break BeforeRet; + } + + state_2181038120[0].loading = true; + var uri_2181038414 = makeUri__karaxutils_u123([115,116,97,116,117,115,46,106,115,111,110], [nimCopy(null, {Field0: [108,111,103,111,117,116], Field1: nimBoolToStr(logout_p0)}, NTI2181038306)], [47], false, true); + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(uri_2181038414), [], onStatus__header_u156, true, kxi__); + }; + + +} + +function show__signup_u132(state_p0) { + state_p0.shown = true; + + +} + +function newSignupModal__signup_u91(onSignUp_p0, onLogIn_p1) { + var result_2281701471 = null; + + result_2281701471 = {shown: false, onLogIn: onLogIn_p1, onSignUp: onSignUp_p0, loading: false, error: ({val: ({errorFields: [], message: []}), has: false})}; + + return result_2281701471; + +} + +function show__login_u136(state_p0) { + state_p0.shown = true; + + +} + +function newUserMenu__usermenu_u17(onLogout_p0) { + var result_2298478612 = null; + + result_2298478612 = {shown: false, onLogout: onLogout_p0, user: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false})}; + + return result_2298478612; + +} + +function newState__header_u39() { + +function HEX3Aanonymous__header_u97() { + state_2181038120[0].lastUpdate = nimCopy(state_2181038120[0].lastUpdate, fromUnix__pureZtimes_u1193(0n), NTI1627389970); + getStatus__header_u41(false); + + + } + +function HEX3Aanonymous__header_u99() { + show__signup_u132(state_2181038120[0].signupModal); + + + } + +function HEX3Aanonymous__header_u101() { + state_2181038120[0].lastUpdate = nimCopy(state_2181038120[0].lastUpdate, fromUnix__pureZtimes_u1193(0n), NTI1627389970); + getStatus__header_u41(false); + + + } + +function HEX3Aanonymous__header_u103() { + show__login_u136(state_2181038120[0].loginModal); + + + } + +function HEX3Aanonymous__header_u105() { + state_2181038120[0].lastUpdate = nimCopy(state_2181038120[0].lastUpdate, fromUnix__pureZtimes_u1193(0n), NTI1627389970); + getStatus__header_u41(true); + + + } + + var result_2181038124 = null; + + result_2181038124 = {data: none__header_u58(), loading: false, status: 200, loginModal: newLoginModal__login_u94(HEX3Aanonymous__header_u97, HEX3Aanonymous__header_u99), signupModal: newSignupModal__signup_u91(HEX3Aanonymous__header_u101, HEX3Aanonymous__header_u103), userMenu: newUserMenu__usermenu_u17(HEX3Aanonymous__header_u105), lastUpdate: ({seconds: 0n, nanosecond: 0})}; + + return result_2181038124; + +} +var state_2181038120 = [newState__header_u39()]; + +function newState__categorylist_u28() { + +function HEX3Aanonymous__categorylist_u44(category_p0) { + var Temporary1; + + var Temporary2 = nimCopy(null, category_p0, NTI1845493763); + (Temporary1 = get__categorypicker_u341(state_2382364699[0].list), Temporary1)[0][Temporary1[1]].categories.push(Temporary2);; + + + } + + var result_2382364701 = null; + + result_2382364701 = {list: none__categorypicker_u625(), loading: false, mainButtons: newMainButtons__mainbuttons_u29(onSelectedCategoryChanged__mainbuttons_u21), status: 200, addCategoryModal: newAddCategoryModal__addcategorymodal_u31(HEX3Aanonymous__categorylist_u44)}; + + return result_2382364701; + +} +var state_2382364699 = [null]; +state_2382364699[0] = newState__categorylist_u28(); + +function copyLocation__forum_u36(loc_p0) { + var result_637534246 = null; + + result_637534246 = {hash: loc_p0.hash, host: loc_p0.host, hostname: loc_p0.hostname, href: loc_p0.href, pathname: loc_p0.pathname, port: loc_p0.port, protocol: loc_p0.protocol, search: loc_p0.search, m_type: NTI1325400233, origin: null}; + + return result_637534246; + +} + +function newProfileState__profile_u44() { + var result_2315255853 = null; + + result_2315255853 = {loading: false, status: 200, currentTab: 0, profile: ({val: ({user: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), joinTime: 0n, threads: [], posts: [], postCount: 0, threadCount: 0, email: ({val: [], has: false})}), has: false}), settings: ({val: null})}; + + return result_2315255853; + +} + +function newNewThread__newthread_u30() { + var result_2348810271 = null; + + result_2348810271 = {replyBox: newReplyBox__replybox_u39(null), subject: "", categoryPicker: newCategoryPicker__categorypicker_u609(nullCategoryChange_1979712043, nullAddCategory_1979712039), loading: false, error: ({val: ({errorFields: [], message: []}), has: false})}; + + return result_2348810271; + +} + +function newAbout__about_u19() { + var result_2365587476 = null; + + result_2365587476 = {status: 200, loading: false, content: null, page: []}; + + return result_2365587476; + +} + +function newResetPassword__resetpassword_u25() { + var result_2214592538 = null; + + result_2214592538 = {status: 200, newPassword: "", loading: false, error: ({val: ({errorFields: [], message: []}), has: false})}; + + return result_2214592538; + +} + +function newActivateEmail__activateemail_u22() { + var result_2399141911 = null; + + result_2399141911 = {status: 200, loading: false, error: ({val: ({errorFields: [], message: []}), has: false})}; + + return result_2399141911; + +} + +function none__search_u68() { + var result_2415919179 = ({val: [], has: false}); + + result_2415919179 = nimCopy(result_2415919179, {val: [], has: false}, NTI2415919159); + + return result_2415919179; + +} + +function none__search_u65() { + var result_2415919171 = ({val: [], has: false}); + + result_2415919171 = nimCopy(result_2415919171, none__search_u68(), NTI2415919121); + + return result_2415919171; + +} + +function newSearch__search_u50() { + var result_2415919155 = null; + + result_2415919155 = {list: none__search_u65(), loading: false, status: 200, query: []}; + + return result_2415919155; + +} + +function newState__forum_u79() { + var result_637534288 = null; + + result_637534288 = {originalTitle: document.title, url: copyLocation__forum_u36(window.location), profile: newProfileState__profile_u44(), newThread: newNewThread__newthread_u30(), about: newAbout__about_u19(), resetPassword: newResetPassword__resetpassword_u25(), activateEmail: newActivateEmail__activateemail_u22(), search: newSearch__search_u50()}; + + return result_637534288; + +} + +function onPopState__forum_u121(event_p0) { + rawEcho([78,101,119,32,85,82,76,58,32], cstrToNimstr(window.location.href), [32], cstrToNimstr(state_637534328[0].url.href)); + document.title = state_637534328[0].originalTitle; + if (!((state_637534328[0].url.href == window.location.href))) { + state_637534328[0] = newState__forum_u79(); + } + + state_637534328[0].url = copyLocation__forum_u36(window.location); + redraw__pkgZkaraxZkarax_u1484(kxi__); + + +} + +function newSeq__pkgZkaraxZkarax_u1553(len_p0) { + var result_1375733269 = []; + + result_1375733269 = new Array(len_p0); for (var i = 0 ; i < len_p0 ; ++i) { result_1375733269[i] = ({k: 0, parent: null, current: null, newNode: null, oldNode: null}); } + return result_1375733269; + +} + +function newSeq__pkgZkaraxZkarax_u1594(len_p0) { + var result_1375733310 = []; + + result_1375733310 = new Array(len_p0); for (var i = 0 ; i < len_p0 ; ++i) { result_1375733310[i] = ({parent: null, newChild: null, pos: 0}); } + return result_1375733310; + +} + +function init__pkgZkaraxZkarax_u1489(ev_p0) { + +function HEX3Aanonymous__pkgZkaraxZkarax_u1491() { + dodraw__pkgZkaraxZkarax_u1422(kxi__); + + + } + + kxi__.renderId = window.requestAnimationFrame(HEX3Aanonymous__pkgZkaraxZkarax_u1491); + + +} + +function setRenderer__pkgZkaraxZkarax_u1523(renderer_p0, root_p1, clientPostRenderCallback_p2) { + +function HEX3Aanonymous__pkgZkaraxZkarax_u1647() { + redraw__pkgZkaraxZkarax_u1484(kxi__); + + + } + + var result_1375733243 = null; + + if ((document.getElementById(root_p1) == null)) { + var msg_1375733247 = (("Could not find a
with id=" + root_p1) + ". Karax needs it as its rendering target."); + raiseException({message: cstrToNimstr(msg_1375733247), parent: null, m_type: NTI33555183, name: null, trace: [], up: null}, "Exception"); + } + + result_1375733243 = {rootId: root_p1, renderer: renderer_p0, postRenderCallback: clientPostRenderCallback_p2, patches: newSeq__pkgZkaraxZkarax_u1553(60), patchesV: newSeq__pkgZkaraxZkarax_u1594(30), components: [], surpressRedraws: false, byId: {}, orphans: {}, currentTree: null, toFocus: null, toFocusV: null, renderId: 0, rendering: false, patchLen: 0, patchLenV: 0, runCount: 0}; + kxi__ = result_1375733243; + window.addEventListener("load", init__pkgZkaraxZkarax_u1489, false); + window.onhashchange = HEX3Aanonymous__pkgZkaraxZkarax_u1647; + + return result_1375733243; + +} + +function setRenderer__pkgZkaraxZkarax_u1804(renderer_p0, root_p1, clientPostRenderCallback_p2) { + +function wrapRenderer__pkgZkaraxZkarax_u1811(data_p0) { + var result_1375733525 = null; + + result_1375733525 = renderer_p0(); + + return result_1375733525; + + } + +function wrapPostRender__pkgZkaraxZkarax_u1814(data_p0) { + if (!(cmpClosures(clientPostRenderCallback_p2, null))) { + clientPostRenderCallback_p2(); + } + + + + } + + var result_1375733522 = null; + + result_1375733522 = setRenderer__pkgZkaraxZkarax_u1523(wrapRenderer__pkgZkaraxZkarax_u1811, root_p1, wrapPostRender__pkgZkaraxZkarax_u1814); + + return result_1375733522; + +} + +function newVNode__pkgZkaraxZvdom_u877(kind_p0) { + var result_1409287023 = null; + + result_1409287023 = {kind: kind_p0, index: (-1), m_type: NTI1409286247, id: null, class: null, text: null, kids: [], attrs: [], events: [], style: null, dom: null}; + + return result_1409287023; + +} + +function add__pkgZkaraxZvdom_u794(parent_p0, kid_p1) { + parent_p0.kids.push(kid_p1);; + + +} + +function tree__pkgZkaraxZvdom_u880(kind_p0, kids_p1) { + var result_1409287027 = null; + + result_1409287027 = newVNode__pkgZkaraxZvdom_u877(kind_p0); + Label1: { + var k_1409287040 = null; + var i_637534927 = 0; + Label2: { + Label3: while (true) { + if (!(i_637534927 < (kids_p1).length)) break Label3; + k_1409287040 = kids_p1[chckIndx(i_637534927, 0, (kids_p1).length - 1)]; + add__pkgZkaraxZvdom_u794(result_1409287027, k_1409287040); + i_637534927 += 1; + } + }; + }; + + return result_1409287027; + +} + +function isNone__header_u490(self_p0) { + var result_2181038573 = false; + + result_2181038573 = !(self_p0.has); + + return result_2181038573; + +} + +function isSome__header_u443(self_p0) { + var result_2181038526 = false; + + result_2181038526 = self_p0.has; + + return result_2181038526; + +} + +function none__header_u448() { + var result_2181038535 = ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}); + + result_2181038535 = nimCopy(result_2181038535, {val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}, NTI2181038435); + + return result_2181038535; + +} + +function flatten__header_u432(self_p0) { + var Temporary1; + + var result_2181038519 = ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}); + + if (isSome__header_u443(self_p0)) { + Temporary1 = self_p0.val; + } + else { + Temporary1 = none__header_u448(); + } + + result_2181038519 = nimCopy(result_2181038519, Temporary1, NTI1929379857); + + return result_2181038519; + +} + +function isSome__header_u371(self_p0) { + var result_2181038454 = false; + + result_2181038454 = self_p0.has; + + return result_2181038454; + +} + +function some__header_u385(val_p0) { + var result_2181038468 = ({val: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}), has: false}); + + result_2181038468 = nimCopy(result_2181038468, {has: true, val: nimCopy(null, val_p0, NTI1929379857)}, NTI2181038344); + + return result_2181038468; + +} + +function none__header_u415() { + var result_2181038502 = ({val: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}), has: false}); + + result_2181038502 = nimCopy(result_2181038502, {val: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}), has: false}, NTI2181038390); + + return result_2181038502; + +} + +function map__header_u357(self_p0, callback_p1) { + var Temporary1; + + var result_2181038447 = ({val: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}), has: false}); + + if (isSome__header_u371(self_p0)) { + Temporary1 = some__header_u385(callback_p1(self_p0.val)); + } + else { + Temporary1 = none__header_u415(); + } + + result_2181038447 = nimCopy(result_2181038447, Temporary1, NTI2181038344); + + return result_2181038447; + +} + +function setAttr__pkgZkaraxZvdom_u713(n_p0, key_p1, val_p2) { + BeforeRet: { + if (((n_p0.attrs).length == 0)) { + n_p0.attrs = nimCopy(null, [key_p1, val_p2], NTI1409286435); + } + else { + Label1: { + var i_1409286877 = 0; + var colontmp__637534930 = 0; + colontmp__637534930 = subInt((n_p0.attrs).length, 2); + var res_637534931 = 0; + Label2: { + Label3: while (true) { + if (!(res_637534931 <= colontmp__637534930)) break Label3; + i_1409286877 = res_637534931; + if ((n_p0.attrs[chckIndx(i_1409286877, 0, (n_p0.attrs).length - 1)] == key_p1)) { + n_p0.attrs[chckIndx(addInt(i_1409286877, 1), 0, (n_p0.attrs).length - 1)] = val_p2; + break BeforeRet; + } + + res_637534931 = addInt(res_637534931, 2); + } + }; + }; + n_p0.attrs.push(key_p1);; + n_p0.attrs.push(val_p2);; + } + + }; + + +} + +function addEventListener__pkgZkaraxZvdom_u999(n_p0, event_p1, handler_p2) { + n_p0.events.push({Field0: event_p1, Field1: handler_p2, Field2: null});; + + +} + +function addEventHandler__pkgZkaraxZkarax_u1897(n_p0, k_p1, action_p2, kxi_p3) { + +function wrapper__pkgZkaraxZkarax_u1902(ev_p0, n_p1) { + action_p2(ev_p0, n_p1); + if (!(kxi_p3.surpressRedraws)) { + redraw__pkgZkaraxZkarax_u1484(kxi_p3); + } + + + + } + + addEventListener__pkgZkaraxZvdom_u999(n_p0, k_p1, wrapper__pkgZkaraxZkarax_u1902); + + +} + +function onKeyDown__header_u481(e_p0, n_p1) { + var event_2181038564 = e_p0; + if ((event_2181038564.key == "Enter")) { + navigateTo__karaxutils_u142(toJSStr(makeUri__karaxutils_u123([47,115,101,97,114,99,104], [{Field0: [113], Field1: cstrToNimstr(value__pkgZkaraxZvdom_u416(n_p1))}], [47], false, false))); + } + + + +} + +function text__pkgZkaraxZvdom_u948(s_p0) { + var result_1409287094 = null; + + result_1409287094 = {kind: 0, text: toJSStr(s_p0), index: (-1), m_type: NTI1409286247, id: null, class: null, kids: [], attrs: [], events: [], style: null, dom: null}; + + return result_1409287094; + +} + +function onClick__usermenu_u60(e_p0, n_p1, state_p2) { + state_p2.shown = !(state_p2.shown); + + +} + +function isOnline__user_u25(user_p0) { + var result_1929379867 = false; + + BeforeRet: { + result_1929379867 = (subInt64(toUnix__pureZtimes_u1196(getTime__pureZtimes_u1247()), user_p0.lastOnline) < 300n); + break BeforeRet; + }; + + return result_1929379867; + +} + +function setAttr__pkgZkaraxZvstyles_u300(s_p0, a_p1, value_p2) { + BeforeRet: { + var i_1476395312 = 0; + Label1: { + Label2: while (true) { + if (!(i_1476395312 < s_p0.length)) break Label2; + if ((s_p0[i_1476395312] == a_p1)) { + s_p0[addInt(i_1476395312, 1)] = value_p2; + break BeforeRet; + } + else { + if ((a_p1 < s_p0[i_1476395312])) { + s_p0.push(""); + s_p0.push(""); + Label3: { + var j_1476395353 = 0; + var colontmp__637534939 = 0; + var colontmp__637534940 = 0; + colontmp__637534939 = subInt(s_p0.length, 1); + colontmp__637534940 = addInt(i_1476395312, 3); + var res_637534941 = colontmp__637534939; + Label4: { + Label5: while (true) { + if (!(colontmp__637534940 <= res_637534941)) break Label5; + j_1476395353 = res_637534941; + s_p0[j_1476395353] = s_p0[subInt(j_1476395353, 2)]; + s_p0[subInt(j_1476395353, 1)] = s_p0[subInt(j_1476395353, 3)]; + res_637534941 = subInt(res_637534941, 2); + } + }; + }; + s_p0[i_1476395312] = a_p1; + s_p0[addInt(i_1476395312, 1)] = value_p2; + break BeforeRet; + } + } + i_1476395312 = addInt(i_1476395312, 2); + } + }; + s_p0.push(a_p1); + s_p0.push(value_p2); + }; + + +} + +function setAttr__pkgZkaraxZvstyles_u387(s_p0, attr_p1, value_p2) { + if (!(!((value_p2 == null)))) { + failedAssertImpl__stdZassertions_u86([118,115,116,121,108,101,115,46,110,105,109,40,50,54,54,44,32,53,41,32,96,118,97,108,117,101,32,33,61,32,110,105,108,96,32,118,97,108,117,101,32,109,117,115,116,32,110,111,116,32,98,101,32,110,105,108]); + } + + setAttr__pkgZkaraxZvstyles_u300(s_p0, toStyleAttrName_1476395258[chckIndx(attr_p1, 0, (toStyleAttrName_1476395258).length - 1)], value_p2); + + +} + +function style__pkgZkaraxZvstyles_u426(pairs_p0) { + var result_1476395436 = null; + + result_1476395436 = new Array(0); + Label1: { + var x_1476395462 = {Field0: 0, Field1: null}; + var i_637534935 = 0; + Label2: { + Label3: while (true) { + if (!(i_637534935 < (pairs_p0).length)) break Label3; + x_1476395462 = pairs_p0[chckIndx(i_637534935, 0, (pairs_p0).length - 1)]; + setAttr__pkgZkaraxZvstyles_u387(result_1476395436, x_1476395462["Field0"], x_1476395462["Field1"]); + i_637534935 += 1; + } + }; + }; + + return result_1476395436; + +} + +function style__pkgZkaraxZvstyles_u487(a_p0, val_p1) { + var result_1476395498 = null; + + result_1476395498 = new Array(0); + setAttr__pkgZkaraxZvstyles_u387(result_1476395498, a_p0, val_p1); + + return result_1476395498; + +} + +function render__usermenu_u64(state_p0, user_p1) { + +function HEX3Aanonymous__usermenu_u84(e_p0, n_p1) { + onClick__usermenu_u60(e_p0, n_p1, state_p0); + + + } + var Temporary1; + +function HEX3Aanonymous__usermenu_u88(e_p0, n_p1) { + state_p0.shown = false; + + + } + var Temporary2; + +function HEX3Aanonymous__usermenu_u92(e_p0, n_p1) { + state_p0.shown = false; + state_p0.onLogout(); + + + } + + var result_2298478659 = null; + + var tmp_2298478660 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2298478660.id = "profile-btn"; + var tmp_2298478661 = tree__pkgZkaraxZvdom_u880(42, []); + tmp_2298478661.class = "avatar c-hand"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2298478661, 0, HEX3Aanonymous__usermenu_u84, kxi__); + var tmp_2298478662 = tree__pkgZkaraxZvdom_u880(76, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2298478662, "src", toJSStr(user_p1.avatarUrl)); + setAttr__pkgZkaraxZvdom_u713(tmp_2298478662, "title", toJSStr(user_p1.name)); + add__pkgZkaraxZvdom_u794(tmp_2298478661, tmp_2298478662); + if (isOnline__user_u25(user_p1)) { + var tmp_2298478663 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2298478663.class = "avatar-presense online"; + add__pkgZkaraxZvdom_u794(tmp_2298478661, tmp_2298478663); + } + + add__pkgZkaraxZvdom_u794(tmp_2298478660, tmp_2298478661); + var tmp_2298478664 = tree__pkgZkaraxZvdom_u880(44, []); + if (state_p0.shown) { + Temporary1 = "block"; + } + else { + Temporary1 = "none"; + } + + tmp_2298478664.style = style__pkgZkaraxZvstyles_u426([nimCopy(null, {Field0: 185, Field1: "999999px"}, NTI2298478645), nimCopy(null, {Field0: 98, Field1: "999999px"}, NTI2298478645), nimCopy(null, {Field0: 146, Field1: "absolute"}, NTI2298478645), nimCopy(null, {Field0: 103, Field1: "0"}, NTI2298478645), nimCopy(null, {Field0: 171, Field1: "0"}, NTI2298478645), nimCopy(null, {Field0: 78, Field1: Temporary1}, NTI2298478645)]); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2298478664, 0, HEX3Aanonymous__usermenu_u88, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2298478660, tmp_2298478664); + var tmp_2298478665 = tree__pkgZkaraxZvdom_u880(37, []); + tmp_2298478665.class = "menu menu-right"; + if (state_p0.shown) { + Temporary2 = [105,110,104,101,114,105,116]; + } + else { + Temporary2 = [110,111,110,101]; + } + + tmp_2298478665.style = style__pkgZkaraxZvstyles_u487(78, toJSStr(Temporary2)); + var tmp_2298478666 = tree__pkgZkaraxZvdom_u880(38, []); + tmp_2298478666.class = "menu-item"; + var tmp_2298478667 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2298478667.class = "tile tile-centered"; + var tmp_2298478668 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2298478668.class = "tile-icon"; + var tmp_2298478669 = tree__pkgZkaraxZvdom_u880(76, []); + tmp_2298478669.class = "avatar"; + setAttr__pkgZkaraxZvdom_u713(tmp_2298478669, "src", toJSStr(user_p1.avatarUrl)); + setAttr__pkgZkaraxZvdom_u713(tmp_2298478669, "title", toJSStr(user_p1.name)); + add__pkgZkaraxZvdom_u794(tmp_2298478668, tmp_2298478669); + add__pkgZkaraxZvdom_u794(tmp_2298478667, tmp_2298478668); + var tmp_2298478670 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2298478670.id = "profile-name"; + tmp_2298478670.class = "tile-content"; + add__pkgZkaraxZvdom_u794(tmp_2298478670, text__pkgZkaraxZvdom_u948(user_p1.name)); + add__pkgZkaraxZvdom_u794(tmp_2298478667, tmp_2298478670); + add__pkgZkaraxZvdom_u794(tmp_2298478666, tmp_2298478667); + add__pkgZkaraxZvdom_u794(tmp_2298478665, tmp_2298478666); + var tmp_2298478671 = tree__pkgZkaraxZvdom_u880(38, []); + tmp_2298478671.class = "divider"; + add__pkgZkaraxZvdom_u794(tmp_2298478665, tmp_2298478671); + var tmp_2298478672 = tree__pkgZkaraxZvdom_u880(38, []); + tmp_2298478672.class = "menu-item"; + var tmp_2298478673 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_2298478673.id = "myprofile-btn"; + setAttr__pkgZkaraxZvdom_u713(tmp_2298478673, "href", toJSStr(makeUri__karaxutils_u123(([47,112,114,111,102,105,108,101,47]).concat(user_p1.name), [], [47], false, true))); + add__pkgZkaraxZvdom_u794(tmp_2298478673, text__pkgZkaraxZvdom_u948([77,121,32,112,114,111,102,105,108,101])); + add__pkgZkaraxZvdom_u794(tmp_2298478672, tmp_2298478673); + add__pkgZkaraxZvdom_u794(tmp_2298478665, tmp_2298478672); + var tmp_2298478674 = tree__pkgZkaraxZvdom_u880(38, []); + tmp_2298478674.class = "menu-item c-hand"; + var tmp_2298478675 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_2298478675.id = "logout-btn"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2298478675, 0, HEX3Aanonymous__usermenu_u92, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2298478675, text__pkgZkaraxZvdom_u948([76,111,103,111,117,116])); + add__pkgZkaraxZvdom_u794(tmp_2298478674, tmp_2298478675); + add__pkgZkaraxZvdom_u794(tmp_2298478665, tmp_2298478674); + add__pkgZkaraxZvdom_u794(tmp_2298478660, tmp_2298478665); + result_2298478659 = tmp_2298478660; + + return result_2298478659; + +} + +function get__user_u53(self_p0) { + var result_1929379896 = ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}); + + if (isNone__user_u60(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_1929379896 = self_p0.val; + + return result_1929379896; + +} + +function class__karaxutils_u57(classes_p0, defaultClasses_p1) { + var result_1862271038 = []; + + result_1862271038 = nimCopy(null, (defaultClasses_p1).concat([32]), NTI33554449); + Label1: { + var class_1862271052 = {Field0: [], Field1: false}; + var i_637534945 = 0; + Label2: { + Label3: while (true) { + if (!(i_637534945 < (classes_p0).length)) break Label3; + class_1862271052 = classes_p0[chckIndx(i_637534945, 0, (classes_p0).length - 1)]; + if (class_1862271052.Field1) { + nimAddStrStr(result_1862271038, (class_1862271052.Field0).concat([32]));; + } + + i_637534945 += 1; + } + }; + }; + + return result_1862271038; + +} + +function onClose__login_u90(ev_p0, n_p1, state_p2) { + state_p2.shown = false; + ev_p0.preventDefault(); + + +} + +function onLogInPost__login_u29(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym0_2197815332 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym0_2197815332 == 200)) { + state_p2.shown = false; + state_p2.onLogIn(); + } + else { +++excHandler; + try { + var parsedHEX60gensym0_2197815333 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym0_2197815339 = to__addcategorymodal_u215(parsedHEX60gensym0_2197815333); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym0_2197815339), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onLogInClick__login_u56(ev_p0, n_p1, state_p2) { + +function HEX3Aanonymous__login_u86(s_p0, r_p1) { + onLogInPost__login_u29(s_p0, r_p1, state_p2); + + + } + + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + var uri_2197815371 = makeUri__karaxutils_u123([108,111,103,105,110], [], [47], false, true); + var form_2197815372 = document.getElementById("login-form"); + var formData_2197815373 = new FormData(form_2197815372); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2197815371), [], (formData_2197815373), HEX3Aanonymous__login_u86, true, kxi__); + + +} + +function onKeyDown__login_u138(e_p0, n_p1, state_p2) { + var event_2197815438 = e_p0; + if ((event_2197815438.key == "Enter")) { + onLogInClick__login_u56(e_p0, n_p1, state_p2); + } + + + +} + +function isNone__error_u62(self_p0) { + var result_1946157121 = false; + + result_1946157121 = !(self_p0.has); + + return result_1946157121; + +} + +function find__stdZenumutils_u55(a_p0, item_p1) { + var result_1157627964 = 0; + + BeforeRet: { + result_1157627964 = 0; + Label1: { + var i_1157627968 = []; + var i_822087643 = 0; + Label2: { + Label3: while (true) { + if (!(i_822087643 < (a_p0).length)) break Label3; + i_1157627968 = a_p0[chckIndx(i_822087643, 0, (a_p0).length - 1)]; + if (eqStrings(i_1157627968, item_p1)) { + break BeforeRet; + } + + result_1157627964 = addInt(result_1157627964, 1); + i_822087643 += 1; + } + }; + }; + result_1157627964 = (-1); + }; + + return result_1157627964; + +} + +function contains__stdZenumutils_u50(a_p0, item_p1) { + var result_1157627958 = false; + + BeforeRet: { + result_1157627958 = (0 <= find__stdZenumutils_u55(a_p0, item_p1)); + break BeforeRet; + }; + + return result_1157627958; + +} + +function get__error_u76(self_p0) { + var result_1946157135 = ({errorFields: [], message: []}); + + if (isNone__error_u62(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_1946157135 = self_p0.val; + + return result_1946157135; + +} + +function genFormField__error_u46(error_p0, name_p1, label_p2, typ_p3, isLast_p4, placeholder_p5) { + var result_1946157114 = null; + + var hasError_1946157178 = (!(isNone__error_u62(error_p0)) && (contains__stdZenumutils_u50(get__error_u76(error_p0).errorFields, name_p1) || ((get__error_u76(error_p0).errorFields).length == 0))); + var tmp_1946157179 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1946157179.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [104,97,115,45,101,114,114,111,114], Field1: hasError_1946157178}, NTI1946157215)], [102,111,114,109,45,103,114,111,117,112])); + var tmp_1946157180 = tree__pkgZkaraxZvdom_u880(193, []); + tmp_1946157180.class = "form-label"; + setAttr__pkgZkaraxZvdom_u713(tmp_1946157180, "for", toJSStr(name_p1)); + add__pkgZkaraxZvdom_u794(tmp_1946157180, text__pkgZkaraxZvdom_u948(label_p2)); + add__pkgZkaraxZvdom_u794(tmp_1946157179, tmp_1946157180); + var tmp_1946157181 = tree__pkgZkaraxZvdom_u880(194, []); + tmp_1946157181.class = "form-input"; + setAttr__pkgZkaraxZvdom_u713(tmp_1946157181, "type", toJSStr(typ_p3)); + setAttr__pkgZkaraxZvdom_u713(tmp_1946157181, "name", toJSStr(name_p1)); + setAttr__pkgZkaraxZvdom_u713(tmp_1946157181, "placeholder", toJSStr(placeholder_p5)); + add__pkgZkaraxZvdom_u794(tmp_1946157179, tmp_1946157181); + if (!(isNone__error_u62(error_p0))) { + var e_1946157201 = nimCopy(null, get__error_u76(error_p0), NTI1946157059); + if (((((e_1946157201.errorFields).length == 1) && eqStrings(e_1946157201.errorFields[chckIndx(0, 0, (e_1946157201.errorFields).length - 1)], name_p1)) || (isLast_p4 && ((e_1946157201.errorFields).length == 0)))) { + var tmp_1946157182 = tree__pkgZkaraxZvdom_u880(71, []); + tmp_1946157182.class = "form-input-hint"; + add__pkgZkaraxZvdom_u794(tmp_1946157182, text__pkgZkaraxZvdom_u948(e_1946157201.message)); + add__pkgZkaraxZvdom_u794(tmp_1946157179, tmp_1946157182); + } + + } + + result_1946157114 = tmp_1946157179; + + return result_1946157114; + +} + +function show__resetpassword_u270(state_p0) { + state_p0.shown = true; + + +} + +function onClose__resetpassword_u227(ev_p0, n_p1, state_p2) { + state_p2.shown = false; + ev_p0.preventDefault(); + + +} + +function onPost__resetpassword_u168(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym1_2214592687 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym1_2214592687 == 200)) { + state_p2.sent = true; + } + else { +++excHandler; + try { + var parsedHEX60gensym1_2214592688 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym1_2214592694 = to__addcategorymodal_u215(parsedHEX60gensym1_2214592688); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym1_2214592694), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onClick__resetpassword_u193(ev_p0, n_p1, state_p2) { + +function HEX3Aanonymous__resetpassword_u223(s_p0, r_p1) { + onPost__resetpassword_u168(s_p0, r_p1, state_p2); + + + } + + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + var uri_2214592724 = makeUri__karaxutils_u123([115,101,110,100,82,101,115,101,116,80,97,115,115,119,111,114,100], [], [47], false, true); + var form_2214592725 = document.getElementById("resetpassword-form"); + var formData_2214592726 = new FormData(form_2214592725); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2214592724), [], (formData_2214592726), HEX3Aanonymous__resetpassword_u223, true, kxi__); + ev_p0.preventDefault(); + + +} + +function onKeyDown__resetpassword_u272(e_p0, n_p1, state_p2) { + var event_2214592788 = e_p0; + if ((event_2214592788.key == "Enter")) { + onClick__resetpassword_u193(e_p0, n_p1, state_p2); + } + + + +} + +function isSome__resetpassword_u313(self_p0) { + var result_2214592828 = false; + + result_2214592828 = self_p0.has; + + return result_2214592828; + +} + +function get__resetpassword_u327(self_p0) { + var result_2214592842 = []; + + if (isNone__resetpassword_u334(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2214592842 = self_p0["val"]; + + return result_2214592842; + +} + +function render__resetpassword_u277(state_p0, recaptchaSiteKey_p1) { + +function HEX3Aanonymous__resetpassword_u298(ev_p0, n_p1) { + onClose__resetpassword_u227(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__resetpassword_u302(ev_p0, n_p1) { + onClose__resetpassword_u227(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__resetpassword_u306(ev_p0, n_p1) { + onKeyDown__resetpassword_u272(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__resetpassword_u340(ev_p0, n_p1) { + onClick__resetpassword_u193(ev_p0, n_p1, state_p0); + + + } + + var result_2214592793 = null; + + var tmp_2214592794 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592794.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [97,99,116,105,118,101], Field1: state_p0.shown}, NTI2214592776)], [109,111,100,97,108])); + tmp_2214592794.id = "resetpassword-modal"; + var tmp_2214592795 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2214592795, "href", ""); + tmp_2214592795.class = "modal-overlay"; + setAttr__pkgZkaraxZvdom_u713(tmp_2214592795, "aria-label", "close"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2214592795, 0, HEX3Aanonymous__resetpassword_u298, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2214592794, tmp_2214592795); + var tmp_2214592796 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592796.class = "modal-container"; + var tmp_2214592797 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592797.class = "modal-header"; + var tmp_2214592798 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2214592798, "href", ""); + tmp_2214592798.class = "btn btn-clear float-right"; + setAttr__pkgZkaraxZvdom_u713(tmp_2214592798, "aria-label", "close"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2214592798, 0, HEX3Aanonymous__resetpassword_u302, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2214592797, tmp_2214592798); + var tmp_2214592799 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592799.class = "modal-title h5"; + add__pkgZkaraxZvdom_u794(tmp_2214592799, text__pkgZkaraxZvdom_u948([82,101,115,101,116,32,121,111,117,114,32,112,97,115,115,119,111,114,100])); + add__pkgZkaraxZvdom_u794(tmp_2214592797, tmp_2214592799); + add__pkgZkaraxZvdom_u794(tmp_2214592796, tmp_2214592797); + var tmp_2214592800 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592800.class = "modal-body"; + var tmp_2214592801 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592801.class = "content"; + var tmp_2214592802 = tree__pkgZkaraxZvdom_u880(190, []); + tmp_2214592802.id = "resetpassword-form"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2214592802, 4, HEX3Aanonymous__resetpassword_u306, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2214592802, genFormField__error_u46(state_p0.error, [101,109,97,105,108], makeNimstrLit("Enter your email or username and we will send you a password reset email."), [116,101,120,116], true, [85,115,101,114,110,97,109,101,32,111,114,32,101,109,97,105,108])); + if (isSome__resetpassword_u313(recaptchaSiteKey_p1)) { + var tmp_2214592803 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592803.id = "recaptcha"; + var tmp_2214592804 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592804.class = "g-recaptcha"; + setAttr__pkgZkaraxZvdom_u713(tmp_2214592804, "data-sitekey", toJSStr(get__resetpassword_u327(recaptchaSiteKey_p1))); + add__pkgZkaraxZvdom_u794(tmp_2214592803, tmp_2214592804); + var tmp_2214592805 = tree__pkgZkaraxZvdom_u880(14, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2214592805, "src", "https://www.google.com/recaptcha/api.js"); + add__pkgZkaraxZvdom_u794(tmp_2214592803, tmp_2214592805); + add__pkgZkaraxZvdom_u794(tmp_2214592802, tmp_2214592803); + } + + add__pkgZkaraxZvdom_u794(tmp_2214592801, tmp_2214592802); + add__pkgZkaraxZvdom_u794(tmp_2214592800, tmp_2214592801); + add__pkgZkaraxZvdom_u794(tmp_2214592796, tmp_2214592800); + var tmp_2214592806 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592806.class = "modal-footer"; + if (state_p0.sent) { + var tmp_2214592807 = tree__pkgZkaraxZvdom_u880(71, []); + tmp_2214592807.class = "text-success"; + var tmp_2214592808 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2214592808.class = "fas fa-check-circle"; + add__pkgZkaraxZvdom_u794(tmp_2214592807, tmp_2214592808); + add__pkgZkaraxZvdom_u794(tmp_2214592807, text__pkgZkaraxZvdom_u948([32,83,101,110,116])); + add__pkgZkaraxZvdom_u794(tmp_2214592806, tmp_2214592807); + } + else { + var tmp_2214592809 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2214592809.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [108,111,97,100,105,110,103], Field1: state_p0.loading}, NTI2214592875)], [98,116,110,32,98,116,110,45,112,114,105,109,97,114,121])); + setAttr__pkgZkaraxZvdom_u713(tmp_2214592809, "type", "button"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2214592809, 0, HEX3Aanonymous__resetpassword_u340, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2214592809, text__pkgZkaraxZvdom_u948([82,101,115,101,116,32,112,97,115,115,119,111,114,100])); + add__pkgZkaraxZvdom_u794(tmp_2214592806, tmp_2214592809); + } + + add__pkgZkaraxZvdom_u794(tmp_2214592796, tmp_2214592806); + add__pkgZkaraxZvdom_u794(tmp_2214592794, tmp_2214592796); + result_2214592793 = tmp_2214592794; + + return result_2214592793; + +} + +function render__login_u143(state_p0, recaptchaSiteKey_p1) { + +function HEX3Aanonymous__login_u162(ev_p0, n_p1) { + onClose__login_u90(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__login_u166(ev_p0, n_p1) { + onClose__login_u90(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__login_u170(ev_p0, n_p1) { + onKeyDown__login_u138(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__login_u174(e_p0, n_p1) { + show__resetpassword_u270(state_p0.resetPasswordModal); + e_p0.preventDefault(); + + + } + +function HEX3Aanonymous__login_u178(ev_p0, n_p1) { + onLogInClick__login_u56(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__login_u182(ev_p0, n_p1) { + state_p0.onSignUp(); + state_p0.shown = false; + + + } + + var result_2197815443 = null; + + var tmp_2197815444 = tree__pkgZkaraxZvdom_u880(44, []); + var tmp_2197815445 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2197815445.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [97,99,116,105,118,101], Field1: state_p0.shown}, NTI2197815406)], [109,111,100,97,108,32,109,111,100,97,108,45,115,109])); + tmp_2197815445.id = "login-modal"; + var tmp_2197815446 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2197815446, "href", ""); + tmp_2197815446.class = "modal-overlay"; + setAttr__pkgZkaraxZvdom_u713(tmp_2197815446, "aria-label", "close"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2197815446, 0, HEX3Aanonymous__login_u162, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2197815445, tmp_2197815446); + var tmp_2197815447 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2197815447.class = "modal-container"; + var tmp_2197815448 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2197815448.class = "modal-header"; + var tmp_2197815449 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2197815449, "href", ""); + tmp_2197815449.class = "btn btn-clear float-right"; + setAttr__pkgZkaraxZvdom_u713(tmp_2197815449, "aria-label", "close"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2197815449, 0, HEX3Aanonymous__login_u166, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2197815448, tmp_2197815449); + var tmp_2197815450 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2197815450.class = "modal-title h5"; + add__pkgZkaraxZvdom_u794(tmp_2197815450, text__pkgZkaraxZvdom_u948([76,111,103,32,105,110])); + add__pkgZkaraxZvdom_u794(tmp_2197815448, tmp_2197815450); + add__pkgZkaraxZvdom_u794(tmp_2197815447, tmp_2197815448); + var tmp_2197815451 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2197815451.class = "modal-body"; + var tmp_2197815452 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2197815452.class = "content"; + var tmp_2197815453 = tree__pkgZkaraxZvdom_u880(190, []); + tmp_2197815453.id = "login-form"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2197815453, 4, HEX3Aanonymous__login_u170, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2197815453, genFormField__error_u46(state_p0.error, [117,115,101,114,110,97,109,101], [85,115,101,114,110,97,109,101], [116,101,120,116], false, [])); + add__pkgZkaraxZvdom_u794(tmp_2197815453, genFormField__error_u46(state_p0.error, [112,97,115,115,119,111,114,100], [80,97,115,115,119,111,114,100], [112,97,115,115,119,111,114,100], true, [])); + add__pkgZkaraxZvdom_u794(tmp_2197815452, tmp_2197815453); + var tmp_2197815454 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2197815454, "href", ""); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2197815454, 0, HEX3Aanonymous__login_u174, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2197815454, text__pkgZkaraxZvdom_u948([82,101,115,101,116,32,121,111,117,114,32,112,97,115,115,119,111,114,100])); + add__pkgZkaraxZvdom_u794(tmp_2197815452, tmp_2197815454); + add__pkgZkaraxZvdom_u794(tmp_2197815451, tmp_2197815452); + add__pkgZkaraxZvdom_u794(tmp_2197815447, tmp_2197815451); + var tmp_2197815455 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2197815455.class = "modal-footer"; + var tmp_2197815456 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2197815456.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [108,111,97,100,105,110,103], Field1: state_p0.loading}, NTI2197815469)], [98,116,110,32,98,116,110,45,112,114,105,109,97,114,121])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2197815456, 0, HEX3Aanonymous__login_u178, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2197815456, text__pkgZkaraxZvdom_u948([76,111,103,32,105,110])); + add__pkgZkaraxZvdom_u794(tmp_2197815455, tmp_2197815456); + var tmp_2197815457 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2197815457.class = "btn"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2197815457, 0, HEX3Aanonymous__login_u182, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2197815457, text__pkgZkaraxZvdom_u948([67,114,101,97,116,101,32,97,99,99,111,117,110,116])); + add__pkgZkaraxZvdom_u794(tmp_2197815455, tmp_2197815457); + add__pkgZkaraxZvdom_u794(tmp_2197815447, tmp_2197815455); + add__pkgZkaraxZvdom_u794(tmp_2197815445, tmp_2197815447); + add__pkgZkaraxZvdom_u794(tmp_2197815444, tmp_2197815445); + add__pkgZkaraxZvdom_u794(tmp_2197815444, render__resetpassword_u277(state_p0.resetPasswordModal, recaptchaSiteKey_p1)); + result_2197815443 = tmp_2197815444; + + return result_2197815443; + +} + +function get__header_u586(self_p0) { + var result_2181038669 = null; + + BeforeRet: { + if (isNone__header_u490(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2181038669 = self_p0.val; + break BeforeRet; + }; + + return result_2181038669; + +} + +function setForeignNodeId__pkgZkaraxZkarax_u1919(id_p0, kxi_p1) { + kxi_p1.orphans[id_p0] = true; + + +} + +function onClose__signup_u87(ev_p0, n_p1, state_p2) { + state_p2.shown = false; + ev_p0.preventDefault(); + + +} + +function onSignUpPost__signup_u26(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym0_2281701409 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym0_2281701409 == 200)) { + state_p2.shown = false; + state_p2.onSignUp(); + } + else { +++excHandler; + try { + var parsedHEX60gensym0_2281701410 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym0_2281701416 = to__addcategorymodal_u215(parsedHEX60gensym0_2281701410); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym0_2281701416), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onSignUpClick__signup_u53(ev_p0, n_p1, state_p2) { + +function HEX3Aanonymous__signup_u83(s_p0, r_p1) { + onSignUpPost__signup_u26(s_p0, r_p1, state_p2); + + + } + + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + var uri_2281701448 = makeUri__karaxutils_u123([115,105,103,110,117,112], [], [47], false, true); + var form_2281701449 = document.getElementById("signup-form"); + var formData_2281701450 = new FormData(form_2281701449); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2281701448), [], (formData_2281701450), HEX3Aanonymous__signup_u83, true, kxi__); + + +} + +function anchorCB__karaxutils_u166(e_p0, n_p1) { + var mE_1862271145 = e_p0; + if (!((mE_1862271145.metaKey || mE_1862271145.ctrlKey))) { + e_p0.preventDefault(); + var url_1862271146 = getAttr__pkgZkaraxZvdom_u758(n_p1, "href"); + navigateTo__karaxutils_u142(url_1862271146); + } + + + +} + +function render__signup_u134(state_p0, recaptchaSiteKey_p1) { + +function HEX3Aanonymous__signup_u156(ev_p0, n_p1) { + onClose__signup_u87(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__signup_u160(ev_p0, n_p1) { + onClose__signup_u87(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__signup_u182(ev_p0, n_p1) { + onSignUpClick__signup_u53(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__signup_u186(ev_p0, n_p1) { + state_p0.onLogIn(); + state_p0.shown = false; + + + } + +function HEX3Aanonymous__signup_u192(ev_p0, n_p1) { + state_p0.shown = false; + anchorCB__karaxutils_u166(ev_p0, n_p1); + + + } + + var result_2281701514 = null; + + setForeignNodeId__pkgZkaraxZkarax_u1919("recaptcha", kxi__); + var tmp_2281701515 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2281701515.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [97,99,116,105,118,101], Field1: state_p0.shown}, NTI2281701480)], [109,111,100,97,108])); + tmp_2281701515.id = "signup-modal"; + var tmp_2281701516 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2281701516, "href", ""); + tmp_2281701516.class = "modal-overlay"; + setAttr__pkgZkaraxZvdom_u713(tmp_2281701516, "aria-label", "close"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2281701516, 0, HEX3Aanonymous__signup_u156, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2281701515, tmp_2281701516); + var tmp_2281701517 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2281701517.class = "modal-container"; + var tmp_2281701518 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2281701518.class = "modal-header"; + var tmp_2281701519 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2281701519, "href", ""); + tmp_2281701519.class = "btn btn-clear float-right"; + setAttr__pkgZkaraxZvdom_u713(tmp_2281701519, "aria-label", "close"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2281701519, 0, HEX3Aanonymous__signup_u160, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2281701518, tmp_2281701519); + var tmp_2281701520 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2281701520.class = "modal-title h5"; + add__pkgZkaraxZvdom_u794(tmp_2281701520, text__pkgZkaraxZvdom_u948([67,114,101,97,116,101,32,97,32,110,101,119,32,97,99,99,111,117,110,116])); + add__pkgZkaraxZvdom_u794(tmp_2281701518, tmp_2281701520); + add__pkgZkaraxZvdom_u794(tmp_2281701517, tmp_2281701518); + var tmp_2281701521 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2281701521.class = "modal-body"; + var tmp_2281701522 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2281701522.class = "content"; + var tmp_2281701523 = tree__pkgZkaraxZvdom_u880(190, []); + tmp_2281701523.id = "signup-form"; + add__pkgZkaraxZvdom_u794(tmp_2281701523, genFormField__error_u46(state_p0.error, [101,109,97,105,108], [69,109,97,105,108], [101,109,97,105,108], false, [])); + add__pkgZkaraxZvdom_u794(tmp_2281701523, genFormField__error_u46(state_p0.error, [117,115,101,114,110,97,109,101], [85,115,101,114,110,97,109,101], [116,101,120,116], false, [])); + add__pkgZkaraxZvdom_u794(tmp_2281701523, genFormField__error_u46(state_p0.error, [112,97,115,115,119,111,114,100], [80,97,115,115,119,111,114,100], [112,97,115,115,119,111,114,100], true, [])); + if (isSome__resetpassword_u313(recaptchaSiteKey_p1)) { + var tmp_2281701524 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2281701524.id = "recaptcha"; + var tmp_2281701525 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2281701525.class = "g-recaptcha"; + setAttr__pkgZkaraxZvdom_u713(tmp_2281701525, "data-sitekey", toJSStr(get__resetpassword_u327(recaptchaSiteKey_p1))); + add__pkgZkaraxZvdom_u794(tmp_2281701524, tmp_2281701525); + var tmp_2281701526 = tree__pkgZkaraxZvdom_u880(14, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2281701526, "src", "https://www.google.com/recaptcha/api.js"); + add__pkgZkaraxZvdom_u794(tmp_2281701524, tmp_2281701526); + add__pkgZkaraxZvdom_u794(tmp_2281701523, tmp_2281701524); + } + + add__pkgZkaraxZvdom_u794(tmp_2281701522, tmp_2281701523); + add__pkgZkaraxZvdom_u794(tmp_2281701521, tmp_2281701522); + add__pkgZkaraxZvdom_u794(tmp_2281701517, tmp_2281701521); + var tmp_2281701527 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2281701527.class = "modal-footer"; + var tmp_2281701528 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2281701528.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [108,111,97,100,105,110,103], Field1: state_p0.loading}, NTI2281701556)], [98,116,110,32,98,116,110,45,112,114,105,109,97,114,121,32,99,114,101,97,116,101,45,97,99,99,111,117,110,116,45,98,116,110])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2281701528, 0, HEX3Aanonymous__signup_u182, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2281701528, text__pkgZkaraxZvdom_u948([67,114,101,97,116,101,32,97,99,99,111,117,110,116])); + add__pkgZkaraxZvdom_u794(tmp_2281701527, tmp_2281701528); + var tmp_2281701529 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2281701529.class = "btn login-btn"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2281701529, 0, HEX3Aanonymous__signup_u186, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2281701529, text__pkgZkaraxZvdom_u948([76,111,103,32,105,110])); + add__pkgZkaraxZvdom_u794(tmp_2281701527, tmp_2281701529); + var tmp_2281701530 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2281701530.class = "license-text text-gray"; + add__pkgZkaraxZvdom_u794(tmp_2281701530, text__pkgZkaraxZvdom_u948([66,121,32,114,101,103,105,115,116,101,114,105,110,103,44,32,121,111,117,32,97,103,114,101,101,32,116,111,32,116,104,101,32])); + var tmp_2281701531 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_2281701531.id = "license"; + setAttr__pkgZkaraxZvdom_u713(tmp_2281701531, "href", toJSStr(makeUri__karaxutils_u123([47,97,98,111,117,116,47,108,105,99,101,110,115,101], [], [47], false, true))); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2281701531, 0, HEX3Aanonymous__signup_u192, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2281701531, text__pkgZkaraxZvdom_u948([99,111,110,116,101,110,116,32,108,105,99,101,110,115,101])); + add__pkgZkaraxZvdom_u794(tmp_2281701530, tmp_2281701531); + add__pkgZkaraxZvdom_u794(tmp_2281701530, text__pkgZkaraxZvdom_u948([46])); + add__pkgZkaraxZvdom_u794(tmp_2281701527, tmp_2281701530); + add__pkgZkaraxZvdom_u794(tmp_2281701517, tmp_2281701527); + add__pkgZkaraxZvdom_u794(tmp_2281701515, tmp_2281701517); + result_2281701514 = tmp_2281701515; + + return result_2281701514; + +} + +function renderHeader__header_u485() { + +function HEX3Aanonymous__header_u498(x_p0) { + var result_2181038588 = ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}); + + result_2181038588 = nimCopy(result_2181038588, x_p0.user, NTI1929379857); + + return result_2181038588; + + } + +function HEX3Aanonymous__header_u551(e_p0, n_p1) { + show__signup_u132(state_2181038120[0].signupModal); + + + } + +function HEX3Aanonymous__header_u555(e_p0, n_p1) { + show__login_u136(state_2181038120[0].loginModal); + + + } + + var result_2181038566 = null; + + if ((isNone__header_u490(state_2181038120[0].data) && (state_2181038120[0].status == 200))) { + getStatus__header_u41(false); + } + + var user_2181038610 = flatten__header_u432(map__header_u357(state_2181038120[0].data, HEX3Aanonymous__header_u498)); + var tmp_2181038611 = tree__pkgZkaraxZvdom_u880(44, []); + var tmp_2181038612 = tree__pkgZkaraxZvdom_u880(28, []); + tmp_2181038612.id = "main-navbar"; + var tmp_2181038613 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2181038613.class = "navbar container grid-xl"; + var tmp_2181038614 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_2181038614.class = "navbar-section"; + var tmp_2181038615 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2181038615, "href", toJSStr(makeUri__karaxutils_u123([47], [], [47], false, true))); + var tmp_2181038616 = tree__pkgZkaraxZvdom_u880(76, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2181038616, "src", "/images/logo.png"); + tmp_2181038616.id = "img-logo"; + add__pkgZkaraxZvdom_u794(tmp_2181038615, tmp_2181038616); + add__pkgZkaraxZvdom_u794(tmp_2181038614, tmp_2181038615); + add__pkgZkaraxZvdom_u794(tmp_2181038613, tmp_2181038614); + var tmp_2181038617 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_2181038617.class = "navbar-section"; + var tmp_2181038618 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2181038618.class = "input-group input-inline"; + var tmp_2181038619 = tree__pkgZkaraxZvdom_u880(194, []); + tmp_2181038619.class = "search-input input-sm"; + setAttr__pkgZkaraxZvdom_u713(tmp_2181038619, "type", "search"); + setAttr__pkgZkaraxZvdom_u713(tmp_2181038619, "placeholder", "Search"); + tmp_2181038619.id = "search-box"; + setAttr__pkgZkaraxZvdom_u713(tmp_2181038619, "required", "required"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2181038619, 4, onKeyDown__header_u481, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2181038618, tmp_2181038619); + add__pkgZkaraxZvdom_u794(tmp_2181038617, tmp_2181038618); + if (state_2181038120[0].loading) { + var tmp_2181038620 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2181038620.class = "loading"; + add__pkgZkaraxZvdom_u794(tmp_2181038617, tmp_2181038620); + } + else { + if (isNone__user_u60(user_2181038610)) { + var tmp_2181038621 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2181038621.id = "signup-btn"; + tmp_2181038621.class = "btn btn-primary btn-sm"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2181038621, 0, HEX3Aanonymous__header_u551, kxi__); + var tmp_2181038622 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2181038622.class = "fas fa-user-plus"; + add__pkgZkaraxZvdom_u794(tmp_2181038621, tmp_2181038622); + add__pkgZkaraxZvdom_u794(tmp_2181038621, text__pkgZkaraxZvdom_u948([32,83,105,103,110,32,117,112])); + add__pkgZkaraxZvdom_u794(tmp_2181038617, tmp_2181038621); + var tmp_2181038623 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2181038623.id = "login-btn"; + tmp_2181038623.class = "btn btn-primary btn-sm"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2181038623, 0, HEX3Aanonymous__header_u555, kxi__); + var tmp_2181038624 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2181038624.class = "fas fa-sign-in-alt"; + add__pkgZkaraxZvdom_u794(tmp_2181038623, tmp_2181038624); + add__pkgZkaraxZvdom_u794(tmp_2181038623, text__pkgZkaraxZvdom_u948([32,76,111,103,32,105,110])); + add__pkgZkaraxZvdom_u794(tmp_2181038617, tmp_2181038623); + } + else { + add__pkgZkaraxZvdom_u794(tmp_2181038617, render__usermenu_u64(state_2181038120[0].userMenu, get__user_u53(user_2181038610))); + } + } + add__pkgZkaraxZvdom_u794(tmp_2181038613, tmp_2181038617); + add__pkgZkaraxZvdom_u794(tmp_2181038612, tmp_2181038613); + add__pkgZkaraxZvdom_u794(tmp_2181038611, tmp_2181038612); + if (isSome__header_u371(state_2181038120[0].data)) { + add__pkgZkaraxZvdom_u794(tmp_2181038611, render__login_u143(state_2181038120[0].loginModal, get__header_u586(state_2181038120[0].data).recaptchaSiteKey)); + add__pkgZkaraxZvdom_u794(tmp_2181038611, render__signup_u134(state_2181038120[0].signupModal, get__header_u586(state_2181038120[0].data).recaptchaSiteKey)); + } + + result_2181038566 = tmp_2181038611; + + return result_2181038566; + +} + +function fastSubstr__pureZparseutils_u225(s_p0, token_p1, token_p1_Idx, length_p2) { + if (token_p1[token_p1_Idx].length < chckRange(length_p2, 0, 2147483647)) { for (var i = token_p1[token_p1_Idx].length; i < chckRange(length_p2, 0, 2147483647); ++i) token_p1[token_p1_Idx].push(0); } + else {token_p1[token_p1_Idx].length = chckRange(length_p2, 0, 2147483647); }; + Label1: { + var i_1140850921 = 0; + var i_637534959 = 0; + Label2: { + Label3: while (true) { + if (!(i_637534959 < length_p2)) break Label3; + i_1140850921 = i_637534959; + token_p1[token_p1_Idx][chckIndx(i_1140850921, 0, (token_p1[token_p1_Idx]).length - 1)] = s_p0[chckIndx(i_1140850921, 0, (s_p0).length - 1)]; + i_637534959 = addInt(i_637534959, 1); + } + }; + }; + + +} + +function parseUntil__pureZparseutils_u234(s_p0, token_p1, token_p1_Idx, until_p2) { + var result_1140850926 = 0; + + var i_1140850927 = 0; + Label1: { + Label2: while (true) { + if (!((i_1140850927 < (s_p0).length) && !((until_p2[s_p0[chckIndx(i_1140850927, 0, (s_p0).length - 1)]] != undefined)))) break Label2; + i_1140850927 = addInt(i_1140850927, 1); + } + }; + result_1140850926 = i_1140850927; + fastSubstr__pureZparseutils_u225(s_p0, token_p1, token_p1_Idx, result_1140850926); + + return result_1140850926; + +} + +function parseUntil__pureZparseutils_u880(s_p0, token_p1, token_p1_Idx, until_p2, start_p3) { + var result_1140851573 = 0; + + result_1140851573 = parseUntil__pureZparseutils_u234((s_p0.slice(start_p3, (s_p0).length - 1 + 1)), token_p1, token_p1_Idx, until_p2); + + return result_1140851573; + +} + +function HEX5BHEX5D__system_u3527(s_p0, s_p0_Idx, i_p1) { + var result_33557962 = null; + var result_33557962_Idx = 0; + + result_33557962 = s_p0[s_p0_Idx]; result_33557962_Idx = chckIndx(subInt((s_p0[s_p0_Idx]).length, i_p1), 0, (s_p0[s_p0_Idx]).length - 1); + + return [result_33557962, result_33557962_Idx]; + +} + +function parsePattern__pkgZjesterZpatterns_u14(pattern_p0) { + var Temporary5; + var Temporary8; + var Temporary9; + var Temporary10; + var Temporary15; + var Temporary16; + + var result_1577058320 = []; + + result_1577058320 = nimCopy(null, [], NTI1577058320); + var i_1577058334 = 0; + var text_1577058335 = [[]]; + Label1: { + Label2: while (true) { + if (!(i_1577058334 < (pattern_p0).length)) break Label2; + switch (pattern_p0[chckIndx(i_1577058334, 0, (pattern_p0).length - 1)]) { + case 64: + if (!(eqStrings(text_1577058335[0], []))) { + Label3: { + var newNodeHEX60gensym1_1577058337 = ({typ: 0, text: [], optional: false}); + newNodeHEX60gensym1_1577058337.typ = 0; + newNodeHEX60gensym1_1577058337.text = nimCopy(null, text_1577058335[0], NTI33554449); + newNodeHEX60gensym1_1577058337.optional = false; + var Temporary4 = nimCopy(null, newNodeHEX60gensym1_1577058337, NTI1577058308); + result_1577058320.push(Temporary4);; + }; + text_1577058335[0] = nimCopy(null, [], NTI33554449); + } + + i_1577058334 = addInt(i_1577058334, 1); + var nparam_1577058347 = [[]]; + i_1577058334 = addInt(i_1577058334, parseUntil__pureZparseutils_u880(pattern_p0, nparam_1577058347, 0, ConstSet68, i_1577058334)); + if (((pattern_p0).length <= i_1577058334)) { + Temporary5 = 0; + } + else { + Temporary5 = pattern_p0[chckIndx(i_1577058334, 0, (pattern_p0).length - 1)]; + } + + var optional_1577058352 = (Temporary5 == 63); + Label6: { + var newNodeHEX60gensym5_1577058354 = ({typ: 0, text: [], optional: false}); + newNodeHEX60gensym5_1577058354.typ = 1; + newNodeHEX60gensym5_1577058354.text = nimCopy(null, nparam_1577058347[0], NTI33554449); + newNodeHEX60gensym5_1577058354.optional = optional_1577058352; + var Temporary7 = nimCopy(null, newNodeHEX60gensym5_1577058354, NTI1577058308); + result_1577058320.push(Temporary7);; + }; + if (((pattern_p0).length <= i_1577058334)) { + Temporary8 = 0; + } + else { + Temporary8 = pattern_p0[chckIndx(i_1577058334, 0, (pattern_p0).length - 1)]; + } + + if ((Temporary8 == 63)) { + i_1577058334 = addInt(i_1577058334, 1); + } + + break; + case 63: + var optionalChar_1577058364 = (Temporary9 = HEX5BHEX5D__system_u3527(text_1577058335, 0, 1), Temporary9)[0][Temporary9[1]]; + if (text_1577058335[0].length < (Temporary10 = chckRange(subInt((text_1577058335[0]).length, 1), 0, 2147483647), Temporary10)) { for (var i = text_1577058335[0].length; i < Temporary10; ++i) text_1577058335[0].push(0); } + else {text_1577058335[0].length = Temporary10; }; + if (!(eqStrings(text_1577058335[0], []))) { + Label11: { + var newNodeHEX60gensym11_1577058366 = ({typ: 0, text: [], optional: false}); + newNodeHEX60gensym11_1577058366.typ = 0; + newNodeHEX60gensym11_1577058366.text = nimCopy(null, text_1577058335[0], NTI33554449); + newNodeHEX60gensym11_1577058366.optional = false; + var Temporary12 = nimCopy(null, newNodeHEX60gensym11_1577058366, NTI1577058308); + result_1577058320.push(Temporary12);; + }; + text_1577058335[0] = nimCopy(null, [], NTI33554449); + } + + i_1577058334 = addInt(i_1577058334, 1); + Label13: { + var newNodeHEX60gensym12_1577058377 = ({typ: 0, text: [], optional: false}); + newNodeHEX60gensym12_1577058377.typ = 0; + newNodeHEX60gensym12_1577058377.text = nimCopy(null, nimCharToStr(optionalChar_1577058364), NTI33554449); + newNodeHEX60gensym12_1577058377.optional = true; + var Temporary14 = nimCopy(null, newNodeHEX60gensym12_1577058377, NTI1577058308); + result_1577058320.push(Temporary14);; + }; + break; + case 92: + i_1577058334 = addInt(i_1577058334, 1); + if (!((ConstSet69[pattern_p0[chckIndx(i_1577058334, 0, (pattern_p0).length - 1)]] != undefined))) { + raiseException({message: ([84,104,105,115,32,99,104,97,114,97,99,116,101,114,32,100,111,101,115,32,110,111,116,32,114,101,113,117,105,114,101,32,101,115,99,97,112,105,110,103,58,32]).concat([pattern_p0[chckIndx(i_1577058334, 0, (pattern_p0).length - 1)]]), parent: null, m_type: NTI134217746, name: null, trace: [], up: null}, "ValueError"); + } + + if (((pattern_p0).length <= i_1577058334)) { + Temporary15 = 0; + } + else { + Temporary15 = pattern_p0[chckIndx(i_1577058334, 0, (pattern_p0).length - 1)]; + } + + addChar(text_1577058335[0], Temporary15);; + i_1577058334 = addInt(i_1577058334, 1); + break; + default: + if (((pattern_p0).length <= i_1577058334)) { + Temporary16 = 0; + } + else { + Temporary16 = pattern_p0[chckIndx(i_1577058334, 0, (pattern_p0).length - 1)]; + } + + addChar(text_1577058335[0], Temporary16);; + i_1577058334 = addInt(i_1577058334, 1); + break; + } + } + }; + if (!(eqStrings(text_1577058335[0], []))) { + Label17: { + var newNodeHEX60gensym22_1577058403 = ({typ: 0, text: [], optional: false}); + newNodeHEX60gensym22_1577058403.typ = 0; + newNodeHEX60gensym22_1577058403.text = nimCopy(null, text_1577058335[0], NTI33554449); + newNodeHEX60gensym22_1577058403.optional = false; + var Temporary18 = nimCopy(null, newNodeHEX60gensym22_1577058403, NTI1577058308); + result_1577058320.push(Temporary18);; + }; + } + + + return result_1577058320; + +} + +function initTable__pkgZjesterZpatterns_u233(initialSize_p0) { + var result_1577058541 = ({data: [], counter: 0}); + + result_1577058541 = nimCopy(result_1577058541, ({data: [], counter: 0}), NTI1577058459); + var correctSizeHEX60gensym24_1577058550 = slotsNeeded__pureZcollectionsZtables_u42(chckRange(initialSize_p0, 0, 2147483647)); + result_1577058541.counter = 0; + result_1577058541.data = new Array(chckRange(correctSizeHEX60gensym24_1577058550, 0, 2147483647)); for (var i = 0 ; i < chckRange(correctSizeHEX60gensym24_1577058550, 0, 2147483647) ; ++i) { result_1577058541.data[i] = {Field0: 0, Field1: [], Field2: []}; } + return result_1577058541; + +} + +function check__pkgZjesterZpatterns_u189(n_p0, s_p1, i_p2) { + var result_1577058497 = false; + + BeforeRet: { + var cutTo_1577058498 = addInt(subInt((n_p0.text).length, 1), i_p2); + if ((subInt((s_p1).length, 1) < cutTo_1577058498)) { + result_1577058497 = false; + break BeforeRet; + } + + result_1577058497 = eqStrings(substr__system_u3776(s_p1, i_p2, cutTo_1577058498), n_p0.text); + break BeforeRet; + }; + + return result_1577058497; + +} + +function findNextText__pkgZjesterZpatterns_u170(pattern_p0, i_p1, toNode_p2) { + var result_1577058478 = false; + + BeforeRet: { + result_1577058478 = false; + Label1: { + var n_1577058487 = 0; + var colontmp__637534967 = 0; + colontmp__637534967 = subInt((pattern_p0).length, 1); + var res_637534968 = i_p1; + Label2: { + Label3: while (true) { + if (!(res_637534968 <= colontmp__637534967)) break Label3; + n_1577058487 = res_637534968; + if ((pattern_p0[chckIndx(n_1577058487, 0, (pattern_p0).length - 1)].typ == 0)) { + toNode_p2 = nimCopy(toNode_p2, pattern_p0[chckIndx(n_1577058487, 0, (pattern_p0).length - 1)], NTI1577058308); + result_1577058478 = true; + break BeforeRet; + } + + res_637534968 = addInt(res_637534968, 1); + } + }; + }; + }; + + return result_1577058478; + +} + +function parseUntil__pureZparseutils_u252(s_p0, token_p1, token_p1_Idx, until_p2) { + var result_1140850944 = 0; + + var i_1140850945 = 0; + Label1: { + Label2: while (true) { + if (!((i_1140850945 < (s_p0).length) && !((s_p0[chckIndx(i_1140850945, 0, (s_p0).length - 1)] == until_p2)))) break Label2; + i_1140850945 = addInt(i_1140850945, 1); + } + }; + result_1140850944 = i_1140850945; + fastSubstr__pureZparseutils_u225(s_p0, token_p1, token_p1_Idx, result_1140850944); + + return result_1140850944; + +} + +function parseUntil__pureZparseutils_u886(s_p0, token_p1, token_p1_Idx, until_p2, start_p3) { + var result_1140851579 = 0; + + result_1140851579 = parseUntil__pureZparseutils_u252((s_p0.slice(start_p3, (s_p0).length - 1 + 1)), token_p1, token_p1_Idx, until_p2); + + return result_1140851579; + +} + +function rawGet__pkgZjesterZpatterns_u442(t_p0, key_p1, hc_p2, hc_p2_Idx) { + var result_1577058752 = 0; + + BeforeRet: { + hc_p2[hc_p2_Idx] = hash__pureZhashes_u761(key_p1); + if ((hc_p2[hc_p2_Idx] == 0)) { + hc_p2[hc_p2_Idx] = 314159265; + } + + if (((t_p0.data).length == 0)) { + result_1577058752 = (-1); + break BeforeRet; + } + + var h_1577058802 = (hc_p2[hc_p2_Idx] & (t_p0.data).length - 1); + Label1: { + Label2: while (true) { + if (!isFilled__pureZcollectionsZtables_u31(t_p0.data[chckIndx(h_1577058802, 0, (t_p0.data).length - 1)].Field0)) break Label2; + if (((t_p0.data[chckIndx(h_1577058802, 0, (t_p0.data).length - 1)].Field0 == hc_p2[hc_p2_Idx]) && eqStrings(t_p0.data[chckIndx(h_1577058802, 0, (t_p0.data).length - 1)].Field1, key_p1))) { + result_1577058752 = h_1577058802; + break BeforeRet; + } + + h_1577058802 = nextTry__pureZcollectionsZtables_u34(h_1577058802, (t_p0.data).length - 1); + } + }; + result_1577058752 = subInt((-1), h_1577058802); + }; + + return result_1577058752; + +} + +function mustRehash__pkgZjesterZpatterns_u763(t_p0) { + var result_1577059070 = false; + + if (!((t_p0.counter < (t_p0.data).length))) { + failedAssertImpl__stdZassertions_u86([104,97,115,104,99,111,109,109,111,110,46,110,105,109,40,51,52,44,32,57,41,32,96,10,116,46,99,111,117,110,116,101,114,32,60,32,116,46,100,97,116,97,76,101,110,96,32]); + } + + result_1577059070 = (((t_p0.data).length < addInt(t_p0.counter, divInt(t_p0.counter, 2))) || (subInt((t_p0.data).length, t_p0.counter) < 4)); + + return result_1577059070; + +} + +function rawInsert__pkgZjesterZpatterns_u1180(t_p0, data_p1, data_p1_Idx, key_p2, val_p3, hc_p4, h_p5) { + data_p1[data_p1_Idx][chckIndx(h_p5, 0, (data_p1[data_p1_Idx]).length - 1)].Field1 = nimCopy(null, key_p2, NTI33554449); + data_p1[data_p1_Idx][chckIndx(h_p5, 0, (data_p1[data_p1_Idx]).length - 1)].Field2 = nimCopy(null, val_p3, NTI33554449); + data_p1[data_p1_Idx][chckIndx(h_p5, 0, (data_p1[data_p1_Idx]).length - 1)].Field0 = hc_p4; + + +} + +function enlarge__pkgZjesterZpatterns_u906(t_p0) { + var n_1577059216 = []; + n_1577059216 = new Array(chckRange(mulInt((t_p0.data).length, 2), 0, 2147483647)); for (var i = 0 ; i < chckRange(mulInt((t_p0.data).length, 2), 0, 2147483647) ; ++i) { n_1577059216[i] = {Field0: 0, Field1: [], Field2: []}; } var HEX3Atmp_637534977 = nimCopy(null, t_p0.data, NTI1577058462); + t_p0.data = n_1577059216; + n_1577059216 = HEX3Atmp_637534977; + Label1: { + var i_1577059276 = 0; + var colontmp__637534974 = 0; + colontmp__637534974 = (n_1577059216).length - 1; + var res_637534975 = 0; + Label2: { + Label3: while (true) { + if (!(res_637534975 <= colontmp__637534974)) break Label3; + i_1577059276 = res_637534975; + var eh_1577059326 = n_1577059216[chckIndx(i_1577059276, 0, (n_1577059216).length - 1)].Field0; + if (isFilled__pureZcollectionsZtables_u31(eh_1577059326)) { + var j_1577059330 = (eh_1577059326 & (t_p0.data).length - 1); + Label4: { + Label5: while (true) { + if (!isFilled__pureZcollectionsZtables_u31(t_p0.data[chckIndx(j_1577059330, 0, (t_p0.data).length - 1)].Field0)) break Label5; + j_1577059330 = nextTry__pureZcollectionsZtables_u34(j_1577059330, (t_p0.data).length - 1); + } + }; + rawInsert__pkgZjesterZpatterns_u1180(t_p0, t_p0, "data", n_1577059216[chckIndx(i_1577059276, 0, (n_1577059216).length - 1)].Field1, n_1577059216[chckIndx(i_1577059276, 0, (n_1577059216).length - 1)].Field2, eh_1577059326, j_1577059330); + } + + res_637534975 = addInt(res_637534975, 1); + } + }; + }; + + +} + +function rawGetKnownHC__pkgZjesterZpatterns_u1337(t_p0, key_p1, hc_p2) { + var result_1577059647 = 0; + + BeforeRet: { + if (((t_p0.data).length == 0)) { + result_1577059647 = (-1); + break BeforeRet; + } + + var h_1577059694 = (hc_p2 & (t_p0.data).length - 1); + Label1: { + Label2: while (true) { + if (!isFilled__pureZcollectionsZtables_u31(t_p0.data[chckIndx(h_1577059694, 0, (t_p0.data).length - 1)].Field0)) break Label2; + if (((t_p0.data[chckIndx(h_1577059694, 0, (t_p0.data).length - 1)].Field0 == hc_p2) && eqStrings(t_p0.data[chckIndx(h_1577059694, 0, (t_p0.data).length - 1)].Field1, key_p1))) { + result_1577059647 = h_1577059694; + break BeforeRet; + } + + h_1577059694 = nextTry__pureZcollectionsZtables_u34(h_1577059694, (t_p0.data).length - 1); + } + }; + result_1577059647 = subInt((-1), h_1577059694); + }; + + return result_1577059647; + +} + +function HEX5BHEX5DHEX3D__pkgZjesterZpatterns_u381(t_p0, key_p1, val_p2) { + if (((t_p0.data).length == 0)) { + var correctSizeHEX60gensym29_1577058736 = slotsNeeded__pureZcollectionsZtables_u42(32); + t_p0.counter = 0; + t_p0.data = new Array(chckRange(correctSizeHEX60gensym29_1577058736, 0, 2147483647)); for (var i = 0 ; i < chckRange(correctSizeHEX60gensym29_1577058736, 0, 2147483647) ; ++i) { t_p0.data[i] = {Field0: 0, Field1: [], Field2: []}; } } + + var hc_1577058745 = [0]; + var index_1577058968 = rawGet__pkgZjesterZpatterns_u442(t_p0, key_p1, hc_1577058745, 0); + if ((0 <= index_1577058968)) { + t_p0.data[chckIndx(index_1577058968, 0, (t_p0.data).length - 1)].Field2 = nimCopy(null, val_p2, NTI33554449); + } + else { + if (((t_p0.data).length == 0)) { + var correctSizeHEX60gensym34_1577059062 = slotsNeeded__pureZcollectionsZtables_u42(32); + t_p0.counter = 0; + t_p0.data = new Array(chckRange(correctSizeHEX60gensym34_1577059062, 0, 2147483647)); for (var i = 0 ; i < chckRange(correctSizeHEX60gensym34_1577059062, 0, 2147483647) ; ++i) { t_p0.data[i] = {Field0: 0, Field1: [], Field2: []}; } } + + if (mustRehash__pkgZjesterZpatterns_u763(t_p0)) { + enlarge__pkgZjesterZpatterns_u906(t_p0); + index_1577058968 = rawGetKnownHC__pkgZjesterZpatterns_u1337(t_p0, key_p1, hc_1577058745[0]); + } + + index_1577058968 = subInt((-1), index_1577058968); + rawInsert__pkgZjesterZpatterns_u1180(t_p0, t_p0, "data", key_p1, val_p2, hc_1577058745[0], index_1577058968); + t_p0.counter = addInt(t_p0.counter, 1); + } + + + +} + +function match__pkgZjesterZpatterns_u195(pattern_p0, s_p1) { + var result_1577058511 = {Field0: false, Field1: ({data: [], counter: 0})}; + + BeforeRet: { + var i_1577058512 = 0; + result_1577058511.Field0 = true; + result_1577058511.Field1 = nimCopy(result_1577058511.Field1, initTable__pkgZjesterZpatterns_u233(32), NTI1577058459); + Label1: { + var ncount_1577058630 = 0; + var node_1577058631 = ({typ: 0, text: [], optional: false}); + var i_637534963 = 0; + var L_637534964 = (pattern_p0).length; + Label2: { + Label3: while (true) { + if (!(i_637534963 < L_637534964)) break Label3; + ncount_1577058630 = i_637534963; + node_1577058631 = nimCopy(node_1577058631, pattern_p0[chckIndx(i_637534963, 0, (pattern_p0).length - 1)], NTI1577058308); + switch (node_1577058631.typ) { + case 0: + if (node_1577058631.optional) { + if (check__pkgZjesterZpatterns_u189(node_1577058631, s_p1, i_1577058512)) { + i_1577058512 = addInt(i_1577058512, (node_1577058631.text).length); + } + else { + } + + } + else { + if (check__pkgZjesterZpatterns_u189(node_1577058631, s_p1, i_1577058512)) { + i_1577058512 = addInt(i_1577058512, (node_1577058631.text).length); + } + else { + result_1577058511.Field0 = false; + break BeforeRet; + } + + } + + break; + case 1: + var nextTxtNode_1577058642 = [({typ: 0, text: [], optional: false})]; + var stopChar_1577058643 = 47; + if (findNextText__pkgZjesterZpatterns_u170(pattern_p0, ncount_1577058630, nextTxtNode_1577058642[0])) { + stopChar_1577058643 = nextTxtNode_1577058642[0].text[chckIndx(0, 0, (nextTxtNode_1577058642[0].text).length - 1)]; + } + + var matchNamed_1577058644 = [[]]; + i_1577058512 = addInt(i_1577058512, parseUntil__pureZparseutils_u886(s_p1, matchNamed_1577058644, 0, stopChar_1577058643, i_1577058512)); + HEX5BHEX5DHEX3D__pkgZjesterZpatterns_u381(result_1577058511.Field1, node_1577058631.text, matchNamed_1577058644[0]); + if ((eqStrings(matchNamed_1577058644[0], []) && !(node_1577058631.optional))) { + result_1577058511.Field0 = false; + break BeforeRet; + } + + break; + } + i_637534963 += 1; + if (!(((pattern_p0).length == L_637534964))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(187, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + if (!(((s_p1).length == i_1577058512))) { + result_1577058511.Field0 = false; + } + + }; + + return result_1577058511; + +} + +function skip__pureZparseutils_u145(s_p0, token_p1) { + var result_1140850836 = 0; + + result_1140850836 = 0; + Label1: { + Label2: while (true) { + if (!(((result_1140850836 < (s_p0).length) && (result_1140850836 < (token_p1).length)) && (s_p0[chckIndx(result_1140850836, 0, (s_p0).length - 1)] == token_p1[chckIndx(result_1140850836, 0, (token_p1).length - 1)]))) break Label2; + result_1140850836 = addInt(result_1140850836, 1); + } + }; + if (!((result_1140850836 == (token_p1).length))) { + result_1140850836 = 0; + } + + + return result_1140850836; + +} + +function skip__pureZparseutils_u855(s_p0, token_p1, start_p2) { + var result_1140851547 = 0; + + result_1140851547 = skip__pureZparseutils_u145((s_p0.slice(start_p2, (s_p0).length - 1 + 1)), token_p1); + + return result_1140851547; + +} + +function parseUrlQuery__karaxutils_u257(query_p0, result_p1) { + var i_1862271238 = 0; + i_1862271238 = skip__pureZparseutils_u855(query_p0, [63], 0); + Label1: { + Label2: while (true) { + if (!(i_1862271238 < subInt((query_p0).length, 1))) break Label2; + var key_1862271239 = [[]]; + var val_1862271240 = [[]]; + i_1862271238 = addInt(i_1862271238, parseUntil__pureZparseutils_u886(query_p0, key_1862271239, 0, 61, i_1862271238)); + if (!((query_p0[chckIndx(i_1862271238, 0, (query_p0).length - 1)] == 61))) { + raiseException({message: ([69,120,112,101,99,116,101,100,32,39,61,39,32,97,116,32]).concat(HEX24__systemZdollars_u14(i_1862271238),[32,98,117,116,32,103,111,116,58,32],nimCharToStr(query_p0[chckIndx(i_1862271238, 0, (query_p0).length - 1)])), parent: null, m_type: NTI134217746, name: null, trace: [], up: null}, "ValueError"); + } + + i_1862271238 = addInt(i_1862271238, 1); + i_1862271238 = addInt(i_1862271238, parseUntil__pureZparseutils_u886(query_p0, val_1862271240, 0, 38, i_1862271238)); + i_1862271238 = addInt(i_1862271238, 1); + HEX5BHEX5DHEX3D__pkgZjesterZpatterns_u381(result_p1, cstrToNimstr(decodeURI(toJSStr(key_1862271239[0]))), cstrToNimstr(decodeURI(toJSStr(val_1862271240[0])))); + } + }; + + +} + +function render404__error_u14() { + var result_1946157071 = null; + + var tmp_1946157072 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1946157072.class = "empty error"; + var tmp_1946157073 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1946157073.class = "empty icon"; + var tmp_1946157074 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1946157074.class = "fas fa-bug fa-5x"; + add__pkgZkaraxZvdom_u794(tmp_1946157073, tmp_1946157074); + add__pkgZkaraxZvdom_u794(tmp_1946157072, tmp_1946157073); + var tmp_1946157075 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_1946157075.class = "empty-title h5"; + add__pkgZkaraxZvdom_u794(tmp_1946157075, text__pkgZkaraxZvdom_u948([52,48,52,32,78,111,116,32,70,111,117,110,100])); + add__pkgZkaraxZvdom_u794(tmp_1946157072, tmp_1946157075); + var tmp_1946157076 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_1946157076.class = "empty-subtitle"; + add__pkgZkaraxZvdom_u794(tmp_1946157076, text__pkgZkaraxZvdom_u948(makeNimstrLit("Cannot find what you are looking for, it might have been deleted. Sorry!"))); + add__pkgZkaraxZvdom_u794(tmp_1946157072, tmp_1946157076); + var tmp_1946157077 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1946157077.class = "empty-action"; + var tmp_1946157078 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_1946157078, "href", "/"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_1946157078, 0, anchorCB__karaxutils_u166, kxi__); + var tmp_1946157079 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_1946157079.class = "btn btn-primary"; + add__pkgZkaraxZvdom_u794(tmp_1946157079, text__pkgZkaraxZvdom_u948([71,111,32,98,97,99,107,32,104,111,109,101])); + add__pkgZkaraxZvdom_u794(tmp_1946157078, tmp_1946157079); + add__pkgZkaraxZvdom_u794(tmp_1946157077, tmp_1946157078); + add__pkgZkaraxZvdom_u794(tmp_1946157072, tmp_1946157077); + result_1946157071 = tmp_1946157072; + + return result_1946157071; + +} + +function renderError__error_u24(message_p0, status_p1) { + var result_1946157083 = null; + + BeforeRet: { + if ((status_p1 == 404)) { + result_1946157083 = render404__error_u14(); + break BeforeRet; + } + + var tmp_1946157084 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1946157084.class = "empty error"; + var tmp_1946157085 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1946157085.class = "empty icon"; + var tmp_1946157086 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1946157086.class = "fas fa-bug fa-5x"; + add__pkgZkaraxZvdom_u794(tmp_1946157085, tmp_1946157086); + add__pkgZkaraxZvdom_u794(tmp_1946157084, tmp_1946157085); + var tmp_1946157087 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_1946157087.class = "empty-title h5"; + add__pkgZkaraxZvdom_u794(tmp_1946157087, text__pkgZkaraxZvdom_u948(message_p0)); + add__pkgZkaraxZvdom_u794(tmp_1946157084, tmp_1946157087); + var tmp_1946157088 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_1946157088.class = "empty-subtitle"; + add__pkgZkaraxZvdom_u794(tmp_1946157088, text__pkgZkaraxZvdom_u948([80,108,101,97,115,101,32,114,101,112,111,114,116,32,116,104,105,115,32,105,115,115,117,101,32,116,111,32,117,115,32,115,111,32,119,101,32,99,97,110,32,102,105,120,32,105,116,33])); + add__pkgZkaraxZvdom_u794(tmp_1946157084, tmp_1946157088); + var tmp_1946157089 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1946157089.class = "empty-action"; + var tmp_1946157090 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_1946157090, "href", "https://github.com/nim-lang/nimforum/issues"); + setAttr__pkgZkaraxZvdom_u713(tmp_1946157090, "target", "_blank"); + var tmp_1946157091 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_1946157091.class = "btn btn-primary"; + add__pkgZkaraxZvdom_u794(tmp_1946157091, text__pkgZkaraxZvdom_u948([82,101,112,111,114,116,32,105,115,115,117,101])); + add__pkgZkaraxZvdom_u794(tmp_1946157090, tmp_1946157091); + add__pkgZkaraxZvdom_u794(tmp_1946157089, tmp_1946157090); + add__pkgZkaraxZvdom_u794(tmp_1946157084, tmp_1946157089); + result_1946157083 = tmp_1946157084; + }; + + return result_1946157083; + +} + +function route__forum_u168(routes_p0) { + var Temporary1; + + var result_637534378 = null; + + BeforeRet: { + if ((((state_637534328[0].url.pathname) == null ? 0 : (state_637534328[0].url.pathname).length) == 0)) { + Temporary1 = [47]; + } + else { + Temporary1 = cstrToNimstr(state_637534328[0].url.pathname); + } + + var path_637534379 = nimCopy(null, Temporary1, NTI33554449); + var prefix_637534380 = []; + Label2: { + var route_637534394 = ({n: [], p: null}); + var i_637534949 = 0; + Label3: { + Label4: while (true) { + if (!(i_637534949 < (routes_p0).length)) break Label4; + route_637534394 = routes_p0[chckIndx(i_637534949, 0, (routes_p0).length - 1)]; + var pattern_637534395 = parsePattern__pkgZjesterZpatterns_u14((prefix_637534380).concat(route_637534394.n)); + var tmpTuple_637534396 = match__pkgZjesterZpatterns_u195(pattern_637534395, path_637534379); + var matched_637534397 = tmpTuple_637534396["Field0"]; + var params_637534398 = [nimCopy(null, tmpTuple_637534396["Field1"], NTI1577058459)]; + parseUrlQuery__karaxutils_u257(cstrToNimstr(state_637534328[0].url.search), params_637534398[0]); + if (matched_637534397) { + result_637534378 = route_637534394.p(params_637534398[0]); + break BeforeRet; + } + + i_637534949 += 1; + } + }; + }; + result_637534378 = renderError__error_u24(([85,110,109,97,116,99,104,101,100,32,114,111,117,116,101,58,32]).concat(path_637534379), 500); + break BeforeRet; + }; + + return result_637534378; + +} + +function r__forum_u131(n_p0, p_p1) { + var result_637534344 = ({n: [], p: null}); + + result_637534344 = nimCopy(result_637534344, {n: nimCopy(null, n_p0, NTI33554449), p: p_p1}, NTI637534264); + + return result_637534344; + +} + +function isSome__pureZtimes_u3701(self_p0) { + var result_1627393656 = false; + + result_1627393656 = self_p0.has; + + return result_1627393656; + +} + +function isNone__pureZtimes_u3771(self_p0) { + var result_1627393726 = false; + + result_1627393726 = !(self_p0.has); + + return result_1627393726; + +} + +function get__pureZtimes_u3785(self_p0) { + var result_1627393740 = 0; + + if (isNone__pureZtimes_u3771(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_1627393740 = self_p0["val"]; + + return result_1627393740; + +} + +function setAddEnabled__categorypicker_u723(state_p0, enabled_p1) { + state_p0.addEnabled = enabled_p1; + + +} + +function isSome__user_u39(self_p0) { + var result_1929379882 = false; + + result_1929379882 = self_p0.has; + + return result_1929379882; + +} + +function isAdmin__user_u28(user_p0) { + var result_1929379875 = false; + + BeforeRet: { + result_1929379875 = (isSome__user_u39(user_p0) && (get__user_u53(user_p0).rank == 8)); + break BeforeRet; + }; + + return result_1929379875; + +} + +function new__categorypicker_u84() { + var result_1979711575 = null; + + BeforeRet: { + var r_1979711577 = null; + r_1979711577 = ({categories: []}); + result_1979711575 = r_1979711577; + break BeforeRet; + }; + + return result_1979711575; + +} + +function initFromJson__addcategorymodal_u121(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_1996488831 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,105,100]);; + initFromJson__addcategorymodal_u150(dst_p0, "id", getOrDefault__pureZjson_u3507(jsonNode_p1, [105,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1996488831, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1996488831, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1996488831, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,110,97,109,101]);; + initFromJson__pureZjson_u5295(dst_p0, "name", getOrDefault__pureZjson_u3507(jsonNode_p1, [110,97,109,101]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1996488831, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1996488831, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1996488831, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,100,101,115,99,114,105,112,116,105,111,110]);; + initFromJson__pureZjson_u5295(dst_p0, "description", getOrDefault__pureZjson_u3507(jsonNode_p1, [100,101,115,99,114,105,112,116,105,111,110]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1996488831, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1996488831, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1996488831, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,99,111,108,111,114]);; + initFromJson__pureZjson_u5295(dst_p0, "color", getOrDefault__pureZjson_u3507(jsonNode_p1, [99,111,108,111,114]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1996488831, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1996488831, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1996488831, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,110,117,109,84,111,112,105,99,115]);; + initFromJson__addcategorymodal_u150(dst_p0, "numTopics", getOrDefault__pureZjson_u3507(jsonNode_p1, [110,117,109,84,111,112,105,99,115]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1996488831, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1996488831, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1996488831, 0, 2147483647); }; + + +} + +function initFromJson__categorypicker_u135(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet72[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym7_1979711640 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet73), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym7_1979711640, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if (dst_p0[dst_p0_Idx].length < (Temporary1 = chckRange(len__pureZjson_u3028(jsonNode_p1), 0, 2147483647), Temporary1)) { for (var i = dst_p0[dst_p0_Idx].length ; i < Temporary1 ; ++i) dst_p0[dst_p0_Idx].push(({id: 0, name: [], description: [], color: [], numTopics: 0})); } + else { dst_p0[dst_p0_Idx].length = Temporary1; }; + var orignalJsonPathLen_1979711646 = (jsonPath_p2[jsonPath_p2_Idx]).length; + Label2: { + var i_1979711651 = 0; + var colontmp__637534991 = 0; + colontmp__637534991 = len__pureZjson_u3028(jsonNode_p1); + var i_637534992 = 0; + Label3: { + Label4: while (true) { + if (!(i_637534992 < colontmp__637534991)) break Label4; + i_1979711651 = i_637534992; + addChar(jsonPath_p2[jsonPath_p2_Idx], 91);; + addInt__stdZprivateZdigitsutils_u241(jsonPath_p2, jsonPath_p2_Idx, i_1979711651); + addChar(jsonPath_p2[jsonPath_p2_Idx], 93);; + initFromJson__addcategorymodal_u121(dst_p0[dst_p0_Idx][chckIndx(i_1979711651, 0, (dst_p0[dst_p0_Idx]).length - 1)], HEX5BHEX5D__pureZjson_u3153(jsonNode_p1, i_1979711651), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(orignalJsonPathLen_1979711646, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(orignalJsonPathLen_1979711646, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(orignalJsonPathLen_1979711646, 0, 2147483647); }; + i_637534992 = addInt(i_637534992, 1); + } + }; + }; + + +} + +function initFromJson__categorypicker_u125(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_1979711619 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,99,97,116,101,103,111,114,105,101,115]);; + initFromJson__categorypicker_u135(dst_p0, "categories", getOrDefault__pureZjson_u3507(jsonNode_p1, [99,97,116,101,103,111,114,105,101,115]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1979711619, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1979711619, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1979711619, 0, 2147483647); }; + + +} + +function initFromJson__categorypicker_u61(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet70[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym1_1979711566 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet71), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym1_1979711566, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if ((jsonNode_p1.kind == 0)) { + dst_p0[dst_p0_Idx] = null; + } + else { + dst_p0[dst_p0_Idx] = new__categorypicker_u84(); + initFromJson__categorypicker_u125(dst_p0[dst_p0_Idx], jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx); + } + + + +} + +function to__categorypicker_u49(node_p0) { + var result_1979711542 = [null]; + + var jsonPath_1979711543 = [[]]; + result_1979711542[0] = null; + initFromJson__categorypicker_u61(result_1979711542, 0, node_p0, jsonPath_1979711543, 0); + + return result_1979711542[0]; + +} + +function isSome__categorypicker_u324(self_p0) { + var result_1979711815 = false; + + result_1979711815 = !((self_p0.val == null)); + + return result_1979711815; + +} + +function add__categorypicker_u373(x_p0, x_p0_Idx, y_p1) { + var Temporary1; + + var xl_1979711869 = (x_p0[x_p0_Idx]).length; + if (x_p0[x_p0_Idx].length < (Temporary1 = chckRange(addInt(xl_1979711869, (y_p1).length), 0, 2147483647), Temporary1)) { for (var i = x_p0[x_p0_Idx].length ; i < Temporary1 ; ++i) x_p0[x_p0_Idx].push(({id: 0, name: [], description: [], color: [], numTopics: 0})); } + else { x_p0[x_p0_Idx].length = Temporary1; }; + Label2: { + var i_1979711884 = 0; + var colontmp__637534995 = 0; + colontmp__637534995 = (y_p1).length - 1; + var res_637534996 = 0; + Label3: { + Label4: while (true) { + if (!(res_637534996 <= colontmp__637534995)) break Label4; + i_1979711884 = res_637534996; + x_p0[x_p0_Idx][chckIndx(addInt(xl_1979711869, i_1979711884), 0, (x_p0[x_p0_Idx]).length - 1)] = nimCopy(x_p0[x_p0_Idx][chckIndx(addInt(xl_1979711869, i_1979711884), 0, (x_p0[x_p0_Idx]).length - 1)], y_p1[chckIndx(i_1979711884, 0, (y_p1).length - 1)], NTI1845493763); + res_637534996 = addInt(res_637534996, 1); + } + }; + }; + + +} + +function some__categorypicker_u397(val_p0) { + var result_1979711888 = ({val: null}); + + if (!(!((val_p0 == null)))) { + failedAssertImpl__stdZassertions_u86([111,112,116,105,111,110,115,46,110,105,109,40,49,51,57,44,32,53,41,32,96,110,111,116,32,118,97,108,46,105,115,78,105,108,96,32]); + } + + result_1979711888 = nimCopy(result_1979711888, {val: val_p0}, NTI1979711498); + + return result_1979711888; + +} + +function onCategoryLoad__categorypicker_u39(state_p0) { + +function HEX3Aanonymous__categorypicker_u45(httpStatus_p0, response_p1) { + var Temporary1; + var Temporary2; + + BeforeRet: { + state_p0.loading = false; + state_p0.status = chckRange(httpStatus_p0, 0, 599); + if (!((state_p0.status == 200))) { + break BeforeRet; + } + + var parsed_1979711536 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var list_1979711662 = to__categorypicker_u49(parsed_1979711536); + sort__categorypicker_u177(list_1979711662.categories, cmpNames__category_u20, 1); + if (isSome__categorypicker_u324(state_p0.list)) { + add__categorypicker_u373((Temporary1 = get__categorypicker_u341(state_p0.list), Temporary1)[0][Temporary1[1]], "categories", list_1979711662.categories); + } + else { + state_p0.list = nimCopy(state_p0.list, some__categorypicker_u397(list_1979711662), NTI1979711498); + } + + if ((((Temporary2 = get__categorypicker_u341(state_p0.list), Temporary2)[0][Temporary2[1]].categories).length < state_p0.selectedCategoryID)) { + state_p0.selectedCategoryID = 0; + } + + }; + + + } + + var result_1979711532 = null; + + BeforeRet: { + result_1979711532 = HEX3Aanonymous__categorypicker_u45; + break BeforeRet; + }; + + return result_1979711532; + +} + +function loadCategories__categorypicker_u488(state_p0) { + if (!(state_p0.loading)) { + state_p0.loading = true; + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(makeUri__karaxutils_u123([99,97,116,101,103,111,114,105,101,115,46,106,115,111,110], [], [47], false, true)), [], onCategoryLoad__categorypicker_u39(state_p0), true, kxi__); + } + + + +} + +function HEX5BHEX5D__categorypicker_u494(state_p0, id_p1) { + var Temporary2; + + var result_1979711985 = ({id: 0, name: [], description: [], color: [], numTopics: 0}); + + BeforeRet: { + Label1: { + var cat_1979712019 = ({id: 0, name: [], description: [], color: [], numTopics: 0}); + var colontmp__637534999 = []; + colontmp__637534999 = (Temporary2 = get__categorypicker_u341(state_p0.list), Temporary2)[0][Temporary2[1]].categories; + var i_637535000 = 0; + var L_637535001 = (colontmp__637534999).length; + Label3: { + Label4: while (true) { + if (!(i_637535000 < L_637535001)) break Label4; + cat_1979712019 = colontmp__637534999[chckIndx(i_637535000, 0, (colontmp__637534999).length - 1)]; + if ((cat_1979712019.id == id_p1)) { + result_1979711985 = nimCopy(result_1979711985, cat_1979712019, NTI1845493763); + break BeforeRet; + } + + i_637535000 += 1; + if (!(((colontmp__637534999).length == L_637535001))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + raiseException({message: ([67,97,116,101,103,111,114,121,32,97,116,32]).concat(HEX24__systemZdollars_u14(id_p1),[32,110,111,116,32,102,111,117,110,100,33]), parent: null, m_type: NTI134217749, name: null, trace: [], up: null}, "IndexDefect"); + }; + + return result_1979711985; + +} + +function HEX5BHEX5D__pureZstrutils_u1280(s_p0, x_p1) { + var result_1124074757 = []; + + var a_1124074759 = x_p1.a; + var L_1124074761 = addInt(subInt(x_p1.b, a_1124074759), 1); + result_1124074757 = nimCopy(null, mnewString(chckRange(L_1124074761, 0, 2147483647)), NTI33554449); + Label1: { + var i_1124074766 = 0; + var i_637535004 = 0; + Label2: { + Label3: while (true) { + if (!(i_637535004 < L_1124074761)) break Label3; + i_1124074766 = i_637535004; + result_1124074757[chckIndx(i_1124074766, 0, (result_1124074757).length - 1)] = s_p0[chckIndx(addInt(i_1124074766, a_1124074759), 0, (s_p0).length - 1)]; + i_637535004 = addInt(i_637535004, 1); + } + }; + }; + + return result_1124074757; + +} + +function HEX2EHEX2E__stdZstrbasics_u48(a_p0, b_p1) { + var result_1207959605 = ({a: 0, b: 0}); + + result_1207959605 = nimCopy(result_1207959605, {a: a_p0, b: b_p1}, NTI956301382); + + return result_1207959605; + +} + +function limit__karaxutils_u5(str_p0, n_p1) { + var result_1862270984 = []; + + BeforeRet: { + if ((n_p1 < (str_p0).length)) { + result_1862270984 = nimCopy(null, (HEX5BHEX5D__pureZstrutils_u1280(str_p0, HEX2EHEX2E__stdZstrbasics_u48(0, subInt(subInt(n_p1, 3), 1)))).concat([46,46,46]), NTI33554449); + break BeforeRet; + } + else { + result_1862270984 = nimCopy(null, str_p0, NTI33554449); + break BeforeRet; + } + + }; + + return result_1862270984; + +} + +function render__category_u32(category_p0, compact_p1) { + var result_1845493795 = null; + + BeforeRet: { + if (((category_p0.name).length == 0)) { + var tmp_1845493822 = tree__pkgZkaraxZvdom_u880(71, []); + result_1845493795 = tmp_1845493822; + break BeforeRet; + } + + var tmp_1845493823 = tree__pkgZkaraxZvdom_u880(44, []); + var tmp_1845493824 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1845493824.class = "category-status"; + var tmp_1845493826 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1845493826.class = "category"; + setAttr__pkgZkaraxZvdom_u713(tmp_1845493826, "title", toJSStr(category_p0.description)); + setAttr__pkgZkaraxZvdom_u713(tmp_1845493826, "data-color", toJSStr(([35]).concat(category_p0.color))); + var tmp_1845493827 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1845493827.class = "category-color"; + tmp_1845493827.style = style__pkgZkaraxZvstyles_u426([{Field0: 22, Field1: ("0.25rem solid #" + toJSStr(category_p0.color))}]); + add__pkgZkaraxZvdom_u794(tmp_1845493826, tmp_1845493827); + var tmp_1845493828 = tree__pkgZkaraxZvdom_u880(71, []); + tmp_1845493828.class = "category-name"; + add__pkgZkaraxZvdom_u794(tmp_1845493828, text__pkgZkaraxZvdom_u948(category_p0.name)); + add__pkgZkaraxZvdom_u794(tmp_1845493826, tmp_1845493828); + if (!(compact_p1)) { + var tmp_1845493829 = tree__pkgZkaraxZvdom_u880(71, []); + tmp_1845493829.class = "topic-count"; + add__pkgZkaraxZvdom_u794(tmp_1845493829, text__pkgZkaraxZvdom_u948(([195,151,32]).concat(HEX24__systemZdollars_u14(category_p0.numTopics)))); + add__pkgZkaraxZvdom_u794(tmp_1845493826, tmp_1845493829); + } + + add__pkgZkaraxZvdom_u794(tmp_1845493824, tmp_1845493826); + add__pkgZkaraxZvdom_u794(tmp_1845493823, tmp_1845493824); + if (!(compact_p1)) { + var tmp_1845493830 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1845493830.class = "category-description"; + add__pkgZkaraxZvdom_u794(tmp_1845493830, text__pkgZkaraxZvdom_u948(limit__karaxutils_u5(category_p0.description, 250))); + add__pkgZkaraxZvdom_u794(tmp_1845493823, tmp_1845493830); + } + + result_1845493795 = tmp_1845493823; + }; + + return result_1845493795; + +} + +function nsuToLowerAsciiChar(c_p0) { + var result_1124073559 = 0; + + if ((ConstSet74[c_p0] != undefined)) { + result_1124073559 = (c_p0 ^ 32); + } + else { + result_1124073559 = c_p0; + } + + + return result_1124073559; + +} + +function nsuToLowerAsciiStr(s_p0) { + var result_1124073569 = []; + + result_1124073569 = nimCopy(null, mnewString(chckRange((s_p0).length, 0, 2147483647)), NTI33554449); + Label1: { + var iHEX60gensym7_1124073575 = 0; + var colontmp__637535007 = 0; + colontmp__637535007 = subInt((s_p0).length, 1); + var res_637535008 = 0; + Label2: { + Label3: while (true) { + if (!(res_637535008 <= colontmp__637535007)) break Label3; + iHEX60gensym7_1124073575 = res_637535008; + result_1124073569[chckIndx(iHEX60gensym7_1124073575, 0, (result_1124073569).length - 1)] = nsuToLowerAsciiChar(s_p0[chckIndx(iHEX60gensym7_1124073575, 0, (s_p0).length - 1)]); + res_637535008 = addInt(res_637535008, 1); + } + }; + }; + + return result_1124073569; + +} + +function substr__system_u3794(s_p0, first_p1) { + var result_33558229 = []; + + result_33558229 = nimCopy(null, substr__system_u3776(s_p0, first_p1, (s_p0).length - 1), NTI33554449); + + return result_33558229; + +} + +function nsuReplaceStr(s_p0, sub_p1, by_p2) { + var result_1124075363 = []; + + result_1124075363 = nimCopy(null, [], NTI33554449); + var subLen_1124075364 = (sub_p1).length; + if ((subLen_1124075364 == 0)) { + result_1124075363 = nimCopy(null, s_p0, NTI33554449); + } + else { + if ((subLen_1124075364 == 1)) { + var c_1124075365 = sub_p1[chckIndx(0, 0, (sub_p1).length - 1)]; + var last_1124075366 = (s_p0).length - 1; + var i_1124075367 = 0; + Label1: { + Label2: while (true) { + if (!true) break Label2; + var j_1124075368 = nsuFindChar(s_p0, c_1124075365, chckRange(i_1124075367, 0, 2147483647), last_1124075366); + if ((j_1124075368 < 0)) { + break Label1; + } + + nimAddStrStr(result_1124075363, substr__system_u3776(s_p0, i_1124075367, subInt(j_1124075368, 1)));; + nimAddStrStr(result_1124075363, by_p2);; + i_1124075367 = addInt(j_1124075368, subLen_1124075364); + } + }; + nimAddStrStr(result_1124075363, substr__system_u3794(s_p0, i_1124075367));; + } + else { + var a_1124075369 = nsuInitNewSkipTable(sub_p1); + var last_1124075370 = (s_p0).length - 1; + var i_1124075371 = 0; + Label3: { + Label4: while (true) { + if (!true) break Label4; + var j_1124075372 = nsuFindStrA(a_1124075369, s_p0, sub_p1, chckRange(i_1124075371, 0, 2147483647), last_1124075370); + if ((j_1124075372 < 0)) { + break Label3; + } + + nimAddStrStr(result_1124075363, substr__system_u3776(s_p0, i_1124075371, subInt(j_1124075372, 1)));; + nimAddStrStr(result_1124075363, by_p2);; + i_1124075371 = addInt(j_1124075372, subLen_1124075364); + } + }; + nimAddStrStr(result_1124075363, substr__system_u3794(s_p0, i_1124075371));; + } + } + + return result_1124075363; + +} + +function nsuStrip(s_p0, leading_p1, trailing_p2, chars_p3) { + var result_1124076109 = []; + + var first_1124076110 = 0; + var last_1124076111 = subInt((s_p0).length, 1); + if (leading_p1) { + Label1: { + Label2: while (true) { + if (!((first_1124076110 <= last_1124076111) && (chars_p3[s_p0[chckIndx(first_1124076110, 0, (s_p0).length - 1)]] != undefined))) break Label2; + first_1124076110 = addInt(first_1124076110, 1); + } + }; + } + + if (trailing_p2) { + Label3: { + Label4: while (true) { + if (!((first_1124076110 <= last_1124076111) && (chars_p3[s_p0[chckIndx(last_1124076111, 0, (s_p0).length - 1)]] != undefined))) break Label4; + last_1124076111 = subInt(last_1124076111, 1); + } + }; + } + + result_1124076109 = nimCopy(null, substr__system_u3776(s_p0, first_1124076110, last_1124076111), NTI33554449); + + return result_1124076109; + +} + +function slug__karaxutils_u33(name_p0) { + var result_1862271011 = []; + + result_1862271011 = nimCopy(null, nsuToLowerAsciiStr(nsuReplaceStr(nsuStrip(name_p0, true, true, ConstSet75), [32], [45])), NTI33554449); + + return result_1862271011; + +} + +function onCategoryClick__categorypicker_u726(state_p0, category_p1) { + +function HEX3Aanonymous__categorypicker_u734(ev_p0, n_p1) { + var oldCategory_1979712225 = HEX5BHEX5D__categorypicker_u494(state_p0, state_p0.selectedCategoryID); + select__categorypicker_u556(state_p0, cat_1979712221.id); + state_p0.onCategoryChange(oldCategory_1979712225, cat_1979712221); + + + } + + var result_1979712220 = null; + + BeforeRet: { + var cat_1979712221 = nimCopy(null, category_p1, NTI1845493763); + result_1979712220 = HEX3Aanonymous__categorypicker_u734; + break BeforeRet; + }; + + return result_1979712220; + +} + +function setModalShown__addcategorymodal_u383(state_p0, visible_p1) { + state_p0.modalShown = visible_p1; + state_p0.version = addInt(state_p0.version, 1); + + +} + +function onModalClose__addcategorymodal_u391(state_p0, ev_p1, n_p2) { + setModalShown__addcategorymodal_u383(state_p0, false); + ev_p1.preventDefault(); + + +} + +function to__addcategorymodal_u109(node_p0) { + var result_1996488818 = [({id: 0, name: [], description: [], color: [], numTopics: 0})]; + + var jsonPath_1996488819 = [[]]; + result_1996488818[0] = nimCopy(result_1996488818[0], ({id: 0, name: [], description: [], color: [], numTopics: 0}), NTI1845493763); + initFromJson__addcategorymodal_u121(result_1996488818[0], node_p0, jsonPath_1996488819, 0); + + return result_1996488818[0]; + +} + +function onAddCategoryPost__addcategorymodal_u100(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym0_1996488811 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym0_1996488811 == 200)) { + state_p2.modalShown = false; + var j_1996488812 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var category_1996488917 = to__addcategorymodal_u109(j_1996488812); + state_p2.onAddCategory(category_1996488917); + } + else { +++excHandler; + try { + var parsedHEX60gensym0_1996488918 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym0_1996488977 = to__addcategorymodal_u215(parsedHEX60gensym0_1996488918); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym0_1996488977), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onAddCategoryClick__addcategorymodal_u307(state_p0) { + +function HEX3Aanonymous__addcategorymodal_u364(s_p0, r_p1) { + onAddCategoryPost__addcategorymodal_u100(s_p0, r_p1, state_p0); + + + } + + state_p0.loading = true; + state_p0.error = nimCopy(state_p0.error, none__addcategorymodal_u322(), NTI1946157155); + var uri_1996489039 = makeUri__karaxutils_u123([99,114,101,97,116,101,67,97,116,101,103,111,114,121], [], [47], false, true); + var form_1996489040 = document.getElementById("add-category-form"); + var formData_1996489041 = new FormData(form_1996489040); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_1996489039), [], (formData_1996489041), HEX3Aanonymous__addcategorymodal_u364, true, kxi__); + + +} + +function render__addcategorymodal_u395(state_p0) { + +function HEX3Aanonymous__addcategorymodal_u407(ev_p0, n_p1) { + onModalClose__addcategorymodal_u391(state_p0, ev_p0, n_p1); + + + } + +function HEX3Aanonymous__addcategorymodal_u411(ev_p0, n_p1) { + onAddCategoryClick__addcategorymodal_u307(state_p0); + + + } + + var result_1996489101 = null; + + var tmp_1996489102 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1996489102.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [97,99,116,105,118,101], Field1: state_p0.modalShown}, NTI1996488970)], [109,111,100,97,108,32,109,111,100,97,108,45,115,109])); + var tmp_1996489103 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_1996489103, "href", ""); + tmp_1996489103.class = "modal-overlay"; + setAttr__pkgZkaraxZvdom_u713(tmp_1996489103, "aria-label", "close"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_1996489103, 0, HEX3Aanonymous__addcategorymodal_u407, kxi__); + add__pkgZkaraxZvdom_u794(tmp_1996489102, tmp_1996489103); + var tmp_1996489104 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1996489104.class = "modal-container"; + var tmp_1996489105 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1996489105.class = "modal-header"; + var tmp_1996489106 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1996489106.class = "card-title h5"; + add__pkgZkaraxZvdom_u794(tmp_1996489106, text__pkgZkaraxZvdom_u948([65,100,100,32,78,101,119,32,67,97,116,101,103,111,114,121])); + add__pkgZkaraxZvdom_u794(tmp_1996489105, tmp_1996489106); + add__pkgZkaraxZvdom_u794(tmp_1996489104, tmp_1996489105); + var tmp_1996489107 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1996489107.class = "modal-body"; + var tmp_1996489108 = tree__pkgZkaraxZvdom_u880(190, []); + tmp_1996489108.id = "add-category-form"; + add__pkgZkaraxZvdom_u794(tmp_1996489108, genFormField__error_u46(state_p0.error, [110,97,109,101], [78,97,109,101], [116,101,120,116], false, [67,97,116,101,103,111,114,121,32,78,97,109,101])); + add__pkgZkaraxZvdom_u794(tmp_1996489108, genFormField__error_u46(state_p0.error, [99,111,108,111,114], [67,111,108,111,114], [99,111,108,111,114], false, [35,88,88,89,89,90,90])); + add__pkgZkaraxZvdom_u794(tmp_1996489108, genFormField__error_u46(state_p0.error, [100,101,115,99,114,105,112,116,105,111,110], [68,101,115,99,114,105,112,116,105,111,110], [116,101,120,116], true, [68,101,115,99,114,105,112,116,105,111,110])); + add__pkgZkaraxZvdom_u794(tmp_1996489107, tmp_1996489108); + add__pkgZkaraxZvdom_u794(tmp_1996489104, tmp_1996489107); + var tmp_1996489109 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1996489109.class = "modal-footer"; + var tmp_1996489110 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_1996489110.id = "add-category-btn"; + tmp_1996489110.class = "btn btn-primary"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_1996489110, 0, HEX3Aanonymous__addcategorymodal_u411, kxi__); + add__pkgZkaraxZvdom_u794(tmp_1996489110, text__pkgZkaraxZvdom_u948([65,100,100])); + add__pkgZkaraxZvdom_u794(tmp_1996489109, tmp_1996489110); + add__pkgZkaraxZvdom_u794(tmp_1996489104, tmp_1996489109); + add__pkgZkaraxZvdom_u794(tmp_1996489102, tmp_1996489104); + result_1996489101 = tmp_1996489102; + + return result_1996489101; + +} + +function genAddCategory__categorypicker_u740(state_p0) { + +function HEX3Aanonymous__categorypicker_u746(ev_p0, n_p1) { + setModalShown__addcategorymodal_u383(state_p0.addCategoryModal, true); + + + } + + var result_1979712230 = null; + + var tmp_1979712231 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1979712231.id = "add-category"; + var tmp_1979712232 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_1979712232.class = "plus-btn btn btn-link"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_1979712232, 0, HEX3Aanonymous__categorypicker_u746, kxi__); + var tmp_1979712233 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1979712233.class = "fas fa-plus"; + add__pkgZkaraxZvdom_u794(tmp_1979712232, tmp_1979712233); + add__pkgZkaraxZvdom_u794(tmp_1979712231, tmp_1979712232); + add__pkgZkaraxZvdom_u794(tmp_1979712231, render__addcategorymodal_u395(state_p0.addCategoryModal)); + result_1979712230 = tmp_1979712231; + + return result_1979712230; + +} + +function render__categorypicker_u750(state_p0, currentUser_p1, compact_p2) { + var Temporary1; + + var result_1979712243 = null; + + BeforeRet: { + setAddEnabled__categorypicker_u723(state_p0, isAdmin__user_u28(currentUser_p1)); + if (!((state_p0.status == 200))) { + result_1979712243 = renderError__error_u24([67,111,117,108,100,110,39,116,32,114,101,116,114,105,101,118,101,32,99,97,116,101,103,111,114,105,101,115,46], state_p0.status); + break BeforeRet; + } + + if (isNone__categorypicker_u348(state_p0.list)) { + loadCategories__categorypicker_u488(state_p0); + var tmp_1979712250 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1979712250.class = "loading loading-lg"; + result_1979712243 = tmp_1979712250; + break BeforeRet; + } + + var list_1979712263 = nimCopy(null, (Temporary1 = get__categorypicker_u341(state_p0.list), Temporary1)[0][Temporary1[1]].categories, NTI1845493768); + var selectedCategory_1979712264 = HEX5BHEX5D__categorypicker_u494(state_p0, state_p0.selectedCategoryID); + var tmp_1979712265 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1979712265.id = "category-selection"; + tmp_1979712265.class = "input-group"; + var tmp_1979712266 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1979712266.class = "dropdown"; + var tmp_1979712267 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_1979712267.class = "btn btn-link dropdown-toggle"; + setAttr__pkgZkaraxZvdom_u713(tmp_1979712267, "tabindex", "0"); + var tmp_1979712268 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1979712268.class = "selected-category d-inline-block"; + add__pkgZkaraxZvdom_u794(tmp_1979712268, render__category_u32(selectedCategory_1979712264, true)); + add__pkgZkaraxZvdom_u794(tmp_1979712267, tmp_1979712268); + add__pkgZkaraxZvdom_u794(tmp_1979712267, text__pkgZkaraxZvdom_u948([32])); + var tmp_1979712269 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1979712269.class = "fas fa-caret-down"; + add__pkgZkaraxZvdom_u794(tmp_1979712267, tmp_1979712269); + add__pkgZkaraxZvdom_u794(tmp_1979712266, tmp_1979712267); + var tmp_1979712270 = tree__pkgZkaraxZvdom_u880(37, []); + tmp_1979712270.class = "menu"; + Label2: { + var category_1979712276 = ({id: 0, name: [], description: [], color: [], numTopics: 0}); + var i_637534987 = 0; + var L_637534988 = (list_1979712263).length; + Label3: { + Label4: while (true) { + if (!(i_637534987 < L_637534988)) break Label4; + category_1979712276 = list_1979712263[chckIndx(i_637534987, 0, (list_1979712263).length - 1)]; + var tmp_1979712271 = tree__pkgZkaraxZvdom_u880(38, []); + tmp_1979712271.class = "menu-item"; + var tmp_1979712272 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_1979712272.class = toJSStr(([99,97,116,101,103,111,114,121,45]).concat(HEX24__systemZdollars_u14(category_1979712276.id),[32],slug__karaxutils_u33(category_1979712276.name))); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_1979712272, 0, onCategoryClick__categorypicker_u726(state_p0, category_1979712276), kxi__); + add__pkgZkaraxZvdom_u794(tmp_1979712272, render__category_u32(category_1979712276, compact_p2)); + add__pkgZkaraxZvdom_u794(tmp_1979712271, tmp_1979712272); + add__pkgZkaraxZvdom_u794(tmp_1979712270, tmp_1979712271); + i_637534987 += 1; + if (!(((list_1979712263).length == L_637534988))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + add__pkgZkaraxZvdom_u794(tmp_1979712266, tmp_1979712270); + add__pkgZkaraxZvdom_u794(tmp_1979712265, tmp_1979712266); + if (state_p0.addEnabled) { + add__pkgZkaraxZvdom_u794(tmp_1979712265, genAddCategory__categorypicker_u740(state_p0)); + } + + result_1979712243 = tmp_1979712265; + }; + + return result_1979712243; + +} + +function render__mainbuttons_u72(state_p0, currentUser_p1, categoryId_p2) { + var result_1962934359 = null; + + var tmp_1962934360 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_1962934360.class = "navbar container grid-xl"; + tmp_1962934360.id = "main-buttons"; + var tmp_1962934361 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_1962934361.class = "navbar-section"; + if (isSome__pureZtimes_u3701(categoryId_p2)) { + state_p0.categoryPicker.selectedCategoryID = get__pureZtimes_u3785(categoryId_p2); + add__pkgZkaraxZvdom_u794(tmp_1962934361, render__categorypicker_u750(state_p0.categoryPicker, currentUser_p1, false)); + } + + Label1: { + var btn_1962934446 = {Field0: [], Field1: [], Field2: []}; + var i_637534983 = 0; + Label2: { + Label3: while (true) { + if (!true) break Label3; + btn_1962934446 = nimCopy(btn_1962934446, buttons_1962934292[chckIndx(i_637534983, 0, (buttons_1962934292).length - 1)], NTI1962934276); + var active_1962934447 = (toJSStr(btn_1962934446.Field1) == window.location.href); + var tmp_1962934362 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_1962934362.id = toJSStr(btn_1962934446.Field2); + setAttr__pkgZkaraxZvdom_u713(tmp_1962934362, "href", toJSStr(btn_1962934446.Field1)); + var tmp_1962934363 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_1962934363.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [98,116,110,45,112,114,105,109,97,114,121], Field1: active_1962934447}, NTI1962934402), nimCopy(null, {Field0: [98,116,110,45,108,105,110,107], Field1: !(active_1962934447)}, NTI1962934402)], [98,116,110])); + add__pkgZkaraxZvdom_u794(tmp_1962934363, text__pkgZkaraxZvdom_u948(btn_1962934446.Field0)); + add__pkgZkaraxZvdom_u794(tmp_1962934362, tmp_1962934363); + add__pkgZkaraxZvdom_u794(tmp_1962934361, tmp_1962934362); + if ((1 <= i_637534983)) { + break Label2; + } + + i_637534983 += 1; + } + }; + }; + add__pkgZkaraxZvdom_u794(tmp_1962934360, tmp_1962934361); + var tmp_1962934364 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_1962934364.class = "navbar-section"; + if (isSome__user_u39(currentUser_p1)) { + var tmp_1962934365 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_1962934365.id = "new-thread-btn"; + setAttr__pkgZkaraxZvdom_u713(tmp_1962934365, "href", toJSStr(makeUri__karaxutils_u123([47,110,101,119,116,104,114,101,97,100], [], [47], false, true))); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_1962934365, 0, anchorCB__karaxutils_u166, kxi__); + var tmp_1962934366 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_1962934366.class = "btn btn-secondary"; + var tmp_1962934367 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1962934367.class = "fas fa-plus"; + add__pkgZkaraxZvdom_u794(tmp_1962934366, tmp_1962934367); + add__pkgZkaraxZvdom_u794(tmp_1962934366, text__pkgZkaraxZvdom_u948([32,78,101,119,32,84,104,114,101,97,100])); + add__pkgZkaraxZvdom_u794(tmp_1962934365, tmp_1962934366); + add__pkgZkaraxZvdom_u794(tmp_1962934364, tmp_1962934365); + } + + add__pkgZkaraxZvdom_u794(tmp_1962934360, tmp_1962934364); + result_1962934359 = tmp_1962934360; + + return result_1962934359; + +} + +function none__mainbuttons_u76() { + var result_1962934355 = ({val: 0, has: false}); + + result_1962934355 = nimCopy(result_1962934355, {val: 0, has: false}, NTI1962934322); + + return result_1962934355; + +} + +function onCategoriesRetrieved__categorylist_u111(httpStatus_p0, response_p1) { + var Temporary1; + + BeforeRet: { + state_2382364699[0].loading = false; + state_2382364699[0].status = chckRange(httpStatus_p0, 0, 599); + if (!((state_2382364699[0].status == 200))) { + break BeforeRet; + } + + var parsed_2382364786 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var list_2382364792 = to__categorypicker_u49(parsed_2382364786); + if (isSome__categorypicker_u324(state_2382364699[0].list)) { + add__categorypicker_u373((Temporary1 = get__categorypicker_u341(state_2382364699[0].list), Temporary1)[0][Temporary1[1]], "categories", list_2382364792.categories); + } + else { + state_2382364699[0].list = nimCopy(state_2382364699[0].list, some__categorypicker_u397(list_2382364792), NTI1979711498); + } + + }; + + +} + +function renderCategoryHeader__categorylist_u146(currentUser_p0) { + +function HEX3Aanonymous__categorylist_u153(ev_p0, n_p1) { + setModalShown__addcategorymodal_u383(state_2382364699[0].addCategoryModal, true); + + + } + + var result_2382364821 = null; + + var tmp_2382364822 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2382364822.id = "add-category"; + add__pkgZkaraxZvdom_u794(tmp_2382364822, text__pkgZkaraxZvdom_u948([67,97,116,101,103,111,114,121])); + if (isAdmin__user_u28(currentUser_p0)) { + var tmp_2382364823 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2382364823.class = "plus-btn btn btn-link"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2382364823, 0, HEX3Aanonymous__categorylist_u153, kxi__); + var tmp_2382364824 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2382364824.class = "fas fa-plus"; + add__pkgZkaraxZvdom_u794(tmp_2382364823, tmp_2382364824); + add__pkgZkaraxZvdom_u794(tmp_2382364822, tmp_2382364823); + add__pkgZkaraxZvdom_u794(tmp_2382364822, render__addcategorymodal_u395(state_2382364699[0].addCategoryModal)); + } + + result_2382364821 = tmp_2382364822; + + return result_2382364821; + +} + +function genCategory__categorylist_u99(category_p0, noBorder_p1) { + var result_2382364774 = null; + + var tmp_2382364775 = tree__pkgZkaraxZvdom_u880(187, []); + tmp_2382364775.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [110,111,45,98,111,114,100,101,114], Field1: noBorder_p1}, NTI2382364745)], [])); + var tmp_2382364776 = tree__pkgZkaraxZvdom_u880(188, []); + tmp_2382364776.style = style__pkgZkaraxZvstyles_u426([{Field0: 38, Field1: toJSStr(([35]).concat(category_p0.color))}]); + tmp_2382364776.class = "category"; + var tmp_2382364777 = tree__pkgZkaraxZvdom_u880(24, []); + tmp_2382364777.class = "category-title"; + tmp_2382364777.id = toJSStr(([99,97,116,101,103,111,114,121,45]).concat(slug__karaxutils_u33(category_p0.name))); + var tmp_2382364778 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2382364778, "href", toJSStr(makeUri__karaxutils_u123(([47,99,47]).concat(HEX24__systemZdollars_u14(category_p0.id)), [], [47], false, true))); + var tmp_2382364779 = tree__pkgZkaraxZvdom_u880(44, []); + var tmp_2382364780 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2382364780.class = "category-name"; + add__pkgZkaraxZvdom_u794(tmp_2382364780, text__pkgZkaraxZvdom_u948(category_p0.name)); + add__pkgZkaraxZvdom_u794(tmp_2382364779, tmp_2382364780); + add__pkgZkaraxZvdom_u794(tmp_2382364778, tmp_2382364779); + add__pkgZkaraxZvdom_u794(tmp_2382364777, tmp_2382364778); + add__pkgZkaraxZvdom_u794(tmp_2382364776, tmp_2382364777); + var tmp_2382364781 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2382364781.class = "category-description"; + add__pkgZkaraxZvdom_u794(tmp_2382364781, text__pkgZkaraxZvdom_u948(category_p0.description)); + add__pkgZkaraxZvdom_u794(tmp_2382364776, tmp_2382364781); + add__pkgZkaraxZvdom_u794(tmp_2382364775, tmp_2382364776); + var tmp_2382364782 = tree__pkgZkaraxZvdom_u880(188, []); + tmp_2382364782.class = "topics"; + add__pkgZkaraxZvdom_u794(tmp_2382364782, text__pkgZkaraxZvdom_u948(HEX24__systemZdollars_u14(category_p0.numTopics))); + add__pkgZkaraxZvdom_u794(tmp_2382364775, tmp_2382364782); + result_2382364774 = tmp_2382364775; + + return result_2382364774; + +} + +function renderCategories__categorylist_u157(currentUser_p0) { + var Temporary1; + + var result_2382364832 = null; + + BeforeRet: { + if (!((state_2382364699[0].status == 200))) { + result_2382364832 = renderError__error_u24([67,111,117,108,100,110,39,116,32,114,101,116,114,105,101,118,101,32,116,104,114,101,97,100,115,46], state_2382364699[0].status); + break BeforeRet; + } + + if (isNone__categorypicker_u348(state_2382364699[0].list)) { + if (!(state_2382364699[0].loading)) { + state_2382364699[0].loading = true; + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(makeUri__karaxutils_u123([99,97,116,101,103,111,114,105,101,115,46,106,115,111,110], [], [47], false, true)), [], onCategoriesRetrieved__categorylist_u111, true, kxi__); + } + + var tmp_2382364843 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2382364843.class = "loading loading-lg"; + result_2382364832 = tmp_2382364843; + break BeforeRet; + } + + var list_2382364856 = (Temporary1 = get__categorypicker_u341(state_2382364699[0].list), Temporary1)[0][Temporary1[1]]; + var tmp_2382364857 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_2382364857.class = "category-list"; + var tmp_2382364858 = tree__pkgZkaraxZvdom_u880(180, []); + tmp_2382364858.id = "categories-list"; + tmp_2382364858.class = "table"; + var tmp_2382364859 = tree__pkgZkaraxZvdom_u880(185, []); + var tmp_2382364860 = tree__pkgZkaraxZvdom_u880(187, []); + var tmp_2382364861 = tree__pkgZkaraxZvdom_u880(189, []); + add__pkgZkaraxZvdom_u794(tmp_2382364861, renderCategoryHeader__categorylist_u146(currentUser_p0)); + add__pkgZkaraxZvdom_u794(tmp_2382364860, tmp_2382364861); + var tmp_2382364862 = tree__pkgZkaraxZvdom_u880(189, []); + add__pkgZkaraxZvdom_u794(tmp_2382364862, text__pkgZkaraxZvdom_u948([84,111,112,105,99,115])); + add__pkgZkaraxZvdom_u794(tmp_2382364860, tmp_2382364862); + add__pkgZkaraxZvdom_u794(tmp_2382364859, tmp_2382364860); + add__pkgZkaraxZvdom_u794(tmp_2382364858, tmp_2382364859); + var tmp_2382364863 = tree__pkgZkaraxZvdom_u880(184, []); + Label2: { + var i_2382364871 = 0; + var colontmp__637535015 = 0; + colontmp__637535015 = (list_2382364856.categories).length; + var i_637535016 = 0; + Label3: { + Label4: while (true) { + if (!(i_637535016 < colontmp__637535015)) break Label4; + i_2382364871 = i_637535016; + var category_2382364872 = nimCopy(null, list_2382364856.categories[chckIndx(i_2382364871, 0, (list_2382364856.categories).length - 1)], NTI1845493763); + var isLastCategory_2382364876 = (addInt(i_2382364871, 1) == (list_2382364856.categories).length); + add__pkgZkaraxZvdom_u794(tmp_2382364863, genCategory__categorylist_u99(category_2382364872, isLastCategory_2382364876)); + i_637535016 = addInt(i_637535016, 1); + } + }; + }; + add__pkgZkaraxZvdom_u794(tmp_2382364858, tmp_2382364863); + add__pkgZkaraxZvdom_u794(tmp_2382364857, tmp_2382364858); + result_2382364832 = tmp_2382364857; + break BeforeRet; + }; + + return result_2382364832; + +} + +function renderCategoryList__categorylist_u205(currentUser_p0) { + var result_2382364880 = null; + + var tmp_2382364881 = tree__pkgZkaraxZvdom_u880(44, []); + add__pkgZkaraxZvdom_u794(tmp_2382364881, render__mainbuttons_u72(state_2382364699[0].mainButtons, currentUser_p0, none__mainbuttons_u76())); + add__pkgZkaraxZvdom_u794(tmp_2382364881, renderCategories__categorylist_u157(currentUser_p0)); + result_2382364880 = tmp_2382364881; + + return result_2382364880; + +} + +function getLoggedInUser__header_u339() { + +function HEX3Aanonymous__header_u345(x_p0) { + var result_2181038435 = ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}); + + result_2181038435 = nimCopy(result_2181038435, x_p0.user, NTI1929379857); + + return result_2181038435; + + } + + var result_2181038421 = ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false}); + + result_2181038421 = nimCopy(result_2181038421, flatten__header_u432(map__header_u357(state_2181038120[0].data, HEX3Aanonymous__header_u345)), NTI1929379857); + + return result_2181038421; + +} + +function isNone__threadlist_u777(self_p0) { + var result_1593836300 = false; + + result_1593836300 = (self_p0.val == null); + + return result_1593836300; + +} + +function new__threadlist_u380() { + var result_1593835903 = null; + + BeforeRet: { + var r_1593835905 = null; + r_1593835905 = ({threads: [], moreCount: 0}); + result_1593835903 = r_1593835905; + break BeforeRet; + }; + + return result_1593835903; + +} + +function initFromJson__threadlist_u462(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_1593835988 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,105,100]);; + initFromJson__addcategorymodal_u150(dst_p0, "id", getOrDefault__pureZjson_u3507(jsonNode_p1, [105,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,116,111,112,105,99]);; + initFromJson__pureZjson_u5295(dst_p0, "topic", getOrDefault__pureZjson_u3507(jsonNode_p1, [116,111,112,105,99]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,99,97,116,101,103,111,114,121]);; + initFromJson__addcategorymodal_u121(dst_p0.category, getOrDefault__pureZjson_u3507(jsonNode_p1, [99,97,116,101,103,111,114,121]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,97,117,116,104,111,114]);; + initFromJson__threadlist_u504(dst_p0.author, getOrDefault__pureZjson_u3507(jsonNode_p1, [97,117,116,104,111,114]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,117,115,101,114,115]);; + initFromJson__threadlist_u647(dst_p0, "users", getOrDefault__pureZjson_u3507(jsonNode_p1, [117,115,101,114,115]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,114,101,112,108,105,101,115]);; + initFromJson__addcategorymodal_u150(dst_p0, "replies", getOrDefault__pureZjson_u3507(jsonNode_p1, [114,101,112,108,105,101,115]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,118,105,101,119,115]);; + initFromJson__addcategorymodal_u150(dst_p0, "views", getOrDefault__pureZjson_u3507(jsonNode_p1, [118,105,101,119,115]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,97,99,116,105,118,105,116,121]);; + initFromJson__threadlist_u522(dst_p0, "activity", getOrDefault__pureZjson_u3507(jsonNode_p1, [97,99,116,105,118,105,116,121]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,99,114,101,97,116,105,111,110]);; + initFromJson__threadlist_u522(dst_p0, "creation", getOrDefault__pureZjson_u3507(jsonNode_p1, [99,114,101,97,116,105,111,110]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,105,115,76,111,99,107,101,100]);; + initFromJson__pureZjson_u5299(dst_p0, "isLocked", getOrDefault__pureZjson_u3507(jsonNode_p1, [105,115,76,111,99,107,101,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,105,115,83,111,108,118,101,100]);; + initFromJson__pureZjson_u5299(dst_p0, "isSolved", getOrDefault__pureZjson_u3507(jsonNode_p1, [105,115,83,111,108,118,101,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,105,115,80,105,110,110,101,100]);; + initFromJson__pureZjson_u5299(dst_p0, "isPinned", getOrDefault__pureZjson_u3507(jsonNode_p1, [105,115,80,105,110,110,101,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835988, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835988, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835988, 0, 2147483647); }; + + +} + +function initFromJson__threadlist_u433(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet78[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym22_1593835970 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet79), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym22_1593835970, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if (dst_p0[dst_p0_Idx].length < (Temporary1 = chckRange(len__pureZjson_u3028(jsonNode_p1), 0, 2147483647), Temporary1)) { for (var i = dst_p0[dst_p0_Idx].length ; i < Temporary1 ; ++i) dst_p0[dst_p0_Idx].push(({id: 0, topic: [], category: ({id: 0, name: [], description: [], color: [], numTopics: 0}), author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), users: [], replies: 0, views: 0, activity: 0n, creation: 0n, isLocked: false, isSolved: false, isPinned: false})); } + else { dst_p0[dst_p0_Idx].length = Temporary1; }; + var orignalJsonPathLen_1593835976 = (jsonPath_p2[jsonPath_p2_Idx]).length; + Label2: { + var i_1593835981 = 0; + var colontmp__637535024 = 0; + colontmp__637535024 = len__pureZjson_u3028(jsonNode_p1); + var i_637535025 = 0; + Label3: { + Label4: while (true) { + if (!(i_637535025 < colontmp__637535024)) break Label4; + i_1593835981 = i_637535025; + addChar(jsonPath_p2[jsonPath_p2_Idx], 91);; + addInt__stdZprivateZdigitsutils_u241(jsonPath_p2, jsonPath_p2_Idx, i_1593835981); + addChar(jsonPath_p2[jsonPath_p2_Idx], 93);; + initFromJson__threadlist_u462(dst_p0[dst_p0_Idx][chckIndx(i_1593835981, 0, (dst_p0[dst_p0_Idx]).length - 1)], HEX5BHEX5D__pureZjson_u3153(jsonNode_p1, i_1593835981), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(orignalJsonPathLen_1593835976, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(orignalJsonPathLen_1593835976, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(orignalJsonPathLen_1593835976, 0, 2147483647); }; + i_637535025 = addInt(i_637535025, 1); + } + }; + }; + + +} + +function initFromJson__threadlist_u422(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_1593835948 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,116,104,114,101,97,100,115]);; + initFromJson__threadlist_u433(dst_p0, "threads", getOrDefault__pureZjson_u3507(jsonNode_p1, [116,104,114,101,97,100,115]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835948, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835948, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835948, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,109,111,114,101,67,111,117,110,116]);; + initFromJson__addcategorymodal_u150(dst_p0, "moreCount", getOrDefault__pureZjson_u3507(jsonNode_p1, [109,111,114,101,67,111,117,110,116]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_1593835948, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_1593835948, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_1593835948, 0, 2147483647); }; + + +} + +function initFromJson__threadlist_u357(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet76[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym15_1593835894 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet77), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym15_1593835894, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if ((jsonNode_p1.kind == 0)) { + dst_p0[dst_p0_Idx] = null; + } + else { + dst_p0[dst_p0_Idx] = new__threadlist_u380(); + initFromJson__threadlist_u422(dst_p0[dst_p0_Idx], jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx); + } + + + +} + +function to__threadlist_u345(node_p0) { + var result_1593835870 = [null]; + + var jsonPath_1593835871 = [[]]; + result_1593835870[0] = null; + initFromJson__threadlist_u357(result_1593835870, 0, node_p0, jsonPath_1593835871, 0); + + return result_1593835870[0]; + +} + +function isSome__threadlist_u753(self_p0) { + var result_1593836276 = false; + + result_1593836276 = !((self_p0.val == null)); + + return result_1593836276; + +} + +function add__threadlist_u802(x_p0, x_p0_Idx, y_p1) { + var Temporary1; + + var xl_1593836330 = (x_p0[x_p0_Idx]).length; + if (x_p0[x_p0_Idx].length < (Temporary1 = chckRange(addInt(xl_1593836330, (y_p1).length), 0, 2147483647), Temporary1)) { for (var i = x_p0[x_p0_Idx].length ; i < Temporary1 ; ++i) x_p0[x_p0_Idx].push(({id: 0, topic: [], category: ({id: 0, name: [], description: [], color: [], numTopics: 0}), author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), users: [], replies: 0, views: 0, activity: 0n, creation: 0n, isLocked: false, isSolved: false, isPinned: false})); } + else { x_p0[x_p0_Idx].length = Temporary1; }; + Label2: { + var i_1593836346 = 0; + var colontmp__637535028 = 0; + colontmp__637535028 = (y_p1).length - 1; + var res_637535029 = 0; + Label3: { + Label4: while (true) { + if (!(res_637535029 <= colontmp__637535028)) break Label4; + i_1593836346 = res_637535029; + x_p0[x_p0_Idx][chckIndx(addInt(xl_1593836330, i_1593836346), 0, (x_p0[x_p0_Idx]).length - 1)] = nimCopy(x_p0[x_p0_Idx][chckIndx(addInt(xl_1593836330, i_1593836346), 0, (x_p0[x_p0_Idx]).length - 1)], y_p1[chckIndx(i_1593836346, 0, (y_p1).length - 1)], NTI1593835523); + res_637535029 = addInt(res_637535029, 1); + } + }; + }; + + +} + +function get__threadlist_u770(self_p0) { + var result_1593836293 = null; + var result_1593836293_Idx = 0; + + BeforeRet: { + if (isNone__threadlist_u777(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_1593836293 = self_p0; result_1593836293_Idx = "val"; + break BeforeRet; + }; + + return [result_1593836293, result_1593836293_Idx]; + +} + +function some__threadlist_u876(val_p0) { + var result_1593836399 = ({val: null}); + + if (!(!((val_p0 == null)))) { + failedAssertImpl__stdZassertions_u86([111,112,116,105,111,110,115,46,110,105,109,40,49,51,57,44,32,53,41,32,96,110,111,116,32,118,97,108,46,105,115,78,105,108,96,32]); + } + + result_1593836399 = nimCopy(result_1593836399, {val: val_p0}, NTI1593835537); + + return result_1593836399; + +} + +function onThreadList__threadlist_u341(httpStatus_p0, response_p1) { + var Temporary1; + var Temporary2; + + BeforeRet: { + state_1593835578[0].loading = false; + state_1593835578[0].status = chckRange(httpStatus_p0, 0, 599); + if (!((state_1593835578[0].status == 200))) { + break BeforeRet; + } + + var parsed_1593835864 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var list_1593836269 = to__threadlist_u345(parsed_1593835864); + if (isSome__threadlist_u753(state_1593835578[0].list)) { + add__threadlist_u802((Temporary1 = get__threadlist_u770(state_1593835578[0].list), Temporary1)[0][Temporary1[1]], "threads", list_1593836269.threads); + (Temporary2 = get__threadlist_u770(state_1593835578[0].list), Temporary2)[0][Temporary2[1]].moreCount = list_1593836269.moreCount; + } + else { + state_1593835578[0].list = nimCopy(state_1593835578[0].list, some__threadlist_u876(list_1593836269), NTI1593835537); + } + + }; + + +} + +function isModerated__threadlist_u26(thread_p0) { + var result_1593835548 = false; + + result_1593835548 = (thread_p0.author.rank <= 2); + + return result_1593835548; + +} + +function HEX3DHEX3D__user_u87(u1_p0, u2_p1) { + var result_1929379930 = false; + + result_1929379930 = eqStrings(u1_p0.name, u2_p1.name); + + return result_1929379930; + +} + +function visibleTo__threadlist_u1128(thread_p0, user_p1) { + var result_1593836652 = false; + + BeforeRet: { + if (isNone__user_u60(user_p1)) { + result_1593836652 = !(isModerated__threadlist_u26(thread_p0)); + break BeforeRet; + } + + var rank_1593836671 = get__user_u53(user_p1).rank; + if (((rank_1593836671 < 7) && isModerated__threadlist_u26(thread_p0))) { + result_1593836652 = HEX3DHEX3D__user_u87(thread_p0.author, get__user_u53(user_p1)); + break BeforeRet; + } + + result_1593836652 = true; + break BeforeRet; + }; + + return result_1593836652; + +} + +function getInfo__threadlist_u984(list_p0, i_p1, currentUser_p2) { + var Temporary1; + + var result_1593836511 = {Field0: false, Field1: false}; + + BeforeRet: { + if (isSome__user_u39(currentUser_p2)) { + Temporary1 = get__user_u53(currentUser_p2).previousVisitAt; + } + else { + Temporary1 = toUnix__pureZtimes_u1196(getTime__pureZtimes_u1247()); + } + + var previousVisitAt_1593836530 = Temporary1; + if (!(!((previousVisitAt_1593836530 == 0n)))) { + failedAssertImpl__stdZassertions_u86([116,104,114,101,97,100,108,105,115,116,46,110,105,109,40,49,56,52,44,32,53,41,32,96,112,114,101,118,105,111,117,115,86,105,115,105,116,65,116,32,33,61,32,48,96,32]); + } + + var thread_1593836536 = nimCopy(null, list_p0[chckIndx(i_p1, 0, (list_p0).length - 1)], NTI1593835523); + var isUnseen_1593836537 = (previousVisitAt_1593836530 < thread_1593836536.activity); + var isNextUnseen_1593836541 = ((addInt(i_p1, 1) < (list_p0).length) && (previousVisitAt_1593836530 < list_p0[chckIndx(addInt(i_p1, 1), 0, (list_p0).length - 1)].activity)); + var colontmp__637535031 = (isUnseen_1593836537 && !(isNextUnseen_1593836541)); + var colontmp__637535032 = (previousVisitAt_1593836530 < thread_1593836536.creation); + result_1593836511 = nimCopy(result_1593836511, {Field0: colontmp__637535031, Field1: colontmp__637535032}, NTI1593836311); + break BeforeRet; + }; + + return result_1593836511; + +} + +function inWeeks__pureZtimes_u661(dur_p0) { + var result_1627390615 = 0n; + + var correctionHEX60gensym14_1627390623 = ((dur_p0.seconds < 0n) && (0 < dur_p0.nanosecond)); + result_1627390615 = convert__pureZtimes_u471(3, 7, addInt64(dur_p0.seconds, BigInt((correctionHEX60gensym14_1627390623 ? 1 : 0)))); + + return result_1627390615; + +} + +function isBanned__user_u102(rank_p0) { + var result_1929379944 = false; + + result_1929379944 = (ConstSet80[rank_p0] != undefined); + + return result_1929379944; + +} + +function validateUtf8__pureZunicode_u336(s_p0) { + var result_1191182674 = 0; + + BeforeRet: { + var i_1191182675 = 0; + var L_1191182679 = (s_p0).length; + Label1: { + Label2: while (true) { + if (!(i_1191182675 < L_1191182679)) break Label2; + if ((s_p0[chckIndx(i_1191182675, 0, (s_p0).length - 1)] <= 127)) { + i_1191182675 = addInt(i_1191182675, 1); + } + else { + if (((s_p0[chckIndx(i_1191182675, 0, (s_p0).length - 1)] >>> (5 & 31)) == 6)) { + if ((s_p0[chckIndx(i_1191182675, 0, (s_p0).length - 1)] < 194)) { + result_1191182674 = i_1191182675; + break BeforeRet; + } + + if (((addInt(i_1191182675, 1) < L_1191182679) && ((s_p0[chckIndx(addInt(i_1191182675, 1), 0, (s_p0).length - 1)] >>> (6 & 31)) == 2))) { + i_1191182675 = addInt(i_1191182675, 2); + } + else { + result_1191182674 = i_1191182675; + break BeforeRet; + } + + } + else { + if (((s_p0[chckIndx(i_1191182675, 0, (s_p0).length - 1)] >>> (4 & 31)) == 14)) { + if ((((addInt(i_1191182675, 2) < L_1191182679) && ((s_p0[chckIndx(addInt(i_1191182675, 1), 0, (s_p0).length - 1)] >>> (6 & 31)) == 2)) && ((s_p0[chckIndx(addInt(i_1191182675, 2), 0, (s_p0).length - 1)] >>> (6 & 31)) == 2))) { + i_1191182675 = addInt(i_1191182675, 3); + } + else { + result_1191182674 = i_1191182675; + break BeforeRet; + } + + } + else { + if (((s_p0[chckIndx(i_1191182675, 0, (s_p0).length - 1)] >>> (3 & 31)) == 30)) { + if (((((addInt(i_1191182675, 3) < L_1191182679) && ((s_p0[chckIndx(addInt(i_1191182675, 1), 0, (s_p0).length - 1)] >>> (6 & 31)) == 2)) && ((s_p0[chckIndx(addInt(i_1191182675, 2), 0, (s_p0).length - 1)] >>> (6 & 31)) == 2)) && ((s_p0[chckIndx(addInt(i_1191182675, 3), 0, (s_p0).length - 1)] >>> (6 & 31)) == 2))) { + i_1191182675 = addInt(i_1191182675, 4); + } + else { + result_1191182674 = i_1191182675; + break BeforeRet; + } + + } + else { + result_1191182674 = i_1191182675; + break BeforeRet; + } + }}} + } + }; + result_1191182674 = (-1); + break BeforeRet; + }; + + return result_1191182674; + +} + +function validateUtf8__pureZunicode_u7149(s_p0) { + var result_1191189487 = 0; + + result_1191189487 = validateUtf8__pureZunicode_u336((s_p0.slice(0, (s_p0).length - 1 + 1))); + + return result_1191189487; + +} + +function nucruneLen(s_p0) { + var result_1191182365 = 0; + + result_1191182365 = 0; + var i_1191182366 = 0; + Label1: { + Label2: while (true) { + if (!(i_1191182366 < (s_p0).length)) break Label2; + if ((s_p0[chckIndx(i_1191182366, 0, (s_p0).length - 1)] <= 127)) { + i_1191182366 = addInt(i_1191182366, 1); + } + else { + if (((s_p0[chckIndx(i_1191182366, 0, (s_p0).length - 1)] >>> (5 & 31)) == 6)) { + i_1191182366 = addInt(i_1191182366, 2); + } + else { + if (((s_p0[chckIndx(i_1191182366, 0, (s_p0).length - 1)] >>> (4 & 31)) == 14)) { + i_1191182366 = addInt(i_1191182366, 3); + } + else { + if (((s_p0[chckIndx(i_1191182366, 0, (s_p0).length - 1)] >>> (3 & 31)) == 30)) { + i_1191182366 = addInt(i_1191182366, 4); + } + else { + if (((s_p0[chckIndx(i_1191182366, 0, (s_p0).length - 1)] >>> (2 & 31)) == 62)) { + i_1191182366 = addInt(i_1191182366, 5); + } + else { + if (((s_p0[chckIndx(i_1191182366, 0, (s_p0).length - 1)] >>> (1 & 31)) == 126)) { + i_1191182366 = addInt(i_1191182366, 6); + } + else { + i_1191182366 = addInt(i_1191182366, 1); + } + }}}}} + result_1191182365 = addInt(result_1191182365, 1); + } + }; + + return result_1191182365; + +} + +function runeLen__pureZunicode_u6977(s_p0) { + var result_1191189315 = 0; + + result_1191189315 = nucruneLen((s_p0.slice(0, (s_p0).length - 1 + 1))); + + return result_1191189315; + +} + +function nsuRepeatChar(c_p0, count_p1) { + var result_1124074596 = []; + + result_1124074596 = nimCopy(null, mnewString(count_p1), NTI33554449); + Label1: { + var i_1124074601 = 0; + var colontmp__637535043 = 0; + colontmp__637535043 = subInt(count_p1, 1); + var res_637535044 = 0; + Label2: { + Label3: while (true) { + if (!(res_637535044 <= colontmp__637535043)) break Label3; + i_1124074601 = res_637535044; + result_1124074596[chckIndx(i_1124074601, 0, (result_1124074596).length - 1)] = c_p0; + res_637535044 = addInt(res_637535044, 1); + } + }; + }; + + return result_1124074596; + +} + +function alignString__pureZstrformat_u20(s_p0, minimumWidth_p1, align_p2, fill_p3) { + var Temporary1; + + var result_1610612761 = []; + + if ((minimumWidth_p1 == 0)) { + result_1610612761 = nimCopy(null, s_p0, NTI33554449); + } + else { + if ((validateUtf8__pureZunicode_u7149(s_p0) == (-1))) { + Temporary1 = runeLen__pureZunicode_u6977(s_p0); + } + else { + Temporary1 = (s_p0).length; + } + + var sRuneLen_1610612762 = Temporary1; + var toFill_1610612763 = subInt(minimumWidth_p1, sRuneLen_1610612762); + if ((toFill_1610612763 <= 0)) { + result_1610612761 = nimCopy(null, s_p0, NTI33554449); + } + else { + if (((align_p2 == 60) || (align_p2 == 0))) { + result_1610612761 = nimCopy(null, (s_p0).concat(nsuRepeatChar(fill_p3, chckRange(toFill_1610612763, 0, 2147483647))), NTI33554449); + } + else { + if ((align_p2 == 94)) { + var half_1610612764 = divInt(toFill_1610612763, 2); + result_1610612761 = nimCopy(null, (nsuRepeatChar(fill_p3, chckRange(half_1610612764, 0, 2147483647))).concat(s_p0,nsuRepeatChar(fill_p3, chckRange(subInt(toFill_1610612763, half_1610612764), 0, 2147483647))), NTI33554449); + } + else { + result_1610612761 = nimCopy(null, (nsuRepeatChar(fill_p3, chckRange(toFill_1610612763, 0, 2147483647))).concat(s_p0), NTI33554449); + } + }} + } + + + return result_1610612761; + +} + +function formatValue__karaxutils_u208(result_p0, result_p0_Idx, value_p1) { + var value_1862271196 = nimCopy(null, value_p1, NTI33554449); + nimAddStrStr(result_p0[result_p0_Idx], alignString__pureZstrformat_u20(value_1862271196, 0, 0, 32));; + + +} + +function renderProfileUrl__karaxutils_u192(username_p0) { + var result_1862271170 = []; + + Label1: { + var fmtRes_1862271179 = [mnewString(0)]; + nimAddStrStr(fmtRes_1862271179[0], [47,112,114,111,102,105,108,101,47]);; + formatValue__karaxutils_u208(fmtRes_1862271179, 0, username_p0); + }; + result_1862271170 = nimCopy(null, makeUri__karaxutils_u123(fmtRes_1862271179[0], [], [47], false, true), NTI33554449); + + return result_1862271170; + +} + +function render__user_u117(user_p0, class_p1, showStatus_p2) { + var result_1929379961 = null; + + var tmp_1929379962 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_1929379962, "href", toJSStr(renderProfileUrl__karaxutils_u192(user_p0.name))); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_1929379962, 0, anchorCB__karaxutils_u166, kxi__); + var tmp_1929379963 = tree__pkgZkaraxZvdom_u880(42, []); + tmp_1929379963.class = toJSStr(class_p1); + var tmp_1929379964 = tree__pkgZkaraxZvdom_u880(76, []); + setAttr__pkgZkaraxZvdom_u713(tmp_1929379964, "src", toJSStr(user_p0.avatarUrl)); + setAttr__pkgZkaraxZvdom_u713(tmp_1929379964, "title", toJSStr(user_p0.name)); + add__pkgZkaraxZvdom_u794(tmp_1929379963, tmp_1929379964); + if ((isOnline__user_u25(user_p0) && showStatus_p2)) { + var tmp_1929379965 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1929379965.class = "avatar-presence online"; + add__pkgZkaraxZvdom_u794(tmp_1929379963, tmp_1929379965); + } + + add__pkgZkaraxZvdom_u794(tmp_1929379962, tmp_1929379963); + result_1929379961 = tmp_1929379962; + + return result_1929379961; + +} + +function genUserAvatars__threadlist_u162(users_p0) { + var result_1593835684 = null; + + var tmp_1593835685 = tree__pkgZkaraxZvdom_u880(188, []); + tmp_1593835685.class = "thread-users"; + Label1: { + var user_1593835708 = ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}); + var i_637535036 = 0; + var L_637535037 = (users_p0).length; + Label2: { + Label3: while (true) { + if (!(i_637535036 < L_637535037)) break Label3; + user_1593835708 = users_p0[chckIndx(i_637535036, 0, (users_p0).length - 1)]; + add__pkgZkaraxZvdom_u794(tmp_1593835685, render__user_u117(user_1593835708, [97,118,97,116,97,114,32,97,118,97,116,97,114,45,115,109], true)); + add__pkgZkaraxZvdom_u794(tmp_1593835685, text__pkgZkaraxZvdom_u948([32])); + i_637535036 += 1; + if (!(((users_p0).length == L_637535037))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + result_1593835684 = tmp_1593835685; + + return result_1593835684; + +} + +function nsuformatBiggestFloat(f_p0, format_p1, precision_p2, decimalSep_p3) { + var result_1124075690 = []; + + var precision_1124075691 = precision_p2; + if ((precision_1124075691 == (-1))) { + precision_1124075691 = 6; + } + + var res_1124075692 = null; + switch (format_p1) { + case 0: + res_1124075692 = f_p0.toString(); + break; + case 1: + res_1124075692 = f_p0.toFixed(precision_1124075691); + break; + case 2: + res_1124075692 = f_p0.toExponential(precision_1124075691); + break; + } + result_1124075690 = nimCopy(null, cstrToNimstr(res_1124075692), NTI33554449); + if (((1.0 / f_p0) == -Infinity)) { + result_1124075690 = nimCopy(null, ([45]).concat(cstrToNimstr(res_1124075692)), NTI33554449); + } + + Label1: { + var i_1124075697 = 0; + var colontmp__637535047 = 0; + colontmp__637535047 = (result_1124075690).length; + var i_637535048 = 0; + Label2: { + Label3: while (true) { + if (!(i_637535048 < colontmp__637535047)) break Label3; + i_1124075697 = i_637535048; + if ((ConstSet81[result_1124075690[chckIndx(i_1124075697, 0, (result_1124075690).length - 1)]] != undefined)) { + result_1124075690[chckIndx(i_1124075697, 0, (result_1124075690).length - 1)] = decimalSep_p3; + } + + i_637535048 = addInt(i_637535048, 1); + } + }; + }; + + return result_1124075690; + +} + +function insert__system_u3682(x_p0, x_p0_Idx, item_p1, i_p2) { + var Temporary1; + + BeforeRet: { + if (((item_p1).length == 0)) { + break BeforeRet; + } + + var xl_33558118 = (x_p0[x_p0_Idx]).length; + if (x_p0[x_p0_Idx].length < (Temporary1 = chckRange(addInt(xl_33558118, (item_p1).length), 0, 2147483647), Temporary1)) { for (var i = x_p0[x_p0_Idx].length; i < Temporary1; ++i) x_p0[x_p0_Idx].push(0); } + else {x_p0[x_p0_Idx].length = Temporary1; }; + var j_33558119 = subInt(xl_33558118, 1); + Label2: { + Label3: while (true) { + if (!(i_p2 <= j_33558119)) break Label3; + x_p0[x_p0_Idx][chckIndx(addInt(j_33558119, (item_p1).length), 0, (x_p0[x_p0_Idx]).length - 1)] = x_p0[x_p0_Idx][chckIndx(j_33558119, 0, (x_p0[x_p0_Idx]).length - 1)]; + j_33558119 = subInt(j_33558119, 1); + } + }; + j_33558119 = 0; + Label4: { + Label5: while (true) { + if (!(j_33558119 < (item_p1).length)) break Label5; + x_p0[x_p0_Idx][chckIndx(addInt(j_33558119, i_p2), 0, (x_p0[x_p0_Idx]).length - 1)] = item_p1[chckIndx(j_33558119, 0, (item_p1).length - 1)]; + j_33558119 = addInt(j_33558119, 1); + } + }; + }; + + +} + +function nsuToUpperAsciiChar(c_p0) { + var result_1124073578 = 0; + + if ((ConstSet83[c_p0] != undefined)) { + result_1124073578 = (c_p0 ^ 32); + } + else { + result_1124073578 = c_p0; + } + + + return result_1124073578; + +} + +function nsuToUpperAsciiStr(s_p0) { + var result_1124073585 = []; + + result_1124073585 = nimCopy(null, mnewString(chckRange((s_p0).length, 0, 2147483647)), NTI33554449); + Label1: { + var iHEX60gensym11_1124073591 = 0; + var colontmp__1409286502 = 0; + colontmp__1409286502 = subInt((s_p0).length, 1); + var res_1409286503 = 0; + Label2: { + Label3: while (true) { + if (!(res_1409286503 <= colontmp__1409286502)) break Label3; + iHEX60gensym11_1124073591 = res_1409286503; + result_1124073585[chckIndx(iHEX60gensym11_1124073591, 0, (result_1124073585).length - 1)] = nsuToUpperAsciiChar(s_p0[chckIndx(iHEX60gensym11_1124073591, 0, (s_p0).length - 1)]); + res_1409286503 = addInt(res_1409286503, 1); + } + }; + }; + + return result_1124073585; + +} + +function formatFloat__threadlist_u258(result_p0, result_p0_Idx, value_p1, fmode_p2, spec_p3) { + var Temporary1; + + var f_1593835784 = [nsuformatBiggestFloat(value_p1, fmode_p2, chckRange(spec_p3.precision, (-1), 32), 46)]; + var sign_1593835785 = false; + if ((0.0 <= value_p1)) { + if (!((spec_p3.sign == 45))) { + sign_1593835785 = true; + if ((value_p1 == 0.0)) { + if (((1.0 / value_p1) == Infinity)) { + insert__system_u3682(f_1593835784, 0, nimCharToStr(spec_p3.sign), 0); + } + + } + else { + insert__system_u3682(f_1593835784, 0, nimCharToStr(spec_p3.sign), 0); + } + + } + + } + else { + sign_1593835785 = true; + } + + if (spec_p3.padWithZero) { + var signStr_1593835786 = []; + if (sign_1593835785) { + signStr_1593835786 = nimCopy(null, nimCharToStr(f_1593835784[0][chckIndx(0, 0, (f_1593835784[0]).length - 1)]), NTI33554449); + f_1593835784[0] = nimCopy(null, HEX5BHEX5D__pureZstrutils_u1308(f_1593835784[0], HEX2EHEX2E__stdZprivateZunderscored95calls_u26(1, 1)), NTI33554449); + } + + var toFill_1593835808 = subInt(subInt(spec_p3.minimumWidth, (f_1593835784[0]).length), (sign_1593835785 ? 1 : 0)); + if ((0 < toFill_1593835808)) { + f_1593835784[0] = nimCopy(null, (nsuRepeatChar(48, chckRange(toFill_1593835808, 0, 2147483647))).concat(f_1593835784[0]), NTI33554449); + } + + if (sign_1593835785) { + f_1593835784[0] = nimCopy(null, (signStr_1593835786).concat(f_1593835784[0]), NTI33554449); + } + + } + + if ((spec_p3.align == 0)) { + Temporary1 = 62; + } + else { + Temporary1 = spec_p3.align; + } + + var align_1593835809 = Temporary1; + var res_1593835810 = alignString__pureZstrformat_u20(f_1593835784[0], spec_p3.minimumWidth, align_1593835809, spec_p3.fill); + if ((ConstSet82[spec_p3.typ] != undefined)) { + nimAddStrStr(result_p0[result_p0_Idx], nsuToUpperAsciiStr(res_1593835810));; + } + else { + nimAddStrStr(result_p0[result_p0_Idx], res_1593835810);; + } + + + +} + +function formatValue__threadlist_u250(result_p0, result_p0_Idx, value_p1) { + formatFloat__threadlist_u258(result_p0, result_p0_Idx, value_p1, 1, spec_1593835776); + + +} + +function toFloat__system_u1596(i_p0) { + var result_33556030 = 0.0; + + result_33556030 = i_p0; + + return result_33556030; + +} + +function HEX2F__system_u1608(x_p0, y_p1) { + var result_33556043 = 0.0; + + result_33556043 = (toFloat__system_u1596(x_p0) / toFloat__system_u1596(y_p1)); + + return result_33556043; + +} + +function monthday__pureZtimes_u1484(dt_p0) { + var result_1627391438 = 0; + + if (!(!((dt_p0.monthdayZero == 0)))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("times.nim(1085, 28) `dt.monthdayZero != 0` Uninitialized datetime")); + } + + result_1627391438 = dt_p0.monthdayZero; + + return result_1627391438; + +} + +function nsuIntToStr(x_p0, minchars_p1) { + var result_1124074323 = []; + + result_1124074323 = nimCopy(null, HEX24__systemZdollars_u14(absInt(x_p0)), NTI33554449); + Label1: { + var i_1124074328 = 0; + var colontmp__637535058 = 0; + colontmp__637535058 = subInt(minchars_p1, (result_1124074323).length); + var res_637535059 = 1; + Label2: { + Label3: while (true) { + if (!(res_637535059 <= colontmp__637535058)) break Label3; + i_1124074328 = res_637535059; + result_1124074323 = nimCopy(null, [48].concat(result_1124074323), NTI33554449); + res_637535059 = addInt(res_637535059, 1); + } + }; + }; + if ((x_p0 < 0)) { + result_1124074323 = nimCopy(null, [45].concat(result_1124074323), NTI33554449); + } + + + return result_1124074323; + +} + +function getWeeksInIsoYear__pureZtimes_u333(y_p0) { + var Temporary1; + var Temporary2; + + var result_1627390287 = 0; + + var y_1627390288 = y_p0; + if ((y_1627390288 < 0)) { + Temporary1 = addInt(400, modInt(y_1627390288, 400)); + } + else { + Temporary1 = y_1627390288; + } + + y_1627390288 = Temporary1; + var p_1627390289 = modInt(addInt(subInt(addInt(y_1627390288, divInt(y_1627390288, 4)), divInt(y_1627390288, 100)), divInt(y_1627390288, 400)), 7); + var y1_1627390290 = subInt(y_1627390288, 1); + var p1_1627390291 = modInt(addInt(subInt(addInt(y1_1627390290, divInt(y1_1627390290, 4)), divInt(y1_1627390290, 100)), divInt(y1_1627390290, 400)), 7); + if (((p_1627390289 == 4) || (p1_1627390291 == 3))) { + Temporary2 = 53; + } + else { + Temporary2 = 52; + } + + result_1627390287 = Temporary2; + + return result_1627390287; + +} + +function getIsoWeekAndYear__pureZtimes_u375(dt_p0) { + var Temporary1; + + var result_1627390331 = {Field0: 0, Field1: 0}; + + var w_1627390332 = divInt(addInt(subInt(dt_p0.yearday, ((dt_p0.weekday) | 0)), 10), 7); + if ((w_1627390332 < 1)) { + Temporary1 = {Field0: getWeeksInIsoYear__pureZtimes_u333(subInt(dt_p0.year, 1)), Field1: subInt(dt_p0.year, 1)}; + } + else { + if ((getWeeksInIsoYear__pureZtimes_u333(dt_p0.year) < w_1627390332)) { + Temporary1 = {Field0: 1, Field1: addInt(dt_p0.year, 1)}; + } + else { + Temporary1 = {Field0: nimCopy(null, chckRange(w_1627390332, 1, 53), NTI1627389968), Field1: dt_p0.year}; + } + } + result_1627390331 = nimCopy(result_1627390331, Temporary1, NTI1627390245); + + return result_1627390331; + +} + +function month__pureZtimes_u1492(dt_p0) { + var result_1627391446 = 0; + + if (!(!((dt_p0.monthdayZero == 0)))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("times.nim(1092, 28) `dt.monthdayZero != 0` Uninitialized datetime")); + } + + result_1627391446 = dt_p0.monthZero; + + return result_1627391446; + +} + +function convert__pureZtimes_u806(unitFrom_p0, unitTo_p1, quantity_p2) { + var Temporary1; + + var result_1627390763 = 0; + + if ((unitFrom_p0 < unitTo_p1)) { + Temporary1 = chckRange(Number(divInt64(BigInt(quantity_p2), divInt64(unitWeights_1627390063[chckIndx(unitTo_p1, 0, (unitWeights_1627390063).length - 1)], unitWeights_1627390063[chckIndx(unitFrom_p0, 0, (unitWeights_1627390063).length - 1)]))), 0, 999999999); + } + else { + Temporary1 = chckRange(Number(mulInt64(divInt64(unitWeights_1627390063[chckIndx(unitFrom_p0, 0, (unitWeights_1627390063).length - 1)], unitWeights_1627390063[chckIndx(unitTo_p1, 0, (unitWeights_1627390063).length - 1)]), BigInt(quantity_p2))), 0, 999999999); + } + + result_1627390763 = Temporary1; + + return result_1627390763; + +} + +function HEX3DHEX3D__pureZtimes_u1743(zone1_p0, zone2_p1) { + var result_1627391698 = false; + + BeforeRet: { + if ((zone1_p0 == zone2_p1)) { + result_1627391698 = true; + break BeforeRet; + } + + if (((zone1_p0 == null) || (zone2_p1 == null))) { + result_1627391698 = false; + break BeforeRet; + } + + result_1627391698 = eqStrings(zone1_p0.name, zone2_p1.name); + }; + + return result_1627391698; + +} + +function formatPattern__pureZtimes_u2378(dt_p0, pattern_p1, result_p2, result_p2_Idx, loc_p3) { + var Temporary1; + var Temporary2; + var Temporary3; + var Temporary4; + var Temporary5; + var Temporary6; + var Temporary7; + var Temporary8; + var Temporary9; + var Temporary10; + + switch (pattern_p1) { + case 0: + nimAddStrStr(result_p2[result_p2_Idx], HEX24__systemZdollars_u14(monthday__pureZtimes_u1484(dt_p0)));; + break; + case 1: + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(monthday__pureZtimes_u1484(dt_p0), 2));; + break; + case 2: + nimAddStrStr(result_p2[result_p2_Idx], loc_p3.ddd[chckIndx(dt_p0.weekday, 0, (loc_p3.ddd).length - 1)]);; + break; + case 3: + nimAddStrStr(result_p2[result_p2_Idx], loc_p3.dddd[chckIndx(dt_p0.weekday, 0, (loc_p3.dddd).length - 1)]);; + break; + case 4: + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(modInt(getIsoWeekAndYear__pureZtimes_u375(dt_p0).Field1, 100), 2));; + break; + case 5: + nimAddStrStr(result_p2[result_p2_Idx], HEX24__systemZdollars_u14(getIsoWeekAndYear__pureZtimes_u375(dt_p0).Field1));; + break; + case 6: + if ((dt_p0.hour == 0)) { + Temporary1 = [49,50]; + } + else { + if ((12 < dt_p0.hour)) { + Temporary1 = HEX24__systemZdollars_u14(subInt(dt_p0.hour, 12)); + } + else { + Temporary1 = HEX24__systemZdollars_u14(dt_p0.hour); + } + } + nimAddStrStr(result_p2[result_p2_Idx], Temporary1);; + break; + case 7: + if ((dt_p0.hour == 0)) { + Temporary2 = [49,50]; + } + else { + if ((12 < dt_p0.hour)) { + Temporary2 = nsuIntToStr(subInt(dt_p0.hour, 12), 2); + } + else { + Temporary2 = nsuIntToStr(dt_p0.hour, 2); + } + } + nimAddStrStr(result_p2[result_p2_Idx], Temporary2);; + break; + case 8: + nimAddStrStr(result_p2[result_p2_Idx], HEX24__systemZdollars_u14(dt_p0.hour));; + break; + case 9: + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(dt_p0.hour, 2));; + break; + case 10: + nimAddStrStr(result_p2[result_p2_Idx], HEX24__systemZdollars_u14(dt_p0.minute));; + break; + case 11: + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(dt_p0.minute, 2));; + break; + case 12: + nimAddStrStr(result_p2[result_p2_Idx], HEX24__systemZdollars_u14(month__pureZtimes_u1492(dt_p0)));; + break; + case 13: + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(month__pureZtimes_u1492(dt_p0), 2));; + break; + case 14: + nimAddStrStr(result_p2[result_p2_Idx], loc_p3.MMM[chckIndx(month__pureZtimes_u1492(dt_p0), 1, (loc_p3.MMM).length + (1) - 1) - (1)]);; + break; + case 15: + nimAddStrStr(result_p2[result_p2_Idx], loc_p3.MMMM[chckIndx(month__pureZtimes_u1492(dt_p0), 1, (loc_p3.MMMM).length + (1) - 1) - (1)]);; + break; + case 16: + nimAddStrStr(result_p2[result_p2_Idx], HEX24__systemZdollars_u14(dt_p0.second));; + break; + case 17: + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(dt_p0.second, 2));; + break; + case 18: + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(convert__pureZtimes_u806(0, 2, dt_p0.nanosecond), 3));; + break; + case 19: + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(convert__pureZtimes_u806(0, 1, dt_p0.nanosecond), 6));; + break; + case 20: + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(dt_p0.nanosecond, 9));; + break; + case 21: + if ((12 <= dt_p0.hour)) { + Temporary3 = [80]; + } + else { + Temporary3 = [65]; + } + + nimAddStrStr(result_p2[result_p2_Idx], Temporary3);; + break; + case 22: + if ((12 <= dt_p0.hour)) { + Temporary4 = [80,77]; + } + else { + Temporary4 = [65,77]; + } + + nimAddStrStr(result_p2[result_p2_Idx], Temporary4);; + break; + case 23: + if ((dt_p0.year <= 0)) { + Temporary5 = addInt(absInt(dt_p0.year), 1); + } + else { + Temporary5 = dt_p0.year; + } + + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(modInt(Temporary5, 100), 2));; + break; + case 24: + if ((dt_p0.year <= 0)) { + Temporary6 = addInt(absInt(dt_p0.year), 1); + } + else { + Temporary6 = dt_p0.year; + } + + var year_1627392353 = Temporary6; + if ((year_1627392353 < 10000)) { + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(year_1627392353, 4));; + } + else { + nimAddStrStr(result_p2[result_p2_Idx], [43].concat(HEX24__systemZdollars_u14(year_1627392353)));; + } + + break; + case 25: + if ((dt_p0.year < 1)) { + nimAddStrStr(result_p2[result_p2_Idx], HEX24__systemZdollars_u14(addInt(absInt(dt_p0.year), 1)));; + } + else { + nimAddStrStr(result_p2[result_p2_Idx], HEX24__systemZdollars_u14(dt_p0.year));; + } + + break; + case 26: + var year_1627392354 = dt_p0.year; + if (((year_1627392354 < 10000) || (year_1627392354 < 0))) { + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(year_1627392354, 4));; + } + else { + nimAddStrStr(result_p2[result_p2_Idx], [43].concat(HEX24__systemZdollars_u14(year_1627392354)));; + } + + break; + case 27: + nimAddStrStr(result_p2[result_p2_Idx], HEX24__systemZdollars_u14(dt_p0.year));; + break; + case 28: + nimAddStrStr(result_p2[result_p2_Idx], HEX24__systemZdollars_u14(getIsoWeekAndYear__pureZtimes_u375(dt_p0).Field0));; + break; + case 29: + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(getIsoWeekAndYear__pureZtimes_u375(dt_p0).Field0, 2));; + break; + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + if ((!(HEX3DHEX3D__pureZtimes_u1743(dt_p0.timezone, null)) && eqStrings(dt_p0.timezone.name, [69,116,99,47,85,84,67]))) { + addChar(result_p2[result_p2_Idx], 90);; + } + else { + if ((0 <= negInt(dt_p0.utcOffset))) { + Temporary7 = 43; + } + else { + Temporary7 = 45; + } + + addChar(result_p2[result_p2_Idx], Temporary7);; + var absOffset_1627392355 = absInt(dt_p0.utcOffset); + switch (pattern_p1) { + case 30: + nimAddStrStr(result_p2[result_p2_Idx], HEX24__systemZdollars_u14(divInt(absOffset_1627392355, 3600)));; + break; + case 31: + nimAddStrStr(result_p2[result_p2_Idx], nsuIntToStr(divInt(absOffset_1627392355, 3600), 2));; + break; + case 32: + case 34: + var h_1627392356 = nsuIntToStr(divInt(absOffset_1627392355, 3600), 2); + var m_1627392357 = nsuIntToStr(modInt(divInt(absOffset_1627392355, 60), 60), 2); + if ((pattern_p1 == 32)) { + Temporary8 = [58]; + } + else { + Temporary8 = []; + } + + var sep_1627392363 = nimCopy(null, Temporary8, NTI33554449); + nimAddStrStr(result_p2[result_p2_Idx], (h_1627392356).concat(sep_1627392363,m_1627392357));; + break; + case 33: + case 35: + var absOffset_1627392364 = absInt(dt_p0.utcOffset); + var h_1627392365 = nsuIntToStr(divInt(absOffset_1627392364, 3600), 2); + var m_1627392366 = nsuIntToStr(modInt(divInt(absOffset_1627392364, 60), 60), 2); + var s_1627392367 = nsuIntToStr(modInt(absOffset_1627392364, 60), 2); + if ((pattern_p1 == 33)) { + Temporary9 = [58]; + } + else { + Temporary9 = []; + } + + var sep_1627392372 = nimCopy(null, Temporary9, NTI33554449); + nimAddStrStr(result_p2[result_p2_Idx], (h_1627392365).concat(sep_1627392372,m_1627392366,sep_1627392372,s_1627392367));; + break; + default: + if (true) { + failedAssertImpl__stdZassertions_u86([116,105,109,101,115,46,110,105,109,40,49,57,48,48,44,32,49,51,41,32,96,102,97,108,115,101,96,32]); + } + + break; + } + } + + break; + case 36: + if ((dt_p0.year < 1)) { + Temporary10 = [66,67]; + } + else { + Temporary10 = [65,68]; + } + + nimAddStrStr(result_p2[result_p2_Idx], Temporary10);; + break; + case 37: + if (true) { + failedAssertImpl__stdZassertions_u86([116,105,109,101,115,46,110,105,109,40,49,57,48,51,44,32,49,49,41,32,96,102,97,108,115,101,96,32]); + } + + break; + } + + +} + +function format__pureZtimes_u3956(dt_p0, f_p1, loc_p2) { + var result_1627393912 = [[]]; + + if (!(!((dt_p0.monthdayZero == 0)))) { + failedAssertImpl__stdZassertions_u86([116,105,109,101,115,46,110,105,109,40,50,49,57,50,44,32,51,41,32,96,100,116,46,109,111,110,116,104,100,97,121,90,101,114,111,32,33,61,32,48,96,32,85,110,105,110,105,116,105,97,108,105,122,101,100,32,100,97,116,101,116,105,109,101]); + } + + result_1627393912[0] = nimCopy(null, [], NTI33554449); + var idx_1627393918 = 0; + Label1: { + Label2: while (true) { + if (!(idx_1627393918 <= (f_p1.patterns).length - 1)) break Label2; + switch (chckRange(f_p1.patterns[chckIndx(idx_1627393918, 0, (f_p1.patterns).length - 1)], 0, 37)) { + case 37: + idx_1627393918 = addInt(idx_1627393918, 1); + var len_1627393927 = f_p1.patterns[chckIndx(idx_1627393918, 0, (f_p1.patterns).length - 1)]; + Label3: { + var i_1627393939 = 0; + var res_637535055 = 1; + Label4: { + Label5: while (true) { + if (!(res_637535055 <= ((len_1627393927) | 0))) break Label5; + i_1627393939 = Number(BigInt.asUintN(8, BigInt(res_637535055))); + idx_1627393918 = addInt(idx_1627393918, 1); + addChar(result_1627393912[0], f_p1.patterns[chckIndx(idx_1627393918, 0, (f_p1.patterns).length - 1)]);; + res_637535055 = addInt(res_637535055, 1); + } + }; + }; + idx_1627393918 = addInt(idx_1627393918, 1); + break; + default: + formatPattern__pureZtimes_u2378(dt_p0, chckRange(f_p1.patterns[chckIndx(idx_1627393918, 0, (f_p1.patterns).length - 1)], 0, 37), result_1627393912, 0, loc_p2); + idx_1627393918 = addInt(idx_1627393918, 1); + break; + } + } + }; + + return result_1627393912[0]; + +} + +function format__threadlist_u295(dt_p0) { + var result_1593835819 = []; + + result_1593835819 = nimCopy(null, format__pureZtimes_u3956(dt_p0, f2_1593835820, DefaultLocale_1627392012), NTI33554449); + + return result_1593835819; + +} + +function normalize__pureZtimes_u1329(seconds_p0, nanoseconds_p1) { + var result_1627391285 = ({seconds: 0n, nanosecond: 0}); + + result_1627391285 = nimCopy(result_1627391285, ({seconds: 0n, nanosecond: 0}), NTI1627389970); + result_1627391285.seconds = addInt64(seconds_p0, convert__pureZtimes_u471(0, 3, nanoseconds_p1)); + var nanosecond_1627391301 = modInt64(nanoseconds_p1, BigInt(convert__pureZtimes_u567(3, 0, 1))); + if ((nanosecond_1627391301 < 0n)) { + nanosecond_1627391301 = addInt64(nanosecond_1627391301, BigInt(BigInt(convert__pureZtimes_u567(3, 0, 1)))); + result_1627391285.seconds = subInt64(result_1627391285.seconds, BigInt(1n)); + } + + result_1627391285.nanosecond = chckRange(chckRange(Number(nanosecond_1627391301), (-2147483648), 2147483647), 0, 999999999); + + return result_1627391285; + +} + +function ntSubTime(a_p0, b_p1) { + var result_1627391318 = ({seconds: 0n, nanosecond: 0}); + + result_1627391318 = nimCopy(result_1627391318, normalize__pureZtimes_u1329(subInt64(a_p0.seconds, b_p1.seconds), BigInt(subInt(a_p0.nanosecond, b_p1.nanosecond))), NTI1627389970); + + return result_1627391318; + +} + +function initDuration__pureZtimes_u461(nanoseconds_p0, microseconds_p1, milliseconds_p2, seconds_p3, minutes_p4, hours_p5, days_p6, weeks_p7) { + var result_1627390422 = ({seconds: 0n, nanosecond: 0}); + + var seconds_1627390468 = addInt64(addInt64(addInt64(addInt64(addInt64(addInt64(addInt64(convert__pureZtimes_u471(7, 3, weeks_p7), convert__pureZtimes_u471(6, 3, days_p6)), convert__pureZtimes_u471(4, 3, minutes_p4)), convert__pureZtimes_u471(5, 3, hours_p5)), convert__pureZtimes_u471(3, 3, seconds_p3)), convert__pureZtimes_u471(2, 3, milliseconds_p2)), convert__pureZtimes_u471(1, 3, microseconds_p1)), convert__pureZtimes_u471(0, 3, nanoseconds_p0)); + var nanoseconds_1627390479 = chckRange(Number(addInt64(addInt64(convert__pureZtimes_u471(2, 0, modInt64(milliseconds_p2, 1000n)), convert__pureZtimes_u471(1, 0, modInt64(microseconds_p1, 1000000n))), modInt64(nanoseconds_p0, 1000000000n))), (-2147483648), 2147483647); + result_1627390422 = nimCopy(result_1627390422, normalize__pureZtimes_u552(seconds_1627390468, BigInt(nanoseconds_1627390479)), NTI1627389972); + + return result_1627390422; + +} + +function floorDiv__pureZtimes_u289(x_p0, y_p1) { + var result_1627390245 = 0n; + + result_1627390245 = x_p0 / y_p1; + var r_1627390246 = x_p0 % y_p1; + if ((((0n < r_1627390246) && (y_p1 < 0n)) || ((r_1627390246 < 0n) && (0n < y_p1)))) { + result_1627390245 = BigInt.asIntN(64, result_1627390245 - BigInt(1)); + } + + + return result_1627390245; + +} + +function fromEpochDay__pureZtimes_u187(epochday_p0) { + var Temporary1; + var Temporary2; + + var result_1627390144 = {Field0: 0, Field1: 0, Field2: 0}; + + BeforeRet: { + var z_1627390145 = epochday_p0; + z_1627390145 = addInt64(z_1627390145, BigInt(719468)); + if ((0n <= z_1627390145)) { + Temporary1 = z_1627390145; + } + else { + Temporary1 = subInt64(z_1627390145, 146096n); + } + + var era_1627390151 = divInt64(Temporary1, 146097n); + var doe_1627390152 = subInt64(z_1627390145, mulInt64(era_1627390151, 146097n)); + var yoe_1627390153 = divInt64(subInt64(addInt64(subInt64(doe_1627390152, divInt64(doe_1627390152, 1460n)), divInt64(doe_1627390152, 36524n)), divInt64(doe_1627390152, 146096n)), 365n); + var y_1627390154 = addInt64(yoe_1627390153, mulInt64(era_1627390151, 400n)); + var doy_1627390155 = subInt64(doe_1627390152, subInt64(addInt64(mulInt64(365n, yoe_1627390153), divInt64(yoe_1627390153, 4n)), divInt64(yoe_1627390153, 100n))); + var mp_1627390156 = divInt64(addInt64(mulInt64(5n, doy_1627390155), 2n), 153n); + var d_1627390157 = addInt64(subInt64(doy_1627390155, divInt64(addInt64(mulInt64(153n, mp_1627390156), 2n), 5n)), 1n); + if ((mp_1627390156 < 10n)) { + Temporary2 = 3; + } + else { + Temporary2 = (-9); + } + + var m_1627390158 = addInt64(mp_1627390156, BigInt(Temporary2)); + var colontmp__637535061 = chckRange(Number(d_1627390157), 1, 31); + var colontmp__637535062 = chckRange(Number(m_1627390158), 1, 12); + var colontmp__637535063 = chckRange(Number(addInt64(y_1627390154, BigInt(((m_1627390158 <= 2n) ? 1 : 0)))), (-2147483648), 2147483647); + result_1627390144 = nimCopy(result_1627390144, {Field0: nimCopy(null, colontmp__637535061, NTI1627389962), Field1: colontmp__637535062, Field2: colontmp__637535063}, NTI1627390125); + break BeforeRet; + }; + + return result_1627390144; + +} + +function isLeapYear__pureZtimes_u131(year_p0) { + var result_1627390085 = false; + + result_1627390085 = ((modInt(year_p0, 4) == 0) && (!((modInt(year_p0, 100) == 0)) || (modInt(year_p0, 400) == 0))); + + return result_1627390085; + +} + +function getDaysInMonth__pureZtimes_u134(month_p0, year_p1) { + var Temporary1; + + var result_1627390089 = 0; + + switch (month_p0) { + case 2: + if (isLeapYear__pureZtimes_u131(year_p1)) { + Temporary1 = 29; + } + else { + Temporary1 = 28; + } + + result_1627390089 = Temporary1; + break; + case 4: + case 6: + case 9: + case 11: + result_1627390089 = 30; + break; + default: + result_1627390089 = 31; + break; + } + + return result_1627390089; + +} + +function assertValidDate__pureZtimes_u138(monthday_p0, month_p1, year_p2) { + if (!((monthday_p0 <= getDaysInMonth__pureZtimes_u134(month_p1, year_p2)))) { + failedAssertImpl__stdZassertions_u86(([116,105,109,101,115,46,110,105,109,40,52,56,54,44,32,51,41,32,96,109,111,110,116,104,100,97,121,32,60,61,32,103,101,116,68,97,121,115,73,110,77,111,110,116,104,40,109,111,110,116,104,44,32,121,101,97,114,41,96,32]).concat(HEX24__systemZdollars_u14(year_p2),[45],nsuIntToStr(month_p1, 2),[45],HEX24__systemZdollars_u14(monthday_p0),[32,105,115,32,110,111,116,32,97,32,118,97,108,105,100,32,100,97,116,101])); + } + + + +} + +function toEpochDay__pureZtimes_u167(monthday_p0, month_p1, year_p2) { + var Temporary1; + var Temporary2; + + var result_1627390123 = 0n; + + BeforeRet: { + assertValidDate__pureZtimes_u138(monthday_p0, month_p1, year_p2); + var y_1627390127 = year_p2; + var m_1627390128 = month_p1; + var d_1627390129 = monthday_p0; + if ((m_1627390128 <= 2)) { + y_1627390127 = subInt(y_1627390127, 1); + } + + if ((0 <= y_1627390127)) { + Temporary1 = y_1627390127; + } + else { + Temporary1 = subInt(y_1627390127, 399); + } + + var era_1627390135 = divInt(Temporary1, 400); + var yoe_1627390136 = subInt(y_1627390127, mulInt(era_1627390135, 400)); + if ((2 < m_1627390128)) { + Temporary2 = (-3); + } + else { + Temporary2 = 9; + } + + var doy_1627390137 = subInt(addInt(divInt(addInt(mulInt(153, addInt(m_1627390128, Temporary2)), 2), 5), d_1627390129), 1); + var doe_1627390138 = addInt(subInt(addInt(mulInt(yoe_1627390136, 365), divInt(yoe_1627390136, 4)), divInt(yoe_1627390136, 100)), doy_1627390137); + result_1627390123 = BigInt(subInt(addInt(mulInt(era_1627390135, 146097), doe_1627390138), 719468)); + break BeforeRet; + }; + + return result_1627390123; + +} + +function getDayOfWeek__pureZtimes_u283(monthday_p0, month_p1, year_p2) { + var Temporary1; + + var result_1627390239 = 0; + + assertValidDate__pureZtimes_u138(monthday_p0, month_p1, year_p2); + var days_1627390240 = subInt64(toEpochDay__pureZtimes_u167(monthday_p0, month_p1, year_p2), 3n); + var weeks_1627390252 = floorDiv__pureZtimes_u289(days_1627390240, 7n); + var wd_1627390253 = subInt64(days_1627390240, mulInt64(weeks_1627390252, 7n)); + if ((wd_1627390253 == 0n)) { + Temporary1 = 6; + } + else { + Temporary1 = chckRange(Number(subInt64(wd_1627390253, 1n)), 0, 6); + } + + result_1627390239 = Temporary1; + + return result_1627390239; + +} + +function getDayOfYear__pureZtimes_u244(monthday_p0, month_p1, year_p2) { + var result_1627390200 = 0; + + assertValidDate__pureZtimes_u138(monthday_p0, month_p1, year_p2); + if (isLeapYear__pureZtimes_u131(year_p2)) { + result_1627390200 = chckRange(subInt(addInt(daysUntilMonthLeap_1627390202[chckIndx(month_p1, 1, (daysUntilMonthLeap_1627390202).length + (1) - 1) - (1)], monthday_p0), 1), 0, 365); + } + else { + result_1627390200 = chckRange(subInt(addInt(daysUntilMonth_1627390201[chckIndx(month_p1, 1, (daysUntilMonth_1627390201).length + (1) - 1) - (1)], monthday_p0), 1), 0, 365); + } + + + return result_1627390200; + +} + +function initDateTime__pureZtimes_u1618(zt_p0, zone_p1) { + var result_1627391573 = ({m_type: NTI1627389971, nanosecond: 0, second: 0, minute: 0, hour: 0, monthdayZero: 0, monthZero: 0, year: 0, weekday: 0, yearday: 0, isDst: false, timezone: null, utcOffset: 0}); + + var adjTime_1627391574 = ntSubTime(zt_p0.time, initDuration__pureZtimes_u461(0n, 0n, 0n, BigInt(zt_p0.utcOffset), 0n, 0n, 0n, 0n)); + var s_1627391575 = adjTime_1627391574.seconds; + var epochday_1627391580 = floorDiv__pureZtimes_u289(s_1627391575, 86400n); + var rem_1627391581 = subInt64(s_1627391575, mulInt64(epochday_1627391580, 86400n)); + var hour_1627391582 = divInt64(rem_1627391581, 3600n); + rem_1627391581 = subInt64(rem_1627391581, mulInt64(hour_1627391582, 3600n)); + var minute_1627391583 = divInt64(rem_1627391581, 60n); + rem_1627391581 = subInt64(rem_1627391581, mulInt64(minute_1627391583, 60n)); + var second_1627391584 = rem_1627391581; + var tmpTuple_1627391585 = fromEpochDay__pureZtimes_u187(epochday_1627391580); + var d_1627391586 = tmpTuple_1627391585["Field0"]; + var m_1627391587 = tmpTuple_1627391585["Field1"]; + var y_1627391588 = tmpTuple_1627391585["Field2"]; + result_1627391573 = nimCopy(result_1627391573, {year: y_1627391588, monthZero: ((m_1627391587) | 0), monthdayZero: d_1627391586, hour: nimCopy(null, chckRange(Number(hour_1627391582), 0, 23), NTI1627389963), minute: nimCopy(null, chckRange(Number(minute_1627391583), 0, 59), NTI1627389964), second: nimCopy(null, chckRange(Number(second_1627391584), 0, 60), NTI1627389965), nanosecond: nimCopy(null, zt_p0.time.nanosecond, NTI1627389967), weekday: getDayOfWeek__pureZtimes_u283(d_1627391586, m_1627391587, y_1627391588), yearday: getDayOfYear__pureZtimes_u244(d_1627391586, m_1627391587, y_1627391588), isDst: zt_p0.isDst, timezone: zone_p1, utcOffset: zt_p0.utcOffset, m_type: NTI1627389971}, NTI1627389971); + + return result_1627391573; + +} + +function zonedTimeFromTime__pureZtimes_u1707(zone_p0, time_p1) { + var result_1627391662 = ({time: ({seconds: 0n, nanosecond: 0}), utcOffset: 0, isDst: false}); + + result_1627391662 = nimCopy(result_1627391662, zone_p0.zonedTimeFromTimeImpl(time_p1), NTI1627389977); + + return result_1627391662; + +} + +function inZone__pureZtimes_u1757(time_p0, zone_p1) { + var result_1627391712 = ({m_type: NTI1627389971, nanosecond: 0, second: 0, minute: 0, hour: 0, monthdayZero: 0, monthZero: 0, year: 0, weekday: 0, yearday: 0, isDst: false, timezone: null, utcOffset: 0}); + + result_1627391712 = nimCopy(result_1627391712, initDateTime__pureZtimes_u1618(zonedTimeFromTime__pureZtimes_u1707(zone_p1, time_p0), zone_p1), NTI1627389971); + + return result_1627391712; + +} + +function newTimezone__pureZtimes_u1664(name_p0, zonedTimeFromTimeImpl_p1, zonedTimeFromAdjTimeImpl_p2) { + var result_1627391624 = null; + + result_1627391624 = {name: nimCopy(null, name_p0, NTI33554449), zonedTimeFromTimeImpl: zonedTimeFromTimeImpl_p1, zonedTimeFromAdjTimeImpl: zonedTimeFromAdjTimeImpl_p2}; + + return result_1627391624; + +} + +function localZonedTimeFromTime__pureZtimes_u1790(time_p0) { + var result_1627391744 = ({time: ({seconds: 0n, nanosecond: 0}), utcOffset: 0, isDst: false}); + + var jsDate_1627391745 = new Date(Number(mulInt64(time_p0.seconds, 1000n))); + var offset_1627391746 = mulInt(jsDate_1627391745.getTimezoneOffset(), 60); + result_1627391744.time = nimCopy(result_1627391744.time, time_p0, NTI1627389970); + result_1627391744.utcOffset = offset_1627391746; + result_1627391744.isDst = false; + + return result_1627391744; + +} + +function contains__pureZhttpcore_u4172(s_p0, value_p1) { + var result_822087762 = false; + + result_822087762 = ((s_p0.a <= value_p1) && (value_p1 <= s_p0.b)); + + return result_822087762; + +} + +function ntAddTime(a_p0, b_p1) { + var result_1627391265 = ({seconds: 0n, nanosecond: 0}); + + result_1627391265 = nimCopy(result_1627391265, normalize__pureZtimes_u1329(addInt64(a_p0.seconds, b_p1.seconds), BigInt(addInt(a_p0.nanosecond, b_p1.nanosecond))), NTI1627389970); + + return result_1627391265; + +} + +function localZonedTimeFromAdjTime__pureZtimes_u1795(adjTime_p0) { + var result_1627391749 = ({time: ({seconds: 0n, nanosecond: 0}), utcOffset: 0, isDst: false}); + + var utcDate_1627391750 = new Date(Number(mulInt64(adjTime_p0.seconds, 1000n))); + var localDate_1627391751 = new Date(utcDate_1627391750.getUTCFullYear(),utcDate_1627391750.getUTCMonth(),utcDate_1627391750.getUTCDate(),utcDate_1627391750.getUTCHours(),utcDate_1627391750.getUTCMinutes(),utcDate_1627391750.getUTCSeconds(),0); + if (contains__pureZhttpcore_u4172(HEX2EHEX2E__stdZstrbasics_u48(0, 99), utcDate_1627391750.getUTCFullYear())) { + localDate_1627391751.setFullYear(utcDate_1627391750.getUTCFullYear()); + } + + result_1627391749.utcOffset = mulInt(localDate_1627391751.getTimezoneOffset(), 60); + result_1627391749.time = nimCopy(result_1627391749.time, ntAddTime(adjTime_p0, initDuration__pureZtimes_u461(0n, 0n, 0n, BigInt(result_1627391749.utcOffset), 0n, 0n, 0n, 0n)), NTI1627389970); + result_1627391749.isDst = false; + + return result_1627391749; + +} + +function local__pureZtimes_u1839() { + var result_1627391792 = null; + + if ((localInstance_1627391769[0] == null)) { + localInstance_1627391769[0] = newTimezone__pureZtimes_u1664([76,79,67,65,76], localZonedTimeFromTime__pureZtimes_u1790, localZonedTimeFromAdjTime__pureZtimes_u1795); + } + + result_1627391792 = localInstance_1627391769[0]; + + return result_1627391792; + +} + +function local__pureZtimes_u1853(t_p0) { + var result_1627391807 = ({m_type: NTI1627389971, nanosecond: 0, second: 0, minute: 0, hour: 0, monthdayZero: 0, monthZero: 0, year: 0, weekday: 0, yearday: 0, isDst: false, timezone: null, utcOffset: 0}); + + result_1627391807 = nimCopy(result_1627391807, inZone__pureZtimes_u1757(t_p0, local__pureZtimes_u1839()), NTI1627389971); + + return result_1627391807; + +} + +function format__threadlist_u302(dt_p0) { + var result_1593835826 = []; + + result_1593835826 = nimCopy(null, format__pureZtimes_u3956(dt_p0, f2_1593835827, DefaultLocale_1627392012), NTI33554449); + + return result_1593835826; + +} + +function year__pureZtimes_u1500(dt_p0) { + var result_1627391454 = 0; + + if (!(!((dt_p0.monthdayZero == 0)))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("times.nim(1100, 28) `dt.monthdayZero != 0` Uninitialized datetime")); + } + + result_1627391454 = dt_p0.year; + + return result_1627391454; + +} + +function format__threadlist_u211(dt_p0) { + var result_1593835735 = []; + + result_1593835735 = nimCopy(null, format__pureZtimes_u3956(dt_p0, f2_1593835736, DefaultLocale_1627392012), NTI33554449); + + return result_1593835735; + +} + +function inDays__pureZtimes_u684(dur_p0) { + var result_1627390638 = 0n; + + var correctionHEX60gensym17_1627390645 = ((dur_p0.seconds < 0n) && (0 < dur_p0.nanosecond)); + result_1627390638 = convert__pureZtimes_u471(3, 6, addInt64(dur_p0.seconds, BigInt((correctionHEX60gensym17_1627390645 ? 1 : 0)))); + + return result_1627390638; + +} + +function format__threadlist_u217(dt_p0) { + var result_1593835741 = []; + + result_1593835741 = nimCopy(null, format__pureZtimes_u3956(dt_p0, f2_1593835742, DefaultLocale_1627392012), NTI33554449); + + return result_1593835741; + +} + +function HEX24__systemZdollars_u34(xHEX60gensym4_p0) { + var result_402653220 = [[]]; + + result_402653220[0] = nimCopy(null, [], NTI33554449); + addInt__stdZprivateZdigitsutils_u223(result_402653220, 0, xHEX60gensym4_p0); + + return result_402653220[0]; + +} + +function inHours__pureZtimes_u706(dur_p0) { + var result_1627390660 = 0n; + + var correctionHEX60gensym20_1627390667 = ((dur_p0.seconds < 0n) && (0 < dur_p0.nanosecond)); + result_1627390660 = convert__pureZtimes_u471(3, 5, addInt64(dur_p0.seconds, BigInt((correctionHEX60gensym20_1627390667 ? 1 : 0)))); + + return result_1627390660; + +} + +function inSeconds__pureZtimes_u750(dur_p0) { + var result_1627390704 = 0n; + + var correctionHEX60gensym26_1627390711 = ((dur_p0.seconds < 0n) && (0 < dur_p0.nanosecond)); + result_1627390704 = convert__pureZtimes_u471(3, 3, addInt64(dur_p0.seconds, BigInt((correctionHEX60gensym26_1627390711 ? 1 : 0)))); + + return result_1627390704; + +} + +function renderActivity__threadlist_u205(activity_p0) { + var result_1593835727 = []; + + BeforeRet: { + var currentTime_1593835728 = getTime__pureZtimes_u1247(); + var activityTime_1593835729 = fromUnix__pureZtimes_u1193(activity_p0); + var duration_1593835730 = ntDiffTime(currentTime_1593835728, activityTime_1593835729); + if (!((year__pureZtimes_u1500(local__pureZtimes_u1853(currentTime_1593835728)) == year__pureZtimes_u1500(local__pureZtimes_u1853(activityTime_1593835729))))) { + result_1593835727 = nimCopy(null, format__threadlist_u211(local__pureZtimes_u1853(activityTime_1593835729)), NTI33554449); + break BeforeRet; + } + else { + if (((30n < inDays__pureZtimes_u684(duration_1593835730)) && (inDays__pureZtimes_u684(duration_1593835730) < 300n))) { + result_1593835727 = nimCopy(null, format__threadlist_u217(local__pureZtimes_u1853(activityTime_1593835729)), NTI33554449); + break BeforeRet; + } + else { + if (!((inDays__pureZtimes_u684(duration_1593835730) == 0n))) { + result_1593835727 = nimCopy(null, (HEX24__systemZdollars_u34(inDays__pureZtimes_u684(duration_1593835730))).concat([100]), NTI33554449); + break BeforeRet; + } + else { + if (!((inHours__pureZtimes_u706(duration_1593835730) == 0n))) { + result_1593835727 = nimCopy(null, (HEX24__systemZdollars_u34(inHours__pureZtimes_u706(duration_1593835730))).concat([104]), NTI33554449); + break BeforeRet; + } + else { + if (!((inMinutes__pureZtimes_u728(duration_1593835730) == 0n))) { + result_1593835727 = nimCopy(null, (HEX24__systemZdollars_u34(inMinutes__pureZtimes_u728(duration_1593835730))).concat([109]), NTI33554449); + break BeforeRet; + } + else { + result_1593835727 = nimCopy(null, (HEX24__systemZdollars_u34(inSeconds__pureZtimes_u750(duration_1593835730))).concat([115]), NTI33554449); + break BeforeRet; + } + }}}} + }; + + return result_1593835727; + +} + +function genThread__threadlist_u223(pos_p0, thread_p1, isNew_p2, noBorder_p3, displayCategory_p4) { + var result_1593835749 = null; + + var isOld_1593835750 = (2n < inWeeks__pureZtimes_u661(ntDiffTime(getTime__pureZtimes_u1247(), fromUnix__pureZtimes_u1193(thread_p1.creation)))); + var isBanned_1593835751 = isBanned__user_u102(thread_p1.author.rank); + var tmp_1593835752 = tree__pkgZkaraxZvdom_u880(187, []); + tmp_1593835752.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [110,111,45,98,111,114,100,101,114], Field1: noBorder_p3}, NTI1593835702), nimCopy(null, {Field0: [98,97,110,110,101,100], Field1: isBanned_1593835751}, NTI1593835702), nimCopy(null, {Field0: [112,105,110,110,101,100], Field1: thread_p1.isPinned}, NTI1593835702), nimCopy(null, {Field0: ([116,104,114,101,97,100,45]).concat(HEX24__systemZdollars_u14(pos_p0)), Field1: true}, NTI1593835702)], [])); + var tmp_1593835753 = tree__pkgZkaraxZvdom_u880(188, []); + tmp_1593835753.class = "thread-title"; + if (thread_p1.isLocked) { + var tmp_1593835754 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1593835754.class = "fas fa-lock fa-xs"; + setAttr__pkgZkaraxZvdom_u713(tmp_1593835754, "title", "Thread cannot be replied to"); + add__pkgZkaraxZvdom_u794(tmp_1593835753, tmp_1593835754); + } + + if (thread_p1.isPinned) { + var tmp_1593835755 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1593835755.class = "fas fa-thumbtack fa-xs"; + setAttr__pkgZkaraxZvdom_u713(tmp_1593835755, "title", "Pinned post"); + add__pkgZkaraxZvdom_u794(tmp_1593835753, tmp_1593835755); + } + + if (isBanned_1593835751) { + var tmp_1593835756 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1593835756.class = "fas fa-ban fa-xs"; + setAttr__pkgZkaraxZvdom_u713(tmp_1593835756, "title", "Thread author is banned"); + add__pkgZkaraxZvdom_u794(tmp_1593835753, tmp_1593835756); + } + + if (isModerated__threadlist_u26(thread_p1)) { + var tmp_1593835757 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1593835757.class = "fas fa-eye-slash fa-xs"; + setAttr__pkgZkaraxZvdom_u713(tmp_1593835757, "title", "Thread is moderated"); + add__pkgZkaraxZvdom_u794(tmp_1593835753, tmp_1593835757); + } + + if (thread_p1.isSolved) { + var tmp_1593835758 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1593835758.class = "fas fa-check-square fa-xs"; + setAttr__pkgZkaraxZvdom_u713(tmp_1593835758, "title", "Thread has a solution"); + add__pkgZkaraxZvdom_u794(tmp_1593835753, tmp_1593835758); + } + + var tmp_1593835759 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_1593835759, "href", toJSStr(makeUri__karaxutils_u123(([47,116,47]).concat(HEX24__systemZdollars_u14(thread_p1.id)), [], [47], false, true))); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_1593835759, 0, anchorCB__karaxutils_u166, kxi__); + add__pkgZkaraxZvdom_u794(tmp_1593835759, text__pkgZkaraxZvdom_u948(thread_p1.topic)); + add__pkgZkaraxZvdom_u794(tmp_1593835753, tmp_1593835759); + var tmp_1593835760 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1593835760.class = toJSStr(([115,104,111,119,45,115,109]).concat(class__karaxutils_u57([nimCopy(null, {Field0: [100,45,110,111,110,101], Field1: !(displayCategory_p4)}, NTI1593835744)], []))); + add__pkgZkaraxZvdom_u794(tmp_1593835760, render__category_u32(thread_p1.category, true)); + add__pkgZkaraxZvdom_u794(tmp_1593835753, tmp_1593835760); + add__pkgZkaraxZvdom_u794(tmp_1593835752, tmp_1593835753); + var tmp_1593835761 = tree__pkgZkaraxZvdom_u880(188, []); + tmp_1593835761.class = toJSStr(([104,105,100,101,45,115,109]).concat(class__karaxutils_u57([nimCopy(null, {Field0: [100,45,110,111,110,101], Field1: !(displayCategory_p4)}, NTI1593835751)], []))); + add__pkgZkaraxZvdom_u794(tmp_1593835761, render__category_u32(thread_p1.category, true)); + add__pkgZkaraxZvdom_u794(tmp_1593835752, tmp_1593835761); + add__pkgZkaraxZvdom_u794(tmp_1593835752, genUserAvatars__threadlist_u162(thread_p1.users)); + var tmp_1593835762 = tree__pkgZkaraxZvdom_u880(188, []); + tmp_1593835762.class = "thread-replies"; + add__pkgZkaraxZvdom_u794(tmp_1593835762, text__pkgZkaraxZvdom_u948(HEX24__systemZdollars_u14(thread_p1.replies))); + add__pkgZkaraxZvdom_u794(tmp_1593835752, tmp_1593835762); + var tmp_1593835763 = tree__pkgZkaraxZvdom_u880(188, []); + tmp_1593835763.class = toJSStr(([104,105,100,101,45,115,109]).concat(class__karaxutils_u57([nimCopy(null, {Field0: [118,105,101,119,115,45,116,101,120,116], Field1: (thread_p1.views < 999)}, NTI1593835762), nimCopy(null, {Field0: [112,111,112,117,108,97,114,45,116,101,120,116], Field1: ((999 < thread_p1.views) && (thread_p1.views < 5000))}, NTI1593835762), nimCopy(null, {Field0: [115,117,112,101,114,45,112,111,112,117,108,97,114,45,116,101,120,116], Field1: (5000 < thread_p1.views)}, NTI1593835762)], []))); + if ((999 < thread_p1.views)) { + Label1: { + var fmtRes_1593835769 = [mnewString(0)]; + formatValue__threadlist_u250(fmtRes_1593835769, 0, HEX2F__system_u1608(thread_p1.views, 1000)); + nimAddStrStr(fmtRes_1593835769[0], [107]);; + }; + add__pkgZkaraxZvdom_u794(tmp_1593835763, text__pkgZkaraxZvdom_u948(fmtRes_1593835769[0])); + } + else { + add__pkgZkaraxZvdom_u794(tmp_1593835763, text__pkgZkaraxZvdom_u948(HEX24__systemZdollars_u14(thread_p1.views))); + } + + add__pkgZkaraxZvdom_u794(tmp_1593835752, tmp_1593835763); + var friendlyCreation_1593835821 = format__threadlist_u295(local__pureZtimes_u1853(fromUnix__pureZtimes_u1193(thread_p1.creation))); + var friendlyActivity_1593835828 = format__threadlist_u302(local__pureZtimes_u1853(fromUnix__pureZtimes_u1193(thread_p1.activity))); + var tmp_1593835764 = tree__pkgZkaraxZvdom_u880(188, []); + tmp_1593835764.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [105,115,45,110,101,119], Field1: isNew_p2}, NTI1593835826), nimCopy(null, {Field0: [105,115,45,111,108,100], Field1: isOld_1593835750}, NTI1593835826)], [116,104,114,101,97,100,45,116,105,109,101])); + setAttr__pkgZkaraxZvdom_u713(tmp_1593835764, "title", toJSStr((friendlyCreation_1593835821).concat(friendlyActivity_1593835828))); + add__pkgZkaraxZvdom_u794(tmp_1593835764, text__pkgZkaraxZvdom_u948(renderActivity__threadlist_u205(thread_p1.activity))); + add__pkgZkaraxZvdom_u794(tmp_1593835752, tmp_1593835764); + result_1593835749 = tmp_1593835752; + + return result_1593835749; + +} + +function onLoadMore__threadlist_u921(ev_p0, n_p1, categoryId_p2) { + var Temporary1; + + state_1593835578[0].loading = true; + var start_1593836461 = ((Temporary1 = get__threadlist_u770(state_1593835578[0].list), Temporary1)[0][Temporary1[1]].threads).length; + if (isSome__pureZtimes_u3701(categoryId_p2)) { + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(makeUri__karaxutils_u123(([116,104,114,101,97,100,115,46,106,115,111,110,63,115,116,97,114,116,61]).concat(HEX24__systemZdollars_u14(start_1593836461),[38,99,97,116,101,103,111,114,121,73,100,61],HEX24__systemZdollars_u14(get__pureZtimes_u3785(categoryId_p2))), [], [47], false, true)), [], onThreadList__threadlist_u341, true, kxi__); + } + else { + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(makeUri__karaxutils_u123(([116,104,114,101,97,100,115,46,106,115,111,110,63,115,116,97,114,116,61]).concat(HEX24__systemZdollars_u14(start_1593836461)), [], [47], false, true)), [], onThreadList__threadlist_u341, true, kxi__); + } + + + +} + +function genThreadList__threadlist_u1041(currentUser_p0, categoryId_p1) { + var Temporary1; + categoryId_p1 = nimCopy(null, categoryId_p1, NTI1627391017); + +function HEX3Aanonymous__threadlist_u1175(ev_p0, n_p1) { + onLoadMore__threadlist_u921(ev_p0, n_p1, categoryId_p1); + + + } + + var result_1593836566 = null; + + BeforeRet: { + if (!((state_1593835578[0].status == 200))) { + result_1593836566 = renderError__error_u24([67,111,117,108,100,110,39,116,32,114,101,116,114,105,101,118,101,32,116,104,114,101,97,100,115,46], state_1593835578[0].status); + break BeforeRet; + } + + if (isNone__threadlist_u777(state_1593835578[0].list)) { + if (!(state_1593835578[0].loading)) { + state_1593835578[0].loading = true; + if (isSome__pureZtimes_u3701(categoryId_p1)) { + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(makeUri__karaxutils_u123(([116,104,114,101,97,100,115,46,106,115,111,110,63,99,97,116,101,103,111,114,121,73,100,61]).concat(HEX24__systemZdollars_u14(get__pureZtimes_u3785(categoryId_p1))), [], [47], false, true)), [], onThreadList__threadlist_u341, true, kxi__); + } + else { + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(makeUri__karaxutils_u123([116,104,114,101,97,100,115,46,106,115,111,110], [], [47], false, true)), [], onThreadList__threadlist_u341, true, kxi__); + } + + } + + var tmp_1593836599 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1593836599.class = "loading loading-lg"; + result_1593836566 = tmp_1593836599; + break BeforeRet; + } + + var displayCategory_1593836606 = isNone__pureZtimes_u3771(categoryId_p1); + var list_1593836619 = (Temporary1 = get__threadlist_u770(state_1593835578[0].list), Temporary1)[0][Temporary1[1]]; + var tmp_1593836620 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_1593836620.class = "thread-list"; + var tmp_1593836621 = tree__pkgZkaraxZvdom_u880(180, []); + tmp_1593836621.class = "table"; + tmp_1593836621.id = "threads-list"; + var tmp_1593836622 = tree__pkgZkaraxZvdom_u880(185, []); + var tmp_1593836623 = tree__pkgZkaraxZvdom_u880(187, []); + var tmp_1593836624 = tree__pkgZkaraxZvdom_u880(189, []); + add__pkgZkaraxZvdom_u794(tmp_1593836624, text__pkgZkaraxZvdom_u948([84,111,112,105,99])); + add__pkgZkaraxZvdom_u794(tmp_1593836623, tmp_1593836624); + var tmp_1593836625 = tree__pkgZkaraxZvdom_u880(189, []); + tmp_1593836625.class = toJSStr(([104,105,100,101,45,115,109]).concat(class__karaxutils_u57([nimCopy(null, {Field0: [100,45,110,111,110,101], Field1: !(displayCategory_1593836606)}, NTI1593836432)], []))); + add__pkgZkaraxZvdom_u794(tmp_1593836625, text__pkgZkaraxZvdom_u948([67,97,116,101,103,111,114,121])); + add__pkgZkaraxZvdom_u794(tmp_1593836623, tmp_1593836625); + var tmp_1593836626 = tree__pkgZkaraxZvdom_u880(189, []); + tmp_1593836626.class = "thread-users"; + add__pkgZkaraxZvdom_u794(tmp_1593836626, text__pkgZkaraxZvdom_u948([85,115,101,114,115])); + add__pkgZkaraxZvdom_u794(tmp_1593836623, tmp_1593836626); + var tmp_1593836627 = tree__pkgZkaraxZvdom_u880(189, []); + tmp_1593836627.class = "centered-header"; + add__pkgZkaraxZvdom_u794(tmp_1593836627, text__pkgZkaraxZvdom_u948([82,101,112,108,105,101,115])); + add__pkgZkaraxZvdom_u794(tmp_1593836623, tmp_1593836627); + var tmp_1593836628 = tree__pkgZkaraxZvdom_u880(189, []); + tmp_1593836628.class = "hide-sm centered-header"; + add__pkgZkaraxZvdom_u794(tmp_1593836628, text__pkgZkaraxZvdom_u948([86,105,101,119,115])); + add__pkgZkaraxZvdom_u794(tmp_1593836623, tmp_1593836628); + var tmp_1593836629 = tree__pkgZkaraxZvdom_u880(189, []); + tmp_1593836629.class = "centered-header"; + add__pkgZkaraxZvdom_u794(tmp_1593836629, text__pkgZkaraxZvdom_u948([65,99,116,105,118,105,116,121])); + add__pkgZkaraxZvdom_u794(tmp_1593836623, tmp_1593836629); + add__pkgZkaraxZvdom_u794(tmp_1593836622, tmp_1593836623); + add__pkgZkaraxZvdom_u794(tmp_1593836621, tmp_1593836622); + var tmp_1593836630 = tree__pkgZkaraxZvdom_u880(184, []); + Label2: { + var i_1593836646 = 0; + var colontmp__637535020 = 0; + colontmp__637535020 = (list_1593836619.threads).length; + var i_637535021 = 0; + Label3: { + Label4: while (true) { + if (!(i_637535021 < colontmp__637535020)) break Label4; + i_1593836646 = i_637535021; + Label5: { + var thread_1593836647 = nimCopy(null, list_1593836619.threads[chckIndx(i_1593836646, 0, (list_1593836619.threads).length - 1)], NTI1593835523); + if (!(visibleTo__threadlist_u1128(thread_1593836647, currentUser_p0))) { + break Label5; + } + + var isLastThread_1593836691 = (addInt(i_1593836646, 1) == (list_1593836619.threads).length); + var tmpTuple_1593836692 = getInfo__threadlist_u984(list_1593836619.threads, i_1593836646, currentUser_p0); + var isLastUnseen_1593836693 = tmpTuple_1593836692["Field0"]; + var isNew_1593836694 = tmpTuple_1593836692["Field1"]; + add__pkgZkaraxZvdom_u794(tmp_1593836630, genThread__threadlist_u223(addInt(i_1593836646, 1), thread_1593836647, isNew_1593836694, (isLastUnseen_1593836693 || isLastThread_1593836691), displayCategory_1593836606)); + if ((isLastUnseen_1593836693 && !(isLastThread_1593836691))) { + var tmp_1593836631 = tree__pkgZkaraxZvdom_u880(187, []); + tmp_1593836631.class = "last-visit-separator"; + var tmp_1593836632 = tree__pkgZkaraxZvdom_u880(188, []); + setAttr__pkgZkaraxZvdom_u713(tmp_1593836632, "colspan", "6"); + var tmp_1593836633 = tree__pkgZkaraxZvdom_u880(71, []); + add__pkgZkaraxZvdom_u794(tmp_1593836633, text__pkgZkaraxZvdom_u948([108,97,115,116,32,118,105,115,105,116])); + add__pkgZkaraxZvdom_u794(tmp_1593836632, tmp_1593836633); + add__pkgZkaraxZvdom_u794(tmp_1593836631, tmp_1593836632); + add__pkgZkaraxZvdom_u794(tmp_1593836630, tmp_1593836631); + } + + }; + i_637535021 = addInt(i_637535021, 1); + } + }; + }; + if ((0 < list_1593836619.moreCount)) { + var tmp_1593836634 = tree__pkgZkaraxZvdom_u880(187, []); + tmp_1593836634.class = "load-more-separator"; + if (state_1593835578[0].loading) { + var tmp_1593836635 = tree__pkgZkaraxZvdom_u880(188, []); + setAttr__pkgZkaraxZvdom_u713(tmp_1593836635, "colspan", "6"); + var tmp_1593836636 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1593836636.class = "loading loading-lg"; + add__pkgZkaraxZvdom_u794(tmp_1593836635, tmp_1593836636); + add__pkgZkaraxZvdom_u794(tmp_1593836634, tmp_1593836635); + } + else { + var tmp_1593836637 = tree__pkgZkaraxZvdom_u880(188, []); + setAttr__pkgZkaraxZvdom_u713(tmp_1593836637, "colspan", "6"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_1593836637, 0, HEX3Aanonymous__threadlist_u1175, kxi__); + var tmp_1593836638 = tree__pkgZkaraxZvdom_u880(71, []); + add__pkgZkaraxZvdom_u794(tmp_1593836638, text__pkgZkaraxZvdom_u948([108,111,97,100,32,109,111,114,101,32,116,104,114,101,97,100,115])); + add__pkgZkaraxZvdom_u794(tmp_1593836637, tmp_1593836638); + add__pkgZkaraxZvdom_u794(tmp_1593836634, tmp_1593836637); + } + + add__pkgZkaraxZvdom_u794(tmp_1593836630, tmp_1593836634); + } + + add__pkgZkaraxZvdom_u794(tmp_1593836621, tmp_1593836630); + add__pkgZkaraxZvdom_u794(tmp_1593836620, tmp_1593836621); + result_1593836566 = tmp_1593836620; + }; + + return result_1593836566; + +} + +function renderThreadList__threadlist_u1179(currentUser_p0, categoryId_p1) { + var result_1593836710 = null; + + var tmp_1593836711 = tree__pkgZkaraxZvdom_u880(44, []); + add__pkgZkaraxZvdom_u794(tmp_1593836711, render__mainbuttons_u72(state_1593835578[0].mainButtons, currentUser_p0, categoryId_p1)); + add__pkgZkaraxZvdom_u794(tmp_1593836711, genThreadList__threadlist_u1041(currentUser_p0, categoryId_p1)); + result_1593836710 = tmp_1593836711; + + return result_1593836710; + +} + +function some__pureZtimes_u2496(val_p0) { + var result_1627392451 = ({val: 0, has: false}); + + result_1627392451 = nimCopy(result_1627392451, {has: true, val: val_p0}, NTI1627391017); + + return result_1627392451; + +} + +function HEX5BHEX5D__forum_u285(t_p0, key_p1) { + var result_637534498 = []; + + var hcHEX60gensym20_637534499 = [0]; + var indexHEX60gensym20_637534506 = rawGet__pkgZjesterZpatterns_u442(t_p0, key_p1, hcHEX60gensym20_637534499, 0); + if ((0 <= indexHEX60gensym20_637534506)) { + result_637534498 = t_p0.data[chckIndx(indexHEX60gensym20_637534506, 0, (t_p0.data).length - 1)]["Field2"]; + } + else { + raiseKeyError__pureZhttpcore_u949(key_p1); + } + + + return result_637534498; + +} + +function onSubjectChange__newthread_u70(e_p0, n_p1, state_p2) { + state_p2.subject = value__pkgZkaraxZvdom_u416(n_p1); + + +} + +function isSome__replybox_u489(self_p0) { + var result_2113929708 = false; + + result_2113929708 = self_p0.has; + + return result_2113929708; + +} + +function get__replybox_u503(self_p0) { + var result_2113929722 = null; + + BeforeRet: { + if (isNone__error_u62(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2113929722 = self_p0.val; + break BeforeRet; + }; + + return result_2113929722; + +} + +function onMessageClick__replybox_u257(e_p0, n_p1, state_p2) { + state_p2.preview = false; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + + +} + +function none__replybox_u233() { + var result_2113929456 = ({val: null, has: false}); + + result_2113929456 = nimCopy(result_2113929456, {val: null, has: false}, NTI2113929392); + + return result_2113929456; + +} + +function none__replybox_u230() { + var result_2113929448 = ({val: null, has: false}); + + result_2113929448 = nimCopy(result_2113929448, none__replybox_u233(), NTI2113929229); + + return result_2113929448; + +} + +function some__replybox_u142(val_p0) { + var result_2113929361 = ({val: null, has: false}); + + result_2113929361 = nimCopy(result_2113929361, {has: true, val: val_p0}, NTI2113929229); + + return result_2113929361; + +} + +function onPreviewPost__replybox_u125(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym0_2113929348 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym0_2113929348 == 200)) { + rawEcho(cstrToNimstr(response_p1)); + state_p2.rendering = nimCopy(state_p2.rendering, some__replybox_u142(response_p1), NTI2113929229); + } + else { +++excHandler; + try { + var parsedHEX60gensym0_2113929397 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym0_2113929403 = to__addcategorymodal_u215(parsedHEX60gensym0_2113929397); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym0_2113929403), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onPreviewClick__replybox_u198(e_p0, n_p1, state_p2) { + +function HEX3Aanonymous__replybox_u253(s_p0, r_p1) { + onPreviewPost__replybox_u125(s_p0, r_p1, state_p2); + + + } + + state_p2.preview = true; + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + state_p2.rendering = nimCopy(state_p2.rendering, none__replybox_u230(), NTI2113929229); + var formData_2113929459 = new FormData(); + formData_2113929459.append("msg", state_p2.text); + var uri_2113929460 = makeUri__karaxutils_u123([47,112,114,101,118,105,101,119], [], [47], false, true); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2113929460), [], (formData_2113929459), HEX3Aanonymous__replybox_u253, true, kxi__); + + +} + +function isSome__replybox_u439(self_p0) { + var result_2113929658 = false; + + result_2113929658 = self_p0.has; + + return result_2113929658; + +} + +function verbatim__pkgZkaraxZvdom_u957(s_p0) { + var result_1409287103 = null; + + result_1409287103 = {kind: 6, text: s_p0, index: (-1), m_type: NTI1409286247, id: null, class: null, kids: [], attrs: [], events: [], style: null, dom: null}; + + return result_1409287103; + +} + +function isNone__replybox_u460(self_p0) { + var result_2113929679 = false; + + result_2113929679 = !(self_p0.has); + + return result_2113929679; + +} + +function get__replybox_u453(self_p0) { + var result_2113929672 = null; + var result_2113929672_Idx = 0; + + BeforeRet: { + if (isNone__replybox_u460(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2113929672 = self_p0; result_2113929672_Idx = "val"; + break BeforeRet; + }; + + return [result_2113929672, result_2113929672_Idx]; + +} + +function onChange__replybox_u398(e_p0, n_p1, state_p2) { + state_p2.text = value__pkgZkaraxZvdom_u416(n_p1); + + +} + +function isSome__replybox_u533(self_p0) { + var result_2113929752 = false; + + result_2113929752 = self_p0.has; + + return result_2113929752; + +} + +function isSome__replybox_u332(self_p0) { + var result_2113929551 = false; + + result_2113929551 = !((self_p0.val == null)); + + return result_2113929551; + +} + +function isNone__replybox_u356(self_p0) { + var result_2113929575 = false; + + result_2113929575 = (self_p0.val == null); + + return result_2113929575; + +} + +function get__replybox_u349(self_p0) { + var result_2113929568 = null; + + if (isNone__replybox_u356(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2113929568 = self_p0["val"]; + + return result_2113929568; + +} + +function getInt__pureZjson_u253(n_p0, default_p1) { + var Temporary1; + + var result_1644167424 = 0; + + BeforeRet: { + if (((n_p0 == null) || !((n_p0.kind == 2)))) { + result_1644167424 = default_p1; + break BeforeRet; + } + else { + var Temporary1 = n_p0; + if (ConstSet84[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'num\' is not accessible for type \'JsonNodeObj\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI1644167171)); } + result_1644167424 = chckRange(Number(Temporary1.num), (-2147483648), 2147483647); + break BeforeRet; + } + + }; + + return result_1644167424; + +} + +function onReplyPost__replybox_u276(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym1_2113929499 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym1_2113929499 == 200)) { + state_p2.text = ""; + state_p2.shown = false; + state_p2.onPost(getInt__pureZjson_u253(parseJson__pureZjson_u5269(cstrToNimstr(response_p1)), 0)); + } + else { +++excHandler; + try { + var parsedHEX60gensym1_2113929500 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym1_2113929506 = to__addcategorymodal_u215(parsedHEX60gensym1_2113929500); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym1_2113929506), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onReplyClick__replybox_u303(e_p0, n_p1, state_p2, thread_p3, replyingTo_p4) { + +function HEX3Aanonymous__replybox_u390(s_p0, r_p1) { + onReplyPost__replybox_u276(s_p0, r_p1, state_p2); + + + } + + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + var formData_2113929544 = new FormData(); + formData_2113929544.append("msg", state_p2.text); + formData_2113929544.append("threadId", toJSStr(HEX24__systemZdollars_u14(thread_p3.id))); + if (isSome__replybox_u332(replyingTo_p4)) { + formData_2113929544.append("replyingTo", toJSStr(HEX24__systemZdollars_u14(get__replybox_u349(replyingTo_p4).id))); + } + + var uri_2113929597 = makeUri__karaxutils_u123([47,99,114,101,97,116,101,80,111,115,116], [], [47], false, true); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2113929597), [], (formData_2113929544), HEX3Aanonymous__replybox_u390, true, kxi__); + + +} + +function isNone__replybox_u558(self_p0) { + var result_2113929777 = false; + + result_2113929777 = !(self_p0.has); + + return result_2113929777; + +} + +function get__replybox_u551(self_p0) { + var result_2113929770 = ({id: 0, topic: [], category: ({id: 0, name: [], description: [], color: [], numTopics: 0}), author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), users: [], replies: 0, views: 0, activity: 0n, creation: 0n, isLocked: false, isSolved: false, isPinned: false}); + + if (isNone__replybox_u558(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2113929770 = self_p0.val; + + return result_2113929770; + +} + +function onCancelClick__replybox_u394(e_p0, n_p1, state_p2) { + state_p2.shown = false; + + +} + +function renderContent__replybox_u402(state_p0, thread_p1, post_p2) { + +function HEX3Aanonymous__replybox_u428(e_p0, n_p1) { + onMessageClick__replybox_u257(e_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__replybox_u432(e_p0, n_p1) { + onPreviewClick__replybox_u198(e_p0, n_p1, state_p0); + + + } + var Temporary1; + +function HEX3Aanonymous__replybox_u482(e_p0, n_p1) { + onChange__replybox_u398(e_p0, n_p1, state_p0); + + + } + thread_p1 = nimCopy(null, thread_p1, NTI2113929572); + post_p2 = nimCopy(null, post_p2, NTI2113929478); + +function HEX3Aanonymous__replybox_u538(e_p0, n_p1) { + onReplyClick__replybox_u303(e_p0, n_p1, state_p0, get__replybox_u551(thread_p1), post_p2); + + + } + +function HEX3Aanonymous__replybox_u580(e_p0, n_p1) { + onCancelClick__replybox_u394(e_p0, n_p1, state_p0); + + + } + + var result_2113929628 = null; + + var tmp_2113929629 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929629.class = "panel"; + var tmp_2113929630 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929630.class = "panel-nav"; + var tmp_2113929631 = tree__pkgZkaraxZvdom_u880(37, []); + tmp_2113929631.class = "tab tab-block"; + var tmp_2113929632 = tree__pkgZkaraxZvdom_u880(38, []); + tmp_2113929632.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [97,99,116,105,118,101], Field1: !(state_p0.preview)}, NTI2113929601)], [116,97,98,45,105,116,101,109])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2113929632, 0, HEX3Aanonymous__replybox_u428, kxi__); + var tmp_2113929633 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_2113929633.class = "c-hand"; + add__pkgZkaraxZvdom_u794(tmp_2113929633, text__pkgZkaraxZvdom_u948([77,101,115,115,97,103,101])); + add__pkgZkaraxZvdom_u794(tmp_2113929632, tmp_2113929633); + add__pkgZkaraxZvdom_u794(tmp_2113929631, tmp_2113929632); + var tmp_2113929634 = tree__pkgZkaraxZvdom_u880(38, []); + tmp_2113929634.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [97,99,116,105,118,101], Field1: state_p0.preview}, NTI2113929616)], [116,97,98,45,105,116,101,109])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2113929634, 0, HEX3Aanonymous__replybox_u432, kxi__); + var tmp_2113929635 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_2113929635.class = "c-hand"; + add__pkgZkaraxZvdom_u794(tmp_2113929635, text__pkgZkaraxZvdom_u948([80,114,101,118,105,101,119])); + add__pkgZkaraxZvdom_u794(tmp_2113929634, tmp_2113929635); + add__pkgZkaraxZvdom_u794(tmp_2113929631, tmp_2113929634); + add__pkgZkaraxZvdom_u794(tmp_2113929630, tmp_2113929631); + add__pkgZkaraxZvdom_u794(tmp_2113929629, tmp_2113929630); + var tmp_2113929636 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929636.class = "panel-body"; + if (state_p0.preview) { + if (state_p0.loading) { + var tmp_2113929637 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929637.class = "loading"; + add__pkgZkaraxZvdom_u794(tmp_2113929636, tmp_2113929637); + } + else { + if (isSome__replybox_u439(state_p0.rendering)) { + add__pkgZkaraxZvdom_u794(tmp_2113929636, verbatim__pkgZkaraxZvdom_u957((Temporary1 = get__replybox_u453(state_p0.rendering), Temporary1)[0][Temporary1[1]])); + } + } + } + else { + var tmp_2113929638 = tree__pkgZkaraxZvdom_u880(200, []); + tmp_2113929638.id = "reply-textarea"; + tmp_2113929638.class = "form-input post-text-area"; + setAttr__pkgZkaraxZvdom_u713(tmp_2113929638, "rows", "5"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2113929638, 8, HEX3Aanonymous__replybox_u482, kxi__); + valueHEX3D__pkgZkaraxZvdom_u419(tmp_2113929638, state_p0.text); + setAttr__pkgZkaraxZvdom_u713(tmp_2113929638, "value", state_p0.text); + add__pkgZkaraxZvdom_u794(tmp_2113929636, tmp_2113929638); + var tmp_2113929639 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2113929639, "href", toJSStr(makeUri__karaxutils_u123([47,97,98,111,117,116,47,114,115,116], [], [47], false, true))); + setAttr__pkgZkaraxZvdom_u713(tmp_2113929639, "target", "blank_"); + add__pkgZkaraxZvdom_u794(tmp_2113929639, text__pkgZkaraxZvdom_u948([83,116,121,108,105,110,103,32,119,105,116,104,32,82,83,84,32,105,115,32,115,117,112,112,111,114,116,101,100])); + add__pkgZkaraxZvdom_u794(tmp_2113929636, tmp_2113929639); + } + + if (isSome__replybox_u489(state_p0.error)) { + var tmp_2113929640 = tree__pkgZkaraxZvdom_u880(71, []); + tmp_2113929640.class = "text-error"; + tmp_2113929640.style = style__pkgZkaraxZvstyles_u487(114, "0.4rem"); + add__pkgZkaraxZvdom_u794(tmp_2113929640, text__pkgZkaraxZvdom_u948(get__replybox_u503(state_p0.error).message)); + add__pkgZkaraxZvdom_u794(tmp_2113929636, tmp_2113929640); + } + + add__pkgZkaraxZvdom_u794(tmp_2113929629, tmp_2113929636); + if (isSome__replybox_u533(thread_p1)) { + var tmp_2113929641 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929641.class = "panel-footer"; + var tmp_2113929642 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2113929642.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [108,111,97,100,105,110,103], Field1: state_p0.loading}, NTI2113929729)], [98,116,110,32,98,116,110,45,112,114,105,109,97,114,121,32,102,108,111,97,116,45,114,105,103,104,116])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2113929642, 0, HEX3Aanonymous__replybox_u538, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2113929642, text__pkgZkaraxZvdom_u948([82,101,112,108,121])); + add__pkgZkaraxZvdom_u794(tmp_2113929641, tmp_2113929642); + var tmp_2113929643 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2113929643.class = "btn btn-link float-right"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2113929643, 0, HEX3Aanonymous__replybox_u580, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2113929643, text__pkgZkaraxZvdom_u948([67,97,110,99,101,108])); + add__pkgZkaraxZvdom_u794(tmp_2113929641, tmp_2113929643); + add__pkgZkaraxZvdom_u794(tmp_2113929629, tmp_2113929641); + } + + result_2113929628 = tmp_2113929629; + + return result_2113929628; + +} + +function none__editbox_u301() { + var result_2130706740 = ({val: ({id: 0, topic: [], category: ({id: 0, name: [], description: [], color: [], numTopics: 0}), author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), users: [], replies: 0, views: 0, activity: 0n, creation: 0n, isLocked: false, isSolved: false, isPinned: false}), has: false}); + + result_2130706740 = nimCopy(result_2130706740, {val: ({id: 0, topic: [], category: ({id: 0, name: [], description: [], color: [], numTopics: 0}), author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), users: [], replies: 0, views: 0, activity: 0n, creation: 0n, isLocked: false, isSolved: false, isPinned: false}), has: false}, NTI2130706716); + + return result_2130706740; + +} + +function none__editbox_u298() { + var result_2130706732 = ({val: ({id: 0, topic: [], category: ({id: 0, name: [], description: [], color: [], numTopics: 0}), author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), users: [], replies: 0, views: 0, activity: 0n, creation: 0n, isLocked: false, isSolved: false, isPinned: false}), has: false}); + + result_2130706732 = nimCopy(result_2130706732, none__editbox_u301(), NTI2113929572); + + return result_2130706732; + +} + +function getText__replybox_u119(state_p0) { + var result_2113929337 = null; + + result_2113929337 = state_p0.text; + + return result_2113929337; + +} + +function initFromJson__newthread_u111(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet85[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym1_2348810369 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet86), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym1_2348810369, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + var originalJsonPathLen_2348810371 = (jsonPath_p2[jsonPath_p2_Idx]).length; + Label1: { + var i_2348810376 = 0; + var colontmp__637535065 = 0; + colontmp__637535065 = len__pureZjson_u3028(jsonNode_p1); + var i_637535066 = 0; + Label2: { + Label3: while (true) { + if (!(i_637535066 < colontmp__637535065)) break Label3; + i_2348810376 = i_637535066; + addChar(jsonPath_p2[jsonPath_p2_Idx], 91);; + addInt__stdZprivateZdigitsutils_u241(jsonPath_p2, jsonPath_p2_Idx, i_2348810376); + addChar(jsonPath_p2[jsonPath_p2_Idx], 93);; + initFromJson__addcategorymodal_u150(dst_p0, chckIndx(chckRange(i_2348810376, 0, 1), 0, (dst_p0).length - 1), HEX5BHEX5D__pureZjson_u3153(jsonNode_p1, i_2348810376), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2348810371, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2348810371, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2348810371, 0, 2147483647); }; + i_637535066 = addInt(i_637535066, 1); + } + }; + }; + + +} + +function to__newthread_u83(node_p0) { + var result_2348810328 = [new Int32Array(2)]; + + var jsonPath_2348810329 = [[]]; + result_2348810328[0] = nimCopy(result_2348810328[0], new Int32Array(2), NTI2348810274); + initFromJson__newthread_u111(result_2348810328[0], node_p0, jsonPath_2348810329, 0); + + return result_2348810328[0]; + +} + +function formatValue__karaxutils_u245(result_p0, result_p0_Idx, value_p1) { + nimAddStrStr(result_p0[result_p0_Idx], HEX24__systemZdollars_u14(value_p1));; + + +} + +function renderPostUrl__karaxutils_u236(threadId_p0, postId_p1) { + var result_1862271215 = []; + + Label1: { + var fmtRes_1862271220 = [mnewString(0)]; + nimAddStrStr(fmtRes_1862271220[0], [47,116,47]);; + formatValue__karaxutils_u245(fmtRes_1862271220, 0, threadId_p0); + nimAddStrStr(fmtRes_1862271220[0], [35]);; + formatValue__karaxutils_u245(fmtRes_1862271220, 0, postId_p1); + }; + result_1862271215 = nimCopy(null, makeUri__karaxutils_u123(fmtRes_1862271220[0], [], [47], false, true), NTI33554449); + + return result_1862271215; + +} + +function onCreatePost__newthread_u74(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym0_2348810321 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym0_2348810321 == 200)) { + var j_2348810322 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var response_2348810447 = to__newthread_u83(j_2348810322); + navigateTo__karaxutils_u142(toJSStr(renderPostUrl__karaxutils_u236(response_2348810447[chckIndx(0, 0, (response_2348810447).length - 1)], response_2348810447[chckIndx(1, 0, (response_2348810447).length - 1)]))); + } + else { +++excHandler; + try { + var parsedHEX60gensym0_2348810448 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym0_2348810454 = to__addcategorymodal_u215(parsedHEX60gensym0_2348810448); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym0_2348810454), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onCreateClick__newthread_u225(ev_p0, n_p1, state_p2) { + +function HEX3Aanonymous__newthread_u255(s_p0, r_p1) { + onCreatePost__newthread_u74(s_p0, r_p1, state_p2); + + + } + + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + var uri_2348810484 = makeUri__karaxutils_u123([110,101,119,116,104,114,101,97,100], [], [47], false, true); + var formData_2348810485 = new FormData(); + var categoryID_2348810486 = state_p2.categoryPicker.selectedCategoryID; + formData_2348810485.append("subject", state_p2.subject); + formData_2348810485.append("msg", getText__replybox_u119(state_p2.replyBox)); + formData_2348810485.append("categoryId", toJSStr(HEX24__systemZdollars_u14(categoryID_2348810486))); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2348810484), [], (formData_2348810485), HEX3Aanonymous__newthread_u255, true, kxi__); + + +} + +function render__newthread_u259(state_p0, currentUser_p1) { + +function HEX3Aanonymous__newthread_u275(e_p0, n_p1) { + onSubjectChange__newthread_u70(e_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__newthread_u326(ev_p0, n_p1) { + onCreateClick__newthread_u225(ev_p0, n_p1, state_p0); + + + } + + var result_2348810503 = null; + + var tmp_2348810504 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_2348810504.class = "container grid-xl"; + var tmp_2348810505 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2348810505.id = "new-thread"; + var tmp_2348810506 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2348810506.class = "title"; + var tmp_2348810507 = tree__pkgZkaraxZvdom_u880(32, []); + add__pkgZkaraxZvdom_u794(tmp_2348810507, text__pkgZkaraxZvdom_u948([78,101,119,32,84,104,114,101,97,100])); + add__pkgZkaraxZvdom_u794(tmp_2348810506, tmp_2348810507); + add__pkgZkaraxZvdom_u794(tmp_2348810505, tmp_2348810506); + var tmp_2348810508 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2348810508.class = "content"; + var tmp_2348810509 = tree__pkgZkaraxZvdom_u880(194, []); + tmp_2348810509.id = "thread-title"; + tmp_2348810509.class = "form-input"; + setAttr__pkgZkaraxZvdom_u713(tmp_2348810509, "type", "text"); + setAttr__pkgZkaraxZvdom_u713(tmp_2348810509, "name", "subject"); + setAttr__pkgZkaraxZvdom_u713(tmp_2348810509, "placeholder", "Type the title here"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2348810509, 25, HEX3Aanonymous__newthread_u275, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2348810508, tmp_2348810509); + if (isSome__replybox_u489(state_p0.error)) { + var tmp_2348810510 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2348810510.class = "text-error"; + add__pkgZkaraxZvdom_u794(tmp_2348810510, text__pkgZkaraxZvdom_u948(get__replybox_u503(state_p0.error).message)); + add__pkgZkaraxZvdom_u794(tmp_2348810508, tmp_2348810510); + } + + var tmp_2348810511 = tree__pkgZkaraxZvdom_u880(44, []); + var tmp_2348810512 = tree__pkgZkaraxZvdom_u880(193, []); + tmp_2348810512.class = "d-inline-block form-label"; + add__pkgZkaraxZvdom_u794(tmp_2348810512, text__pkgZkaraxZvdom_u948([67,97,116,101,103,111,114,121])); + add__pkgZkaraxZvdom_u794(tmp_2348810511, tmp_2348810512); + add__pkgZkaraxZvdom_u794(tmp_2348810511, render__categorypicker_u750(state_p0.categoryPicker, currentUser_p1, false)); + add__pkgZkaraxZvdom_u794(tmp_2348810508, tmp_2348810511); + add__pkgZkaraxZvdom_u794(tmp_2348810508, renderContent__replybox_u402(state_p0.replyBox, none__editbox_u298(), none__editbox_u323())); + add__pkgZkaraxZvdom_u794(tmp_2348810505, tmp_2348810508); + var tmp_2348810513 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2348810513.class = "footer"; + var tmp_2348810514 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2348810514.id = "create-thread-btn"; + tmp_2348810514.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [108,111,97,100,105,110,103], Field1: state_p0.loading}, NTI2348810529)], [98,116,110,32,98,116,110,45,112,114,105,109,97,114,121])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2348810514, 0, HEX3Aanonymous__newthread_u326, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2348810514, text__pkgZkaraxZvdom_u948([67,114,101,97,116,101,32,116,104,114,101,97,100])); + add__pkgZkaraxZvdom_u794(tmp_2348810513, tmp_2348810514); + add__pkgZkaraxZvdom_u794(tmp_2348810505, tmp_2348810513); + add__pkgZkaraxZvdom_u794(tmp_2348810504, tmp_2348810505); + result_2348810503 = tmp_2348810504; + + return result_2348810503; + +} + +function isSome__profile_u372(self_p0) { + var result_2315256183 = false; + + result_2315256183 = self_p0.has; + + return result_2315256183; + +} + +function isNone__profile_u393(self_p0) { + var result_2315256204 = false; + + result_2315256204 = !(self_p0.has); + + return result_2315256204; + +} + +function get__profile_u386(self_p0) { + var result_2315256197 = null; + + BeforeRet: { + if (isNone__profile_u393(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2315256197 = self_p0.val; + break BeforeRet; + }; + + return result_2315256197; + +} + +function none__profile_u431() { + var result_2315256246 = ({val: ({user: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), joinTime: 0n, threads: [], posts: [], postCount: 0, threadCount: 0, email: ({val: [], has: false})}), has: false}); + + result_2315256246 = nimCopy(result_2315256246, {val: ({user: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), joinTime: 0n, threads: [], posts: [], postCount: 0, threadCount: 0, email: ({val: [], has: false})}), has: false}, NTI2315256102); + + return result_2315256246; + +} + +function none__profile_u428() { + var result_2315256238 = ({val: ({user: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), joinTime: 0n, threads: [], posts: [], postCount: 0, threadCount: 0, email: ({val: [], has: false})}), has: false}); + + result_2315256238 = nimCopy(result_2315256238, none__profile_u431(), NTI2315255820); + + return result_2315256238; + +} + +function initFromJson__profile_u167(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet87[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym9_2315255992 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet88), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym9_2315255992, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if (dst_p0[dst_p0_Idx].length < (Temporary1 = chckRange(len__pureZjson_u3028(jsonNode_p1), 0, 2147483647), Temporary1)) { for (var i = dst_p0[dst_p0_Idx].length ; i < Temporary1 ; ++i) dst_p0[dst_p0_Idx].push(({creation: 0n, topic: [], threadId: 0, postId: 0, author: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false})})); } + else { dst_p0[dst_p0_Idx].length = Temporary1; }; + var orignalJsonPathLen_2315255998 = (jsonPath_p2[jsonPath_p2_Idx]).length; + Label2: { + var i_2315256003 = 0; + var colontmp__637535079 = 0; + colontmp__637535079 = len__pureZjson_u3028(jsonNode_p1); + var i_637535080 = 0; + Label3: { + Label4: while (true) { + if (!(i_637535080 < colontmp__637535079)) break Label4; + i_2315256003 = i_637535080; + addChar(jsonPath_p2[jsonPath_p2_Idx], 91);; + addInt__stdZprivateZdigitsutils_u241(jsonPath_p2, jsonPath_p2_Idx, i_2315256003); + addChar(jsonPath_p2[jsonPath_p2_Idx], 93);; + initFromJson__postlist_u867(dst_p0[dst_p0_Idx][chckIndx(i_2315256003, 0, (dst_p0[dst_p0_Idx]).length - 1)], HEX5BHEX5D__pureZjson_u3153(jsonNode_p1, i_2315256003), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(orignalJsonPathLen_2315255998, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(orignalJsonPathLen_2315255998, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(orignalJsonPathLen_2315255998, 0, 2147483647); }; + i_637535080 = addInt(i_637535080, 1); + } + }; + }; + + +} + +function initFromJson__profile_u129(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_2315255943 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,117,115,101,114]);; + initFromJson__threadlist_u504(dst_p0.user, getOrDefault__pureZjson_u3507(jsonNode_p1, [117,115,101,114]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2315255943, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2315255943, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2315255943, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,106,111,105,110,84,105,109,101]);; + initFromJson__threadlist_u522(dst_p0, "joinTime", getOrDefault__pureZjson_u3507(jsonNode_p1, [106,111,105,110,84,105,109,101]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2315255943, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2315255943, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2315255943, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,116,104,114,101,97,100,115]);; + initFromJson__profile_u167(dst_p0, "threads", getOrDefault__pureZjson_u3507(jsonNode_p1, [116,104,114,101,97,100,115]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2315255943, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2315255943, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2315255943, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,112,111,115,116,115]);; + initFromJson__profile_u167(dst_p0, "posts", getOrDefault__pureZjson_u3507(jsonNode_p1, [112,111,115,116,115]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2315255943, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2315255943, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2315255943, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,112,111,115,116,67,111,117,110,116]);; + initFromJson__addcategorymodal_u150(dst_p0, "postCount", getOrDefault__pureZjson_u3507(jsonNode_p1, [112,111,115,116,67,111,117,110,116]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2315255943, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2315255943, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2315255943, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,116,104,114,101,97,100,67,111,117,110,116]);; + initFromJson__addcategorymodal_u150(dst_p0, "threadCount", getOrDefault__pureZjson_u3507(jsonNode_p1, [116,104,114,101,97,100,67,111,117,110,116]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2315255943, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2315255943, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2315255943, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,101,109,97,105,108]);; + initFromJson__header_u239(dst_p0.email, getOrDefault__pureZjson_u3507(jsonNode_p1, [101,109,97,105,108]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2315255943, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2315255943, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2315255943, 0, 2147483647); }; + + +} + +function to__profile_u117(node_p0) { + var result_2315255930 = [({user: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), joinTime: 0n, threads: [], posts: [], postCount: 0, threadCount: 0, email: ({val: [], has: false})})]; + + var jsonPath_2315255931 = [[]]; + result_2315255930[0] = nimCopy(result_2315255930[0], ({user: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), joinTime: 0n, threads: [], posts: [], postCount: 0, threadCount: 0, email: ({val: [], has: false})}), NTI2097152097); + initFromJson__profile_u129(result_2315255930[0], node_p0, jsonPath_2315255931, 0); + + return result_2315255930[0]; + +} + +function some__profile_u282(val_p0) { + var result_2315256093 = ({val: ({user: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), joinTime: 0n, threads: [], posts: [], postCount: 0, threadCount: 0, email: ({val: [], has: false})}), has: false}); + + result_2315256093 = nimCopy(result_2315256093, {has: true, val: nimCopy(null, val_p0, NTI2097152097)}, NTI2315255820); + + return result_2315256093; + +} + +function some__profile_u318(val_p0) { + var result_2315256129 = ({val: null}); + + if (!(!((val_p0 == null)))) { + failedAssertImpl__stdZassertions_u86([111,112,116,105,111,110,115,46,110,105,109,40,49,51,57,44,32,53,41,32,96,110,111,116,32,118,97,108,46,105,115,78,105,108,96,32]); + } + + result_2315256129 = nimCopy(result_2315256129, {val: val_p0}, NTI2315255834); + + return result_2315256129; + +} + +function onUserDelete__profilesettings_u33(user_p0) { + window.location.href = toJSStr(makeUri__karaxutils_u123([47], [], [47], false, true)); + + +} + +function newPostButton__postbutton_u31(uri_p0, formData_p1, title_p2, icon_p3) { + var result_2147483684 = null; + + result_2147483684 = {uri: nimCopy(null, uri_p0, NTI33554449), formData: formData_p1, title: nimCopy(null, title_p2, NTI33554449), icon: nimCopy(null, icon_p3, NTI33554449), error: ({val: ({errorFields: [], message: []}), has: false}), loading: false, posted: false}; + + return result_2147483684; + +} + +function newResetPasswordButton__postbutton_u77(username_p0) { + var result_2147483727 = null; + + var formData_2147483728 = new FormData(); + formData_2147483728.append("email", toJSStr(username_p0)); + result_2147483727 = newPostButton__postbutton_u31(makeUri__karaxutils_u123([47,115,101,110,100,82,101,115,101,116,80,97,115,115,119,111,114,100], [], [47], false, true), formData_2147483728, [83,101,110,100,32,112,97,115,115,119,111,114,100,32,114,101,115,101,116,32,101,109,97,105,108], [102,97,115,32,102,97,45,101,110,118,101,108,111,112,101]); + + return result_2147483727; + +} + +function resetSettings__profilesettings_u35(state_p0) { + var profile_2332033061 = nimCopy(null, state_p0.profile, NTI2097152097); + if (isSome__resetpassword_u313(profile_2332033061.email)) { + state_p0.email = toJSStr(get__resetpassword_u327(profile_2332033061.email)); + } + else { + state_p0.email = ""; + } + + state_p0.rank = profile_2332033061.user.rank; + state_p0.error = nimCopy(state_p0.error, none__addcategorymodal_u322(), NTI1946157155); + + +} + +function newProfileSettings__profilesettings_u106(profile_p0) { + var result_2332033132 = null; + + result_2332033132 = {status: 200, deleteModal: newDeleteModal__delete_u114(null, null, onUserDelete__profilesettings_u33), resetPassword: newResetPasswordButton__postbutton_u77(profile_p0.user.name), profile: nimCopy(null, profile_p0, NTI2097152097), loading: false, error: ({val: ({errorFields: [], message: []}), has: false}), email: null, rank: 0}; + resetSettings__profilesettings_u35(result_2332033132); + + return result_2332033132; + +} + +function onProfile__profile_u112(httpStatus_p0, response_p1, state_p2) { + BeforeRet: { + state_p2.loading = false; + state_p2.status = chckRange(httpStatus_p0, 0, 599); + if (!((state_p2.status == 200))) { + break BeforeRet; + } + + var parsed_2315255924 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var profile_2315256089 = to__profile_u117(parsed_2315255924); + state_p2.profile = nimCopy(state_p2.profile, some__profile_u282(profile_2315256089), NTI2315255820); + state_p2.settings = nimCopy(state_p2.settings, some__profile_u318(newProfileSettings__profilesettings_u106(profile_2315256089)), NTI2315255834); + document.title = (toJSStr((profile_2315256089.user.name).concat([32,45,32])) + document.title); + }; + + +} + +function HEX24__system_u3223(x_p0) { + var result_33557658 = [[]]; + + result_33557658[0] = nimCopy(null, [], NTI33554449); + addFloat__system_u3227(result_33557658, 0, x_p0); + + return result_33557658[0]; + +} + +function renderPostUrl__post_u157(link_p0) { + var result_2097152159 = []; + + result_2097152159 = nimCopy(null, renderPostUrl__karaxutils_u236(link_p0.threadId, link_p0.postId), NTI33554449); + + return result_2097152159; + +} + +function format__postlist_u1806(dt_p0) { + var result_2063599378 = []; + + result_2063599378 = nimCopy(null, format__pureZtimes_u3956(dt_p0, f2_2063599379, DefaultLocale_1627392012), NTI33554449); + + return result_2063599378; + +} + +function genPostLink__profile_u348(link_p0) { + var result_2315256158 = null; + + var url_2315256159 = renderPostUrl__post_u157(link_p0); + var tmp_2315256160 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256160.class = "profile-post"; + var tmp_2315256161 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256161.class = "profile-post-main"; + var tmp_2315256162 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256162.class = "profile-post-title"; + var tmp_2315256163 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2315256163, "href", toJSStr(url_2315256159)); + add__pkgZkaraxZvdom_u794(tmp_2315256163, text__pkgZkaraxZvdom_u948(link_p0.topic)); + add__pkgZkaraxZvdom_u794(tmp_2315256162, tmp_2315256163); + var tmp_2315256164 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256164.class = "profile-post-time"; + var title_2315256170 = format__postlist_u1806(local__pureZtimes_u1853(fromUnix__pureZtimes_u1193(link_p0.creation))); + var tmp_2315256165 = tree__pkgZkaraxZvdom_u880(32, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2315256165, "title", toJSStr(title_2315256170)); + add__pkgZkaraxZvdom_u794(tmp_2315256165, text__pkgZkaraxZvdom_u948(renderActivity__threadlist_u205(link_p0.creation))); + add__pkgZkaraxZvdom_u794(tmp_2315256164, tmp_2315256165); + add__pkgZkaraxZvdom_u794(tmp_2315256162, tmp_2315256164); + add__pkgZkaraxZvdom_u794(tmp_2315256161, tmp_2315256162); + add__pkgZkaraxZvdom_u794(tmp_2315256160, tmp_2315256161); + result_2315256158 = tmp_2315256160; + + return result_2315256158; + +} + +function isSome__profile_u590(self_p0) { + var result_2315256401 = false; + + result_2315256401 = !((self_p0.val == null)); + + return result_2315256401; + +} + +function onRankChange__profilesettings_u227(event_p0, node_p1, state_p2) { + state_p2.rank = parseEnum__threadlist_u594(cstrToNimstr(value__pkgZkaraxZvdom_u416(node_p1))); + + +} + +function onEmailChange__profilesettings_u207(event_p0, node_p1, state_p2) { + var Temporary1; + + state_p2.email = value__pkgZkaraxZvdom_u416(node_p1); + if (!((state_p2.profile.user.rank == 8))) { + if (!((state_p2.email == toJSStr((Temporary1 = get__header_u268(state_p2.profile.email), Temporary1)[0][Temporary1[1]])))) { + state_p2.rank = 5; + } + else { + state_p2.rank = state_p2.profile.user.rank; + } + + } + + + +} + +function onPost__postbutton_u81(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym0_2147483736 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym0_2147483736 == 200)) { + } + else { +++excHandler; + try { + var parsedHEX60gensym0_2147483737 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym0_2147483743 = to__addcategorymodal_u215(parsedHEX60gensym0_2147483737); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym0_2147483743), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onClick__postbutton_u106(ev_p0, n_p1, state_p2) { + +function HEX3Aanonymous__postbutton_u129(s_p0, r_p1) { + onPost__postbutton_u81(s_p0, r_p1, state_p2); + + + } + + BeforeRet: { + if ((state_p2.loading || state_p2.posted)) { + break BeforeRet; + } + + state_p2.loading = true; + state_p2.posted = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(state_p2.uri), [], state_p2.formData, HEX3Aanonymous__postbutton_u129, true, kxi__); + ev_p0.preventDefault(); + }; + + +} + +function render__postbutton_u133(state_p0, disabled_p1) { + +function HEX3Aanonymous__postbutton_u143(e_p0, n_p1) { + onClick__postbutton_u106(e_p0, n_p1, state_p0); + + + } + + var result_2147483784 = null; + + var tmp_2147483785 = tree__pkgZkaraxZvdom_u880(44, []); + var tmp_2147483786 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2147483786.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [108,111,97,100,105,110,103], Field1: state_p0.loading}, NTI2147483748), nimCopy(null, {Field0: [100,105,115,97,98,108,101,100], Field1: disabled_p1}, NTI2147483748)], [98,116,110,32,98,116,110,45,115,101,99,111,110,100,97,114,121])); + setAttr__pkgZkaraxZvdom_u713(tmp_2147483786, "type", "button"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2147483786, 0, HEX3Aanonymous__postbutton_u143, kxi__); + if (state_p0.posted) { + if (isNone__error_u62(state_p0.error)) { + var tmp_2147483787 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2147483787.class = "fas fa-check"; + add__pkgZkaraxZvdom_u794(tmp_2147483786, tmp_2147483787); + } + else { + var tmp_2147483788 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2147483788.class = "fas fa-times"; + add__pkgZkaraxZvdom_u794(tmp_2147483786, tmp_2147483788); + } + + } + else { + var tmp_2147483789 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2147483789.class = toJSStr(state_p0.icon); + add__pkgZkaraxZvdom_u794(tmp_2147483786, tmp_2147483789); + } + + add__pkgZkaraxZvdom_u794(tmp_2147483786, text__pkgZkaraxZvdom_u948(([32]).concat(state_p0.title))); + add__pkgZkaraxZvdom_u794(tmp_2147483785, tmp_2147483786); + if (isSome__replybox_u489(state_p0.error)) { + var tmp_2147483790 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2147483790.class = "text-error"; + add__pkgZkaraxZvdom_u794(tmp_2147483790, text__pkgZkaraxZvdom_u948(get__replybox_u503(state_p0.error).message)); + add__pkgZkaraxZvdom_u794(tmp_2147483785, tmp_2147483790); + } + + result_2147483784 = tmp_2147483785; + + return result_2147483784; + +} + +function show__profilesettings_u455(state_p0, thing_p1) { + var Temporary1; + + state_p0.shown = true; + state_p0.error = nimCopy(state_p0.error, none__addcategorymodal_u322(), NTI1946157155); + state_p0.kind = 0; + var Temporary1 = state_p0; + if (ConstSet89[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'user\' is not accessible for type \'DeleteModal\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI2164260867)); } + Temporary1.user = nimCopy(Temporary1.user, thing_p1, NTI1929379844); + + +} + +function needsSave__profilesettings_u281(state_p0) { + var Temporary1; + + var result_2332033307 = false; + + if (isSome__resetpassword_u313(state_p0.profile.email)) { + result_2332033307 = !((state_p0.email == toJSStr((Temporary1 = get__header_u268(state_p0.profile.email), Temporary1)[0][Temporary1[1]]))); + } + + result_2332033307 = (result_2332033307 || !((state_p0.rank == state_p0.profile.user.rank))); + + return result_2332033307; + +} + +function onProfilePost__profilesettings_u179(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym0_2332033210 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym0_2332033210 == 200)) { + state_p2.profile.email = nimCopy(state_p2.profile.email, some__header_u253(cstrToNimstr(state_p2.email)), NTI2097152105); + state_p2.profile.user.rank = state_p2.rank; + } + else { +++excHandler; + try { + var parsedHEX60gensym0_2332033214 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym0_2332033220 = to__addcategorymodal_u215(parsedHEX60gensym0_2332033214); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym0_2332033220), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function save__profilesettings_u247(state_p0) { + +function HEX3Aanonymous__profilesettings_u277(s_p0, r_p1) { + onProfilePost__profilesettings_u179(s_p0, r_p1, state_p0); + + + } + + BeforeRet: { + if (state_p0.loading) { + break BeforeRet; + } + + state_p0.loading = true; + state_p0.error = nimCopy(state_p0.error, none__addcategorymodal_u322(), NTI1946157155); + var formData_2332033288 = new FormData(); + formData_2332033288.append("email", state_p0.email); + formData_2332033288.append("rank", toJSStr(reprEnum(state_p0.rank, NTI1929379843))); + formData_2332033288.append("username", toJSStr(state_p0.profile.user.name)); + var uri_2332033292 = makeUri__karaxutils_u123([47,115,97,118,101,80,114,111,102,105,108,101], [], [47], false, true); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2332033292), [], (formData_2332033288), HEX3Aanonymous__profilesettings_u277, true, kxi__); + }; + + +} + +function onClose__delete_u110(ev_p0, n_p1, state_p2) { + state_p2.shown = false; + ev_p0.preventDefault(); + + +} + +function onDeletePost__delete_u46(httpStatus_p0, response_p1, state_p2) { + var Temporary1; + var Temporary2; + var Temporary3; + + state_p2.loading = false; + var statusHEX60gensym0_2164260917 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym0_2164260917 == 200)) { + state_p2.shown = false; + switch (state_p2.kind) { + case 0: + var Temporary1 = state_p2; + if (ConstSet93[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'user\' is not accessible for type \'DeleteModal\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI2164260867)); } + state_p2.onDeleteUser(Temporary1.user); + break; + case 1: + var Temporary2 = state_p2; + if (ConstSet94[Temporary2.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'post\' is not accessible for type \'DeleteModal\' using \'kind = "), reprDiscriminant(Temporary2.kind, NTI2164260867)); } + state_p2.onDeletePost(Temporary2.post); + break; + case 2: + var Temporary3 = state_p2; + if (ConstSet95[Temporary3.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'thread\' is not accessible for type \'DeleteModal\' using \'kind = "), reprDiscriminant(Temporary3.kind, NTI2164260867)); } + state_p2.onDeleteThread(Temporary3.thread); + break; + } + } + else { +++excHandler; + try { + var parsedHEX60gensym0_2164260918 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym0_2164260924 = to__addcategorymodal_u215(parsedHEX60gensym0_2164260918); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym0_2164260924), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onDelete__delete_u77(ev_p0, n_p1, state_p2) { + var Temporary1; + var Temporary2; + var Temporary3; + var Temporary4; + +function HEX3Aanonymous__delete_u106(s_p0, r_p1) { + onDeletePost__delete_u46(s_p0, r_p1, state_p2); + + + } + + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + switch (state_p2.kind) { + case 0: + Temporary1 = makeUri__karaxutils_u123([47,100,101,108,101,116,101,85,115,101,114], [], [47], false, true); + break; + case 2: + Temporary1 = makeUri__karaxutils_u123([47,100,101,108,101,116,101,84,104,114,101,97,100], [], [47], false, true); + break; + case 1: + Temporary1 = makeUri__karaxutils_u123([47,100,101,108,101,116,101,80,111,115,116], [], [47], false, true); + break; + } + var uri_2164260960 = nimCopy(null, Temporary1, NTI33554449); + var formData_2164260961 = new FormData(); + switch (state_p2.kind) { + case 0: + var Temporary2 = state_p2; + if (ConstSet90[Temporary2.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'user\' is not accessible for type \'DeleteModal\' using \'kind = "), reprDiscriminant(Temporary2.kind, NTI2164260867)); } + formData_2164260961.append("username", toJSStr(Temporary2.user.name)); + break; + case 1: + var Temporary3 = state_p2; + if (ConstSet91[Temporary3.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'post\' is not accessible for type \'DeleteModal\' using \'kind = "), reprDiscriminant(Temporary3.kind, NTI2164260867)); } + formData_2164260961.append("id", toJSStr(HEX24__systemZdollars_u14(Temporary3.post.id))); + break; + case 2: + var Temporary4 = state_p2; + if (ConstSet92[Temporary4.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'thread\' is not accessible for type \'DeleteModal\' using \'kind = "), reprDiscriminant(Temporary4.kind, NTI2164260867)); } + formData_2164260961.append("id", toJSStr(HEX24__systemZdollars_u14(Temporary4.thread.id))); + break; + } + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2164260960), [], (formData_2164260961), HEX3Aanonymous__delete_u106, true, kxi__); + + +} + +function render__delete_u278(state_p0) { + +function HEX3Aanonymous__delete_u295(ev_p0, n_p1) { + onClose__delete_u110(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__delete_u299(ev_p0, n_p1) { + onClose__delete_u110(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__delete_u321(ev_p0, n_p1) { + onDelete__delete_u77(ev_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__delete_u325(ev_p0, n_p1) { + state_p0.shown = false; + + + } + + var result_2164261144 = null; + + var tmp_2164261145 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2164261145.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [97,99,116,105,118,101], Field1: state_p0.shown}, NTI2164261025)], [109,111,100,97,108,32,109,111,100,97,108,45,115,109])); + tmp_2164261145.id = "delete-modal"; + var tmp_2164261146 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2164261146, "href", ""); + tmp_2164261146.class = "modal-overlay"; + setAttr__pkgZkaraxZvdom_u713(tmp_2164261146, "aria-label", "close"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2164261146, 0, HEX3Aanonymous__delete_u295, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2164261145, tmp_2164261146); + var tmp_2164261147 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2164261147.class = "modal-container"; + var tmp_2164261148 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2164261148.class = "modal-header"; + var tmp_2164261149 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2164261149, "href", ""); + tmp_2164261149.class = "btn btn-clear float-right"; + setAttr__pkgZkaraxZvdom_u713(tmp_2164261149, "aria-label", "close"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2164261149, 0, HEX3Aanonymous__delete_u299, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2164261148, tmp_2164261149); + var tmp_2164261150 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2164261150.class = "modal-title h5"; + add__pkgZkaraxZvdom_u794(tmp_2164261150, text__pkgZkaraxZvdom_u948([68,101,108,101,116,101])); + add__pkgZkaraxZvdom_u794(tmp_2164261148, tmp_2164261150); + add__pkgZkaraxZvdom_u794(tmp_2164261147, tmp_2164261148); + var tmp_2164261151 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2164261151.class = "modal-body"; + var tmp_2164261152 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2164261152.class = "content"; + var tmp_2164261153 = tree__pkgZkaraxZvdom_u880(32, []); + add__pkgZkaraxZvdom_u794(tmp_2164261153, text__pkgZkaraxZvdom_u948([65,114,101,32,121,111,117,32,115,117,114,101,32,121,111,117,32,119,97,110,116,32,116,111,32,100,101,108,101,116,101,32,116,104,105,115,32])); + switch (state_p0.kind) { + case 0: + add__pkgZkaraxZvdom_u794(tmp_2164261153, text__pkgZkaraxZvdom_u948([117,115,101,114,32,97,99,99,111,117,110,116,63])); + break; + case 2: + add__pkgZkaraxZvdom_u794(tmp_2164261153, text__pkgZkaraxZvdom_u948([116,104,114,101,97,100,63])); + break; + case 1: + add__pkgZkaraxZvdom_u794(tmp_2164261153, text__pkgZkaraxZvdom_u948([112,111,115,116,63])); + break; + } + add__pkgZkaraxZvdom_u794(tmp_2164261152, tmp_2164261153); + add__pkgZkaraxZvdom_u794(tmp_2164261151, tmp_2164261152); + add__pkgZkaraxZvdom_u794(tmp_2164261147, tmp_2164261151); + var tmp_2164261154 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2164261154.class = "modal-footer"; + if (isSome__replybox_u489(state_p0.error)) { + var tmp_2164261155 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2164261155.class = "text-error"; + add__pkgZkaraxZvdom_u794(tmp_2164261155, text__pkgZkaraxZvdom_u948(get__replybox_u503(state_p0.error).message)); + add__pkgZkaraxZvdom_u794(tmp_2164261154, tmp_2164261155); + } + + var tmp_2164261156 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2164261156.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [108,111,97,100,105,110,103], Field1: state_p0.loading}, NTI2164261095)], [98,116,110,32,98,116,110,45,112,114,105,109,97,114,121,32,100,101,108,101,116,101,45,98,116,110])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2164261156, 0, HEX3Aanonymous__delete_u321, kxi__); + var tmp_2164261157 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2164261157.class = "fas fa-trash-alt"; + add__pkgZkaraxZvdom_u794(tmp_2164261156, tmp_2164261157); + add__pkgZkaraxZvdom_u794(tmp_2164261156, text__pkgZkaraxZvdom_u948([32,68,101,108,101,116,101])); + add__pkgZkaraxZvdom_u794(tmp_2164261154, tmp_2164261156); + var tmp_2164261158 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2164261158.class = "btn cancel-btn"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2164261158, 0, HEX3Aanonymous__delete_u325, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2164261158, text__pkgZkaraxZvdom_u948([67,97,110,99,101,108])); + add__pkgZkaraxZvdom_u794(tmp_2164261154, tmp_2164261158); + add__pkgZkaraxZvdom_u794(tmp_2164261147, tmp_2164261154); + add__pkgZkaraxZvdom_u794(tmp_2164261145, tmp_2164261147); + result_2164261144 = tmp_2164261145; + + return result_2164261144; + +} + +function getVNodeById__pkgZkaraxZkarax_u321(id_p0, kxi_p1) { + var result_1375732036 = null; + + if (kxi_p1.byId.hasOwnProperty(id_p0)) { + result_1375732036 = kxi_p1.byId[id_p0]; + } + + + return result_1375732036; + +} + +function setInputText__pkgZkaraxZkarax_u1969(n_p0, s_p1) { + n_p0.text = s_p1; + if (!((n_p0.dom == null))) { + n_p0.dom.value = s_p1; + } + + + +} + +function render__profilesettings_u306(state_p0, currentUser_p1) { + +function HEX3Aanonymous__profilesettings_u354(e_p0, n_p1) { + onRankChange__profilesettings_u227(e_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__profilesettings_u447(e_p0, n_p1) { + onEmailChange__profilesettings_u207(e_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__profilesettings_u451(e_p0, n_p1) { + show__profilesettings_u455(state_p0.deleteModal, state_p0.profile.user); + + + } + +function HEX3Aanonymous__profilesettings_u495(e_p0, n_p1) { + resetSettings__profilesettings_u35(state_p0); + + + } + +function HEX3Aanonymous__profilesettings_u499(e_p0, n_p1) { + save__profilesettings_u247(state_p0); + + + } + + var result_2332033334 = null; + + var canEditRank_2332033357 = (isSome__user_u39(currentUser_p1) && (state_p0.profile.user.rank < get__user_u53(currentUser_p1).rank)); + var canResetPassword_2332033362 = (5 < state_p0.profile.user.rank); + var tmp_2332033363 = tree__pkgZkaraxZvdom_u880(44, []); + if (canEditRank_2332033357) { + var tmp_2332033364 = tree__pkgZkaraxZvdom_u880(196, []); + tmp_2332033364.id = "rank-field"; + tmp_2332033364.class = "form-select"; + valueHEX3D__pkgZkaraxZvdom_u419(tmp_2332033364, toJSStr(reprEnum(state_p0.rank, NTI1929379843))); + setAttr__pkgZkaraxZvdom_u713(tmp_2332033364, "value", toJSStr(reprEnum(state_p0.rank, NTI1929379843))); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2332033364, 8, HEX3Aanonymous__profilesettings_u354, kxi__); + Label1: { + var r_2332033406 = 0; + Label2: { + var v_637535088 = 0; + var res_637535089 = 0; + Label3: { + Label4: while (true) { + if (!(res_637535089 <= 8)) break Label4; + v_637535088 = res_637535089; + r_2332033406 = v_637535088; + var tmp_2332033365 = tree__pkgZkaraxZvdom_u880(199, []); + add__pkgZkaraxZvdom_u794(tmp_2332033365, text__pkgZkaraxZvdom_u948(reprEnum(r_2332033406, NTI1929379843))); + tmp_2332033365.id = toJSStr(([114,97,110,107,45]).concat(nsuToLowerAsciiStr(reprEnum(r_2332033406, NTI1929379843)))); + add__pkgZkaraxZvdom_u794(tmp_2332033364, tmp_2332033365); + res_637535089 = addInt(res_637535089, 1); + } + }; + }; + }; + add__pkgZkaraxZvdom_u794(tmp_2332033363, tmp_2332033364); + var tmp_2332033366 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2332033366.class = "form-input-hint text-warning"; + add__pkgZkaraxZvdom_u794(tmp_2332033366, text__pkgZkaraxZvdom_u948(makeNimstrLit("You can modify anyone\'s rank. Remember: with great power comes great responsibility."))); + add__pkgZkaraxZvdom_u794(tmp_2332033363, tmp_2332033366); + } + else { + var tmp_2332033367 = tree__pkgZkaraxZvdom_u880(194, []); + tmp_2332033367.id = "rank-field"; + tmp_2332033367.class = "form-input"; + setAttr__pkgZkaraxZvdom_u713(tmp_2332033367, "type", "text"); + setAttr__pkgZkaraxZvdom_u713(tmp_2332033367, "disabled", ""); + valueHEX3D__pkgZkaraxZvdom_u419(tmp_2332033367, toJSStr(reprEnum(state_p0.rank, NTI1929379843))); + setAttr__pkgZkaraxZvdom_u713(tmp_2332033367, "value", toJSStr(reprEnum(state_p0.rank, NTI1929379843))); + add__pkgZkaraxZvdom_u794(tmp_2332033363, tmp_2332033367); + var tmp_2332033368 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2332033368.class = "form-input-hint"; + add__pkgZkaraxZvdom_u794(tmp_2332033368, text__pkgZkaraxZvdom_u948([89,111,117,114,32,114,97,110,107,32,100,101,116,101,114,109,105,110,101,115,32,116,104,101,32,97,99,116,105,111,110,115,32,121,111,117,32,99,97,110,32,112,101,114,102,111,114,109,32,111,110,32,116,104,101,32,102,111,114,117,109,46])); + add__pkgZkaraxZvdom_u794(tmp_2332033363, tmp_2332033368); + switch (state_p0.rank) { + case 0: + case 1: + case 3: + case 4: + var tmp_2332033369 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2332033369.class = "form-input-hint text-warning"; + add__pkgZkaraxZvdom_u794(tmp_2332033369, text__pkgZkaraxZvdom_u948([89,111,117,114,32,97,99,99,111,117,110,116,32,119,97,115,32,98,97,110,110,101,100,46])); + add__pkgZkaraxZvdom_u794(tmp_2332033363, tmp_2332033369); + break; + case 5: + var tmp_2332033370 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2332033370.class = "form-input-hint text-warning"; + add__pkgZkaraxZvdom_u794(tmp_2332033370, text__pkgZkaraxZvdom_u948([89,111,117,32,99,97,110,110,111,116,32,112,111,115,116,32,117,110,116,105,108,32,121,111,117,32,99,111,110,102,105,114,109,32,121,111,117,114,32,101,109,97,105,108,46])); + add__pkgZkaraxZvdom_u794(tmp_2332033363, tmp_2332033370); + break; + case 2: + var tmp_2332033371 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2332033371.class = "form-input-hint text-warning"; + add__pkgZkaraxZvdom_u794(tmp_2332033371, text__pkgZkaraxZvdom_u948(makeNimstrLit("Your account is under moderation. This is a spam prevention measure. You can write posts but only moderators and admins will see them until your account is verified by them."))); + add__pkgZkaraxZvdom_u794(tmp_2332033363, tmp_2332033371); + break; + default: + break; + } + } + + var rankSelect_2332033419 = tmp_2332033363; + var tmp_2332033420 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033420.class = "columns"; + var tmp_2332033421 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033421.class = "column col-6"; + var tmp_2332033422 = tree__pkgZkaraxZvdom_u880(190, []); + tmp_2332033422.class = "form-horizontal"; + var tmp_2332033423 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033423.class = "form-group"; + var tmp_2332033424 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033424.class = "col-3 col-sm-12"; + var tmp_2332033425 = tree__pkgZkaraxZvdom_u880(193, []); + tmp_2332033425.class = "form-label"; + add__pkgZkaraxZvdom_u794(tmp_2332033425, text__pkgZkaraxZvdom_u948([85,115,101,114,110,97,109,101])); + add__pkgZkaraxZvdom_u794(tmp_2332033424, tmp_2332033425); + add__pkgZkaraxZvdom_u794(tmp_2332033423, tmp_2332033424); + var tmp_2332033426 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033426.class = "col-9 col-sm-12"; + var tmp_2332033427 = tree__pkgZkaraxZvdom_u880(194, []); + tmp_2332033427.class = "form-input"; + setAttr__pkgZkaraxZvdom_u713(tmp_2332033427, "type", "text"); + valueHEX3D__pkgZkaraxZvdom_u419(tmp_2332033427, toJSStr(state_p0.profile.user.name)); + setAttr__pkgZkaraxZvdom_u713(tmp_2332033427, "value", toJSStr(state_p0.profile.user.name)); + setAttr__pkgZkaraxZvdom_u713(tmp_2332033427, "disabled", ""); + add__pkgZkaraxZvdom_u794(tmp_2332033426, tmp_2332033427); + var tmp_2332033428 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2332033428.class = "form-input-hint"; + Label5: { + var fmtRes_2332033459 = [mnewString(0)]; + nimAddStrStr(fmtRes_2332033459[0], [85,115,101,114,115,32,99,97,110,32,114,101,102,101,114,32,116,111,32,121,111,117,32,98,121,32,119,114,105,116,105,110,103,32,64]);; + formatValue__karaxutils_u208(fmtRes_2332033459, 0, state_p0.profile.user.name); + nimAddStrStr(fmtRes_2332033459[0], [32,105,110,32,116,104,101,105,114,32,112,111,115,116,115,46]);; + }; + add__pkgZkaraxZvdom_u794(tmp_2332033428, text__pkgZkaraxZvdom_u948(fmtRes_2332033459[0])); + add__pkgZkaraxZvdom_u794(tmp_2332033426, tmp_2332033428); + add__pkgZkaraxZvdom_u794(tmp_2332033423, tmp_2332033426); + add__pkgZkaraxZvdom_u794(tmp_2332033422, tmp_2332033423); + if (isSome__resetpassword_u313(state_p0.profile.email)) { + var tmp_2332033429 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033429.class = "form-group"; + var tmp_2332033430 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033430.class = "col-3 col-sm-12"; + var tmp_2332033431 = tree__pkgZkaraxZvdom_u880(193, []); + tmp_2332033431.class = "form-label"; + add__pkgZkaraxZvdom_u794(tmp_2332033431, text__pkgZkaraxZvdom_u948([69,109,97,105,108])); + add__pkgZkaraxZvdom_u794(tmp_2332033430, tmp_2332033431); + add__pkgZkaraxZvdom_u794(tmp_2332033429, tmp_2332033430); + var tmp_2332033432 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033432.class = "col-9 col-sm-12"; + var tmp_2332033433 = tree__pkgZkaraxZvdom_u880(194, []); + tmp_2332033433.id = "email-input"; + tmp_2332033433.class = "form-input"; + setAttr__pkgZkaraxZvdom_u713(tmp_2332033433, "type", "text"); + valueHEX3D__pkgZkaraxZvdom_u419(tmp_2332033433, state_p0.email); + setAttr__pkgZkaraxZvdom_u713(tmp_2332033433, "value", state_p0.email); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2332033433, 25, HEX3Aanonymous__profilesettings_u447, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2332033432, tmp_2332033433); + var tmp_2332033434 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2332033434.class = "form-input-hint"; + add__pkgZkaraxZvdom_u794(tmp_2332033434, text__pkgZkaraxZvdom_u948([89,111,117,114,32,97,118,97,116,97,114,32,105,115,32,108,105,110,107,101,100,32,116,111,32,116,104,105,115,32,101,109,97,105,108,32,97,110,100,32,99,97,110,32,98,101,32,99,104,97,110,103,101,100,32,97,116,32])); + var tmp_2332033435 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2332033435, "href", "https://gravatar.com/emails"); + add__pkgZkaraxZvdom_u794(tmp_2332033435, text__pkgZkaraxZvdom_u948([103,114,97,118,97,116,97,114,46,99,111,109])); + add__pkgZkaraxZvdom_u794(tmp_2332033434, tmp_2332033435); + add__pkgZkaraxZvdom_u794(tmp_2332033434, text__pkgZkaraxZvdom_u948(makeNimstrLit(". Note that any changes to your email will require email verification."))); + add__pkgZkaraxZvdom_u794(tmp_2332033432, tmp_2332033434); + add__pkgZkaraxZvdom_u794(tmp_2332033429, tmp_2332033432); + add__pkgZkaraxZvdom_u794(tmp_2332033422, tmp_2332033429); + } + + var tmp_2332033436 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033436.class = "form-group"; + var tmp_2332033437 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033437.class = "col-3 col-sm-12"; + var tmp_2332033438 = tree__pkgZkaraxZvdom_u880(193, []); + tmp_2332033438.class = "form-label"; + add__pkgZkaraxZvdom_u794(tmp_2332033438, text__pkgZkaraxZvdom_u948([82,97,110,107])); + add__pkgZkaraxZvdom_u794(tmp_2332033437, tmp_2332033438); + add__pkgZkaraxZvdom_u794(tmp_2332033436, tmp_2332033437); + var tmp_2332033439 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033439.class = "col-9 col-sm-12"; + add__pkgZkaraxZvdom_u794(tmp_2332033439, rankSelect_2332033419); + add__pkgZkaraxZvdom_u794(tmp_2332033436, tmp_2332033439); + add__pkgZkaraxZvdom_u794(tmp_2332033422, tmp_2332033436); + var tmp_2332033440 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033440.class = "form-group"; + var tmp_2332033441 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033441.class = "col-3 col-sm-12"; + var tmp_2332033442 = tree__pkgZkaraxZvdom_u880(193, []); + tmp_2332033442.class = "form-label"; + add__pkgZkaraxZvdom_u794(tmp_2332033442, text__pkgZkaraxZvdom_u948([80,97,115,115,119,111,114,100])); + add__pkgZkaraxZvdom_u794(tmp_2332033441, tmp_2332033442); + add__pkgZkaraxZvdom_u794(tmp_2332033440, tmp_2332033441); + var tmp_2332033443 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033443.class = "col-9 col-sm-12"; + add__pkgZkaraxZvdom_u794(tmp_2332033443, render__postbutton_u133(state_p0.resetPassword, !(canResetPassword_2332033362))); + add__pkgZkaraxZvdom_u794(tmp_2332033440, tmp_2332033443); + add__pkgZkaraxZvdom_u794(tmp_2332033422, tmp_2332033440); + var tmp_2332033444 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033444.class = "form-group"; + var tmp_2332033445 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033445.class = "col-3 col-sm-12"; + var tmp_2332033446 = tree__pkgZkaraxZvdom_u880(193, []); + tmp_2332033446.class = "form-label"; + add__pkgZkaraxZvdom_u794(tmp_2332033446, text__pkgZkaraxZvdom_u948([65,99,99,111,117,110,116])); + add__pkgZkaraxZvdom_u794(tmp_2332033445, tmp_2332033446); + add__pkgZkaraxZvdom_u794(tmp_2332033444, tmp_2332033445); + var tmp_2332033447 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033447.class = "col-9 col-sm-12"; + var tmp_2332033448 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2332033448.id = "delete-account-btn"; + tmp_2332033448.class = "btn btn-secondary"; + setAttr__pkgZkaraxZvdom_u713(tmp_2332033448, "type", "button"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2332033448, 0, HEX3Aanonymous__profilesettings_u451, kxi__); + var tmp_2332033449 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2332033449.class = "fas fa-times"; + add__pkgZkaraxZvdom_u794(tmp_2332033448, tmp_2332033449); + add__pkgZkaraxZvdom_u794(tmp_2332033448, text__pkgZkaraxZvdom_u948([32,68,101,108,101,116,101,32,97,99,99,111,117,110,116])); + add__pkgZkaraxZvdom_u794(tmp_2332033447, tmp_2332033448); + add__pkgZkaraxZvdom_u794(tmp_2332033444, tmp_2332033447); + add__pkgZkaraxZvdom_u794(tmp_2332033422, tmp_2332033444); + add__pkgZkaraxZvdom_u794(tmp_2332033421, tmp_2332033422); + var tmp_2332033450 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2332033450.class = "float-right"; + if (isSome__replybox_u489(state_p0.error)) { + var tmp_2332033451 = tree__pkgZkaraxZvdom_u880(71, []); + tmp_2332033451.class = "text-error"; + add__pkgZkaraxZvdom_u794(tmp_2332033451, text__pkgZkaraxZvdom_u948(get__replybox_u503(state_p0.error).message)); + add__pkgZkaraxZvdom_u794(tmp_2332033450, tmp_2332033451); + } + + var tmp_2332033452 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2332033452.id = "cancel-btn"; + tmp_2332033452.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [100,105,115,97,98,108,101,100], Field1: !(needsSave__profilesettings_u281(state_p0))}, NTI2332033500)], [98,116,110,32,98,116,110,45,108,105,110,107])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2332033452, 0, HEX3Aanonymous__profilesettings_u495, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2332033452, text__pkgZkaraxZvdom_u948([67,97,110,99,101,108])); + add__pkgZkaraxZvdom_u794(tmp_2332033450, tmp_2332033452); + var tmp_2332033453 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2332033453.id = "save-btn"; + tmp_2332033453.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [100,105,115,97,98,108,101,100], Field1: !(needsSave__profilesettings_u281(state_p0))}, NTI2332033511)], [98,116,110,32,98,116,110,45,112,114,105,109,97,114,121])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2332033453, 0, HEX3Aanonymous__profilesettings_u499, kxi__); + tmp_2332033453.id = "save-btn"; + var tmp_2332033454 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2332033454.class = "fas fa-save"; + add__pkgZkaraxZvdom_u794(tmp_2332033453, tmp_2332033454); + add__pkgZkaraxZvdom_u794(tmp_2332033453, text__pkgZkaraxZvdom_u948([32,83,97,118,101])); + add__pkgZkaraxZvdom_u794(tmp_2332033450, tmp_2332033453); + add__pkgZkaraxZvdom_u794(tmp_2332033421, tmp_2332033450); + add__pkgZkaraxZvdom_u794(tmp_2332033420, tmp_2332033421); + add__pkgZkaraxZvdom_u794(tmp_2332033420, render__delete_u278(state_p0.deleteModal)); + result_2332033334 = tmp_2332033420; + var rankField_2332033527 = getVNodeById__pkgZkaraxZkarax_u321("rank-field", kxi__); + if (!((rankField_2332033527 == null))) { + setInputText__pkgZkaraxZkarax_u1969(rankField_2332033527, toJSStr(reprEnum(state_p0.rank, NTI1929379843))); + } + + var emailField_2332033534 = getVNodeById__pkgZkaraxZkarax_u321("email-field", kxi__); + if (!((emailField_2332033534 == null))) { + setInputText__pkgZkaraxZkarax_u1969(emailField_2332033534, toJSStr(cstrToNimstr(state_p0.email))); + } + + + return result_2332033334; + +} + +function isNone__profile_u614(self_p0) { + var result_2315256425 = false; + + result_2315256425 = (self_p0.val == null); + + return result_2315256425; + +} + +function get__profile_u607(self_p0) { + var result_2315256418 = null; + var result_2315256418_Idx = 0; + + BeforeRet: { + if (isNone__profile_u614(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2315256418 = self_p0; result_2315256418_Idx = "val"; + break BeforeRet; + }; + + return [result_2315256418, result_2315256418_Idx]; + +} + +function render__profile_u363(state_p0, username_p1, currentUser_p2) { + var Temporary1; + +function HEX3Aanonymous__profile_u452(s_p0, r_p1) { + onProfile__profile_u112(s_p0, r_p1, state_p0); + + + } + +function HEX3Aanonymous__profile_u543(e_p0, n_p1) { + state_p0.currentTab = 0; + + + } + +function HEX3Aanonymous__profile_u551(e_p0, n_p1) { + state_p0.currentTab = 1; + + + } + var Temporary8; + + var result_2315256176 = null; + + BeforeRet: { + if (!isSome__profile_u372(state_p0.profile)) Temporary1 = false; else { Temporary1 = !((toJSStr(get__profile_u386(state_p0.profile).user.name) == username_p1)); } if (Temporary1) { + state_p0.profile = nimCopy(state_p0.profile, none__profile_u428(), NTI2315255820); + state_p0.status = 200; + } + + if (!((state_p0.status == 200))) { + result_2315256176 = renderError__error_u24([67,111,117,108,100,110,39,116,32,114,101,116,114,105,101,118,101,32,112,114,111,102,105,108,101,46], state_p0.status); + break BeforeRet; + } + + if (isNone__profile_u393(state_p0.profile)) { + if (!(state_p0.loading)) { + state_p0.loading = true; + var uri_2315256255 = makeUri__karaxutils_u123([112,114,111,102,105,108,101,46,106,115,111,110], [{Field0: [117,115,101,114,110,97,109,101], Field1: cstrToNimstr(username_p1)}], [47], false, true); + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(uri_2315256255), [], HEX3Aanonymous__profile_u452, true, kxi__); + } + + var tmp_2315256264 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256264.class = "loading loading-lg"; + result_2315256176 = tmp_2315256264; + break BeforeRet; + } + + var profile_2315256277 = nimCopy(null, get__profile_u386(state_p0.profile), NTI2097152097); + var tmp_2315256278 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_2315256278.class = "container grid-xl"; + var tmp_2315256279 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256279.class = "profile"; + var tmp_2315256280 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256280.class = "profile-icon"; + add__pkgZkaraxZvdom_u794(tmp_2315256280, render__user_u117(profile_2315256277.user, [112,114,111,102,105,108,101,45,97,118,97,116,97,114], false)); + add__pkgZkaraxZvdom_u794(tmp_2315256279, tmp_2315256280); + var tmp_2315256281 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256281.class = "profile-content"; + var tmp_2315256282 = tree__pkgZkaraxZvdom_u880(22, []); + tmp_2315256282.class = "profile-title"; + add__pkgZkaraxZvdom_u794(tmp_2315256282, text__pkgZkaraxZvdom_u948(profile_2315256277.user.name)); + add__pkgZkaraxZvdom_u794(tmp_2315256281, tmp_2315256282); + add__pkgZkaraxZvdom_u794(tmp_2315256279, tmp_2315256281); + add__pkgZkaraxZvdom_u794(tmp_2315256278, tmp_2315256279); + var tmp_2315256283 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256283.class = "profile-stats"; + var tmp_2315256284 = tree__pkgZkaraxZvdom_u880(39, []); + var tmp_2315256285 = tree__pkgZkaraxZvdom_u880(40, []); + add__pkgZkaraxZvdom_u794(tmp_2315256285, text__pkgZkaraxZvdom_u948([74,111,105,110,101,100])); + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256285); + var tmp_2315256286 = tree__pkgZkaraxZvdom_u880(41, []); + add__pkgZkaraxZvdom_u794(tmp_2315256286, text__pkgZkaraxZvdom_u948(renderActivity__threadlist_u205(profile_2315256277.joinTime))); + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256286); + if ((0 < (profile_2315256277.posts).length)) { + var tmp_2315256287 = tree__pkgZkaraxZvdom_u880(40, []); + add__pkgZkaraxZvdom_u794(tmp_2315256287, text__pkgZkaraxZvdom_u948([76,97,115,116,32,80,111,115,116])); + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256287); + var tmp_2315256288 = tree__pkgZkaraxZvdom_u880(41, []); + add__pkgZkaraxZvdom_u794(tmp_2315256288, text__pkgZkaraxZvdom_u948(renderActivity__threadlist_u205(profile_2315256277.posts[chckIndx(0, 0, (profile_2315256277.posts).length - 1)].creation))); + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256288); + } + + var tmp_2315256289 = tree__pkgZkaraxZvdom_u880(40, []); + add__pkgZkaraxZvdom_u794(tmp_2315256289, text__pkgZkaraxZvdom_u948([76,97,115,116,32,79,110,108,105,110,101])); + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256289); + var tmp_2315256290 = tree__pkgZkaraxZvdom_u880(41, []); + add__pkgZkaraxZvdom_u794(tmp_2315256290, text__pkgZkaraxZvdom_u948(renderActivity__threadlist_u205(profile_2315256277.user.lastOnline))); + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256290); + var tmp_2315256291 = tree__pkgZkaraxZvdom_u880(40, []); + add__pkgZkaraxZvdom_u794(tmp_2315256291, text__pkgZkaraxZvdom_u948([80,111,115,116,115])); + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256291); + var tmp_2315256292 = tree__pkgZkaraxZvdom_u880(41, []); + if ((999 < profile_2315256277.postCount)) { + add__pkgZkaraxZvdom_u794(tmp_2315256292, text__pkgZkaraxZvdom_u948((HEX24__system_u3223(HEX2F__system_u1608(profile_2315256277.postCount, 1000))).concat([107]))); + } + else { + add__pkgZkaraxZvdom_u794(tmp_2315256292, text__pkgZkaraxZvdom_u948(HEX24__systemZdollars_u14(profile_2315256277.postCount))); + } + + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256292); + var tmp_2315256293 = tree__pkgZkaraxZvdom_u880(40, []); + add__pkgZkaraxZvdom_u794(tmp_2315256293, text__pkgZkaraxZvdom_u948([84,104,114,101,97,100,115])); + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256293); + var tmp_2315256294 = tree__pkgZkaraxZvdom_u880(41, []); + if ((999 < profile_2315256277.threadCount)) { + add__pkgZkaraxZvdom_u794(tmp_2315256294, text__pkgZkaraxZvdom_u948((HEX24__system_u3223(HEX2F__system_u1608(profile_2315256277.threadCount, 1000))).concat([107]))); + } + else { + add__pkgZkaraxZvdom_u794(tmp_2315256294, text__pkgZkaraxZvdom_u948(HEX24__systemZdollars_u14(profile_2315256277.threadCount))); + } + + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256294); + var tmp_2315256295 = tree__pkgZkaraxZvdom_u880(40, []); + add__pkgZkaraxZvdom_u794(tmp_2315256295, text__pkgZkaraxZvdom_u948([82,97,110,107])); + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256295); + var tmp_2315256296 = tree__pkgZkaraxZvdom_u880(41, []); + add__pkgZkaraxZvdom_u794(tmp_2315256296, text__pkgZkaraxZvdom_u948(reprEnum(profile_2315256277.user.rank, NTI1929379843))); + add__pkgZkaraxZvdom_u794(tmp_2315256284, tmp_2315256296); + add__pkgZkaraxZvdom_u794(tmp_2315256283, tmp_2315256284); + add__pkgZkaraxZvdom_u794(tmp_2315256278, tmp_2315256283); + if (isSome__user_u39(currentUser_p2)) { + var user_2315256341 = nimCopy(null, get__user_u53(currentUser_p2), NTI1929379844); + if ((eqStrings(user_2315256341.name, profile_2315256277.user.name) || (7 <= user_2315256341.rank))) { + var tmp_2315256297 = tree__pkgZkaraxZvdom_u880(37, []); + tmp_2315256297.class = "tab profile-tabs"; + var tmp_2315256298 = tree__pkgZkaraxZvdom_u880(38, []); + tmp_2315256298.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [97,99,116,105,118,101], Field1: (state_p0.currentTab == 0)}, NTI2315256262)], [116,97,98,45,105,116,101,109])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2315256298, 0, HEX3Aanonymous__profile_u543, kxi__); + var tmp_2315256299 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_2315256299.id = "overview-tab"; + tmp_2315256299.class = "c-hand"; + add__pkgZkaraxZvdom_u794(tmp_2315256299, text__pkgZkaraxZvdom_u948([79,118,101,114,118,105,101,119])); + add__pkgZkaraxZvdom_u794(tmp_2315256298, tmp_2315256299); + add__pkgZkaraxZvdom_u794(tmp_2315256297, tmp_2315256298); + var tmp_2315256300 = tree__pkgZkaraxZvdom_u880(38, []); + tmp_2315256300.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [97,99,116,105,118,101], Field1: (state_p0.currentTab == 1)}, NTI2315256278)], [116,97,98,45,105,116,101,109])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2315256300, 0, HEX3Aanonymous__profile_u551, kxi__); + var tmp_2315256301 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_2315256301.id = "settings-tab"; + tmp_2315256301.class = "c-hand"; + var tmp_2315256302 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2315256302.class = "fas fa-cog"; + add__pkgZkaraxZvdom_u794(tmp_2315256301, tmp_2315256302); + add__pkgZkaraxZvdom_u794(tmp_2315256301, text__pkgZkaraxZvdom_u948([32,83,101,116,116,105,110,103,115])); + add__pkgZkaraxZvdom_u794(tmp_2315256300, tmp_2315256301); + add__pkgZkaraxZvdom_u794(tmp_2315256297, tmp_2315256300); + add__pkgZkaraxZvdom_u794(tmp_2315256278, tmp_2315256297); + } + + } + + switch (state_p0.currentTab) { + case 0: + if (((0 < (profile_2315256277.posts).length) || (0 < (profile_2315256277.threads).length))) { + var tmp_2315256303 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256303.class = "columns"; + var tmp_2315256304 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256304.class = "column col-6"; + var tmp_2315256305 = tree__pkgZkaraxZvdom_u880(24, []); + add__pkgZkaraxZvdom_u794(tmp_2315256305, text__pkgZkaraxZvdom_u948([76,97,116,101,115,116,32,80,111,115,116,115])); + add__pkgZkaraxZvdom_u794(tmp_2315256304, tmp_2315256305); + var tmp_2315256306 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256306.class = "posts"; + Label2: { + var post_2315256390 = ({creation: 0n, topic: [], threadId: 0, postId: 0, author: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false})}); + var i_637535071 = 0; + var L_637535072 = (profile_2315256277.posts).length; + Label3: { + Label4: while (true) { + if (!(i_637535071 < L_637535072)) break Label4; + post_2315256390 = profile_2315256277.posts[chckIndx(i_637535071, 0, (profile_2315256277.posts).length - 1)]; + add__pkgZkaraxZvdom_u794(tmp_2315256306, genPostLink__profile_u348(post_2315256390)); + i_637535071 += 1; + if (!(((profile_2315256277.posts).length == L_637535072))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + add__pkgZkaraxZvdom_u794(tmp_2315256304, tmp_2315256306); + add__pkgZkaraxZvdom_u794(tmp_2315256303, tmp_2315256304); + var tmp_2315256307 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256307.class = "column col-6"; + var tmp_2315256308 = tree__pkgZkaraxZvdom_u880(24, []); + add__pkgZkaraxZvdom_u794(tmp_2315256308, text__pkgZkaraxZvdom_u948([76,97,116,101,115,116,32,84,104,114,101,97,100,115])); + add__pkgZkaraxZvdom_u794(tmp_2315256307, tmp_2315256308); + var tmp_2315256309 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2315256309.class = "posts"; + Label5: { + var thread_2315256394 = ({creation: 0n, topic: [], threadId: 0, postId: 0, author: ({val: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), has: false})}); + var i_637535075 = 0; + var L_637535076 = (profile_2315256277.threads).length; + Label6: { + Label7: while (true) { + if (!(i_637535075 < L_637535076)) break Label7; + thread_2315256394 = profile_2315256277.threads[chckIndx(i_637535075, 0, (profile_2315256277.threads).length - 1)]; + add__pkgZkaraxZvdom_u794(tmp_2315256309, genPostLink__profile_u348(thread_2315256394)); + i_637535075 += 1; + if (!(((profile_2315256277.threads).length == L_637535076))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + add__pkgZkaraxZvdom_u794(tmp_2315256307, tmp_2315256309); + add__pkgZkaraxZvdom_u794(tmp_2315256303, tmp_2315256307); + add__pkgZkaraxZvdom_u794(tmp_2315256278, tmp_2315256303); + } + + break; + case 1: + if (isSome__profile_u590(state_p0.settings)) { + add__pkgZkaraxZvdom_u794(tmp_2315256278, render__profilesettings_u306((Temporary8 = get__profile_u607(state_p0.settings), Temporary8)[0][Temporary8[1]], currentUser_p2)); + } + + break; + } + result_2315256176 = tmp_2315256278; + }; + + return result_2315256176; + +} + +function rawParseInt__pureZparseutils_u327(s_p0, b_p1, b_p1_Idx) { + var Temporary1; + var Temporary4; + + var result_1140851018 = 0; + + var sign_1140851019 = (-1n); + var i_1140851020 = 0; + if ((i_1140851020 < (s_p0).length)) { + if ((s_p0[chckIndx(i_1140851020, 0, (s_p0).length - 1)] == 43)) { + i_1140851020 += 1; + } + else { + if ((s_p0[chckIndx(i_1140851020, 0, (s_p0).length - 1)] == 45)) { + i_1140851020 += 1; + sign_1140851019 = 1n; + } + } + } + + if (!(i_1140851020 < (s_p0).length)) Temporary1 = false; else { Temporary1 = (ConstSet96[s_p0[chckIndx(i_1140851020, 0, (s_p0).length - 1)]] != undefined); } if (Temporary1) { + b_p1[b_p1_Idx] = 0n; + Label2: { + Label3: while (true) { + if (!(i_1140851020 < (s_p0).length)) Temporary4 = false; else { Temporary4 = (ConstSet97[s_p0[chckIndx(i_1140851020, 0, (s_p0).length - 1)]] != undefined); } if (!Temporary4) break Label3; + var c_1140851054 = (s_p0[chckIndx(i_1140851020, 0, (s_p0).length - 1)] - 48); + if ((((-9223372036854775808n) + BigInt(c_1140851054)) / 10n <= b_p1[b_p1_Idx])) { + b_p1[b_p1_Idx] = ((b_p1[b_p1_Idx] * 10n) - BigInt(c_1140851054)); + } + else { + integerOutOfRangeError__pureZparseutils_u325(); + } + + i_1140851020 += 1; + Label5: { + Label6: while (true) { + if (!((i_1140851020 < (s_p0).length) && (s_p0[chckIndx(i_1140851020, 0, (s_p0).length - 1)] == 95))) break Label6; + i_1140851020 += 1; + } + }; + } + }; + if (((sign_1140851019 == (-1n)) && (b_p1[b_p1_Idx] == (-9223372036854775808n)))) { + integerOutOfRangeError__pureZparseutils_u325(); + } + else { + b_p1[b_p1_Idx] = (b_p1[b_p1_Idx] * sign_1140851019); + result_1140851018 = i_1140851020; + } + + } + else { + result_1140851018 = 0; + } + + + return result_1140851018; + +} + +function npuParseBiggestInt(s_p0, number_p1, number_p1_Idx) { + var result_1140851079 = 0; + + var res_1140851080 = [0n]; + result_1140851079 = rawParseInt__pureZparseutils_u327(s_p0, res_1140851080, 0); + if (!((result_1140851079 == 0))) { + number_p1[number_p1_Idx] = res_1140851080[0]; + } + + + return result_1140851079; + +} + +function npuParseInt(s_p0, number_p1, number_p1_Idx) { + var result_1140851084 = 0; + + var res_1140851085 = [0n]; + result_1140851084 = npuParseBiggestInt(s_p0, res_1140851085, 0); + if (((res_1140851085[0] < (-2147483648n)) || (2147483647n < res_1140851085[0]))) { + integerOutOfRangeError__pureZparseutils_u325(); + } + + if (!((result_1140851084 == 0))) { + number_p1[number_p1_Idx] = chckRange(Number(res_1140851085[0]), (-2147483648), 2147483647); + } + + + return result_1140851084; + +} + +function parseInt__pureZparseutils_u915(s_p0, number_p1, number_p1_Idx, start_p2) { + var result_1140851607 = 0; + + result_1140851607 = npuParseInt((s_p0.slice(start_p2, (s_p0).length - 1 + 1)), number_p1, number_p1_Idx); + + return result_1140851607; + +} + +function parseIntSafe__karaxutils_u36(s_p0, value_p1, value_p1_Idx) { +++excHandler; + try { + (parseInt__pureZparseutils_u915(s_p0, value_p1, value_p1_Idx, 0)); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + if (lastJSError && (isObj(lastJSError.m_type, NTI134217743))) { + } + else { + reraiseException(); + } + lastJSError = prevJSError; + } finally { + } + + +} + +function getInt__karaxutils_u39(s_p0, default_p1) { + var result_1862271018 = [0]; + + result_1862271018[0] = default_p1; + parseIntSafe__karaxutils_u36(s_p0, result_1862271018, 0); + + return result_1862271018[0]; + +} + +function isSome__postlist_u1904(self_p0) { + var result_2063599475 = false; + + result_2063599475 = !((self_p0.val == null)); + + return result_2063599475; + +} + +function new__postlist_u378() { + var result_2063597949 = null; + + BeforeRet: { + var r_2063597951 = null; + r_2063597951 = ({thread: ({id: 0, topic: [], category: ({id: 0, name: [], description: [], color: [], numTopics: 0}), author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), users: [], replies: 0, views: 0, activity: 0n, creation: 0n, isLocked: false, isSolved: false, isPinned: false}), history: [], posts: []}); + result_2063597949 = r_2063597951; + break BeforeRet; + }; + + return result_2063597949; + +} + +function initFromJson__postlist_u442(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_2063598016 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,116,104,114,101,97,100]);; + initFromJson__threadlist_u462(dst_p0.thread, getOrDefault__pureZjson_u3507(jsonNode_p1, [116,104,114,101,97,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598016, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598016, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598016, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,104,105,115,116,111,114,121]);; + initFromJson__threadlist_u433(dst_p0, "history", getOrDefault__pureZjson_u3507(jsonNode_p1, [104,105,115,116,111,114,121]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598016, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598016, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598016, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,112,111,115,116,115]);; + initFromJson__postlist_u477(dst_p0, "posts", getOrDefault__pureZjson_u3507(jsonNode_p1, [112,111,115,116,115]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2063598016, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2063598016, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2063598016, 0, 2147483647); }; + + +} + +function initFromJson__postlist_u355(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet98[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym3_2063597940 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet99), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym3_2063597940, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if ((jsonNode_p1.kind == 0)) { + dst_p0[dst_p0_Idx] = null; + } + else { + dst_p0[dst_p0_Idx] = new__postlist_u378(); + initFromJson__postlist_u442(dst_p0[dst_p0_Idx], jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx); + } + + + +} + +function to__postlist_u343(node_p0) { + var result_2063597916 = [null]; + + var jsonPath_2063597917 = [[]]; + result_2063597916[0] = null; + initFromJson__postlist_u355(result_2063597916, 0, node_p0, jsonPath_2063597917, 0); + + return result_2063597916[0]; + +} + +function some__postlist_u1036(val_p0) { + var result_2063598607 = ({val: null}); + + if (!(!((val_p0 == null)))) { + failedAssertImpl__stdZassertions_u86([111,112,116,105,111,110,115,46,110,105,109,40,49,51,57,44,32,53,41,32,96,110,111,116,32,118,97,108,46,105,115,78,105,108,96,32]); + } + + result_2063598607 = nimCopy(result_2063598607, {val: val_p0}, NTI2063597582); + + return result_2063598607; + +} + +function onPostList__postlist_u337(httpStatus_p0, response_p1, postId_p2) { + postId_p2 = nimCopy(null, postId_p2, NTI1627391017); + +function HEX3Aanonymous__postlist_u1056() { + getVNodeById__pkgZkaraxZkarax_u321(toJSStr(HEX24__systemZdollars_u14(get__pureZtimes_u3785(postId_p2))), kxi__).dom.scrollIntoView(); + + + } + + BeforeRet: { + state_2063597821[0].loading = false; + state_2063597821[0].status = chckRange(httpStatus_p0, 0, 599); + if (!((state_2063597821[0].status == 200))) { + break BeforeRet; + } + + var parsed_2063597910 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var list_2063598603 = to__postlist_u343(parsed_2063597910); + state_2063597821[0].list = nimCopy(state_2063597821[0].list, some__postlist_u1036(list_2063598603), NTI2063597582); + document.title = (toJSStr((list_2063598603.thread.topic).concat([32,45,32])) + document.title); + select__categorypicker_u556(state_2063597821[0].categoryPicker, list_2063598603.thread.category.id); + if (isSome__pureZtimes_u3701(postId_p2)) { + (setTimeout(HEX3Aanonymous__postlist_u1056, 100)); + } + + }; + + +} + +function genCategories__postlist_u1567(thread_p0, currentUser_p1) { + var result_2063599139 = null; + + var loggedIn_2063599146 = isSome__user_u39(currentUser_p1); + var authoredByUser_2063599159 = (loggedIn_2063599146 && eqStrings(get__user_u53(currentUser_p1).name, thread_p0.author.name)); + var canChangeCategory_2063599176 = (loggedIn_2063599146 && (ConstSet100[get__user_u53(currentUser_p1).rank] != undefined)); + var tmp_2063599177 = tree__pkgZkaraxZvdom_u880(44, []); + if ((authoredByUser_2063599159 || canChangeCategory_2063599176)) { + add__pkgZkaraxZvdom_u794(tmp_2063599177, render__categorypicker_u750(state_2063597821[0].categoryPicker, currentUser_p1, false)); + } + else { + add__pkgZkaraxZvdom_u794(tmp_2063599177, render__category_u32(thread_p0.category, true)); + } + + result_2063599139 = tmp_2063599177; + + return result_2063599139; + +} + +function isModerated__post_u104(post_p0) { + var result_2097152106 = false; + + result_2097152106 = (post_p0.author.rank <= 2); + + return result_2097152106; + +} + +function visibleTo__postlist_u2087(thread_p0, user_p1) { + var result_2063599659 = false; + + BeforeRet: { + if (isNone__user_u60(user_p1)) { + result_2063599659 = !(isModerated__post_u104(thread_p0)); + break BeforeRet; + } + + var rank_2063599678 = get__user_u53(user_p1).rank; + if (((rank_2063599678 < 7) && isModerated__post_u104(thread_p0))) { + result_2063599659 = HEX3DHEX3D__user_u87(thread_p0.author, get__user_u53(user_p1)); + break BeforeRet; + } + + result_2063599659 = true; + break BeforeRet; + }; + + return result_2063599659; + +} + +function nsuFormatSingleElem(formatstr_p0, a_p1) { + var result_1124076081 = [[]]; + + result_1124076081[0] = nimCopy(null, mnewString(0), NTI33554449); + nsuAddf(result_1124076081, 0, formatstr_p0, [nimCopy(null, a_p1, NTI33554449)]); + + return result_1124076081[0]; + +} + +function genTimePassed__postlist_u1842(prevPost_p0, post_p1, last_p2) { + var Temporary1; + var Temporary2; + var Temporary3; + var Temporary4; + + var result_2063599415 = null; + + BeforeRet: { + if (isSome__replybox_u332(post_p1)) { + Temporary1 = fromUnix__pureZtimes_u1193(get__replybox_u349(post_p1).info.creation); + } + else { + Temporary1 = getTime__pureZtimes_u1247(); + } + + var latestTime_2063599434 = nimCopy(null, Temporary1, NTI1627389970); + if (last_p2) { + Temporary2 = [[65,32,108,111,110,103,32,116,105,109,101,32,115,105,110,99,101,32,108,97,115,116,32,114,101,112,108,121], [36,49,32,121,101,97,114,32,115,105,110,99,101,32,108,97,115,116,32,114,101,112,108,121], [36,49,32,121,101,97,114,115,32,115,105,110,99,101,32,108,97,115,116,32,114,101,112,108,121], [36,49,32,109,111,110,116,104,32,115,105,110,99,101,32,108,97,115,116,32,114,101,112,108,121], [36,49,32,109,111,110,116,104,115,32,115,105,110,99,101,32,108,97,115,116,32,114,101,112,108,121]]; + } + else { + Temporary2 = [[83,111,109,101,32,116,105,109,101,32,108,97,116,101,114], [36,49,32,121,101,97,114,32,108,97,116,101,114], [36,49,32,121,101,97,114,115,32,108,97,116,101,114], [36,49,32,109,111,110,116,104,32,108,97,116,101,114], [36,49,32,109,111,110,116,104,115,32,108,97,116,101,114]]; + } + + var tmpl_2063599435 = nimCopy(null, Temporary2, NTI2063599046); + var diffStr_2063599436 = nimCopy(null, tmpl_2063599435[chckIndx(0, 0, (tmpl_2063599435).length - 1)], NTI33554449); + var diff_2063599437 = ntDiffTime(latestTime_2063599434, fromUnix__pureZtimes_u1193(prevPost_p0.info.creation)); + if ((48n < inWeeks__pureZtimes_u661(diff_2063599437))) { + var years_2063599438 = divInt64(inWeeks__pureZtimes_u661(diff_2063599437), 48n); + if ((years_2063599438 == 1n)) { + Temporary3 = tmpl_2063599435[chckIndx(1, 0, (tmpl_2063599435).length - 1)]; + } + else { + Temporary3 = tmpl_2063599435[chckIndx(2, 0, (tmpl_2063599435).length - 1)]; + } + + diffStr_2063599436 = nimCopy(null, nsuFormatSingleElem(Temporary3, HEX24__systemZdollars_u34(years_2063599438)), NTI33554449); + } + else { + if ((4n < inWeeks__pureZtimes_u661(diff_2063599437))) { + var months_2063599439 = divInt64(inWeeks__pureZtimes_u661(diff_2063599437), 4n); + if ((months_2063599439 == 1n)) { + Temporary4 = tmpl_2063599435[chckIndx(3, 0, (tmpl_2063599435).length - 1)]; + } + else { + Temporary4 = tmpl_2063599435[chckIndx(4, 0, (tmpl_2063599435).length - 1)]; + } + + diffStr_2063599436 = nimCopy(null, nsuFormatSingleElem(Temporary4, HEX24__systemZdollars_u34(months_2063599439)), NTI33554449); + } + else { + var tmp_2063599440 = tree__pkgZkaraxZvdom_u880(44, []); + result_2063599415 = tmp_2063599440; + break BeforeRet; + } + } + var tmp_2063599441 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599441.class = "information time-passed"; + var tmp_2063599442 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599442.class = "information-icon"; + var tmp_2063599443 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599443.class = "fas fa-clock"; + add__pkgZkaraxZvdom_u794(tmp_2063599442, tmp_2063599443); + add__pkgZkaraxZvdom_u794(tmp_2063599441, tmp_2063599442); + var tmp_2063599444 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599444.class = "information-main"; + var tmp_2063599445 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599445.class = "information-title"; + add__pkgZkaraxZvdom_u794(tmp_2063599445, text__pkgZkaraxZvdom_u948(diffStr_2063599436)); + add__pkgZkaraxZvdom_u794(tmp_2063599444, tmp_2063599445); + add__pkgZkaraxZvdom_u794(tmp_2063599441, tmp_2063599444); + result_2063599415 = tmp_2063599441; + }; + + return result_2063599415; + +} + +function get__postlist_u1673(self_p0) { + var result_2063599244 = null; + var result_2063599244_Idx = 0; + + BeforeRet: { + if (isNone__replybox_u356(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2063599244 = self_p0; result_2063599244_Idx = "val"; + break BeforeRet; + }; + + return [result_2063599244, result_2063599244_Idx]; + +} + +function some__postlist_u1406(val_p0) { + var result_2063598977 = ({val: null}); + + if (!(!((val_p0 == null)))) { + failedAssertImpl__stdZassertions_u86([111,112,116,105,111,110,115,46,110,105,109,40,49,51,57,44,32,53,41,32,96,110,111,116,32,118,97,108,46,105,115,78,105,108,96,32]); + } + + result_2063598977 = nimCopy(result_2063598977, {val: val_p0}, NTI2113929478); + + return result_2063598977; + +} + +function onLoadMore__postlist_u1544(ev_p0, n_p1, start_p2, post_p3) { + loadMore__postlist_u1281(start_p2, post_p3.moreBefore); + + +} + +function genLoadMore__postlist_u1549(post_p0, start_p1) { + +function HEX3Aanonymous__postlist_u1560(e_p0, n_p1) { + onLoadMore__postlist_u1544(e_p0, n_p1, start_p1, post_p0); + + + } + + var result_2063599120 = null; + + var tmp_2063599121 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599121.class = "information load-more-posts"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2063599121, 0, HEX3Aanonymous__postlist_u1560, kxi__); + var tmp_2063599122 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599122.class = "information-icon"; + var tmp_2063599123 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599123.class = "fas fa-comment-dots"; + add__pkgZkaraxZvdom_u794(tmp_2063599122, tmp_2063599123); + add__pkgZkaraxZvdom_u794(tmp_2063599121, tmp_2063599122); + var tmp_2063599124 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599124.class = "information-main"; + if (state_2063597821[0].loading) { + var tmp_2063599125 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599125.class = "loading loading-lg"; + add__pkgZkaraxZvdom_u794(tmp_2063599124, tmp_2063599125); + } + else { + var tmp_2063599126 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599126.class = "information-title"; + add__pkgZkaraxZvdom_u794(tmp_2063599126, text__pkgZkaraxZvdom_u948([76,111,97,100,32,109,111,114,101,32,112,111,115,116,115,32])); + var tmp_2063599127 = tree__pkgZkaraxZvdom_u880(71, []); + tmp_2063599127.class = "more-post-count"; + add__pkgZkaraxZvdom_u794(tmp_2063599127, text__pkgZkaraxZvdom_u948(([40]).concat(HEX24__systemZdollars_u14((post_p0.moreBefore).length),[41]))); + add__pkgZkaraxZvdom_u794(tmp_2063599126, tmp_2063599127); + add__pkgZkaraxZvdom_u794(tmp_2063599124, tmp_2063599126); + } + + add__pkgZkaraxZvdom_u794(tmp_2063599121, tmp_2063599124); + result_2063599120 = tmp_2063599121; + + return result_2063599120; + +} + +function renderUserRank__user_u146(user_p0) { + var Temporary1; + + var result_1929379988 = null; + + switch (user_p0.rank) { + case 0: + case 1: + case 3: + case 4: + var tmp_1929379989 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1929379989.class = "fas fa-eye-ban"; + setAttr__pkgZkaraxZvdom_u713(tmp_1929379989, "title", "User is banned"); + Temporary1 = tmp_1929379989; + break; + case 6: + case 5: + var tmp_1929379990 = tree__pkgZkaraxZvdom_u880(71, []); + Temporary1 = tmp_1929379990; + break; + case 2: + var tmp_1929379991 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1929379991.class = "fas fa-eye-slash"; + setAttr__pkgZkaraxZvdom_u713(tmp_1929379991, "title", "User is moderated"); + Temporary1 = tmp_1929379991; + break; + case 7: + var tmp_1929379992 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1929379992.class = "fas fa-shield-alt"; + setAttr__pkgZkaraxZvdom_u713(tmp_1929379992, "title", "User is a moderator"); + Temporary1 = tmp_1929379992; + break; + case 8: + var tmp_1929379993 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1929379993.class = "fas fa-chess-knight"; + setAttr__pkgZkaraxZvdom_u713(tmp_1929379993, "title", "User is an admin"); + Temporary1 = tmp_1929379993; + break; + } + result_1929379988 = Temporary1; + + return result_1929379988; + +} + +function isSome__postlist_u1759(self_p0) { + var result_2063599330 = false; + + result_2063599330 = self_p0.has; + + return result_2063599330; + +} + +function renderUserMention__user_u142(user_p0) { + var result_1929379984 = null; + + var tmp_1929379985 = tree__pkgZkaraxZvdom_u880(45, []); + tmp_1929379985.class = "user-mention"; + setAttr__pkgZkaraxZvdom_u713(tmp_1929379985, "href", toJSStr(makeUri__karaxutils_u123(([47,112,114,111,102,105,108,101,47]).concat(user_p0.name), [], [47], false, true))); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_1929379985, 0, anchorCB__karaxutils_u166, kxi__); + add__pkgZkaraxZvdom_u794(tmp_1929379985, text__pkgZkaraxZvdom_u948(([64]).concat(user_p0.name))); + result_1929379984 = tmp_1929379985; + + return result_1929379984; + +} + +function format__postlist_u1796(dt_p0) { + var result_2063599368 = []; + + result_2063599368 = nimCopy(null, format__pureZtimes_u3956(dt_p0, f2_2063599369, DefaultLocale_1627392012), NTI33554449); + + return result_2063599368; + +} + +function HEX5BHEX5D__post_u31(s_p0, i_p1) { + var result_2097152035 = null; + + result_2097152035 = s_p0[chckIndx(subInt((s_p0).length, i_p1), 0, (s_p0).length - 1)]; + + return result_2097152035; + +} + +function lastEdit__post_u28(post_p0) { + var result_2097152030 = ({creation: 0n, content: []}); + + result_2097152030 = nimCopy(result_2097152030, HEX5BHEX5D__post_u31(post_p0.history, 1), NTI2097152003); + + return result_2097152030; + +} + +function renderPostUrl__post_u153(post_p0, thread_p1) { + var result_2097152156 = []; + + result_2097152156 = nimCopy(null, renderPostUrl__karaxutils_u236(thread_p1.id, post_p0.id), NTI33554449); + + return result_2097152156; + +} + +function setText__replybox_u122(state_p0, text_p1) { + state_p0.text = text_p1; + + +} + +function onRawContent__editbox_u99(httpStatus_p0, response_p1, state_p2) { + var Temporary1; + + BeforeRet: { + state_p2.status = chckRange(httpStatus_p0, 0, 599); + if (!((state_p2.status == 200))) { + break BeforeRet; + } + + state_p2.rawContent = nimCopy(state_p2.rawContent, some__replybox_u142(response_p1), NTI2113929229); + setText__replybox_u122(state_p2.box, (Temporary1 = get__replybox_u453(state_p2.rawContent), Temporary1)[0][Temporary1[1]]); + }; + + +} + +function none__editbox_u142() { + var result_2130706581 = ({val: [], has: false}); + + result_2130706581 = nimCopy(result_2130706581, {val: [], has: false}, NTI2130706523); + + return result_2130706581; + +} + +function none__editbox_u139() { + var result_2130706573 = ({val: [], has: false}); + + result_2130706573 = nimCopy(result_2130706573, none__editbox_u142(), NTI2097152105); + + return result_2130706573; + +} + +function onEditPost__editbox_u118(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym1_2130706557 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym1_2130706557 == 200)) { + state_p2.onEditPosted(state_p2.post.id, cstrToNimstr(response_p1), none__editbox_u139()); + } + else { +++excHandler; + try { + var parsedHEX60gensym1_2130706601 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym1_2130706607 = to__addcategorymodal_u215(parsedHEX60gensym1_2130706601); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym1_2130706607), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function save__editbox_u188(state_p0) { + +function HEX3Aanonymous__editbox_u215(s_p0, r_p1) { + onEditPost__editbox_u118(s_p0, r_p1, state_p0); + + + } + + BeforeRet: { + if (state_p0.loading) { + break BeforeRet; + } + + state_p0.loading = true; + state_p0.error = nimCopy(state_p0.error, none__addcategorymodal_u322(), NTI1946157155); + var formData_2130706637 = new FormData(); + formData_2130706637.append("msg", getText__replybox_u119(state_p0.box)); + formData_2130706637.append("postId", toJSStr(HEX24__systemZdollars_u14(state_p0.post.id))); + var uri_2130706638 = makeUri__karaxutils_u123([47,117,112,100,97,116,101,80,111,115,116], [], [47], false, true); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2130706638), [], (formData_2130706637), HEX3Aanonymous__editbox_u215, true, kxi__); + }; + + +} + +function render__editbox_u219(state_p0, post_p1) { + +function HEX3Aanonymous__editbox_u272(s_p0, r_p1) { + onRawContent__editbox_u99(s_p0, r_p1, state_p0); + + + } + +function HEX3Aanonymous__editbox_u369(e_p0, n_p1) { + state_p0.onEditCancel(); + + + } + +function HEX3Aanonymous__editbox_u375(e_p0, n_p1) { + save__editbox_u188(state_p0); + + + } + + var result_2130706654 = null; + + BeforeRet: { + if ((!((state_p0.post == null)) && !((state_p0.post.id == post_p1.id)))) { + state_p0.rawContent = nimCopy(state_p0.rawContent, none__replybox_u230(), NTI2113929229); + state_p0.status = 200; + } + + if (!((state_p0.status == 200))) { + result_2130706654 = renderError__error_u24([67,111,117,108,100,110,39,116,32,114,101,116,114,105,101,118,101,32,114,97,119,32,112,111,115,116], state_p0.status); + break BeforeRet; + } + + if (isNone__replybox_u460(state_p0.rawContent)) { + state_p0.post = post_p1; + state_p0.rawContent = nimCopy(state_p0.rawContent, none__replybox_u230(), NTI2113929229); + var params_2130706698 = [nimCopy(null, {Field0: [105,100], Field1: HEX24__systemZdollars_u14(post_p1.id)}, NTI2130706662)]; + var uri_2130706699 = makeUri__karaxutils_u123([112,111,115,116,46,114,115,116], params_2130706698, [47], false, true); + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(uri_2130706699), [], HEX3Aanonymous__editbox_u272, true, kxi__); + var tmp_2130706708 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2130706708.class = "loading"; + result_2130706654 = tmp_2130706708; + break BeforeRet; + } + + var tmp_2130706709 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2130706709.class = "edit-box"; + add__pkgZkaraxZvdom_u794(tmp_2130706709, renderContent__replybox_u402(state_p0.box, none__editbox_u298(), none__editbox_u323())); + if (isSome__replybox_u489(state_p0.error)) { + var tmp_2130706710 = tree__pkgZkaraxZvdom_u880(71, []); + tmp_2130706710.class = "text-error"; + add__pkgZkaraxZvdom_u794(tmp_2130706710, text__pkgZkaraxZvdom_u948(get__replybox_u503(state_p0.error).message)); + add__pkgZkaraxZvdom_u794(tmp_2130706709, tmp_2130706710); + } + + var tmp_2130706711 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2130706711.class = "edit-buttons"; + var tmp_2130706712 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2130706712.class = "cancel-button"; + var tmp_2130706713 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2130706713.class = "btn btn-link"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2130706713, 0, HEX3Aanonymous__editbox_u369, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2130706713, text__pkgZkaraxZvdom_u948([32,67,97,110,99,101,108])); + add__pkgZkaraxZvdom_u794(tmp_2130706712, tmp_2130706713); + add__pkgZkaraxZvdom_u794(tmp_2130706711, tmp_2130706712); + var tmp_2130706714 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2130706714.class = "save-button"; + var tmp_2130706715 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2130706715.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [108,111,97,100,105,110,103], Field1: state_p0.loading}, NTI2130706825)], [98,116,110,32,98,116,110,45,112,114,105,109,97,114,121])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2130706715, 0, HEX3Aanonymous__editbox_u375, kxi__); + var tmp_2130706716 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2130706716.class = "fas fa-check"; + add__pkgZkaraxZvdom_u794(tmp_2130706715, tmp_2130706716); + add__pkgZkaraxZvdom_u794(tmp_2130706715, text__pkgZkaraxZvdom_u948([32,83,97,118,101])); + add__pkgZkaraxZvdom_u794(tmp_2130706714, tmp_2130706715); + add__pkgZkaraxZvdom_u794(tmp_2130706711, tmp_2130706714); + add__pkgZkaraxZvdom_u794(tmp_2130706709, tmp_2130706711); + result_2130706654 = tmp_2130706709; + }; + + return result_2130706654; + +} + +function verbatim__pkgZkaraxZvdom_u954(s_p0) { + var result_1409287100 = null; + + result_1409287100 = {kind: 6, text: toJSStr(s_p0), index: (-1), m_type: NTI1409286247, id: null, class: null, kids: [], attrs: [], events: [], style: null, dom: null}; + + return result_1409287100; + +} + +function onEditClick__postlist_u1402(e_p0, n_p1, p_p2) { + state_2063597821[0].editing = nimCopy(state_2063597821[0].editing, some__postlist_u1406(p_p2), NTI2113929478); + + +} + +function show__postlist_u1484(state_p0, thing_p1) { + var Temporary1; + + state_p0.shown = true; + state_p0.error = nimCopy(state_p0.error, none__addcategorymodal_u322(), NTI1946157155); + state_p0.kind = 2; + var Temporary1 = state_p0; + if (ConstSet101[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'thread\' is not accessible for type \'DeleteModal\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI2164260867)); } + Temporary1.thread = nimCopy(Temporary1.thread, thing_p1, NTI1593835523); + + +} + +function show__postlist_u1522(state_p0, thing_p1) { + var Temporary1; + + state_p0.shown = true; + state_p0.error = nimCopy(state_p0.error, none__addcategorymodal_u322(), NTI1946157155); + state_p0.kind = 1; + var Temporary1 = state_p0; + if (ConstSet102[Temporary1.kind]===undefined) { raiseFieldError2(makeNimstrLit("field \'post\' is not accessible for type \'DeleteModal\' using \'kind = "), reprDiscriminant(Temporary1.kind, NTI2164260867)); } + Temporary1.post = thing_p1; + + +} + +function onDeleteClick__postlist_u1467(e_p0, n_p1, p_p2) { + var Temporary1; + + var list_2063599051 = (Temporary1 = get__postlist_u293(state_2063597821[0].list), Temporary1)[0][Temporary1[1]]; + if ((list_2063599051.posts[chckIndx(0, 0, (list_2063599051.posts).length - 1)].id == p_p2.id)) { + show__postlist_u1484(state_2063597821[0].deleteModal, list_2063599051.thread); + } + else { + show__postlist_u1522(state_2063597821[0].deleteModal, p_p2); + } + + + +} + +function isLikedBy__post_u111(post_p0, user_p1) { + var result_2097152115 = false; + + BeforeRet: { + if (isNone__user_u60(user_p1)) { + result_2097152115 = false; + break BeforeRet; + } + + Label1: { + var u_2097152125 = ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}); + var i_637535101 = 0; + var L_637535102 = (post_p0.likes).length; + Label2: { + Label3: while (true) { + if (!(i_637535101 < L_637535102)) break Label3; + u_2097152125 = post_p0.likes[chckIndx(i_637535101, 0, (post_p0.likes).length - 1)]; + if (eqStrings(u_2097152125.name, get__user_u53(user_p1).name)) { + result_2097152115 = true; + break BeforeRet; + } + + i_637535101 += 1; + if (!(((post_p0.likes).length == L_637535102))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + result_2097152115 = false; + break BeforeRet; + }; + + return result_2097152115; + +} + +function onPost__postbutton_u213(httpStatus_p0, response_p1, state_p2, post_p3, user_p4) { + state_p2.loading = false; + var statusHEX60gensym1_2147483870 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym1_2147483870 == 200)) { + if (isLikedBy__post_u111(post_p3, some__postbutton_u223(user_p4))) { + var newLikes_2147483926 = []; + Label1: { + var like_2147483930 = ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}); + var i_637535105 = 0; + var L_637535106 = (post_p3.likes).length; + Label2: { + Label3: while (true) { + if (!(i_637535105 < L_637535106)) break Label3; + like_2147483930 = post_p3.likes[chckIndx(i_637535105, 0, (post_p3.likes).length - 1)]; + if (!(eqStrings(like_2147483930.name, user_p4.name))) { + var Temporary4 = nimCopy(null, like_2147483930, NTI1929379844); + newLikes_2147483926.push(Temporary4);; + } + + i_637535105 += 1; + if (!(((post_p3.likes).length == L_637535106))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + post_p3.likes = nimCopy(null, newLikes_2147483926, NTI2147483841); + } + else { + var Temporary5 = nimCopy(null, user_p4, NTI1929379844); + post_p3.likes.push(Temporary5);; + } + + } + else { +++excHandler; + try { + var parsedHEX60gensym1_2147483939 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym1_2147483945 = to__addcategorymodal_u215(parsedHEX60gensym1_2147483939); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym1_2147483945), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onClick__postbutton_u324(ev_p0, n_p1, state_p2, post_p3, currentUser_p4) { + var Temporary1; + currentUser_p4 = nimCopy(null, currentUser_p4, NTI1929379857); + +function HEX3Aanonymous__postbutton_u374(s_p0, r_p1) { + onPost__postbutton_u213(s_p0, r_p1, state_p2, post_p3, get__user_u53(currentUser_p4)); + + + } + + BeforeRet: { + if (state_p2.loading) { + break BeforeRet; + } + + if (isNone__user_u60(currentUser_p4)) { + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({message: [78,111,116,32,108,111,103,103,101,100,32,105,110,46], errorFields: []}), NTI1946157155); + break BeforeRet; + } + + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + var formData_2147484012 = new FormData(); + formData_2147484012.append("id", toJSStr(HEX24__systemZdollars_u14(post_p3.id))); + if (isLikedBy__post_u111(post_p3, currentUser_p4)) { + Temporary1 = makeUri__karaxutils_u123([47,117,110,108,105,107,101], [], [47], false, true); + } + else { + Temporary1 = makeUri__karaxutils_u123([47,108,105,107,101], [], [47], false, true); + } + + var uri_2147484013 = nimCopy(null, Temporary1, NTI33554449); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2147484013), [], (formData_2147484012), HEX3Aanonymous__postbutton_u374, true, kxi__); + ev_p0.preventDefault(); + }; + + +} + +function nsuJoinSep(a_p0, sep_p1) { + var result_1124075054 = []; + + if ((0 < (a_p0).length)) { + var L_1124075061 = mulInt((sep_p1).length, subInt((a_p0).length, 1)); + Label1: { + var i_1124075069 = 0; + var colontmp__637535109 = 0; + colontmp__637535109 = (a_p0).length - 1; + var res_637535110 = 0; + Label2: { + Label3: while (true) { + if (!(res_637535110 <= colontmp__637535109)) break Label3; + i_1124075069 = res_637535110; + L_1124075061 = addInt(L_1124075061, (a_p0[chckIndx(i_1124075069, 0, (a_p0).length - 1)]).length); + res_637535110 = addInt(res_637535110, 1); + } + }; + }; + result_1124075054 = nimCopy(null, mnewString(0), NTI33554449); + nimAddStrStr(result_1124075054, a_p0[chckIndx(0, 0, (a_p0).length - 1)]);; + Label4: { + var i_1124075082 = 0; + var colontmp__637535113 = 0; + colontmp__637535113 = (a_p0).length - 1; + var res_637535114 = 1; + Label5: { + Label6: while (true) { + if (!(res_637535114 <= colontmp__637535113)) break Label6; + i_1124075082 = res_637535114; + nimAddStrStr(result_1124075054, sep_p1);; + nimAddStrStr(result_1124075054, a_p0[chckIndx(i_1124075082, 0, (a_p0).length - 1)]);; + res_637535114 = addInt(res_637535114, 1); + } + }; + }; + } + else { + result_1124075054 = nimCopy(null, [], NTI33554449); + } + + + return result_1124075054; + +} + +function map__postbutton_u464(s_p0, op_p1) { + var result_2147484118 = []; + + result_2147484118 = new Array(chckRange((s_p0).length, 0, 2147483647)); for (var i = 0 ; i < chckRange((s_p0).length, 0, 2147483647) ; ++i) { result_2147484118[i] = []; } Label1: { + var i_2147484134 = 0; + var colontmp__637535117 = 0; + colontmp__637535117 = (s_p0).length; + var i_637535118 = 0; + Label2: { + Label3: while (true) { + if (!(i_637535118 < colontmp__637535117)) break Label3; + i_2147484134 = i_637535118; + result_2147484118[chckIndx(i_2147484134, 0, (result_2147484118).length - 1)] = nimCopy(null, op_p1(s_p0[chckIndx(i_2147484134, 0, (s_p0).length - 1)]), NTI33554449); + i_637535118 = addInt(i_637535118, 1); + } + }; + }; + + return result_2147484118; + +} + +function render__postbutton_u390(state_p0, post_p1, currentUser_p2) { + var Temporary1; + currentUser_p2 = nimCopy(null, currentUser_p2, NTI1929379857); + +function HEX3Aanonymous__postbutton_u426(e_p0, n_p1) { + onClick__postbutton_u324(e_p0, n_p1, state_p0, post_p1, currentUser_p2); + + + } + +function HEX3Aanonymous__postbutton_u430(e_p0, n_p1) { + state_p0.error = nimCopy(state_p0.error, none__addcategorymodal_u322(), NTI1946157155); + + + } + +function HEX3Aanonymous__postbutton_u455(x_p0) { + var result_2147484110 = []; + + result_2147484110 = nimCopy(null, x_p0.name, NTI33554449); + + return result_2147484110; + + } + + var result_2147484043 = null; + + var liked_2147484044 = isLikedBy__post_u111(post_p1, currentUser_p2); + if (isSome__replybox_u489(state_p0.error)) { + Temporary1 = get__replybox_u503(state_p0.error).message; + } + else { + Temporary1 = []; + } + + var tooltip_2147484063 = nimCopy(null, Temporary1, NTI33554449); + var tmp_2147484064 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2147484064.class = "like-button"; + var tmp_2147484065 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2147484065.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [116,111,111,108,116,105,112], Field1: isSome__replybox_u489(state_p0.error)}, NTI2147483996)], [98,116,110])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2147484065, 0, HEX3Aanonymous__postbutton_u426, kxi__); + setAttr__pkgZkaraxZvdom_u713(tmp_2147484065, "data-tooltip", toJSStr(tooltip_2147484063)); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2147484065, 12, HEX3Aanonymous__postbutton_u430, kxi__); + if ((0 < (post_p1.likes).length)) { + var names_2147484135 = nsuJoinSep(map__postbutton_u464(post_p1.likes, HEX3Aanonymous__postbutton_u455), [44,32]); + var tmp_2147484066 = tree__pkgZkaraxZvdom_u880(71, []); + tmp_2147484066.class = "like-count tooltip"; + setAttr__pkgZkaraxZvdom_u713(tmp_2147484066, "data-tooltip", toJSStr(names_2147484135)); + add__pkgZkaraxZvdom_u794(tmp_2147484066, text__pkgZkaraxZvdom_u948(HEX24__systemZdollars_u14((post_p1.likes).length))); + add__pkgZkaraxZvdom_u794(tmp_2147484065, tmp_2147484066); + } + + var tmp_2147484067 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2147484067.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [102,97,114], Field1: !(liked_2147484044)}, NTI2147484076), nimCopy(null, {Field0: [102,97,115], Field1: liked_2147484044}, NTI2147484076)], [102,97,45,104,101,97,114,116])); + add__pkgZkaraxZvdom_u794(tmp_2147484065, tmp_2147484067); + add__pkgZkaraxZvdom_u794(tmp_2147484064, tmp_2147484065); + result_2147484043 = tmp_2147484064; + + return result_2147484043; + +} + +function performScroll__replybox_u99() { + var replyBox_2113929316 = document.getElementById("reply-box"); + replyBox_2113929316.scrollIntoView(); + + +} + +function show__replybox_u101(state_p0) { + if (!(state_p0.shown)) { + (window.setTimeout(performScroll__replybox_u99, 50)); + } + else { + performScroll__replybox_u99(); + } + + state_p0.shown = true; + + +} + +function onReplyClick__postlist_u1397(e_p0, n_p1, p_p2) { + state_2063597821[0].replyingTo = nimCopy(state_2063597821[0].replyingTo, p_p2, NTI2113929478); + show__replybox_u101(state_2063597821[0].replyBox); + + +} + +function genPostButtons__postlist_u1610(post_p0, currentUser_p1) { + var Temporary1; + +function HEX3Aanonymous__postlist_u1718(e_p0, n_p1) { + onEditClick__postlist_u1402(e_p0, n_p1, post_p0); + + + } + +function HEX3Aanonymous__postlist_u1722(e_p0, n_p1) { + onDeleteClick__postlist_u1467(e_p0, n_p1, post_p0); + + + } + +function HEX3Aanonymous__postlist_u1726(e_p0, n_p1) { + onReplyClick__postlist_u1397(e_p0, n_p1, some__postlist_u1406(post_p0)); + + + } + + var result_2063599182 = null; + + BeforeRet: { + var loggedIn_2063599189 = isSome__user_u39(currentUser_p1); + var authoredByUser_2063599202 = (loggedIn_2063599189 && eqStrings(get__user_u53(currentUser_p1).name, post_p0.author.name)); + var currentAdmin_2063599225 = (isSome__user_u39(currentUser_p1) && (get__user_u53(currentUser_p1).rank == 8)); + if ((isSome__replybox_u332(state_2063597821[0].editing) && ((Temporary1 = get__postlist_u1673(state_2063597821[0].editing), Temporary1)[0][Temporary1[1]] == post_p0))) { + var tmp_2063599272 = tree__pkgZkaraxZvdom_u880(44, []); + result_2063599182 = tmp_2063599272; + break BeforeRet; + } + + var tmp_2063599273 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599273.class = "post-buttons"; + if ((authoredByUser_2063599202 || currentAdmin_2063599225)) { + var tmp_2063599274 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599274.class = "edit-button"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2063599274, 0, HEX3Aanonymous__postlist_u1718, kxi__); + var tmp_2063599275 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2063599275.class = "btn"; + var tmp_2063599276 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599276.class = "far fa-edit"; + add__pkgZkaraxZvdom_u794(tmp_2063599275, tmp_2063599276); + add__pkgZkaraxZvdom_u794(tmp_2063599274, tmp_2063599275); + add__pkgZkaraxZvdom_u794(tmp_2063599273, tmp_2063599274); + var tmp_2063599277 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599277.class = "delete-button"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2063599277, 0, HEX3Aanonymous__postlist_u1722, kxi__); + var tmp_2063599278 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2063599278.class = "btn"; + var tmp_2063599279 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599279.class = "far fa-trash-alt"; + add__pkgZkaraxZvdom_u794(tmp_2063599278, tmp_2063599279); + add__pkgZkaraxZvdom_u794(tmp_2063599277, tmp_2063599278); + add__pkgZkaraxZvdom_u794(tmp_2063599273, tmp_2063599277); + } + + add__pkgZkaraxZvdom_u794(tmp_2063599273, render__postbutton_u390(state_2063597821[0].likeButton, post_p0, currentUser_p1)); + if (loggedIn_2063599189) { + var tmp_2063599280 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599280.class = "flag-button"; + var tmp_2063599281 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2063599281.class = "btn"; + var tmp_2063599282 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599282.class = "far fa-flag"; + add__pkgZkaraxZvdom_u794(tmp_2063599281, tmp_2063599282); + add__pkgZkaraxZvdom_u794(tmp_2063599280, tmp_2063599281); + add__pkgZkaraxZvdom_u794(tmp_2063599273, tmp_2063599280); + var tmp_2063599283 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599283.class = "reply-button"; + var tmp_2063599284 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2063599284.class = "btn"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2063599284, 0, HEX3Aanonymous__postlist_u1726, kxi__); + var tmp_2063599285 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599285.class = "fas fa-reply"; + add__pkgZkaraxZvdom_u794(tmp_2063599284, tmp_2063599285); + add__pkgZkaraxZvdom_u794(tmp_2063599284, text__pkgZkaraxZvdom_u948([32,82,101,112,108,121])); + add__pkgZkaraxZvdom_u794(tmp_2063599283, tmp_2063599284); + add__pkgZkaraxZvdom_u794(tmp_2063599273, tmp_2063599283); + } + + result_2063599182 = tmp_2063599273; + }; + + return result_2063599182; + +} + +function genPost__postlist_u1733(post_p0, thread_p1, currentUser_p2, highlight_p3) { + var Temporary1; + var Temporary2; + + var result_2063599307 = null; + + var postCopy_2063599308 = post_p0; + var originalPost_2063599309 = HEX3DHEX3D__user_u87(thread_p1.author, post_p0.author); + var tmp_2063599310 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599310.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [104,105,103,104,108,105,103,104,116], Field1: highlight_p3}, NTI2063598914), nimCopy(null, {Field0: [111,114,105,103,105,110,97,108,45,112,111,115,116], Field1: originalPost_2063599309}, NTI2063598914)], [112,111,115,116])); + tmp_2063599310.id = toJSStr(HEX24__systemZdollars_u14(post_p0.id)); + var tmp_2063599311 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599311.class = "post-icon"; + add__pkgZkaraxZvdom_u794(tmp_2063599311, render__user_u117(post_p0.author, [112,111,115,116,45,97,118,97,116,97,114], false)); + add__pkgZkaraxZvdom_u794(tmp_2063599310, tmp_2063599311); + var tmp_2063599312 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599312.class = "post-main"; + var tmp_2063599313 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599313.class = "post-title"; + var tmp_2063599314 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599314.class = "post-username"; + add__pkgZkaraxZvdom_u794(tmp_2063599314, text__pkgZkaraxZvdom_u948(post_p0.author.name)); + add__pkgZkaraxZvdom_u794(tmp_2063599314, renderUserRank__user_u146(post_p0.author)); + add__pkgZkaraxZvdom_u794(tmp_2063599313, tmp_2063599314); + var tmp_2063599315 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599315.class = "post-metadata"; + if (isSome__postlist_u1759(post_p0.replyingTo)) { + var replyingTo_2063599344 = nimCopy(null, get__postlist_u838(post_p0.replyingTo), NTI2097152005); + var tmp_2063599316 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599316.class = "post-replyingTo"; + var tmp_2063599317 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2063599317, "href", toJSStr(renderPostUrl__post_u157(replyingTo_2063599344))); + var tmp_2063599318 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599318.class = "fas fa-reply"; + add__pkgZkaraxZvdom_u794(tmp_2063599317, tmp_2063599318); + add__pkgZkaraxZvdom_u794(tmp_2063599316, tmp_2063599317); + add__pkgZkaraxZvdom_u794(tmp_2063599316, renderUserMention__user_u142(get__user_u53(replyingTo_2063599344.author))); + add__pkgZkaraxZvdom_u794(tmp_2063599315, tmp_2063599316); + } + + if ((0 < (post_p0.history).length)) { + var title_2063599370 = format__postlist_u1796(local__pureZtimes_u1853(fromUnix__pureZtimes_u1193(lastEdit__post_u28(post_p0).creation))); + var tmp_2063599319 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599319.class = "post-history"; + setAttr__pkgZkaraxZvdom_u713(tmp_2063599319, "title", toJSStr(title_2063599370)); + var tmp_2063599320 = tree__pkgZkaraxZvdom_u880(71, []); + tmp_2063599320.class = "edit-count"; + add__pkgZkaraxZvdom_u794(tmp_2063599320, text__pkgZkaraxZvdom_u948(HEX24__systemZdollars_u14((post_p0.history).length))); + add__pkgZkaraxZvdom_u794(tmp_2063599319, tmp_2063599320); + var tmp_2063599321 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599321.class = "fas fa-pencil-alt"; + add__pkgZkaraxZvdom_u794(tmp_2063599319, tmp_2063599321); + add__pkgZkaraxZvdom_u794(tmp_2063599315, tmp_2063599319); + } + + var title_2063599380 = format__postlist_u1806(local__pureZtimes_u1853(fromUnix__pureZtimes_u1193(post_p0.info.creation))); + var tmp_2063599322 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2063599322, "href", toJSStr(renderPostUrl__post_u153(post_p0, thread_p1))); + setAttr__pkgZkaraxZvdom_u713(tmp_2063599322, "title", toJSStr(title_2063599380)); + add__pkgZkaraxZvdom_u794(tmp_2063599322, text__pkgZkaraxZvdom_u948(renderActivity__threadlist_u205(post_p0.info.creation))); + add__pkgZkaraxZvdom_u794(tmp_2063599315, tmp_2063599322); + add__pkgZkaraxZvdom_u794(tmp_2063599313, tmp_2063599315); + add__pkgZkaraxZvdom_u794(tmp_2063599312, tmp_2063599313); + var tmp_2063599323 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599323.class = "post-content"; + if ((isSome__replybox_u332(state_2063597821[0].editing) && ((Temporary1 = get__postlist_u1673(state_2063597821[0].editing), Temporary1)[0][Temporary1[1]] == post_p0))) { + add__pkgZkaraxZvdom_u794(tmp_2063599323, render__editbox_u219(state_2063597821[0].editBox, postCopy_2063599308)); + } + else { + if ((0 < (post_p0.history).length)) { + Temporary2 = lastEdit__post_u28(post_p0).content; + } + else { + Temporary2 = post_p0.info.content; + } + + var content_2063599409 = nimCopy(null, Temporary2, NTI33554449); + add__pkgZkaraxZvdom_u794(tmp_2063599323, verbatim__pkgZkaraxZvdom_u954(content_2063599409)); + } + + add__pkgZkaraxZvdom_u794(tmp_2063599312, tmp_2063599323); + add__pkgZkaraxZvdom_u794(tmp_2063599312, genPostButtons__postlist_u1610(postCopy_2063599308, currentUser_p2)); + add__pkgZkaraxZvdom_u794(tmp_2063599310, tmp_2063599312); + result_2063599307 = tmp_2063599310; + + return result_2063599307; + +} + +function onPost__postbutton_u563(httpStatus_p0, response_p1, state_p2, thread_p3) { + state_p2.loading = false; + var statusHEX60gensym4_2147484219 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym4_2147484219 == 200)) { + thread_p3.isLocked = !(thread_p3.isLocked); + } + else { +++excHandler; + try { + var parsedHEX60gensym4_2147484220 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym4_2147484226 = to__addcategorymodal_u215(parsedHEX60gensym4_2147484220); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym4_2147484226), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onLockClick__postbutton_u589(ev_p0, n_p1, state_p2, thread_p3) { + var Temporary1; + +function HEX3Aanonymous__postbutton_u619(s_p0, r_p1) { + onPost__postbutton_u563(s_p0, r_p1, state_p2, thread_p3); + + + } + + BeforeRet: { + if (state_p2.loading) { + break BeforeRet; + } + + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + var formData_2147484257 = new FormData(); + formData_2147484257.append("id", toJSStr(HEX24__systemZdollars_u14(thread_p3.id))); + if (thread_p3.isLocked) { + Temporary1 = makeUri__karaxutils_u123([47,117,110,108,111,99,107], [], [47], false, true); + } + else { + Temporary1 = makeUri__karaxutils_u123([47,108,111,99,107], [], [47], false, true); + } + + var uri_2147484258 = nimCopy(null, Temporary1, NTI33554449); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2147484258), [], (formData_2147484257), HEX3Aanonymous__postbutton_u619, true, kxi__); + ev_p0.preventDefault(); + }; + + +} + +function render__postbutton_u623(state_p0, thread_p1, currentUser_p2) { + var Temporary1; + +function HEX3Aanonymous__postbutton_u674(e_p0, n_p1) { + onLockClick__postbutton_u589(e_p0, n_p1, state_p0, thread_p1); + + + } + +function HEX3Aanonymous__postbutton_u678(e_p0, n_p1) { + state_p0.error = nimCopy(state_p0.error, none__addcategorymodal_u322(), NTI1946157155); + + + } + + var result_2147484276 = null; + + BeforeRet: { + if ((isNone__user_u60(currentUser_p2) || (get__user_u53(currentUser_p2).rank < 7))) { + var tmp_2147484299 = tree__pkgZkaraxZvdom_u880(44, []); + result_2147484276 = tmp_2147484299; + break BeforeRet; + } + + if (isSome__replybox_u489(state_p0.error)) { + Temporary1 = get__replybox_u503(state_p0.error).message; + } + else { + Temporary1 = []; + } + + var tooltip_2147484318 = nimCopy(null, Temporary1, NTI33554449); + var tmp_2147484319 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2147484319.class = "btn btn-secondary"; + tmp_2147484319.id = "lock-btn"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2147484319, 0, HEX3Aanonymous__postbutton_u674, kxi__); + setAttr__pkgZkaraxZvdom_u713(tmp_2147484319, "data-tooltip", toJSStr(tooltip_2147484318)); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2147484319, 12, HEX3Aanonymous__postbutton_u678, kxi__); + if (thread_p1.isLocked) { + var tmp_2147484320 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2147484320.class = "fas fa-unlock-alt"; + add__pkgZkaraxZvdom_u794(tmp_2147484319, tmp_2147484320); + add__pkgZkaraxZvdom_u794(tmp_2147484319, text__pkgZkaraxZvdom_u948([32,85,110,108,111,99,107,32,84,104,114,101,97,100])); + } + else { + var tmp_2147484321 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2147484321.class = "fas fa-lock"; + add__pkgZkaraxZvdom_u794(tmp_2147484319, tmp_2147484321); + add__pkgZkaraxZvdom_u794(tmp_2147484319, text__pkgZkaraxZvdom_u948([32,76,111,99,107,32,84,104,114,101,97,100])); + } + + result_2147484276 = tmp_2147484319; + }; + + return result_2147484276; + +} + +function onPost__postbutton_u739(httpStatus_p0, response_p1, state_p2, thread_p3) { + state_p2.loading = false; + var statusHEX60gensym5_2147484395 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym5_2147484395 == 200)) { + thread_p3.isPinned = !(thread_p3.isPinned); + } + else { +++excHandler; + try { + var parsedHEX60gensym5_2147484396 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym5_2147484402 = to__addcategorymodal_u215(parsedHEX60gensym5_2147484396); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym5_2147484402), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onPinClick__postbutton_u765(ev_p0, n_p1, state_p2, thread_p3) { + var Temporary1; + +function HEX3Aanonymous__postbutton_u795(s_p0, r_p1) { + onPost__postbutton_u739(s_p0, r_p1, state_p2, thread_p3); + + + } + + BeforeRet: { + if (state_p2.loading) { + break BeforeRet; + } + + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + var formData_2147484433 = new FormData(); + formData_2147484433.append("id", toJSStr(HEX24__systemZdollars_u14(thread_p3.id))); + if (thread_p3.isPinned) { + Temporary1 = makeUri__karaxutils_u123([47,117,110,112,105,110], [], [47], false, true); + } + else { + Temporary1 = makeUri__karaxutils_u123([47,112,105,110], [], [47], false, true); + } + + var uri_2147484434 = nimCopy(null, Temporary1, NTI33554449); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2147484434), [], (formData_2147484433), HEX3Aanonymous__postbutton_u795, true, kxi__); + ev_p0.preventDefault(); + }; + + +} + +function render__postbutton_u799(state_p0, thread_p1, currentUser_p2) { + var Temporary1; + +function HEX3Aanonymous__postbutton_u850(e_p0, n_p1) { + onPinClick__postbutton_u765(e_p0, n_p1, state_p0, thread_p1); + + + } + +function HEX3Aanonymous__postbutton_u854(e_p0, n_p1) { + state_p0.error = nimCopy(state_p0.error, none__addcategorymodal_u322(), NTI1946157155); + + + } + + var result_2147484452 = null; + + BeforeRet: { + if ((isNone__user_u60(currentUser_p2) || (get__user_u53(currentUser_p2).rank < 7))) { + var tmp_2147484475 = tree__pkgZkaraxZvdom_u880(44, []); + result_2147484452 = tmp_2147484475; + break BeforeRet; + } + + if (isSome__replybox_u489(state_p0.error)) { + Temporary1 = get__replybox_u503(state_p0.error).message; + } + else { + Temporary1 = []; + } + + var tooltip_2147484494 = nimCopy(null, Temporary1, NTI33554449); + var tmp_2147484495 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2147484495.class = "btn btn-secondary"; + tmp_2147484495.id = "pin-btn"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2147484495, 0, HEX3Aanonymous__postbutton_u850, kxi__); + setAttr__pkgZkaraxZvdom_u713(tmp_2147484495, "data-tooltip", toJSStr(tooltip_2147484494)); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2147484495, 12, HEX3Aanonymous__postbutton_u854, kxi__); + if (thread_p1.isPinned) { + var tmp_2147484496 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2147484496.class = "fas fa-thumbtack"; + add__pkgZkaraxZvdom_u794(tmp_2147484495, tmp_2147484496); + add__pkgZkaraxZvdom_u794(tmp_2147484495, text__pkgZkaraxZvdom_u948([32,85,110,112,105,110,32,84,104,114,101,97,100])); + } + else { + var tmp_2147484497 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2147484497.class = "fas fa-thumbtack"; + add__pkgZkaraxZvdom_u794(tmp_2147484495, tmp_2147484497); + add__pkgZkaraxZvdom_u794(tmp_2147484495, text__pkgZkaraxZvdom_u948([32,80,105,110,32,84,104,114,101,97,100])); + } + + result_2147484452 = tmp_2147484495; + }; + + return result_2147484452; + +} + +function some__replybox_u642(val_p0) { + var result_2113929861 = ({val: ({id: 0, topic: [], category: ({id: 0, name: [], description: [], color: [], numTopics: 0}), author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), users: [], replies: 0, views: 0, activity: 0n, creation: 0n, isLocked: false, isSolved: false, isPinned: false}), has: false}); + + result_2113929861 = nimCopy(result_2113929861, {has: true, val: nimCopy(null, val_p0, NTI1593835523)}, NTI2113929572); + + return result_2113929861; + +} + +function render__replybox_u584(state_p0, thread_p1, post_p2, hasMore_p3) { + var result_2113929806 = null; + + BeforeRet: { + if (!(state_p0.shown)) { + var tmp_2113929807 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929807.id = "reply-box"; + result_2113929806 = tmp_2113929807; + break BeforeRet; + } + + var tmp_2113929808 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929808.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [110,111,45,98,111,114,100,101,114], Field1: hasMore_p3}, NTI2113929783)], [105,110,102,111,114,109,97,116,105,111,110])); + tmp_2113929808.id = "reply-box"; + var tmp_2113929809 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929809.class = "information-icon"; + var tmp_2113929810 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2113929810.class = "fas fa-reply"; + add__pkgZkaraxZvdom_u794(tmp_2113929809, tmp_2113929810); + add__pkgZkaraxZvdom_u794(tmp_2113929808, tmp_2113929809); + var tmp_2113929811 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929811.class = "information-main"; + tmp_2113929811.style = style__pkgZkaraxZvstyles_u487(185, "100%"); + var tmp_2113929812 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929812.class = "information-title"; + if (isNone__replybox_u356(post_p2)) { + Label1: { + var fmtRes_2113929828 = [mnewString(0)]; + nimAddStrStr(fmtRes_2113929828[0], [82,101,112,108,121,105,110,103,32,116,111,32,34]);; + formatValue__karaxutils_u208(fmtRes_2113929828, 0, thread_p1.topic); + nimAddStrStr(fmtRes_2113929828[0], [34]);; + }; + add__pkgZkaraxZvdom_u794(tmp_2113929812, text__pkgZkaraxZvdom_u948(fmtRes_2113929828[0])); + } + else { + add__pkgZkaraxZvdom_u794(tmp_2113929812, text__pkgZkaraxZvdom_u948([82,101,112,108,121,105,110,103,32,116,111,32])); + add__pkgZkaraxZvdom_u794(tmp_2113929812, renderUserMention__user_u142(get__replybox_u349(post_p2).author)); + var tmp_2113929813 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929813.class = "post-buttons"; + tmp_2113929813.style = style__pkgZkaraxZvstyles_u487(114, "-0.3rem"); + var tmp_2113929814 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2113929814, "href", toJSStr(renderPostUrl__post_u153(get__replybox_u349(post_p2), thread_p1))); + var tmp_2113929815 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2113929815.class = "btn"; + var tmp_2113929816 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2113929816.class = "fas fa-arrow-up"; + add__pkgZkaraxZvdom_u794(tmp_2113929815, tmp_2113929816); + add__pkgZkaraxZvdom_u794(tmp_2113929814, tmp_2113929815); + add__pkgZkaraxZvdom_u794(tmp_2113929813, tmp_2113929814); + add__pkgZkaraxZvdom_u794(tmp_2113929812, tmp_2113929813); + } + + add__pkgZkaraxZvdom_u794(tmp_2113929811, tmp_2113929812); + var tmp_2113929817 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2113929817.class = "information-content"; + add__pkgZkaraxZvdom_u794(tmp_2113929817, renderContent__replybox_u402(state_p0, some__replybox_u642(thread_p1), post_p2)); + add__pkgZkaraxZvdom_u794(tmp_2113929811, tmp_2113929817); + add__pkgZkaraxZvdom_u794(tmp_2113929808, tmp_2113929811); + result_2113929806 = tmp_2113929808; + }; + + return result_2113929806; + +} + +function renderPostList__postlist_u1894(threadId_p0, postId_p1, currentUser_p2) { + var Temporary1; + postId_p1 = nimCopy(null, postId_p1, NTI1627391017); + +function HEX3Aanonymous__postlist_u1976(s_p0, r_p1) { + onPostList__postlist_u337(s_p0, r_p1, postId_p1); + + + } + var Temporary2; + var Temporary7; + var Temporary8; + +function HEX3Aanonymous__postlist_u2208(e_p0, n_p1) { + onReplyClick__postlist_u1397(e_p0, n_p1, none__editbox_u323()); + + + } + + var result_2063599468 = null; + + BeforeRet: { + if ((isSome__postlist_u1904(state_2063597821[0].list) && !(((Temporary1 = get__postlist_u293(state_2063597821[0].list), Temporary1)[0][Temporary1[1]].thread.id == threadId_p0)))) { + state_2063597821[0].list = nimCopy(state_2063597821[0].list, none__postlist_u86(), NTI2063597582); + state_2063597821[0].status = 200; + } + + if (!((state_2063597821[0].status == 200))) { + result_2063599468 = renderError__error_u24([67,111,117,108,100,110,39,116,32,114,101,116,114,105,101,118,101,32,112,111,115,116,115,46], state_2063597821[0].status); + break BeforeRet; + } + + if (isNone__postlist_u300(state_2063597821[0].list)) { + var params_2063599516 = [nimCopy(null, {Field0: [105,100], Field1: HEX24__systemZdollars_u14(threadId_p0)}, NTI2063599143)]; + if (isSome__pureZtimes_u3701(postId_p1)) { + params_2063599516.push({Field0: [97,110,99,104,111,114], Field1: HEX24__systemZdollars_u14(get__pureZtimes_u3785(postId_p1))});; + } + + var uri_2063599539 = makeUri__karaxutils_u123([112,111,115,116,115,46,106,115,111,110], params_2063599516, [47], false, true); + if (!(state_2063597821[0].loading)) { + state_2063597821[0].loading = true; + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(uri_2063599539), [], HEX3Aanonymous__postlist_u1976, true, kxi__); + } + + var tmp_2063599548 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599548.class = "loading loading-lg"; + result_2063599468 = tmp_2063599548; + break BeforeRet; + } + + var list_2063599561 = (Temporary2 = get__postlist_u293(state_2063597821[0].list), Temporary2)[0][Temporary2[1]]; + var tmp_2063599562 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_2063599562.class = "container grid-xl"; + var tmp_2063599563 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599563.id = "thread-title"; + tmp_2063599563.class = "title"; + if (isSome__replybox_u489(state_2063597821[0].error)) { + var tmp_2063599564 = tree__pkgZkaraxZvdom_u880(71, []); + tmp_2063599564.class = "text-error"; + add__pkgZkaraxZvdom_u794(tmp_2063599564, text__pkgZkaraxZvdom_u948(get__replybox_u503(state_2063597821[0].error).message)); + add__pkgZkaraxZvdom_u794(tmp_2063599563, tmp_2063599564); + } + + var tmp_2063599565 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2063599565.class = "title-text"; + add__pkgZkaraxZvdom_u794(tmp_2063599565, text__pkgZkaraxZvdom_u948(list_2063599561.thread.topic)); + add__pkgZkaraxZvdom_u794(tmp_2063599563, tmp_2063599565); + if (list_2063599561.thread.isLocked) { + var tmp_2063599566 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599566.class = "fas fa-lock fa-xs"; + setAttr__pkgZkaraxZvdom_u713(tmp_2063599566, "title", "Thread cannot be replied to"); + add__pkgZkaraxZvdom_u794(tmp_2063599563, tmp_2063599566); + add__pkgZkaraxZvdom_u794(tmp_2063599563, text__pkgZkaraxZvdom_u948([76,111,99,107,101,100])); + } + + if (isModerated__threadlist_u26(list_2063599561.thread)) { + var tmp_2063599567 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599567.class = "fas fa-eye-slash fa-xs"; + setAttr__pkgZkaraxZvdom_u713(tmp_2063599567, "title", "Thread is moderated"); + add__pkgZkaraxZvdom_u794(tmp_2063599563, tmp_2063599567); + add__pkgZkaraxZvdom_u794(tmp_2063599563, text__pkgZkaraxZvdom_u948([77,111,100,101,114,97,116,101,100])); + } + + if (list_2063599561.thread.isSolved) { + var tmp_2063599568 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599568.class = "fas fa-check-square fa-xs"; + setAttr__pkgZkaraxZvdom_u713(tmp_2063599568, "title", "Thread has a solution"); + add__pkgZkaraxZvdom_u794(tmp_2063599563, tmp_2063599568); + add__pkgZkaraxZvdom_u794(tmp_2063599563, text__pkgZkaraxZvdom_u948([83,111,108,118,101,100])); + } + + add__pkgZkaraxZvdom_u794(tmp_2063599563, genCategories__postlist_u1567(list_2063599561.thread, currentUser_p2)); + add__pkgZkaraxZvdom_u794(tmp_2063599562, tmp_2063599563); + var tmp_2063599569 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599569.class = "posts"; + var prevPost_2063599612 = [none__editbox_u323()]; + Label3: { + var i_2063599653 = 0; + var post_2063599654 = null; + var i_637535097 = 0; + var L_637535098 = (list_2063599561.posts).length; + Label4: { + Label5: while (true) { + if (!(i_637535097 < L_637535098)) break Label5; + i_2063599653 = i_637535097; + post_2063599654 = list_2063599561.posts[chckIndx(i_637535097, 0, (list_2063599561.posts).length - 1)]; + Label6: { + if (!(visibleTo__postlist_u2087(post_2063599654, currentUser_p2))) { + break Label6; + } + + if (isSome__replybox_u332(prevPost_2063599612[0])) { + add__pkgZkaraxZvdom_u794(tmp_2063599569, genTimePassed__postlist_u1842((Temporary7 = get__postlist_u1673(prevPost_2063599612[0]), Temporary7)[0][Temporary7[1]], some__postlist_u1406(post_2063599654), false)); + } + + if ((0 < (post_2063599654.moreBefore).length)) { + add__pkgZkaraxZvdom_u794(tmp_2063599569, genLoadMore__postlist_u1549(post_2063599654, i_2063599653)); + } + + var highlight_2063599740 = (isSome__pureZtimes_u3701(postId_p1) && (get__pureZtimes_u3785(postId_p1) == post_2063599654.id)); + add__pkgZkaraxZvdom_u794(tmp_2063599569, genPost__postlist_u1733(post_2063599654, list_2063599561.thread, currentUser_p2, highlight_2063599740)); + prevPost_2063599612[0] = nimCopy(prevPost_2063599612[0], some__postlist_u1406(post_2063599654), NTI2113929478); + }; + i_637535097 += 1; + if (!(((list_2063599561.posts).length == L_637535098))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(187, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + if (isSome__replybox_u332(prevPost_2063599612[0])) { + add__pkgZkaraxZvdom_u794(tmp_2063599569, genTimePassed__postlist_u1842((Temporary8 = get__postlist_u1673(prevPost_2063599612[0]), Temporary8)[0][Temporary8[1]], none__editbox_u323(), true)); + } + + var tmp_2063599570 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2063599570.id = "thread-buttons"; + var tmp_2063599571 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2063599571.class = "btn btn-secondary"; + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2063599571, 0, HEX3Aanonymous__postlist_u2208, kxi__); + var tmp_2063599572 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_2063599572.class = "fas fa-reply"; + add__pkgZkaraxZvdom_u794(tmp_2063599571, tmp_2063599572); + add__pkgZkaraxZvdom_u794(tmp_2063599571, text__pkgZkaraxZvdom_u948([32,82,101,112,108,121])); + add__pkgZkaraxZvdom_u794(tmp_2063599570, tmp_2063599571); + add__pkgZkaraxZvdom_u794(tmp_2063599570, render__postbutton_u623(state_2063597821[0].lockButton, list_2063599561.thread, currentUser_p2)); + add__pkgZkaraxZvdom_u794(tmp_2063599570, render__postbutton_u799(state_2063597821[0].pinButton, list_2063599561.thread, currentUser_p2)); + add__pkgZkaraxZvdom_u794(tmp_2063599569, tmp_2063599570); + add__pkgZkaraxZvdom_u794(tmp_2063599569, render__replybox_u584(state_2063597821[0].replyBox, list_2063599561.thread, state_2063597821[0].replyingTo, false)); + add__pkgZkaraxZvdom_u794(tmp_2063599569, render__delete_u278(state_2063597821[0].deleteModal)); + add__pkgZkaraxZvdom_u794(tmp_2063599562, tmp_2063599569); + result_2063599468 = tmp_2063599562; + }; + + return result_2063599468; + +} + +function none__forum_u485() { + var result_637534695 = ({val: 0, has: false}); + + result_637534695 = nimCopy(result_637534695, none__mainbuttons_u76(), NTI1627391017); + + return result_637534695; + +} + +function onContent__about_u56(status_p0, response_p1, state_p2) { + state_p2.status = chckRange(status_p0, 0, 599); + state_p2.content = response_p1; + + +} + +function render__about_u60(state_p0, page_p1) { + +function HEX3Aanonymous__about_u69(s_p0, r_p1) { + onContent__about_u56(s_p0, r_p1, state_p0); + + + } + + var result_2365587519 = null; + + BeforeRet: { + if (!((state_p0.status == 200))) { + result_2365587519 = renderError__error_u24(cstrToNimstr(state_p0.content), state_p0.status); + break BeforeRet; + } + + if (!(eqStrings(page_p1, state_p0.page))) { + if (!(state_p0.loading)) { + state_p0.page = nimCopy(null, page_p1, NTI33554449); + state_p0.loading = true; + state_p0.status = 200; + var uri_2365587520 = makeUri__karaxutils_u123(([47,97,98,111,117,116,47]).concat(page_p1,[46,104,116,109,108]), [], [47], false, true); + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(uri_2365587520), [], HEX3Aanonymous__about_u69, true, kxi__); + } + + var tmp_2365587529 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2365587529.class = "loading"; + result_2365587519 = tmp_2365587529; + break BeforeRet; + } + + var tmp_2365587530 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_2365587530.class = "container grid-xl"; + var tmp_2365587531 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2365587531.class = "about"; + add__pkgZkaraxZvdom_u794(tmp_2365587531, verbatim__pkgZkaraxZvdom_u957(state_p0.content)); + add__pkgZkaraxZvdom_u794(tmp_2365587530, tmp_2365587531); + result_2365587519 = tmp_2365587530; + }; + + return result_2365587519; + +} + +function renderMessage__error_u36(message_p0, submessage_p1, icon_p2) { + var result_1946157096 = null; + + var tmp_1946157097 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1946157097.class = "empty error"; + var tmp_1946157098 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_1946157098.class = "empty icon"; + var tmp_1946157099 = tree__pkgZkaraxZvdom_u880(62, []); + tmp_1946157099.class = toJSStr(([102,97,115,32]).concat(icon_p2,[32,102,97,45,53,120])); + add__pkgZkaraxZvdom_u794(tmp_1946157098, tmp_1946157099); + add__pkgZkaraxZvdom_u794(tmp_1946157097, tmp_1946157098); + var tmp_1946157100 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_1946157100.class = "empty-title h5"; + add__pkgZkaraxZvdom_u794(tmp_1946157100, text__pkgZkaraxZvdom_u948(message_p0)); + add__pkgZkaraxZvdom_u794(tmp_1946157097, tmp_1946157100); + var tmp_1946157101 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_1946157101.class = "empty-subtitle"; + add__pkgZkaraxZvdom_u794(tmp_1946157101, text__pkgZkaraxZvdom_u948(submessage_p1)); + add__pkgZkaraxZvdom_u794(tmp_1946157097, tmp_1946157101); + result_1946157096 = tmp_1946157097; + + return result_1946157096; + +} + +function onPost__activateemail_u60(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym0_2399141955 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym0_2399141955 == 200)) { + navigateTo__karaxutils_u142(toJSStr(makeUri__karaxutils_u123([47,97,99,116,105,118,97,116,101,69,109,97,105,108,47,115,117,99,99,101,115,115], [], [47], false, true))); + } + else { +++excHandler; + try { + var parsedHEX60gensym0_2399141956 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym0_2399141962 = to__addcategorymodal_u215(parsedHEX60gensym0_2399141956); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym0_2399141962), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onSetClick__activateemail_u85(ev_p0, n_p1, state_p2) { + +function HEX3Aanonymous__activateemail_u109(s_p0, r_p1) { + onPost__activateemail_u60(s_p0, r_p1, state_p2); + + + } + + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + var uri_2399141992 = makeUri__karaxutils_u93([97,99,116,105,118,97,116,101,69,109,97,105,108], [47], false, cstrToNimstr(window.location.search)); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2399141992), [], "", HEX3Aanonymous__activateemail_u109, true, kxi__); + + +} + +function render__activateemail_u113(state_p0) { + +function HEX3Aanonymous__activateemail_u123(ev_p0, n_p1) { + onSetClick__activateemail_u85(ev_p0, n_p1, state_p0); + + + } + + var result_2399142003 = null; + + var tmp_2399142004 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_2399142004.class = "container grid-xl"; + var tmp_2399142005 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2399142005.id = "activateemail"; + var tmp_2399142006 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2399142006.class = "title"; + var tmp_2399142007 = tree__pkgZkaraxZvdom_u880(32, []); + add__pkgZkaraxZvdom_u794(tmp_2399142007, text__pkgZkaraxZvdom_u948([65,99,116,105,118,97,116,101,32,69,109,97,105,108])); + add__pkgZkaraxZvdom_u794(tmp_2399142006, tmp_2399142007); + add__pkgZkaraxZvdom_u794(tmp_2399142005, tmp_2399142006); + var tmp_2399142008 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2399142008.class = "content"; + var tmp_2399142009 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2399142009.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [108,111,97,100,105,110,103], Field1: state_p0.loading}, NTI2399142003)], [98,116,110,32,98,116,110,45,112,114,105,109,97,114,121])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2399142009, 0, HEX3Aanonymous__activateemail_u123, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2399142009, text__pkgZkaraxZvdom_u948([65,99,116,105,118,97,116,101])); + add__pkgZkaraxZvdom_u794(tmp_2399142008, tmp_2399142009); + if (isSome__replybox_u489(state_p0.error)) { + var tmp_2399142010 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2399142010.class = "text-error"; + add__pkgZkaraxZvdom_u794(tmp_2399142010, text__pkgZkaraxZvdom_u948(get__replybox_u503(state_p0.error).message)); + add__pkgZkaraxZvdom_u794(tmp_2399142008, tmp_2399142010); + } + + add__pkgZkaraxZvdom_u794(tmp_2399142005, tmp_2399142008); + add__pkgZkaraxZvdom_u794(tmp_2399142004, tmp_2399142005); + result_2399142003 = tmp_2399142004; + + return result_2399142003; + +} + +function onPassChange__resetpassword_u64(e_p0, n_p1, state_p2) { + state_p2.newPassword = value__pkgZkaraxZvdom_u416(n_p1); + + +} + +function encodeUrl__pureZuri_u58(s_p0, usePlus_p1) { + var Temporary1; + + var result_2231369789 = []; + + result_2231369789 = nimCopy(null, mnewString(0), NTI33554449); + if (usePlus_p1) { + Temporary1 = [43]; + } + else { + Temporary1 = [37,50,48]; + } + + var fromSpace_2231369794 = nimCopy(null, Temporary1, NTI33554449); + Label2: { + var c_2231369795 = 0; + var i_637535122 = 0; + var L_637535123 = (s_p0).length; + Label3: { + Label4: while (true) { + if (!(i_637535122 < L_637535123)) break Label4; + c_2231369795 = s_p0[chckIndx(i_637535122, 0, (s_p0).length - 1)]; + switch (c_2231369795) { + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 116: + case 117: + case 118: + case 119: + case 120: + case 121: + case 122: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 89: + case 90: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 45: + case 46: + case 95: + case 126: + addChar(result_2231369789, c_2231369795);; + break; + case 32: + nimAddStrStr(result_2231369789, fromSpace_2231369794);; + break; + default: + addChar(result_2231369789, 37);; + nimAddStrStr(result_2231369789, toHex__pureZstrutils_u2145(c_2231369795, 2));; + break; + } + i_637535122 += 1; + if (!(((s_p0).length == L_637535123))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(272, 11) `len(a) == L` the length of the string changed while iterating over it")); + } + + } + }; + }; + + return result_2231369789; + +} + +function onPost__resetpassword_u68(httpStatus_p0, response_p1, state_p2) { + state_p2.loading = false; + var statusHEX60gensym0_2214592587 = chckRange(httpStatus_p0, 0, 599); + if ((statusHEX60gensym0_2214592587 == 200)) { + navigateTo__karaxutils_u142(toJSStr(makeUri__karaxutils_u123([47,114,101,115,101,116,80,97,115,115,119,111,114,100,47,115,117,99,99,101,115,115], [], [47], false, true))); + } + else { +++excHandler; + try { + var parsedHEX60gensym0_2214592588 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var errorHEX60gensym0_2214592594 = to__addcategorymodal_u215(parsedHEX60gensym0_2214592588); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274(errorHEX60gensym0_2214592594), NTI1946157155); +--excHandler; +} catch (EXCEPTION) { + var prevJSError = lastJSError; + lastJSError = EXCEPTION; + --excHandler; + raiseDefect(); + rawEcho(getCurrentExceptionMsg__system_u2067()); + state_p2.error = nimCopy(state_p2.error, some__addcategorymodal_u274({errorFields: [], message: [85,110,107,110,111,119,110,32,101,114,114,111,114,32,111,99,99,117,114,114,101,100,46]}), NTI1946157155); + lastJSError = prevJSError; + } finally { + } + } + + + +} + +function onSetClick__resetpassword_u93(ev_p0, n_p1, state_p2) { + +function HEX3Aanonymous__resetpassword_u117(s_p0, r_p1) { + onPost__resetpassword_u68(s_p0, r_p1, state_p2); + + + } + + state_p2.loading = true; + state_p2.error = nimCopy(state_p2.error, none__addcategorymodal_u322(), NTI1946157155); + var uri_2214592624 = makeUri__karaxutils_u123([114,101,115,101,116,80,97,115,115,119,111,114,100], [{Field0: [110,101,119,80,97,115,115,119,111,114,100], Field1: encodeUrl__pureZuri_u58(cstrToNimstr(state_p2.newPassword), true)}], [47], false, true); + ajaxPost__pkgZkaraxZkajax_u195(toJSStr(uri_2214592624), [], "", HEX3Aanonymous__resetpassword_u117, true, kxi__); + + +} + +function render__resetpassword_u121(state_p0) { + +function HEX3Aanonymous__resetpassword_u135(e_p0, n_p1) { + onPassChange__resetpassword_u64(e_p0, n_p1, state_p0); + + + } + +function HEX3Aanonymous__resetpassword_u157(ev_p0, n_p1) { + onSetClick__resetpassword_u93(ev_p0, n_p1, state_p0); + + + } + + var result_2214592635 = null; + + BeforeRet: { + if (state_p0.loading) { + var tmp_2214592636 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592636.class = "loading"; + result_2214592635 = tmp_2214592636; + break BeforeRet; + } + + var tmp_2214592637 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_2214592637.class = "container grid-xl"; + var tmp_2214592638 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592638.id = "resetpassword"; + var tmp_2214592639 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592639.class = "title"; + var tmp_2214592640 = tree__pkgZkaraxZvdom_u880(32, []); + add__pkgZkaraxZvdom_u794(tmp_2214592640, text__pkgZkaraxZvdom_u948([82,101,115,101,116,32,80,97,115,115,119,111,114,100])); + add__pkgZkaraxZvdom_u794(tmp_2214592639, tmp_2214592640); + add__pkgZkaraxZvdom_u794(tmp_2214592638, tmp_2214592639); + var tmp_2214592641 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592641.class = "content"; + var tmp_2214592642 = tree__pkgZkaraxZvdom_u880(193, []); + tmp_2214592642.class = "form-label"; + setAttr__pkgZkaraxZvdom_u713(tmp_2214592642, "for", "password"); + add__pkgZkaraxZvdom_u794(tmp_2214592642, text__pkgZkaraxZvdom_u948([80,97,115,115,119,111,114,100])); + add__pkgZkaraxZvdom_u794(tmp_2214592641, tmp_2214592642); + var tmp_2214592643 = tree__pkgZkaraxZvdom_u880(194, []); + tmp_2214592643.class = "form-input"; + setAttr__pkgZkaraxZvdom_u713(tmp_2214592643, "type", "password"); + setAttr__pkgZkaraxZvdom_u713(tmp_2214592643, "name", "password"); + setAttr__pkgZkaraxZvdom_u713(tmp_2214592643, "placeholder", "Type your new password here"); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2214592643, 25, HEX3Aanonymous__resetpassword_u135, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2214592641, tmp_2214592643); + if (isSome__replybox_u489(state_p0.error)) { + var tmp_2214592644 = tree__pkgZkaraxZvdom_u880(32, []); + tmp_2214592644.class = "text-error"; + add__pkgZkaraxZvdom_u794(tmp_2214592644, text__pkgZkaraxZvdom_u948(get__replybox_u503(state_p0.error).message)); + add__pkgZkaraxZvdom_u794(tmp_2214592641, tmp_2214592644); + } + + add__pkgZkaraxZvdom_u794(tmp_2214592638, tmp_2214592641); + var tmp_2214592645 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2214592645.class = "footer"; + var tmp_2214592646 = tree__pkgZkaraxZvdom_u880(195, []); + tmp_2214592646.class = toJSStr(class__karaxutils_u57([nimCopy(null, {Field0: [108,111,97,100,105,110,103], Field1: state_p0.loading}, NTI2214592670)], [98,116,110,32,98,116,110,45,112,114,105,109,97,114,121])); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2214592646, 0, HEX3Aanonymous__resetpassword_u157, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2214592646, text__pkgZkaraxZvdom_u948([83,101,116,32,112,97,115,115,119,111,114,100])); + add__pkgZkaraxZvdom_u794(tmp_2214592645, tmp_2214592646); + add__pkgZkaraxZvdom_u794(tmp_2214592638, tmp_2214592645); + add__pkgZkaraxZvdom_u794(tmp_2214592637, tmp_2214592638); + result_2214592635 = tmp_2214592637; + }; + + return result_2214592635; + +} + +function isNone__search_u380(self_p0) { + var result_2415919487 = false; + + result_2415919487 = !(self_p0.has); + + return result_2415919487; + +} + +function parseEnum__search_u223(s_p0) { + var Temporary1; + + var result_2415919330 = 0; + + switch (toJSStr(nimIdentNormalize__pureZstrutils_u123(s_p0))) { + case "Threadmatch": + Temporary1 = 0; + break; + case "Postmatch": + Temporary1 = 1; + break; + default: + raiseException({message: ([73,110,118,97,108,105,100,32,101,110,117,109,32,118,97,108,117,101,58,32]).concat(s_p0), parent: null, m_type: NTI134217746, name: null, trace: [], up: null}, "ValueError"); + break; + } + result_2415919330 = Temporary1; + + return result_2415919330; + +} + +function initFromJson__search_u191(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet105[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym13_2415919312 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet106), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym13_2415919312, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + dst_p0[dst_p0_Idx] = parseEnum__search_u223(getStr__pureZjson_u241(jsonNode_p1, [])); + + +} + +function initFromJson__search_u177(dst_p0, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var originalJsonPathLen_2415919287 = (jsonPath_p2[jsonPath_p2_Idx]).length; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,107,105,110,100]);; + initFromJson__search_u191(dst_p0, "kind", getOrDefault__pureZjson_u3507(jsonNode_p1, [107,105,110,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2415919287, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2415919287, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2415919287, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,116,104,114,101,97,100,73,100]);; + initFromJson__addcategorymodal_u150(dst_p0, "threadId", getOrDefault__pureZjson_u3507(jsonNode_p1, [116,104,114,101,97,100,73,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2415919287, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2415919287, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2415919287, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,112,111,115,116,73,100]);; + initFromJson__addcategorymodal_u150(dst_p0, "postId", getOrDefault__pureZjson_u3507(jsonNode_p1, [112,111,115,116,73,100]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2415919287, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2415919287, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2415919287, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,116,104,114,101,97,100,84,105,116,108,101]);; + initFromJson__pureZjson_u5295(dst_p0, "threadTitle", getOrDefault__pureZjson_u3507(jsonNode_p1, [116,104,114,101,97,100,84,105,116,108,101]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2415919287, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2415919287, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2415919287, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,112,111,115,116,67,111,110,116,101,110,116]);; + initFromJson__pureZjson_u5295(dst_p0, "postContent", getOrDefault__pureZjson_u3507(jsonNode_p1, [112,111,115,116,67,111,110,116,101,110,116]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2415919287, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2415919287, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2415919287, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,97,117,116,104,111,114]);; + initFromJson__threadlist_u504(dst_p0.author, getOrDefault__pureZjson_u3507(jsonNode_p1, [97,117,116,104,111,114]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2415919287, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2415919287, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2415919287, 0, 2147483647); }; + nimAddStrStr(jsonPath_p2[jsonPath_p2_Idx], [46,99,114,101,97,116,105,111,110]);; + initFromJson__threadlist_u522(dst_p0, "creation", getOrDefault__pureZjson_u3507(jsonNode_p1, [99,114,101,97,116,105,111,110]), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(originalJsonPathLen_2415919287, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(originalJsonPathLen_2415919287, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(originalJsonPathLen_2415919287, 0, 2147483647); }; + + +} + +function initFromJson__search_u148(dst_p0, dst_p0_Idx, jsonNode_p1, jsonPath_p2, jsonPath_p2_Idx) { + var Temporary1; + + if (HEX3DHEX3D__pureZjson_u2100(jsonNode_p1, null)) { + raiseException({message: ([107,101,121,32,110,111,116,32,102,111,117,110,100,58,32]).concat(jsonPath_p2[jsonPath_p2_Idx]), parent: null, m_type: NTI134217747, name: null, trace: [], up: null}, "KeyError"); + } + else { + if (!((ConstSet103[jsonNode_p1.kind] != undefined))) { + var msgHEX60gensym1_2415919269 = nsuFormatOpenArray([73,110,99,111,114,114,101,99,116,32,74,83,79,78,32,107,105,110,100,46,32,87,97,110,116,101,100,32,39,36,49,39,32,105,110,32,39,36,50,39,32,98,117,116,32,103,111,116,32,39,36,51,39,46], [HEX24__pureZjson_u5374(ConstSet104), nimCopy(null, jsonPath_p2[jsonPath_p2_Idx], NTI33554449), reprEnum(jsonNode_p1.kind, NTI1644167171)]); + raiseException({message: nimCopy(null, msgHEX60gensym1_2415919269, NTI33554449), parent: null, m_type: NTI1761607688, name: null, trace: [], up: null}, "JsonKindError"); + } + } + if (dst_p0[dst_p0_Idx].length < (Temporary1 = chckRange(len__pureZjson_u3028(jsonNode_p1), 0, 2147483647), Temporary1)) { for (var i = dst_p0[dst_p0_Idx].length ; i < Temporary1 ; ++i) dst_p0[dst_p0_Idx].push(({kind: 0, threadId: 0, postId: 0, threadTitle: [], postContent: [], author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), creation: 0n})); } + else { dst_p0[dst_p0_Idx].length = Temporary1; }; + var orignalJsonPathLen_2415919275 = (jsonPath_p2[jsonPath_p2_Idx]).length; + Label2: { + var i_2415919280 = 0; + var colontmp__637535132 = 0; + colontmp__637535132 = len__pureZjson_u3028(jsonNode_p1); + var i_637535133 = 0; + Label3: { + Label4: while (true) { + if (!(i_637535133 < colontmp__637535132)) break Label4; + i_2415919280 = i_637535133; + addChar(jsonPath_p2[jsonPath_p2_Idx], 91);; + addInt__stdZprivateZdigitsutils_u241(jsonPath_p2, jsonPath_p2_Idx, i_2415919280); + addChar(jsonPath_p2[jsonPath_p2_Idx], 93);; + initFromJson__search_u177(dst_p0[dst_p0_Idx][chckIndx(i_2415919280, 0, (dst_p0[dst_p0_Idx]).length - 1)], HEX5BHEX5D__pureZjson_u3153(jsonNode_p1, i_2415919280), jsonPath_p2, jsonPath_p2_Idx); + if (jsonPath_p2[jsonPath_p2_Idx].length < chckRange(orignalJsonPathLen_2415919275, 0, 2147483647)) { for (var i = jsonPath_p2[jsonPath_p2_Idx].length; i < chckRange(orignalJsonPathLen_2415919275, 0, 2147483647); ++i) jsonPath_p2[jsonPath_p2_Idx].push(0); } + else {jsonPath_p2[jsonPath_p2_Idx].length = chckRange(orignalJsonPathLen_2415919275, 0, 2147483647); }; + i_637535133 = addInt(i_637535133, 1); + } + }; + }; + + +} + +function to__search_u136(node_p0) { + var result_2415919245 = [[]]; + + var jsonPath_2415919246 = [[]]; + result_2415919245[0] = nimCopy(null, [], NTI2415919203); + initFromJson__search_u148(result_2415919245, 0, node_p0, jsonPath_2415919246, 0); + + return result_2415919245[0]; + +} + +function some__search_u331(val_p0) { + var result_2415919438 = ({val: [], has: false}); + + result_2415919438 = nimCopy(result_2415919438, {has: true, val: nimCopy(null, val_p0, NTI2415919203)}, NTI2415919121); + + return result_2415919438; + +} + +function onList__search_u131(httpStatus_p0, response_p1, state_p2) { + BeforeRet: { + state_p2.loading = false; + state_p2.status = chckRange(httpStatus_p0, 0, 599); + if (!((state_p2.status == 200))) { + break BeforeRet; + } + + var parsed_2415919239 = parseJson__pureZjson_u5269(cstrToNimstr(response_p1)); + var list_2415919434 = to__search_u136(parsed_2415919239); + state_p2.list = nimCopy(state_p2.list, some__search_u331(list_2415919434), NTI2415919121); + }; + + +} + +function get__search_u409(self_p0) { + var result_2415919516 = null; + var result_2415919516_Idx = 0; + + BeforeRet: { + if (isNone__search_u380(self_p0)) { + raiseException({message: [67,97,110,39,116,32,111,98,116,97,105,110,32,97,32,118,97,108,117,101,32,102,114,111,109,32,97,32,96,110,111,110,101,96], parent: null, m_type: NTI771751959, name: null, trace: [], up: null}, "UnpackDefect"); + } + + result_2415919516 = self_p0; result_2415919516_Idx = "val"; + break BeforeRet; + }; + + return [result_2415919516, result_2415919516_Idx]; + +} + +function isModerated__search_u20(searchResult_p0) { + var result_2415919126 = false; + + BeforeRet: { + result_2415919126 = (searchResult_p0.author.rank <= 2); + break BeforeRet; + }; + + return result_2415919126; + +} + +function visibleTo__search_u467(thread_p0, user_p1) { + var result_2415919575 = false; + + BeforeRet: { + if (isNone__user_u60(user_p1)) { + result_2415919575 = !(isModerated__search_u20(thread_p0)); + break BeforeRet; + } + + var rank_2415919594 = get__user_u53(user_p1).rank; + if (((rank_2415919594 < 7) && isModerated__search_u20(thread_p0))) { + result_2415919575 = HEX3DHEX3D__user_u87(thread_p0.author, get__user_u53(user_p1)); + break BeforeRet; + } + + result_2415919575 = true; + break BeforeRet; + }; + + return result_2415919575; + +} + +function genSearchResult__search_u337(searchResult_p0) { + var result_2415919443 = null; + + var url_2415919444 = renderPostUrl__karaxutils_u236(searchResult_p0.threadId, searchResult_p0.postId); + var tmp_2415919445 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2415919445.class = "post"; + tmp_2415919445.id = toJSStr(HEX24__systemZdollars_u14(searchResult_p0.postId)); + var tmp_2415919446 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2415919446.class = "post-icon"; + add__pkgZkaraxZvdom_u794(tmp_2415919446, render__user_u117(searchResult_p0.author, [112,111,115,116,45,97,118,97,116,97,114], false)); + add__pkgZkaraxZvdom_u794(tmp_2415919445, tmp_2415919446); + var tmp_2415919447 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2415919447.class = "post-main"; + var tmp_2415919448 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2415919448.class = "post-title"; + var tmp_2415919449 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2415919449.class = "thread-title"; + var tmp_2415919450 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2415919450, "href", toJSStr(url_2415919444)); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2415919450, 0, anchorCB__karaxutils_u166, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2415919450, verbatim__pkgZkaraxZvdom_u954(searchResult_p0.threadTitle)); + add__pkgZkaraxZvdom_u794(tmp_2415919449, tmp_2415919450); + add__pkgZkaraxZvdom_u794(tmp_2415919448, tmp_2415919449); + var tmp_2415919451 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2415919451.class = "post-username"; + add__pkgZkaraxZvdom_u794(tmp_2415919451, text__pkgZkaraxZvdom_u948(searchResult_p0.author.name)); + add__pkgZkaraxZvdom_u794(tmp_2415919451, renderUserRank__user_u146(searchResult_p0.author)); + add__pkgZkaraxZvdom_u794(tmp_2415919448, tmp_2415919451); + var tmp_2415919452 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2415919452.class = "post-metadata"; + var title_2415919459 = format__postlist_u1806(local__pureZtimes_u1853(fromUnix__pureZtimes_u1193(searchResult_p0.creation))); + var tmp_2415919453 = tree__pkgZkaraxZvdom_u880(45, []); + setAttr__pkgZkaraxZvdom_u713(tmp_2415919453, "href", toJSStr(url_2415919444)); + setAttr__pkgZkaraxZvdom_u713(tmp_2415919453, "title", toJSStr(title_2415919459)); + addEventHandler__pkgZkaraxZkarax_u1897(tmp_2415919453, 0, anchorCB__karaxutils_u166, kxi__); + add__pkgZkaraxZvdom_u794(tmp_2415919453, text__pkgZkaraxZvdom_u948(renderActivity__threadlist_u205(searchResult_p0.creation))); + add__pkgZkaraxZvdom_u794(tmp_2415919452, tmp_2415919453); + add__pkgZkaraxZvdom_u794(tmp_2415919448, tmp_2415919452); + add__pkgZkaraxZvdom_u794(tmp_2415919447, tmp_2415919448); + var tmp_2415919454 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2415919454.class = "post-content"; + add__pkgZkaraxZvdom_u794(tmp_2415919454, verbatim__pkgZkaraxZvdom_u954(searchResult_p0.postContent)); + add__pkgZkaraxZvdom_u794(tmp_2415919447, tmp_2415919454); + add__pkgZkaraxZvdom_u794(tmp_2415919445, tmp_2415919447); + result_2415919443 = tmp_2415919445; + + return result_2415919443; + +} + +function render__search_u356(state_p0, query_p1, currentUser_p2) { + +function HEX3Aanonymous__search_u395(s_p0, r_p1) { + onList__search_u131(s_p0, r_p1, state_p0); + + + } + var Temporary1; + + var result_2415919465 = null; + + BeforeRet: { + if (!(eqStrings(state_p0.query, query_p1))) { + state_p0.list = nimCopy(state_p0.list, none__search_u65(), NTI2415919121); + state_p0.status = 200; + state_p0.query = nimCopy(null, query_p1, NTI33554449); + } + + if (!((state_p0.status == 200))) { + result_2415919465 = renderError__error_u24([67,111,117,108,100,110,39,116,32,114,101,116,114,105,101,118,101,32,115,101,97,114,99,104,32,114,101,115,117,108,116,115,46], state_p0.status); + break BeforeRet; + } + + if (isNone__search_u380(state_p0.list)) { + var params_2415919493 = [nimCopy(null, {Field0: [113], Field1: nimCopy(null, state_p0.query, NTI33554449)}, NTI2415919425)]; + var uri_2415919494 = makeUri__karaxutils_u123([115,101,97,114,99,104,46,106,115,111,110], params_2415919493, [47], false, true); + ajaxGet__pkgZkaraxZkajax_u215(toJSStr(uri_2415919494), [], HEX3Aanonymous__search_u395, true, kxi__); + var tmp_2415919503 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2415919503.class = "loading loading-lg"; + result_2415919465 = tmp_2415919503; + break BeforeRet; + } + + var list_2415919540 = nimCopy(null, (Temporary1 = get__search_u409(state_p0.list), Temporary1)[0][Temporary1[1]], NTI2415919116); + var tmp_2415919541 = tree__pkgZkaraxZvdom_u880(17, []); + tmp_2415919541.class = "container grid-xl"; + var tmp_2415919542 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2415919542.class = "title"; + var tmp_2415919543 = tree__pkgZkaraxZvdom_u880(32, []); + add__pkgZkaraxZvdom_u794(tmp_2415919543, text__pkgZkaraxZvdom_u948([83,101,97,114,99,104,32,114,101,115,117,108,116,115])); + add__pkgZkaraxZvdom_u794(tmp_2415919542, tmp_2415919543); + add__pkgZkaraxZvdom_u794(tmp_2415919541, tmp_2415919542); + var tmp_2415919544 = tree__pkgZkaraxZvdom_u880(44, []); + tmp_2415919544.class = "searchresults"; + if (((list_2415919540).length == 0)) { + add__pkgZkaraxZvdom_u794(tmp_2415919544, renderMessage__error_u36([78,111,32,114,101,115,117,108,116,115,32,102,111,117,110,100], [], [102,97,45,101,120,99,108,97,109,97,116,105,111,110])); + } + else { + Label2: { + var searchResult_2415919570 = ({kind: 0, threadId: 0, postId: 0, threadTitle: [], postContent: [], author: ({id: [], name: [], avatarUrl: [], lastOnline: 0n, previousVisitAt: 0n, rank: 0, isDeleted: false}), creation: 0n}); + var i_637535128 = 0; + var L_637535129 = (list_2415919540).length; + Label3: { + Label4: while (true) { + if (!(i_637535128 < L_637535129)) break Label4; + searchResult_2415919570 = list_2415919540[chckIndx(i_637535128, 0, (list_2415919540).length - 1)]; + Label5: { + if (!(visibleTo__search_u467(searchResult_2415919570, currentUser_p2))) { + break Label5; + } + + add__pkgZkaraxZvdom_u794(tmp_2415919544, genSearchResult__search_u337(searchResult_2415919570)); + }; + i_637535128 += 1; + if (!(((list_2415919540).length == L_637535129))) { + failedAssertImpl__stdZassertions_u86(makeNimstrLit("iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it")); + } + + } + }; + }; + } + + add__pkgZkaraxZvdom_u794(tmp_2415919541, tmp_2415919544); + result_2415919465 = tmp_2415919541; + }; + + return result_2415919465; + +} + +function render__forum_u227() { + +function HEX3Aanonymous__forum_u230(params_p0) { + var result_637534440 = null; + + result_637534440 = renderCategoryList__categorylist_u205(getLoggedInUser__header_u339()); + + return result_637534440; + + } + +function HEX3Aanonymous__forum_u233(params_p0) { + var result_637534443 = null; + + result_637534443 = renderThreadList__threadlist_u1179(getLoggedInUser__header_u339(), some__pureZtimes_u2496(parseInt(toJSStr(HEX5BHEX5D__forum_u285(params_p0, [105,100])), 10))); + + return result_637534443; + + } + +function HEX3Aanonymous__forum_u354(params_p0) { + var result_637534564 = null; + + result_637534564 = render__newthread_u259(state_637534328[0].newThread, getLoggedInUser__header_u339()); + + return result_637534564; + + } + +function HEX3Aanonymous__forum_u357(params_p0) { + var result_637534567 = null; + + result_637534567 = render__profile_u363(state_637534328[0].profile, decodeURI(toJSStr(HEX5BHEX5D__forum_u285(params_p0, [117,115,101,114,110,97,109,101]))), getLoggedInUser__header_u339()); + + return result_637534567; + + } + +function HEX3Aanonymous__forum_u414(params_p0) { + var Temporary1; + + var result_637534624 = null; + + var postId_637534625 = getInt__karaxutils_u39(substr__system_u3794(cstrToNimstr(state_637534328[0].url.hash), 1), 0); + if ((postId_637534625 == 0)) { + Temporary1 = none__forum_u485(); + } + else { + Temporary1 = some__pureZtimes_u2496(postId_637534625); + } + + result_637534624 = renderPostList__postlist_u1894(parseInt(toJSStr(HEX5BHEX5D__forum_u285(params_p0, [105,100])), 10), Temporary1, getLoggedInUser__header_u339()); + + return result_637534624; + + } + +function HEX3Aanonymous__forum_u507(params_p0) { + var result_637534717 = null; + + result_637534717 = render__about_u60(state_637534328[0].about, HEX5BHEX5D__forum_u285(params_p0, [112,97,103,101])); + + return result_637534717; + + } + +function HEX3Aanonymous__forum_u564(params_p0) { + var result_637534774 = null; + + result_637534774 = renderMessage__error_u36([69,109,97,105,108,32,97,99,116,105,118,97,116,101,100], [89,111,117,32,99,97,110,32,110,111,119,32,99,114,101,97,116,101,32,110,101,119,32,112,111,115,116,115,33], [102,97,45,99,104,101,99,107]); + + return result_637534774; + + } + +function HEX3Aanonymous__forum_u567(params_p0) { + var result_637534777 = null; + + result_637534777 = render__activateemail_u113(state_637534328[0].activateEmail); + + return result_637534777; + + } + +function HEX3Aanonymous__forum_u570(params_p0) { + var result_637534780 = null; + + result_637534780 = renderMessage__error_u36([80,97,115,115,119,111,114,100,32,99,104,97,110,103,101,100], [89,111,117,32,99,97,110,32,110,111,119,32,108,111,103,105,110,32,117,115,105,110,103,32,121,111,117,114,32,110,101,119,32,112,97,115,115,119,111,114,100,33], [102,97,45,99,104,101,99,107]); + + return result_637534780; + + } + +function HEX3Aanonymous__forum_u573(params_p0) { + var result_637534783 = null; + + result_637534783 = render__resetpassword_u121(state_637534328[0].resetPassword); + + return result_637534783; + + } + +function HEX3Aanonymous__forum_u576(params_p0) { + var result_637534786 = null; + + result_637534786 = render__search_u356(state_637534328[0].search, HEX5BHEX5D__forum_u285(params_p0, [113]), getLoggedInUser__header_u339()); + + return result_637534786; + + } + +function HEX3Aanonymous__forum_u633(params_p0) { + var result_637534843 = null; + + result_637534843 = render404__error_u14(); + + return result_637534843; + + } + +function HEX3Aanonymous__forum_u636(params_p0) { + var result_637534846 = null; + + result_637534846 = renderThreadList__threadlist_u1179(getLoggedInUser__header_u339(), none__mainbuttons_u76()); + + return result_637534846; + + } + + var result_637534436 = null; + + var tmp_637534437 = tree__pkgZkaraxZvdom_u880(44, []); + add__pkgZkaraxZvdom_u794(tmp_637534437, renderHeader__header_u485()); + add__pkgZkaraxZvdom_u794(tmp_637534437, route__forum_u168([r__forum_u131([47,99,97,116,101,103,111,114,105,101,115], HEX3Aanonymous__forum_u230), r__forum_u131([47,99,47,64,105,100], HEX3Aanonymous__forum_u233), r__forum_u131([47,110,101,119,116,104,114,101,97,100], HEX3Aanonymous__forum_u354), r__forum_u131([47,112,114,111,102,105,108,101,47,64,117,115,101,114,110,97,109,101], HEX3Aanonymous__forum_u357), r__forum_u131([47,116,47,64,105,100], HEX3Aanonymous__forum_u414), r__forum_u131([47,97,98,111,117,116,47,63,64,112,97,103,101,63], HEX3Aanonymous__forum_u507), r__forum_u131([47,97,99,116,105,118,97,116,101,69,109,97,105,108,47,115,117,99,99,101,115,115], HEX3Aanonymous__forum_u564), r__forum_u131([47,97,99,116,105,118,97,116,101,69,109,97,105,108], HEX3Aanonymous__forum_u567), r__forum_u131([47,114,101,115,101,116,80,97,115,115,119,111,114,100,47,115,117,99,99,101,115,115], HEX3Aanonymous__forum_u570), r__forum_u131([47,114,101,115,101,116,80,97,115,115,119,111,114,100], HEX3Aanonymous__forum_u573), r__forum_u131([47,115,101,97,114,99,104], HEX3Aanonymous__forum_u576), r__forum_u131([47,52,48,52], HEX3Aanonymous__forum_u633), r__forum_u131([47], HEX3Aanonymous__forum_u636)])); + result_637534436 = tmp_637534437; + + return result_637534436; + +} +var state_637534328 = [newState__forum_u79()]; +window.onpopstate = onPopState__forum_u121; +setRenderer__pkgZkaraxZkarax_u1804(render__forum_u227, "ROOT", null); diff --git a/public/karax.html b/public/karax.html new file mode 100644 index 0000000..bd90f83 --- /dev/null +++ b/public/karax.html @@ -0,0 +1,32 @@ + + + + + + + + + + $title + + + + + + + + + + + +
+ + + + diff --git a/public/license.rst b/public/license.rst new file mode 100644 index 0000000..beebae3 --- /dev/null +++ b/public/license.rst @@ -0,0 +1,38 @@ +Content license +=============== + +All the content contributed to $hostname is `cc-wiki (aka cc-by-sa) +`_ licensed, intended to be +**shared and remixed**. + +The cc-wiki licensing, while intentionally permissive, does require +attribution: + +**Attribution** — You must attribute the work in the manner specified by +the author or licensor (but not in any way that suggests that they endorse +you or your use of the work). + +This means that if you republish this content, you are +required to: + +* **Visually indicate that the content is from the $name**. It doesn’t + have to be obnoxious; a discreet text blurb is fine. +* **Hyperlink directly to the original post** (e.g., + https://$hostname/t/186/1#908) +* **Show the author names** for every post. +* **Hyperlink each author name** directly back to their user profile page + (e.g., http://$hostname/profile/Araq) + +To be more specific, each hyperlink must +point directly to the $hostname domain in +standard HTML visible even with JavaScript disabled, and not use a tinyurl or +any other form of obfuscation or redirection. Furthermore, the links must not +be `nofollowed +`_. + +This is about the spirit of fair **attribution**. Attribution to the website, +and more importantly, to the individuals who so generously contributed their +time to create that content in the first place! + +Feel free to remix and reuse to your heart’s content, as long as a good faith +effort is made to attribute the content! diff --git a/public/rst.rst b/public/rst.rst new file mode 100644 index 0000000..b5db812 --- /dev/null +++ b/public/rst.rst @@ -0,0 +1,210 @@ +Markdown and RST supported by this forum +======================================== + +This is a cheat sheet for the *reStructuredText* dialect as implemented by +Nim's documentation generator which has been reused for this forum. + +See also the +`official RST cheat sheet `_ +or the `quick reference `_ +for further information. + +Elements of **markdown** are also supported. + +Inline elements +--------------- + +Ordinary text may contain *inline elements*: + +=============================== ============================================ +Plain text Result +=============================== ============================================ +``*italic text*`` *italic text* +``**bold text**`` **bold text** +``***italic bold text***`` ***italic bold text*** +\``verbatim text \`` ``verbatim text`` +``http://docutils.sf.net/`` http://docutils.sf.net/ +``\\escape`` \\escape +=============================== ============================================ + +Quoting other users can be done by prefixing their message with ``>``:: + + > Hello World + + Hi! + +Which will result in: + +> Hello World + +Hi! + +Links +----- + +Links are either direct URLs like ``https://nim-lang.org`` or written like +this:: + + `Nim `_ + +Or like this:: + + ``_ + + +Code blocks +----------- + +The code blocks can be written in the same style as most common Markdown +flavours:: + + ```nim + if x == "abc": + echo "xyz" + ``` + +or using RST syntax:: + + .. code-block:: nim + + if x == "abc": + echo "xyz" + +Both are rendered as: + +.. code-block:: nim + + if x == "abc": + echo "xyz" + + +Apart from Nim, the programming languages C, C++, Java and C# also +have highlighting support. + +Literal blocks +-------------- + +These are introduced by '::' and a newline. The block is indicated by indentation: + +:: + :: + if x == "abc": + echo "xyz" + +The above is rendered as:: + + if x == "abc": + echo "xyz" + + + +Bullet lists +------------ + +Bullet lists look like this:: + + * Item 1 + * Item 2 that + spans over multiple lines + * Item 3 + * Item 4 + - bullet lists may nest + - item 3b + - valid bullet characters are ``+``, ``*`` and ``-`` + +The above rendered as: +* Item 1 +* Item 2 that + spans over multiple lines +* Item 3 +* Item 4 + - bullet lists may nest + - item 3b + - valid bullet characters are ``+``, ``*`` and ``-`` + + +Enumerated lists +---------------- + +Enumerated lists are written like this:: + + 1. This is the first item + 2. This is the second item + 3. Enumerators are arabic numbers, + single letters, or roman numerals + #. This item is auto-enumerated + +They are rendered as: + +1. This is the first item +2. This is the second item +3. Enumerators are arabic numbers, + single letters, or roman numerals +#. This item is auto-enumerated + + +Tables +------ + +Only *simple tables* are supported. They are of the form:: + + ================== =============== =================== + header 1 header 2 header n + ================== =============== =================== + Cell 1 Cell 2 Cell 3 + Cell 4 Cell 5; any Cell 6 + cell that is + not in column 1 + may span over + multiple lines + Cell 7 Cell 8 Cell 9 + ================== =============== =================== + +This results in: +================== =============== =================== +header 1 header 2 header n +================== =============== =================== +Cell 1 Cell 2 Cell 3 +Cell 4 Cell 5; any Cell 6 + cell that is + not in column 1 + may span over + multiple lines +Cell 7 Cell 8 Cell 9 +================== =============== =================== + +Images +------ + +Image embedding is supported. This includes GIFs as well as mp4 (for which a +