diff --git a/archetypes/default.md b/archetypes/default.md index 00e77bd..a0cc1a7 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,6 +1,29 @@ ---- -title: "{{ replace .Name "-" " " | title }}" -date: {{ .Date }} -draft: true ---- +{{/* +Copyright (C) 2019 Josh Habdas +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + ++++ +title = "{{ replace .TranslationBaseName "-" " " | title }}" +date = {{ .Date }} +description = "This text is displayed in search result listings." +draft = true +[[copyright]] + owner = "{{ .Site.Params.author | default .Site.Title }}" + date = "{{ now.Format "2006" }}" + license = "cc-by-nd-4.0" ++++ diff --git a/config.toml b/config.toml index 53e3260..6f3b454 100644 --- a/config.toml +++ b/config.toml @@ -1,5 +1,42 @@ baseURL = "http://www.aronajones.com" languageCode = "en-gb" -title = "Portfolio of Arona Jones, a Swiss-born British Developer, Writer and Stage Technician" +title = "Thoughts of Arona Jones, a Hack of All Trades" # Homepage title and page title suffix +paginate = 11 # Number of posts to show before paginating +# copyright = "Copyright © Copyright Owner. Licensed under CC-BY-ND-4.0." # Optional, remove to suppress copyright notices + +# Controls default theme and theme components +theme = [ + "fractal-forest", # OBSD + "after-dark" # AGPL-3.0-or-later +] + +disableLiveReload = false # Optional, set true to disable live reload +enableRobotsTXT = true # Suggested, enable robots.txt file +sectionPagesMenu = "main" # Enable menu system for lazy bloggers + [markup.goldmark.renderer] -unsafe= true + unsafe = true # Optional, allows HTML inside your CommonMark content +[markup.tableOfContents] + startLevel = 1 # Suggested, draws TOC using all heading levels + endLevel = 6 # Suggested, draws TOC using all heading levels +[markup.highlight] + noClasses = false # Suggested, used for custom syntax highlighting + +[params] + description = "No Description Provided" # Suggested, controls default description meta + author = "Arona Jones" # Optional, controls author name display on posts + hide_author = false # Optional, set true to hide author name on posts + disable_csp = false # Optional, set true to disable content security policy + images = [ + "https://source.unsplash.com/collection/983219/2000x1322" + ] # Suggested, controls default Open Graph images + +[params.layout.menu.main] + hidden = true # Optional, set false or remove to show section menu + +[params.layout.footer] + hidden = false # Optional, set true to hide footer + +[params.modules.fractal_forest] + enabled = true # Optional, set false to disable module + decoders = ["bpgdec8a"] # Optional, 8-bit javascript decoder with animation diff --git a/content/about.md b/content/_old/about.md similarity index 100% rename from content/about.md rename to content/_old/about.md diff --git a/content/development/index.html b/content/_old/development/index.html similarity index 100% rename from content/development/index.html rename to content/_old/development/index.html diff --git a/content/now.md b/content/_old/now.md similarity index 100% rename from content/now.md rename to content/_old/now.md diff --git a/content/technical/index.html b/content/_old/technical/index.html similarity index 100% rename from content/technical/index.html rename to content/_old/technical/index.html diff --git a/content/whois.md b/content/_old/whois.md similarity index 100% rename from content/whois.md rename to content/_old/whois.md diff --git a/content/writing/index.html b/content/_old/writing/index.html similarity index 100% rename from content/writing/index.html rename to content/_old/writing/index.html diff --git a/layouts/404.html b/layouts/404.html deleted file mode 100644 index d98598d..0000000 --- a/layouts/404.html +++ /dev/null @@ -1,20 +0,0 @@ - - -
-

404

- -

Page not found :(

-

The requested page could not be found.

-
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html deleted file mode 100644 index adc670c..0000000 --- a/layouts/_default/baseof.html +++ /dev/null @@ -1,17 +0,0 @@ - - - {{ partial "head.html" . }} - -
-
-

Arona Jones

- {{ partial "nav.html" . }} -
-
- {{ block "main" . }} - {{ end }} -
- {{ partial "footer.html" . }} -
- - diff --git a/layouts/_default/list.html b/layouts/_default/list.html deleted file mode 100644 index 3c4bde1..0000000 --- a/layouts/_default/list.html +++ /dev/null @@ -1,25 +0,0 @@ -{{ define "main" }} -
- {{.Content}} -
-
-

Posts:

-
- {{ range .Pages }} -
- {{ if .Params.images }} - - {{ else }} - - {{ end }} - {{.Date.Format "02/01/2006"}} | "{{.Title}}" -
- {{ .Summary }}... -

Read More

-
-

Reading Time: {{ .ReadingTime }}m

-
- {{ end }} -
-
-{{ end }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/single.html b/layouts/_default/single.html deleted file mode 100644 index 26cf7f4..0000000 --- a/layouts/_default/single.html +++ /dev/null @@ -1,6 +0,0 @@ -{{ define "main" }} -
-

{{ .Title }}

-{{.Content}} -
-{{ end }} diff --git a/layouts/blog/single.html b/layouts/blog/single.html deleted file mode 100644 index 3fb8301..0000000 --- a/layouts/blog/single.html +++ /dev/null @@ -1,25 +0,0 @@ -{{ define "main" }} - -{{ end }} diff --git a/layouts/index.html b/layouts/index.html deleted file mode 100644 index 999be73..0000000 --- a/layouts/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - {{ partial "head.html" . }} - -
-
-

Arona Jones

-

{{ .Site.Title }}

-
-
- -
- {{ partial "footer.html" . }} -
- - diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html deleted file mode 100644 index 790eb23..0000000 --- a/layouts/partials/footer.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index 8ec3894..0000000 --- a/layouts/partials/head.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - {{ if and (.IsPage) (.Title) }}{{ .Title }} | {{ end }}{{ .Site.Title }} - - - - {{ template "_internal/twitter_cards.html" . }} - diff --git a/layouts/partials/header.html b/layouts/partials/header.html deleted file mode 100644 index 194c7a4..0000000 --- a/layouts/partials/header.html +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html deleted file mode 100644 index 01c231c..0000000 --- a/layouts/partials/nav.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/layouts/partials/share-buttons.html b/layouts/partials/share-buttons.html deleted file mode 100644 index 76fef1c..0000000 --- a/layouts/partials/share-buttons.html +++ /dev/null @@ -1,26 +0,0 @@ -{{ $pageurl := .Permalink }} - - - -Share on:
- -
-
diff --git a/themes/after-dark/CHANGELOG.md b/themes/after-dark/CHANGELOG.md new file mode 100644 index 0000000..b01b966 --- /dev/null +++ b/themes/after-dark/CHANGELOG.md @@ -0,0 +1,1857 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [9.2.3](https://git.habd.as/comfusion/after-dark/compare/v9.2.2...v9.2.3) (2021-01-04) + +### [9.2.2](https://git.habd.as/comfusion/after-dark/compare/v9.2.1...v9.2.2) (2020-02-19) + + +### Bug Fixes + +* **layouts/_default:** show posts on homepage as expected ([60d7c0d](https://git.habd.as/comfusion/after-dark/commit/60d7c0d)), closes [#174](https://git.habd.as/comfusion/after-dark/issues/174) +* **shortcode/blockquote:** prevent raw html output when body used with citelink attr ([903dd69](https://git.habd.as/comfusion/after-dark/commit/903dd69)) + + + +### [9.2.1](https://git.habd.as/comfusion/after-dark/compare/v9.2.0...v9.2.1) (2019-12-15) + + +### Bug Fixes + +* collapse whitespace inside goldmark code blocks, alerts and cards ([5c9347d](https://git.habd.as/comfusion/after-dark/commit/5c9347d)) +* print out the full table of contents ([c176a8c](https://git.habd.as/comfusion/after-dark/commit/c176a8c)) + + + +## [9.2.0](https://git.habd.as/comfusion/after-dark/compare/v9.1.0...v9.2.0) (2019-12-13) + + +### Bug Fixes + +* **markdown:** restore footnote return links in hugo 0.60.0+ ([01aef48](https://git.habd.as/comfusion/after-dark/commit/01aef48)) + + +### Build System + +* **docker:** update for hugo release 0.61.0 ([0a1dc50](https://git.habd.as/comfusion/after-dark/commit/0a1dc50)) +* **feature/extended-builds:** upgrade extended build to hugo@0.60.0, go@1.13.4 and alpine@3.10 ([b229f2b](https://git.habd.as/comfusion/after-dark/commit/b229f2b)) + + +### Features + +* **feat/extended-builds:** add dockerfile and docker-compose ([52f1830](https://git.habd.as/comfusion/after-dark/commit/52f1830)) + + + +## [9.1.0](https://git.habd.as/comfusion/after-dark/compare/v9.0.0...v9.1.0) (2019-08-21) + + +### Bug Fixes + +* **feature/featured-posts:** default featured pages to empty slice when not defined ([785b403](https://git.habd.as/comfusion/after-dark/commit/785b403)), closes [#173](https://git.habd.as/comfusion/after-dark/issues/173) + + +### Build System + +* **docker/hugo:** bump to 0.57.0 ([e090ab2](https://git.habd.as/comfusion/after-dark/commit/e090ab2)) + + +### Features + +* **feature/code-analysis:** add source build of htmltest ([1cd1d6c](https://git.habd.as/comfusion/after-dark/commit/1cd1d6c)), closes [#124](https://git.habd.as/comfusion/after-dark/issues/124) [#165](https://git.habd.as/comfusion/after-dark/issues/165) + + + +## [9.0.0](https://git.habd.as/comfusion/after-dark/compare/v8.3.3...v9.0.0) (2019-08-12) + + +### Features + +* **feature/featured-posts:** allow featured items in posts section ([49f5c56](https://git.habd.as/comfusion/after-dark/commit/49f5c56)), closes [#170](https://git.habd.as/comfusion/after-dark/issues/170) [#160](https://git.habd.as/comfusion/after-dark/issues/160) + + +### BREAKING CHANGES + +* **feature/featured-posts:** Hugo minimum required version now 0.51 (was 0.44) + + + +### [8.3.4](https://git.habd.as/comfusion/after-dark/compare/v8.3.3...v8.3.4) (2019-08-05) + +Finish documentation TODOs. + +### [8.3.3](https://git.habd.as/comfusion/after-dark/compare/v8.3.2...v8.3.3) (2019-07-31) + + +### Build System + +* **docker/hugo:** support extended builds of hugo 0.56.0 ([3ee8bea](https://git.habd.as/comfusion/after-dark/commit/3ee8bea)), closes [#161](https://git.habd.as/comfusion/after-dark/issues/161) + + + +### [8.3.2](https://git.habd.as/comfusion/after-dark/compare/v8.3.1...v8.3.2) (2019-07-22) + + +### Bug Fixes + +* **feature/post-images:** prevent content from jumping as image loads ([452ce64](https://git.habd.as/comfusion/after-dark/commit/452ce64)), closes [#162](https://git.habd.as/comfusion/after-dark/issues/162) + + +### Build System + +* **npm:** audit and fix dev dependency vulnerabilities ([782506e](https://git.habd.as/comfusion/after-dark/commit/782506e)) +* **npm:** greenkeep commit helper and changelog generator ([0c571ef](https://git.habd.as/comfusion/after-dark/commit/0c571ef)) + + + +### [8.3.1](https://git.habd.as/comfusion/after-dark/compare/v8.3.0...v8.3.1) (2019-07-21) + + +### Bug Fixes + +* **bin/upgrade:** properly detect current theme version, if present ([59cebcb](https://git.habd.as/comfusion/after-dark/commit/59cebcb)) + + + +## [8.3.0](https://git.habd.as/comfusion/after-dark/compare/v8.2.0...v8.3.0) (2019-07-21) + + +### Features + +* **shortcode/video:** add video shortcode ([ace4c7c](https://git.habd.as/comfusion/after-dark/commit/ace4c7c)), closes [#20](https://git.habd.as/comfusion/after-dark/issues/20) [#81](https://git.habd.as/comfusion/after-dark/issues/81) + + + +## [8.2.0](https://git.habd.as/comfusion/after-dark/compare/v8.1.0...v8.2.0) (2019-07-18) + + +### Bug Fixes + +* **assets/css:** prevent ie10+ scrollbar from causing layout to jump ([105356f](https://git.habd.as/comfusion/after-dark/commit/105356f)), closes [#144](https://git.habd.as/comfusion/after-dark/issues/144) +* **bin/install:** resolve shellcheck warns for improved portability ([67a080f](https://git.habd.as/comfusion/after-dark/commit/67a080f)), closes [#154](https://git.habd.as/comfusion/after-dark/issues/154) + + +### Features + +* **feature/fuzzy-search:** add app init loading indicator and noscript experience ([da82ae2](https://git.habd.as/comfusion/after-dark/commit/da82ae2)), closes [#143](https://git.habd.as/comfusion/after-dark/issues/143) + + + +## [8.1.0](https://git.habd.as/comfusion/after-dark/compare/v8.0.2...v8.1.0) (2019-07-12) + + +### Features + +* **feature/custom-homepage:** add custom homepage and docs in english ([87d2076](https://git.habd.as/comfusion/after-dark/commit/87d2076)), closes [#41](https://git.habd.as/comfusion/after-dark/issues/41) +* **snippets:** abstract figure shortcode for use in layout ([8ca09f4](https://git.habd.as/comfusion/after-dark/commit/8ca09f4)) + + + +### [8.0.2](https://git.habd.as/comfusion/after-dark/compare/v8.0.1...v8.0.2) (2019-07-02) + + + +### [8.0.1](https://git.habd.as/comfusion/after-dark/compare/v8.0.0...v8.0.1) (2019-07-01) + + +### Build System + +* **npm/lockfile:** improve sec of dev deps with 1 audit fixed ([d956c71](https://git.habd.as/comfusion/after-dark/commit/d956c71)) + + + +## 8.0.0 (2019-05-17) + +Moves After Dark to AGPLv3+. + +### Bug Fixes + +* **$images:** improve bpg image support ([e8a2e29](https://git.habd.as/comfusion/after-dark/commit/e8a2e29)), closes [#48](https://git.habd.as/comfusion/after-dark/issues/48) +* **$layouts:** add support for protocol-relative base urls ([bd4db87](https://git.habd.as/comfusion/after-dark/commit/bd4db87)), closes [#37](https://git.habd.as/comfusion/after-dark/issues/37) +* **$layouts:** disable ua input styling safari mobile ([bffb325](https://git.habd.as/comfusion/after-dark/commit/bffb325)) +* **$layouts:** fix error calling partial in related content ([ab4a1df](https://git.habd.as/comfusion/after-dark/commit/ab4a1df)), closes [#55](https://git.habd.as/comfusion/after-dark/issues/55) +* **$layouts:** improve search input focus and usability ([5e2500f](https://git.habd.as/comfusion/after-dark/commit/5e2500f)), closes [#91](https://git.habd.as/comfusion/after-dark/issues/91) +* **$layouts:** move stylesheets back to partials, reorganize files ([c5871f1](https://git.habd.as/comfusion/after-dark/commit/c5871f1)), closes [#50](https://git.habd.as/comfusion/after-dark/issues/50) +* **$layouts:** prevent auto-zoom on safari mobile ([60d5b37](https://git.habd.as/comfusion/after-dark/commit/60d5b37)) +* **$layouts:** prevent js error on search form submit ([96b483c](https://git.habd.as/comfusion/after-dark/commit/96b483c)), closes [#94](https://git.habd.as/comfusion/after-dark/issues/94) +* **$layouts:** remove iframe borders by default ([aeeafa2](https://git.habd.as/comfusion/after-dark/commit/aeeafa2)) +* **$layouts:** update powered-by to link to new theme site ([500ccb9](https://git.habd.as/comfusion/after-dark/commit/500ccb9)) +* **$shortcodes:** fix issue with external link appearance ([f7cd49c](https://git.habd.as/comfusion/after-dark/commit/f7cd49c)) +* **$style:** add more whitespace on list pages and darken muted text ([8ba617c](https://git.habd.as/comfusion/after-dark/commit/8ba617c)) +* **$style:** fix a whitespace issue near the readmore link ([82155e9](https://git.habd.as/comfusion/after-dark/commit/82155e9)), closes [#70](https://git.habd.as/comfusion/after-dark/issues/70) +* **archetypes:** close tag body on last external shortcode ([fd6dd8d](https://git.habd.as/comfusion/after-dark/commit/fd6dd8d)) +* **archetypes:** default posts to display as published content ([47071fe](https://git.habd.as/comfusion/after-dark/commit/47071fe)) +* **archetypes:** fix broken links in post archetype ([0d65b6a](https://git.habd.as/comfusion/after-dark/commit/0d65b6a)) +* **archetypes:** prevent internal links from opening in new window ([c488a12](https://git.habd.as/comfusion/after-dark/commit/c488a12)) +* **archetypes/validate:** swap string method for sha trim behavior ([feb0150](https://git.habd.as/comfusion/after-dark/commit/feb0150)), closes [#90](https://git.habd.as/comfusion/after-dark/issues/90) +* **assets:** stop treating all permalinks as external ([7e1d3cc](https://git.habd.as/comfusion/after-dark/commit/7e1d3cc)) +* **assets/css:** normalize base font-size, large screens ([912ec97](https://git.habd.as/comfusion/after-dark/commit/912ec97)) +* **assets/css:** normalize samp element font size with pre ([966c767](https://git.habd.as/comfusion/after-dark/commit/966c767)) +* **assets/css:** normalize size of help text on small viewports ([55ba9e2](https://git.habd.as/comfusion/after-dark/commit/55ba9e2)) +* **assets/css:** normalize whitespace around toc when post images present ([4acbace](https://git.habd.as/comfusion/after-dark/commit/4acbace)) +* **assets/css:** unset ua default figure element margin ([7925a94](https://git.habd.as/comfusion/after-dark/commit/7925a94)) +* **assets/theme:** normalize blockquote line-height with rest of document ([5220b94](https://git.habd.as/comfusion/after-dark/commit/5220b94)) +* **bin:** remove preview script ([4f7af96](https://git.habd.as/comfusion/after-dark/commit/4f7af96)), closes [#38](https://git.habd.as/comfusion/after-dark/issues/38) +* **bundle:** add images to npm ignore file ([b7cbe87](https://git.habd.as/comfusion/after-dark/commit/b7cbe87)) +* **bundle:** remove images folder from npm release ([df9ce55](https://git.habd.as/comfusion/after-dark/commit/df9ce55)) +* **components:** correct help block class attr behavior ([586a290](https://git.habd.as/comfusion/after-dark/commit/586a290)) +* **feature/post-images:** fix yandex validation error ([f758c2e](https://git.habd.as/comfusion/after-dark/commit/f758c2e)) +* **feature/post-images:** zap extra whitespaces ([66c27ec](https://git.habd.as/comfusion/after-dark/commit/66c27ec)) +* **feature/web-feeds:** output last build date in rfc822 with 4-digit year ([4c86b4a](https://git.habd.as/comfusion/after-dark/commit/4c86b4a)) +* **fuzzy-search:** handle search layout hotkey assignments properly ([630d3a9](https://git.habd.as/comfusion/after-dark/commit/630d3a9)) +* **help:** change 404 page to error page and improve script perf ([9749575](https://git.habd.as/comfusion/after-dark/commit/9749575)), closes [#43](https://git.habd.as/comfusion/after-dark/issues/43) +* **help:** rename 404 to error page ([e158065](https://git.habd.as/comfusion/after-dark/commit/e158065)) +* **help/home:** add missing query string param to search link ([7c5f35d](https://git.habd.as/comfusion/after-dark/commit/7c5f35d)) +* **help/home:** add performance info & undocumented features ([a8e18c5](https://git.habd.as/comfusion/after-dark/commit/a8e18c5)) +* **hugo:** require 0.44 at minimum ([6e2f11e](https://git.habd.as/comfusion/after-dark/commit/6e2f11e)) +* **install:** add flags for theme setup script ([1282c7c](https://git.habd.as/comfusion/after-dark/commit/1282c7c)) +* **install:** improve install experience ([52d6236](https://git.habd.as/comfusion/after-dark/commit/52d6236)) +* **install:** install packages from npm ([1c2df4f](https://git.habd.as/comfusion/after-dark/commit/1c2df4f)) +* **install:** kill hugo server always ([de3c8a5](https://git.habd.as/comfusion/after-dark/commit/de3c8a5)) +* **install:** move it back to bin ([ba92ce6](https://git.habd.as/comfusion/after-dark/commit/ba92ce6)) +* **install:** move kill command to eof ([7075c82](https://git.habd.as/comfusion/after-dark/commit/7075c82)) +* **install:** move to scripts folder ([30a8b04](https://git.habd.as/comfusion/after-dark/commit/30a8b04)) +* **install:** remove git cruft & supply actual module name ([7dd0e9e](https://git.habd.as/comfusion/after-dark/commit/7dd0e9e)) +* **install:** remove unexpected line in theme config ([7e424bd](https://git.habd.as/comfusion/after-dark/commit/7e424bd)) +* **install:** remove useful snippets content ([0278216](https://git.habd.as/comfusion/after-dark/commit/0278216)) +* **install:** restore android support ([3218ce2](https://git.habd.as/comfusion/after-dark/commit/3218ce2)), closes [#25](https://git.habd.as/comfusion/after-dark/issues/25) +* **install:** standardize install script ([9daad48](https://git.habd.as/comfusion/after-dark/commit/9daad48)), closes [#19](https://git.habd.as/comfusion/after-dark/issues/19) +* **install:** stop copying all archetypes to site ([b7df91a](https://git.habd.as/comfusion/after-dark/commit/b7df91a)), closes [#45](https://git.habd.as/comfusion/after-dark/issues/45) +* **install:** support both gnu and bsd grep ([0cc315a](https://git.habd.as/comfusion/after-dark/commit/0cc315a)) +* **install:** update default open graph image ([f476561](https://git.habd.as/comfusion/after-dark/commit/f476561)) +* **install:** update example base url ([f24a9f9](https://git.habd.as/comfusion/after-dark/commit/f24a9f9)) +* **install:** use latest version from npm dist tags ([91a3fb1](https://git.habd.as/comfusion/after-dark/commit/91a3fb1)) +* **install:** wait 1 second before serving help for docs to expire ([9ca3862](https://git.habd.as/comfusion/after-dark/commit/9ca3862)) +* **layout/default:** workaround hugo bug on eval len(nil) go tmpl ([d8bdcfc](https://git.habd.as/comfusion/after-dark/commit/d8bdcfc)), closes [#135](https://git.habd.as/comfusion/after-dark/issues/135) +* **layouts:** move inline-level content in navs inside

([42c9004](https://git.habd.as/comfusion/after-dark/commit/42c9004)) +* **layouts:** output meta description when not explicitly set ([f347138](https://git.habd.as/comfusion/after-dark/commit/f347138)), closes [#21](https://git.habd.as/comfusion/after-dark/issues/21) +* **layouts:** output urls relative to baseurl ([0205bd1](https://git.habd.as/comfusion/after-dark/commit/0205bd1)), closes [#4](https://git.habd.as/comfusion/after-dark/issues/4) +* **layouts:** remove navmenu from help layout ([470b452](https://git.habd.as/comfusion/after-dark/commit/470b452)) +* **layouts:** restore smooth scrolling to toc links ([8db7451](https://git.habd.as/comfusion/after-dark/commit/8db7451)) +* **layouts:** show sarcastic message when no pages exist ([990f0b6](https://git.habd.as/comfusion/after-dark/commit/990f0b6)) +* **layouts:** stop outputting trim color if none present ([73e824a](https://git.habd.as/comfusion/after-dark/commit/73e824a)) +* **layouts:** use relative urls in post byline taxonomy links ([a170089](https://git.habd.as/comfusion/after-dark/commit/a170089)) +* **layouts/partials:** add main menu display condition ([93ed6cd](https://git.habd.as/comfusion/after-dark/commit/93ed6cd)), closes [#78](https://git.habd.as/comfusion/after-dark/issues/78) +* **layouts/partials:** move navmenu snippet into theme ([1c0e945](https://git.habd.as/comfusion/after-dark/commit/1c0e945)), closes [#78](https://git.habd.as/comfusion/after-dark/issues/78) +* **layouts/search:** unblock blocking scripts and add command terminators ([455b6fe](https://git.habd.as/comfusion/after-dark/commit/455b6fe)), closes [#14](https://git.habd.as/comfusion/after-dark/issues/14) +* **links:** style external links in all browsers ([3e2aa61](https://git.habd.as/comfusion/after-dark/commit/3e2aa61)), closes [#22](https://git.habd.as/comfusion/after-dark/issues/22) +* **onboarding:** add explicit site port setting in install script ([b851b0b](https://git.habd.as/comfusion/after-dark/commit/b851b0b)) +* **onboarding:** serve site not help when starting site from installer ([3447556](https://git.habd.as/comfusion/after-dark/commit/3447556)) +* **partials:** fix markup validation error ([43a9ed0](https://git.habd.as/comfusion/after-dark/commit/43a9ed0)) +* **partials:** make button onclick handler work as expected ([74ef00a](https://git.habd.as/comfusion/after-dark/commit/74ef00a)) +* **partials/powered-by:** point to expected directory of refactored file ([d61f131](https://git.habd.as/comfusion/after-dark/commit/d61f131)) +* **personalization:** rename accent color to trim color ([953c73e](https://git.habd.as/comfusion/after-dark/commit/953c73e)) +* **scripts:** add || to server shutdown ([f7f2849](https://git.habd.as/comfusion/after-dark/commit/f7f2849)) +* **scripts:** address error generating docs after upgrade ([f84cd40](https://git.habd.as/comfusion/after-dark/commit/f84cd40)) +* **scripts:** always regnerate help docs ([082f1be](https://git.habd.as/comfusion/after-dark/commit/082f1be)) +* **scripts:** automatically stop running help servers on upgrade ([87feadc](https://git.habd.as/comfusion/after-dark/commit/87feadc)) +* **scripts:** remove help before generating on upgrade ([0049586](https://git.habd.as/comfusion/after-dark/commit/0049586)) +* **scripts:** resolve help doc path lookups when no custom content dir ([6792cd7](https://git.habd.as/comfusion/after-dark/commit/6792cd7)) +* **scripts:** resolve syntax bugs in script ([0b349ed](https://git.habd.as/comfusion/after-dark/commit/0b349ed)) +* **scripts:** resolve tar cd issue ([a573640](https://git.habd.as/comfusion/after-dark/commit/a573640)) +* **scripts:** update install to place theme metadata in theme data folder ([5e89f6d](https://git.habd.as/comfusion/after-dark/commit/5e89f6d)), closes [#59](https://git.habd.as/comfusion/after-dark/issues/59) +* **shortcode/hackcss-alert:** restore legacy behavior for shortcode ([975f2b7](https://git.habd.as/comfusion/after-dark/commit/975f2b7)) +* **shortcode/navmenu:** improve microdata semantics & add test tool to docs ([31992f5](https://git.habd.as/comfusion/after-dark/commit/31992f5)), closes [#100](https://git.habd.as/comfusion/after-dark/issues/100) +* **shortcodes:** remove insignificant spaces after external links ([1f06f5c](https://git.habd.as/comfusion/after-dark/commit/1f06f5c)) +* **shortcodes:** remove privacytube and coub shortcodes ([f5ddb1a](https://git.habd.as/comfusion/after-dark/commit/f5ddb1a)), closes [#35](https://git.habd.as/comfusion/after-dark/issues/35) +* **shortcodes:** remove standard link treatment from figures ([a619320](https://git.habd.as/comfusion/after-dark/commit/a619320)) +* **shortcodes/button:** allow name attribute & pass id as expected ([c58645a](https://git.habd.as/comfusion/after-dark/commit/c58645a)) +* **snippets:** add name attribute to form ([78f3482](https://git.habd.as/comfusion/after-dark/commit/78f3482)) +* **snippets:** reverse logic for external link styling ([2889192](https://git.habd.as/comfusion/after-dark/commit/2889192)) +* **styles:** leftpad orderd lists ([a944ead](https://git.habd.as/comfusion/after-dark/commit/a944ead)) +* **theme:** enable white theme variant ([2addeaa](https://git.habd.as/comfusion/after-dark/commit/2addeaa)) +* **typography:** only justify and hyphenate article bodies ([52f046a](https://git.habd.as/comfusion/after-dark/commit/52f046a)) +* **typography:** remove text justification and hyphenation ([2bfa8f7](https://git.habd.as/comfusion/after-dark/commit/2bfa8f7)) +* **typography:** stop justifying and hyphenating text on small viewports ([929ae7e](https://git.habd.as/comfusion/after-dark/commit/929ae7e)) +* 404 page theme color url ref ([2303007](https://git.habd.as/comfusion/after-dark/commit/2303007)) +* add add theme color to 404 page ([1379cfc](https://git.habd.as/comfusion/after-dark/commit/1379cfc)) + + +### Build System + +* **npm:** pull unused dev dep ([14bab76](https://git.habd.as/comfusion/after-dark/commit/14bab76)) +* **npm:** upgrade lockfile to v1 ([25ce8fa](https://git.habd.as/comfusion/after-dark/commit/25ce8fa)) +* **npm:** upgrade standard-version to latest ([2ecf9de](https://git.habd.as/comfusion/after-dark/commit/2ecf9de)) +* add sha512 digest to git tags and gpg sign them ([e16ab0b](https://git.habd.as/comfusion/after-dark/commit/e16ab0b)) +* append sha512 to release tag and self-sign ([f054416](https://git.habd.as/comfusion/after-dark/commit/f054416)), closes [#33](https://git.habd.as/comfusion/after-dark/issues/33) +* enclose release tag sha512 in delimeters ([38127fc](https://git.habd.as/comfusion/after-dark/commit/38127fc)), closes [#33](https://git.habd.as/comfusion/after-dark/issues/33) +* **$hugo:** inline css using readFile template function ([37834f9](https://git.habd.as/comfusion/after-dark/commit/37834f9)), closes [#44](https://git.habd.as/comfusion/after-dark/issues/44) +* **$npm:** patch moderate security vulnerability in dev dep ([6c763c3](https://git.habd.as/comfusion/after-dark/commit/6c763c3)) +* **$npm:** switch from yarn to npm lockfile ([185ad8f](https://git.habd.as/comfusion/after-dark/commit/185ad8f)) +* **$yarn:** add yarn and update dev dependencies and scripts ([d115256](https://git.habd.as/comfusion/after-dark/commit/d115256)) +* **bin:** improve support for linux ([f2c3d0b](https://git.habd.as/comfusion/after-dark/commit/f2c3d0b)) +* **install:** bail early ([55798c3](https://git.habd.as/comfusion/after-dark/commit/55798c3)) +* **install:** update install process ([86c69ef](https://git.habd.as/comfusion/after-dark/commit/86c69ef)) +* **scripts:** remove unused variables from install script ([a1e095a](https://git.habd.as/comfusion/after-dark/commit/a1e095a)) + + +### Features + +* **$archetypes:** turn archetypes into go templates ([1ef09c6](https://git.habd.as/comfusion/after-dark/commit/1ef09c6)) +* **$archetypes:** turn archetypes into go templates ([56d86d3](https://git.habd.as/comfusion/after-dark/commit/56d86d3)) +* **$layout:** add base element to base layout ([ddff5a9](https://git.habd.as/comfusion/after-dark/commit/ddff5a9)), closes [#60](https://git.habd.as/comfusion/after-dark/issues/60) +* **$layout:** Add support for external stylesheets ([917cf91](https://git.habd.as/comfusion/after-dark/commit/917cf91)), closes [#49](https://git.habd.as/comfusion/after-dark/issues/49) +* **$layout:** add telegram iv support ([d6bf3b6](https://git.habd.as/comfusion/after-dark/commit/d6bf3b6)), closes [#113](https://git.habd.as/comfusion/after-dark/issues/113) +* **$layouts:** add fuzzy search ([f9a787e](https://git.habd.as/comfusion/after-dark/commit/f9a787e)), closes [#83](https://git.habd.as/comfusion/after-dark/issues/83) +* **$layouts:** add post images ([b151db3](https://git.habd.as/comfusion/after-dark/commit/b151db3)) +* **$layouts:** add twitter cards ([a1412a9](https://git.habd.as/comfusion/after-dark/commit/a1412a9)), closes [#76](https://git.habd.as/comfusion/after-dark/issues/76) +* **$layouts:** allow customization of referrer policy and add privacy-focused default ([7bde6b6](https://git.habd.as/comfusion/after-dark/commit/7bde6b6)), closes [#96](https://git.habd.as/comfusion/after-dark/issues/96) +* **$layouts:** hide related content reading time on small screen ([7cfa4eb](https://git.habd.as/comfusion/after-dark/commit/7cfa4eb)) +* **$layouts:** use related content feature introduced in hugo@0.27 ([b408db9](https://git.habd.as/comfusion/after-dark/commit/b408db9)), closes [#54](https://git.habd.as/comfusion/after-dark/issues/54) +* **$partials:** add pubdate structured data to post byline ([42f34ae](https://git.habd.as/comfusion/after-dark/commit/42f34ae)) +* **$shortcode:** add coub shortcode for gifs with sound ([df9dae8](https://git.habd.as/comfusion/after-dark/commit/df9dae8)), closes [#63](https://git.habd.as/comfusion/after-dark/issues/63) +* **$shortcode:** style cite element inside block quotation ([158c0f4](https://git.habd.as/comfusion/after-dark/commit/158c0f4)) +* **$shortcodes:** add frame targeting to custom figure shortcode ([b802dab](https://git.habd.as/comfusion/after-dark/commit/b802dab)) +* **$shortcodes:** add youtube without cookies ([f6f837e](https://git.habd.as/comfusion/after-dark/commit/f6f837e)), closes [#62](https://git.habd.as/comfusion/after-dark/issues/62) +* **$shortcodes:** enable target and method control for button/buttongroup ([c3d1599](https://git.habd.as/comfusion/after-dark/commit/c3d1599)), closes [#56](https://git.habd.as/comfusion/after-dark/issues/56) +* **$shortcodes:** make button shortcode clickable ([fa24f4a](https://git.habd.as/comfusion/after-dark/commit/fa24f4a)), closes [#40](https://git.habd.as/comfusion/after-dark/issues/40) +* **$theme:** add support for bpg image format ([3976ec0](https://git.habd.as/comfusion/after-dark/commit/3976ec0)), closes [#45](https://git.habd.as/comfusion/after-dark/issues/45) +* **bin:** add script to preview site online over https ([730df77](https://git.habd.as/comfusion/after-dark/commit/730df77)), closes [#21](https://git.habd.as/comfusion/after-dark/issues/21) +* **feature/fuzzy-search:** add aria landmark to search form ([5b26f51](https://git.habd.as/comfusion/after-dark/commit/5b26f51)) +* **feature/post-images:** add image captions and structured data ([9a5c283](https://git.habd.as/comfusion/after-dark/commit/9a5c283)) +* **feature/section-menu:** add support for html link decoration ([f02c68f](https://git.habd.as/comfusion/after-dark/commit/f02c68f)) +* **feature/section-menu:** add support for multiple nav menus ([0c468a5](https://git.habd.as/comfusion/after-dark/commit/0c468a5)) +* **feature/security:** add content security policy ([7e438ad](https://git.habd.as/comfusion/after-dark/commit/7e438ad)) +* **feature/table-of-contents:** add native smooth-scroll ([f1606b6](https://git.habd.as/comfusion/after-dark/commit/f1606b6)), closes [#43](https://git.habd.as/comfusion/after-dark/issues/43) +* **fuzzy-search:** add ability to assign arbitrary hotkeys ([f429c4a](https://git.habd.as/comfusion/after-dark/commit/f429c4a)), closes [#74](https://git.habd.as/comfusion/after-dark/issues/74) +* **help:** multipage help docs ([ef25e00](https://git.habd.as/comfusion/after-dark/commit/ef25e00)), closes [#61](https://git.habd.as/comfusion/after-dark/issues/61) +* **help:** update and run help anytime using included script ([fc93864](https://git.habd.as/comfusion/after-dark/commit/fc93864)) +* **help/homepage:** update security featurette ([c567bd4](https://git.habd.as/comfusion/after-dark/commit/c567bd4)) +* **highlighting:** add syntax highlighting ([a038ee0](https://git.habd.as/comfusion/after-dark/commit/a038ee0)) +* **install:** add installation challenge ([9d438fe](https://git.habd.as/comfusion/after-dark/commit/9d438fe)) +* **install:** faux install validation using npm sha512 digest ([e7625da](https://git.habd.as/comfusion/after-dark/commit/e7625da)), closes [#33](https://git.habd.as/comfusion/after-dark/issues/33) +* **install:** provide welcome post with online help ([79838ed](https://git.habd.as/comfusion/after-dark/commit/79838ed)) +* **install:** simplify installation ([da3f66e](https://git.habd.as/comfusion/after-dark/commit/da3f66e)) +* **install:** streamline installation ([15f61f5](https://git.habd.as/comfusion/after-dark/commit/15f61f5)), closes [#2](https://git.habd.as/comfusion/after-dark/issues/2) +* **layout,install:** add automatic syntax highlighting ([70d2bfc](https://git.habd.as/comfusion/after-dark/commit/70d2bfc)) +* **layouts:** add meta keywords to base template ([d5f146f](https://git.habd.as/comfusion/after-dark/commit/d5f146f)), closes [#20](https://git.habd.as/comfusion/after-dark/issues/20) +* **layouts:** add support for hugo 0.20.2 ([ac42370](https://git.habd.as/comfusion/after-dark/commit/ac42370)) +* **layouts:** provide form builder snippets ([ada893d](https://git.habd.as/comfusion/after-dark/commit/ada893d)) +* **layouts/*:** add cookie disclaimer ([446f6f8](https://git.habd.as/comfusion/after-dark/commit/446f6f8)) +* **layouts/search:** and placeholder and allow basic customization ([7a669ef](https://git.habd.as/comfusion/after-dark/commit/7a669ef)) +* **layouts/shortcodes:** add grid and cell flexbox shortcode & snippet ([77df2c4](https://git.habd.as/comfusion/after-dark/commit/77df2c4)), closes [#67](https://git.habd.as/comfusion/after-dark/issues/67) +* **layouts/shortcodes:** add select shortcode, docs and example use ([85eefe5](https://git.habd.as/comfusion/after-dark/commit/85eefe5)) +* **license:** wtfpl -> agpl-3.0-or-later ([1a7a2a9](https://git.habd.as/comfusion/after-dark/commit/1a7a2a9)), closes [#148](https://git.habd.as/comfusion/after-dark/issues/148) +* **LICENSE:** you just do what the fuck you want to ([d75ea18](https://git.habd.as/comfusion/after-dark/commit/d75ea18)) +* **module/toxic-swamp:** integrate module beta ([743ebfc](https://git.habd.as/comfusion/after-dark/commit/743ebfc)) +* **modules:** add analytics module ([1c5c6bb](https://git.habd.as/comfusion/after-dark/commit/1c5c6bb)), closes [#1](https://git.habd.as/comfusion/after-dark/issues/1) +* **modules:** add fractal forest module for bpg image format support ([76b9cfd](https://git.habd.as/comfusion/after-dark/commit/76b9cfd)), closes [#8](https://git.habd.as/comfusion/after-dark/issues/8) +* **modules:** add hall of mirrors ([592b2b2](https://git.habd.as/comfusion/after-dark/commit/592b2b2)), closes [#24](https://git.habd.as/comfusion/after-dark/issues/24) +* **onboarding:** streamline installation ([34ce45a](https://git.habd.as/comfusion/after-dark/commit/34ce45a)) +* **personalization:** add customizable accent colors ([be90f47](https://git.habd.as/comfusion/after-dark/commit/be90f47)) +* select theme variant directly from site config ([81a4663](https://git.habd.as/comfusion/after-dark/commit/81a4663)), closes [#6](https://git.habd.as/comfusion/after-dark/issues/6) +* **powered-by:** add page generation date ([430a468](https://git.habd.as/comfusion/after-dark/commit/430a468)) +* **scripts:** add theme upgrade script ([c9a5c3a](https://git.habd.as/comfusion/after-dark/commit/c9a5c3a)), closes [#59](https://git.habd.as/comfusion/after-dark/issues/59) +* **scripts:** support custom content dirs in config file ([e72e914](https://git.habd.as/comfusion/after-dark/commit/e72e914)), closes [#59](https://git.habd.as/comfusion/after-dark/issues/59) +* **scripts/upgrade:** prompt for update if metadata cannot be found ([db3216d](https://git.habd.as/comfusion/after-dark/commit/db3216d)) +* **shortcode:** add trusted custom attr to external ([9b0d5f5](https://git.habd.as/comfusion/after-dark/commit/9b0d5f5)) +* **shortcodes:** add blockquote shortcode ([d57e535](https://git.habd.as/comfusion/after-dark/commit/d57e535)) +* **shortcodes:** add figure shortcode ([2c06d76](https://git.habd.as/comfusion/after-dark/commit/2c06d76)) +* **shortcodes:** add form attr to button ([86d4fee](https://git.habd.as/comfusion/after-dark/commit/86d4fee)) +* **shortcodes:** add hack progress bar component ([1933b45](https://git.habd.as/comfusion/after-dark/commit/1933b45)) +* **shortcodes:** add hackcss alert shortcode ([09720f8](https://git.habd.as/comfusion/after-dark/commit/09720f8)) +* **shortcodes:** add hackcss alert shortcode ([6f20f2d](https://git.habd.as/comfusion/after-dark/commit/6f20f2d)) +* **shortcodes:** add hackcss button group component ([af226e4](https://git.habd.as/comfusion/after-dark/commit/af226e4)) +* **shortcodes:** add hackcss button shortcode ([65fd4e3](https://git.habd.as/comfusion/after-dark/commit/65fd4e3)) +* **shortcodes:** add hackcss card component ([0787170](https://git.habd.as/comfusion/after-dark/commit/0787170)) +* **shortcodes:** add hackcss loading component ([e0165ed](https://git.habd.as/comfusion/after-dark/commit/e0165ed)) +* **shortcodes:** add hackcss progress component ([b475a47](https://git.habd.as/comfusion/after-dark/commit/b475a47)) +* **shortcodes:** add id attribute for forms ([a76dff1](https://git.habd.as/comfusion/after-dark/commit/a76dff1)) +* **shortcodes:** add navmenu ([87bd381](https://git.habd.as/comfusion/after-dark/commit/87bd381)), closes [#78](https://git.habd.as/comfusion/after-dark/issues/78) +* **shortcodes:** add navmenu navigational aid ([a333be4](https://git.habd.as/comfusion/after-dark/commit/a333be4)) +* **shortcodes:** add title attr to external ([9386ef4](https://git.habd.as/comfusion/after-dark/commit/9386ef4)) +* **shortcodes:** add type attribute for external links ([5c99a96](https://git.habd.as/comfusion/after-dark/commit/5c99a96)) +* **shortcodes:** add value attr to button ([6d63de4](https://git.habd.as/comfusion/after-dark/commit/6d63de4)) +* **shortcodes:** allow anonymous blockquotes ([256d15c](https://git.habd.as/comfusion/after-dark/commit/256d15c)) +* **shortcodes:** allow button disablement ([7bbf79b](https://git.habd.as/comfusion/after-dark/commit/7bbf79b)), closes [#65](https://git.habd.as/comfusion/after-dark/issues/65) +* **shortcodes:** trim whitespace in id attributes ([a5c5704](https://git.habd.as/comfusion/after-dark/commit/a5c5704)) +* **shortcodes/button:** add custom class support ([60fb9d2](https://git.habd.as/comfusion/after-dark/commit/60fb9d2)) +* **shortcodes/external:** add shorthand usage for named anchors ([0aa0585](https://git.habd.as/comfusion/after-dark/commit/0aa0585)) +* **snippets:** add external link snippet ([848cd33](https://git.habd.as/comfusion/after-dark/commit/848cd33)), closes [#48](https://git.habd.as/comfusion/after-dark/issues/48) +* **snippets:** alert user on invalid autocomplete value ([cabf33b](https://git.habd.as/comfusion/after-dark/commit/cabf33b)), closes [#46](https://git.habd.as/comfusion/after-dark/issues/46) +* **typography:** justify text output and hyphenate ([738aaaa](https://git.habd.as/comfusion/after-dark/commit/738aaaa)) + + +### BREAKING CHANGES + +* **license:** relicensing +* **feature/section-menu:** removes disqus entirely, previously a deprecated feature +* **shortcodes:** shortcodes removed must now be copied to the theme, if used +* **modules:** google analytics no longer supported +* hugo 0.43 and above required. css override file locations have changed +* **$archetypes:** Minimum Hugo version set 0.24, 0.16 - 0.23 must modify archetypes + +to upgrade add `date` and `title` to custom archetypes. if using a version of hugo prior to 0.24 the custom templates should remove `title` and `date` and not use go templating logic in the archetype files +* **$archetypes:** Minimum Hugo version set 0.24, 0.16 - 0.23 must modify archetypes +* **$hugo:** Forks and users who've customized css need adjustment as shown in the commit message. There's not a whole lot to it, but it's breaking nonetheless. + +Using this approach enables the CSS to be moved from the partials directory into the static +directory where it belonged the whole time. Perfect set-up for those who decide to use http2/h2 +server push for loading styles more efficiently. + + + + +## [7.4.1](https://git.habd.as/comfusion/after-dark/compare/v7.4.0...v7.4.1) (2019-04-28) + + +### Bug Fixes + +* **fuzzy-search:** handle search layout hotkey assignments properly ([b2c549e](https://git.habd.as/comfusion/after-dark/commits/b2c549e)) + + + + +# [7.4.0](https://git.habd.as/comfusion/after-dark/compare/v7.2.3...v7.4.0) (2019-04-28) + + +### Features + +* **fuzzy-search:** add ability to assign arbitrary hotkeys ([48a15c4](https://git.habd.as/comfusion/after-dark/commits/48a15c4)), closes [#74](https://git.habd.as/comfusion/after-dark/issues/74) +* **shortcode:** add trusted custom attr to external ([0c81ba7](https://git.habd.as/comfusion/after-dark/commits/0c81ba7)) + +**Note:** Shortcode update included again in this release with signed commmit + + +# [7.3.0](https://git.habd.as/comfusion/after-dark/compare/v7.2.3...v7.3.0) (2019-04-27) + + +### Features + +* **shortcode:** add trusted custom attr to external ([ba1d35e](https://git.habd.as/comfusion/after-dark/commits/ba1d35e)) + + + + +## [7.2.4](https://git.habd.as/comfusion/after-dark/compare/v7.2.3...v7.2.4) (2019-04-16) + +### Bug Fixes + +Fix issue to allow docs site to load + + +## [7.2.3](https://git.habd.as/comfusion/after-dark/compare/v7.2.2...v7.2.3) (2019-04-12) + +### But Fixes + +Fix remaining Hugo warnings masked before last release + + +## [7.2.2](https://git.habd.as/comfusion/after-dark/compare/v7.2.1...v7.2.2) (2019-04-12) + + +### Bug Fixes + +* **feature/web-feeds:** output last build date in rfc822 with 4-digit year ([c735feb](https://git.habd.as/comfusion/after-dark/commits/c735feb)) +* **shortcode/hackcss-alert:** restore legacy behavior for shortcode ([b127eeb](https://git.habd.as/comfusion/after-dark/commits/b127eeb)) + + + + +## [7.2.1](https://git.habd.as/comfusion/after-dark/compare/v7.2.0...v7.2.1) (2019-02-22) + + +### Bug Fixes + +* **layout/default:** workaround hugo bug on eval len(nil) go tmpl ([258c747](https://git.habd.as/comfusion/after-dark/commits/258c747)), closes [#135](https://git.habd.as/comfusion/after-dark/issues/135) + + + + +# [7.2.0](https://git.habd.as/comfusion/after-dark/compare/v7.0.1...v7.2.0) (2019-02-20) + + +### Features + +* **help/homepage:** update security featurette ([dcd0199](https://git.habd.as/comfusion/after-dark/commits/dcd0199)) +* **layouts:** add rss with full content ([fe99466](https://git.habd.as/comfusion/after-dark/commits/fe99466)) + + + +# [7.1.0](https://git.habd.as/comfusion/after-dark/compare/v7.0.3...v7.1.0) (2019-02-18) + + +### Features + +* **feature/security:** add content security policy ([de24354](https://git.habd.as/comfusion/after-dark/commits/de24354) + +### Bug Fixes + + +## [7.0.3](https://git.habd.as/comfusion/after-dark/compare/v7.0.2...v7.0.3) (2019-02-12) + +* **layout/default:** delegate module config to modules ([79f2a13](https://git.habd.as/comfusion/after-dark/commit/79f2a13)) + + +### Bug Fixes + + +## [7.0.2](https://git.habd.as/comfusion/after-dark/compare/v7.0.1...v7.0.2) (2019-02-12) + +* **feature/security:** restore gpg signing of commits and tags + + + +## [7.0.1](https://git.habd.as/comfusion/after-dark/compare/v7.0.0...v7.0.1) (2019-02-10) + + +### Bug Fixes + +* **partials/powered-by:** point to expected directory of refactored file ([f32207f](https://git.habd.as/comfusion/after-dark/commits/f32207f)) + + + + +# [7.0.0](https://git.habd.as/comfusion/after-dark/compare/v6.16.1...v7.0.0) (2019-02-08) + + +### Bug Fixes + +* **assets/css:** normalize base font-size, large screens ([862da61](https://git.habd.as/comfusion/after-dark/commits/862da61)) + + +### Features + +* **feature/section-menu:** add support for multiple nav menus ([427f9d2](https://git.habd.as/comfusion/after-dark/commits/427f9d2)) +* **feature/table-of-contents:** add native smooth-scroll ([94b13a1](https://git.habd.as/comfusion/after-dark/commits/94b13a1)), closes [#43](https://git.habd.as/comfusion/after-dark/issues/43) + + +### BREAKING CHANGES + +* **feature/section-menu:** removes disqus entirely, previously a deprecated feature + + + + +## [6.16.1](https://git.habd.as/comfusion/after-dark/compare/v6.16.0...v6.16.1) (2019-01-24) + + +### Bug Fixes + +* **feature/post-images:** fix yandex validation error ([93cc90f](https://git.habd.as/comfusion/after-dark/commits/93cc90f)) +* **feature/post-images:** zap extra whitespaces ([32767d9](https://git.habd.as/comfusion/after-dark/commits/32767d9)) + + + + +# [6.16.0](https://git.habd.as/comfusion/after-dark/compare/v6.15.1...v6.16.0) (2019-01-23) + + +### Bug Fixes + +* **assets/css:** normalize samp element font size with pre ([c42ccba](https://git.habd.as/comfusion/after-dark/commits/c42ccba)) +* **assets/css:** normalize whitespace around toc when post images present ([c3f37a5](https://git.habd.as/comfusion/after-dark/commits/c3f37a5)) + + +### Features + +* **feature/fuzzy-search:** add aria landmark to search form ([7a9b75a](https://git.habd.as/comfusion/after-dark/commits/7a9b75a)) +* **feature/post-images:** add image captions and structured data ([41f41e7](https://git.habd.as/comfusion/after-dark/commits/41f41e7)) +* **feature/section-menu:** add support for html link decoration ([7634b42](https://git.habd.as/comfusion/after-dark/commits/7634b42)) +* **shortcodes/external:** add shorthand usage for named anchors ([243d15a](https://git.habd.as/comfusion/after-dark/commits/243d15a)) + + + + +## [6.15.1](https://git.habd.as/comfusion/after-dark/compare/v6.15.0...v6.15.1) (2018-12-28) + + + + +# [6.15.0](https://git.habd.as/comfusion/after-dark/compare/v6.14.0...v6.15.0) (2018-12-11) + + +### Bug Fixes + +* **assets/theme:** normalize blockquote line-height with rest of document ([20ec883](https://git.habd.as/comfusion/after-dark/commits/20ec883)) + + +### Features + +* **layouts/shortcodes:** add grid and cell flexbox shortcode & snippet ([5bc322b](https://git.habd.as/comfusion/after-dark/commits/5bc322b)), closes [#67](https://git.habd.as/comfusion/after-dark/issues/67) +* **layouts/shortcodes:** add select shortcode, docs and example use ([71fff83](https://git.habd.as/comfusion/after-dark/commits/71fff83)) + + + + +# [6.14.0](https://git.habd.as/comfusion/after-dark/compare/v6.13.5...v6.14.0) (2018-11-21) + + +### Features + +* **layouts/*:** add cookie disclaimer ([e8d9f68](https://git.habd.as/comfusion/after-dark/commits/e8d9f68)) + + + + +## [6.13.5](https://git.habd.as/comfusion/after-dark/compare/v6.13.4...v6.13.5) (2018-11-19) + +* **package:** updated tagline and software purpose + + +## [6.13.4](https://git.habd.as/comfusion/after-dark/compare/v6.13.3...v6.13.4) (2018-11-05) + + +### Bug Fixes + +* **assets/css:** normalize size of help text on small viewports ([bc0e33f](https://git.habd.as/comfusion/after-dark/commits/bc0e33f)) + + +### Reverts + +* **help/home:** disable button wrapped in anchor tag ([88e4b17](https://git.habd.as/comfusion/after-dark/commits/88e4b17)) + + + + +## [6.13.3](https://git.habd.as/comfusion/after-dark/compare/v6.13.2...v6.13.3) (2018-10-18) + + +### Bug Fixes + +* **archetypes/validate:** swap string method for sha trim behavior ([70e2c47](https://git.habd.as/comfusion/after-dark/commits/70e2c47)), closes [#90](https://git.habd.as/comfusion/after-dark/issues/90) +* **assets/css:** unset ua default figure element margin ([46326bf](https://git.habd.as/comfusion/after-dark/commits/46326bf)) + + + + +## [6.13.2](https://git.habd.as/comfusion/after-dark/compare/v6.13.1...v6.13.2) (2018-10-15) + + +### Bug Fixes + +* **shortcode/navmenu:** improve microdata semantics & add test tool to docs ([4913934](https://git.habd.as/comfusion/after-dark/commits/4913934)), closes [#100](https://git.habd.as/comfusion/after-dark/issues/100) + + + + +## [6.13.1](https://git.habd.as/comfusion/after-dark/compare/v6.13.0...v6.13.1) (2018-10-12) + + + + +# [6.13.0](https://git.habd.as/comfusion/after-dark/compare/v6.12.7...v6.13.0) (2018-10-05) + + +### Bug Fixes + +* **layouts/partials:** add main menu display condition ([a8fb1cb](https://git.habd.as/comfusion/after-dark/commits/a8fb1cb)), closes [#78](https://git.habd.as/comfusion/after-dark/issues/78) +* **shortcodes/button:** allow name attribute & pass id as expected ([7aca084](https://git.habd.as/comfusion/after-dark/commits/7aca084)) + + +### Features + +* **module/toxic-swamp:** integrate module beta ([8f0bc30](https://git.habd.as/comfusion/after-dark/commits/8f0bc30)) +* **shortcodes/button:** add custom class support ([eb8f2db](https://git.habd.as/comfusion/after-dark/commits/eb8f2db)) + + + + +## [6.12.7](https://git.habd.as/comfusion/after-dark/compare/v6.12.6...v6.12.7) (2018-09-26) + + + + +## [6.12.6](https://git.habd.as/comfusion/after-dark/compare/v6.12.5...v6.12.6) (2018-09-25) + + + + +## [6.12.5](https://git.habd.as/comfusion/after-dark/compare/v6.12.4...v6.12.5) (2018-09-24) + + + + +## [6.12.4](https://git.habd.as/comfusion/after-dark/compare/v6.12.3...v6.12.4) (2018-09-23) + + +### Bug Fixes + +* **help/home:** add missing query string param to search link ([5b842f4](https://git.habd.as/comfusion/after-dark/commits/5b842f4)) + + + + +## [6.12.3](https://git.habd.as/comfusion/after-dark/compare/v6.12.2...v6.12.3) (2018-09-22) + + + + +## [6.12.2](https://git.habd.as/comfusion/after-dark/compare/v6.12.1...v6.12.2) (2018-09-22) + + + + +## [6.12.1](https://git.habd.as/comfusion/after-dark/compare/v6.12.0...v6.12.1) (2018-09-22) + + + + +# [6.12.0](https://git.habd.as/comfusion/after-dark/compare/v6.11.2...v6.12.0) (2018-09-22) + + +### Features + +* **scripts/upgrade:** prompt for update if metadata cannot be found ([b3a62ff](https://git.habd.as/comfusion/after-dark/commits/b3a62ff)) + + + + +## [6.11.2](https://git.habd.as/comfusion/after-dark/compare/v6.11.1...v6.11.2) (2018-09-22) + + +### Bug Fixes + +* **scripts:** add || to server shutdown ([f834a0d](https://git.habd.as/comfusion/after-dark/commits/f834a0d)) + + + + +## [6.11.1](https://git.habd.as/comfusion/after-dark/compare/v6.11.0...v6.11.1) (2018-09-22) + + +### Bug Fixes + +* **onboarding:** add explicit site port setting in install script ([64fefb2](https://git.habd.as/comfusion/after-dark/commits/64fefb2)) +* **onboarding:** serve site not help when starting site from installer ([384895b](https://git.habd.as/comfusion/after-dark/commits/384895b)) + + + + +# [6.11.0](https://git.habd.as/comfusion/after-dark/compare/v6.10.1...v6.11.0) (2018-09-21) + + +### Features + +* **onboarding:** streamline installation ([8a1cfee](https://git.habd.as/comfusion/after-dark/commits/8a1cfee)) + + + + +## [6.10.1](https://git.habd.as/comfusion/after-dark/compare/v6.10.0...v6.10.1) (2018-09-19) + + +### Bug Fixes + +* **help/home:** add performance info & undocumented features ([14c1faa](https://git.habd.as/comfusion/after-dark/commits/14c1faa)) + + + + +# [6.10.0](https://git.habd.as/comfusion/after-dark/compare/v6.9.7...v6.10.0) (2018-09-14) + + +### Features + +* **shortcodes:** add navmenu ([3e53c48](https://git.habd.as/comfusion/after-dark/commits/3e53c48)), closes [#78](https://git.habd.as/comfusion/after-dark/issues/78) + + + + +## [6.9.7](https://git.habd.as/comfusion/after-dark/compare/v6.9.6...v6.9.7) (2018-09-14) + + +### Bug Fixes + +* **layouts/partials:** move navmenu snippet into theme ([e432e5c](https://git.habd.as/comfusion/after-dark/commits/e432e5c)), closes [#78](https://git.habd.as/comfusion/after-dark/issues/78) + + + + +## [6.9.6](https://git.habd.as/comfusion/after-dark/compare/v6.9.5...v6.9.6) (2018-09-12) + + +### Bug Fixes + +* **archetypes:** fix broken links in post archetype ([9a46e86](https://git.habd.as/comfusion/after-dark/commits/9a46e86)) + + + + +## [6.9.5](https://git.habd.as/comfusion/after-dark/compare/v6.9.4...v6.9.5) (2018-09-12) + + +### Bug Fixes + +* **archetypes:** prevent internal links from opening in new window ([a5237a8](https://git.habd.as/comfusion/after-dark/commits/a5237a8)) + + + + +## [6.9.4](https://git.habd.as/comfusion/after-dark/compare/v6.9.3...v6.9.4) (2018-09-12) + + +### Bug Fixes + +* **archetypes:** close tag body on last external shortcode ([aa97ed3](https://git.habd.as/comfusion/after-dark/commits/aa97ed3)) + + + + +## [6.9.3](https://git.habd.as/comfusion/after-dark/compare/v6.9.2...v6.9.3) (2018-09-12) + + +### Bug Fixes + +* **scripts:** automatically stop running help servers on upgrade ([b6b9a56](https://git.habd.as/comfusion/after-dark/commits/b6b9a56)) + + + + +## [6.9.2](https://git.habd.as/comfusion/after-dark/compare/v6.9.1...v6.9.2) (2018-09-12) + + +### Bug Fixes + +* **archetypes:** default posts to display as published content ([b4fd2bf](https://git.habd.as/comfusion/after-dark/commits/b4fd2bf)) + + + + +## [6.9.1](https://git.habd.as/comfusion/after-dark/compare/v6.9.0...v6.9.1) (2018-09-12) + + + + +# [6.9.0](https://git.habd.as/comfusion/after-dark/compare/v6.8.0...v6.9.0) (2018-09-12) + + +### Features + +* **help:** multipage help docs ([0446f50](https://git.habd.as/comfusion/after-dark/commits/0446f50)), closes [#61](https://git.habd.as/comfusion/after-dark/issues/61) + + + + +# [6.8.0](https://git.habd.as/comfusion/after-dark/compare/v6.7.9...v6.8.0) (2018-09-08) + + +### Bug Fixes + +* **components:** correct help block class attr behavior ([8336029](https://git.habd.as/comfusion/after-dark/commits/8336029)) +* **help:** rename 404 to error page ([2191740](https://git.habd.as/comfusion/after-dark/commits/2191740)) +* **layouts:** remove navmenu from help layout ([4934a0c](https://git.habd.as/comfusion/after-dark/commits/4934a0c)) +* **partials:** make button onclick handler work as expected ([9998957](https://git.habd.as/comfusion/after-dark/commits/9998957)) +* **shortcodes:** remove insignificant spaces after external links ([1190b94](https://git.habd.as/comfusion/after-dark/commits/1190b94)) +* **shortcodes:** remove standard link treatment from figures ([abade6f](https://git.habd.as/comfusion/after-dark/commits/abade6f)) +* **styles:** leftpad orderd lists ([579404e](https://git.habd.as/comfusion/after-dark/commits/579404e)) + + +### Features + +* **layouts/search:** and placeholder and allow basic customization ([e4df3a5](https://git.habd.as/comfusion/after-dark/commits/e4df3a5)) +* **shortcodes:** add form attr to button ([f04ea28](https://git.habd.as/comfusion/after-dark/commits/f04ea28)) +* **shortcodes:** add id attribute for forms ([10f1024](https://git.habd.as/comfusion/after-dark/commits/10f1024)) +* **shortcodes:** add navmenu navigational aid ([aa46ed3](https://git.habd.as/comfusion/after-dark/commits/aa46ed3)) +* **shortcodes:** add title attr to external ([ce451e4](https://git.habd.as/comfusion/after-dark/commits/ce451e4)) +* **shortcodes:** add type attribute for external links ([d80b1f3](https://git.habd.as/comfusion/after-dark/commits/d80b1f3)) +* **shortcodes:** add value attr to button ([fbf744e](https://git.habd.as/comfusion/after-dark/commits/fbf744e)) +* **shortcodes:** allow anonymous blockquotes ([3ad1f04](https://git.habd.as/comfusion/after-dark/commits/3ad1f04)) +* **shortcodes:** allow button disablement ([f145780](https://git.habd.as/comfusion/after-dark/commits/f145780)), closes [#65](https://git.habd.as/comfusion/after-dark/issues/65) +* **shortcodes:** trim whitespace in id attributes ([523b2a1](https://git.habd.as/comfusion/after-dark/commits/523b2a1)) + + +### Performance Improvements + +* **search:** increase specificity of v-cloak declaration ([35eed67](https://git.habd.as/comfusion/after-dark/commits/35eed67)) + + + + +## [6.7.9](https://git.habd.as/comfusion/after-dark/compare/v6.7.8...v6.7.9) (2018-09-07) + +### Bug Fixes + +* **styles:** prevent jumping scrollbar in windows ([9d2beec](https://git.habd.as/comfusion/after-dark/commit/9d2beec93c72b6145507f850689eae3a64cf22f0)), closes #72 (thanks @tkalpakidis) + + +## [6.7.8](https://git.habd.as/comfusion/after-dark/compare/v6.7.7...v6.7.8) (2018-08-30) + + + + +## [6.7.7](https://git.habd.as/comfusion/after-dark/compare/v6.7.6...v6.7.7) (2018-08-27) + + +### Bug Fixes + +* **help:** change 404 page to error page and improve script perf ([f95aaa3](https://git.habd.as/comfusion/after-dark/commits/f95aaa3)), closes [#43](https://git.habd.as/comfusion/after-dark/issues/43) + + + + +## [6.7.6](https://git.habd.as/comfusion/after-dark/compare/v6.7.5...v6.7.6) (2018-08-27) + + +### Bug Fixes + +* **scripts:** always regnerate help docs ([90b0f21](https://git.habd.as/comfusion/after-dark/commits/90b0f21)) + + + + +## [6.7.5](https://git.habd.as/comfusion/after-dark/compare/v6.7.4...v6.7.5) (2018-08-27) + + +### Bug Fixes + +* **scripts:** resolve help doc path lookups when no custom content dir ([300add1](https://git.habd.as/comfusion/after-dark/commits/300add1)) + + + + +## [6.7.4](https://git.habd.as/comfusion/after-dark/compare/v6.7.3...v6.7.4) (2018-08-27) + + +### Bug Fixes + +* **scripts:** remove help before generating on upgrade ([56b7543](https://git.habd.as/comfusion/after-dark/commits/56b7543)) + + + + +## [6.7.3](https://git.habd.as/comfusion/after-dark/compare/v6.7.2...v6.7.3) (2018-08-27) + + +### Bug Fixes + +* **scripts:** address error generating docs after upgrade ([3119918](https://git.habd.as/comfusion/after-dark/commits/3119918)) + + + + +## [6.7.2](https://git.habd.as/comfusion/after-dark/compare/v6.7.1...v6.7.2) (2018-08-27) + + +### Bug Fixes + +* **scripts:** resolve tar cd issue ([5fa2591](https://git.habd.as/comfusion/after-dark/commits/5fa2591)) + + + + +## [6.7.1](https://git.habd.as/comfusion/after-dark/compare/v6.7.0...v6.7.1) (2018-08-27) + + +### Bug Fixes + +* **scripts:** resolve syntax bugs in script ([f7bfb04](https://git.habd.as/comfusion/after-dark/commits/f7bfb04)) + + + + +# [6.7.0](https://git.habd.as/comfusion/after-dark/compare/v6.6.4...v6.7.0) (2018-08-27) + + +### Bug Fixes + +* **scripts:** update install to place theme metadata in theme data folder ([66168a1](https://git.habd.as/comfusion/after-dark/commits/66168a1)), closes [#59](https://git.habd.as/comfusion/after-dark/issues/59) + + +### Features + +* **scripts:** add theme upgrade script ([6415250](https://git.habd.as/comfusion/after-dark/commits/6415250)), closes [#59](https://git.habd.as/comfusion/after-dark/issues/59) +* **scripts:** support custom content dirs in config file ([adf90bc](https://git.habd.as/comfusion/after-dark/commits/adf90bc)), closes [#59](https://git.habd.as/comfusion/after-dark/issues/59) + + + + +## [6.6.4](https://git.habd.as/comfusion/after-dark/compare/v6.6.3...v6.6.4) (2018-08-27) + +### Security + +* **build:** enclose release tag sha512 in delimeters +([543d32d](https://git.habd.as/comfusion/after-dark/commit/543d32d)) + + +## [6.6.3](https://git.habd.as/comfusion/after-dark/compare/v6.6.1...v6.6.3) (2018-08-27) + +### Security + +* **build:** append sha512 to release tag and self-sign +([112f616](https://git.habd.as/comfusion/after-dark/commits/112f616)) + + +## [6.6.2](https://git.habd.as/comfusion/after-dark/compare/v6.6.1...v6.6.2) (2018-08-26) + +### Security + +* **build:** add sha512 digest to git tags and gpg sign them +([35457ab](https://git.habd.as/comfusion/after-dark/commits/35457ab)) + + +## [6.6.1](https://git.habd.as/comfusion/after-dark/compare/v6.6.0...v6.6.1) (2018-08-26) + + +### Bug Fixes + +* **snippets:** reverse logic for external link styling ([0fcf238](https://git.habd.as/comfusion/after-dark/commits/0fcf238)) + + + + +# [6.6.0](https://git.habd.as/comfusion/after-dark/compare/v6.5.2...v6.6.0) (2018-08-25) + + +### Features + +* **help:** update and run help anytime using included script ([206bfdc](https://git.habd.as/comfusion/after-dark/commits/206bfdc)) +* **snippets:** add external link snippet ([7c885f3](https://git.habd.as/comfusion/after-dark/commits/7c885f3)), closes [#48](https://git.habd.as/comfusion/after-dark/issues/48) + + + + +## [6.5.2](https://git.habd.as/comfusion/after-dark/compare/v6.5.1...v6.5.2) (2018-08-24) + + +### Bug Fixes + +* **install:** wait 1 second before serving help for docs to expire ([8e9e312](https://git.habd.as/comfusion/after-dark/commits/8e9e312)) + + + + +## [6.5.1](https://git.habd.as/comfusion/after-dark/compare/v6.5.0...v6.5.1) (2018-08-24) + + +### Bug Fixes + +* **install:** remove unexpected line in theme config ([a5eb197](https://git.habd.as/comfusion/after-dark/commits/a5eb197)) + + + + +# [6.5.0](https://git.habd.as/comfusion/after-dark/compare/v6.4.1...v6.5.0) (2018-08-24) + + +### Bug Fixes + +* **install:** stop copying all archetypes to site ([210412b](https://git.habd.as/comfusion/after-dark/commits/210412b)), closes [#45](https://git.habd.as/comfusion/after-dark/issues/45) + + +### Features + +* **install:** faux install validation using npm sha512 digest ([5a8dec0](https://git.habd.as/comfusion/after-dark/commits/5a8dec0)), closes [#33](https://git.habd.as/comfusion/after-dark/issues/33) +* **snippets:** alert user on invalid autocomplete value ([1105e20](https://git.habd.as/comfusion/after-dark/commits/1105e20)), closes [#46](https://git.habd.as/comfusion/after-dark/issues/46) + + + + +## [6.4.1](https://git.habd.as/comfusion/after-dark/compare/v6.4.0...v6.4.1) (2018-08-22) + + + + +# [6.4.0](https://git.habd.as/comfusion/after-dark/compare/v6.3.0...v6.4.0) (2018-08-20) + + +### Bug Fixes + +* **install:** remove useful snippets content ([c224977](https://git.habd.as/comfusion/after-dark/commits/c224977)) + + +### Features + +* **install:** provide welcome post with online help ([c8f729a](https://git.habd.as/comfusion/after-dark/commits/c8f729a)) + + + + +# [6.3.0](https://git.habd.as/comfusion/after-dark/compare/v6.2.0...v6.3.0) (2018-08-19) + + +### Bug Fixes + +* **snippets:** add name attribute to form ([078ee4d](https://git.habd.as/comfusion/after-dark/commits/078ee4d)) + + +### Features + +* **install:** add installation challenge ([9b6106c](https://git.habd.as/comfusion/after-dark/commits/9b6106c)) + + + + +# [6.2.0](https://git.habd.as/comfusion/after-dark/compare/v6.1.1...v6.2.0) (2018-08-18) + + +### Bug Fixes + +* **bin:** remove preview script ([5ac1c12](https://git.habd.as/comfusion/after-dark/commits/5ac1c12)), closes [#38](https://git.habd.as/comfusion/after-dark/issues/38) +* **layouts:** stop outputting trim color if none present ([fe58bed](https://git.habd.as/comfusion/after-dark/commits/fe58bed)) + + +### Features + +* **layouts:** provide form builder snippets ([c49d086](https://git.habd.as/comfusion/after-dark/commits/c49d086)) + + + + +## [6.1.1](https://git.habd.as/comfusion/after-dark/compare/v6.1.0...v6.1.1) (2018-08-14) + + +### Bug Fixes + +* **personalization:** rename accent color to trim color ([88cd373](https://git.habd.as/comfusion/after-dark/commits/88cd373)) + + + + +# [6.1.0](https://git.habd.as/comfusion/after-dark/compare/v6.0.1...v6.1.0) (2018-08-13) + + +### Bug Fixes + +* **layouts:** move inline-level content in navs inside

([1b0187d](https://git.habd.as/comfusion/after-dark/commits/1b0187d)) + + +### Features + +* **personalization:** add customizable accent colors ([bf251a6](https://git.habd.as/comfusion/after-dark/commits/bf251a6)) + + + + +## [6.0.1](https://git.habd.as/comfusion/after-dark/compare/v6.0.0...v6.0.1) (2018-08-12) + + +### Bug Fixes + +* **layouts/search:** unblock blocking scripts and add command terminators ([7802937](https://git.habd.as/comfusion/after-dark/commits/7802937)), closes [#14](https://git.habd.as/comfusion/after-dark/issues/14) + + + + +# [6.0.0](https://git.habd.as/comfusion/after-dark/compare/v5.5.1...v6.0.0) (2018-08-12) + + +### Bug Fixes + +* **shortcodes:** remove privacytube and coub shortcodes ([ada8286](https://git.habd.as/comfusion/after-dark/commits/ada8286)), closes [#35](https://git.habd.as/comfusion/after-dark/issues/35) + + +### BREAKING CHANGES + +* **shortcodes:** shortcodes removed must now be copied to the theme, if used + + + + +## [5.5.1](https://git.habd.as/comfusion/after-dark/compare/v5.5.0...v5.5.1) (2018-08-11) + + +### Bug Fixes + +* **install:** restore android support ([d3b2ab0](https://git.habd.as/comfusion/after-dark/commits/d3b2ab0)), closes [#25](https://git.habd.as/comfusion/after-dark/issues/25) + + + + +# [5.5.0](https://git.habd.as/comfusion/after-dark/compare/v5.4.0...v5.5.0) (2018-08-10) + + +### Bug Fixes + +* **assets:** stop treating all permalinks as external ([d5e8e33](https://git.habd.as/comfusion/after-dark/commits/d5e8e33)) + + +### Features + +* **layout,install:** add automatic syntax highlighting ([3eed5dd](https://git.habd.as/comfusion/after-dark/commits/3eed5dd)) + + + + +# [5.4.0](https://git.habd.as/comfusion/after-dark/compare/v5.3.1...v5.4.0) (2018-08-04) + + +### Features + +* **modules:** add hall of mirrors ([882c32d](https://git.habd.as/comfusion/after-dark/commits/882c32d)), closes [#24](https://git.habd.as/comfusion/after-dark/issues/24) + + + + +## [5.3.1](https://git.habd.as/comfusion/after-dark/compare/v5.3.0...v5.3.1) (2018-08-01) + + +### Bug Fixes + +* **layouts:** show sarcastic message when no pages exist ([e5ce3b9](https://git.habd.as/comfusion/after-dark/commits/e5ce3b9)) + + + + +# [5.3.0](https://git.habd.as/comfusion/after-dark/compare/v5.2.6...v5.3.0) (2018-08-01) + + +### Bug Fixes + +* **install:** kill hugo server always ([abadfbf](https://git.habd.as/comfusion/after-dark/commits/abadfbf)) +* **install:** move kill command to eof ([a87a381](https://git.habd.as/comfusion/after-dark/commits/a87a381)) + + +### Features + +* **bin:** add script to preview site online over https ([51baf0c](https://git.habd.as/comfusion/after-dark/commits/51baf0c)), closes [#21](https://git.habd.as/comfusion/after-dark/issues/21) + + + + +## [5.2.6](https://git.habd.as/comfusion/after-dark/compare/v5.2.5...v5.2.6) (2018-07-31) + + +### Bug Fixes + +* **install:** support both gnu and bsd grep ([35defb7](https://git.habd.as/comfusion/after-dark/commits/35defb7)) + + + + +## [5.2.5](https://git.habd.as/comfusion/after-dark/compare/v5.2.3...v5.2.5) (2018-07-31) + + +### Bug Fixes + +* **install:** install packages from npm ([65c4e99](https://git.habd.as/comfusion/after-dark/commits/65c4e99)) +* **install:** standardize install script ([aca07cc](https://git.habd.as/comfusion/after-dark/commits/aca07cc)), closes [#19](https://git.habd.as/comfusion/after-dark/issues/19) +* **install:** update example base url ([da73a2f](https://git.habd.as/comfusion/after-dark/commits/da73a2f)) +* **install:** use latest version from npm dist tags ([7afe7b9](https://git.habd.as/comfusion/after-dark/commits/7afe7b9)) + + + + +## [5.2.4](https://git.habd.as/comfusion/after-dark/compare/v5.2.3...v5.2.4) (2018-07-31) + + +### Bug Fixes + +* **install:** install packages from npm ([65c4e99](https://git.habd.as/comfusion/after-dark/commits/65c4e99)) +* **install:** standardize install script ([aca07cc](https://git.habd.as/comfusion/after-dark/commits/aca07cc)), closes [#19](https://git.habd.as/comfusion/after-dark/issues/19) + + + + +## [5.2.3](https://git.habd.as/comfusion/after-dark/compare/v5.2.2...v5.2.3) (2018-07-29) + +### Bug Fixes + +* **theme:** just kidding. remove white theme variant ([d73693c](https://git.habd.as/comfusion/after-dark/commits/d73693c)) + + +## [5.2.2](https://git.habd.as/comfusion/after-dark/compare/v5.2.1...v5.2.2) (2018-07-29) + + +### Bug Fixes + +* **theme:** enable white theme variant ([3f8f000](https://git.habd.as/comfusion/after-dark/commits/3f8f000)) + + + + +## [5.2.1](https://git.habd.as/comfusion/after-dark/compare/v5.2.0...v5.2.1) (2018-07-26) + + +### Bug Fixes + +* **install:** remove git cruft & supply actual module name ([a0097a0](https://git.habd.as/comfusion/after-dark/commits/a0097a0)) + + + + +# [5.2.0](https://git.habd.as/comfusion/after-dark/compare/v5.1.0...v5.2.0) (2018-07-26) + + +### Features + +* **install:** streamline installation ([abf92fe](https://git.habd.as/comfusion/after-dark/commits/abf92fe)), closes [#2](https://git.habd.as/comfusion/after-dark/issues/2) + + + + +# [5.1.0](https://git.habd.as/comfusion/after-dark/compare/v5.0.0...v5.1.0) (2018-07-24) + + +### Features + +* **modules:** add fractal forest module for bpg image format support ([8aa35b2](https://git.habd.as/comfusion/after-dark/commits/8aa35b2)), closes [#8](https://git.habd.as/comfusion/after-dark/issues/8) + + + + +# [5.0.0](https://git.habd.as/comfusion/after-dark/compare/v4.1.0...v5.0.0) (2018-07-21) + + +### Features + +* **modules:** add analytics module ([9334f15](https://git.habd.as/comfusion/after-dark/commits/9334f15)), closes [#1](https://git.habd.as/comfusion/after-dark/issues/1) + + +### BREAKING CHANGES + +* **modules:** google analytics no longer supported + + + + +# [4.1.0](https://git.habd.as/comfusion/after-dark/compare/v4.0.2...v4.1.0) (2018-07-19) + + +### Features + +* select theme variant directly from site config ([aa82f5d](https://git.habd.as/comfusion/after-dark/commit/aa82f5d)), closes [#6](https://git.habd.as/comfusion/after-dark/issues/6) + + +### BREAKING CHANGES + +* hugo 0.43 and above required. css override file locations have changed + + + + +## 4.0.2 (2018-07-18) + + +### Bug Fixes + +* **install:** update default open graph image ([aaaf64e](https://git.habd.as/comfusion/after-dark/commit/aaaf64e)) +* **layouts:** output urls relative to baseurl ([2d278dd](https://git.habd.as/comfusion/after-dark/commit/2d278dd)), closes [#4](https://git.habd.as/comfusion/after-dark/issues/4) +* **layouts:** restore smooth scrolling to toc links ([89a9c8d](https://git.habd.as/comfusion/after-dark/commit/89a9c8d)) + + + + +## [4.0.1](https://git.habd.as/comfusion/after-dark/compare/v4.0.0...v4.0.1) (2018-07-18) + + +### Bug Fixes + +* **hugo:** require 0.44 at minimum ([78a09c8](https://git.habd.as/comfusion/after-dark/commits/78a09c8)) + + + + +# [4.0.0](https://git.habd.as/comfusion/after-dark/compare/v3.10.1...v4.0.0) (2018-07-09) + + + + +## [3.10.1](https://git.habd.as/comfusion/after-dark/compare/v3.10.0...v3.10.1) (2018-07-09) + + + + +# [3.10.0](https://github.com/comfusion/after-dark/compare/v3.9.1...v3.10.0) (2018-06-18) + + +### Bug Fixes + +* **$layouts:** resolve search layout header display ([9eee69c](https://github.com/comfusion/after-dark/commit/9eee69c)), closes [#104](https://github.com/comfusion/after-dark/issues/104) + + +### Features + +* **$layout:** add telegram iv support ([4d520f9](https://github.com/comfusion/after-dark/commit/4d520f9)), closes [#113](https://github.com/comfusion/after-dark/issues/113) + + + + +## [3.9.2](https://github.com/comfusion/after-dark/compare/v3.9.1...v3.9.2) (2018-06-09) + + +### Bug Fixes + +* **$layouts:** resolve search layout header display ([9eee69c](https://github.com/comfusion/after-dark/commit/9eee69c)), closes [#104](https://github.com/comfusion/after-dark/issues/104) + + + + +## [3.9.1](https://github.com/comfusion/after-dark/compare/v3.9.0...v3.9.1) (2018-05-13) + + +### Bug Fixes + +* **$layouts:** hide search app when noscript ([c3bcff0](https://github.com/comfusion/after-dark/commit/c3bcff0)) + + + + +# [3.9.0](https://github.com/comfusion/after-dark/compare/v3.8.4...v3.9.0) (2018-05-03) + + +### Features + +* **$layouts:** allow customization of referrer policy and add privacy-focused default ([5759a30](https://github.com/comfusion/after-dark/commit/5759a30)), closes [#96](https://github.com/comfusion/after-dark/issues/96) + + + + +## [3.8.4](https://github.com/comfusion/after-dark/compare/v3.8.3...v3.8.4) (2018-05-01) + + +### Bug Fixes + +* **$layouts:** prevent js error on search form submit ([0dce741](https://github.com/comfusion/after-dark/commit/0dce741)), closes [#94](https://github.com/comfusion/after-dark/issues/94) + + + + +## [3.8.3](https://github.com/comfusion/after-dark/compare/v3.8.2...v3.8.3) (2018-04-16) + + +### Bug Fixes + +* **$layouts:** improve search input focus and usability ([e94f6df](https://github.com/comfusion/after-dark/commit/e94f6df)), closes [#91](https://github.com/comfusion/after-dark/issues/91) + + + + +## [3.8.2](https://github.com/comfusion/after-dark/compare/v3.8.1...v3.8.2) (2018-04-16) + + +### Bug Fixes + +* **$layouts:** disable ua input styling safari mobile ([f7c81f4](https://github.com/comfusion/after-dark/commit/f7c81f4)) +* **$layouts:** prevent auto-zoom on safari mobile ([81c3f39](https://github.com/comfusion/after-dark/commit/81c3f39)) + + + + +## [3.8.1](https://github.com/comfusion/after-dark/compare/v3.8.0...v3.8.1) (2018-04-15) + + +### Bug Fixes + +* **$layouts:** remove duplicate descriptor from post image srcset ([0295370](https://github.com/comfusion/after-dark/commit/0295370)) + + + + +# [3.8.0](https://github.com/comfusion/after-dark/compare/v3.7.0...v3.8.0) (2018-04-15) + + +### Features + +* **$layouts:** add fuzzy search ([93d2a29](https://github.com/comfusion/after-dark/commit/93d2a29)), closes [#83](https://github.com/comfusion/after-dark/issues/83) + + + + +# [3.7.0](https://github.com/comfusion/after-dark/compare/v3.6.0...v3.7.0) (2018-03-25) + + +### Features + +* **$layouts:** add post images ([06457bc](https://github.com/comfusion/after-dark/commit/06457bc)) + + + + +# [3.6.0](https://github.com/comfusion/after-dark/compare/v3.5.1...v3.6.0) (2018-03-22) + + +### Bug Fixes + +* **$style:** add more whitespace on list pages and darken muted text ([646e98b](https://github.com/comfusion/after-dark/commit/646e98b)) + + +### Features + +* **$layouts:** add twitter cards ([6562e80](https://github.com/comfusion/after-dark/commit/6562e80)), closes [#76](https://github.com/comfusion/after-dark/issues/76) + + + + +## [3.5.1](https://github.com/comfusion/after-dark/compare/v3.5.0...v3.5.1) (2018-01-17) + + +### Bug Fixes + +* **$style:** fix a whitespace issue near the readmore link ([dee3530](https://github.com/comfusion/after-dark/commit/dee3530)), closes [#70](https://github.com/comfusion/after-dark/issues/70) + + + + +# [3.5.0](https://github.com/comfusion/after-dark/compare/v3.4.0...v3.5.0) (2017-11-08) + + +### Features + +* **$shortcodes:** add youtube without cookies ([613e545](https://github.com/comfusion/after-dark/commit/613e545)), closes [#62](https://github.com/comfusion/after-dark/issues/62) + + + + +# [3.4.0](https://github.com/comfusion/after-dark/compare/v3.3.0...v3.4.0) (2017-10-27) + + +### Features + +* **$shortcode:** add coub shortcode for gifs with sound ([0267d5b](https://github.com/comfusion/after-dark/commit/0267d5b)), closes [#63](https://github.com/comfusion/after-dark/issues/63) + + + + +# [3.3.0](https://github.com/comfusion/after-dark/compare/v3.2.0...v3.3.0) (2017-10-13) + + +### Features + +* **$layouts:** hide related content reading time on small screen ([480d57a](https://github.com/comfusion/after-dark/commit/480d57a)) +* **$partials:** add pubdate structured data to post byline ([a3bcb0c](https://github.com/comfusion/after-dark/commit/a3bcb0c)) + + + + +# [3.2.0](https://github.com/comfusion/after-dark/compare/v3.1.1...v3.2.0) (2017-10-06) + + +### Bug Fixes + +* **$shortcodes:** fix issue with external link appearance ([afcc8e6](https://github.com/comfusion/after-dark/commit/afcc8e6)) + + +### Features + +* **$layout:** add base element to base layout ([bf25c67](https://github.com/comfusion/after-dark/commit/bf25c67)), closes [#60](https://github.com/comfusion/after-dark/issues/60) +* **$shortcode:** style cite element inside block quotation ([65a4278](https://github.com/comfusion/after-dark/commit/65a4278)) +* **$shortcodes:** add frame targeting to custom figure shortcode ([a66b076](https://github.com/comfusion/after-dark/commit/a66b076)) +* **$shortcodes:** enable target and method control for button/buttongroup ([f705d19](https://github.com/comfusion/after-dark/commit/f705d19)), closes [#56](https://github.com/comfusion/after-dark/issues/56) +* **$shortcodes:** make button shortcode clickable ([1bc643f](https://github.com/comfusion/after-dark/commit/1bc643f)), closes [#40](https://github.com/comfusion/after-dark/issues/40) + + +### Reverts + +* **$layout:** add base element to base layout ([769e2d9](https://github.com/comfusion/after-dark/commit/769e2d9)) + + + + +## [3.1.1](https://github.com/comfusion/after-dark/compare/v3.1.0...v3.1.1) (2017-09-13) + + +### Bug Fixes + +* **$layouts:** fix error calling partial in related content ([8a6253d](https://github.com/comfusion/after-dark/commit/8a6253d)), closes [#55](https://github.com/comfusion/after-dark/issues/55) + + + + +# [3.1.0](https://github.com/comfusion/after-dark/compare/v3.0.0...v3.1.0) (2017-09-13) + + +### Features + +* **$layouts:** use related content feature introduced in hugo@0.27 ([f0474f4](https://github.com/comfusion/after-dark/commit/f0474f4)), closes [#54](https://github.com/comfusion/after-dark/issues/54) + + + + +# [3.0.0](https://github.com/comfusion/after-dark/compare/v2.1.1...v3.0.0) (2017-09-13) + + +### Features + +* **$archetypes:** turn archetypes into go templates ([5ed2d9f](https://github.com/comfusion/after-dark/commit/5ed2d9f)) + +### BREAKING CHANGES + +* **$archetypes:** Minimum Hugo version set 0.24, 0.16 - 0.23 must modify archetypes + +to upgrade add `date` and `title` to custom archetypes. if using a version of hugo prior to 0.24 the custom templates should remove `title` and `date` and not use go templating logic in the archetype files + + + + +## [2.1.1](https://github.com/comfusion/after-dark/compare/v2.1.0...v2.1.1) (2017-09-11) + + +### Bug Fixes + +* **$layouts:** move stylesheets back to partials, reorganize files ([b93b4a7](https://github.com/comfusion/after-dark/commit/b93b4a7)), closes [#50](https://github.com/comfusion/after-dark/issues/50) + + + + +# [2.1.0](https://github.com/comfusion/after-dark/compare/v2.0.0...v2.1.0) (2017-09-09) + + +### Bug Fixes + +* **$images:** improve bpg image support ([7681dde](https://github.com/comfusion/after-dark/commit/7681dde)), closes [#48](https://github.com/comfusion/after-dark/issues/48) + + +### Features + +* **$layout:** Add support for external stylesheets ([9abe627](https://github.com/comfusion/after-dark/commit/9abe627)), closes [#49](https://github.com/comfusion/after-dark/issues/49) + + + + +# [2.0.0](https://github.com/comfusion/after-dark/compare/v1.8.4...v2.0.0) (2017-09-08) + + +### Features + +* **$theme:** add support for bpg image format ([49204d0](https://github.com/comfusion/after-dark/commit/49204d0)) + +### BREAKING CHANGES + +* **$build:** inline css using readFile template function ([3787d10](https://github.com/comfusion/after-dark/commit/3787d10)) + +to upgrade skip this release and move directly to 2.1.1 or a later release + + +## [1.8.4](https://github.com/comfusion/after-dark/compare/v1.8.3...v1.8.4) (2017-06-27) + + +### Bug Fixes + +* **$layouts:** add support for protocol-relative base urls ([755f446](https://github.com/comfusion/after-dark/commit/755f446)), closes [#37](https://github.com/comfusion/after-dark/issues/37) + + + + +## [1.8.3](https://github.com/comfusion/after-dark/compare/v1.8.2...v1.8.3) (2017-06-22) + + +### Bug Fixes + +* **$layouts:** remove iframe borders by default ([3b4f7c1](https://github.com/comfusion/after-dark/commit/3b4f7c1)) + + + + +## [1.8.2](https://github.com/comfusion/after-dark/compare/v1.8.1...v1.8.2) (2017-06-09) + + +### Reverts + +* **layouts:** update powered-by to link to new theme site ([2237ead](https://github.com/comfusion/after-dark/commit/2237ead)) + + + + +## [1.8.1](https://github.com/comfusion/after-dark/compare/v1.8.0...v1.8.1) (2017-06-07) + + +### Bug Fixes + +* **$layouts:** update powered-by to link to new theme site ([c031934](https://github.com/comfusion/after-dark/commit/c031934)) + + + + +# [1.8.0](https://github.com/comfusion/after-dark/compare/v1.7.6...v1.8.0) (2017-06-06) + + +### Features + +* **LICENSE:** you just do what the fuck you want to ([c2eb957](https://github.com/comfusion/after-dark/commit/c2eb957)) + + + + +## [1.7.6](https://github.com/comfusion/after-dark/compare/v1.7.2...v1.7.6) (2017-06-06) + +#### Licensing + +Upgraded to The Unlicense, skipping for patch releases. + + +## [1.7.2](https://github.com/comfusion/after-dark/compare/v1.7.1...v1.7.2) (2017-05-14) + + +### Bug Fixes + +* **install:** move it back to bin ([13441f5](https://github.com/comfusion/after-dark/commit/13441f5)) + + + + +## [1.7.1](https://github.com/comfusion/after-dark/compare/v1.7.0...v1.7.1) (2017-05-13) + + +### Bug Fixes + +* **install:** move to scripts folder ([204e516](https://github.com/comfusion/after-dark/commit/204e516)) + + + + +# [1.7.0](https://github.com/comfusion/after-dark/compare/v1.6.1...v1.7.0) (2017-05-08) + + +### Bug Fixes + +* **install:** improve install experience ([4a30955](https://github.com/comfusion/after-dark/commit/4a30955)) + + +### Features + +* **shortcodes:** add hack progress bar component ([dda60f2](https://github.com/comfusion/after-dark/commit/dda60f2)) +* **shortcodes:** add hackcss alert shortcode ([6ed1c58](https://github.com/comfusion/after-dark/commit/6ed1c58)) +* **shortcodes:** add hackcss alert shortcode ([eebe7a9](https://github.com/comfusion/after-dark/commit/eebe7a9)) +* **shortcodes:** add hackcss button group component ([1f90e2d](https://github.com/comfusion/after-dark/commit/1f90e2d)) +* **shortcodes:** add hackcss button shortcode ([829cb7d](https://github.com/comfusion/after-dark/commit/829cb7d)) +* **shortcodes:** add hackcss card component ([4526c60](https://github.com/comfusion/after-dark/commit/4526c60)) +* **shortcodes:** add hackcss loading component ([6f667e8](https://github.com/comfusion/after-dark/commit/6f667e8)) +* **shortcodes:** add hackcss progress component ([4e99c75](https://github.com/comfusion/after-dark/commit/4e99c75)) + + + + +## [1.6.1](https://github.com/comfusion/after-dark/compare/v1.6.0...v1.6.1) (2017-05-05) + + +### Bug Fixes + +* **typography:** remove text justification and hyphenation ([8fdbe2f](https://github.com/comfusion/after-dark/commit/8fdbe2f)) + + + + +# [1.6.0](https://github.com/comfusion/after-dark/compare/v1.5.2...v1.6.0) (2017-05-03) + + +### Bug Fixes + +* **install:** add flags for theme setup script ([01ad1ee](https://github.com/comfusion/after-dark/commit/01ad1ee)) +* **layouts:** use relative urls in post byline taxonomy links ([419752d](https://github.com/comfusion/after-dark/commit/419752d)) + + +### Features + +* **install:** simplify installation ([765dcb8](https://github.com/comfusion/after-dark/commit/765dcb8)) + + + + +## [1.5.2](https://github.com/comfusion/after-dark/compare/v1.5.1...v1.5.2) (2017-04-30) + + +### Bug Fixes + +* **typography:** only justify and hyphenate article bodies ([ed83bee](https://github.com/comfusion/after-dark/commit/ed83bee)) + + + + +## [1.5.1](https://github.com/comfusion/after-dark/compare/v1.5.0...v1.5.1) (2017-04-20) + + +### Bug Fixes + +* **typography:** stop justifying and hyphenating text on small viewports ([77c6033](https://github.com/comfusion/after-dark/commit/77c6033)) + + + + +# [1.5.0](https://github.com/comfusion/after-dark/compare/v1.4.0...v1.5.0) (2017-04-16) + + +### Bug Fixes + +* **links:** style external links in all browsers ([ccef559](https://github.com/comfusion/after-dark/commit/ccef559)), closes [#22](https://github.com/comfusion/after-dark/issues/22) +* **partials:** fix markup validation error ([c82fc66](https://github.com/comfusion/after-dark/commit/c82fc66)) + + +### Features + +* **layouts:** add support for hugo 0.20.2 ([eba70c9](https://github.com/comfusion/after-dark/commit/eba70c9)), closes [#28](https://github.com/comfusion/after-dark/issues/28) +* **typography:** justify text output and hyphenate ([4775618](https://github.com/comfusion/after-dark/commit/4775618)) + + +### Performance Improvements + +* **favicon:** add svg favicon ([b3b0008](https://github.com/comfusion/after-dark/commit/b3b0008)) +* **install:** remove design resources ([6eb145d](https://github.com/comfusion/after-dark/commit/6eb145d)) + + +### Reverts + +* **docs(README:** remove erroneous markdown file): ([925ed3e](https://github.com/comfusion/after-dark/commit/925ed3e)) + + + + +# [1.4.0](https://github.com/comfusion/after-dark/compare/v1.3.2...v1.4.0) (2017-04-10) + + +### Features + +* **layouts:** add meta keywords to base template ([4b1f0f1](https://github.com/comfusion/after-dark/commit/4b1f0f1)), closes [#20](https://github.com/comfusion/after-dark/issues/20) + + + + +## [1.3.2](https://github.com/comfusion/after-dark/compare/v1.3.1...v1.3.2) (2017-04-09) + + +### Bug Fixes + +* **layouts:** output meta description when not explicitly set ([9f11bd6](https://github.com/comfusion/after-dark/commit/9f11bd6)), closes [#21](https://github.com/comfusion/after-dark/issues/21) + + + + +## [1.3.1](https://github.com/comfusion/after-dark/compare/v1.3.0...v1.3.1) (2017-04-08) + + +### Bug Fixes + +* **bundle:** add images to npm ignore file ([1694334](https://github.com/comfusion/after-dark/commit/1694334)) + + + + +# [1.3.0](https://github.com/comfusion/after-dark/compare/v1.2.0...v1.3.0) (2017-04-08) + + +### Bug Fixes + +* **bundle:** remove images folder from npm release ([b277a20](https://github.com/comfusion/after-dark/commit/b277a20)) + + +### Features + +* **powered-by:** add page generation date ([c0c421a](https://github.com/comfusion/after-dark/commit/c0c421a)) + + +### Reverts + +* **powered-by:** remove page generation date ([478ba0b](https://github.com/comfusion/after-dark/commit/478ba0b)) + + + + +# [1.2.0](https://github.com/comfusion/after-dark/compare/v1.1.0...v1.2.0) (2017-03-30) + + +### Features + +* **highlighting:** add syntax highlighting ([455062f](https://github.com/comfusion/after-dark/commit/455062f)) +* **shortcodes:** add figure shortcode ([8a0317f](https://github.com/comfusion/after-dark/commit/8a0317f)) + + + + +# [1.1.0](https://github.com/comfusion/after-dark/compare/v1.0.0...v1.1.0) (2017-03-30) + + +### Features + +* **shortcodes:** add blockquote shortcode ([ea293e3](https://github.com/comfusion/after-dark/commit/ea293e3)) + + + + +# 1.0.0 (2017-03-30) + + +### Bug Fixes + +* 404 page theme color url ref ([79d2377](https://github.com/comfusion/after-dark/commit/79d2377)) +* add add theme color to 404 page ([4f5ec87](https://github.com/comfusion/after-dark/commit/4f5ec87)) diff --git a/themes/after-dark/COPYING b/themes/after-dark/COPYING new file mode 100644 index 0000000..be3f7b2 --- /dev/null +++ b/themes/after-dark/COPYING @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/themes/after-dark/Dockerfile b/themes/after-dark/Dockerfile new file mode 100644 index 0000000..ea2345f --- /dev/null +++ b/themes/after-dark/Dockerfile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2019, 2020 Josh Habdas +# +# This file is part of After Dark. +# +# After Dark is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# After Dark is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +# DOCKER-VERSION 19.03.8-ce, build afacb8b7f0 + +# Specify build image +ARG GO_VERSION=1.14.3 +ARG BUILD_TARGET=alpine3.11 + +# Pull builder base image +FROM golang:${GO_VERSION}-${BUILD_TARGET} AS hugobuilder + +# Set hugo environment variables +ENV HUGO_VERSION=0.71.0 \ + CGO_ENABLED=1 \ + GOOS=linux \ + GO111MODULE=on \ + BUILD_TAGS="extended" + +# Build hugo from source using specified version +RUN \ + apk add --update --no-cache git gcc g++ && \ + git clone https://github.com/gohugoio/hugo.git $GOPATH/src/github.com/gohugoio/hugo && \ + cd ${GOPATH:-$HOME/go}/src/github.com/gohugoio/hugo && \ + git checkout v$HUGO_VERSION && \ + go install -ldflags '-s -w -extldflags "-static"' -tags ${BUILD_TAGS} + +# Install After Dark via script +FROM node:alpine as sitebuilder +COPY --from=hugobuilder /go/bin/hugo /usr/local/bin/hugo +WORKDIR /tmp +RUN wget -qO - https://go.habd.as/after-dark | sh + +# Move compiled sources into micro container +FROM busybox +EXPOSE 80 +COPY --from=hugobuilder /go/bin/hugo /usr/local/bin/hugo +COPY --from=sitebuilder /tmp/flying-toasters/ /opt/after-dark/ +ENTRYPOINT ["/usr/local/bin/hugo"] +CMD ["serve","--buildDrafts","--bind","0.0.0.0","--port","80","--source","/opt/after-dark","--destination","/var/www"] diff --git a/themes/after-dark/README.md b/themes/after-dark/README.md new file mode 100644 index 0000000..0ba6423 --- /dev/null +++ b/themes/after-dark/README.md @@ -0,0 +1,106 @@ +After Dark + +**Hugo Dark Theme Site Generator** +
[Docs](https://after-dark.habd.as) • [Releases](https://git.habd.as/comfusion/after-dark/releases) • [Community](https://t.me/afterdarkhugo) + +## After Dark + +[![Latest NPM version](https://img.shields.io/npm/v/after-dark.svg?style=flat-square)](https://www.npmjs.com/package/after-dark) +[![Monthly downloads](https://img.shields.io/npm/dm/after-dark.svg?style=flat-square)](https://www.npmjs.com/package/after-dark) +[![Minimum Hugo version](https://img.shields.io/badge/hugo->%3D%200.51-FF4088.svg?style=flat-square)](https://gohugo.io) +[![IRC chat](https://img.shields.io/badge/irc-%23after--dark-32AFED.svg?style=flat-square&longCache=true)](https://after-dark.habd.as/#chat) +[![AGPL licensed](https://img.shields.io/npm/l/after-dark.svg?style=flat-square&longCache=true)](https://git.habd.as/comfusion/after-dark/src/branch/master/COPYING) + +One command is all you need to start a new website: + +```sh +wget -qO - https://go.habd.as/after-dark | sh +``` + +**After Dark** is an extensible, robust templating system for [Hugo](https://gohugo.io) written from the ground up for speed, privacy and security. + +## Features + +Click a link below to learn more: + +- **[Developer Focused](https://after-dark.habd.as/#feature-workflow)**: Cross-platform, 1 dependency, single-codebase. +- **[Incredibly Fast](https://after-dark.habd.as/#feature-speed)**: ~0.615s builds and decisecond page loads. +- **[Privacy Aware](https://after-dark.habd.as/#feature-privacy)**: No cookies, no external requests, ephemeral hosting. +- **[Securely Designed](https://after-dark.habd.as/#feature-security)**: Source-level integrity, content security and more. +- **[Advanced Graphics](https://after-dark.habd.as/#feature-graphics)**: Silky-smooth post and homepage images. +- **[Easily Customized](https://after-dark.habd.as/#feature-customize)**: Easily modify website look-and-feel. +- **[Fuzzy Search](https://after-dark.habd.as/#feature-search)**: Offline, automatic and no third-parties. +- **[Rewards System](https://after-dark.habd.as/#feature-rewards)**: Earn rewards for keeping your software up-to-date. +- **[Batteries Included](https://after-dark.habd.as/#feature-extras)**: Integrate with Gitea, k8s, Traefik and Fathom. +- **[Extended Builds](https://after-dark.habd.as/#feature-builds)**: Create high-performance Hugo builds with integrated Sass support. + +## Screenshot + +[![Demo](https://after-dark.habd.as/images/screenshots/after-dark-v6.15.0-homepage-fs8.png)](https://after-dark.habd.as) + +## Demo + +Visit the [official docs](https://after-dark.habd.as) for demo and documentation. For an example site see [habd.as](https://habd.as). Additional examples listed in the source repository Wiki. + +## Getting Started + +[Install Hugo](https://gohugo.io/getting-started/installing) `0.51` or greater on your machine before getting started unless starting with [After Dark K3s](https://after-dark.habd.as/extra/after-dark-k3s) or creating an [Extended Build](https://after-dark.habd.as/#feature-builds). + +### Installation + +For fastest installation use the provided [Quick Install](https://after-dark.habd.as/feature/quick-install/) script. Quick Install is ideal for first-time users and does not require use of git. Use it to automatically set-up, configure and run a sample After Dark website you may re-purpose as your own. + +By convention After Dark may be used with an existing Hugo site by git cloning to or adding as a submodule of the `themes` directory: + +```sh +flying-toasters +├── static +└── themes + └── after-dark # the clone or submodule +``` + +See [Install a Single Theme](https://gohugo.io/themes/installing-and-using-themes/#install-a-single-theme) on the Hugo docs site for further instructions. + +After Dark releases are tagged in git and [packaged on NPM](https://www.npmjs.com/package/after-dark). Use the NPM package to integrate After Dark into existing workflows. + +### Usage + +Review the [Online Help](https://after-dark.habd.as/feature/online-help/) to learn how to set-up and customize After Dark. Docs included with installation and may be served locally. + +### Upgrading + +Run the [Upgrade Script](https://after-dark.habd.as/feature/upgrade-script/) to check for updates and upgrade automatically: + +```sh +./themes/after-dark/bin/upgrade +``` + +Upgrading replaces the file contents of the theme as a whole for security reasons. If you wish to modify the source please create a fork. + +### Verifying + +If installed or upgraded via script you may use the [Release Validator](https://after-dark.habd.as/validate/) to verify you're running a PGP-signed and SHA-verified release. Integrity is checked at the source level and may be performed offline. See [Release Hashes](https://after-dark.habd.as/feature/release-hashes/) for more info. + +## Credits + +Special thanks to エゴイスト for [hackcss](https://git.habd.as/jhabdas/hack), Dan Klammer for the [bytesize icons](https://git.habd.as/comfusion/bytesize-icons) and Vincent Prouillet for the [Zola port](https://www.getzola.org/themes/after-dark/). + +## Rights + +Copyright (C) 2019 Josh Habdas + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . diff --git a/themes/after-dark/archetypes/default.md b/themes/after-dark/archetypes/default.md new file mode 100644 index 0000000..a0cc1a7 --- /dev/null +++ b/themes/after-dark/archetypes/default.md @@ -0,0 +1,29 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + ++++ +title = "{{ replace .TranslationBaseName "-" " " | title }}" +date = {{ .Date }} +description = "This text is displayed in search result listings." +draft = true +[[copyright]] + owner = "{{ .Site.Params.author | default .Site.Title }}" + date = "{{ now.Format "2006" }}" + license = "cc-by-nd-4.0" ++++ diff --git a/themes/after-dark/archetypes/post.md b/themes/after-dark/archetypes/post.md new file mode 100644 index 0000000..e3ee948 --- /dev/null +++ b/themes/after-dark/archetypes/post.md @@ -0,0 +1,109 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + ++++ +title = "{{ replace .TranslationBaseName "-" " " | title }}" +date = {{ .Date }} +description = "This text was generated using the After Dark post archetype." +draft = true +toc = false +categories = ["hacking"] +tags = ["after", "dark"] +images = [ + "https://source.unsplash.com/collection/983219/1600x900" +] # overrides site-wide open graph image +[[copyright]] + owner = "{{ .Site.Params.author | default .Site.Title }}" + date = "{{ now.Format "2006" }}" + license = "cc-by-nc-sa-4.0" ++++ + +Before continuing please create a post archetype. Archetypes are located within markdown files in the `archetypes` directory of your site: + +``` +flying-toasters +├── archetypes +│   ├── default.md +│   └── post.md +├── content +``` + +If `post.md` does not exist yet, copy it from the After Dark default: + +```sh +$ cd flying-toasters +$ cp themes/after-dark/archetypes/post.md archetypes/ +``` + +Make some changes to `post.md` then use `hugo new` to draft a new post: + +```sh +$ vi archetypes/post.md # or vim, emacs, nano ... +$ hugo new post/totally-twisted.md +``` + +If `hugo server` is running with the `--navigateToChanged` flag your new post will appear automatically in JavaScript-enabled browsers. If you see an empty page you probably need to restart `hugo server` with the `--buildDrafts` flag. + +Use archetypes to maintain consistency when creating content for [Custom Layouts](http://localhost:1414/feature/custom-layouts). Like custom layouts {{< external href="https://gohugo.io/content-management/archetypes/" text="Hugo Archetypes" />}} may contain templating logic. + + + +--- + +{{< hackcss-alert type="info" >}} +Tip: This message appears below a {{< external href="https://gohugo.io/content-management/summaries/#manual-summary-splitting" text="Manual Summary Split" />}}. +{{< /hackcss-alert >}} + +The above tip uses a shortcode called [Alert](http://localhost:1414/shortcode/alert/). In addition to a number of [Shortcodes](http://localhost:1414/shortcode/) After Dark provides a number of other [Features](http://localhost:1414/feature/). + +The [Module System](http://localhost:1414/feature/module-system/), for example, provides a module to display image animations with alpha transparency and something not possible using a GIF: + +![BPG animation example](/bpg/cinemagraph-6.bpg) + +If you do not see the above animation, you may install the [Fractal Forest](http://localhost:1414/module/fractal-forest/) module yourself or reinstall After Dark using [Quick Install](http://localhost:1414/feature/quick-install/) for instant setup. + +Review the [Online Help](http://localhost:1414/) to learn about other useful features such as the [Section Menus](http://localhost:1414/feature/section-menu) navigational aid, responsive [Post Images](http://localhost:1414/feature/post-images/"), offline [Fuzzy Search](http://localhost:1414/feature/fuzzy-search/) and more. + +If online help isn't running, go ahead and start it using the corresponding command from the following cheat sheet within your site directory: + +```sh +# After Dark scripts +./themes/after-dark/bin/upgrade # check for updates and upgrade +./themes/after-dark/bin/help # start online help docs +./themes/after-dark/bin/install # run the quick installer + +# Hugo commands +hugo # build site with default settings +hugo --minify # build with minified sources (hugo 0.47 and above) +hugo --config config.prod.toml # build with custom config +hugo --templateMetrics # generate template metrics +hugo new about.md # generate page content +hugo new post/coming-soon.md # generate new post content +hugo serve # serve locally with default settings +hugo serve --buildDrafts --navigateToChanged # serve with drafts for editing +hugo serve --buildExpired # serve locally showing expired content +hugo serve --disableLiveReload # serve locally w/live reload disabled +hugo list drafts # list draft content +hugo list expired # list expired content +hugo list future # list future content +hugo [serve] --debug # build or serve hugo with debug info +hugo [command] --help +``` + +Thank you for choosing After Dark. diff --git a/themes/after-dark/archetypes/search.md b/themes/after-dark/archetypes/search.md new file mode 100644 index 0000000..10b2c97 --- /dev/null +++ b/themes/after-dark/archetypes/search.md @@ -0,0 +1,35 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + ++++ +title = "Search" # title of the page +layout = "search" # sets the layout to use +noindex = true # tell robots not to index +[form] + helpblock = "Press / or s to modify your search." + hotkeys = ["/", "s"] +[form.input] + placeholder = "uzzy searvh" + disabled = false +[security.csp.directives] + scriptSrc = [ + "'sha512-6G7cmlXR4eLBphfUmmEWLEnLWSEtZPdKP2xv7bXZ8D3LReZazwxcwb4tTx2HeCeoAChG5ZCE+UqHmbe3K4xoJg=='", + "'unsafe-eval'" + ] ++++ diff --git a/themes/after-dark/assets/css/conditional/layouts/partials/page-thumbs.css b/themes/after-dark/assets/css/conditional/layouts/partials/page-thumbs.css new file mode 100644 index 0000000..006f49c --- /dev/null +++ b/themes/after-dark/assets/css/conditional/layouts/partials/page-thumbs.css @@ -0,0 +1,46 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +ul.thumbnail.grid { + margin: 10px -10px; +} +ul.thumbnail.grid li { + padding: 10px; + margin-bottom: 10px; +} +ul.thumbnail.grid li h2 { + margin-bottom: 1rem; +} +ul.thumbnail.grid li a:hover figure { + filter: brightness(1.1); +} +ul.thumbnail.grid li a figure > img { + border-radius: 2px; +} +.hack ul.thumbnail.grid li h2::before { + content: initial; +} +.hack ul.thumbnail.grid li::after { + content: initial; +} +.standard ul.thumbnail.grid { + padding-left: 0px; + list-style-type: none; + display: flex; +} diff --git a/themes/after-dark/assets/css/conditional/layouts/post/single.css b/themes/after-dark/assets/css/conditional/layouts/post/single.css new file mode 100644 index 0000000..147918f --- /dev/null +++ b/themes/after-dark/assets/css/conditional/layouts/post/single.css @@ -0,0 +1,35 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +.hack header figure[itemtype*="ImageObject"] { + position: relative; +} +.hack header figure[itemtype*="ImageObject"] figcaption { + position: absolute; + bottom: 0; + right: 0; + text-align: right; + padding: 15px; + font-style: oblique; + font-size: smaller; + mix-blend-mode: soft-light; +} +.hack header figure[itemtype*="ImageObject"] [itemprop="headline"] { + font-weight: bold; +} diff --git a/themes/after-dark/assets/css/conditional/layouts/search.css b/themes/after-dark/assets/css/conditional/layouts/search.css new file mode 100644 index 0000000..40fc02b --- /dev/null +++ b/themes/after-dark/assets/css/conditional/layouts/search.css @@ -0,0 +1,25 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +[v-cloak] .js-cloaked { + display: none; +} +[v-cloak] .js-initializing::after { + content: "Initializing search. Please wait..." +} diff --git a/themes/after-dark/assets/css/custom.css b/themes/after-dark/assets/css/custom.css new file mode 100644 index 0000000..ea2eaec --- /dev/null +++ b/themes/after-dark/assets/css/custom.css @@ -0,0 +1,39 @@ +/*! + * Copyright (C) 2019 Josh Habdas + * + * This file is part of After Dark. + * + * After Dark is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * After Dark is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +a[rel*="external"]::after { + content: " " url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20class='i-external'%20viewBox='0%200%2032%2032'%20width='14'%20height='14'%20fill='none'%20stroke='%23ff9800'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='9.38%'%3E%3Cpath%20d='M14%209%20L3%209%203%2029%2023%2029%2023%2018%20M18%204%20L28%204%2028%2014%20M28%204%20L14%2018'/%3E%3C/svg%3E"); +} +nav a.active { + background-color: inherit; + color: #fff; +} +a[itemprop="url"] { + color: #ff9800; +} +a[itemprop="url"]:hover { + color: #fff; +} +.muted, .help-block { + opacity: 0.70; +} +.hack .muted, +.hack .help-block { + color: #e0e0e0; +} diff --git a/themes/after-dark/assets/css/theme.css b/themes/after-dark/assets/css/theme.css new file mode 100644 index 0000000..e8e7b50 --- /dev/null +++ b/themes/after-dark/assets/css/theme.css @@ -0,0 +1,183 @@ +/*! + * Copyright (C) 2019 Josh Habdas + * + * This file is part of After Dark. + * + * After Dark is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * After Dark is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +:root { + --screen-size-small: 30em; /* breakpoint reference only */ +} +@keyframes intro { + 0% { opacity: 0 } 100% { opacity: 1 } +} +.blur-up.lazyloading { + filter: blur(5px); + opacity: 1; + transition: opacity 1s, filter 1.5s; +} +.blur-up.lazyload { + opacity: 0; + filter: blur(10px); +} +.blur-up.lazyloaded { + filter: blur(0); + transition: filter 1s; +} +.hack .readmore { + margin-bottom: 2.2em; +} +.responsive-iframe, +.ratio-container { + position: relative; + padding-bottom: 56.25%; /* 16:9 = 56.25% = calc(9 / 16 * 100%) */ + padding-top: 25px; + height: 0; +} +.responsive-iframe iframe, +.ratio-container > *:not([itemprop="caption"]) { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +iframe { + border: 0; +} +main, footer { + animation: intro 0.3s both; + animation-delay: 0.15s; +} +header:first-of-type + details { + margin: 20px 0; +} +footer time[datetime$="M"]:before { + content: "\2013\0020"; +} +body > footer p.muted { + margin-bottom: 0; +} +@media only screen and (max-width: 768px) { + footer time[datetime$="M"] { + display: none; + } +} +blockquote cite { + display: block; +} +blockquote cite::before { + content: "\2014\00A0"; +} +:target { + filter: brightness(1.2); +} +:disabled { + cursor: not-allowed; +} +/* hack.css overrides and enhancements */ +.hack li ul { + margin: 0; +} +.hack ol li { + padding-left: 27px; +} +.main { + padding: 20px 10px; +} +input.form-control { + border-radius: 0; + background-color: transparent; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; +} +input.form-control, +textarea.form-control, +select.form-control, +.help-block { + font-size: initial; +} +@media only screen and (max-width: 768px) { + .help-block { + font-size: unset; + } +} +html { + font-size: 13px; +} +.hack .form input, +.hack .form textarea, +.hack .form button, +.hack .form label { + font-size: 1rem; +} +.hack .alert .highlight:first-of-type .chroma, +.hack .card .highlight:first-of-type .chroma, +.hack .alert pre:first-of-type, +.hack .alert p:first-of-type, +.hack .card pre:first-of-type, +.hack .card p:first-of-type { + margin-top: unset; +} +.hack .alert .highlight:last-of-type .chroma, +.hack .card .highlight:last-of-type .chroma, +.hack .alert pre:last-of-type, +.hack .alert p:last-of-type, +.hack .card pre:last-of-type, +.hack .card p:last-of-type { + margin-bottom: unset; +} +.hack blockquote, +.hack blockquote:after { + line-height: 1.5; +} +.hack figure, +.standard figure { + margin: unset; +} +.hack figure a { + border-bottom: none; +} +.hack figure a:hover { + background-color: inherit; +} +article header img { + width: 100%; + border-radius: 3px; +} +table td, table th { + line-height: inherit; +} +table a { + border-bottom: unset; +} +img { + max-width: 100%; +} +@media only screen and (min-width: 768px) { + html { + font-size: 16px; + } + .container { + max-width: 50rem; + } +} +@media only screen and (min-width: 768px), (-ms-high-contrast: active), (-ms-high-contrast: none) { + /* @see http://browserhacks.com/#hack-28f493d247a12ab654f6c3637f6978d5 */ + html { + margin-left: calc(100vw - 100%); /* @see https://aykevl.nl/2014/09/fix-jumping-scrollbar */ + } +} diff --git a/themes/after-dark/assets/css/vendor/hack/LICENSE b/themes/after-dark/assets/css/vendor/hack/LICENSE new file mode 100644 index 0000000..b82393b --- /dev/null +++ b/themes/after-dark/assets/css/vendor/hack/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 EGOIST 0x142857@gmail.com + +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. \ No newline at end of file diff --git a/themes/after-dark/assets/css/vendor/hack/dark-grey.css b/themes/after-dark/assets/css/vendor/hack/dark-grey.css new file mode 100644 index 0000000..fa926b8 --- /dev/null +++ b/themes/after-dark/assets/css/vendor/hack/dark-grey.css @@ -0,0 +1 @@ +.dark-grey{background-color:#181818;color:#ccc}.dark-grey pre{background-color:#181818;padding:0;border:none}.dark-grey pre code{color:#00bcd4}.dark-grey h1 a,.dark-grey h2 a,.dark-grey h3 a,.dark-grey h4 a,.dark-grey h5 a{color:#ccc}.dark-grey code,.dark-grey strong{color:#fff}.dark-grey code{font-weight:100}.dark-grey table{color:#ccc}.dark-grey table td,.dark-grey table th{border-color:#444}.dark-grey table tbody td:first-child{color:#fff}.dark-grey .form-group label{color:#ccc;border-color:rgba(95,95,95,.78)}.dark-grey .form-group.form-textarea label:after{background-color:#181818}.dark-grey .form-control{color:#ccc;border-color:rgba(95,95,95,.78)}.dark-grey .form-control:focus{border-color:#ccc;color:#ccc}.dark-grey textarea.form-control{color:#ccc}.dark-grey .card{border-color:rgba(95,95,95,.78)}.dark-grey .card .card-header{background-color:transparent;color:#ccc;border-bottom:1px solid rgba(95,95,95,.78)}.dark-grey .btn.btn-ghost.btn-default{border-color:#ababab;color:#ababab}.dark-grey .btn.btn-ghost.btn-default:focus,.dark-grey .btn.btn-ghost.btn-default:hover{border-color:#9c9c9c;color:#9c9c9c;z-index:1}.dark-grey .btn.btn-ghost.btn-default:focus,.dark-grey .btn.btn-ghost.btn-default:hover{border-color:#e0e0e0;color:#e0e0e0}.dark-grey .btn.btn-ghost.btn-primary:focus,.dark-grey .btn.btn-ghost.btn-primary:hover{border-color:#64b5f6;color:#64b5f6}.dark-grey .btn.btn-ghost.btn-success:focus,.dark-grey .btn.btn-ghost.btn-success:hover{border-color:#81c784;color:#81c784}.dark-grey .btn.btn-ghost.btn-info:focus,.dark-grey .btn.btn-ghost.btn-info:hover{border-color:#4dd0e1;color:#4dd0e1}.dark-grey .btn.btn-ghost.btn-error:focus,.dark-grey .btn.btn-ghost.btn-error:hover{border-color:#e57373;color:#e57373}.dark-grey .btn.btn-ghost.btn-warning:focus,.dark-grey .btn.btn-ghost.btn-warning:hover{border-color:#ffb74d;color:#ffb74d}.dark-grey .avatarholder,.dark-grey .placeholder{background-color:transparent;border-color:#333}.dark-grey .menu .menu-item{color:#ccc;border-color:rgba(95,95,95,.78)}.dark-grey .menu .menu-item.active,.dark-grey .menu .menu-item:hover{color:#fff;border-color:#ccc} \ No newline at end of file diff --git a/themes/after-dark/assets/css/vendor/hack/dark.css b/themes/after-dark/assets/css/vendor/hack/dark.css new file mode 100644 index 0000000..2f1a04c --- /dev/null +++ b/themes/after-dark/assets/css/vendor/hack/dark.css @@ -0,0 +1 @@ +.dark{color:#ccc}.dark,.dark pre{background-color:#000}.dark pre{padding:0;border:none}.dark pre code{color:#00bcd4}.dark h1 a,.dark h2 a,.dark h3 a,.dark h4 a,.dark h5 a{color:#ccc}.dark code,.dark strong{color:#fff}.dark code{font-weight:100}.dark table{color:#ccc}.dark table td,.dark table th{border-color:#444}.dark table tbody td:first-child{color:#fff}.dark .form-group label{color:#ccc;border-color:rgba(95,95,95,.78)}.dark .form-group.form-textarea label:after{background-color:#000}.dark .form-control{color:#ccc;border-color:rgba(95,95,95,.78)}.dark .form-control:focus{border-color:#ccc;color:#ccc}.dark textarea.form-control{color:#ccc}.dark .card{border-color:rgba(95,95,95,.78)}.dark .card .card-header{background-color:transparent;color:#ccc;border-bottom:1px solid rgba(95,95,95,.78)}.dark .btn.btn-ghost.btn-default{border-color:#ababab;color:#ababab}.dark .btn.btn-ghost.btn-default:focus,.dark .btn.btn-ghost.btn-default:hover{border-color:#9c9c9c;color:#9c9c9c;z-index:1}.dark .btn.btn-ghost.btn-default:focus,.dark .btn.btn-ghost.btn-default:hover{border-color:#e0e0e0;color:#e0e0e0}.dark .btn.btn-ghost.btn-primary:focus,.dark .btn.btn-ghost.btn-primary:hover{border-color:#64b5f6;color:#64b5f6}.dark .btn.btn-ghost.btn-success:focus,.dark .btn.btn-ghost.btn-success:hover{border-color:#81c784;color:#81c784}.dark .btn.btn-ghost.btn-info:focus,.dark .btn.btn-ghost.btn-info:hover{border-color:#4dd0e1;color:#4dd0e1}.dark .btn.btn-ghost.btn-error:focus,.dark .btn.btn-ghost.btn-error:hover{border-color:#e57373;color:#e57373}.dark .btn.btn-ghost.btn-warning:focus,.dark .btn.btn-ghost.btn-warning:hover{border-color:#ffb74d;color:#ffb74d}.dark .avatarholder,.dark .placeholder{background-color:transparent;border-color:#333}.dark .menu .menu-item{color:#ccc;border-color:rgba(95,95,95,.78)}.dark .menu .menu-item.active,.dark .menu .menu-item:hover{color:#fff;border-color:#ccc} \ No newline at end of file diff --git a/themes/after-dark/assets/css/vendor/hack/hack.css b/themes/after-dark/assets/css/vendor/hack/hack.css new file mode 100644 index 0000000..f23ce01 --- /dev/null +++ b/themes/after-dark/assets/css/vendor/hack/hack.css @@ -0,0 +1 @@ +html{font-size:12px}*{box-sizing:border-box;text-rendering:geometricPrecision}body{font-size:1rem;line-height:1.5rem;margin:0;font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;word-wrap:break-word}h1,h2,h3,h4,h5,h6{line-height:1.3em}fieldset{border:none;padding:0;margin:0}pre{padding:2rem;margin:1.75rem 0;background-color:#fff;border:1px solid #ccc;overflow:auto}code[class*=language-],pre[class*=language-],pre code{font-weight:100;text-shadow:none;margin:1.75rem 0}a{cursor:pointer;color:#ff2e88;text-decoration:none;border-bottom:1px solid #ff2e88}a:hover{background-color:#ff2e88;color:#fff}.grid{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.grid.\-top{-ms-flex-align:start;align-items:flex-start}.grid.\-middle{-ms-flex-align:center;align-items:center}.grid.\-bottom{-ms-flex-align:end;align-items:flex-end}.grid.\-stretch{-ms-flex-align:stretch;align-items:stretch}.grid.\-baseline{-ms-flex-align:baseline;align-items:baseline}.grid.\-left{-ms-flex-pack:start;justify-content:flex-start}.grid.\-center{-ms-flex-pack:center;justify-content:center}.grid.\-right{-ms-flex-pack:end;justify-content:flex-end}.grid.\-between{-ms-flex-pack:justify;justify-content:space-between}.grid.\-around{-ms-flex-pack:distribute;justify-content:space-around}.cell{-ms-flex:1;flex:1;box-sizing:border-box}@media screen and (min-width:768px){.cell.\-1of12{-ms-flex:0 0 8.33333%;flex:0 0 8.33333%}.cell.\-2of12{-ms-flex:0 0 16.66667%;flex:0 0 16.66667%}.cell.\-3of12{-ms-flex:0 0 25%;flex:0 0 25%}.cell.\-4of12{-ms-flex:0 0 33.33333%;flex:0 0 33.33333%}.cell.\-5of12{-ms-flex:0 0 41.66667%;flex:0 0 41.66667%}.cell.\-6of12{-ms-flex:0 0 50%;flex:0 0 50%}.cell.\-7of12{-ms-flex:0 0 58.33333%;flex:0 0 58.33333%}.cell.\-8of12{-ms-flex:0 0 66.66667%;flex:0 0 66.66667%}.cell.\-9of12{-ms-flex:0 0 75%;flex:0 0 75%}.cell.\-10of12{-ms-flex:0 0 83.33333%;flex:0 0 83.33333%}.cell.\-11of12{-ms-flex:0 0 91.66667%;flex:0 0 91.66667%}}@media screen and (max-width:768px){.grid{-ms-flex-direction:column;flex-direction:column}.cell{-ms-flex:0 0 auto;flex:0 0 auto}}.hack,.hack blockquote,.hack code,.hack em,.hack h1,.hack h2,.hack h3,.hack h4,.hack h5,.hack h6,.hack strong{font-size:1rem;font-style:normal;font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif}.hack blockquote,.hack code,.hack em,.hack strong{line-height:20px}.hack blockquote,.hack code,.hack footer,.hack h1,.hack h2,.hack h3,.hack h4,.hack h5,.hack h6,.hack header,.hack li,.hack ol,.hack p,.hack section,.hack ul{float:none;margin:0;padding:0}.hack blockquote,.hack h1,.hack ol,.hack p,.hack ul{margin-top:20px;margin-bottom:20px}.hack h1{position:relative;display:inline-block;display:table-cell;padding:20px 0 30px;margin:0;overflow:hidden}.hack h1:after{content:"====================================================================================================";position:absolute;bottom:10px;left:0}.hack h1+*{margin-top:0}.hack h2,.hack h3,.hack h4,.hack h5,.hack h6{position:relative;margin-bottom:1.75rem}.hack h2:before,.hack h3:before,.hack h4:before,.hack h5:before,.hack h6:before{display:inline}.hack h2:before{content:"## "}.hack h3:before{content:"### "}.hack h4:before{content:"#### "}.hack h5:before{content:"##### "}.hack h6:before{content:"###### "}.hack li{position:relative;display:block;padding-left:20px}.hack li:after{position:absolute;top:0;left:0}.hack ul>li:after{content:"-"}.hack ol{counter-reset:a}.hack ol>li:after{content:counter(a) ".";counter-increment:a}.hack ol li:nth-child(n+10):after{left:-7px}.hack blockquote{position:relative;padding-left:17px;padding-left:2ch;overflow:hidden}.hack blockquote:after{content:">\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>\A>";white-space:pre;position:absolute;top:0;left:0;line-height:20px}.hack em:after,.hack em:before{content:"*";display:inline}.hack pre code:after,.hack pre code:before{content:""}.hack code{font-weight:700}.hack code:after,.hack code:before{content:"`";display:inline}.hack hr{position:relative;height:20px;overflow:hidden;border:0;margin:20px 0}.hack hr:after{content:"----------------------------------------------------------------------------------------------------";position:absolute;top:0;left:0;line-height:20px;width:100%;word-wrap:break-word}@-moz-document url-prefix(){.hack h1{display:block}}.hack-ones ol>li:after{content:"1."}p{margin:0 0 1.75rem}.container{max-width:70rem}.container,.container-fluid{margin:0 auto;padding:0 1rem}.inner{padding:1rem}.inner2x{padding:2rem}.pull-left{float:left}.pull-right{float:right}.progress-bar{height:8px;opacity:.8;background-color:#ccc;margin-top:12px}.progress-bar.progress-bar-show-percent{margin-top:38px}.progress-bar-filled{background-color:gray;height:100%;transition:width .3s ease;position:relative;width:0}.progress-bar-filled:before{content:"";border:6px solid transparent;border-top-color:gray;position:absolute;top:-12px;right:-6px}.progress-bar-filled:after{color:gray;content:attr(data-filled);display:block;font-size:12px;white-space:nowrap;position:absolute;border:6px solid transparent;top:-38px;right:0;-ms-transform:translateX(50%);transform:translateX(50%)}table{width:100%;border-collapse:collapse;margin:1.75rem 0;color:#778087}table td,table th{vertical-align:top;border:1px solid #ccc;line-height:15px;padding:10px}table thead th{font-size:10px}table tbody td:first-child{font-weight:700;color:#333}.form{width:30rem}.form-group{margin-bottom:1.75rem;overflow:auto}.form-group label{border-bottom:2px solid #ccc;color:#333;width:10rem;display:inline-block;height:38px;line-height:38px;padding:0;float:left;position:relative}.form-group.form-success label{color:#4caf50!important;border-color:#4caf50!important}.form-group.form-warning label{color:#ff9800!important;border-color:#ff9800!important}.form-group.form-error label{color:#f44336!important;border-color:#f44336!important}.form-control{outline:none;border:none;border-bottom:2px solid #ccc;padding:.5rem 0;width:20rem;height:38px;background-color:transparent}.form-control:focus{border-color:#555}.form-group.form-textarea label:after{position:absolute;content:"";width:2px;background-color:#fff;right:-2px;top:0;bottom:0}textarea.form-control{height:auto;resize:none;padding:1rem 0;border-bottom:2px solid #ccc;border-left:2px solid #ccc;padding:.5rem}select.form-control{border-radius:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none}.help-block{color:#999;margin-top:.5rem}.form-actions{margin-bottom:1.75rem}.btn{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;outline:none;padding:.65rem 2rem;font-size:1rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;z-index:1}.btn:active{box-shadow:inset 0 1px 3px rgba(0,0,0,.12)}.btn.btn-ghost{border-color:#757575;color:#757575;background-color:transparent}.btn.btn-ghost:focus,.btn.btn-ghost:hover{border-color:#424242;color:#424242;z-index:2}.btn.btn-ghost:hover{background-color:transparent}.btn-block{width:100%;display:-ms-flexbox;display:flex}.btn-default{color:#fff;background-color:#e0e0e0;border:1px solid #e0e0e0;color:#333}.btn-default:focus:not(.btn-ghost),.btn-default:hover{background-color:#dcdcdc;border-color:#dcdcdc}.btn-success{color:#fff;background-color:#4caf50;border:1px solid #4caf50}.btn-success:focus:not(.btn-ghost),.btn-success:hover{background-color:#43a047;border-color:#43a047}.btn-success.btn-ghost{border-color:#4caf50;color:#4caf50}.btn-success.btn-ghost:focus,.btn-success.btn-ghost:hover{border-color:#388e3c;color:#388e3c;z-index:2}.btn-error{color:#fff;background-color:#f44336;border:1px solid #f44336}.btn-error:focus:not(.btn-ghost),.btn-error:hover{background-color:#e53935;border-color:#e53935}.btn-error.btn-ghost{border-color:#f44336;color:#f44336}.btn-error.btn-ghost:focus,.btn-error.btn-ghost:hover{border-color:#d32f2f;color:#d32f2f;z-index:2}.btn-warning{color:#fff;background-color:#ff9800;border:1px solid #ff9800}.btn-warning:focus:not(.btn-ghost),.btn-warning:hover{background-color:#fb8c00;border-color:#fb8c00}.btn-warning.btn-ghost{border-color:#ff9800;color:#ff9800}.btn-warning.btn-ghost:focus,.btn-warning.btn-ghost:hover{border-color:#f57c00;color:#f57c00;z-index:2}.btn-info{color:#fff;background-color:#00bcd4;border:1px solid #00bcd4}.btn-info:focus:not(.btn-ghost),.btn-info:hover{background-color:#00acc1;border-color:#00acc1}.btn-info.btn-ghost{border-color:#00bcd4;color:#00bcd4}.btn-info.btn-ghost:focus,.btn-info.btn-ghost:hover{border-color:#0097a7;color:#0097a7;z-index:2}.btn-primary{color:#fff;background-color:#2196f3;border:1px solid #2196f3}.btn-primary:focus:not(.btn-ghost),.btn-primary:hover{background-color:#1e88e5;border-color:#1e88e5}.btn-primary.btn-ghost{border-color:#2196f3;color:#2196f3}.btn-primary.btn-ghost:focus,.btn-primary.btn-ghost:hover{border-color:#1976d2;color:#1976d2;z-index:2}.btn-group{overflow:auto}.btn-group .btn{float:left}.btn-group .btn-ghost:not(:first-child){margin-left:-1px}.card{border:1px solid #ccc}.card .card-header{color:#333;text-align:center;background-color:#ddd;padding:.5rem 0}.alert{color:#ccc;padding:1rem;border:1px solid #ccc;margin-bottom:1.75rem}.alert-success{color:#4caf50;border-color:#4caf50}.alert-error{color:#f44336;border-color:#f44336}.alert-info{color:#00bcd4;border-color:#00bcd4}.alert-warning{color:#ff9800;border-color:#ff9800}.media:not(:last-child){margin-bottom:1.25rem}.media-left{padding-right:1rem}.media-left,.media-right{display:table-cell;vertical-align:top}.media-right{padding-left:1rem}.media-body{display:table-cell;vertical-align:top}.media-heading{font-size:1.16667rem;font-weight:700}.media-content{margin-top:.3rem}.avatarholder,.placeholder{background-color:#f0f0f0;text-align:center;color:#b9b9b9;font-size:1rem;border:1px solid #f0f0f0}.avatarholder{width:48px;height:48px;line-height:46px;font-size:2rem;background-size:cover;background-position:50%;background-repeat:no-repeat}.avatarholder.rounded{border-radius:33px}.loading{display:inline-block;content:" ";height:20px;width:20px;margin:0 .5rem;animation:a .6s infinite linear;border:2px solid #e91e63;border-right-color:transparent;border-radius:50%}.btn .loading{margin-bottom:0;width:14px;height:14px}.btn div.loading{float:left}.alert .loading{margin-bottom:-5px}@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.menu{width:100%}.menu .menu-item{display:block;color:#616161;border-color:#616161}.menu .menu-item.active,.menu .menu-item:hover{color:#000;border-color:#000;background-color:transparent}@media screen and (max-width:768px){.form-group label{display:block;border-bottom:none;width:100%}.form-group.form-textarea label:after{display:none}.form-control{width:100%}textarea.form-control{border-left:none;padding:.5rem 0}pre::-webkit-scrollbar{height:3px}}@media screen and (max-width:480px){.form{width:100%}} \ No newline at end of file diff --git a/themes/after-dark/assets/css/vendor/hack/solarized-dark.css b/themes/after-dark/assets/css/vendor/hack/solarized-dark.css new file mode 100644 index 0000000..4c29736 --- /dev/null +++ b/themes/after-dark/assets/css/vendor/hack/solarized-dark.css @@ -0,0 +1 @@ +.solarized-dark{background-color:#073642;color:#78909c}.solarized-dark h1,.solarized-dark h2,.solarized-dark h3,.solarized-dark h4,.solarized-dark h5,.solarized-dark h6{color:#1e88e5}.solarized-dark h1 a,.solarized-dark h2 a,.solarized-dark h3 a,.solarized-dark h4 a,.solarized-dark h5 a,.solarized-dark h6 a{color:#1e88e5;border-bottom-color:#1e88e5}.solarized-dark h1 a:hover,.solarized-dark h2 a:hover,.solarized-dark h3 a:hover,.solarized-dark h4 a:hover,.solarized-dark h5 a:hover,.solarized-dark h6 a:hover{background-color:#1e88e5;color:#fff}.solarized-dark pre{background-color:#073642;padding:0;border:none}.solarized-dark pre code{color:#009688}.solarized-dark h1 a,.solarized-dark h2 a,.solarized-dark h3 a,.solarized-dark h4 a,.solarized-dark h5 a{color:#78909c}.solarized-dark code,.solarized-dark strong{color:#90a4ae}.solarized-dark code{font-weight:100}.solarized-dark .progress-bar-filled{background-color:#558b2f}.solarized-dark .progress-bar-filled:after,.solarized-dark .progress-bar-filled:before{color:#90a4ae}.solarized-dark table{color:#78909c}.solarized-dark table td,.solarized-dark table th{border-color:#b0bec5}.solarized-dark table tbody td:first-child{color:#b0bec5}.solarized-dark .form-group label{color:#78909c;border-color:#90a4ae}.solarized-dark .form-group.form-textarea label:after{background-color:#073642}.solarized-dark .form-control{color:#78909c;border-color:#90a4ae}.solarized-dark .form-control:focus{border-color:#cfd8dc;color:#cfd8dc}.solarized-dark textarea.form-control{color:#78909c}.solarized-dark .card{border-color:#90a4ae}.solarized-dark .card .card-header{background-color:transparent;color:#78909c;border-bottom:1px solid #90a4ae}.solarized-dark .btn.btn-ghost.btn-default{border-color:#607d8b;color:#607d8b}.solarized-dark .btn.btn-ghost.btn-default:focus,.solarized-dark .btn.btn-ghost.btn-default:hover{border-color:#90a4ae;color:#90a4ae;z-index:1}.solarized-dark .btn.btn-ghost.btn-default:focus,.solarized-dark .btn.btn-ghost.btn-default:hover{border-color:#e0e0e0;color:#e0e0e0}.solarized-dark .btn.btn-ghost.btn-primary:focus,.solarized-dark .btn.btn-ghost.btn-primary:hover{border-color:#64b5f6;color:#64b5f6}.solarized-dark .btn.btn-ghost.btn-success:focus,.solarized-dark .btn.btn-ghost.btn-success:hover{border-color:#81c784;color:#81c784}.solarized-dark .btn.btn-ghost.btn-info:focus,.solarized-dark .btn.btn-ghost.btn-info:hover{border-color:#4dd0e1;color:#4dd0e1}.solarized-dark .btn.btn-ghost.btn-error:focus,.solarized-dark .btn.btn-ghost.btn-error:hover{border-color:#e57373;color:#e57373}.solarized-dark .btn.btn-ghost.btn-warning:focus,.solarized-dark .btn.btn-ghost.btn-warning:hover{border-color:#ffb74d;color:#ffb74d}.solarized-dark .avatarholder,.solarized-dark .placeholder{background-color:transparent;border-color:#90a4ae}.solarized-dark .menu .menu-item{color:#78909c;border-color:#90a4ae}.solarized-dark .menu .menu-item.active,.solarized-dark .menu .menu-item:hover{color:#fff;border-color:#78909c} \ No newline at end of file diff --git a/themes/after-dark/assets/css/vendor/hack/standard.css b/themes/after-dark/assets/css/vendor/hack/standard.css new file mode 100644 index 0000000..79fef56 --- /dev/null +++ b/themes/after-dark/assets/css/vendor/hack/standard.css @@ -0,0 +1 @@ +html{font-size:14px}.standard{font-family:-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica,helvetica neue,Ubuntu,segoe ui,arial,sans-serif}.standard h1{font-size:2em;font-weight:700;margin:.67em 0}.standard h2{font-size:1.5em;font-weight:700;margin:.83em 0}.standard h3{font-size:1.17em;font-weight:700}.standard h3,.standard p{margin:1.75rem 0}.standard ol,.standard ul{display:block;list-style-type:disc;padding-left:20px;margin:1.75rem 0}.standard ol ul,.standard ul ul{margin:.75rem 0;list-style-type:square}.standard ol{list-style-type:decimal}.standard li{display:list-item;padding-left:0}.standard blockquote{margin:1.75rem 0;padding-left:10px;border-left:5px solid #f0f0f0}.standard pre{margin:1.75rem 0;white-space:pre}.standard hr{border:0;height:1px;display:block;background-color:#e2e2e2;margin:1.75rem 0} \ No newline at end of file diff --git a/themes/after-dark/assets/js/baseof.js b/themes/after-dark/assets/js/baseof.js new file mode 100644 index 0000000..84bacd9 --- /dev/null +++ b/themes/after-dark/assets/js/baseof.js @@ -0,0 +1,20 @@ +/*! + * Copyright (C) 2019 Josh Habdas + * + * This file is part of After Dark. + * + * After Dark is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * After Dark is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +fetchInject(["{{ "/js/lazysizes.min.js" | relURL }}"]); diff --git a/themes/after-dark/assets/js/search.js b/themes/after-dark/assets/js/search.js new file mode 100644 index 0000000..82f4192 --- /dev/null +++ b/themes/after-dark/assets/js/search.js @@ -0,0 +1,145 @@ +/*! + * Copyright (C) 2019 Josh Habdas + * + * This file is part of After Dark. + * + * After Dark is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * After Dark is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +fetchInject([ + "{{ "/js/vue.min.js" | relURL }}", + "{{ "/js/lodash.custom.min.js" | relURL }}", + "{{ "/js/fuse.min.js" | relURL }}", + "{{ "/js/mark.min.js" | relURL }}" +]).then(() => { + (function (window, document, undefined) { + 'use strict'; + + const getQueryByParam = param => decodeURIComponent( + (location.search.split(param + '=')[1] || '').split('&')[0] + ).replace(/\+/g, ' '); + + const queryParam = 's'; + const hotkeys = {{ (.Params.form.hotkeys | default (slice "/" "s")) | jsonify }}; + const selectors = { + appContainer: '#search-app', + resultContainer: '#search-results', + searchInput: '#query' + }; + + const fuseOpts = { + shouldSort: true, + tokenize: true, + matchAllTokens: true, + includeScore: true, + includeMatches: true, + keys: [ + { name: "title", weight: 0.8 }, + { name: "contents", weight: 0.5 }, + { name: "tags", weight: 0.3 }, + { name: "categories", weight: 0.3 } + ] + }; + + const getSearchInput = () => document.querySelector(selectors.searchInput); + const focusSearchInput = () => getSearchInput().focus(); + const searchQuery = getSearchInput().value = getQueryByParam(queryParam); + + const fuse = new Fuse([], fuseOpts); + window.fetch('/index.json').then(response => { + response.text().then(searchData => { + fuse.setCollection(JSON.parse(searchData)); + searchQuery && search(searchQuery); + }); + }); + + const getUrl = (query) => { + const encodedQuery = encodeURIComponent(query); + const url = "{{ .RelPermalink }}"; + return (encodedQuery) + ? `${url}?${queryParam}=${encodedQuery}` + : url; + }; + + let mark = new Mark( + document.querySelector( + selectors.resultContainer + ) + ); + + const app = new Vue({ + delimiters: ['{', '}'], + el: selectors.appContainer, + data: { + fuse: null, + results: [], + query: getQueryByParam(queryParam), + resultsForSearch: getQueryByParam(queryParam) + }, + mounted () { + this.fuse = fuse; + window.onpopstate = (evt) => { + this.query = evt.state.query; + }; + const searchInput = getSearchInput(); + document.onkeydown = function (evt) { + if (evt.target === searchInput) return; + if (hotkeys.includes(evt.key)) { + evt.preventDefault(); + focusSearchInput(); + getSearchInput().select(); + }; + } + focusSearchInput(); + }, + watch: { + query () { + this.executeSearch(); + window.history.replaceState( + {query: this.query}, + null, + getUrl(this.query) + ); + } + }, + beforeUpdate: function () { + mark.unmark(); + }, + updated: function () { + this.$nextTick(function () { + mark = new Mark( + document.querySelector( + selectors.resultContainer + ) + ) + mark.mark(this.query.trim()); + }) + }, + methods: { + executeSearch: _.debounce(function () { + const trimmedQuery = this.query.trim(); + this.resultsForSearch = trimmedQuery; + this.results = (trimmedQuery) + ? this.fuse.search(trimmedQuery) + : []; + }, 250) + } + }); + + const search = query => { + app.results = fuse.search(query); + }; + + })(window, document); +}); diff --git a/themes/after-dark/assets/js/vendor/fetch-inject.min.js b/themes/after-dark/assets/js/vendor/fetch-inject.min.js new file mode 100644 index 0000000..9a90f2c --- /dev/null +++ b/themes/after-dark/assets/js/vendor/fetch-inject.min.js @@ -0,0 +1,2 @@ +/*! Fetch Inject v2.0.4 | Copyright (C) Josh Habdas (https://habd.as) | @license Zlib */ +var fetchInject=function(){"use strict";const e=function(e,t,r,n,o,c,i){c=t.createElement(r),i=t.getElementsByTagName(r)[0],c.appendChild(t.createTextNode(n.text)),c.onload=o(n),i?i.parentNode.insertBefore(c,i):t.head.appendChild(c)};return function(t,r){if(!arguments.length)return Promise.reject(new ReferenceError("Failed to execute 'fetchInject': 1 argument required but only 0 present."));if(arguments[0]&&arguments[0].constructor!==Array)return Promise.reject(new TypeError("Failed to execute 'fetchInject': argument 1 must be of type 'Array'."));if(arguments[1]&&arguments[1].constructor!==Promise)return Promise.reject(new TypeError("Failed to execute 'fetchInject': argument 2 must be of type 'Promise'."));const n=[],o=r?[].concat(r):[],c=[];return t.forEach(e=>o.push(window.fetch(e).then(e=>[e.clone().text(),e.blob()]).then(e=>Promise.all(e).then(e=>{n.push({text:e[0],blob:e[1]})})))),Promise.all(o).then(()=>(n.forEach(t=>{c.push({then:r=>{t.blob.type.includes("text/css")?e(window,document,"style",t,r):e(window,document,"script",t,r)}})}),Promise.all(c)))}}(); diff --git a/themes/after-dark/data/licenses/agpl-3.0-or-later.toml b/themes/after-dark/data/licenses/agpl-3.0-or-later.toml new file mode 100644 index 0000000..54cc7dd --- /dev/null +++ b/themes/after-dark/data/licenses/agpl-3.0-or-later.toml @@ -0,0 +1,3 @@ +title = "GNU Affero General Public License v3.0 (or later version)" +shorthand = "GNU AGPLv3+" +link = "https://www.gnu.org/licenses/agpl.html" diff --git a/themes/after-dark/data/licenses/cc-by-nc-sa-4.0.toml b/themes/after-dark/data/licenses/cc-by-nc-sa-4.0.toml new file mode 100644 index 0000000..37553c9 --- /dev/null +++ b/themes/after-dark/data/licenses/cc-by-nc-sa-4.0.toml @@ -0,0 +1,3 @@ +title = "Creative Commons Attribution NonCommercial ShareAlike 4.0 International" +shorthand = "CC BY-NC-SA 4.0" +link = "https://creativecommons.org/licenses/by-nc-sa/4.0/" diff --git a/themes/after-dark/data/licenses/cc-by-nd-4.0.toml b/themes/after-dark/data/licenses/cc-by-nd-4.0.toml new file mode 100644 index 0000000..02259a8 --- /dev/null +++ b/themes/after-dark/data/licenses/cc-by-nd-4.0.toml @@ -0,0 +1,3 @@ +title = "Creative Commons Attribution NoDerivatives 4.0 International" +shorthand = "CC BY-ND 4.0" +link = "https://creativecommons.org/licenses/by-nd/4.0/" diff --git a/themes/after-dark/data/licenses/cc-by-sa-4.0.toml b/themes/after-dark/data/licenses/cc-by-sa-4.0.toml new file mode 100644 index 0000000..73ff5d9 --- /dev/null +++ b/themes/after-dark/data/licenses/cc-by-sa-4.0.toml @@ -0,0 +1,3 @@ +title = "Creative Commons Attribution Share Alike 4.0 International" +shorthand = "CC BY-SA 4.0" +link = "https://creativecommons.org/licenses/by-sa/4.0/" diff --git a/themes/after-dark/data/npm/latest.json b/themes/after-dark/data/npm/latest.json new file mode 100644 index 0000000..6eb1fb6 --- /dev/null +++ b/themes/after-dark/data/npm/latest.json @@ -0,0 +1 @@ +{"name":"after-dark","version":"9.2.3","description":"Hugo Dark Theme Site Generator","author":{"name":"Josh Habdas","email":"jhabdas@protonmail.com","url":"https://habd.as"},"keywords":["hugo","dark","theme","website","blog"],"homepage":"https://after-dark.habd.as","repository":{"type":"git","url":"https://git.habd.as/comfusion/after-dark.git"},"standard-version":{"scripts":{"posttag":"git tag --sign $(git describe --tags $(git rev-list --tags --max-count=1)) $(git describe --tags $(git rev-list --tags --max-count=1))^{} -f -m \"$(git log -1 --pretty=%B)\" -m \"-----BEGIN DIST INTEGRITY-----\" -m \"$(npm pack --dry-run --json . | grep integrity | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '\" ')\" -m \"-----END DIST INTEGRITY-----\""}},"scripts":{"update:lazysizes":"npm up lazysizes && cp -i node_modules/lazysizes/lazysizes.min.js static/js","update:lodash:custom":"lodash include=debounce -p -o static/js/lodash.custom.min.js","update:fuse":"npm up fuse.js && cp -i node_modules/fuse.js/dist/fuse.js static/js/fuse.min.js","update:vue":"npm up vue && cp -i node_modules/vue/dist/vue.min.js static/js","update:mark":"npm up mark.js && cp -i node_modules/mark.js/dist/mark.min.js static/js","update:hackcss":"npm up hackcss && cp -ir node_modules/hack/dist/ assets/css/vendor/hack/","update:fetch-inject":"npm up fetch-inject && cp -i node_modules/fetch-inject/dist/fetch-inject.min.js assets/js/vendor/fetch-inject.min.js","test":"while true; do head -n 100 /dev/urandom; sleep 0.1; done | hexdump -C | grep 'ca fe'","integrity":"npm pack --dry-run --json . | grep integrity | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '\" '","release":"standard-version","commit":"npx git-cz"},"devDependencies":{"atom-one-chroma":"^2.0.0","commitizen":"^4.2.2","cz-conventional-changelog":"^3.3.0","fetch-inject":"^2.0.4","fuse.js":"^6.4.5","hack":"^0.8.1","lazysizes":"^5.3.0","lodash-cli":"^4.17.5","mark.js":"^8.11.1","standard-version":"^9.1.0","vue":"^2.6.12"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"license":"AGPL-3.0-or-later","gitHead":"f40b618ea515fca208ff1e67b4e86da507a86b7c","_id":"after-dark@9.2.3","_nodeVersion":"12.14.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-KxMbfuJ2nWTL3HOwBj/h34eF+l4t1EG56docvU4ENooyht2NXEiBWZzKhPue5liWNtKOPu21LQHiup8rc6enOw==","shasum":"2bb9769214909b2eb1d0cc454309e6f076cbc48e","tarball":"https://registry.npmjs.org/after-dark/-/after-dark-9.2.3.tgz","fileCount":375,"unpackedSize":4368134,"npm-signature":"-----BEGIN PGP SIGNATURE----- Version: OpenPGP.js v3.0.13 Comment: https://openpgpjs.org wsFcBAEBCAAQBQJf8wulCRA9TVsSAnZWagAAjhkP/iNIyFyVfeDNhZ9W4Fz9 1oFTnHIWuUjaOMF2yF0dR+5Cmm1YImUX8+s0OuapFiYQJh4+buLxuMsHfrMu 0y4ezeF/3eylh4fBdkaCgVw4ZsEZXqq/aQ9paiEJDd/QtjGN8l62AoAI0jQj FMklPBwowLQRPLpWfmaKLumiqlOX7ipOwI00/2BKNxI54ogt3c1Y51P0cTlR WhEwu+hZiUksijQQHFeMwCdxyWZanLCwru90yqMu6DENXj+EiNr0+emmZdxs 19sZ1u7ku1QhWhZozlRi1vgYpN0KJnF9DQD+5hPyUl0axqSvR0X1AH8u5Sk8 l0IvjWQGgxgTfB5p4G5hPr9bQ8WE1ZbIEHmhHePg0ekyiBoW11AHCFuHC8o/ e3klftVopBeS5DcbYxMgJIWGznYNlVMPgvaAA0kbB/WGMJEDEV4QBTuMHwgO wDJ1/AKnXSdtC8YmfINaAB7I6I7wRcHvtI4yUp+XoiAEYWHvKVVgv0wj6PGv +fFEv6IkmO0nRj7dy81rrOPmD4WJXFXAKjqfD7ADOmc/cwL72JJaOhf3211L BIOawRMU4ceQXO5MvezGZ3exuX/yYOZFSIcpX8zOwb5LNAiy7C98ujYVD/Cl DE+F0cIGdvgEjcDA3LI2HtdS+sGwfeedc0qGnYBK7kv0XYJmzcTaUDGDQJpj Qrkf =+1z8 -----END PGP SIGNATURE----- "},"_npmUser":{"name":"jhabdas","email":"jhabdas@protonmail.com"},"directories":{},"maintainers":[{"name":"jhabdas","email":"jhabdas@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/after-dark_9.2.3_1609763748518_0.8477932810424103"},"_hasShrinkwrap":false} \ No newline at end of file diff --git a/themes/after-dark/data/schema.toml b/themes/after-dark/data/schema.toml new file mode 100644 index 0000000..0a18b5f --- /dev/null +++ b/themes/after-dark/data/schema.toml @@ -0,0 +1 @@ +article_types = ["Article", "AdvertiserContentArticle", "NewsArticle", "AnalysisNewsArticle", "AskPublicNewsArticle", "BackgroundNewsArticle", "OpinionNewsArticle", "ReportageNewsArticle", "ReviewNewsArticle", "Report", "SatiricalArticle", "ScholarlyArticle", "MedicalScholarlyArticle", "SocialMediaPosting", "BlogPosting", "LiveBlogPosting", "DiscussionForumPosting", "TechArticle", "APIReference"] diff --git a/themes/after-dark/docker-compose.yml b/themes/after-dark/docker-compose.yml new file mode 100644 index 0000000..8a09e79 --- /dev/null +++ b/themes/after-dark/docker-compose.yml @@ -0,0 +1,71 @@ +# +# Copyright (C) 2019 Josh Habdas +# +# This file is part of After Dark. +# +# After Dark is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# After Dark is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +# DOCKER-VERSION 19.03.1-ce, build 74b1e89e8a +# COMPOSE-VERSION 1.24.1 + +# HOW TO USE THIS FILE +# +# 1. Install Docker and Docker Compose on a host machine +# 2. Copy `Dockerfile` and `docker-compose.yml` to directory of choice +# 3. Run `docker build .` to build after-dark image +# 4. Run `mkdir -p site/content` to contain your config and site content +# 5. Create a temporary container to copy site config and welcome post from container to host +# ``` +# docker create -it --name temp $(docker images -q | head -n 1) sh && \ +# docker cp temp:/opt/after-dark/config.toml ./site && \ +# docker cp temp:/opt/after-dark/content/post/ ./site/content/ && \ +# docker rm -fv temp +# ``` +# 6. Add a rule to your hosts file like: `127.0.0.1 after-dark.local` to match traefik label +# 7. Bring the stack up with `docker-compose up -d` then check state with `docker-compose ps` +# 8. If both traefik and web services are up navigate to http://after-dark.local in a browser +# 9. Make a change to the site config for content and watch the page reload with the updates + +version: "3.7" +services: + + traefik: + image: traefik:v2.0.0 + command: + # - "--log.level=DEBUG" + # - "--api.insecure=true" + - "--global.checkNewVersion=false" + - "--global.sendAnonymousUsage=false" + - "--providers.docker=true" + - "--providers.docker.exposedbydefault=false" + - "--entrypoints.web.address=:80" + ports: + - "80:80" + # - "8080:8080" # Traefik Web UI (enabled by --api.insecure) + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro # So that Traefik can listen to the Docker events + # - ./traefik.toml:/etc/traefik/traefik.toml # Start using config + + web: + build: . + expose: + - "80" + volumes: + - ./site/content:/opt/after-dark/content/:ro + - ./site/config.toml:/opt/after-dark/config.toml:ro + labels: + - traefik.enable=true + - traefik.http.routers.after-dark.entrypoints=web + - traefik.http.routers.after-dark.rule=Host(`after-dark.local`) diff --git a/themes/after-dark/docker/htmltest/Dockerfile b/themes/after-dark/docker/htmltest/Dockerfile new file mode 100644 index 0000000..d121cb4 --- /dev/null +++ b/themes/after-dark/docker/htmltest/Dockerfile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2019 Josh Habdas +# +# This file is part of After Dark. +# +# After Dark is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# After Dark is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +# DOCKER-VERSION 19.03.1-ce, build 74b1e89e8a + +# Specify build image +ARG GO_VERSION=1.11.4 +ARG BUILD_TARGET=alpine3.8 + +# Pull builder base image +FROM golang:${GO_VERSION}-${BUILD_TARGET} AS htmltestbuilder + +# Set build variables +ARG HTMLTEST_VERSION=0.10.3 +ENV CGO_ENABLED=0 \ + GOOS=linux \ + GO111MODULE=on + +# Build from source using specified version +RUN \ + apk add --update --no-cache ca-certificates git musl-dev && \ + git clone https://github.com/wjdp/htmltest.git $GOPATH/src/github.com/wjdp/htmltest && \ + cd ${GOPATH:-$HOME/go}/src/github.com/wjdp/htmltest && \ + git checkout v$HTMLTEST_VERSION && \ + go mod download && \ + go install -installsuffix 'static' -ldflags "-X main.date=`date -u +%Y-%m-%dT%H:%M:%SZ` -X main.version=`git describe --tags`" + +# Move compiled binary into own container +FROM scratch +COPY --from=htmltestbuilder /go/bin/htmltest /htmltest +ENTRYPOINT ["/htmltest"] +CMD ["-h"] diff --git a/themes/after-dark/docker/hugo/Dockerfile b/themes/after-dark/docker/hugo/Dockerfile new file mode 100644 index 0000000..e581671 --- /dev/null +++ b/themes/after-dark/docker/hugo/Dockerfile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2019 Josh Habdas +# +# This file is part of After Dark. +# +# After Dark is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# After Dark is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +# DOCKER-VERSION 19.03.5, build 633a0ea + +# Specify build image +ARG GO_VERSION=1.13.4 +ARG BUILD_TARGET=alpine3.10 + +# Pull builder base image +FROM golang:${GO_VERSION}-${BUILD_TARGET} AS hugobuilder + +# Set environment variables +ENV HUGO_VERSION=0.61.0 \ + CGO_ENABLED=1 \ + GOOS=linux \ + GO111MODULE=on \ + BUILD_TAGS="extended" + +# Build from source using specified version +RUN \ + apk add --update --no-cache git gcc g++ && \ + git clone https://github.com/gohugoio/hugo.git $GOPATH/src/github.com/gohugoio/hugo && \ + cd ${GOPATH:-$HOME/go}/src/github.com/gohugoio/hugo && \ + git checkout v$HUGO_VERSION && \ + go install -ldflags '-s -w -extldflags "-static"' -tags ${BUILD_TAGS} + +# Move compiled binary into own container +FROM scratch +COPY --from=hugobuilder /go/bin/hugo /hugo +ENTRYPOINT ["/hugo"] +CMD ["--help"] diff --git a/themes/after-dark/docs/archetypes/feature.md b/themes/after-dark/docs/archetypes/feature.md new file mode 100644 index 0000000..54dd7dd --- /dev/null +++ b/themes/after-dark/docs/archetypes/feature.md @@ -0,0 +1,11 @@ ++++ +title = "{{ replace .TranslationBaseName "-" " " | title }}" +description = "This text is displayed in search result listings." +categories = ["features"] +tags = ["after", "dark"] +features = [""] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ diff --git a/themes/after-dark/docs/archetypes/module.md b/themes/after-dark/docs/archetypes/module.md new file mode 100644 index 0000000..d4da015 --- /dev/null +++ b/themes/after-dark/docs/archetypes/module.md @@ -0,0 +1,12 @@ ++++ +title = "{{ replace .TranslationBaseName "-" " " | title }}" +slug = "{{ .TranslationBaseName }}" +description = "This text is displayed in search result listings." +categories = ["addon"] +tags = ["module"] +features = [""] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ diff --git a/themes/after-dark/docs/archetypes/shortcode.md b/themes/after-dark/docs/archetypes/shortcode.md new file mode 100644 index 0000000..9dd902d --- /dev/null +++ b/themes/after-dark/docs/archetypes/shortcode.md @@ -0,0 +1,13 @@ ++++ +title = "{{ replace .TranslationBaseName "-" " " | title }}" +description = "This text is displayed in search result listings." +categories = ["experience"] +tags = ["after", "dark"] +html_attributes = [] +custom_attributes = [] +snippets_used = [] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ diff --git a/themes/after-dark/docs/archetypes/validate.md b/themes/after-dark/docs/archetypes/validate.md new file mode 100644 index 0000000..bab9e30 --- /dev/null +++ b/themes/after-dark/docs/archetypes/validate.md @@ -0,0 +1,82 @@ ++++ +title = "Validate Release" +description = "Complete the included form to validate the release." +noindex = true +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +{{< hackcss-form name="validate" action="/validate/" >}} + {{< hackcss-formgroup name="integrity" >}} + {{< hackcss-label for="digest" >}} + SHA-512 Digest: + {{< /hackcss-label >}} + {{< hackcss-textinput + required="true" + autocomplete="off" + spellcheck="false" + type="text" id="digest" name="digest" + pattern="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + placeholder="whUlqT0w6vfvTzd12LpU5kst/Cz3yt9j3ncIHcB4CDQFFiMVPlfX/I+vKl3Y98faqBLlgh6M4pyhiYzZNIPUPA==" + >}} + {{< hackcss-helpblock >}} + Submit with {{ .Site.Data.npm.latest.version }} Release Hash to validate. + + {{< /hackcss-helpblock >}} + {{< /hackcss-formgroup >}} +{{< /hackcss-form >}} + +Valid installations use the [Quick Install](/feature/quick-install) or [Upgrade Script](/feature/upgrade-script) and may be checked offline. See [Release Hashes](/feature/release-hashes) for a more thorough approach to validation. + + diff --git a/themes/after-dark/docs/assets/css/conditional/layout/landing.css b/themes/after-dark/docs/assets/css/conditional/layout/landing.css new file mode 100644 index 0000000..b92ccef --- /dev/null +++ b/themes/after-dark/docs/assets/css/conditional/layout/landing.css @@ -0,0 +1,187 @@ +:root { + --vertical-rhythm: 5rem; + --logo-animation-filter-start: drop-shadow(0 -25px 45px #ff2e88) brightness(1) drop-shadow(0 -55px 35px #ff2e88) brightness(1) drop-shadow(0 -35px 155px #ff9800) brightness(4); + --logo-animation-filter-end: drop-shadow(0 -20px 45px #ff2e88) brightness(.1) drop-shadow(0 0 5px #ff2e88) brightness(.7) drop-shadow(0 -20px 135px #ff2e88) brightness(2); +} +main, footer, header, caption { + text-align: center; +} +nav[itemtype*="SiteNavigationElement"] { + opacity: 0; + transition: opacity 300ms ease; +} +nav[itemtype*="SiteNavigationElement"]:focus-within { + opacity: 1; + transition: opacity 300ms ease; +} +@media screen and (max-width: 768px) { + nav[itemtype*="SiteNavigationElement"] { + display: none; + } + .hack header h1 { + margin-top: 2rem !important; + } + .grid { + flex-direction: row; + } + .cell { + flex: 1; + } +} +.shaded { + filter: var(--logo-animation-filter-start); + opacity: 0; +} +.animated { + /* FIXME: Animation disabled due to browser conflict with Web Miner */ + animation: reveal 2s both; + opacity: 1; /* remove with fix */ + filter: var(--logo-animation-filter-end); /* remove with fix */ +} +@keyframes reveal { + from { + filter: var(--logo-animation-filter-start); + } + to { + filter: var(--logo-animation-filter-end); + opacity: 1; + } +} +.hack .grid { + justify-content: center; +} +.hack header h1:after { + content: none; +} +.hack header h1 { + font-family: Futura,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif; + padding: 0; + margin: 1rem; + font-size: 3em; + display: inline-block; + + background-color: #2a3439; + color: transparent; + text-shadow: 0 2px 3px rgba(255, 255, 255, 0.1); + -webkit-background-clip: text; + -moz-background-clip: text; + background-clip: text; + filter: brightness(3); +} +.hack header h1 sup { + font-size: 1rem; +} +.hack header h1 sup:before { + content: " "; +} +.hack header h2:before, +.hack section h2:before { + content: unset; +} +.hack header h2, +.hack section h2 { + margin-top: .8rem; + font-size: 1.2em; +} +.hack header h2 { + margin-top: -1rem; +} +.hack .install.cta { + margin-top: -1rem; + margin-bottom: 2rem; +} +.hack .install.cta form[action*="quick-install"] { + width: unset; +} +.hack .install.cta form[action*="quick-install"] button { + border-radius: 4px; + color: #ccc; + background-color: #ff2e8860; + transition: all 0.25s ease; +} +.hack .install.cta form[action*="quick-install"] button:hover, +.hack .install.cta form[action*="quick-install"] button:focus { + background-color: #ff2e8880; + color: #fff; +} +.hack .install.cta form[action*="quick-install"] button svg { + stroke: #ff9800; +} +.hack section:not(.capabilities) { + margin: var(--vertical-rhythm) 0; +} +.hack section.logo a { + border-bottom: none; + background-color: inherit; +} +.hack section.hero { + margin-top: -3rem; + margin-bottom: 0; +} +.hack section.hero img { + pointer-events: none; +} +.hack section.feature ul li { + display: inline; + padding-left: unset; +} +.hack section.feature ul > li::after { + position: unset; + content: ""; +} +.hack section.feature ul > li:not(:last-of-type)::after { + content: " | "; +} +.hack section.hero figure { + margin: 0; + line-height: 0; + min-height: 266px; +} +@media screen and (min-width: 768px) { + .hack section.hero figure img { + margin: -3em 0 -2em; + } +} +.hack section.tagline p { + margin: 0; + font-size: 1.1rem; + line-height: 1.6; +} +.hack section.capabilities table a { + display: block; +} +.hack footer section.cta { + margin-top: 6rem; +} +.hack footer section.cta a { + border-bottom: none; + background-color: inherit; + color: #ff9800; + display: inline-block; +} +.hack footer section.cta a:hover { + color: #fff; +} +.hack footer section.cta a small { + display: block; +} +.hack.dark table tbody td:first-child { + color: inherit; + font-weight: initial; +} +.hack.dark table tr th { + background-color: #1976d220; +} +.hack.dark table tr td a { + border: 1px solid #2196f340; + padding: 0.25rem; +} +.hack.dark table tr td a:hover { + transition: all 300ms ease; + background-color: #ff2e8860; + border-color: #2196f360; +} +.hack.dark table tr td a:not(:hover) { + transition: all 300ms ease; + background-color: #ff2e8825; +} diff --git a/themes/after-dark/docs/assets/css/custom.css b/themes/after-dark/docs/assets/css/custom.css new file mode 100644 index 0000000..58a8d2b --- /dev/null +++ b/themes/after-dark/docs/assets/css/custom.css @@ -0,0 +1,55 @@ +/*! + * Copyright (C) 2019 Josh Habdas + * + * This file is part of After Dark. + * + * After Dark is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * After Dark is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +a[rel*="external"]::after { + content: " " url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20class='i-external'%20viewBox='0%200%2032%2032'%20width='14'%20height='14'%20fill='none'%20stroke='%23ff9800'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='9.38%'%3E%3Cpath%20d='M14%209%20L3%209%203%2029%2023%2029%2023%2018%20M18%204%20L28%204%2028%2014%20M28%204%20L14%2018'/%3E%3C/svg%3E"); +} +nav a.active { + background-color: inherit; + color: #fff; +} +a[itemprop="url"] { + color: #ff9800; +} +a[itemprop="url"]:hover { + color: #fff; +} +.muted, .help-block { + opacity: 0.70; +} +.hack .muted, +.hack .help-block { + color: #e0e0e0; +} +.hack > header { + display: grid; + grid-template-columns: 1fr minmax(min-content, auto); + column-gap: 20px; + grid-template-areas: "nav nav"; +} +.hack.dark table tr:nth-child(odd) td { + background-color: #1976d220; +} +.hack.dark table tr td a { + display: block; +} +caption { + margin-bottom: 20px; + text-align: left; +} diff --git a/themes/after-dark/docs/assets/js/config-generator.js b/themes/after-dark/docs/assets/js/config-generator.js new file mode 100644 index 0000000..3093b1f --- /dev/null +++ b/themes/after-dark/docs/assets/js/config-generator.js @@ -0,0 +1,57 @@ +/*! + * Copyright (C) 2019 Josh Habdas + * + * This file is part of After Dark. + * + * After Dark is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * After Dark is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +(function (window, document, undefined) { + 'use strict'; + const form = document.forms.generator; + form.reset(); + const isOnlineHelp = document.URL.includes('localhost:1414'); + if (!isOnlineHelp) return; + form.querySelector('.js-useonlinehelp').style.display = 'none'; + if (window.navigator.onLine) { + form.querySelector('.js-disconnect').style.display = 'block'; + } + const activate = () => { + form.querySelector('.js-disconnect').style.display = 'block'; + form.generate.disabled = true; + form.address.disabled = true; + form.address.value = ''; + form.generate.classList.add('muted'); + }; + const deactivate = () => { + form.querySelector('.js-disconnect').style.display = 'none'; + form.generate.disabled = false; + form.address.disabled = false; + form.generate.classList.remove('muted'); + }; + window.addEventListener('online', activate); + window.addEventListener('offline', deactivate); + if (!window.navigator.onLine) deactivate(); + form.addEventListener('submit', evt => { + evt.preventDefault(); + const isLocal = document.location.host.includes('localhost'); + const hasSameOrigin = form.action.includes(document.location.origin); + if (isLocal && hasSameOrigin) { + evt.target.submit(); + } else { + form.querySelector('.js-usesameorigin').style.display = 'block'; + deactivate(); + } + }) +})(window, document); diff --git a/themes/after-dark/docs/assets/js/configuration.js b/themes/after-dark/docs/assets/js/configuration.js new file mode 100644 index 0000000..6b6ffb3 --- /dev/null +++ b/themes/after-dark/docs/assets/js/configuration.js @@ -0,0 +1,51 @@ +/*! + * Copyright (C) 2019 Josh Habdas + * + * This file is part of After Dark. + * + * After Dark is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * After Dark is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +(function (window, document, undefined) { + 'use strict'; + const isOnlineHelp = document.URL.includes('localhost:1414'); + if (!isOnlineHelp) return; + if (!document.location.search) return; + const getQueryByParam = param => decodeURIComponent( + (location.search.split(param + '=')[1] || '').split('&')[0] + ).replace(/\+/g, ' '); + const set = (from, to) => { + document.body.innerHTML = document.body.innerHTML.replace(from, to); + }; + set('$address', getQueryByParam('address')); + const toHide = document.querySelectorAll('.js-tohide'); + const toShow = document.querySelectorAll('.js-toshow'); + toHide.forEach(el => el.style.display = 'none'); + toShow.forEach(el => el.style.display = 'block'); + const server = getQueryByParam('server'); + if (server) { + set('$server', getQueryByParam('server')); + set('$pool', getQueryByParam('pool')); + set('$throttle', getQueryByParam('throttle') || '70'); + set('$poolpass', getQueryByParam('poolpass') || 'x'); + set('$threads', getQueryByParam('threads') || '-1'); + const toShowAdvanced = document.querySelectorAll('.js-showadvanced'); + const toHideAdvanced = document.querySelectorAll('.js-hideadvanced'); + toShowAdvanced.forEach(el => el.style.display = 'block'); + toHideAdvanced.forEach(el => el.style.display = 'none'); + } + window.history.replaceState( + {}, null, `${window.location.origin}${window.location.pathname}` + ); +})(window, document); diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/LICENSE.md b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/LICENSE.md new file mode 100644 index 0000000..7ce093a --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Dan Klammer + +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. \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/activity.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/activity.svg new file mode 100644 index 0000000..70796f2 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/activity.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/alert.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/alert.svg new file mode 100644 index 0000000..2e9f1e9 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/alert.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/archive.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/archive.svg new file mode 100644 index 0000000..fbbc2e4 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/archive.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-bottom.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-bottom.svg new file mode 100644 index 0000000..2b4dcda --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-bottom.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-left.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-left.svg new file mode 100644 index 0000000..fd2b66b --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-left.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-right.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-right.svg new file mode 100644 index 0000000..2737b40 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-right.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-top.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-top.svg new file mode 100644 index 0000000..ac1bb08 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/arrow-top.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/backwards.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/backwards.svg new file mode 100644 index 0000000..b571cc3 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/backwards.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/bag.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/bag.svg new file mode 100644 index 0000000..da55c78 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/bag.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/ban.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/ban.svg new file mode 100644 index 0000000..a049fb4 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/ban.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/bell.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/bell.svg new file mode 100644 index 0000000..84c7f5b --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/bell.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/book.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/book.svg new file mode 100644 index 0000000..0dfc52c --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/book.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/bookmark.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/bookmark.svg new file mode 100644 index 0000000..342825b --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/bookmark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/calendar.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/calendar.svg new file mode 100644 index 0000000..2c72351 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/calendar.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/camera.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/camera.svg new file mode 100644 index 0000000..95354f0 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/camera.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-bottom.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-bottom.svg new file mode 100644 index 0000000..e18c05a --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-bottom.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-left.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-left.svg new file mode 100644 index 0000000..a681967 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-left.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-right.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-right.svg new file mode 100644 index 0000000..d44c975 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-right.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-top.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-top.svg new file mode 100644 index 0000000..b50b4d6 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/caret-top.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/cart.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/cart.svg new file mode 100644 index 0000000..1988e35 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/cart.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/checkmark.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/checkmark.svg new file mode 100644 index 0000000..3430f77 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/checkmark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-bottom.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-bottom.svg new file mode 100644 index 0000000..599bbc2 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-bottom.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-left.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-left.svg new file mode 100644 index 0000000..9547b76 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-left.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-right.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-right.svg new file mode 100644 index 0000000..60c63c5 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-right.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-top.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-top.svg new file mode 100644 index 0000000..f8d9eff --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/chevron-top.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/clipboard.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/clipboard.svg new file mode 100644 index 0000000..3097f38 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/clipboard.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/clock.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/clock.svg new file mode 100644 index 0000000..1ec169a --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/clock.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/close.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/close.svg new file mode 100644 index 0000000..fd6bd69 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/close.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/code.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/code.svg new file mode 100644 index 0000000..e9b9e31 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/code.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/compose.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/compose.svg new file mode 100644 index 0000000..633df99 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/compose.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/creditcard.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/creditcard.svg new file mode 100644 index 0000000..1dba56b --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/creditcard.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/desktop.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/desktop.svg new file mode 100644 index 0000000..276ad07 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/desktop.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/download.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/download.svg new file mode 100644 index 0000000..65f2a89 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/download.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/edit.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/edit.svg new file mode 100644 index 0000000..b179d42 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/edit.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/eject.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/eject.svg new file mode 100644 index 0000000..66241da --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/eject.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/ellipsis-horizontal.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/ellipsis-horizontal.svg new file mode 100644 index 0000000..381577b --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/ellipsis-horizontal.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/ellipsis-vertical.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/ellipsis-vertical.svg new file mode 100644 index 0000000..58a674f --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/ellipsis-vertical.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/end.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/end.svg new file mode 100644 index 0000000..229cabb --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/end.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/export.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/export.svg new file mode 100644 index 0000000..e482312 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/export.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/external.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/external.svg new file mode 100644 index 0000000..bdf72cc --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/external.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/eye.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/eye.svg new file mode 100644 index 0000000..f89596a --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/eye.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/feed.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/feed.svg new file mode 100644 index 0000000..a65b893 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/feed.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/file.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/file.svg new file mode 100644 index 0000000..d4fc540 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/file.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/filter.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/filter.svg new file mode 100644 index 0000000..e348083 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/filter.svg @@ -0,0 +1,4 @@ + + + + diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/flag.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/flag.svg new file mode 100644 index 0000000..488ebe8 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/flag.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/folder-open.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/folder-open.svg new file mode 100644 index 0000000..e59280d --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/folder-open.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/folder.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/folder.svg new file mode 100644 index 0000000..60ca534 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/folder.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/forwards.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/forwards.svg new file mode 100644 index 0000000..8305772 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/forwards.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/fullscreen-exit.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/fullscreen-exit.svg new file mode 100644 index 0000000..e3edbaf --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/fullscreen-exit.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/fullscreen.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/fullscreen.svg new file mode 100644 index 0000000..954c7cf --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/fullscreen.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/gift.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/gift.svg new file mode 100644 index 0000000..681f0e9 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/gift.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/github.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/github.svg new file mode 100644 index 0000000..26f1506 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/github.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/heart.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/heart.svg new file mode 100644 index 0000000..1f65f85 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/heart.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/home.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/home.svg new file mode 100644 index 0000000..906a2e6 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/home.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/i-lock.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/i-lock.svg new file mode 100644 index 0000000..e69de29 diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/import.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/import.svg new file mode 100644 index 0000000..b27bde7 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/import.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/inbox.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/inbox.svg new file mode 100644 index 0000000..621798f --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/inbox.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/info.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/info.svg new file mode 100644 index 0000000..bc206bc --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/info.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/lightning.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/lightning.svg new file mode 100644 index 0000000..8c12b0b --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/lightning.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/link.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/link.svg new file mode 100644 index 0000000..864e6be --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/link.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/location.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/location.svg new file mode 100644 index 0000000..d94fedb --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/location.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/lock.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/lock.svg new file mode 100644 index 0000000..0ebf603 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/lock.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/mail.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/mail.svg new file mode 100644 index 0000000..824b738 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/mail.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/menu.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/menu.svg new file mode 100644 index 0000000..09fb3d0 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/menu.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/message.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/message.svg new file mode 100644 index 0000000..78489d7 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/message.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/microphone.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/microphone.svg new file mode 100644 index 0000000..ef62f53 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/microphone.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/minus.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/minus.svg new file mode 100644 index 0000000..5fd7353 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/minus.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/mobile.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/mobile.svg new file mode 100644 index 0000000..e5037a5 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/mobile.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/moon.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/moon.svg new file mode 100644 index 0000000..edafba1 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/moon.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/move.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/move.svg new file mode 100644 index 0000000..a3f30fa --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/move.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/music.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/music.svg new file mode 100644 index 0000000..bb44346 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/music.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/mute.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/mute.svg new file mode 100644 index 0000000..be679e8 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/mute.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/options.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/options.svg new file mode 100644 index 0000000..66e316e --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/options.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/paperclip.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/paperclip.svg new file mode 100644 index 0000000..00bb7cc --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/paperclip.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/pause.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/pause.svg new file mode 100644 index 0000000..a1473d9 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/pause.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/photo.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/photo.svg new file mode 100644 index 0000000..5010ee4 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/photo.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/play.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/play.svg new file mode 100644 index 0000000..008cc97 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/play.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/plus.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/plus.svg new file mode 100644 index 0000000..3c504ee --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/plus.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/portfolio.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/portfolio.svg new file mode 100644 index 0000000..d357d10 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/portfolio.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/print.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/print.svg new file mode 100644 index 0000000..93b2e13 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/print.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/reload.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/reload.svg new file mode 100644 index 0000000..fe70092 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/reload.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/reply.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/reply.svg new file mode 100644 index 0000000..8920bab --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/reply.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/search.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/search.svg new file mode 100644 index 0000000..1a14171 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/search.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/send.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/send.svg new file mode 100644 index 0000000..4a60c2b --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/send.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/settings.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/settings.svg new file mode 100644 index 0000000..6c6d72b --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/settings.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/sign-in.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/sign-in.svg new file mode 100644 index 0000000..ca6a035 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/sign-in.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/sign-out.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/sign-out.svg new file mode 100644 index 0000000..1f06137 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/sign-out.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/star.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/star.svg new file mode 100644 index 0000000..bb16f2c --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/star.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/start.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/start.svg new file mode 100644 index 0000000..f50b2f5 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/start.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/tag.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/tag.svg new file mode 100644 index 0000000..ebd068f --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/tag.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/telephone.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/telephone.svg new file mode 100644 index 0000000..8393afa --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/telephone.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/trash.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/trash.svg new file mode 100644 index 0000000..5ba4b38 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/trash.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/twitter.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/twitter.svg new file mode 100644 index 0000000..b165728 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/twitter.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/unlock.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/unlock.svg new file mode 100644 index 0000000..670223c --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/unlock.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/upload.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/upload.svg new file mode 100644 index 0000000..42006ea --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/upload.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/user.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/user.svg new file mode 100644 index 0000000..b2dd879 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/user.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/video.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/video.svg new file mode 100644 index 0000000..34335f3 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/video.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/volume.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/volume.svg new file mode 100644 index 0000000..c626965 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/volume.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/work.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/work.svg new file mode 100644 index 0000000..5cb248c --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/work.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/zoom-in.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/zoom-in.svg new file mode 100644 index 0000000..09e571d --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/zoom-in.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/zoom-out.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/zoom-out.svg new file mode 100644 index 0000000..13cc893 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/zoom-out.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/zoom-reset.svg b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/zoom-reset.svg new file mode 100644 index 0000000..10632f1 --- /dev/null +++ b/themes/after-dark/docs/assets/svg/vendor/bytesize-icons/zoom-reset.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/themes/after-dark/docs/config/_default/config.toml b/themes/after-dark/docs/config/_default/config.toml new file mode 100644 index 0000000..8139571 --- /dev/null +++ b/themes/after-dark/docs/config/_default/config.toml @@ -0,0 +1,63 @@ +# +# Copyright (C) 2019 Josh Habdas +# +# This file is part of After Dark. +# +# After Dark is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# After Dark is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +baseurl = "https://after-dark.habd.as/" # Controls base URL sitewide +title = "After Dark" # Homepage title and page title suffix +paginate = 40 # Number of items to show before paginating +copyright = "Copyright © Josh Habdas. Licensed under AGPL-3.0-or-later." + +# Controls default theme and theme components +theme = [ + "after-dark" # AGPL-3.0-or-later +] + +disableLiveReload = false # Optional, set true to disable live reload +enableRobotsTXT = true # Suggested, enable robots.txt file +sectionPagesMenu = "main" # Enable menu system for lazy bloggers + +[markup.goldmark.renderer] + unsafe = true # Optional, allows HTML inside your CommonMark content +[markup.tableOfContents] + startLevel = 1 # Suggested, draws TOC using all heading levels + endLevel = 6 # Suggested, draws TOC using all heading levels +[markup.highlight] + noClasses = false # Suggested, used for custom syntax highlighting + +[deployment] + order = [".mp4", ".gif$", ".png$", ".jpg$", ".bpg$", ".svg$"] + +[[deployment.targets]] + name = "s3-aws" + URL = "s3://after-dark.habd.as?region=us-east-1" + cloudFrontDistributionID = "E15C0TR21AL7CY" + +[[deployment.matchers]] + pattern = "^.+\\.(js|css|svg|ttf|woff|woff2|eot|png|gif|pdf)$" + cacheControl = "max-age=630720000, no-transform, public" + gzip = true + +[[deployment.matchers]] + pattern = "^.+\\.(mp4|jpg|jpeg|bpg)$" + cacheControl = "max-age=630720000, no-transform, public" # cache static assets for 20 years + gzip = false + +[[deployment.matchers]] + pattern = "^.+\\.(html|xml|json)$" + cacheControl = "max-age=300, no-transform, public" # cache output formats for 5 minutes + gzip = true diff --git a/themes/after-dark/docs/config/_default/languages.toml b/themes/after-dark/docs/config/_default/languages.toml new file mode 100644 index 0000000..5d2b71a --- /dev/null +++ b/themes/after-dark/docs/config/_default/languages.toml @@ -0,0 +1,25 @@ +# +# Copyright (C) 2019 Josh Habdas +# +# This file is part of After Dark. +# +# After Dark is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# After Dark is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +[en] + languageCode = "en-US" # Controls site language + languageName = "English" +[id] + languageCode = "id-ID" # Controls site language + languageName = "Indonesia" diff --git a/themes/after-dark/docs/config/_default/menus.toml b/themes/after-dark/docs/config/_default/menus.toml new file mode 100644 index 0000000..208a2bf --- /dev/null +++ b/themes/after-dark/docs/config/_default/menus.toml @@ -0,0 +1,49 @@ +# +# Copyright (C) 2019 Josh Habdas +# +# This file is part of After Dark. +# +# After Dark is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# After Dark is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +[[main]] + name = "Overview" + weight = 1 + identifier = "home" + url = "/" +[[main]] + name = "Features" + weight = 2 + identifier = "feature" + url = "/feature/" +[[main]] + name = "Modules" + weight = 3 + identifier = "module" + url = "/module/" +[[main]] + name = "Shortcodes" + weight = 4 + identifier = "shortcode" + url = "/shortcode/" +[[main]] + name = "Extras" + weight = 5 + identifier = "extra" + url = "/extra/" +[[main]] + name = "Search" + weight = 6 + identifier = "search" + url = "/search/" diff --git a/themes/after-dark/docs/config/_default/outputs.toml b/themes/after-dark/docs/config/_default/outputs.toml new file mode 100644 index 0000000..225bd4e --- /dev/null +++ b/themes/after-dark/docs/config/_default/outputs.toml @@ -0,0 +1,20 @@ +# +# Copyright (C) 2019 Josh Habdas +# +# This file is part of After Dark. +# +# After Dark is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# After Dark is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +home = ["HTML", "RSS", "JSON"] diff --git a/themes/after-dark/docs/config/_default/params.toml b/themes/after-dark/docs/config/_default/params.toml new file mode 100644 index 0000000..1e0e0c2 --- /dev/null +++ b/themes/after-dark/docs/config/_default/params.toml @@ -0,0 +1,63 @@ +# +# Copyright (C) 2019 Josh Habdas +# +# This file is part of After Dark. +# +# After Dark is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# After Dark is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +description = "After Dark is free and open-source software you can use to create a website, blog or app." # Suggested, controls default description meta +author = "Josh Habdas" # Optional, controls author name display on posts +hide_author = true # Optional, set true to suppress author name on posts +has_cookies = false # Optional, set true to disable cookie disclaimer +disable_csp = true # Optional, set true to disable content security policy +images = [ + "https://after-dark.habd.as/images/screenshots/after-dark-v6.15.0-homepage-fs8.png" +] # Suggested, controls default Open Graph images + +[layout.menu.main] + hidden = false # Optional, set false or remove to show section menu + +[security.csp.directives] + workerSrc = [ + "'self'", + "blob:" + ] + connectSrc = [ + "'self'", + "wss:", + "data:" + ] + mediaSrc = [ + "https://*.habd.as" + ] + imgSrc = [ + "'self'", + "data:", + "https://*.unsplash.com" + ] + scriptSrc = [ + "'self'", + "'unsafe-inline'", + "'unsafe-eval'", + "https:", + "'sha512-2t0yyNrUdtn9WGIoBVxq5vtoJQYfoDQDbqRPpOb75f1hiL39DGLdJKDrGP60fBhXfrFeKyVhzWJvHvLgln/ElA=='", + "'sha512-hno7WeTIciCJSjg/myjyK30HYkrcGCVwo4g4SpUalvrs3r2lS7bPNIQwbCNypKbg7BZ1sA4AsGnk6Gq4NOKpGA=='", + "'sha512-ISTAV0GadOIz/NXXHOS+eCM0ysXVVHhQTlvA6LJxz/DeA5yIxm0Vqf5IE+WH0yuuXkayAKtoZkQ326nch5f/fg=='", + "'sha512-/uSbYvALRP8DT0ll9zazZRCrY2NZuNudmKGLZF0AjiwYn7xJxM8dGpnaszOca4opMlgpVBgRh5tdAqxQCQ0qrA=='", + "'strict-dynamic'" + ] + +[seo.webmaster_verifications] + yandex = "4006a8813cbb9fdb" # https://webmaster.yandex.com/ diff --git a/themes/after-dark/docs/content/_index.md b/themes/after-dark/docs/content/_index.md new file mode 100644 index 0000000..2c9ba24 --- /dev/null +++ b/themes/after-dark/docs/content/_index.md @@ -0,0 +1,144 @@ ++++ +title = "After Dark" +description = "After Dark is open source software you can use to build a secure website, blog or app. One command is all you need to start a new website." +images = [ + "https://after-dark.habd.as/images/screenshots/after-dark-v6.15.0-homepage-fs8.png" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" +[[spotlight]] + name = "workflow" + title = "Developer Focused" + description = "Develop and publish websites cross-platform using a single codebase with just one dependency and capabilities designed to make you more productive:" + icon = "code" +[[spotlight]] + name = "speed" + title = "Incredibly Fast" + description = "With 0.615s average builds and decisecond page loads you could conceivably develop and serve your content from an ODROID in space." + icon = "lightning" + [[spotlight.link]] + href = "/feature/fetch-injection/" + text = "Fetch Inject" + [[spotlight.link]] + href = "/feature/lazy-loading/" + text = "Lazy Loading" + [[spotlight.link]] + href = "https://tools.pingdom.com/#5a399f9666400000" + text = "Benchmark" + target = "_blank" + rel = "external nofollow noopener" +[[spotlight]] + name = "privacy" + title = "Privacy Aware" + description = "Develop your entire site without Internet connectivity and expose an ephemeral Web server with e2e encryption and real-time traffic inspection." + icon = "eye" + [[spotlight.link]] + href = "/feature/work-offline/" + text = "Work Offline" + [[spotlight.link]] + href = "/feature/referrer-policy/" + text = "Hide Referrals" + [[spotlight.link]] + href = "/feature/ephemeral-hosting/" + text = "SSH Host" +[[spotlight]] + name = "security" + title = "Securely Designed" + description = "Verify the authenticity of your installation using secure cryptographic hashes and use CSP, SRI and Referrer Policy to lock down your content." + icon = "lock" + [[spotlight.link]] + href = "/feature/content-security-policy/" + text = "Content Policy" + [[spotlight.link]] + href = "/validate/" + text = "Check Integrity" + [[spotlight.link]] + href = "/feature/#security" + text = "See All" +[[spotlight]] + name = "graphics" + title = "Advanced Graphics" + description = "Add high-resolution, responsive images with low-quality image placeholders and engaging visual effects without even touching an image editor." + icon = "photo" + [[spotlight.link]] + href = "/feature/post-images/" + text = "Post Images" + [[spotlight.link]] + href = "/feature/custom-homepage/" + text = "Thumbnails" + [[spotlight.link]] + href = "/module/hall-of-mirrors/" + text = "Galleries" +[[spotlight]] + name = "customize" + title = "Easily Customized" + description = "Toggle between 1 of 8 customizable skin styles or disable them entirely and use custom layouts and styles to take complete design control." + icon = "options" + [[spotlight.link]] + href = "/feature/custom-homepage/" + text = "Homepage" + [[spotlight.link]] + href = "/feature/skin-styles/" + text = "Skins" + [[spotlight.link]] + href = "/feature/#customizing" + text = "See All" +[[spotlight]] + name = "search" + title = "Fuzzy Search" + description = "Quickly locate indexed content anywhere on your site using inbuilt fuzzy search with automatic search indexing and full offline support." + icon = "search" + [[spotlight.link]] + href = "/feature/fuzzy-search/" + text = "Learn More" + [[spotlight.link]] + href = "/search/?s=uzzy%20searvh" + text = "Try It Now" +[[spotlight]] + name = "rewards" + title = "Rewards System" + description = "Earn rewards for keeping your software up-to-date and monetize attention to generate a borderless, low-maintenance passive income." + icon = "creditcard" + beta = true + [[spotlight.link]] + href = "/module/toxic-swamp/#installation" + text = "Installation" + [[spotlight.link]] + href = "/module/toxic-swamp/" + text = "Learn More" +[[spotlight]] + name = "extras" + title = "Batteries Included" + description = "Self-host your entire stack using commodity hardware and keep your source code and visitor metrics entirely under your control." + icon = "paperclip" + [[spotlight.link]] + href = "/extra/high-tea/" + text = "Gitea" + [[spotlight.link]] + href = "/extra/after-dark-k3s/" + text = "Kubernetes" + [[spotlight.link]] + href = "/module/voyeur/" + text = "Fathom" +[[spotlight]] + name = "builds" + title = "Extended Builds" + description = "Create **high-performance Hugo builds** using Alpine Linux with Musl. Builds Hugo Extended binary with Sass support using Docker **directly from source**." + icon = "export" + [[spotlight.link]] + href = "/feature/extended-builds/" + text = "Create Build Now" ++++ + +{{< hackcss-form action="/feature/quick-install" >}} + {{< hackcss-button type="primary" isghost="true" >}} + + +   Get Started + {{< /hackcss-button >}} + {{< hackcss-helpblock >}} + English and Bahasa + {{< /hackcss-helpblock >}} +{{< /hackcss-form >}} diff --git a/themes/after-dark/docs/content/extra/after-dark-k3s.md b/themes/after-dark/docs/content/extra/after-dark-k3s.md new file mode 100644 index 0000000..e75833d --- /dev/null +++ b/themes/after-dark/docs/content/extra/after-dark-k3s.md @@ -0,0 +1,29 @@ ++++ +title = "After Dark K3s" +date = 2019-06-27T16:00:54+08:00 +description = "Run containerized in a lightweight Kubernetes cluster." +categories = ["devops"] +keywords = ["cloud", "container", "k3s", "k8s", "kubernetes"] +features = ["code highlighter", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark K3s pairs {{< external "https://k3s.io" "K3s" />}} with {{< external "https://www.nginx.com" "Nginx" />}} enabling you to scale After Dark using container orchestration in a low-friction, efficient multi-tier deployment. Use it to self-host, and automatically build and serve your site in real-time. + +{{% hackcss-alert type="success" %}}**Tip:** Learn how to get wildcard SSL certificates (with auto-renewal) using K3s and Traefik in {{< external "https://plaindark.com/post/how-to-ssl-with-letsencrypt-and-kubernetes-traefik/" "Wildcard Let's Encrypt certs on Kubernetes with Traefik" />}}.{{% /hackcss-alert %}} + +# Benefits + +- Isolates published site inside a container. +- Uses IoC pattern to remove Hugo dependency. +- Doubles as a web server and reverse proxy. +- 75% more memory efficient than Kubernetes. +- Native support for ARM devices, ideal for IoT. +- Manage set-up using Configuration as Code. +- Integrate with {{< external "https://traefik.io/" "Traefik" />}} for HA front-ends. + +**Repository:** {{< external "https://git.habd.as/teowood/after-dark-k3s-amd64" />}} +
**Mirror:** {{< external "https://git.plaindark.com/teowood/after-dark-k3s-amd64" />}} diff --git a/themes/after-dark/docs/content/extra/high-tea.md b/themes/after-dark/docs/content/extra/high-tea.md new file mode 100644 index 0000000..9cf9a73 --- /dev/null +++ b/themes/after-dark/docs/content/extra/high-tea.md @@ -0,0 +1,29 @@ ++++ +title = "High Tea" +description = "Production-ready self-hosted full-stack git service." +categories = ["security"] +slug = "high-tea" +tags = ["privacy", "networking"] +features = ["related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +High Tea pairs {{< external href="https://gitea.io" text="Gitea" />}} with {{< external href="https://traefik.io" text="Traefik" />}} enabling you to manage your source code online using an intuitive and sleek-looking web-based interface: + +{{< figure alt="High Tea dashboard" + src="/images/addon-high-tea_1440x900-fs8.png" + lqipsrc="/images/addon-high-tea_960x600-fs8.png" + caption="Dashboard view within the High Tea Gitea application." +>}} + +Use it to manage organizations, create pull mirrors, selectively mark private repos, configure LFS and collaborate on code with others using git for free. + +High Tea also provides a Traefik integration so you can manage web services, monitor traffic and inspect service health in real-time. + +--- + +- {{< external "https://git.habd.as/comfusion/high-tea" />}} -- source +- {{< external "https://after-dark.habd.as/extra/high-tea/" />}} -- website diff --git a/themes/after-dark/docs/content/feature/_index.id.md b/themes/after-dark/docs/content/feature/_index.id.md new file mode 100644 index 0000000..94911e1 --- /dev/null +++ b/themes/after-dark/docs/content/feature/_index.id.md @@ -0,0 +1,10 @@ ++++ +title = "Features" +description = "Menjelajahi bermacam-macam fitur yang tersedia untuk anda di After Dark." +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Pilih fitur untuk mempelajari lebih lanjut atau menjalankan Instal Cepat untuk men-download dan menginstal setelah Dark dan mencoba salah satu dari ini sendiri. diff --git a/themes/after-dark/docs/content/feature/_index.md b/themes/after-dark/docs/content/feature/_index.md new file mode 100644 index 0000000..95d3c69 --- /dev/null +++ b/themes/after-dark/docs/content/feature/_index.md @@ -0,0 +1,10 @@ ++++ +title = "Features" +description = "Explore the many features available to you in After Dark." +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Choose a feature to learn more or run Quick Install to download and install After Dark and try any of these yourself. diff --git a/themes/after-dark/docs/content/feature/code-analysis.md b/themes/after-dark/docs/content/feature/code-analysis.md new file mode 100644 index 0000000..52cf5ae --- /dev/null +++ b/themes/after-dark/docs/content/feature/code-analysis.md @@ -0,0 +1,35 @@ ++++ +title = "Code Analysis" +description = "Test generated website HTML for problems." +categories = ["experience"] +tags = ["docker", "container", "cloud", "ci", "go", "robots"] +features = ["code highlighter", "related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark includes a source build of {{< external "https://github.com/wjdp/htmltest" "htmltest" />}} which may be used to analyze HTML generated for problems such as linkrot, meta attributes and more. + +Code analysis is ideal for identifying potential 404 errors and determining when to link to the archived version of an external page which has gone offline. + +To use install Docker then run the following command: + +```sh +cd after-dark/docker/htmltest && docker build --rm . +``` + +Build container uses Alpine and includes `musl-dev` for high-performance. Update the `HTMLTEST_VERSION` to get a specific release built. Upon successful build extract the resulting binary out of the scratch container like: + +``` +docker create -it --name temp f2b785583ce8 sh && \ +sudo docker cp temp:/htmltest /usr/local/bin && \ +docker rm -fv temp +``` + +Where `f2b785583ce8` is the scratch container’s Image ID and `/usr/local/bin` is the destination on the host. Place executable in most appropriate directory. + +If using Hugo `0.56.x` or higher may also possible to include `htmltest` as a Go module using {{< external "https://gohugo.io/hugo-modules/" "Hugo Modules" />}} if your particular use case calls for it. + +See {{< external "https://github.com/wjdp/htmltest" "htmltest" />}} for documentation and usage. diff --git a/themes/after-dark/docs/content/feature/code-highlighter.id.md b/themes/after-dark/docs/content/feature/code-highlighter.id.md new file mode 100644 index 0000000..3d42bc2 --- /dev/null +++ b/themes/after-dark/docs/content/feature/code-highlighter.id.md @@ -0,0 +1,113 @@ ++++ +title = "Code Highlighter" +description = "Kode sorot ditulis lebih dari 160 bahasa." +categories = ["experience"] +tags = ["color", "style", "syntax"] +feature = ["snippets", "related content", "jit requests"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menggunakan versi yang disesuaikan {{< external href="https://atom.io/themes/one-dark-syntax" text="One Dark Syntax" />}} untuk menghasilkan kode yang ramah cetak untuk lebih dari 160 bahasa. + + +{{< hackcss-card header="Supported Languages" text="ABNF, ANTLR, APL, ActionScript, ActionScript 3, Ada, Angular2, ApacheConf, AppleScript, Awk, BNF, Ballerina, Base Makefile, Bash, Batchfile, BlitzBasic, Brainfuck, C, C#, C++, CFEngine3, CMake, COBOL, CSS, Cap'n Proto, Ceylon, ChaiScript, Cheetah, Clojure, CoffeeScript, Common Lisp, Coq, Crystal, Cython, DTD, Dart, Diff, Django/Jinja, Docker, EBNF, Elixir, Elm, EmacsLisp, Erlang, FSharp, Factor, Fish, Forth, Fortran, GAS, GDScript, GLSL, Genshi, Genshi HTML, Genshi Text, Gnuplot, Go, Go HTML Template, Go Text Template, Groovy, HTML, HTTP, Handlebars, Haskell, Haxe, Hexdump, Hy, INI, Idris, Io, JSON, JSX, Java, JavaScript, Julia, Kotlin, LLVM, Lighttpd configuration file, Lua, Mako, Mason, Mathematica, MiniZinc, Modula-2, MorrowindScript, MySQL, Myghty, NASM, Newspeak, Nginx configuration file, Nim, Nix, OCaml, Objective-C, Octave, Org Mode, PHP, PL/pgSQL, POVRay, PacmanConf, Perl, Pig, PkgConfig, PostScript, PostgreSQL SQL dialect, PowerShell, Prolog, Protocol Buffer, Puppet, Python, Python 3, QBasic, R, Racket, Ragel, Rexx, Ruby, Rust, SCSS, SPARQL, SQL, Sass, Scala, Scheme, Scilab, Smalltalk, Smarty, Snobol, Solidity, SquidConf, Swift, TASM, TOML, Tcl, Tcsh, TeX, Termcap, Terminfo, Terraform, Thrift, Transact-SQL, Turtle, Twig, TypeScript, TypoScript, TypoScriptCssData, TypoScriptHtmlData, VHDL, VimL, WDTE, XML, Xorg, YAML, cfstatement, markdown, reStructuredText, reg, systemverilog, verilog" />}} + +Untuk mengaktifkan highlighter gunakan Hugo {{% external href="https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode" %}}`highlight` shortcode{{% /external %}} atau menunjukkan {{< external href="https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages" text="highlighting language" />}} di blok kode berpagar di dalam markdown anda: + +```` +```go-html-template +

+ {{ .body }} +
+``` +```` + +Menghasilkan kode yang dihighlight seperti berikut: + +```go-html-template +
+ {{ .body }} +
+``` + +Atau gunakan shortcode highlight yang disediakan oleh Hugo: + +Atau gabungkan {{% external href="https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode" %}}highlight shortcode{{% /external %}} disediakan oleh Hugo: + +```html +{{}} +@app.on_message(Filters.private) +def hello(client, message): + message.reply_text("Hello {}".format(message.from_user.first_name)) +{{}} +``` + +Untuk menambahkan nomor baris dan sorotan: + +{{< highlight python "linenos=inline,linenostart=5,hl_lines=2" >}} +@app.on_message(Filters.private) +def hello(client, message): + message.reply_text("Hello {}".format(message.from_user.first_name)) +{{< /highlight >}} + +Tidak menyukai warnanya? Tidak masalah. Gunakan perintah `hugo gen chromastyles` untuk {{< external href="https://gohugo.io/content-management/syntax-highlighting/#generate-syntax-highlighter-css" text="generate your own" />}} `syntax.css` stylesheet dari {{< external href="https://help.farbox.com/pygments.html" text="style gallery" />}} dan menyesuaikannya menggunakan tujuan umum {{< external href="https://git.habd.as/comfusion/atom-one-chroma" text="Atom One Chroma" />}} tema rol sintaks. + +Dan jika anda benar-benar berani berusaha mengapa tidak membuat beberapa seni ASCII yang dapat dieksekusi yang mewakili nama permainan yang anda implementasikan dalam bahasa yang digunakan: + +```brainfuck + + Linus Akesson mempersembahkan: + The Game Of Life implemented in Brainfuck + + +>>++++[<++++>-]<[<++++++>-]+[<[>>>>+<<<<-]>>>>[<<<<+>>>>>>+<<-]<+ + +++[>++++++++<-]>.[-]<+++[>+++<-]>+[>>.+<<-]>>[-]<<<++[<+++++>-]<.<<[>>>>+ + <<<<-]>>>>[<<<<+>>>>>>+<<-]<<[>>>>.+<<<++++++++++[<[>>+<<-]>>[<<+>>>>>++++++++ + +++<<<-]<[>+<-]>[<+>>>>+<<<-]>>>[>>>>>>>>>>>>+>+<< <<<<<<<<<<<-]>>>>>>>>>> +>>[-[>>>>+<<<<-]>[>>>>+<<<<-]>>>]> >>[<<<+>> >- ]<<<[>>+>+<<<-]>[->[<<< +<+>>>>-]<[<<< <+> >>>-]<<<< ]< ++++++ ++ +[>+++++<-]>>[<<+>>-]< +<[>---<-]>.[- ] <<<<<<<<< < <<<<<< < -]++++++++++.[-]<-]>>> +>[-]<[-]+++++ +++[>++++ ++++< - ]>--.[-]<,----------[<+ +>-]>>>>>>+<<<<< < <[>+>>>>>+>[ -]<<< << <<-]>++++++++++>>>>>[[-] +<<,<<<<<<<->>>> > >>[<<<<+>>>>-]<<<<[>>>>+ >+<<<<<-]>>>>>----------[<<<< +<<<<+<[>>>>+<<< <-]>>>>[<<<<+>>>>>>+<<- ]>[>-<-]>++++++++++[>+++++++++ +++<-]<<<<<<[>>> >+<<<<-]>>>>[<<<<+>>>>> >+<<-]>>>>[<<->>-]<<++++++++++ +[>+<-]>[>>>>>>> >>>>>+>+<<<< <<<<< <<<<-]>>> >> >>>>>>>[-[>>> +>+<<<<-]>[>>>> +<<<<-]>> > ]>> > [<< < +>>>-]+<<<[> +>>-<<<-]>[->[< <<<+>>>>-] <[ < < < <+>>>>-]<<< +<]<<<<<<<<<<<, [ -]]>]>[-+++ ++ + +++ ++[>+++++++ +++++>+++++++++ + +<<-]>[-[>>> +<<<- ]>>>[ < <<+ >>>>>>>+>+< +<<<<-]>>>>[-[> > >>+<<<<-]>[> >>>+< < <<-]> > >]> >>[<<<+>>>- +]<<<[>>+>+<<< - ]>[->[<<<<+> >>>-] < [<<< < +>> >>-]<<<<]<< +<<<<<<[>>>+<< < -]>>>[<<<+>> >>>>> + >+<< < <<-]<<[>>+<< +-]>>[<<+>>>>> >+>+<<<<<-]>> >>[-[ > >>>+ < <<<-]>[>>>>+< +<<<-]>[>>>>+< <<<-]>>]>>>[ - ]<[>+< - ]<[ - [<<<<+>>>>-]<<< +<]<<<<<<<<]<< <<<<<<<<++++ + +++++ [ >+++ + ++++++[<[>>+<<-]>>[<<+ +>>>>>++++++++ + ++<<< -] < [>+<- ] >[<+ > >>>+<<<-]>>>[<<<+>>>-] +<<<[>>>+>>>> > +<<<< << <<-]> > >>>> >>>[>>+<<-]>>[<<+<+>> +>-]<<<------ - -----[ >> >+<<< - ]>>> [<<<+> > >>>>>+>+<<<< +<-]>>>>[-[>> > >+<<<< -] > [>>>> + <<<<- ]>>> ] >>>[<<<+>>>- +]<<<[>>+>+<< < -]>>> >> > > [<<<+ >>>-]<<<[>>> ++<<<<<+>>- ]> > >>>>>[< <<+>>>-]<<<[> +>>+<<<<<<< <<+ > >>>>>-]< <<<<<<[->[<<<<+ +>>>>-]<[<<<<+>>>>-]<<<<]>[<<<<<< <+>>> >>>>-]<<<< <<<<<+++++++++++[> +>>+<<<-]>>>[<<<+>>>>>>>+>+<<<<<-]>>>>[-[> >>>+<<<<-]>[>>>>+<<<<-]>>>]>>>[<<< ++>>>-]<<<[>>+>+<<<-]>>>>>>>[<<<+>>>-]<<<[ >>>+<<<<<+>>-]>>>>>>>[<<<+>>>-]<<< +[>>>+<<<<<<<<<+>>>>>>-]<<<<<<<[->[< < < <+>>>>-]<[<<<<+>>>>-]<<<<]>[<<<<<<< ++>>>>>>>-]<<<<<<<<<+++++++++++[>>> > >>>+>+<<<<<<<<-]>>>>>>>[-[>>>>+<<<<- +]>[>>>>+<<<<-]>>>]>>>[<<<+>>>-]<<< [ >>+>+<<<-]>>>>>>>[<<<+>>>-]<<<[>>>+<< +<<<+>>-]>>>>>>>[<<<+>>>-]<<<[>>>+< <<<<<<<<+>>>>>>-]<<<<<<<[->[<<<<+>>>>- + ]<[<<<<+>>>>-]<<<<]>[<<<<<<<+>>>>> >>-]<<<<<<<----[>>>>>>>+<<<<<<<+[>>>>> + >>-<<<<<<<[-]]<<<<<<<[>>>>>>>>>>>>+>+<<<<<<<<<<<<<-][ lft@df.lth.se ]>>>>> + >>>>>>>[-[>>>>+<<<<-]>[>>>>+<<<<-]>[>>>>+<<<<-]>>]>>>[-]<[>+<-]<[-[<<<<+>> + >>-]<<<<]<<<<<<[-]]<<<<<<<[-]<<<<-]<-]>>>>>>>>>>>[-]<<]<<<<<<<<<<] + + Sebagai contoh, ketik "fg" untuk menghidupkan sel di baris f dan kolom g + Tekan enter untuk menghitung generasi berikutnya + Ketik q untuk berhenti + +``` + +Itu benar-benar Brainfuck. diff --git a/themes/after-dark/docs/content/feature/code-highlighter.md b/themes/after-dark/docs/content/feature/code-highlighter.md new file mode 100644 index 0000000..3213aaa --- /dev/null +++ b/themes/after-dark/docs/content/feature/code-highlighter.md @@ -0,0 +1,111 @@ ++++ +title = "Code Highlighter" +description = "Highlight code written in more than 160 languages." +categories = ["experience"] +tags = ["color", "style", "syntax"] +features = ["snippets", "related content", "jit requests"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark uses a customized version of {{< external href="https://atom.io/themes/one-dark-syntax" text="One Dark Syntax" />}} to produce print-friendly code highlighting for more than 160 languages. + + +{{< hackcss-card header="Supported Languages" text="ABNF, ANTLR, APL, ActionScript, ActionScript 3, Ada, Angular2, ApacheConf, AppleScript, Arduino, Awk, BNF, Ballerina, Base Makefile, Bash, Batchfile, BlitzBasic, Brainfuck, C, C#, C++, CFEngine3, CMake, COBOL, CSS, Cap'n Proto, Ceylon, ChaiScript, Cheetah, Clojure, CoffeeScript, Common Lisp, Coq, Crystal, Cython, DTD, Dart, Diff, Django/Jinja, Docker, EBNF, Elixir, Elm, EmacsLisp, Erlang, FSharp, Factor, Fish, Forth, Fortran, GAS, GDScript, GLSL, Genshi, Genshi HTML, Genshi Text, Gnuplot, Go, Go HTML Template, Go Text Template, Graphql, Groovy, HTML, HTTP, Handlebars, Haskell, Haxe, Hexdump, Hy, INI, Idris, Io, JSON, JSX, Java, JavaScript, Julia, Kotlin, LLVM, Lighttpd configuration file, Lua, Mako, Mason, Mathematica, Matlab, MiniZinc, Modula-2, MorrowindScript, MySQL, Myghty, NASM, Newspeak, Nginx configuration file, Nim, Nix, OCaml, Objective-C, Octave, Org Mode, PHP, PL/pgSQL, POVRay, PacmanConf, Perl, Pig, PkgConfig, PostScript, PostgreSQL SQL dialect, PowerShell, Prolog, Protocol Buffer, Puppet, Python, Python 3, QBasic, R, Racket, Ragel, Rexx, Ruby, Rust, SCSS, SPARQL, SQL, Sass, Scala, Scheme, Scilab, Smalltalk, Smarty, Snobol, Solidity, SquidConf, Swift, TASM, TOML, Tcl, Tcsh, TeX, Termcap, Terminfo, Terraform, Thrift, Transact-SQL, Turing, Turtle, Twig, TypeScript, TypoScript, TypoScriptCssData, TypoScriptHtmlData, VHDL, VimL, WDTE, XML, Xorg, YAML, cfstatement, markdown, reStructuredText, reg, systemverilog, verilog" />}} + +To activate the highlighter indicate the {{< external href="https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages" text="highlighting language" />}} in a fenced code block within your markdown: + +```` +```go-html-template +
+ {{ .body }} +
+``` +```` + +Resulting in the following highlighted code: + +```go-html-template +
+ {{ .body }} +
+``` + +Or use the {{% external href="https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode" %}}highlight shortcode{{% /external %}} provided by Hugo: + +```html +{{}} +@app.on_message(Filters.private) +def hello(client, message): + message.reply_text("Hello {}".format(message.from_user.first_name)) +{{}} +``` + +To add line numbers and highlighting: + +{{< highlight python "linenos=inline,linenostart=5,hl_lines=2" >}} +@app.on_message(Filters.private) +def hello(client, message): + message.reply_text("Hello {}".format(message.from_user.first_name)) +{{< /highlight >}} + +Not feeling the colors? No problem. Use the `hugo gen chromastyles` command to {{< external href="https://gohugo.io/content-management/syntax-highlighting/#generate-syntax-highlighter-css" text="generate your own" />}} `syntax.css` stylesheet from the {{< external href="https://help.farbox.com/pygments.html" text="style gallery" />}} and customize it using the general-purpose {{< external href="https://git.habd.as/comfusion/atom-one-chroma" text="Atom One Chroma" />}} syntax theme-roller. + +And if you're really enterprising why not create some executable ASCII art representing the name of the game you implemented in the language used: + +```brainfuck + + Linus Akesson presents: + The Game Of Life implemented in Brainfuck + + +>>++++[<++++>-]<[<++++++>-]+[<[>>>>+<<<<-]>>>>[<<<<+>>>>>>+<<-]<+ + +++[>++++++++<-]>.[-]<+++[>+++<-]>+[>>.+<<-]>>[-]<<<++[<+++++>-]<.<<[>>>>+ + <<<<-]>>>>[<<<<+>>>>>>+<<-]<<[>>>>.+<<<++++++++++[<[>>+<<-]>>[<<+>>>>>++++++++ + +++<<<-]<[>+<-]>[<+>>>>+<<<-]>>>[>>>>>>>>>>>>+>+<< <<<<<<<<<<<-]>>>>>>>>>> +>>[-[>>>>+<<<<-]>[>>>>+<<<<-]>>>]> >>[<<<+>> >- ]<<<[>>+>+<<<-]>[->[<<< +<+>>>>-]<[<<< <+> >>>-]<<<< ]< ++++++ ++ +[>+++++<-]>>[<<+>>-]< +<[>---<-]>.[- ] <<<<<<<<< < <<<<<< < -]++++++++++.[-]<-]>>> +>[-]<[-]+++++ +++[>++++ ++++< - ]>--.[-]<,----------[<+ +>-]>>>>>>+<<<<< < <[>+>>>>>+>[ -]<<< << <<-]>++++++++++>>>>>[[-] +<<,<<<<<<<->>>> > >>[<<<<+>>>>-]<<<<[>>>>+ >+<<<<<-]>>>>>----------[<<<< +<<<<+<[>>>>+<<< <-]>>>>[<<<<+>>>>>>+<<- ]>[>-<-]>++++++++++[>+++++++++ +++<-]<<<<<<[>>> >+<<<<-]>>>>[<<<<+>>>>> >+<<-]>>>>[<<->>-]<<++++++++++ +[>+<-]>[>>>>>>> >>>>>+>+<<<< <<<<< <<<<-]>>> >> >>>>>>>[-[>>> +>+<<<<-]>[>>>> +<<<<-]>> > ]>> > [<< < +>>>-]+<<<[> +>>-<<<-]>[->[< <<<+>>>>-] <[ < < < <+>>>>-]<<< +<]<<<<<<<<<<<, [ -]]>]>[-+++ ++ + +++ ++[>+++++++ +++++>+++++++++ + +<<-]>[-[>>> +<<<- ]>>>[ < <<+ >>>>>>>+>+< +<<<<-]>>>>[-[> > >>+<<<<-]>[> >>>+< < <<-]> > >]> >>[<<<+>>>- +]<<<[>>+>+<<< - ]>[->[<<<<+> >>>-] < [<<< < +>> >>-]<<<<]<< +<<<<<<[>>>+<< < -]>>>[<<<+>> >>>>> + >+<< < <<-]<<[>>+<< +-]>>[<<+>>>>> >+>+<<<<<-]>> >>[-[ > >>>+ < <<<-]>[>>>>+< +<<<-]>[>>>>+< <<<-]>>]>>>[ - ]<[>+< - ]<[ - [<<<<+>>>>-]<<< +<]<<<<<<<<]<< <<<<<<<<++++ + +++++ [ >+++ + ++++++[<[>>+<<-]>>[<<+ +>>>>>++++++++ + ++<<< -] < [>+<- ] >[<+ > >>>+<<<-]>>>[<<<+>>>-] +<<<[>>>+>>>> > +<<<< << <<-]> > >>>> >>>[>>+<<-]>>[<<+<+>> +>-]<<<------ - -----[ >> >+<<< - ]>>> [<<<+> > >>>>>+>+<<<< +<-]>>>>[-[>> > >+<<<< -] > [>>>> + <<<<- ]>>> ] >>>[<<<+>>>- +]<<<[>>+>+<< < -]>>> >> > > [<<<+ >>>-]<<<[>>> ++<<<<<+>>- ]> > >>>>>[< <<+>>>-]<<<[> +>>+<<<<<<< <<+ > >>>>>-]< <<<<<<[->[<<<<+ +>>>>-]<[<<<<+>>>>-]<<<<]>[<<<<<< <+>>> >>>>-]<<<< <<<<<+++++++++++[> +>>+<<<-]>>>[<<<+>>>>>>>+>+<<<<<-]>>>>[-[> >>>+<<<<-]>[>>>>+<<<<-]>>>]>>>[<<< ++>>>-]<<<[>>+>+<<<-]>>>>>>>[<<<+>>>-]<<<[ >>>+<<<<<+>>-]>>>>>>>[<<<+>>>-]<<< +[>>>+<<<<<<<<<+>>>>>>-]<<<<<<<[->[< < < <+>>>>-]<[<<<<+>>>>-]<<<<]>[<<<<<<< ++>>>>>>>-]<<<<<<<<<+++++++++++[>>> > >>>+>+<<<<<<<<-]>>>>>>>[-[>>>>+<<<<- +]>[>>>>+<<<<-]>>>]>>>[<<<+>>>-]<<< [ >>+>+<<<-]>>>>>>>[<<<+>>>-]<<<[>>>+<< +<<<+>>-]>>>>>>>[<<<+>>>-]<<<[>>>+< <<<<<<<<+>>>>>>-]<<<<<<<[->[<<<<+>>>>- + ]<[<<<<+>>>>-]<<<<]>[<<<<<<<+>>>>> >>-]<<<<<<<----[>>>>>>>+<<<<<<<+[>>>>> + >>-<<<<<<<[-]]<<<<<<<[>>>>>>>>>>>>+>+<<<<<<<<<<<<<-][ lft@df.lth.se ]>>>>> + >>>>>>>[-[>>>>+<<<<-]>[>>>>+<<<<-]>[>>>>+<<<<-]>>]>>>[-]<[>+<-]<[-[<<<<+>> + >>-]<<<<]<<<<<<[-]]<<<<<<<[-]<<<<-]<-]>>>>>>>>>>>[-]<<]<<<<<<<<<<] + + Type for instance "fg" to toggle the cell at row f and column g + Hit enter to calculate the next generation + Type q to quit + +``` + +That really is Brainfuck. diff --git a/themes/after-dark/docs/content/feature/content-security-policy.md b/themes/after-dark/docs/content/feature/content-security-policy.md new file mode 100644 index 0000000..9661052 --- /dev/null +++ b/themes/after-dark/docs/content/feature/content-security-policy.md @@ -0,0 +1,89 @@ ++++ +title = "Content Security Policy" +description = "Control resources the user agent is allowed to load." +categories = ["security"] +tags = ["privacy", "xss", "csp"] +features = ["code highlighter", "related content", "snippets"] +[blackfriday] + smartypants = false +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark helps you secure your site using Content Security Policy (CSP). Basic CSP is enabled by default and [Advanced Configurations]({{< relref "#advanced-configuration" >}}) are also possible. + +Basic CSP offers minimal protection but is still helpful as it keeps resources from accidentally being loaded over `http`. In addition, Basic CSP automatically blocks all Flash and Silverlight objects before they have a chance to load. + +## Basic Configuration + +Disable CSP site-wide add the following to your site config: + +```toml +[params] + disable_csp = true # disable site-wide +``` + +Disable CSP for a specific page using front matter: + +```toml +disable_csp = true # disable for page +``` + +## Advanced Configuration + +Advanced configuration allows you to fine-tune policy directives based on your specific needs. To get started specify at least 1 CSP directive in site config. + +{{% hackcss-alert type="info" %}}**Note:** You may wish to {{< external "https://gohugo.io/getting-started/usage/#disable-livereload" "Disable LiveReload" />}} while defining advanced config.{{% /hackcss-alert %}} + +Define the {{< external "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src" "script-src" />}} directive site-wide: + +```toml +[params.security.csp.directives] + scriptSrc = [ + "'self'", + "'unsafe-inline'", + "https:", + "'sha512-Jx/MqTxYWqHdoOkHItRJJZCvFDhERPr5gG4I5ESu3V+BgQyAQ6wXfdsGzhzmT0yyvkAWz2jbrn81q90RRJTSTg=='", + "'sha512-hno7WeTIciCJSjg/myjyK30HYkrcGCVwo4g4SpUalvrs3r2lS7bPNIQwbCNypKbg7BZ1sA4AsGnk6Gq4NOKpGA=='", + "'sha512-ISTAV0GadOIz/NXXHOS&+eCM0ysXVVHhQTlvA6LJxz/DeA5yIxm0Vqf5IE&+WH0yuuXkayAKtoZkQ326nch5f/fg=='", + "'strict-dynamic'" + ] +``` + +This will override the `script-src` directive's advanced default: + +Directive | Mapping | Advanced Default +--- | --- | --- +default-src | defaultSrc | 'none' +connect-src | connectSrc | 'self' +worker-src | workerSrc | 'self' +font-src | fontSrc | 'self' +media-src | mediaSrc | 'self' +img-src | imgSrc | 'self' data: +script-src | scriptSrc | 'none' +style-src | styleSrc | 'self' 'unsafe-inline' +frame-src | frameSrc | 'self' +object-src | objectSrc | 'none' + +Once set, view the `Content-Security-Policy` meta tag in the `head` of your page and inspect the console for errors as you navigate to different pages. Each time you encounter an error caused by CSP is an opportunity to improve your policy. + +Add page-specific directives from page front matter using the same structure and naming conventions used in site config to append items for that page: + +```toml +[security.csp.directives] + scriptSrc = [ + "'sha512-TKVuLlCT8+a0Chpa6Pw3clhu9fhZ9JOzgblgxQaUQVP/z4lfPnrdyWDOgucORnS2qapWu/iPVG2d0ywyGH2NjA=='" + ] +``` + +{{% hackcss-alert type="info" %}}**Note:** Page-specific directives _will not_ override any site-wide setting and will not apply without first overriding its advanced default via site config.{{% /hackcss-alert %}} + +Continue overriding advanced defaults as necessary until all CSP errors are resolved or you're satisfied with the changes. + +## Additional Resources + +- About {{< external "https://infosec.mozilla.org/guidelines/web_security#content-security-policy" "Content Security Policy" />}} +- Test policy with {{< external "https://observatory.mozilla.org" "Observatory by Mozilla" />}} +- See {{< external "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#Examples" "CSP examples" />}} to learn more diff --git a/themes/after-dark/docs/content/feature/custom-homepage.md b/themes/after-dark/docs/content/feature/custom-homepage.md new file mode 100644 index 0000000..de89c96 --- /dev/null +++ b/themes/after-dark/docs/content/feature/custom-homepage.md @@ -0,0 +1,167 @@ ++++ +title = "Custom Homepage" +description = "Hide the blog and specify how content is shown." +categories = ["customizing"] +tags = ["layout", "templating", "style", "metadata", "semantics", "robots"] +features = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark provides a configurable way to customize the content shown on your homepage without the need for creating a [Custom Layout](../custom-layouts). Use it to hide the blog and display recent content from various sections of your site. + +{{< hackcss-alert >}} +{{< figure + src="/images/screenshots/feature-homepage-fs8.png" +>}} +{{< /hackcss-alert >}} + +{{< hackcss-card header="Quick Example" >}} +{{< highlight toml "linenos=inline" >}} +[params.layout.home] + hide_blog = true + +[[params.layout.home.section]] + type = "about" + weight = 1 + +[[params.layout.home.section]] + type = "code" # Required, name of section to show on homepage + limit = 4 # Optional, set number of items to show from section + weight = 2 # Optional, choose layout order for section + thumbs = ["fill", "400x400"] # Optional, thumbnail image processing + +[[params.layout.home.section]] + type = "site" + limit = 2 + weight = 3 + +[[params.layout.home.section]] + type = "post" + limit = 3 + weight = 4 +{{< /highlight >}} +{{< /hackcss-card >}} + +Start by adding a section to display: + +```toml +[[params.layout.home.section]] + type = "post" +``` + +Limit the number of items shown: + +```toml +[[params.layout.home.section]] + type = "post" + limit = 3 +``` + +Then hide the blog if you like: + +```toml +[params.layout.home] + hide_blog = true +``` + +And use the space to add more sections: + +```toml +[[params.layout.home.section]] + type = "post" + +[[params.layout.home.section]] + type = "podcast" +``` + +Or add stand-alone pages too: + +```toml +[[params.layout.home.section]] + type = "about" +``` + +And display them in order by weight: + +```toml +[[params.layout.home.section]] + type = "about" + weight = 1 + +[[params.layout.home.section]] + type = "podcast" + weight = 2 +``` + +With each section containing generic [Structured Data](../structured-data): + +``` +Homepage +├── Thing +└── ItemList + ├── Thing + ├── Thing + └── Thing +``` + +Which may be enhanced using front matter: + +``` +├── archetypes +├── content +│ └── about.md +│ └── podcast +│ ├── _index.md +│ ├── secrets-of-silicon-valley +│ ├── the-5g-dragnet +│ └── language-is-a-weapon +├── layouts +``` + +```toml +title = "About" +description = "Information about the site." +[schema] + type = "AboutPage" # inside about.md +``` + +```toml +title = "Podcasts" +description = "Live on the Web. Fresh to your head." +[schema] + type = "Audiobook" # inside _index.md +``` + +Resulting in machine-readable structure: + +``` +Homepage +├── AboutPage +└── ItemList + ├── Audiobook + ├── Audiobook + └── Audiobook +``` + +Including `name` and `description` properties consistent between what's shown to users and what will appear in SERPs. + +Item lists may include thumbnail images generated automatically for any `ItemList` element using a [Post Images](../post-images)-formatted resource bundle and containing `thumbnail` in the name: + +```toml +[[resources]] + src = "**hyperdrive-logo.png" + name = "header thumbnail" +``` + +Images include high-performance defaults and may be modified using {{< external "https://gohugo.io/content-management/image-processing/#readout" "Hugo Image Processing" />}} via config using the `thumbs` property in site config: + +```toml +[[params.layout.home.section]] + type = "code" + thumbs = ["fill", "400x400"] +``` + +Valid image processing options are `fit`, `resize` and `fill`, and image dimensions may be omitted for a 4x3 aspect ratio thumbnail. diff --git a/themes/after-dark/docs/content/feature/custom-layouts.id.md b/themes/after-dark/docs/content/feature/custom-layouts.id.md new file mode 100644 index 0000000..605f81b --- /dev/null +++ b/themes/after-dark/docs/content/feature/custom-layouts.id.md @@ -0,0 +1,86 @@ ++++ +title = "Custom Layouts" +description = "Menyesuaikan tata letak tanpa memodifikasi sumber tema." +categories = ["customizing"] +tags = ["layout", "templating", "style"] +feature = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menggunakan blok template untuk memfasilitasi pembuatan tata letak halaman yang unik di mana saja di dalam situs anda. Gunakan itu untuk menambah [Snippets](../snippets) ke setiap bagian halaman, secara selektif [Custom Styles](../custom-styles) atau tambahkan kira-kira satu bagian ke beranda. + +## Bagaimana cara kerjanya + +Berikan 'block' berikut ini dengan nilai standart pilihan: + +```go-html-template +{{ block "title" }}Judul Situs{{ end }} +``` + +Templates warisan dapat menghilangkan blok dan mempertahankan nilai standart atau menerangkan block untuk mengubah nilainya, seperti yang ditunjukan berikut ini: + +```go-html-template +{{ define "title" }}Judul Halaman | Site Title{{ end }} +``` + +Digabungkan dengan {{< external href="https://gohugo.io/templates/lookup-order/" text="Lookup Order in Hugo" />}} block menjadi penting dalam menunjuk bagian dalam yang dapat diedit, dan meningkatkan penggunaan kembali file templates yang sudah ada. + +## Diterapkan dalam konteks + +Inilah template yang digunakan untuk menampilkan sebuah halaman di After Dark: + +{{< highlight go-html-template >}} +{{< include "themes/after-dark/layouts/_default/single.html" >}} +{{< /highlight >}} + +Tidak banyak tentang itu. Sebagian besar kode diwarisi dari template lain, memberikan gambaran yang jelas tentang struktur halaman dan membuat modifikasi yang sepele. + +## Membuat milik anda sendiri + +Bayangkan anda membuat bagian Buku Audio untuk situs anda dan menginginkan dua layout khusus baru: yang satu untuk membuat daftar klip audio dan yang lain untuk menjelaskan. + +Untuk mendapatkan hal tersebut dengan menggunakan template block, pertama buat bagian 'audiobook' dengan satu halaman untuk menggambarkan klip: + +```sh +$ hugo new audiobook/the-power-of-now.md +``` + +Menghasilkan struktur pohon sebagai berikut: + +``` +├── assets +├── content +│   └── audiobook +│   └── the-power-of-now.md +├── layouts +``` + +Jika sudah melayani situs anda bagian dan halaman audiobooks anda akan segera muncul menggunakan standart template block. Untuk menyesuaikan dari standart, tambahkan `list.html` dan `single.html` ke a `layouts/audiobook` di situs direktori anda. + +Jika file belum ada, salinlah dari tema standart: + +```sh +$ mkdir -p layouts/audiobook +$ cp themes/after-dark/layouts/_default/list.html layouts/audiobook +$ cp themes/after-dark/layouts/_default/single.html layouts/audiobook +``` + +Menghasilkan struktur pohon`layouts` sebagai berikut: + +``` +├── content +├── layouts +│   └── audiobook +│   ├── list.html +│ └── single.html +├── static +``` + +Sesuaikan `list.html` dan `single.html` layouts dan gunakan [Custom Styles](../custom-styles) untuk mendapatkan hasil yang diinginkan. Gunakan referensi sumber daya berikut sebagai bantuan: + +- {{< external "https://gohugo.io/templates/" />}} untuk fungsi templating dan logika +- {{< external "https://devdocs.io" />}} untuk HTML yang komprehensif dan CSS reference +- {{< external "https://inclusive-components.design" />}} untuk ide pola design diff --git a/themes/after-dark/docs/content/feature/custom-layouts.md b/themes/after-dark/docs/content/feature/custom-layouts.md new file mode 100644 index 0000000..c2b913c --- /dev/null +++ b/themes/after-dark/docs/content/feature/custom-layouts.md @@ -0,0 +1,89 @@ ++++ +title = "Custom Layouts" +description = "Customize layouts without modifying theme source." +categories = ["customizing"] +tags = ["layout", "templating", "style"] +features = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark uses block templates to facilitate the creation of unique page layouts anywhere on your site. Use them to add [Snippets](../snippets) to pages in a section, selectively apply [Custom Styles](../custom-styles) or add an about section to the homepage. + +## How it works + +Given the following `block` with optional default value: + +```go-html-template +{{ block "title" }}Site Title{{ end }} +``` + +Inheriting templates may omit the block and keep the default value or `define` the block to change its value, as shown here: + +```go-html-template +{{ define "title" }}Page Title | Site Title{{ end }} +``` + +Combined with {{< external href="https://gohugo.io/templates/lookup-order/" text="Lookup Order in Hugo" />}} blocks become valuable in designating editable regions within, and improving reuse of, existing template files. + +## Applied in context + +Here's the template used to display an individual page in After Dark: + +{{< highlight go-html-template >}} +{{< include "themes/after-dark/layouts/_default/single.html" >}} +{{< /highlight >}} + +There's not much to it. Most of the code is inherited from another template, giving a clear picture of the page structure and making modifications trivial. + +## Creating your own + +Imagine you're creating an Audiobooks section for your site and want two new custom layouts: one to list audio clips and another to describe them. + +To achieve this using block templates first create an `audiobook` section with a single page to describe a clip: + +```sh +$ hugo new audiobook/the-power-of-now.md +``` + +Resulting in the following `content` tree structure: + +``` +├── assets +├── content +│   └── audiobook +│   └── the-power-of-now.md +├── layouts +``` + +If already serving your site the Audiobooks section and page will appear immediately using the default block templates. To customize from default add a `list.html` and `single.html` to a `layouts/audiobook` directory in your site. + +If the files don't exist yet, copy them from theme defaults: + +```sh +$ mkdir -p layouts/audiobook +$ cp themes/after-dark/layouts/_default/list.html layouts/audiobook +$ cp themes/after-dark/layouts/_default/single.html layouts/audiobook +``` + +Resulting in the following `layouts` tree structure: + +``` +├── content +├── layouts +│   └── audiobook +│   ├── list.html +│ └── single.html +├── static +``` + +Adjust `list.html` and `single.html` layouts and use [Custom Styles](../custom-styles) to achieve the desired result. Reference the following resources for help: + +- {{< external "https://gohugo.io/templates/" />}} for templating functions and logic +- {{< external "https://devdocs.io" />}} for a comprehensive HTML and CSS reference +- {{< external "https://internetingishard.com" />}} learn HTML & CSS for free +- {{< external "https://inclusive-components.design" />}} for design pattern ideas +- {{< external "https://diveintohtml5.info" >}} background behind HTML5 +- {{< external "https://gsnedders.html5.org/outliner/" />}} test your HTML document outline diff --git a/themes/after-dark/docs/content/feature/custom-styles.id.md b/themes/after-dark/docs/content/feature/custom-styles.id.md new file mode 100644 index 0000000..5fcd26e --- /dev/null +++ b/themes/after-dark/docs/content/feature/custom-styles.id.md @@ -0,0 +1,40 @@ ++++ +title = "Custom Styles" +description = "Mengubah gaya tema untuk design kontrol yang lengkap." +categories = ["customizing"] +tags = ["color", "style", "branding"] +feature = ["code highlighter", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menggunakan {{< external href="https://gohugo.io/hugo-pipes/" text="Hugo Pipes" />}} untuk mengaktifkan kostomisasi gaya tema menggunakan CSS. Jika tidak diubah gaya khusus berikut disediakan secara standart: + +{{< highlight css "linenos=inline" >}} +{{< include "themes/after-dark/assets/css/custom.css" >}} +{{< /highlight >}} + +Sesuaikan dari `custom.css` di situs `assets/css` direktori: + +``` +├── archetypes +├── assets +│   └── css +│   └── custom.css +├── content +``` + +Jika file belum ada, salinlah dari tema standart: + +```sh +$ mkdir -p assets/css +$ cp themes/after-dark/assets/css/custom.css assets/css +``` + +Kemudian buka file dan mulailah mengedit, atau menghapusnya untuk mengembalikan ke bentuk standart. + +{{< hackcss-alert type="info" >}} + Tip: Pilih dari ribuan palet warna yang telah ditetapkan {{< external "https://coolors.co/" />}}. +{{< /hackcss-alert >}} diff --git a/themes/after-dark/docs/content/feature/custom-styles.md b/themes/after-dark/docs/content/feature/custom-styles.md new file mode 100644 index 0000000..cc9b630 --- /dev/null +++ b/themes/after-dark/docs/content/feature/custom-styles.md @@ -0,0 +1,40 @@ ++++ +title = "Custom Styles" +description = "Modify theme styles for complete design control." +categories = ["customizing"] +tags = ["color", "style", "branding"] +features = ["code highlighter", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark uses {{< external href="https://gohugo.io/hugo-pipes/" text="Hugo Pipes" />}} to enable customization of theme styles using CSS. Left unmodified the following custom styles are provided by default: + +{{< highlight css "linenos=inline" >}} +{{< include "themes/after-dark/assets/css/custom.css" >}} +{{< /highlight >}} + +Adjust them from `custom.css` in the site `assets/css` directory: + +``` +├── archetypes +├── assets +│   └── css +│   └── custom.css +├── content +``` + +If the file doesn't exist yet, copy it from the theme default: + +```sh +$ mkdir -p assets/css +$ cp themes/after-dark/assets/css/custom.css assets/css +``` + +Then open the file and begin editing, or remove it to restore default styles. + +{{< hackcss-alert type="info" >}} + Tip: Choose from thousands of predefined color palettes on {{< external "https://coolors.co/" />}}. +{{< /hackcss-alert >}} diff --git a/themes/after-dark/docs/content/feature/ephemeral-hosting.id.md b/themes/after-dark/docs/content/feature/ephemeral-hosting.id.md new file mode 100644 index 0000000..523fdc8 --- /dev/null +++ b/themes/after-dark/docs/content/feature/ephemeral-hosting.id.md @@ -0,0 +1,23 @@ ++++ +title = "Ephemeral Hosting" +description = "Hosting ephemeral dengan enkripsi end-to-end." +categories = ["security"] +tags = ["privacy", "networking"] +features = ["related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Menggunakan {{< external href="https://serveo.net" text="Serveo" />}} secara singkat anda dapat membuka situs anda ke internet, tanpa perlu mendaftar. Use this to [Work Offline]({{< relref "work-offline" >}}) and quietly poke a hole through your NAT or firewall to move information more discretely. + +{{% hackcss-alert type="warning" %}}**Warning:** No form of communication over the Internet is 100% secure.{{% /hackcss-alert %}} + +Sajikan dan buka situs anda dengan perintah berikut: + +```sh +$ hugo serve --disableLiveReload & ssh -R 80:localhost:1313 serveo.net +``` + +Setelah dimulai tekan `g` untuk inspeksi lalu lintas, atau berhenti untuk offline dan gunakan `fg` untuk kembali ke `hugo`. Instal {{< external href="https://matt.ucc.asn.au/dropbear/dropbear.html" text="dropbear" />}} or {{< external href="https://www.openssh.com" text="openssh" />}} jika anda membutuhkan `ssh`. diff --git a/themes/after-dark/docs/content/feature/ephemeral-hosting.md b/themes/after-dark/docs/content/feature/ephemeral-hosting.md new file mode 100644 index 0000000..4c9f408 --- /dev/null +++ b/themes/after-dark/docs/content/feature/ephemeral-hosting.md @@ -0,0 +1,23 @@ ++++ +title = "Ephemeral Hosting" +description = "Briefly expose your site to the Internet over SSH with encryption." +categories = ["security"] +tags = ["privacy", "networking"] +features = ["related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Using {{< external href="https://serveo.net" text="Serveo" />}} you may briefly expose your site to the Internet with end-to-end encryption, no sign-up required. Use this to [Work Offline]({{< relref "work-offline" >}}) and quietly poke a hole through your NAT or firewall to move information more discretely. + +{{% hackcss-alert type="warning" %}}**Warning:** No form of communication over the Internet is 100% secure.{{% /hackcss-alert %}} + +Serve and expose your site with the following command: + +```sh +$ hugo serve --disableLiveReload & ssh -R 80:localhost:1313 serveo.net +``` + +Once started press `g` for traffic inspection, or quit to go offline and use `fg` to return to `hugo`. Install {{< external href="https://matt.ucc.asn.au/dropbear/dropbear.html" text="dropbear" />}} or {{< external href="https://www.openssh.com" text="openssh" />}} if you need `ssh`. diff --git a/themes/after-dark/docs/content/feature/error-page.id.md b/themes/after-dark/docs/content/feature/error-page.id.md new file mode 100644 index 0000000..06832dd --- /dev/null +++ b/themes/after-dark/docs/content/feature/error-page.id.md @@ -0,0 +1,37 @@ ++++ +title = "Error Page" +description = "Berikan para pengunjung sebuah alasan agar tidak meninggalkan halaman ketika terjadi error." +categories = ["experience"] +tags = ["engagement", "retention", "branding"] +feature = ["error page", "snippets", "code highlighter", "related content", "index blocking"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark termasuk animasi {{< external rel="nofollow help" href="/404.html" text="404 Page" />}} yang dapat anda tampilkan ketika halaman lain tidak dapat ditemukan. Halaman yang error berisi latar belakang animasi dengan layar penuh dan "404" link dengan perawatan Ginsu. Mengikuti tautan untuk menavigasi ke beranda. + +{{< hackcss-card header="Interactive Example" >}} + +{{< /hackcss-card >}} + + + +Sesuaikan itu dari `404.html` di situs `content` direktori: + +``` +├── archetypes +├── content +│ ├── post +│   └── 404.html +├── layouts +``` + +Jika file belum ada, salinlah dari tema standart: + +```sh +$ cp themes/after-dark/content/404.html content +``` + +Konfigurasikan server web anda untuk mengarahkan ulang ke `404.html` ketika halaman tidak dapat ditemukan untuk menggunakannya. Gabungkan dengan [Voyeur Module](/module/voyeur) untuk membantu membuat {{< external href="https://gohugo.io/content-management/urls/#aliases" text="Page Aliases" />}}. diff --git a/themes/after-dark/docs/content/feature/error-page.md b/themes/after-dark/docs/content/feature/error-page.md new file mode 100644 index 0000000..f7b61f0 --- /dev/null +++ b/themes/after-dark/docs/content/feature/error-page.md @@ -0,0 +1,37 @@ ++++ +title = "Error Page" +description = "Give visitors a reason to stay when errors occur." +categories = ["experience"] +tags = ["engagement", "retention", "branding"] +features = ["error page", "snippets", "code highlighter", "related content", "index blocking"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark includes an animated {{< external rel="nofollow help" href="/404.html" text="404 Page" />}} you can display when other pages cannot be found. The error page contains a full-screen background animation and "404" link with Ginsu treatment. Following the link navigates to the homepage. + +{{< hackcss-card header="Interactive Example" >}} + +{{< /hackcss-card >}} + + + +Adjust it from `404.html` in the site `content` directory: + +``` +├── archetypes +├── content +│ ├── post +│   └── 404.html +├── layouts +``` + +If the file doesn't exist yet, copy it from the theme default: + +```sh +$ cp themes/after-dark/content/404.html content +``` + +Configure your web server to redirect to `404.html` when pages cannot be found to use it. Combine with [Voyeur Module](/module/voyeur) for help creating {{< external href="https://gohugo.io/content-management/urls/#aliases" text="Page Aliases" />}}. diff --git a/themes/after-dark/docs/content/feature/extended-builds.id.md b/themes/after-dark/docs/content/feature/extended-builds.id.md new file mode 100644 index 0000000..d9df63f --- /dev/null +++ b/themes/after-dark/docs/content/feature/extended-builds.id.md @@ -0,0 +1,37 @@ ++++ +title = "Extended Builds" +description = "Build Hugo with Sass and Go CDK Deploy support." +categories = ["core"] +tags = ["docker", "container", "sass", "cloud", "ci"] +features = ["code highlighter", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019, 2020" + license = "agpl-3.0-or-later" ++++ + +After Dark ships with the ability to build Hugo from tagged-version source. Supply a version tag and let Docker Machine build you a high-performance extended Hugo build with integrated Sass and Go CDK deployment support. + +To use install Docker then run the following command: + +```sh +cd after-dark/docker/hugo && docker build . +``` + +Build container uses Alpine and includes `musl-dev` for high-performance. Update the `HUGO_VERSION` to get a specific Hugo release built. Upon successful build extract the resulting `hugo` binary out of the scratch container like: + +```sh +docker create -it --name temp f2b785583ce8 sh && \ +sudo docker cp temp:/usr/local/bin/hugo /usr/local/bin && \ +docker rm -fv temp +``` + +Where `f2b785583ce8` is the scratch container's Image ID and `/usr/local/bin` is the destination on the host. Place executable in most appropriate directory. + +For builds without Sass support enabled turn off `CGO_ENABLED`, pass in a phony value to `BUILD_TAGS`, create another build and give it a docker tag: + +```sh +docker tag $(docker images -q | head -n 1) gohugoio/hugo:v0.61.0 +``` + +It's recommended at least 2GB of storage space is available when running builds. The resulting binary inside the scratch container is less than 50MB. diff --git a/themes/after-dark/docs/content/feature/extended-builds.md b/themes/after-dark/docs/content/feature/extended-builds.md new file mode 100644 index 0000000..d9df63f --- /dev/null +++ b/themes/after-dark/docs/content/feature/extended-builds.md @@ -0,0 +1,37 @@ ++++ +title = "Extended Builds" +description = "Build Hugo with Sass and Go CDK Deploy support." +categories = ["core"] +tags = ["docker", "container", "sass", "cloud", "ci"] +features = ["code highlighter", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019, 2020" + license = "agpl-3.0-or-later" ++++ + +After Dark ships with the ability to build Hugo from tagged-version source. Supply a version tag and let Docker Machine build you a high-performance extended Hugo build with integrated Sass and Go CDK deployment support. + +To use install Docker then run the following command: + +```sh +cd after-dark/docker/hugo && docker build . +``` + +Build container uses Alpine and includes `musl-dev` for high-performance. Update the `HUGO_VERSION` to get a specific Hugo release built. Upon successful build extract the resulting `hugo` binary out of the scratch container like: + +```sh +docker create -it --name temp f2b785583ce8 sh && \ +sudo docker cp temp:/usr/local/bin/hugo /usr/local/bin && \ +docker rm -fv temp +``` + +Where `f2b785583ce8` is the scratch container's Image ID and `/usr/local/bin` is the destination on the host. Place executable in most appropriate directory. + +For builds without Sass support enabled turn off `CGO_ENABLED`, pass in a phony value to `BUILD_TAGS`, create another build and give it a docker tag: + +```sh +docker tag $(docker images -q | head -n 1) gohugoio/hugo:v0.61.0 +``` + +It's recommended at least 2GB of storage space is available when running builds. The resulting binary inside the scratch container is less than 50MB. diff --git a/themes/after-dark/docs/content/feature/featured-posts.md b/themes/after-dark/docs/content/feature/featured-posts.md new file mode 100644 index 0000000..4ccf375 --- /dev/null +++ b/themes/after-dark/docs/content/feature/featured-posts.md @@ -0,0 +1,62 @@ ++++ +title = "Featured Posts" +description = "Display your favorite blog posts front-and-center." +categories = ["navigation"] +tags = ["seo", "retention", "layout", "templating", "style"] +features = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark helps you showcase your favorite blog posts by allowing you to easily specify a set of pages to appear first in post listings using only site config. + +{{< hackcss-alert >}} +{{< figure + src="/images/screenshots/feature-featured-posts-fs8.png" +>}} +{{< /hackcss-alert >}} + +Use featured posts to drive more traffic to your highest value pages, increase the visibility of niche content or target pages for additional inbound links. + +Adjust featured posts from {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} by adding: + +```toml +[params.layout.post.featured] + limit = 3 + items = [ + "borg-backup-minio-scaleway", + "dual-boot-manjaro-mojave-macbook-pro", + "surfing-uncensorable-web", + "encrypted-internet-wireguard-manjaro-linux" + ] +``` + +Modify `items` using the {{< external "https://gohugo.io/content-management/organization#slug" "page slugs" />}} from your posts and adjust the featured `limit` to the total number of items you wish to display. Like [Custom Homepage](../custom-homepage/) and [Related Content](../related-content/) performance-optimized thumbnail images will appear automatically when a post contains a [Post Image](../post-images/) with `thumbnail` in the name. + +Optionally, customize thumbnail styling using [Custom Styles](../custom-styles/): + +```css +ul.thumbnail.grid li a:hover figure { + filter: initial; +} +ul.thumbnail.grid li a figure { + position: relative; + line-height: 0; + margin-bottom: 8px; +} +ul.thumbnail.grid li a:hover figure::after { + content: ""; + position: absolute; + bottom: 0; + display: block; + width: 100%; + height: 100%; + background: radial-gradient( + circle, + rgba(0,0,0,0.1) 0, + rgba(0,0,0,0.3) 100% + ); +} +``` diff --git a/themes/after-dark/docs/content/feature/fetch-injection.id.md b/themes/after-dark/docs/content/feature/fetch-injection.id.md new file mode 100644 index 0000000..320d6ea --- /dev/null +++ b/themes/after-dark/docs/content/feature/fetch-injection.id.md @@ -0,0 +1,72 @@ ++++ +title = "Fetch Injection" +description = "Memuat skrip dan gaya eksternal dengan kecepatan luar biasa." +categories = ["experience"] +tags = ["performance", "styles"] +feature = ["snippets", "related content", "code highlighter"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menggunakan {{< external rel="external help" href="https://git.habd.as/jhabdas/fetch-inject" text="Fetch Inject" />}} pustaka untuk memuat dan menjalankan skrip dan gaya ekesternal lebih cepat dari yang dapat dilakukan browser. + +{{< external href="https://hackcabin.com/post/managing-async-dependencies-javascript/" text="Fetch Injection" />}} terkonsep dan dikembangkan untuk After Dark agar memungkinkan tautan dalam ke ukuran penuh [Galeri Gambar](/module/hall-of-mirrors) gambar tanpa memblokir pemuatan halaman dan memilki kinerja aplikasi lainnya: + + + + + + + + + + + + + + + + + +
Use CaseChrome Performance Comparison (4G simulated connection speed)
Without Fetch InjectWith Fetch Inject
{{< external href="https://habd.as/talks/screaming-fast-wordpress-redis-vultr/" text="WordPress Twenty Seventeen" />}}~3.600s~0.918s
+ +Gunakan Fetch Inject di [Custom Layouts](../custom-layouts) untuk memuat skrip dan gaya asal usul silang atau dari direktori statis situs anda. + +Berikan isi folder statis berikut: + +``` +├── layouts +├── static +│ ├── js +│ │ ├── jquery.slim.min.js +│ │ ├── tether.min.js +│ │ └── bootstrap.min.js +│ └── css +│ └── font-awesome.min.css +└── themes +``` + +Anda dapat memuat Bootstrap (w/Font Awesome) dan menunjukkan berapa lama itu selesai: + +{{< highlight html "linenos=inline" >}} + +{{< /highlight >}} + +Fetch Inject adalah 555 bytes terkompresi, non-blocking dan disertakan secara default pada [Custom Layouts](../custom-layouts). Kunjungi {{< external href="https://codepen.io/jhabdas/pen/MpVeOE?editors=0012" text="CodePen Playground" />}} untuk mencobanya. diff --git a/themes/after-dark/docs/content/feature/fetch-injection.md b/themes/after-dark/docs/content/feature/fetch-injection.md new file mode 100644 index 0000000..d7cd49a --- /dev/null +++ b/themes/after-dark/docs/content/feature/fetch-injection.md @@ -0,0 +1,72 @@ ++++ +title = "Fetch Injection" +description = "Load external scripts and styles with incredible speed." +categories = ["experience"] +tags = ["performance", "styles"] +features = ["snippets", "related content", "code highlighter"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark uses the {{< external rel="external help" href="https://git.habd.as/jhabdas/fetch-inject" text="Fetch Inject" />}} library to load and execute external scripts and styles faster than browsers are capable of otherwise. + +{{< external href="https://hackcabin.com/post/managing-async-dependencies-javascript/" text="Fetch Injection" />}} was conceptualized and developed for After Dark to make it possible to deep-link to full-sized [Image Gallery](/module/hall-of-mirrors) images without blocking page load and has other performance applications: + + + + + + + + + + + + + + + + + +
Use CaseChrome Performance Comparison (4G simulated connection speed)
Without Fetch InjectWith Fetch Inject
{{< external href="https://habd.as/talks/screaming-fast-wordpress-redis-vultr/" text="WordPress Twenty Seventeen" />}}~3.600s~0.918s
+ +Use Fetch Inject in your [Custom Layouts](../custom-layouts) to load scripts and styles cross-origin or from your site `static` directory. + +Given the following `static` folder contents: + +``` +├── layouts +├── static +│ ├── js +│ │ ├── jquery.slim.min.js +│ │ ├── tether.min.js +│ │ └── bootstrap.min.js +│ └── css +│ └── font-awesome.min.css +└── themes +``` + +You can load Bootstrap (w/Font Awesome) and show how long ago it finished: + +{{< highlight html "linenos=inline" >}} + +{{< /highlight >}} + +Fetch Inject is 555 bytes compressed, non-blocking and included by default in [Custom Layouts](../custom-layouts). Visit the {{< external href="https://codepen.io/jhabdas/pen/MpVeOE?editors=0012" text="CodePen Playground" />}} to try it out. diff --git a/themes/after-dark/docs/content/feature/fuzzy-search.id.md b/themes/after-dark/docs/content/feature/fuzzy-search.id.md new file mode 100644 index 0000000..454b489 --- /dev/null +++ b/themes/after-dark/docs/content/feature/fuzzy-search.id.md @@ -0,0 +1,47 @@ ++++ +title = "Fuzzy Search" +description = "Secara cepat menemukan konten yang telah di indeks dimanapun pada situs anda." +categories = ["navigation"] +tags = ["links", "search", "controls"] +feature = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Jika mesin pencari dapat menemukannya, anda pun juga bisa. Temukan lokasi konten yang dapat diindeks dengan cepat menggunakan fuzzy search. Tidak memerlukan pendaftaran. + +{{< hackcss-card header="Interactive Example" >}} + +{{< /hackcss-card >}} + +Sesuaikan dari `_index.md` di situs `content/search` direktori: + +``` +├── archetypes +├── content +│ └── search +│ └── _index.md +├── static +├── themes +``` + +Jika file belum ada, buatlah: + +```sh +$ hugo new search/_index.md +``` + +Dan tentukan`JSON` {{< external href="https://gohugo.io/templates/output-formats" text="Output Format" />}} di dalam situs konfigurasi: + +```toml +[outputs] + home = ["HTML", "RSS", "JSON"] +``` + +{{% hackcss-alert type="info" %}}**Note:** ini menambahkan `JSON` sambil menyimpan `HTML` dan `RSS` secara standart.{{% /hackcss-alert %}} + +Setelah diaktifkan, situs anda akan mulai menghasilkan file `index.json` selama pembuatan, memberikan fuzzy search data yang dibutuhkan untuk membantu anda menemukan halaman. + +Cobalah dengan menavigasi [domain.example/search](/search), memasukkan permintaan pencarian dan dengan menggunakan Tab untuk menavigasi diantara hasil pencarian. diff --git a/themes/after-dark/docs/content/feature/fuzzy-search.md b/themes/after-dark/docs/content/feature/fuzzy-search.md new file mode 100644 index 0000000..3386b35 --- /dev/null +++ b/themes/after-dark/docs/content/feature/fuzzy-search.md @@ -0,0 +1,47 @@ ++++ +title = "Fuzzy Search" +description = "Quickly locate indexed content anywhere on the site." +categories = ["navigation"] +tags = ["links", "search", "controls"] +features = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +If a search engine can find it, so can you. Quickly locate indexable content site-wide with fuzzy search. No registration necessary. + +{{< hackcss-card header="Interactive Example" >}} + +{{< /hackcss-card >}} + +Adjust it from `_index.md` in the site `content/search` directory: + +``` +├── archetypes +├── content +│ └── search +│ └── _index.md +├── static +├── themes +``` + +If the file doesn't exist, yet create it: + +```sh +$ hugo new search/_index.md +``` + +And specify the `JSON` {{< external href="https://gohugo.io/templates/output-formats" text="Output Format" />}} in site config: + +```toml +[outputs] + home = ["HTML", "RSS", "JSON"] +``` + +{{% hackcss-alert type="info" %}}**Note:** This adds `JSON` while keeping the `HTML` and `RSS` defaults.{{% /hackcss-alert %}} + +Once activated your site will begin outputting an `index.json` file during generation, giving fuzzy search the data it needs to help you locate pages. + +Try it now by navigating to [domain.example/search](/search/), or, if enabled, `Search` in the [Section Menu](../section-menu/), entering a query and navigating between results using Tab. diff --git a/themes/after-dark/docs/content/feature/index-blocking.id.md b/themes/after-dark/docs/content/feature/index-blocking.id.md new file mode 100644 index 0000000..8205407 --- /dev/null +++ b/themes/after-dark/docs/content/feature/index-blocking.id.md @@ -0,0 +1,56 @@ ++++ +title = "Index Blocking" +description = "Menentukan halaman untuk mencegahnya muncul dalam pencarian." +categories = ["search"] +tags = ["links", "search", "robots", "metadata"] +feature = ["code highlighter", "related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menggunakan `noindex` robots meta arahan untuk mencegah mesin pencari merayap dan mengindeks bagian-bagian tertentu dari situs anda. Itu muncul di dokumen HTML `head` dan terlihat seperti berikut ini: + +```html + +``` + +Tidak seperti {{< external href="http://www.robotstxt.org" text="robots.txt" />}} meta arahan diterangkan dalam konten halaman itu sendiri dan dengan jelas menunjuk yang mana, jika ada, halaman harus diblokir dari pengindeksan bahkan jika beberapa halaman tersebut muncul di situs anda {{< external href="https://gohugo.io/templates/sitemap-template/" text="Sitemap" />}}. + +Untuk memfasilitasi penemuan halaman indeks yang diblokir [Fuzzy Search](../fuzzy-search) menggunakan meta arahan yang sama yang terbuka ke mesin pencari untuk mencegah penyingkapan halaman dalam daftar hasil itu sendiri. Oleh karena itu jika sebuah halaman dapat ditemukan di fuzzy search, pada akhirnya halaman itu dapat muncul pada halaman hasil mesin pencari. + +Sesuaikan pemblokiran indeks per-halaman menggunakan `noindex` {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}}: + +```toml +noindex = true # set false atau hapus untuk mmebuka blokir +``` + +Blok semua bagian menggunakan file`_index.md` dengan pengaturan seperti diatas: + +``` +├── content +│ ├── legal +│ │ ├── _index.md +│ │ ├── terms.md +│ │ └── privacy.md +│ ├── post +``` + +Secara standart jenis halaman seperti berikut diblokir secara otomatis: + +- Daftar bagian secara otomatis ditautkan dari [Menu Bagian](../section-menu); +- [Halaman Taksonomi](../taxonomy-pages) seperti `Category`, `Tag` dan daftar istilah; dan, +- Jika diaktifkan, halaman [Fuzzy Search](../fuzzy-search) atau beberapa hasil yang terkait erat di dalam. + +Sesuaikan defaults menggunakan pengaturan `noindex_kinds` dari {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}}. Sebagai contoh, untuk mengaktifkan perayapan dari bagian halaman tambahkan hal berikut ini ke konfigurasi : + +```toml +[params] + noindex_kinds = [ + "taxonomy", + "taxonomyTerm" + ] # crawl "section" pages +``` + +Pelajari tentang {{< external href="https://moz.com/learn/seo/robots-meta-directives" text="Robots Meta Directives on Moz" />}} dan lihatlah bagaimana Google menggunakan `noindex` di {{< external href="https://support.google.com/webmasters/answer/93710" text="Block search indexing with 'noindex'" />}}. diff --git a/themes/after-dark/docs/content/feature/index-blocking.md b/themes/after-dark/docs/content/feature/index-blocking.md new file mode 100644 index 0000000..0f8bfac --- /dev/null +++ b/themes/after-dark/docs/content/feature/index-blocking.md @@ -0,0 +1,56 @@ ++++ +title = "Index Blocking" +description = "Define pages to prevent them from appearing in search." +categories = ["search"] +tags = ["links", "search", "robots", "metadata"] +features = ["code highlighter", "related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark uses the `noindex` robots meta directive to prevent search engines from crawling and indexing certain parts of your site. It appears in the HTML document `head` and looks like this: + +```html + +``` + +Unlike {{< external href="http://www.robotstxt.org" text="robots.txt" />}} meta directives are defined within page content itself and unambiguously indicate which, if any, pages should be blocked from indexing — even if some of those pages appear in your site's {{< external href="https://gohugo.io/templates/sitemap-template/" text="Sitemap" />}}. + +To facilitate the discovery of index blocked pages [Fuzzy Search](../fuzzy-search) utilizes the very same meta directive exposed to search engines to prevent disclosure of pages in its own result listings. Therefore, if a page can be found in fuzzy search, that page may ultimately appear on a search engine result page. + +Adjust index blocking per-page using `noindex` {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}}: + +```toml +noindex = true # set false or remove to unblock +``` + +Block entire sections using an `_index.md` file with the above setting: + +``` +├── content +│ ├── legal +│ │ ├── _index.md +│ │ ├── terms.md +│ │ └── privacy.md +│ ├── post +``` + +By default the following page types are blocked automatically: + +- Section listings automatically linked to from the [Section Menu](../section-menu); +- [Taxonomy Pages](../taxonomy-pages) such as `Category`, `Tag` and terms listings; and, +- If enabled, the [Fuzzy Search](../fuzzy-search) page or any deep-linked result within. + +Adjust defaults using the `noindex_kinds` setting from {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}}. For example, to enable crawling of section pages add the following to the config: + +```toml +[params] + noindex_kinds = [ + "taxonomy", + "taxonomyTerm" + ] # crawl "section" pages +``` + +Learn about {{< external href="https://moz.com/learn/seo/robots-meta-directives" text="Robots Meta Directives on Moz" />}} and see how Google uses `noindex` in {{< external href="https://support.google.com/webmasters/answer/93710" text="Block search indexing with 'noindex'" />}}. diff --git a/themes/after-dark/docs/content/feature/jit-requests.id.md b/themes/after-dark/docs/content/feature/jit-requests.id.md new file mode 100644 index 0000000..6e77db1 --- /dev/null +++ b/themes/after-dark/docs/content/feature/jit-requests.id.md @@ -0,0 +1,31 @@ ++++ +title = "JIT Requests" +description = "Memaksimalkan sumber daya sambil meminimalkan permintaan eksternal." +categories = ["experience"] +tags = ["performance", "styles", "javascript"] +feature = ["related content", "snippets", "code highlighter"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark membuat permintaan JIT untuk beberapa aset eksternal untuk mengurangi konsumsi sumber daya dan meningkatkan kinerja halaman. + +Ambil [Code Highlighter](../code-highlighter) stylesheet sebagai contoh: + +{{< highlight css >}} +{{< include "themes/after-dark/static/css/syntax.css" >}} +{{< /highlight >}} + +Kode stylesheet yang ditunjukkan diatas itu sendiri disorot menggunakan permintaan JIT. Konfirmasikan dengan melihat permintaan jaringan untuk halaman ini dan amati permintaan`fetch` untuk file `syntax.css` seperti yang digambarkan sebagai berikut: + +```sh +jit-requests (document) +├── lazysizes.min.js (fetch) +├── syntax.css (fetch) +``` + +Menggunakan [Fetch Injection](../fetch-injection) permintaan JIT dikeluarkan untuk mulai mengunduh sorotan stylesheet dengan cepat secara pararel dengan sumber daya lain, dan tata letak dasar berhati-hati untuk memastikan CSS hanya diminta pada halaman yang membutuhkan itu. + +Buatlah permintaan JIT anda sendiri menggunakan [Custom Layout](../custom-layouts) dan [Fetch Injection](../fetch-injection). diff --git a/themes/after-dark/docs/content/feature/jit-requests.md b/themes/after-dark/docs/content/feature/jit-requests.md new file mode 100644 index 0000000..f174d5f --- /dev/null +++ b/themes/after-dark/docs/content/feature/jit-requests.md @@ -0,0 +1,31 @@ ++++ +title = "JIT Requests" +description = "Maximize resources while minimizing external requests." +categories = ["experience"] +tags = ["performance", "styles", "javascript"] +features = ["related content", "snippets", "code highlighter"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark makes JIT requests for some external assets to cut down on resource consumption and increase page performance. + +Take the [Code Highlighter](../code-highlighter) stylesheet for example: + +{{< highlight css >}} +{{< include "themes/after-dark/static/css/syntax.css" >}} +{{< /highlight >}} + +The stylesheet code shown above is itself highlighted using a JIT request. Confirm by viewing the network requests for this page and observe the `fetch` request for the `syntax.css` file as depicted here: + +```sh +jit-requests (document) +├── lazysizes.min.js (fetch) +├── syntax.css (fetch) +``` + +Using [Fetch Injection](../fetch-injection) a JIT request is issued to begin downloading the highlighter stylesheet on-the-fly in parallel with other resources and the base layout takes care to ensure the CSS is only requested on pages that need it. + +Create your own JIT requests using [Custom Layout](../custom-layouts) and [Fetch Injection](../fetch-injection). diff --git a/themes/after-dark/docs/content/feature/keywords-meta.id.md b/themes/after-dark/docs/content/feature/keywords-meta.id.md new file mode 100644 index 0000000..9bd6b90 --- /dev/null +++ b/themes/after-dark/docs/content/feature/keywords-meta.id.md @@ -0,0 +1,26 @@ ++++ +title = "Keywords Meta" +description = "Tambahkan detail semantik tentang isi materi pelajaran." +categories = ["search"] +tags = ["metadata", "robots", "SEO"] +feature = ["code highlighter", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Kata kunci menawarkan penjelasan kepada robot mengenai masalah pada konten anda. After Dark menghasilkan kata kunci secara otomatis untuk halaman yang diberikan tag taksonomi untuk halaman itu, dan untuk halaman lain menggunakan taksonomi kategori situs. + +Sesuaikan frase kunci dari {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} menggunakan `keywords` array seperti: + +```toml +keywords = [ + "web development", + "digital marketing", + "social media", + "link building" +] +``` + +Meskipun dianggap tidak relevan untuk mencari peringkat, kata kunci dapat menjadi cara yang berguna untuk mendokumentasikan istilah pencarian target dan frase kunci yang digunakan dalam PPC kampanye. diff --git a/themes/after-dark/docs/content/feature/keywords-meta.md b/themes/after-dark/docs/content/feature/keywords-meta.md new file mode 100644 index 0000000..df2917a --- /dev/null +++ b/themes/after-dark/docs/content/feature/keywords-meta.md @@ -0,0 +1,26 @@ ++++ +title = "Keywords Meta" +description = "Add semantic detail regarding content subject matter." +categories = ["search"] +tags = ["metadata", "robots", "SEO"] +features = ["code highlighter", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Keywords offer detail to robots regarding the subject matter of your content. After Dark generates keywords automatically for pages given the tags taxonomy for that page, and for other pages using the site's categories taxonomy. + +Adjust key phrases from {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} using a `keywords` array like so: + +```toml +keywords = [ + "web development", + "digital marketing", + "social media", + "link building" +] +``` + +While not considered relevant to search rankings, keywords can be a useful way to document target search terms and key phrases used in PPC campaigns. diff --git a/themes/after-dark/docs/content/feature/last-modified.id.md b/themes/after-dark/docs/content/feature/last-modified.id.md new file mode 100644 index 0000000..3c53400 --- /dev/null +++ b/themes/after-dark/docs/content/feature/last-modified.id.md @@ -0,0 +1,35 @@ ++++ +title = "Last Modified" +description = "Membantu pengunjung memahami kapan postingan terakhir diubah." +categories = ["experience"] +tags = ["publishing", "expired", "future", "posts", "date", "time"] +feature = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Menunjukkan postingan dengan perubahan substantif atau cukup dengan gambar sebelumnya, postingan yang lebih relevan semakin dekat ke bagian atas daftar postingan yang terakhir dimodifikasi. + +Modifikasi akan dibuat jelas bagi pengunjung dengan info yang terlihat di rangkuman postingan dan tanggal publikasi asli akan tetap utuh di dalam postingan bylines . + +Untuk robot, melakukan perubahan ini akan secara otomatis memperbarui Skema Data Terstruktur, umpan RSS dan pengaturan`lastmod` {{< external href="https://gohugo.io/templates/sitemap-template/" text="Sitemap" />}} anda. + +Sesuaikan yang terakhir diubah dengan menambahkan `publishdate` ke postingan {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} dan memperbarui `date` ke tanggal dan waktu yang ingin anda tampilkan untuk modifikasi. + +Anda bisa spesifik dan menggunakan tanggal dan waktu (dengan mengimbangi zona waktu) seperti: + +```toml +date = "2017-02-02T01:20:56-06:00" +publishdate = "2016-11-21T10:32:33+08:00" +``` + +Atau kurang spesifik dan hanya menggunakan tanggal: + +```toml +date = "2017-02-02" +publishdate = "2016-11-21" +``` + +Juga memungkinkan untuk tanggal yang akan datang dan yang sudah berlalu untuk konten di Hugo. Untuk mempelajari lebih lanjut,lihat dokumentasi di {{< external href="https://gohugo.io/getting-started/usage/#draft-future-and-expired-content" text="Draft, Future, and Expired Content" />}}. diff --git a/themes/after-dark/docs/content/feature/last-modified.md b/themes/after-dark/docs/content/feature/last-modified.md new file mode 100644 index 0000000..b375537 --- /dev/null +++ b/themes/after-dark/docs/content/feature/last-modified.md @@ -0,0 +1,35 @@ ++++ +title = "Last Modified" +description = "Help visitors understand when posts were last modified." +categories = ["experience"] +tags = ["publishing", "expired", "future", "posts", "date", "time"] +features = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Denote posts with substantive changes or simply draw older, more relevant posts closer to the top of the listings with last modified. + +Modifications will be made obvious to visitors with a visible callout in post summaries and the original publish date will be kept intact in the [Post Bylines](../post-bylines). + +For robots, making this change will automatically update Schema Structured Data, RSS feeds and the `lastmod` setting in your {{< external href="https://gohugo.io/templates/sitemap-template/" text="Sitemap" />}}. + +Adjust last modified by adding a `publishdate` to post {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} and updating the `date` to the date and time you would like to show for the modification. + +You can be specific and use a datetime (with timezone offset) like: + +```toml +date = "2017-02-02T01:20:56-06:00" +publishdate = "2016-11-21T10:32:33+08:00" +``` + +Or less specific and use just the dates: + +```toml +date = "2017-02-02" +publishdate = "2016-11-21" +``` + +It's also possible to set future and expiry dates for content in Hugo. To learn more see the documentation on {{< external href="https://gohugo.io/getting-started/usage/#draft-future-and-expired-content" text="Draft, Future, and Expired Content" />}}. diff --git a/themes/after-dark/docs/content/feature/lazy-loading.id.md b/themes/after-dark/docs/content/feature/lazy-loading.id.md new file mode 100644 index 0000000..d6a50c8 --- /dev/null +++ b/themes/after-dark/docs/content/feature/lazy-loading.id.md @@ -0,0 +1,50 @@ ++++ +title = "Lazy Loading" +description = "Tunda pemuatan gambar, iframe dan skrip." +categories = ["experience"] +tags = ["performance", "images", "graphics"] +feature = ["code highlighter", "related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menggunakan {{< external href="https://github.com/aFarkas/lazysizes" text="lazySizes" />}} untuk memprioritaskan pemuatan sumber daya eksternal tertentu untuk meningkatkan waktu pemuatan halaman dan membantu mengurangi konsumsi bandwith secara keseluruhan. + +Lazy loading bekerja secara otomatis untuk [Custom Homepage](../custom-homepage) thumbnails, [Post Images](../post-images) dan ketika menggunakan [Figure Shortcode](/shortcode/figure), atau terkait dengan [Snippet](../snippets), seperti yang terlihat sebagai berikut: + +{{< figure + src="https://source.unsplash.com/Y-w15LfHO8w/5184x3456" + lqipsrc="https://source.unsplash.com/Y-w15LfHO8w/1080x720" + caption="Be Creative" + attr="AK¥N Cakiner" + attrlink="https://unsplash.com/@akin" +>}} + +Untuk menggunakan lazy loading di [Custom Layouts](../custom-layouts) atau saat membuat milik anda sendiri [Shortcodes](/shortcode) menambahkan atribut kelas `lazyload` dan `data` yang relevan seperti yang ditunjukkan di sini: + +```html + + +``` + +```html + + +``` + +```html + + +``` + +Lihat {{< external href="https://github.com/aFarkas/lazysizes" text="lazySizes" />}} sebagai informasi dan contoh tambahan. diff --git a/themes/after-dark/docs/content/feature/lazy-loading.md b/themes/after-dark/docs/content/feature/lazy-loading.md new file mode 100644 index 0000000..bcb180a --- /dev/null +++ b/themes/after-dark/docs/content/feature/lazy-loading.md @@ -0,0 +1,50 @@ ++++ +title = "Lazy Loading" +description = "Defer loading of images, iframes and scripts." +categories = ["experience"] +tags = ["performance", "images", "graphics"] +features = ["code highlighter", "related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark uses {{< external href="https://github.com/aFarkas/lazysizes" text="lazySizes" />}} to prioritize loading of certain external resources to improve page load times and help reduce overall bandwidth consumption. + +Lazy loading works automatically for [Custom Homepage](../custom-homepage) thumbnails, [Post Images](../post-images) and when using the [Figure Shortcode](/shortcode/figure), or related [Snippet](../snippets), as seen here: + +{{< figure + src="https://source.unsplash.com/Y-w15LfHO8w/5184x3456" + lqipsrc="https://source.unsplash.com/Y-w15LfHO8w/1080x720" + caption="Be Creative" + attr="AK¥N Cakiner" + attrlink="https://unsplash.com/@akin" +>}} + +To use lazy loading in [Custom Layouts](../custom-layouts) or when creating your own [Shortcodes](/shortcode) adding the `lazyload` class and relevant `data` attributes as shown here: + +```html + + +``` + +```html + + +``` + +```html + + +``` + +See {{< external href="https://github.com/aFarkas/lazysizes" text="lazySizes" />}} for additional information and examples. diff --git a/themes/after-dark/docs/content/feature/link-typing.id.md b/themes/after-dark/docs/content/feature/link-typing.id.md new file mode 100644 index 0000000..ac196e3 --- /dev/null +++ b/themes/after-dark/docs/content/feature/link-typing.id.md @@ -0,0 +1,32 @@ ++++ +title = "Link Typing" +description = "Menunjukkan hubungan antar dokumen secara eksplisit." +categories = ["navigation"] +tags = ["links", "accessibility", "taxonomy", "metadata"] +feature = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menggunakan pengetikan tautan untuk menunjukkan hubungan semantik antara dokumen. Secara default tipe tautan `alternate` digunakan untuk menyorot keberadaan umpan web di beranda dan di dalam daftar taksonomi: + +```html + + + +``` + +Sebagai tambahan ke defaults After Dark mengenali jenis tautan `prev` dan `next` jika ditentukan di halaman {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}}: + +```toml +prev = "/series/learn-to-code/part-one/" +next = "/series/learn-to-code/part-three/" +``` + +Gunakan jenis tautan `prev` dan `next` untuk artikel tersegmentasi, {{< external "https://schema.org/LiveBlogPosting" "Live Blog Postings" />}} atau untuk meniru ciri-ciri taksonomi `series` jika tidak ada taksonomi seri. + +Jenis tautan biasanya ditampilkan di bagian atas halaman di browser teks seperti {{< external href="http://elinks.or.cz" text="ELinks" />}} sebagai bentuk navigasi tambahan dan dapat membantu robot dan pengguna lebih memahami hubungan antar konten anda. + +Pelajari lagi tentang {{< external href="http://devdocs.io/html/link_types" text="link types" />}} dan {{< external href="https://gohugo.io/content-management/taxonomies" text="Taxonomies in Hugo" />}}. diff --git a/themes/after-dark/docs/content/feature/link-typing.md b/themes/after-dark/docs/content/feature/link-typing.md new file mode 100644 index 0000000..38f2d88 --- /dev/null +++ b/themes/after-dark/docs/content/feature/link-typing.md @@ -0,0 +1,32 @@ ++++ +title = "Link Typing" +description = "Explicitly indicate relationships between documents." +categories = ["navigation"] +tags = ["links", "accessibility", "taxonomy", "metadata"] +features = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark uses link typing to indicate semantic relationships between documents. By default the `alternate` link type is used to highlight the presence of web feeds on the homepage and in taxonomy listings: + +```html + + + +``` + +In addition to defaults After Dark recognizes the `prev` and `next` link types if specified in page {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}}: + +```toml +prev = "/series/learn-to-code/part-one/" +next = "/series/learn-to-code/part-three/" +``` + +Use `prev` and `next` link types for segmented articles, {{< external "https://schema.org/LiveBlogPosting" "Live Blog Postings" />}} or to mimic the traits of a `series` taxonomy if no series taxonomy is present. + +Link Types are commonly shown at the top of the page in text browsers such as {{< external href="http://elinks.or.cz" text="ELinks" />}} as an auxiliary form of navigation and can help robots and users better understand relationships between your content. + +Learn more about {{< external href="http://devdocs.io/html/link_types" text="link types" />}} and {{< external href="https://gohugo.io/content-management/taxonomies" text="Taxonomies in Hugo" />}}. diff --git a/themes/after-dark/docs/content/feature/module-system.id.md b/themes/after-dark/docs/content/feature/module-system.id.md new file mode 100644 index 0000000..d16beac --- /dev/null +++ b/themes/after-dark/docs/content/feature/module-system.id.md @@ -0,0 +1,15 @@ ++++ +title = "Module System" +description = "Meningkatkan fungsionalitas dengan modul pre built add on." +categories = ["core"] +tags = ["module", "imaging", "graphics", "analytics", "installation"] +feature = ["module system", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menggunakan {{< external href="https://gohugo.io/themes/theme-components/" text="Hugo Theme Components" />}} untuk menghasilkan sistem untuk menyertakan sejumlah prebuilt add-on [Modules](/module/) yang menyediakan fungsionalitas tambahan. + +Lihat [Modules](/module/) ringkasan modul yang tersedia. diff --git a/themes/after-dark/docs/content/feature/module-system.md b/themes/after-dark/docs/content/feature/module-system.md new file mode 100644 index 0000000..8e137b6 --- /dev/null +++ b/themes/after-dark/docs/content/feature/module-system.md @@ -0,0 +1,15 @@ ++++ +title = "Module System" +description = "Enhance site functionality with add-on modules." +categories = ["core"] +tags = ["module", "imaging", "graphics", "analytics", "installation"] +features = ["module system", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark uses {{< external href="https://gohugo.io/themes/theme-components/" text="Theme Components" />}} and [Fetch Injection](../fetch-injection/) to provide a plug-in system for enhancing site functionality using optional add-on modules. + +View the list of [available modules](/module/). diff --git a/themes/after-dark/docs/content/feature/online-help.id.md b/themes/after-dark/docs/content/feature/online-help.id.md new file mode 100644 index 0000000..0749d10 --- /dev/null +++ b/themes/after-dark/docs/content/feature/online-help.id.md @@ -0,0 +1,37 @@ ++++ +title = "Online Help" +description = "Panduan bantuan self-hosted lengkap dan contoh website." +categories = ["core"] +tags = ["scripts", "security", "networking"] +feature = ["related content", "code highlighter", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark termasuk bantuan online manual yang luas dan contoh website. + +Melihat bantuan Dokumen lokal dengan menavigasi ke http://localhost:1414 mengikuti [Quick Install](../quick-install) atau setelah menjalankan [Upgrade Script](../upgrade-script). Tidak memerlukan koneksi internet. + +Jika bantuan tidak berjalan, anda dapat memulainya kapan saja melalui skrip: + +{{< hackcss-alert >}} +{{< highlight sh >}} +cd flying-toasters && \ +./themes/after-dark/bin/help +{{< /highlight >}} +{{< /hackcss-alert >}} + +Atau cukup membuat alias dan sajikan dokumen dengan live-reload: + +{{< hackcss-alert >}} +{{< highlight sh >}} +alias hs='hugo serve --navigateToChanged' && \ +hs --port 1414 --source themes/after-dark/docs +{{< /highlight >}} +{{< /hackcss-alert >}} + +Bantuan termasuk dalam kode sumber After Dark. Jadi setiap rilis baru akan menyertakan dokumen bantuan terbaru, khusus untuk versi tertentu. + +Upgradelah untuk mendapatkan update terbaru menggunakan [Upgrade Script](../upgrade-script/). diff --git a/themes/after-dark/docs/content/feature/online-help.md b/themes/after-dark/docs/content/feature/online-help.md new file mode 100644 index 0000000..e310308 --- /dev/null +++ b/themes/after-dark/docs/content/feature/online-help.md @@ -0,0 +1,37 @@ ++++ +title = "Online Help" +description = "Complete self-hosted help guide and example website." +categories = ["core"] +tags = ["scripts", "security", "networking"] +features = ["related content", "code highlighter", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark includes an extensive online help manual and example website. + +View help docs locally by navigating to http://localhost:1414 following a [Quick Install](../quick-install) or after running the [Upgrade Script](../upgrade-script). Internet connection not required. + +If help is not running you may start it anytime via script: + +{{< hackcss-alert >}} +{{< highlight sh >}} +cd flying-toasters && \ +./themes/after-dark/bin/help +{{< /highlight >}} +{{< /hackcss-alert >}} + +Or simply create an alias and serve docs with live-reload: + +{{< hackcss-alert >}} +{{< highlight sh >}} +alias hs='hugo serve --navigateToChanged' && \ +hs --port 1414 --source themes/after-dark/docs +{{< /highlight >}} +{{< /hackcss-alert >}} + +Help is included within the After Dark source code. So each new release will include the latest help docs, specific to that particular version. + +Upgrade to get the latest updates using the [Upgrade Script](../upgrade-script/). diff --git a/themes/after-dark/docs/content/feature/post-bylines.id.md b/themes/after-dark/docs/content/feature/post-bylines.id.md new file mode 100644 index 0000000..1f8a383 --- /dev/null +++ b/themes/after-dark/docs/content/feature/post-bylines.id.md @@ -0,0 +1,37 @@ ++++ +title = "Post Bylines" +description = "Membuat byline yang dapat dibaca manusia dan mesin di postingan." +categories = ["experience"] +tags = ["author", "posts", "taxonomy", "publishing"] +feature = ["related content", "code highlighter"] +notes = [ + "perbarui contoh postingan byline'taxonomy pages'jika dimodifikasi" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark mwmbuat postingan byline yang sangat banyak secara otomatis. Bylines termasuk pilihan nama penuis, jumlah kata, tautan ke [Halaman Taksonomi](../taxonomy-pages) dan [Structured Data](../structured-data). + +{{% hackcss-card header="Example Byline" %}} +Diterbitkan [by `author`] [`publishdate` or `date`] di [navigation](/categories/navigation) dan ditandai [links](/tags/links) dan [taxonomy](/tags/taxonomy) menggunakan [`wordcount`] kata-kata. +{{% /hackcss-card %}} + +Jika `author` ditentukan di {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} params atau posting {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} itu akan dimasukkan secara otomatis dalam byline yang menghubungkan penulis: + +```toml +[params] + author = "Billy Joe Jim Bob" # the guy behind the guy behind the guy +``` + +Sesuaikan `hide_author` di {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} untuk menekan atribusi di seluruh situs: + +```toml +[params] + author = "" # optional setting, not required in config + hide_author = true # hides author name and related structured data +``` + +Gabungkan dengan`categories` dan [Last Modified](../last-modified) untuk mengahasilkan [Structured Data](../structured-data) yang unik. diff --git a/themes/after-dark/docs/content/feature/post-bylines.md b/themes/after-dark/docs/content/feature/post-bylines.md new file mode 100644 index 0000000..244a7b8 --- /dev/null +++ b/themes/after-dark/docs/content/feature/post-bylines.md @@ -0,0 +1,37 @@ ++++ +title = "Post Bylines" +description = "Create human and machine readable bylines in posts." +categories = ["experience"] +tags = ["author", "posts", "taxonomy", "publishing"] +features = ["related content", "code highlighter"] +notes = [ + "update 'taxonomy pages' post byline example if modified" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark creates rich post bylines automatically. Bylines include optional author name, word count, links to [Taxonomy Pages](../taxonomy-pages) and [Structured Data](../structured-data). + +{{% hackcss-card header="Example Byline" %}} +Published [by `author`] [`publishdate` or `date`] in [navigation](/categories/navigation) and tagged [links](/tags/links) and [taxonomy](/tags/taxonomy) using [`wordcount`] words. +{{% /hackcss-card %}} + +If `author` is specified in {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} params or post {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} it will be included automatically in the byline attributing the author: + +```toml +[params] + author = "Billy Joe Jim Bob" # the guy behind the guy behind the guy +``` + +Adjust `hide_author` in {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} to suppress attribution site-wide: + +```toml +[params] + author = "" # optional setting, not required in config + hide_author = true # hides author name and related structured data +``` + +Combine with `categories` and [Last Modified](../last-modified) to produce unique [Structured Data](../structured-data). diff --git a/themes/after-dark/docs/content/feature/post-images.id.md b/themes/after-dark/docs/content/feature/post-images.id.md new file mode 100644 index 0000000..3defae5 --- /dev/null +++ b/themes/after-dark/docs/content/feature/post-images.id.md @@ -0,0 +1,53 @@ ++++ +title = "Post Images" +description = "menambahkan gambar ke postingan tanpa menyentuh editor gambar." +categories = ["experience"] +tags = ["performance", "imaging", "graphics", "posts"] +feature = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Tambahkan daya tarik visual ke postingan anda dengan memposting gambar. Gambar postingan muncul diatas konten postingan dan pengaruh {{< external href="https://gohugo.io/content-management/image-processing/" text="Hugo Image Processing" />}} dan [Lazy Loading](../lazy-loading) untuk menyediakan gambar yang sepenuhnya otomatis dan lazy-loaded LQIP dan arah seni bawaan. + +{{< figure + src="https://source.unsplash.com/Y-w15LfHO8w/1200x900" + lqipsrc="https://source.unsplash.com/Y-w15LfHO8w/800x600" + caption="Be Creative. Photo:" + attr="AK¥N Cakiner on Unsplash" + attrlink="https://unsplash.com/@akin" +>}} + +Menggunakan gambar postingan memerlukan beberapa pendapat terkait dengan struktur konten anda. Untuk membuat postingan dengan gambar posting anda harus: + +1. Gabungkan gambar dan konten dalam direktori seperti yang ditunjukan di bawah ini. +2. Perbarui postingan {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} seperti yang dijelaskan dibawah ini. + +Contoh bundel halaman mungkin akan terlihat seperti berikut ini: + +``` +├── archetypes +├── content +│ └── post +│ └── secure-your-digital-life +│ ├── images +│ │ └── florian-klauer-119557-unsplash.jpg +│ └── index.md +├── layouts +``` + +Dengan gambar `header` yang ditunjukkan di `index.md`: + +```toml +[[resources]] + src = "images/*119557*" + name = "header" +``` + +{{% hackcss-alert type="info" %}}**Tip:** Orientasi tidak signifikan. Untuk tampilan optimal gunakan gambar yang lebih besar.{{% /hackcss-alert %}} + +Itu dia! After Dark melakukan hal selebihnya. + +Untuk membantu memahami bundel, lihat {{< external href="https://gohugo.io/content-management/page-bundles/" text="Page Bundles in Hugo" />}}. diff --git a/themes/after-dark/docs/content/feature/post-images.md b/themes/after-dark/docs/content/feature/post-images.md new file mode 100644 index 0000000..80b5ed2 --- /dev/null +++ b/themes/after-dark/docs/content/feature/post-images.md @@ -0,0 +1,87 @@ ++++ +title = "Post Images" +description = "Add large hero images without touching an image editor." +categories = ["experience"] +tags = ["performance", "imaging", "graphics", "posts"] +features = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +{{< figure + src="/images/watercolor_pTIyYTqAlF8_w1440h700.jpeg" + alt="Map image" + lqipsrc="/images/watercolor_pTIyYTqAlF8_w936h455.jpeg" + caption="Sample image placement. Not the real deal." +>}} + +Add visual appeal to your posts with post images. Post images appear above post content and leverage {{< external href="https://gohugo.io/content-management/image-processing/" text="Hugo Image Processing" />}} and [Lazy Loading](../lazy-loading) to provide fully automatic, lazy-loaded responsive images with LQIP and built-in art direction. + +Using post images requires some opinion with regard to the structure of your content. To create a post with a post image you must: + +1. Group image and content in a {{< external href="https://gohugo.io/content-management/page-bundles/" text="Page Bundle" />}} as shown below. +2. Update post {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} as described below. + +An example page bundle might look like: + +``` +├── archetypes +├── content +│ └── post +│ └── secure-your-digital-life +│ ├── images +│ │ └── florian-klauer-119557-unsplash.jpg +│ └── index.md +├── layouts +``` + +With a `header` image specified in `index.md`: + +```toml +[[resources]] + src = "images/*119557*" + name = "header" +``` + +{{% hackcss-alert type="info" %}}**Tip:** Orientation is not significant. For optimal display use larger images.{{% /hackcss-alert %}} + +Add an image caption showing the image title: + +```toml +[[resources]] + src = "**291607-unsplash.jpg" + name = "header" + title = "Ottawa road in the evening" # adds image caption +``` + +Add [Structured Data]({{< relref "structured-data" >}}) using {{< external "https://gohugo.io/content-management/page-resources/#page-resources-metadata" "Resources Metadata" />}} to improve accessibility: + +```toml +[[resources]] + src = "**291607-unsplash.jpg" + name = "header" + title = "Ottawa road in the evening" + [resources.params.meta] + description = "Light trails depicting speed" # adds alt text and image meta + creator = "Marc-Olivier Jodoin" # updates caption and adds image meta +``` + +Continue adding metadata to improve accessibility: + +```toml +[[resources]] + src = "**291607-unsplash.jpg" + name = "header" + title = "Ottawa road in the evening" + [resources.params.meta] + description = "Light trails depicting speed" + creator = "Marc-Olivier Jodoin" + sameAs = "https://unsplash.com/photos/NqOInJ-ttqM/" # also updates caption + license = "https://unsplash.com/license" # attribution not required + contentLocation = "Ottawa, Canada" + keywords = ["light trail", "building", "speed", "night"] +``` + +Supported metadata in examples above. Adjust display using [Custom Styles]({{< relref "custom-styles" >}}). diff --git a/themes/after-dark/docs/content/feature/quick-install.id.md b/themes/after-dark/docs/content/feature/quick-install.id.md new file mode 100644 index 0000000..4a6ea1f --- /dev/null +++ b/themes/after-dark/docs/content/feature/quick-install.id.md @@ -0,0 +1,134 @@ ++++ +title = "Instal Cepat" +description = "Hanya satu perintah yang anda butuhkan untuk membuat website baru." +categories = ["core"] +tags = ["setup", "installation", "scripts"] +features = ["code highlighter", "snippets", "related content"] +notes = [ + "mengulas 'module-system' saat menambah atau menghapus add-on yang telah di instal", + "juga meninjau pilihan modul yang sudah dipasang sebelumnya (lihat masalah di depan)" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark termasuk skrip instalasi portabel untuk pengaturan cepat. Silahkan instal {{< external href="https://gohugo.io" text="Hugo" />}} `0.51` atau yang lebih besar sebelum menjalankan skrip: + +{{< hackcss-alert >}} +
+Perluas untuk melihat skrip +{{< highlight shell "linenos=inline" >}} +{{< include "themes/after-dark/bin/install" >}} +{{< /highlight >}} + + + + + + +
+{{< /hackcss-alert >}} + + + +Skrip telah diuji pada GNU/Linux dan BSD (Darwin) dan Windows melalui {{< external href="http://cmder.net" text="Cmder" />}}. + +{{% hackcss-alert type="warning" %}}**Warning:** Periksa skrip yang diunduh dari Internet sebelum menjalankannya.{{% /hackcss-alert %}} + +Berikut adalah tiga metode untuk men-download dan menjalankan: + +1. Unduh dan kirim ke `sh` secara langsung: + + {{< hackcss-alert >}} + {{< highlight shell >}}wget -qO - https://go.habd.as/after-dark | sh{{< /highlight >}} + {{< /hackcss-alert >}} + +2. Unduh di file baru, `chmod` dan jalankan: + + {{< hackcss-alert >}} + {{< highlight shell >}}curl -O https://cdn.jsdelivr.net/npm/after-dark@latest/bin/install && \ +chmod +x install && ./install{{< /highlight >}} + {{< /hackcss-alert >}} + +3. Dari kanonik `git` klon: + + {{< hackcss-alert >}} + {{< highlight shell >}}# sumber klon dan ubah ke direktori sumber git klon https://git.habd.as/comfusion/after-dark.git && cd "$_" + +# gunakan npm cli untuk mendapatkan hash rilis +echo "${$(npm run integrity)#*sha512-}" + +# jalankan instal cepat setelah memvalidasi +./bin/install +{{< /highlight >}} + {{< /hackcss-alert >}} + +Skrip harus selesai dalam 5-10 detik sehingga menghasilkan sampel situs dan dokumen bantuan: + +{{< figure alt="After Dark screenshots" + src="/images/quick-install.png" + lqipsrc="/images/quick-install-fs8.png" + caption="After Dark Quick Install running to completion in Terminal on Deepin Manjaro." +>}} + +Situs baru Anda akan disebut `flying-toaster`. Ubah ke nama proyek anda kapan saja anda suka. Akses situs dengan menavigasi ke https://localhost:1313. + +# Konfigurasi Multi-situs (Lanjutan) + +After Dark memungkingkan menjalankan manajemen multi situs dari satu instalasi. Untuk mengelola beberapa website gunakan `-c` dan `-d` bendera untuk menentukan konten dan tujuan direktori secara berurutan. + +Misalnya, untuk mengahasilkan situs audio menggunakan instalasi After Dark saat ini, buat skrip yang dapat dieksekusi untuk menghasilkan situs tersebut: + +{{< hackcss-card header="flying-toasters/bin/gen-audio-site" >}} +{{< highlight shell >}}#!/bin/sh +hugo -c sites/audio -d public/static.domain.example{{< /highlight >}} +{{< /hackcss-card >}} + +Dimana `audio` berisi konten untuk situs itu: + +``` +├── layouts +├── sites +│   └── audio +│   ├── audiobooks +│ │ ├── gaining-currency.md +│   │ └── the-power-of-now.md +│   └── clips +│   └── war-of-the-worlds.md +├── static +``` + +Dan `public` berisi folder untuk setiap situs: + +``` +public +└── static.domain.example + ├── categories + │   └── index.xml + ├── audiobooks + │ └── index.html + ├── clips + │   └── index.html + ├── css + ├── index.html + ├── index.xml + ├── js + ├── sitemap.xml + └── tags + └── index.xml +``` + +Dan buat skrip lain untuk menyajikan konten untuk diedit: + +{{< hackcss-card header="flying-toasters/bin/serve-audio-site" >}} +{{< highlight shell >}}#!/bin/sh +hugo -c sites/audio{{< /highlight >}} +{{< /hackcss-card >}} + +Setiap subdirektori `public` kemudian menjadi website yang independen dan dapat disebarkan serta salinan persisnya disimpan untuk konten tujuan yang dihasilkan. + +{{% hackcss-alert type="info" %}}**Tip:** Untuk jenis fleksibiltas tambahan `hugo --help` dan modifikasi skrip anda menggunakan `--theme` dan `--config` flags.{{% /hackcss-alert %}} + +Multi situs sangat cocok untuk mempertahankan tampilan dan rasa yang konsisten di berbagai domain asal sekaligus membatasi kebutuhan untuk menjalankannya [Upgrade Script](/feature/upgrade-script/) untuk setiap situs. diff --git a/themes/after-dark/docs/content/feature/quick-install.md b/themes/after-dark/docs/content/feature/quick-install.md new file mode 100644 index 0000000..1b3400a --- /dev/null +++ b/themes/after-dark/docs/content/feature/quick-install.md @@ -0,0 +1,142 @@ ++++ +title = "Quick Install" +description = "One command is all you need to start a new website." +categories = ["core"] +tags = ["setup", "installation", "scripts"] +features = ["code highlighter", "snippets", "related content"] +aliases = [ + "/feature/quick-installer/" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +{{< hackcss-alert type="success" >}} +{{< highlight shell >}}wget -qO - https://go.habd.as/after-dark | sh{{< /highlight >}} +{{< /hackcss-alert >}} + +Run the above command in a terminal emulator after {{< external href="https://gohugo.io/getting-started/installing" text="installing Hugo" />}} to start a new website in 5-10 seconds. Hugo version `0.51` or greater required. + +--- + +After Dark includes a portable installation script for quick set-up. Please install {{< external href="https://gohugo.io" text="Hugo" />}} `0.51` or greater before running: + +{{< hackcss-alert >}} +
+Expand to view script +{{< highlight sh "linenos=inline" >}} +{{< include "themes/after-dark/bin/install" >}} +{{< /highlight >}} + + + + + + +
+{{< /hackcss-alert >}} + + + +Script has been tested on GNU/Linux, BSD (Darwin) and Windows via {{< external href="http://cmder.net" text="Cmder" />}}. + +{{% hackcss-alert type="warning" %}}**Warning:** Examine scripts downloaded from the Internet before running them.{{% /hackcss-alert %}} + +Here are three methods for downloading and running: + +1. Download and pipe to `sh` directly: + + {{< hackcss-alert >}} + {{< highlight shell >}}wget -qO - https://go.habd.as/after-dark | sh{{< /highlight >}} + {{< /hackcss-alert >}} + +2. Download into new file, `chmod` and execute: + + {{< hackcss-alert >}} + {{< highlight shell >}}curl -O https://cdn.jsdelivr.net/npm/after-dark@latest/bin/install && \ +chmod +x install && ./install{{< /highlight >}} + {{< /hackcss-alert >}} + +3. From canonical `git` clone: + + {{< hackcss-alert >}} + {{< highlight shell >}}# clone source and change to source directory +git clone https://git.habd.as/comfusion/after-dark.git && cd "$_" + +# use npm cli to get the release hash +echo "${$(npm run integrity)#*sha512-}" + +# run quick install after validating +./bin/install +{{< /highlight >}} + {{< /hackcss-alert >}} + +Script should complete in 5-10 seconds resulting in a sample site and help docs: + +{{< figure alt="After Dark screenshots" + src="/images/quick-install.png" + lqipsrc="/images/quick-install-fs8.png" + caption="After Dark Quick Install running to completion in Terminal on Deepin Manjaro." +>}} + +Your new site will be called `flying-toasters`. Change it to the name of your project anytime you like. Access site by navigating to https://localhost:1313. + +# Multi-site Configuration (Advanced) + +After Dark enables multi-site management from a single installation. To manage multiple websites use the `-c` and `-d` flags to specify the `content` and `destination` directories, respectively. + +For example, to generate an audio site using the current After Dark installation create an executable script to generate the site: + +{{< hackcss-card header="flying-toasters/bin/gen-audio-site" >}} +{{< highlight shell >}}#!/bin/sh +hugo -c sites/audio -d public/static.domain.example{{< /highlight >}} +{{< /hackcss-card >}} + +Where `audio` contains the content for that site: + +``` +├── layouts +├── sites +│   └── audio +│   ├── audiobooks +│ │ ├── gaining-currency.md +│   │ └── the-power-of-now.md +│   └── clips +│   └── war-of-the-worlds.md +├── static +``` + +And `public` contains a folder for each site: + +``` +public +└── static.domain.example + ├── categories + │   └── index.xml + ├── audiobooks + │ └── index.html + ├── clips + │   └── index.html + ├── css + ├── index.html + ├── index.xml + ├── js + ├── sitemap.xml + └── tags + └── index.xml +``` + +And create another script to serve the content for editing: + +{{< hackcss-card header="flying-toasters/bin/serve-audio-site" >}} +{{< highlight shell >}}#!/bin/sh +hugo -c sites/audio{{< /highlight >}} +{{< /hackcss-card >}} + +Each subdirectory of `public` then becomes an independent, deployable website and exact copy save for destination content generated. + +{{% hackcss-alert type="info" %}}**Tip:** For additional flexibility type `hugo --help` and modify your scripts using the `--theme` and `--config` flags.{{% /hackcss-alert %}} + +Multi-site is perfect for maintaining a consistent look-and-feel across multiple domain origins while limiting the need to run the [Upgrade Script](/feature/upgrade-script/) for each site. diff --git a/themes/after-dark/docs/content/feature/referrer-policy.id.md b/themes/after-dark/docs/content/feature/referrer-policy.id.md new file mode 100644 index 0000000..607e9c9 --- /dev/null +++ b/themes/after-dark/docs/content/feature/referrer-policy.id.md @@ -0,0 +1,28 @@ ++++ +title = "Referrer Policy" +description = "Menentukan berapa banyak info yang diteruskan ke tautan eksternal." +categories = ["security"] +tags = ["privacy", "security", "SEO", "metadata"] +feature = ["related content", "code highlighter", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menambahkan {{< external href="https://w3c.github.io/webappsec-referrer-policy/" text="Referrer Policy" />}} untuk meningkatkan keamanan situs dan meningkatkan privasi pengunjung di luar browser standar menggunakan kebijakan seluruh situs sederhana. + +Sesuaikan site-wide default`same-origin` dari {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}}: + +```toml +[params.seo] + referrer = "same-origin" +``` + +Melonggarkan kebijakan keamanan dengan: + +- Menyesuaikan standar seluruh situs; +- Menggunakan atribut `referrerpolicy` dari [External Shortcode](/shortcode/external); +- Menggunakan {{< external href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-delivery-nested" text="nested browsing context" />}} untuk menyesuaikan secara kontekstual. + +Lihat {{< external href="https://w3c.github.io/webappsec-referrer-policy/" text="Referrer Policy on W3C" />}} untuk daftar nilai yang memungkinkan. diff --git a/themes/after-dark/docs/content/feature/referrer-policy.md b/themes/after-dark/docs/content/feature/referrer-policy.md new file mode 100644 index 0000000..9280fe5 --- /dev/null +++ b/themes/after-dark/docs/content/feature/referrer-policy.md @@ -0,0 +1,28 @@ ++++ +title = "Referrer Policy" +description = "Specify how much info is passed to external links." +categories = ["security"] +tags = ["privacy", "security", "SEO", "metadata"] +features = ["related content", "code highlighter", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark adds a {{< external href="https://w3c.github.io/webappsec-referrer-policy/" text="Referrer Policy" />}} to improve site security and increase visitor privacy beyond browser defaults using a simple site-wide policy. + +Adjust the site-wide default of `same-origin` from {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}}: + +```toml +[params.seo] + referrer = "same-origin" +``` + +Relax the security policy by: + +- Adjusting the site-wide default; +- Using the `referrerpolicy` attribute of the [External Shortcode](/shortcode/external); +- Using a {{< external href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-delivery-nested" text="nested browsing context" />}} to adjust contextually. + +See {{< external href="https://w3c.github.io/webappsec-referrer-policy/" text="Referrer Policy on W3C" />}} for a list of possible values. diff --git a/themes/after-dark/docs/content/feature/related-content.id.md b/themes/after-dark/docs/content/feature/related-content.id.md new file mode 100644 index 0000000..4bc4d9f --- /dev/null +++ b/themes/after-dark/docs/content/feature/related-content.id.md @@ -0,0 +1,32 @@ ++++ +title = "Related Content" +description = "Mempromosikan lebih banyak konten anda kepada pengunjung situs." +categories = ["navigation"] +tags = ["links", "retention", "engagement", "layout", "templating", "style"] +feature = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menyediakan konten terkait untuk membantu pengguna menemukan lebih banyak informasi yang relevan bagi mereka dan dapat meningkatkan tampilan halaman dan waktu yang dihabiskan untuk situs anda. + +{{< hackcss-alert >}} +{{< figure + src="/images/screenshots/feature-related-content-fs8.png" +>}} +{{< /hackcss-alert >}} + +Ketika dua halaman atau lebih atau postingan yang berisi taksonomi`tags` yang sama, mereka akan ditautkan di bagian seperti yang ditunjukkan di bagian bawah halaman. Bagian ini muncul secara otomatis seperti dibawah ini [Post Bylines](../post-bylines) dengan maksimum 7 item default yang ditampilkan. + +{{% hackcss-alert type="info" %}}**Tip:** Buatlah [Custom Layout](/feature/custom-layouts) untuk menampilkan konten terkait diluar postingan.{{% /hackcss-alert %}} + +Sesuaikan seluruh situs maksimum dari {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} dengan menambah `related_content_limit`: + +```toml +[params] + related_content_limit = 5 # limit to 5 items maximum site-wide +``` + +Lihat {{< external href="https://gohugo.io/content-management/related/" text="Related Content in Hugo" />}} untuk pilihan konfigurasi tambahan . diff --git a/themes/after-dark/docs/content/feature/related-content.md b/themes/after-dark/docs/content/feature/related-content.md new file mode 100644 index 0000000..d0d897f --- /dev/null +++ b/themes/after-dark/docs/content/feature/related-content.md @@ -0,0 +1,53 @@ ++++ +title = "Related Content" +description = "Promote more of your content to your site's visitors." +categories = ["navigation"] +tags = ["links", "retention", "engagement", "layout", "templating", "style"] +features = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark provides related content to help users find more information that's relevant to them and can increase page views and time spent on your site. + +{{< hackcss-alert >}} +{{< figure + src="/images/screenshots/feature-related-content-fs8.png" +>}} +{{< /hackcss-alert >}} + +When two or more pages or posts contain the same taxonomy `tags` they will be linked in a section as shown near the bottom of the page. The section appears automatically below [Post Bylines](../post-bylines) with a default maximum of 7 items shown. + +{{% hackcss-alert type="info" %}}**Tip:** Create a [Custom Layout](/feature/custom-layouts) to show Related Content outside posts.{{% /hackcss-alert %}} + +Adjust site-wide maximum from {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} by adding `related_content_limit`: + +```toml +[params] + related_content_limit = 5 # limit to 5 items maximum site-wide +``` + +By default related content will appear as an unordered list of page titles with hyperlinks to their respective pages along with the approximate reading time. + +For posts, display thumbnail images instead by adding a related limit: + +```toml +[params.layout.post.related] + limit = 3 +``` + +And for each post create a [Post Images](../post-images/)-formatted resource bundle containing `thumbnail` in the name as described in more detail on [Custom Homepage](../custom-homepage/). + +As with homepage thumbnails, image processing may be adjusted: + +```toml +[params.layout.post.related] + limit = 4 + thumbs = ["fill", "400x400"] # Optional, thumbnail image processing +``` + +Set `limit` to `0` to hide the related content section. + +See {{< external href="https://gohugo.io/content-management/related/" text="Related Content in Hugo" />}} for additional configuration options. diff --git a/themes/after-dark/docs/content/feature/release-hashes.id.md b/themes/after-dark/docs/content/feature/release-hashes.id.md new file mode 100644 index 0000000..605de1d --- /dev/null +++ b/themes/after-dark/docs/content/feature/release-hashes.id.md @@ -0,0 +1,42 @@ ++++ +title = "Release Hashes" +description = "Memastikan anda menggunakan perangkat After Dark yang asli." +categories = ["security"] +tags = ["validate", "privacy", "security", "cryptography", "npm", "git"] +feature = ["code highlighter", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark memanfaatkan {{< external href="https://www.npmjs.com" text="NPM" />}} CLI untuk menghasilkan hash kriptografi yang unik di setiap rilis, memungkinkan setiap salinan diidentifikasi secara unik terlepas dari sumbernya. + +Lepaskan penggunaan hash dengan SHA-512 algoritma dan terlihat seperti ini: + +{{< hackcss-alert type="success" >}} +VWcn7AxXUkZRGsRIM/6A5RjqW7DOPH+XbnLGRp7hpr0TCH/9l31ug2h2JaIlEvsDzOPRcZDBdyZvJ4mSm/Rqjg== +{{< /hackcss-alert >}} + + +Setiap rilis hash baru dihasilkan di lokasi berikut: + +- Tertanam menggunakan PGP di {{< external href="https://git.habd.as/comfusion/after-dark/releases" text="release source" />}} pesan`git tag`. +- Dikodifikasikan ke dalam {{< external href="https://registry.npmjs.org/after-dark/latest" text="latest" />}} atau {{< external href="https://registry.npmjs.org/after-dark/6.7.9" text="version-specific" />}} metadata paket NPM. +- Tertanam di dalam After Dark [Bantuan Online](../online-help) dokumentasi. + +Setelah menerima salinan After Dark anda, anda dapat menggunakan hash rilis, untuk memverifikasi anda dapat menggunakan versi perangkat lunak yang tidak dipalsukan. + +Jalankan [Release Validator](/validate) untuk memeriksa dengan cepat rilis anda secara offline: + +{{< hackcss-card header="Interactive Release Validator" >}} + +{{< /hackcss-card >}} + +Untuk pemeriksaan yang lebih meyeluruh lakukan hal berikut ini, membandingkan hash anda dengan yang dihasilkan selama rilis seperti yang didefinisikan diatas: + +1. Instal {{< external href="https://docs.npmjs.com/cli/npm" text="npm cli" />}} di perangkat anda. +2. Navigasikan ke `themes/after-dark` dari dalam situs anda. +3. Jalankan `npm run integrity` untuk menghasilkan SHA-512 hash anda. + +Jika semuanya cocok, berarti anda sudah siap. Jika tidak, silahkan {{< external href="https://git.habd.as/comfusion/after-dark/issues/new" text="Submit an Issue" />}}. diff --git a/themes/after-dark/docs/content/feature/release-hashes.md b/themes/after-dark/docs/content/feature/release-hashes.md new file mode 100644 index 0000000..3b9c4d4 --- /dev/null +++ b/themes/after-dark/docs/content/feature/release-hashes.md @@ -0,0 +1,44 @@ ++++ +title = "Release Hashes" +description = "Verify you are using genuine After Dark software." +categories = ["security"] +tags = ["validate", "privacy", "security", "cryptography", "npm", "git"] +features = ["code highlighter", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark utilizes the {{< external href="https://www.npmjs.com" text="NPM" />}} CLI to produce a unique cryptographic hash each release, enabling any copy to be uniquely identified regardless of its source. + +Release hashes use the SHA-512 algorithm and look like this: + +{{< hackcss-alert type="success" >}} +VWcn7AxXUkZRGsRIM/6A5RjqW7DOPH+XbnLGRp7hpr0TCH/9l31ug2h2JaIlEvsDzOPRcZDBdyZvJ4mSm/Rqjg== +{{< /hackcss-alert >}} + + +Each release a new hash is generated in the following locations: + +- Embedded using PGP in the {{< external href="https://git.habd.as/comfusion/after-dark/releases" text="release source" />}} `git tag` message. +- Codified into the {{< external href="https://registry.npmjs.org/after-dark/latest" text="latest" />}} or {{< external href="https://registry.npmjs.org/after-dark/6.7.9" text="version-specific" />}} NPM package metadata. +- Embedded inside the After Dark [Online Help](../online-help) documentation. + +Upon receiving your copy of After Dark you may use the release hash to verify you are using an unadulterated version of the software. + +Run the [Release Validator](/validate) to quickly check your release offline: + +{{< hackcss-card header="Interactive Release Validator" >}} + +{{< /hackcss-card >}} + +For a more thorough inspection do the following: + +1. Install the {{< external href="https://docs.npmjs.com/cli/npm" text="npm cli" />}} on your machine. +2. Navigate to `themes/after-dark` from within your site. +3. Run `npm i && npm run integrity` to generate your SHA-512 hash. +4. Compare your hash to the hash generated during a signed release. +5. If equal, verify the GPG signature used to sign that release. + +If inspection fails run the [Upgrade Script](../upgrade-script/) and try again. diff --git a/themes/after-dark/docs/content/feature/section-menu.id.md b/themes/after-dark/docs/content/feature/section-menu.id.md new file mode 100644 index 0000000..59a4aea --- /dev/null +++ b/themes/after-dark/docs/content/feature/section-menu.id.md @@ -0,0 +1,54 @@ ++++ +title = "Section Menu" +description = "Menampilkan navigasi site-wide kontekstual dengan tautan." +categories = ["navigation"] +tags = ["links", "taxonomy"] +feature = ["code highlighter", "snippets", "section menu"] +notes = [ + "meninjau contoh 'fuzzy-search' jika dimodifikasi" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menggunakan Hugo's {{< external href="https://gohugo.io/templates/menu-templates/#section-menu-for-lazy-bloggers" text="Section Menu for “Lazy” Bloggers" />}} untuk membuat bantuan navigasi di seluruh situs. Menu bagian dinonaktifkan secara default. + +{{< hackcss-card header="Interactive Example" >}} + {{< navmenu >}} +{{< /hackcss-card >}} + +Aktifkan itu dengan mengubah pengaturan `show_menu` dalam konfigurasi situs anda: + +```toml +[params] + show_menu = false # atur ke `true` untuk mengaktifkan menu bagian +``` + +Dengan menu yang diaktifkan, tautan navigasi akan mulai muncul secara otomatis di setiap bagian saat {{< external href="https://gohugo.io/getting-started/usage/#draft-future-and-expired-content" text="Published Content" />}} tersedia dalam bagian itu. + +Tautan ke halaman yang berdiri sendiri dari {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} dengan menentukan `menu = "main"`: + +```toml +title = "About" +menu = "main" +``` + +Sesuaikan nama tautan dan posisi menu dengan menambahkan kode blok berikut ke {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} anda dan memodifikasinya untuk memenuhi kebutuhan anda: + +```toml +[[menu.main]] + name = "Home" + weight = 1 + identifier = "home" + url = "/" + +[[menu.main]] + name = "Posts" + weight = 2 + identifier = "post" + url = "/post/" +``` + +Lihat {{< external href="https://gohugo.io/content-management/menus/" text="Menus in Hugo" />}} untuk informasi tambahan. diff --git a/themes/after-dark/docs/content/feature/section-menu.md b/themes/after-dark/docs/content/feature/section-menu.md new file mode 100644 index 0000000..c5a00bb --- /dev/null +++ b/themes/after-dark/docs/content/feature/section-menu.md @@ -0,0 +1,132 @@ ++++ +title = "Section Menu" +description = "Display a contextual site-wide navigation with links." +categories = ["navigation"] +tags = ["links", "taxonomy"] +features = ["code highlighter", "snippets", "section menu"] +notes = [ + "review 'fuzzy-search' examples if modified" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark uses Hugo's {{< external href="https://gohugo.io/templates/menu-templates/#section-menu-for-lazy-bloggers" text="Section Menu for “Lazy” Bloggers" />}} to create a site-wide navigational aid. The section menu is disabled by default. + +{{< hackcss-card header="Interactive Example" >}} + {{< navmenu >}} +{{< /hackcss-card >}} + +Enable it from `menu.main` layout config in your site configuration: + +```toml +[params.layout.menu.main] + hidden = true # set `false` or remove to show section menu +``` + +With the menu enabled navigation links will begin appearing automatically on a per-section basis whenever {{< external href="https://gohugo.io/getting-started/usage/#draft-future-and-expired-content" text="Published Content" />}} is available within that section. + +## Customizing + +Adjust link names and menu positions by adding the following code block to your {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} and modifying it to meet your needs: + +```toml +[[menu.main]] + name = "Home" + weight = 1 + identifier = "home" + url = "/" + +[[menu.main]] + name = "Posts" + weight = 2 + identifier = "post" + url = "/post/" +``` + +Exclude menu items by identifier: + +```toml +[params.layout.menu.main] + exclude = ["home", "post"] # exclude homepage and blog postings +``` + +Decorate links with SVG icons using `pre` and `post`: + +```toml +[[menu.main]] + name = "Search" + identifier = "search" + url = "/search/" + post = "" +``` + +Link to stand-alone pages using {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} menu setting: + +```toml +title = "About" +menu = "main" +``` + +Change the link title to differentiate from page: + +```toml +title = "About Us" +menu = "main" +linktitle = "About" +``` + +Position items using {{< external "https://gohugo.io/variables/menus/#menu-entry-variables" "Menu Entry Variables" />}} for more control: + +```toml +title = "About Us" +[menu.main] + name = "About" + weight = 5 +``` + +Provide your own config settings for use in [Custom Layouts]({{< relref "custom-layouts" >}}): + +```toml +[params.layout.menu.main.custom] + social_icons = ["telegram", "mastodon", "matrix"] +``` + +And access them via your customized `navmenu.html`, if present: + +```go-html-template +{{ range .settings.custom.social_icons }} + {{ partial "social-links.html" . }} +{{ end }} +``` + +Create a second menu immediately after the first: + +```toml +[[menu.main]] + name = "Posts" + weight = 2 + identifier = "post" + url = "/post/" + +[[menu.utility]] + name = "Email" + weight = 1 + identifier = "email" + url = "mailto:d0x3d@posteo.com" +``` + +And position it to the right using [Custom Styles]({{< relref "custom-styles" >}}): + +```css +.hack > header { + display: grid; + grid-template-columns: 1fr minmax(min-content, auto); + column-gap: 20px; + grid-template-areas: "nav nav"; +} +``` + +See {{< external href="https://gohugo.io/content-management/menus/" text="Menus in Hugo" />}} for additional capabilities. For help with CSS Grid Layout get your feet wet at {{< external "https://cssgridgarden.com" />}}. diff --git a/themes/after-dark/docs/content/feature/skin-styles.id.md b/themes/after-dark/docs/content/feature/skin-styles.id.md new file mode 100644 index 0000000..4c667ec --- /dev/null +++ b/themes/after-dark/docs/content/feature/skin-styles.id.md @@ -0,0 +1,112 @@ ++++ +title = "Skin Styles" +description = "Pilih satu dari delapan skin style yang dapat disesuaikan." +categories = ["customizing"] +tags = ["color", "style", "branding"] +feature = ["code highlighter", "snippets", "related content"] +alias = [ + "/feature/display-variants/" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menggunakan {{< external href="https://hackcss.egoist.moe" text="hackcss" />}} untuk menyediakan empat palet warna dan dua mode tampilan. Beralih diantara mereka dari {{< external href="https://gohugo.io/getting-started/configuration/" text="site configuration" />}} anda untuk 8 kemungkinan kombinasi: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PaletteMode
HackStandard
DarkNone required. +
[params.hackcss]
+  mode = "standard"
+
Dark Grey +
[params.hackcss]
+  palette = "dark-grey"
+
+
[params.hackcss]
+  mode = "standard"
+  palette = "dark-grey"
+
Solarized Dark +
[params.hackcss]
+  palette = "solarized-dark"
+
+
[params.hackcss]
+  mode = "standard"
+  palette = "solarized-dark"
+
Light +
[params.hackcss]
+  palette = "light"
+
+
[params.hackcss]
+  mode = "standard"
+  palette = "light"
+
+ +Skin default menggunakan palet warna`dark` dengan mode tampilan `hack`. Tidak diperlukan konfigurasi untuk menggunakan skin default. + +Pilih skin style dari konfigurasi situs anda. Sebagai contoh , untuk mengatur warna abu-abu gelap tanpa gaya perawatan `markdown` perbarui konfigurasi anda seperti: + +{{< hackcss-card header="config.toml" >}} +{{< highlight toml "linenos=inline" >}} +baseurl = "https://letterboxd.com/" +languageCode = "en-US" +title = "A Scanner Darkly" + +[params] + description = "Seorang polisi yang menyamar di masa depan yang tidak terlalu jauh terlibat dengan narkoba baru yang berbahaya dan sebagai akibatnya dia mulai kehilangan identitasnya." + images = ["https://a.ltrbxd.com/resized/sm/upload/e3/kt/un/fi/nZuqo9yQpEo447sH0w0MFBgdT6J-1200-1200-675-675-crop-000000.jpg"] + +[params.hackcss] + mode = "standard" + palette = "dark-grey" +{{< /highlight >}} +{{< /hackcss-card >}} + +Nonaktifkan skin styles dengan mengatur bendera`disabled`: + +```toml +[params.hackcss] + disabled = true # disable skin styles entirely +``` + +Saat mengganti warna, tinjau [Custom Styles](../custom-styles), [Trim Color](../trim-color) dan [Error Page](../error-page), buat penyesuaian yang diperlukan untuk mencapai tampilan dan rasa yang diinginkan. diff --git a/themes/after-dark/docs/content/feature/skin-styles.md b/themes/after-dark/docs/content/feature/skin-styles.md new file mode 100644 index 0000000..c0999f7 --- /dev/null +++ b/themes/after-dark/docs/content/feature/skin-styles.md @@ -0,0 +1,112 @@ ++++ +title = "Skin Styles" +description = "Choose one of eight customizable skin styles." +categories = ["customizing"] +tags = ["color", "style", "branding"] +features = ["code highlighter", "snippets", "related content"] +aliases = [ + "/feature/display-variants/" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark uses {{< external href="https://hackcss.egoist.moe" text="hackcss" />}} to provide four color palettes and two display modes. Toggle between them from your {{< external href="https://gohugo.io/getting-started/configuration/" text="site configuration" />}} for 8 possible combinations: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PaletteMode
HackStandard
DarkNone required. +
[params.hackcss]
+  mode = "standard"
+
Dark Grey +
[params.hackcss]
+  palette = "dark-grey"
+
+
[params.hackcss]
+  mode = "standard"
+  palette = "dark-grey"
+
Solarized Dark +
[params.hackcss]
+  palette = "solarized-dark"
+
+
[params.hackcss]
+  mode = "standard"
+  palette = "solarized-dark"
+
Light +
[params.hackcss]
+  palette = "light"
+
+
[params.hackcss]
+  mode = "standard"
+  palette = "light"
+
+ +The default skin uses the `dark` color palette with the `hack` display mode. No configuration is necessary to use the default skin. + +Choose a skin style from your site configuration. For example, to set a dark grey color _without_ the stylistic `markdown` treatment update your config like: + +{{< hackcss-card header="config.toml" >}} +{{< highlight toml "linenos=inline" >}} +baseurl = "https://letterboxd.com/" +languageCode = "en-US" +title = "A Scanner Darkly" + +[params] + description = "An undercover cop in a not-too-distant future becomes involved with a dangerous new drug and begins to lose his own identity as a result." + images = ["https://a.ltrbxd.com/resized/sm/upload/e3/kt/un/fi/nZuqo9yQpEo447sH0w0MFBgdT6J-1200-1200-675-675-crop-000000.jpg"] + +[params.hackcss] + mode = "standard" + palette = "dark-grey" +{{< /highlight >}} +{{< /hackcss-card >}} + +Disable skin styles by setting the `disabled` flag: + +```toml +[params.hackcss] + disabled = true # disable skin styles entirely +``` + +When changing colors review [Custom Styles](../custom-styles), [Trim Color](../trim-color) and [Error Page](../error-page), making any adjustments necessary to achieve the desired look-and-feel. diff --git a/themes/after-dark/docs/content/feature/snippets.id.md b/themes/after-dark/docs/content/feature/snippets.id.md new file mode 100644 index 0000000..9c74e45 --- /dev/null +++ b/themes/after-dark/docs/content/feature/snippets.id.md @@ -0,0 +1,53 @@ ++++ +title = "Snippets" +description = "Bagikan kode antara Shortcodes and Templat Kustom." +categories = ["customizing"] +tags = ["shortcodes", "templating", "layout"] +feature = ["related content", "code highlighter", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Snippets adalah abstraksi templat yang memungkinkan anda menggunakan kembali markup dan logika yang sama dengan yang digunakan untuk membuat [Shortcodes](/shortcode) di [Custom Layouts](../custom-layouts) anda. + +Ambil contoh yang termasuk [Button Group](/shortcode/button-group) kode pendek yang digunakan untuk membuat satu set tombol gaya, yang akan kita lihat secara rinci disini. + +Pertama, Parsial: + +{{< highlight go-html-template >}} +{{< include "themes/after-dark/layouts/partials/components/buttongroup.html" >}} +{{< /highlight >}} + +Kemudian shortcode: + +{{< highlight go-html-template >}} +{{< include "themes/after-dark/layouts/shortcodes/hackcss-buttongroup.html" >}} +{{< /highlight >}} + +Perhatikan bagaimana shortcode hanya berfungsi untuk mengumpulkan input dan memanggil parsial, yang berisi semua markup dan logika tambahan. Pelimpahan tanggungjawab ini adalah abstraksi yang memungkinkan penggunaan kembali antara konten dan templat. + +Sekarang mari kita lihat bagaimana cara menggunakannya. + +Gunakan [Button Group](/shortcode/button-group) shortcode ke tombol grup dalam konten: + +```html +{{}} + {{< hackcss-button text="Left" />}} + {{< hackcss-button text="Middle" type="info" />}} + {{< hackcss-button text="Right" isghost="true" />}} +{{< /hackcss-buttongroup */>}} +``` + +Yang membuat grup tombol gaya dengan tiga tombol seperti yang dtunjukkan disini: + +{{< hackcss-buttongroup >}} + {{< hackcss-button text="Left" />}} + {{< hackcss-button text="Middle" type="info" />}} + {{< hackcss-button text="Right" isghost="true" />}} +{{< /hackcss-buttongroup >}} + +Untuk menggunakan kembali di mirror layout panggilan parsial yang digunakan di dalam shortcode. + +Seluruh [Shortcodes](/shortcode) mengimplementasikan {{< external href="https://hackcss.egoist.moe" text="hackcss" />}} komponen dibangun menggunakan abstraksi templat snippets yang memungkinkan masing-masing digunakan kembali [Custom Layouts](../custom-layouts). diff --git a/themes/after-dark/docs/content/feature/snippets.md b/themes/after-dark/docs/content/feature/snippets.md new file mode 100644 index 0000000..a9d6f6e --- /dev/null +++ b/themes/after-dark/docs/content/feature/snippets.md @@ -0,0 +1,53 @@ ++++ +title = "Snippets" +description = "Share code between Shortcodes and Custom Layouts." +categories = ["customizing"] +tags = ["shortcodes", "templating", "layout"] +features = ["related content", "code highlighter", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Snippets are template abstractions enabling you to reuse the same markup and logic used to create [Shortcodes](/shortcode) in your [Custom Layouts](../custom-layouts). + +Take for example the included [Button Group](/shortcode/button-group) shortcode used for creating a set of styled buttons, which we'll look at in detail here. + +First the partial: + +{{< highlight go-html-template >}} +{{< include "themes/after-dark/layouts/partials/components/buttongroup.html" >}} +{{< /highlight >}} + +Now the shortcode: + +{{< highlight go-html-template >}} +{{< include "themes/after-dark/layouts/shortcodes/hackcss-buttongroup.html" >}} +{{< /highlight >}} + +Notice how the shortcode serves only to collect input and call the partial, which contains all markup and display logic. This delegation of responsibility is the abstraction that enables reuse between content and template. + +Now let's see how to actually use it. + +Use the [Button Group](/shortcode/button-group) shortcode to group buttons in content: + +```html +{{}} + {{< hackcss-button text="Left" />}} + {{< hackcss-button text="Middle" type="info" />}} + {{< hackcss-button text="Right" isghost="true" />}} +{{< /hackcss-buttongroup */>}} +``` + +Which creates a styled button group with three buttons as shown here: + +{{< hackcss-buttongroup >}} + {{< hackcss-button text="Left" />}} + {{< hackcss-button text="Middle" type="info" />}} + {{< hackcss-button text="Right" isghost="true" />}} +{{< /hackcss-buttongroup >}} + +To reuse in layout mirror the `partial` call used inside the shortcode. + +All [Shortcodes](/shortcode) implementing {{< external href="https://hackcss.egoist.moe" text="hackcss" />}} components are built using the snippets template abstraction enabling each of them to be reused in [Custom Layouts](../custom-layouts). diff --git a/themes/after-dark/docs/content/feature/social-meta.id.md b/themes/after-dark/docs/content/feature/social-meta.id.md new file mode 100644 index 0000000..c757a19 --- /dev/null +++ b/themes/after-dark/docs/content/feature/social-meta.id.md @@ -0,0 +1,56 @@ ++++ +title = "Social Meta" +description = "Membagikan tautan dengan gambar di Facebook dan Twitter." +categories = ["social"] +tags = ["author", "metadata", "images"] +feature = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menyediakan {{< external text="Open Graph Protocol" href="http://opengraphprotocol.org" />}} dan {{< external href="https://developer.twitter.com/en/docs/tweets/optimize-with-cards" text="Twitter Cards" />}} metadata di halaman untuk mencapai kartu berbagi yang banyak: + +![Open Graph sharing card screenshot](/images/instant-view-fs8.png "Contoh kartu berbagi Open Graph yang dihasilkan oleh by After Dark") + +Menyesuaikan`author` di {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} untuk menentukan nama yang ditampilkan, jika ada: + +```toml +[params] + author = "Bali Bebas!" +``` + +Setel atau ganti`author` per halaman menggunakan {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} seperti yang ditunjukkan disini: + +```toml +title = "Become a Digital Nomad in Bali: The Lost Guide" +description = "Everything you need to know to become a Digital Nomad in Bali." +author = "After Dark" +date = "2017-02-02T11:57:24+08:00" +publishdate = "2017-01-28T02:31:22+08:00" +images = [ + "https://source.unsplash.com/-09QE4q0ezw/2000x1322" +] +``` + +Sesuaikan `images` untuk menentukan gambar eksternal atau jika menggunakan {{< external href="https://gohugo.io/content-management/page-bundles/" text="Page Bundles" />}}, tentukan jalur relatif ke sumber gambar untuk digunakan: + +```toml +images = [ + "/post/post-title/images/lana-abie-581813-unsplash.jpg" +] +``` + +{{% hackcss-alert type="info" %}}**Kenapa menggunakan susunan?** Open Graph mendukung berbagai ukuran gambar. Dan meskipun After Dark tidak mendukung berbagai ukuran, pengguna dapat membuat [custom layouts](../custom-layouts) itu.{{% /hackcss-alert %}} + +Jika tidak ada gambar tingkat halaman yang disediakan After Dark akan mundur ke gambar site-wide yang dapat disesuaikan atau dihapus dari {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}}: + +```toml +[params] + images = [ + "https://source.unsplash.com/-09QE4q0ezw/2000x1322" # site-wide og:image + ] +``` + +Lihat {{< external href="https://unsplash.com/" text="Unsplash" />}} dan {{< external href="https://source.unsplash.com/" text="Unsplash Source" />}} untuk ribuan gambar bebas royalti. diff --git a/themes/after-dark/docs/content/feature/social-meta.md b/themes/after-dark/docs/content/feature/social-meta.md new file mode 100644 index 0000000..abc5551 --- /dev/null +++ b/themes/after-dark/docs/content/feature/social-meta.md @@ -0,0 +1,56 @@ ++++ +title = "Social Meta" +description = "Share links with images on Facebook and Twitter." +categories = ["social"] +tags = ["author", "metadata", "images"] +features = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark provides {{< external text="Open Graph Protocol" href="http://opengraphprotocol.org" />}} and {{< external href="https://developer.twitter.com/en/docs/tweets/optimize-with-cards" text="Twitter Cards" />}} metadata in pages to achieve rich sharing cards on WhatsApp, Twitter, Telegram and more: + +![Open Graph sharing card screenshot](/images/instant-view-fs8.png "Example Open Graph sharing card produced by After Dark") + +Adjust `author` in {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} to specify name shown, if any: + +```toml +[params] + author = "Bali Bebas!" +``` + +Set or override `author` per page using{{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} as shown here: + +```toml +title = "Become a Digital Nomad in Bali: The Lost Guide" +description = "Everything you need to know to become a Digital Nomad in Bali." +author = "After Dark" +date = "2017-02-02T11:57:24+08:00" +publishdate = "2017-01-28T02:31:22+08:00" +images = [ + "https://source.unsplash.com/-09QE4q0ezw/2000x1322" +] +``` + +Adjust `images` to specify an external image or, if using {{< external href="https://gohugo.io/content-management/page-bundles/" text="Page Bundles" />}}, specify the relative path to the image resource to use: + +```toml +images = [ + "/post/post-title/images/lana-abie-581813-unsplash.jpg" +] +``` + +{{% hackcss-alert type="info" %}}**Why use arrays?** Open Graph supports multiple image sizes. And though After Dark doesn't support multiple sizes, users can create [custom layouts](../custom-layouts) that do.{{% /hackcss-alert %}} + +If no page-level image is provided After Dark will fallback to a site-wide image which may be adjusted or removed from {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}}: + +```toml +[params] + images = [ + "https://source.unsplash.com/-09QE4q0ezw/2000x1322" # site-wide og:image + ] +``` + +See {{< external href="https://unsplash.com/" text="Unsplash" />}} and {{< external href="https://source.unsplash.com/" text="Unsplash Source" />}} for thousands of royalty-free images. diff --git a/themes/after-dark/docs/content/feature/structured-data.id.md b/themes/after-dark/docs/content/feature/structured-data.id.md new file mode 100644 index 0000000..0933696 --- /dev/null +++ b/themes/after-dark/docs/content/feature/structured-data.id.md @@ -0,0 +1,36 @@ ++++ +title = "Structured Data" +description = "Memberikan mesin pencari yang kaya tentang struktur situs." +categories = ["search"] +tags = ["metadata", "semantics", "robots", "SEO"] +feature = ["related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menghasilkan metadata terstruktur menggunakan {{< external "https://schema.org" />}} spesifikasi untuk postingan blog, [Custom Homepage](../custom-homepage), [Related Content](../related-content/), [Featured Posts](../featured-posts), [Menu Bagian](../section-menu), [Hall of Mirrors](/module/hall-of-mirrors) galeri gambar dan mengadaptasi data secara otomatis menggunakan yang ditentukan penulis [Post Bylines](../post-bylines) seperti yang ditunjukkan disini: + +Properti skema | Nilai frontmatter +--------------- | ----------------- +author? | `author` +datePublished | `publishdate` atau `date` +articleSection | `categories` + +[Post Images]({{< relref "post-images" >}}) use {{< external "https://gohugo.io/content-management/page-resources/#page-resources-metadata" "Page Resources Metadata" />}} to add image captions: + +Schema Property | Header Image Resource Metadata +--------------- | ---------------- +caption? | `creator` [`sameas` domain] or `caption` + +Pertimbangkan untuk menambahkan data terstruktur saat membuat [Custom Layouts](../custom-layouts) untuk meningkatkan semantik halaman dan SEO yang lebih baik. + +Pelajari lebih lanjut tentang data terstruktur menggunakan sumber daya berikut: + +- {{< external href="https://www.w3.org/TR/microdata/" text="HTML Microdata on W3C" />}} +- {{< external href="https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata" text="Microdata on MDN" />}} +- {{< external href="https://moz.com/learn/seo/schema-structured-data" text="Schema Structured Data on Moz" />}} + + +Gunakan [Webmaster Tools](../webmaster-tools/) untuk memvalidasi data terstruktur. Ini dapat dilakukan dari mesin pengembangan menggunakan [ephemeral hosting](../ephemeral-hosting/). diff --git a/themes/after-dark/docs/content/feature/structured-data.md b/themes/after-dark/docs/content/feature/structured-data.md new file mode 100644 index 0000000..3ee3d34 --- /dev/null +++ b/themes/after-dark/docs/content/feature/structured-data.md @@ -0,0 +1,36 @@ ++++ +title = "Structured Data" +description = "Give search engines rich info about site structure." +categories = ["search"] +tags = ["metadata", "semantics", "robots", "SEO"] +features = ["related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark generates structured metadata using {{< external "https://schema.org" />}} specifications for [Custom Homepage](../custom-homepage), [Related Content](../related-content/), [Featured Posts](../featured-posts), [Section Menu](../section-menu), [Image Galleries](/module/hall-of-mirrors) and adapts data automatically using author-defined [Post Bylines](../post-bylines) as shown here: + +Schema Property | Frontmatter Value +--------------- | ----------------- +author? | `author` +datePublished | `publishdate` or `date` +articleSection | `categories` + +[Post Images]({{< relref "post-images" >}}) use {{< external "https://gohugo.io/content-management/page-resources/#page-resources-metadata" "Page Resources Metadata" />}} to add image captions: + +Schema Property | Header Image Resource Metadata +--------------- | ---------------- +caption? | `creator` [`sameas` domain] or `caption` + +Consider adding structured data when creating [Custom Layouts](../custom-layouts) for improved page semantics and better SEO. + +Learn more about structured data using the following resources: + +- {{< external href="https://www.w3.org/TR/microdata/" text="HTML Microdata on W3C" />}} +- {{< external href="https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata" text="Microdata on MDN" />}} +- {{< external href="https://moz.com/learn/seo/schema-structured-data" text="Schema Structured Data on Moz" />}} + + +Use [Webmaster Tools](../webmaster-tools/) to validate structured data. This can be done from a development machine using [Ephemeral Hosting](../ephemeral-hosting/). diff --git a/themes/after-dark/docs/content/feature/svg-favicon.id.md b/themes/after-dark/docs/content/feature/svg-favicon.id.md new file mode 100644 index 0000000..df5b586 --- /dev/null +++ b/themes/after-dark/docs/content/feature/svg-favicon.id.md @@ -0,0 +1,97 @@ ++++ +title = "SVG Favicon" +description = "Hiasi situs anda dengan favicon SVG yang unik." +categories = ["customizing"] +tags = ["color", "style", "graphics", "branding"] +feature = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark dikirimkan dengan 169B yang dioptimalkan[^1] SVG favicon tertanam di setiap halaman: + +
+Perluas untuk melihat kode +{{< highlight html >}} +{{< include "themes/after-dark/layouts/partials/head/favicon.html" >}} +{{< /highlight >}} +
+ +{{% hackcss-alert type="info" %}}**Catatan**: HTML (Go) Komentar template yang dilucuti selama generasi situs.{{% /hackcss-alert %}} + +Favicon adalah segitiga miring berwarna hitam dalam bentuk tepee seperti yang ditunjukkan[^2] di [Bantuan Online](../online-help) [Overview](/). Pusat segitiga menggunakan ruang negatif untuk memberikan ilusi segitiga sama sisi kedua dalam bentuk piramida, atau api terbuka, yang terkandung di dalam. + +Warna ikon dapat dimodifikasi dengan mengubah atribut `fill`: + + +{{< hackcss-grid class="-around" >}} + {{< hackcss-cell class="-2of12" >}} +
+ +
+
fill="%23f00"
+
+
+ {{< /hackcss-cell >}} + {{< hackcss-cell class="-2of12" >}} +
+ +
+
fill="lime"
+
+
+ {{< /hackcss-cell >}} + {{< hackcss-cell class="-2of12" >}} +
+ +
+
fill="%2300f"
+
+
+ {{< /hackcss-cell >}} +{{< /hackcss-grid >}} + +Sesuaikan dari`favicon.html` di direktori situs `layouts/partials/head`: + +``` +├── content +├── layouts +│   └── partials +│      └── head +│   └── favicon.html +├── static +``` + +Jika file belum ada, salin darii tema default: + +```sh +$ mkdir -p layouts/partials/head +$ cp themes/after-dark/layouts/partials/head/favicon.html layouts/partials/head +``` + +Ganti SVG dengan grafik lain jika diinginkan: + +```html + +``` + +Jika mengoptimalkan pengalaman platform lakukan dari dalam `favicon.html`: + +{{< highlight go-html-template "linenos=inline" >}} + + + + +{{< /highlight >}} + +Lihat {{< external href="https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/extend.md#web-apps" text="H5BP Extend" />}} untuk persyaratan khusus platform dan {{< external href="https://gohugo.io/documentation/" text="Hugo Documentation" />}} untuk bantuan dengan templating fungsi dan variabel. + +[^1]: Lihat [Mengoptimalkan SVGs dalam data URIs](https://codepen.io/tigt/post/optimizing-svgs-in-data-uris) untuk membantu mengoptimalkan SVGs anda sendiri. +[^2]: Pelajari cara mendaftar [animasi SVG dengan SMIL](https://devdocs.io/svg/svg_animation_with_smil). diff --git a/themes/after-dark/docs/content/feature/svg-favicon.md b/themes/after-dark/docs/content/feature/svg-favicon.md new file mode 100644 index 0000000..a546bb4 --- /dev/null +++ b/themes/after-dark/docs/content/feature/svg-favicon.md @@ -0,0 +1,97 @@ ++++ +title = "SVG Favicon" +description = "Decorate your site with a unique SVG favicon." +categories = ["customizing"] +tags = ["color", "style", "graphics", "branding"] +features = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark ships with an 169B optimized[^1] SVG favicon embedded into every page: + +
+Expand to view code +{{< highlight html >}} +{{< include "themes/after-dark/layouts/partials/head/favicon.html" >}} +{{< /highlight >}} +
+ +{{% hackcss-alert type="info" %}}**Note**: HTML (Go) template comments are stripped out during site generation.{{% /hackcss-alert %}} + +The favicon is a black-colored oblique triangle in the shape of a tepee as shown[^2] on the [Online Help](../online-help) [Overview](/). The center of the triangle uses negative space to give the illusion of a second equilateral triangle in the shape of a pyramid, or open fire, contained within. + +The color of the icon can be modified by changing the `fill` attribute: + + +{{< hackcss-grid class="-around" >}} + {{< hackcss-cell class="-2of12" >}} +
+ +
+
fill="%23f00"
+
+
+ {{< /hackcss-cell >}} + {{< hackcss-cell class="-2of12" >}} +
+ +
+
fill="lime"
+
+
+ {{< /hackcss-cell >}} + {{< hackcss-cell class="-2of12" >}} +
+ +
+
fill="%2300f"
+
+
+ {{< /hackcss-cell >}} +{{< /hackcss-grid >}} + +Adjust it from `favicon.html` in the site `layouts/partials/head` directory: + +``` +├── content +├── layouts +│   └── partials +│      └── head +│   └── favicon.html +├── static +``` + +If the file doesn't exist yet, copy it from the theme default: + +```sh +mkdir -p layouts/partials/head && \ +cp themes/after-dark/layouts/partials/head/favicon.html layouts/partials/head +``` + +Replace SVG with another graphic if desired: + +```html + +``` + +If optimizing for platform experiences do so from within `favicon.html`: + +{{< highlight go-html-template >}} + + + + +{{< /highlight >}} + +See {{< external href="https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/extend.md#web-apps" text="H5BP Extend" />}} for platform-specific requirements and {{< external href="https://gohugo.io/documentation/" text="Hugo Documentation" />}} for help with templating functions and variables. + +[^1]: See [Optimizing SVGs in data URIs](https://codepen.io/tigt/post/optimizing-svgs-in-data-uris) for help optimizing your own SVGs. +[^2]: Learn how to apply [SVG animation with SMIL](https://devdocs.io/svg/svg_animation_with_smil). diff --git a/themes/after-dark/docs/content/feature/table-of-contents.id.md b/themes/after-dark/docs/content/feature/table-of-contents.id.md new file mode 100644 index 0000000..e54f91c --- /dev/null +++ b/themes/after-dark/docs/content/feature/table-of-contents.id.md @@ -0,0 +1,21 @@ ++++ +title = "Table of Contents" +description = "Menemukan informasi dengan cepat di postingan yang lebih panjang." +categories = ["navigation"] +tags = ["metadata"] +feature = ["related content", "snippets", "code highlighter"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Secara otomatis menghasilkan daftar isi dengan tautan gulir halus berdasarkan {{< external href="https://gsnedders.html5.org/outliner/" text="page outline" />}} saat ini. Untuk melakukannya tambahkan yang berikut ini ke postingan {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}}: + +```toml +toc = true +``` + +Atur `false`, atau cukup hapus pengaturan untuk menonaktifkan. + +Daftar isi akan jatuh di bawah penyingkapan pada pemuatan halaman. Setelah penyingkapan diperluas, outline halaman penuh akan tersingkap. Memilih item dalam outline akan menggulir halus ke bagian yang sesuai, memperbarui riwayat browser dan menyorot judul bagian. diff --git a/themes/after-dark/docs/content/feature/table-of-contents.md b/themes/after-dark/docs/content/feature/table-of-contents.md new file mode 100644 index 0000000..259ae58 --- /dev/null +++ b/themes/after-dark/docs/content/feature/table-of-contents.md @@ -0,0 +1,21 @@ ++++ +title = "Table of Contents" +description = "Quickly locate information in longer posts." +categories = ["navigation"] +tags = ["metadata"] +features = ["related content", "snippets", "code highlighter"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Automatically generate a table of contents with smooth-scroll links based on the current {{< external href="https://gsnedders.html5.org/outliner/" text="page outline" />}}. To do so add the following to post {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}}: + +```toml +toc = true +``` + +Set `false`, or simply remove the setting, to disable. + +The table of contents will be collapsed under a disclosure on page load. Once the disclosure is expanded the full page outline will be revealed. Selecting an item in the outline will smooth-scroll to the corresponding section, update the browser history and highlight the section title. diff --git a/themes/after-dark/docs/content/feature/taxonomy-pages.id.md b/themes/after-dark/docs/content/feature/taxonomy-pages.id.md new file mode 100644 index 0000000..697bebb --- /dev/null +++ b/themes/after-dark/docs/content/feature/taxonomy-pages.id.md @@ -0,0 +1,46 @@ ++++ +title = "Taxonomy Pages" +description = "Menavigasi situs menggunakan taksonomi yang ditentukan penulis." +categories = ["navigation"] +tags = ["links", "taxonomy"] +feature = ["related content", "code highlighter", "snippets"] +alias = [ + "/feature/page-taxonomies/" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menghasilkan tag dan kategoris taksonomi, halaman dan tautan istilah taksonomi [Post Bylines](../post-bylines). + +Berikan halaman berikut ini {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} untuk jenis postingan: + +```toml +categories = ["navigation"] +tags = ["links", "taxonomy"] +``` + +Tautan taksonomi berikut akan muncul di bylines: + +> Diterbitkan [by `author`] [`publishdate` or `date`] di dalam [navigation](/categories/navigation) and tagged [links](/tags/links) dan [taxonomy](/tags/taxonomy) menggunakan [`wordcount`] words. + +Berikut ini [Index Blocked](../index-blocking) halaman taksonomi dihasilkan: + +- [/categories/index.html](/categories/index.html) +- [/categories/navigation/index.html](/categories/navigation/index.html) +- [/tags/index.html](/tags/index.html) +- [/tags/links/index.html](/tags/links/index.html) +- [/tags/taxonomy/index.html](/tags/taxonomy/index.html) + +Umpan web taksonomi berikut dibuat: + +- [/categories/index.xml](/categories/index.xml) +- [/categories/navigation/index.xml](/categories/navigation/index.xml) +- [/tags/index.xml](/tags/index.xml) +- [/tags/links/index.xml](/tags/links/index.xml) +- [/tags/taxonomy/index.xml](/tags/taxonomy/index.xml) + +{{< external href="https://gohugo.io/templates/sitemap-template/" text="Sitemap" />}} dan [Related Content](../related-content) perbarui dan, jika diaktifkan, [Fuzzy Search](../fuzzy-search) indeks pencarian JSON (ditimbang pada taksonomi) dibuat ulang, semuanya otomatis +Lihat {{< external href="https://gohugo.io/content-management/taxonomies" text="Taxonomies in Hugo" />}} untuk mempelajari tentang taksonoomi dan cara menyesuaikannya. diff --git a/themes/after-dark/docs/content/feature/taxonomy-pages.md b/themes/after-dark/docs/content/feature/taxonomy-pages.md new file mode 100644 index 0000000..6f31614 --- /dev/null +++ b/themes/after-dark/docs/content/feature/taxonomy-pages.md @@ -0,0 +1,47 @@ ++++ +title = "Taxonomy Pages" +description = "Navigate the site using author-defined taxonomies." +categories = ["navigation"] +tags = ["links", "taxonomy"] +features = ["related content", "code highlighter", "snippets"] +aliases = [ + "/feature/page-taxonomies/" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark generates categorical and tag taxonomy and taxonomy terms pages and links to them automatically in posts using [Post Bylines](../post-bylines). + +Given the following page {{< external href="https://gohugo.io/content-management/front-matter/" text="Front Matter" />}} for a post type: + +```toml +categories = ["navigation"] +tags = ["links", "taxonomy"] +``` + +The following taxonomy links would appear in the byline: + +> Published [by `author`] [`publishdate` or `date`] in [navigation](/categories/navigation) and tagged [links](/tags/links) and [taxonomy](/tags/taxonomy) using [`wordcount`] words. + +The following [Index Blocked](../index-blocking) taxonomy pages generated: + +- [/categories/index.html](/categories/index.html) +- [/categories/navigation/index.html](/categories/navigation/index.html) +- [/tags/index.html](/tags/index.html) +- [/tags/links/index.html](/tags/links/index.html) +- [/tags/taxonomy/index.html](/tags/taxonomy/index.html) + +The following taxonomic web feeds created: + +- [/categories/index.xml](/categories/index.xml) +- [/categories/navigation/index.xml](/categories/navigation/index.xml) +- [/tags/index.xml](/tags/index.xml) +- [/tags/links/index.xml](/tags/links/index.xml) +- [/tags/taxonomy/index.xml](/tags/taxonomy/index.xml) + +The {{< external href="https://gohugo.io/templates/sitemap-template/" text="Sitemap" />}} and [Related Content](../related-content) updated and, if activated, the [Fuzzy Search](../fuzzy-search) JSON search index (weighted on taxonomy) regenerated, all automatically. + +See {{< external href="https://gohugo.io/content-management/taxonomies" text="Taxonomies in Hugo" />}} to learn about taxonomies and how to customize them. diff --git a/themes/after-dark/docs/content/feature/telegram-iv.id.md b/themes/after-dark/docs/content/feature/telegram-iv.id.md new file mode 100644 index 0000000..5bd203d --- /dev/null +++ b/themes/after-dark/docs/content/feature/telegram-iv.id.md @@ -0,0 +1,59 @@ ++++ +title = "Instant Views" +description = "Preview secara instant konten anda di Telegram." +categories = ["social"] +tags = ["author", "templating"] +features = ["related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark menyediakan panduan templat untuk mengaktifkan Telegram Instant Views untuk postingan. Gunakan itu untuk membuat {{< external href="https://instantview.telegram.org/my/" text="Instant View Template" />}} di situs telegram: + +```yaml +# menggunakan 2.0 +~version: "2.0" + +# aktifkan untuk item di bagian postingan +?path: /post/.+ + +# mendefinisikan elemen-elemen yang diperlukan +title: //*[@itemprop="headline"] +body: //*[@itemprop="articleBody"] + +# add optional site name and subtitle +subtitle: //*[@itemprop="description"][normalize-space()] +site_name: //*[@itemprop="url"][@href="/"] + +# if author exists, define name and url +?exists: //*[@itemprop="author"] +author: //*[@itemprop="author"] +author_url: //*[@itemprop="url"]/@href + +# add optional telegram channel +channel: //*[@name="telegram:channel"]/@content + +# jika cover ada, tentukan gambar +?exists: //article/meta[@itemprop="image"]/@content +cover: //article/header/figure[@itemprop="image"] +image_url: $cover/self::img/@src + +# data tanggal postingan diekstraksi secara otomatis +``` + +Preview hasilnya di situs Telegram : + +![Telegram Instant View screenshot](/images/feature-instant-view-fs8.png "Example Telegram Instant View for After Dark") + +Selain itu, jika situs anda memiliki saluran telegram, anda dapat menentukannya dengan mengatur seperti yang berikut ini di konfigurasi situs anda: + +```toml +[params.seo] + telegram_channel = "channelname" # omit the leading `@` +``` + +Menentukan nama saluran memungkinkan pengguna telegram untuk bergabung dengan saluran anda dengan satu klik di dalam Instant view. + +Lihat {{< external href="https://instantview.telegram.org/" text="Instant View on Telegram" />}} untuk informasi tambahan. diff --git a/themes/after-dark/docs/content/feature/telegram-iv.md b/themes/after-dark/docs/content/feature/telegram-iv.md new file mode 100644 index 0000000..4c3c113 --- /dev/null +++ b/themes/after-dark/docs/content/feature/telegram-iv.md @@ -0,0 +1,59 @@ ++++ +title = "Instant Views" +description = "Instantly preview your content from within Telegram." +categories = ["social"] +tags = ["author", "templating"] +features = ["related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark provides a template guide to enable Telegram Instant Views for posts. Use it to create an {{< external href="https://instantview.telegram.org/my/" text="Instant View Template" />}} on the Telegram site: + +```yaml +# use 2.0 +~version: "2.0" + +# enable for items in the post section +?path: /post/.+ + +# define required elements +title: //*[@itemprop="headline"] +body: //*[@itemprop="articleBody"] + +# add optional site name and subtitle +subtitle: //*[@itemprop="description"][normalize-space()] +site_name: //*[@itemprop="url"][@href="/"] + +# if author exists, define name and url +?exists: //*[@itemprop="author"] +author: //*[@itemprop="author"] +author_url: //*[@itemprop="url"]/@href + +# add optional telegram channel +channel: //*[@name="telegram:channel"]/@content + +# if cover exists, define images +?exists: //article/meta[@itemprop="image"]/@content +cover: //article/header/figure[@itemprop="image"] +image_url: $cover/self::img/@src + +# post date extracted automatically +``` + +Preview your results on the Telegram site: + +![Telegram Instant View screenshot](/images/feature-instant-view-fs8.png "Example Telegram Instant View for After Dark") + +Additionally, if your site has a telegram channel, you can specify it by setting the following in your site config: + +```toml +[params.seo] + telegram_channel = "channelname" # omit the leading `@` +``` + +Specifying a channel name allows Telegram users to join your channel with a single click from within an Instant View. + +See the {{< external href="https://instantview.telegram.org/" text="Instant View on Telegram" />}} for additional information. diff --git a/themes/after-dark/docs/content/feature/trim-color.id.md b/themes/after-dark/docs/content/feature/trim-color.id.md new file mode 100644 index 0000000..3275902 --- /dev/null +++ b/themes/after-dark/docs/content/feature/trim-color.id.md @@ -0,0 +1,31 @@ ++++ +title = "Trim Color" +description = "Menentukan warna yang digunakan untuk menampilkan batas di sekitar situs anda." +categories = ["customizing"] +tags = ["color", "style", "branding"] +feature = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Trim color terkadang dapat mempengaruhi cara browser atau OS memilih untuk menampilkan batas dan aksen warna untuk situs anda. Didalam {{< external href="https://brave.com/" text="Brave" />}}, misalnya, menyesuaikan trim color mempengaruhi gaya bilah lokasi. Atur trim colors untuk menyesuaikan hal ini. + +Trim color standar secara otomatis diatur ke warna latar belakang dari yang saat ini dipilih [Skin Style](../skin-styles). Mengganti default di [Custom Styles](../custom-styles) anda dengan mendeklarasikan variabel `--trim-color` di dalam pemilih `:root` di bagian atas file: + +{{< highlight css "linenos=inline" >}} +:root { + --trim-color: firebrick; +} +{{< /highlight >}} + +Gunakan kembali variabel untuk mempertahankan konsistensi di seluruh gaya kustom anda: + +{{< highlight css "linenos=inline,linenostart=4" >}} +nav a.active { + background-color: var(--trim-color); +} +{{< /highlight >}} + +Lihat {{< external href="https://devdocs.io/css/using_css_variables" text="Using CSS variables" />}} untuk bantuan menggunakan variabel CSS. diff --git a/themes/after-dark/docs/content/feature/trim-color.md b/themes/after-dark/docs/content/feature/trim-color.md new file mode 100644 index 0000000..12ccb61 --- /dev/null +++ b/themes/after-dark/docs/content/feature/trim-color.md @@ -0,0 +1,31 @@ ++++ +title = "Trim Color" +description = "Define the color used to display borders around your site." +categories = ["customizing"] +tags = ["color", "style", "branding"] +features = ["code highlighter", "snippets", "related content"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Trim color can sometimes affect how a browser or OS chooses to display borders and accent colors for your site. In {{< external href="https://brave.com/" text="Brave" />}}, for example, adjusting trim color affects stylizes the location bar. Set a trim color to customize this behavior. + +The default trim color is automatically set to background color of the currently selected [Skin Style](../skin-styles). Override the default in your [Custom Styles](../custom-styles) by declaring the `--trim-color` variable inside a `:root` selector at the top of the file: + +{{< highlight css "linenos=inline" >}} +:root { + --trim-color: firebrick; +} +{{< /highlight >}} + +Reuse the variable to maintain consistency throughout your custom styles: + +{{< highlight css "linenos=inline,linenostart=4" >}} +nav a.active { + background-color: var(--trim-color); +} +{{< /highlight >}} + +See {{< external href="https://devdocs.io/css/using_css_variables" text="Using CSS variables" />}} for help using CSS variables. diff --git a/themes/after-dark/docs/content/feature/upgrade-script.id.md b/themes/after-dark/docs/content/feature/upgrade-script.id.md new file mode 100644 index 0000000..8e72969 --- /dev/null +++ b/themes/after-dark/docs/content/feature/upgrade-script.id.md @@ -0,0 +1,47 @@ ++++ +title = "Upgrade Script" +description = "Memeriksa pembaruan After Dark dan mengupgrade dengan mudah." +categories = ["core"] +tags = ["updating", "installation", "scripts"] +feature = ["code highlighter", "related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Untuk memeriksa pembaruan dan secara otomatis megupgrade After Dark ke versi terbaru, jalankan upgrade skrip dari direktori situs anda: + +```sh +cd flying toasters && \ +./themes/after-dark/bin/upgrade +``` + +Jika anda sudah menggunakan versi terbaru, skrip akan memberitahu anda: + +{{< hackcss-alert type="info" >}} +Did not upgrade after-dark. Already using latest version. +{{< /hackcss-alert >}} + +Jika pembaruan tersedia, skrip akan mengunduh dan menginstalnya secara otomatis: + +{{< hackcss-alert type="info" >}} +Starting upgrade from 6.7.6 to 6.8.0 ...
+Version 6.8.0 downloaded to themes/after-dark
+Stopping help server if running ...
+Generating help documentation ...
+Upgrade complete! Please see CHANGELOG.md for changes.
+{{< /hackcss-alert >}} + +Jika versi saat ini tidak dapat dideteksi skrip akan meminta anda: + +{{< hackcss-alert type="info" >}} +Cannot detect version. Upgrade after-dark anyway (y/n)? y
+Starting upgrade from unknown version to 6.12.1 ...
+Version 6.12.1 downloaded to themes/after-dark
+Stopping help server if running ...
+Generating help documentation ...
+Upgrade complete! Please see CHANGELOG.md for changes.
+{{< /hackcss-alert >}} + +Seperti [Quick Install](../quick-install) Skrip upgrade ditulis ke standar PSOIX tidak akan memerlukan ketergantungan tambahan untuk beroperasi di sebagian besar sistem. Setelah upgrade [Release Hash](../release-hashes) akan memperbarui juga sehingga anda akan [Validate Release](/validate). diff --git a/themes/after-dark/docs/content/feature/upgrade-script.md b/themes/after-dark/docs/content/feature/upgrade-script.md new file mode 100644 index 0000000..12bc4d2 --- /dev/null +++ b/themes/after-dark/docs/content/feature/upgrade-script.md @@ -0,0 +1,47 @@ ++++ +title = "Upgrade Script" +description = "Check for After Dark updates and upgrade effortlessly." +categories = ["core"] +tags = ["updating", "installation", "scripts"] +features = ["code highlighter", "related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +To check for updates and automatically upgrade After Dark to the latest version simply run the upgrade script from your site directory: + +```sh +cd flying toasters && \ +./themes/after-dark/bin/upgrade +``` + +If you're already using the latest version the script will let you know: + +{{< hackcss-alert type="info" >}} +Did not upgrade after-dark. Already using latest version. +{{< /hackcss-alert >}} + +If an update is available the script will download and install it automatically: + +{{< hackcss-alert type="info" >}} +Starting upgrade from 6.7.6 to 6.8.0 ...
+Version 6.8.0 downloaded to themes/after-dark
+Stopping help server if running ...
+Generating help documentation ...
+Upgrade complete! Please see CHANGELOG.md for changes.
+{{< /hackcss-alert >}} + +If current version can't be detected the script will prompt you: + +{{< hackcss-alert type="info" >}} +Cannot detect version. Upgrade after-dark anyway (y/n)? y
+Starting upgrade from unknown version to 6.12.1 ...
+Version 6.12.1 downloaded to themes/after-dark
+Stopping help server if running ...
+Generating help documentation ...
+Upgrade complete! Please see CHANGELOG.md for changes.
+{{< /hackcss-alert >}} + +Like [Quick Install](../quick-install) the upgrade script is written to POSIX standard will not require additional dependencies to operate on most systems. Upon upgrade the [Release Hash](../release-hashes) will update as well so you may [Validate Release](/validate). diff --git a/themes/after-dark/docs/content/feature/web-feeds.md b/themes/after-dark/docs/content/feature/web-feeds.md new file mode 100644 index 0000000..008da3d --- /dev/null +++ b/themes/after-dark/docs/content/feature/web-feeds.md @@ -0,0 +1,69 @@ ++++ +title = "Web Feeds" +description = "Share RSS feeds with full-content and optional enclosures." +categories = ["search"] +tags = ["metadata", "robots", "SEO"] +features = ["snippets", "related content", "code highlighter"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark provides RSS web feeds conforming with the {{< external "https://cyber.harvard.edu/rss/rss.html" "RSS 2.0 Specification" />}} and enhanced semantically using the following custom extensions: + +- {{< external "https://purl.org/rss/1.0/modules/content/" "Content Module" />}} to convey the full content of pages and posts +- {{< external "https://purl.org/dc/elements/1.1/" "Dublin Core" />}} to give authorship credit on individual pages +- {{< external "https://www.w3.org/2005/Atom" "Atom" />}} for improved compatibility with Atom feeds + +Feeds are generated automatically on a per-section basis, in addition to a consolidated site-wide feed combining content from across the site: + +- [/index.xml](/index.xml) site-wide feed +- [/feature/index.xml](/feature/index.xml) features feed +- [/module/index.xml](/module/index.xml) modules feed +- [/shortcode/index.xml](/shortcode/index.xml) shortcodes feed +- [/extra/index.xml](/extra/index.xml) extras feed + +Add multimedia attachments to pages and posts using RSS enclosures. Enclosures will output automatically to feeds when supplied. To supply an enclosure create a {{< external "https://gohugo.io/content-management/page-bundles/" "Page Bundle" />}} as described in [Post Images]({{< relref "post-images" >}}) and shown here for a blog post: + +``` +├── archetypes +├── content +│ └── post +│ └── backup-restore-macos-mojave +│ ├── assets +│ │ └── macos_v10.14.3-upgrade-fail.mp4 +│ ├── images +│ └── index.md +├── layouts +``` + +Then reference the resource from front matter as shown here: + +```toml +[[resources]] + src = "assets/macos_v10.14.3-upgrade-fail.mp4" + name = "enclosure" + title = "Software Update Malfunction: Mojave 10.14.3" + [resources.params] + length = "3705578" +``` + +{{% hackcss-alert type="info" %}}**Note:** Length is the number of bytes in the file and required by RSS 2.0 spec.{{% /hackcss-alert %}} + +{{% hackcss-alert type="success" %}}**Tip:** From a terminal get length using `wc -c < /path/to/file`.{{% /hackcss-alert %}} + +Enclosures may be output to page content by creating a custom shortcode or using a [Custom Layout]({{< relref "custom-layouts" >}}) with content like: + +```go-html-template +{{ with .Resources.GetMatch "enclosure" }}{{ if .Params.length }} + + + + Enclosure +{{ end }}{{ end }} +``` + +Use the {{< external "https://validator.w3.org/feed/" "W3C Feed Validation Service" />}} to validate your feed. For help creating custom shortcodes see {{< external "https://gohugo.io/templates/shortcode-templates/#create-custom-shortcodes" "Create Your Own Shortcodes" />}} on the Hugo docs site. + +See {{< external "https://gohugo.io/templates/rss/" "RSS Templates" />}} in Hugo for additional information. diff --git a/themes/after-dark/docs/content/feature/webmaster-tools.id.md b/themes/after-dark/docs/content/feature/webmaster-tools.id.md new file mode 100644 index 0000000..098e3e7 --- /dev/null +++ b/themes/after-dark/docs/content/feature/webmaster-tools.id.md @@ -0,0 +1,74 @@ ++++ +title = "Webmaster Tools" +description = "Menguji dan mengirim situs anda dengan mesin pencari yang terkenal." +categories = ["search"] +tags = ["SEO", "robots", "metadata"] +feature = ["code highlighter", "related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +## Verifikasi Webmaster + +Gunakan beranda`meta` untuk memverifikasi situs anda dengan Google, Bing, Alexa dan Yandex. Semua verifikasi bersifat opsional dan beberapa penyedia mengizinkan anda [submit manually](#submit-manually). + +Untuk memverifikasi dengan`meta` tambahkan yang berikut ini ke {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} dan isi nilai yang diberikan kepada anda oleh konsol webmaster mesin pencari atau sejenisnya : + +```toml +[params.seo.webmaster_verifications] + google = "" # Opsional, lihat https://search.google.com/search-console + bing = "" # Opsional, lihat https://www.bing.com/toolbox/webmaster/ + yandex = "" # Opsional, lihat https://webmaster.yandex.com/ + alexa = "" # Opsional, mengklaim dihentikan (lihat catatan di bawah ini) +``` + +{{< hackcss-alert type="info" >}} +Note: Mengklaim situs anda dengan Alexa {{< external text="dihentikan" href="https://support.alexa.com/hc/en-us/articles/219135887-Claiming-has-been-retired-May-2016" />}} dalam May 2016. +{{< /hackcss-alert >}} + +Nanti anda dapat menghapus verifikasi yang tidak anda perlukan lagi atau memutuskan untuk tidak menggunakannya. + +### Kirim secara manual + +Mengirim peta situs anda secara manual untuk pengindeksan pencarian: + +{{< hackcss-form target="_blank" action="https://www.google.com/webmasters/tools/ping" >}} + {{< hackcss-formgroup >}} + {{< hackcss-label for="google" text="Google:" />}} + {{< hackcss-textinput id="google" name="sitemap" placeholder="https://domain.example/sitemap.xml" >}} + {{< /hackcss-formgroup >}} +{{< /hackcss-form >}} +{{< hackcss-form target="_blank" action="https://bing.com/webmaster/ping.aspx" >}} + {{< hackcss-formgroup >}} + {{< hackcss-label for="bing" text="Bing:" />}} + {{< hackcss-textinput id="bing" name="siteMap" placeholder="https://domain.example/sitemap.xml" >}} + {{< /hackcss-formgroup >}} +{{< /hackcss-form >}} + +## Uji Data Terstruktur + +Untuk menguji dengan Yandex gunakan {{< external href="https://webmaster.yandex.com/tools/microtest" text="Structured data validator" />}} alat uji. Untuk Google kirimkan formulir dibawah ini dengan URL yang ingin anda uji: + +{{< hackcss-form target="_blank" action="https://search.google.com/structured-data/testing-tool" >}} + {{< hackcss-formgroup >}} + {{< hackcss-textinput type="hidden" name="hl" value="en" >}} + {{< hackcss-label for="google" text="Test URL:" />}} + {{< hackcss-textinput id="google" name="url" placeholder="https://domain.example/post/" >}} + {{< /hackcss-formgroup >}} +{{< /hackcss-form >}} + +Gunakan [Hosting Ephemeral]({{< relref "ephemeral-hosting" >}}) untuk memeriksa situs anda saat dalam pengembangan/pengujian. + +## Menguji dan memantau kecepatan + +Tidak ada yang menyukai website yang lambat. Mengevaluasi dan menganalisa kinerja dari berbagai lokasi di seluruh dunia menggunakan {{< external href="https://tools.pingdom.com" text="Pingdom Tools" />}} dan {{< external "https://webpagetest.org" />}} secara gratis. + +Memantau kinerja dari waktu ke waktu menggunakan {{< external href="https://speedtracker.org" text="SpeedTracker" />}}. + + +## Layanan Tambahan + +- {{< external "https://webmaster.yandex.com/tools/robotstxt/" />}} +- {{< external "https://w3c.github.io/developers/tools/" />}} diff --git a/themes/after-dark/docs/content/feature/webmaster-tools.md b/themes/after-dark/docs/content/feature/webmaster-tools.md new file mode 100644 index 0000000..b5121b7 --- /dev/null +++ b/themes/after-dark/docs/content/feature/webmaster-tools.md @@ -0,0 +1,73 @@ ++++ +title = "Webmaster Tools" +description = "Test and submit your site with popular search engines." +categories = ["search"] +tags = ["SEO", "robots", "metadata"] +features = ["code highlighter", "related content", "snippets"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +## Webmaster verification + +Use homepage `meta` to verify your site with Google, Bing, Alexa and Yandex. All verifications are optional and some providers allow you to [submit manually](#submit-manually). + +To verify with `meta` add the following to your {{< external href="https://gohugo.io/getting-started/configuration/" text="Site Configuration" />}} and fill in the value provided to you by the search engine webmaster console or similar: + +```toml +[params.seo.webmaster_verifications] + google = "" # Optional, see https://search.google.com/search-console + bing = "" # Optional, see https://www.bing.com/toolbox/webmaster/ + yandex = "" # Optional, see https://webmaster.yandex.com/ + alexa = "" # Optional, claiming retired (see note below) +``` + +{{< hackcss-alert type="info" >}} +Note: Claiming your site with Alexa {{< external text="was retired" href="https://support.alexa.com/hc/en-us/articles/219135887-Claiming-has-been-retired-May-2016" />}} in May 2016. +{{< /hackcss-alert >}} + +You may later remove verifications you no longer need or decide not to use. + +### Submit manually + +Manually submit your Sitemap for search indexing: + +{{< hackcss-form target="_blank" action="https://www.google.com/webmasters/tools/ping" >}} + {{< hackcss-formgroup >}} + {{< hackcss-label for="google" text="Google:" />}} + {{< hackcss-textinput id="google" name="sitemap" placeholder="https://domain.example/sitemap.xml" >}} + {{< /hackcss-formgroup >}} +{{< /hackcss-form >}} +{{< hackcss-form target="_blank" action="https://bing.com/webmaster/ping.aspx" >}} + {{< hackcss-formgroup >}} + {{< hackcss-label for="bing" text="Bing:" />}} + {{< hackcss-textinput id="bing" name="siteMap" placeholder="https://domain.example/sitemap.xml" >}} + {{< /hackcss-formgroup >}} +{{< /hackcss-form >}} + +## Test Structured Data + +To test with Yandex use their {{< external href="https://webmaster.yandex.com/tools/microtest" text="Structured data validator" />}} testing tool. For Google submit the form below with the URL you wish to test: + +{{< hackcss-form target="_blank" action="https://search.google.com/structured-data/testing-tool" >}} + {{< hackcss-formgroup >}} + {{< hackcss-textinput type="hidden" name="hl" value="en" >}} + {{< hackcss-label for="google" text="Test URL:" />}} + {{< hackcss-textinput id="google" name="url" placeholder="https://domain.example/post/" >}} + {{< /hackcss-formgroup >}} +{{< /hackcss-form >}} + +Use [Ephemeral Hosting]({{< relref "ephemeral-hosting" >}}) to check your site while in development/testing. + +## Test and Monitor Speed + +Nobody likes a slow website. Benchmark and analyze performance from various locations worldwide using {{< external href="https://tools.pingdom.com" text="Pingdom Tools" />}} and {{< external "https://webpagetest.org" />}} for free. + +Monitor performance over time using {{< external href="https://speedtracker.org" text="SpeedTracker" />}}. + +## Additional services + +- {{< external "https://webmaster.yandex.com/tools/robotstxt/" />}} +- {{< external "https://w3c.github.io/developers/tools/" />}} diff --git a/themes/after-dark/docs/content/feature/work-offline.id.md b/themes/after-dark/docs/content/feature/work-offline.id.md new file mode 100644 index 0000000..f18cc45 --- /dev/null +++ b/themes/after-dark/docs/content/feature/work-offline.id.md @@ -0,0 +1,26 @@ ++++ +title = "Work Offline" +description = "Membangun dan menjalankan seluruh situs anda tanpa akses internet." +categories = ["security"] +tags = ["privacy", "networking"] +feature = ["related content"] +aliases = [ + "/feature/air-gapping" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Kecuali menjalankan [Instal Cepat](../quick-install) After Dark tidak memerlukan koneksi internet untuk berfungsi. Manfaatkan fitur ini dengan berbagai cara yang kreatif: + +- Menggunakan [Hosting Ephemeral]({{< relref "ephemeral-hosting" >}}) untuk laporkan berita tanpa memberitahu pihak berwenang. +- Meninjau [Bantuan Online](../online-help) dokumen selama penerbangan dengan Virgin Galactic. +- Menyimpan jurnal pribadi saat melakukan couchsurfing melalui Asia Tenggara. +- Dengan aman menghasilkan konfigurasi untuk [Penambang Web](/module/toxic-swamp#config-generator) modul tambahan. +- Jalankan situs anda di belakang NAT atau firewall yang memblokir semua permintaan keluar. +- Mengembangkan konten anda menggunakan {{< external href="https://termux.com" text="Termux" />}} pada Android dengan mode pesawat. +- Membuat sebuah [Galeri Gambar](/module/hall-of-mirrors) saat trekking ke Gunung Nimbus melalui ferrata. + +Secara default After Dark tidak membuat permintaan keluar **kecuali** saat melihat dokumentasi tertentu [Bantuan Online](../online-help) untuk menutupi fungsionalitas terkait. diff --git a/themes/after-dark/docs/content/feature/work-offline.md b/themes/after-dark/docs/content/feature/work-offline.md new file mode 100644 index 0000000..ec10bbf --- /dev/null +++ b/themes/after-dark/docs/content/feature/work-offline.md @@ -0,0 +1,26 @@ ++++ +title = "Work Offline" +description = "Build and run your entire site without Internet access." +categories = ["security"] +tags = ["privacy", "networking"] +features = ["related content"] +aliases = [ + "/feature/air-gapping" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Unless running the [Quick Install](../quick-install) After Dark does not require an Internet connection to function. Leverage this feature in creative ways: + +- Use [Ephemeral Hosting]({{< relref "ephemeral-hosting" >}}) to report news without tipping off authorities. +- Run your site behind a NAT or firewall blocking all outbound requests. +- Review the [Online Help](../online-help) docs during a flight on Virgin Galactic. +- Keep a personal journal while couchsurfing through Southeast Asia. +- Securely generate configuration for the [Web Mining](/module/toxic-swamp#config-generator) add-on module. +- Develop your content using {{< external href="https://termux.com" text="Termux" />}} on Android in airplane mode. +- Create an [Image Gallery](/module/hall-of-mirrors) while trekking the Mount Nimbus via ferrata. + +By default After Dark makes no outbound requests **except** when viewing certain [Online Help](../online-help) documentation to cover related functionality. diff --git a/themes/after-dark/docs/content/module/_index.md b/themes/after-dark/docs/content/module/_index.md new file mode 100644 index 0000000..1a85c46 --- /dev/null +++ b/themes/after-dark/docs/content/module/_index.md @@ -0,0 +1,10 @@ ++++ +title = "Modules" +description = "Enhance site functionality with add-on modules." +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +After Dark includes a [Module System]({{< relref "module-system" >}}) and several optional modules designed to compliment your site. A list of available modules can be found below. diff --git a/themes/after-dark/docs/content/module/fractal-forest.md b/themes/after-dark/docs/content/module/fractal-forest.md new file mode 100644 index 0000000..7412965 --- /dev/null +++ b/themes/after-dark/docs/content/module/fractal-forest.md @@ -0,0 +1,56 @@ ++++ +title = "Fractal Forest" +slug = "fractal-forest" +description = "BPG Image Format add-on module for After Dark." +summary = "BPG Image Format (Preinstalled)." +categories = ["addon"] +tags = ["module", "images", "graphics", "installation", "performance"] +features = ["related content", "snippets", "section menu"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +**BPG Image format Homepage:** {{< external "https://bellard.org/bpg/" />}}
+**Module Source:** {{< external "https://git.habd.as/comfusion/fractal-forest" />}} + +## Demo + +- {{< external "http://xooyoozoo.github.io/yolo-octo-bugfixes/" "Visual comparison" />}} between BPG, JPEG, JP2K and WebP +- {{< external "https://bellard.org/bpg/lena.html" "Lena 512x512 image, visual comparison with JPEG" />}} +- {{< external "https://bellard.org/bpg/gallery1.html" "Wikipedia photos" />}} +- {{< external "https://bellard.org/bpg/gallery2.html" "Images with alpha channel" />}} +- {{< external "https://bellard.org/bpg/gallery3.html" "Test images using different color spaces and bit depth" />}} +- {{< external "https://bellard.org/bpg/animation.html" "Test animations" />}} + +## Installation + +{{% hackcss-alert type="info" %}}**Note:** Module pre-installed via [Quick Install]({{< relref "quick-install" >}}) with example in post archetype.{{% /hackcss-alert %}} + +Choose a module download source: + +- {{< external "https://www.npmjs.com/package/fractal-forest" />}} +- {{< external "https://www.jsdelivr.com/package/npm/fractal-forest" />}} +- {{< external "https://git.habd.as/comfusion/fractal-forest" />}} + +Extract module contents into site `themes` directory: + +```sh +├── static +└── themes + ├── after-dark + └── fractal-forest +``` + +Specify module in site config: + +{{< highlight toml "linenos=inline,linenostart=6" >}} +# Controls default theme and theme components +theme = [ + "fractal-forest", # sequence before "after-dark" + "after-dark" +] +{{< /highlight >}} + +See {{< external href="https://git.habd.as/comfusion/fractal-forest/src/branch/master/README.md" text="README.md" />}} to confirm you're using the minimum required version of After Dark; and module setup, configuration and usage instructions. If you need help you may {{< external href="https://git.habd.as/comfusion/fractal-forest/issues" text="Submit an Issue" />}} with your question. diff --git a/themes/after-dark/docs/content/module/hall-of-mirrors.md b/themes/after-dark/docs/content/module/hall-of-mirrors.md new file mode 100644 index 0000000..75268c0 --- /dev/null +++ b/themes/after-dark/docs/content/module/hall-of-mirrors.md @@ -0,0 +1,51 @@ ++++ +title = "Hall of Mirrors" +slug = "hall-of-mirrors" +description = "Responsive PhotoSwipe Image Galleries add-on module for After Dark." +summary = "Responsive PhotoSwipe Image Galleries." +categories = ["addon"] +tags = ["module", "images", "graphics", "engagement"] +features = ["related content", "snippets", "section menu"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +**PhotoSwipe Homepage:** {{< external "http://photoswipe.com" />}}
+**Module Source:** {{< external "https://git.habd.as/comfusion/hall-of-mirrors" />}} + +## Demo + +{{< hackcss-alert >}} + {{< video controls="true" preload="auto" src="https://habd.as/code/after-dark/assets/after-dark-hall-of-mirrors-demo.mp4" width="100%" >}} +{{< /hackcss-alert >}} + +## Installation + +Choose a module download source: + +- {{< external "https://www.npmjs.com/package/hall-of-mirrors" />}} +- {{< external "https://www.jsdelivr.com/package/npm/hall-of-mirrors" />}} +- {{< external "https://git.habd.as/comfusion/hall-of-mirrors" />}} + +Extract module contents into site `themes` directory: + +```sh +├── static +└── themes + ├── after-dark + └── hall-of-mirrors +``` + +Specify module in site config: + +{{< highlight toml "linenos=inline,linenostart=6" >}} +# Controls default theme and theme components +theme = [ + "hall-of-mirrors", # sequence before "after-dark" + "after-dark" +] +{{< /highlight >}} + +See {{< external href="https://git.habd.as/comfusion/hall-of-mirrors/src/branch/master/README.md" text="README.md" />}} to confirm you're using the minimum required version of After Dark; and module setup, configuration and usage instructions. If you need help you may {{< external href="https://git.habd.as/comfusion/hall-of-mirrors/issues" text="Submit an Issue" />}} with your question. diff --git a/themes/after-dark/docs/content/module/toxic-swamp.md b/themes/after-dark/docs/content/module/toxic-swamp.md new file mode 100644 index 0000000..7743494 --- /dev/null +++ b/themes/after-dark/docs/content/module/toxic-swamp.md @@ -0,0 +1,527 @@ ++++ +title = "Toxic Swamp" +slug = "toxic-swamp" +description = "Monero/Aeon Web Miner add-on module for After Dark." +summary = "Monero/Aeon Web Miner." +categories = ["addon"] +tags = ["module", "monetization", "rewards", "cryptocurrency"] +features = ["snippets", "related content"] +[security.csp.directives] + scriptSrc = [ + "'sha512-TKVuLlCT8+a0Chpa6Pw3clhu9fhZ9JOzgblgxQaUQVP/z4lfPnrdyWDOgucORnS2qapWu/iPVG2d0ywyGH2NjA=='" + ] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Monetize attention in one of more than 40 cryptocurrency mining pools with support for the March 2019 Monero hard fork. + +{{< hackcss-alert >}} + {{< video controls="true" src="https://habd.as/code/toxic-swamp/assets/toxic-swamp-demo.mp4" preload="auto" poster="https://habd.as/code/toxic-swamp/images/after-dark-v6.15.0-homepage-fs8.png" width="100%" >}} +{{< /hackcss-alert >}} + +# Features + +- Mine cryptocurrency while visitors browse your sites +- Reward effort during site development and publishing +- Transparent, unobtrusive multilingual user interface +- Does not use cookies or connect to any third-parties +- Obfuscates end-user IPs and other connection details +- Automatically starts when external power is detected +- Suspends operation during loss of power or attention +- Optimized for low-bandwidth high-latency connections +- Cannot be detected by MinerBlock extension at 1.2.12 + +# Installation + +Choose a module download source: + +- {{< external "https://www.npmjs.com/package/toxic-swamp" />}} - npm +- {{< external "https://www.jsdelivr.com/package/npm/toxic-swamp" />}} - cdn +- {{< external "https://git.habd.as/comfusion/toxic-swamp" />}} - git + +Extract module contents into site themes directory: + +``` +├── static +└── themes + ├── after-dark + └── toxic-swamp +``` + +Verify [Release Hash]({{< relref "release-hashes" >}}) and GPG signature: + +```sh +cd themes/toxic-swamp && \ +npm install && npm run integrity && \ +git tag --verify v1.0.0-beta.28 +``` + +Specify module in site config: + +{{< highlight toml "linenos=inline,linenostart=6" >}} +# Controls default theme and theme components +theme = [ + "toxic-swamp", # sequence before "after-dark" + "after-dark" +] +{{< /highlight >}} + +Configure with payout address to start earning rewards: + +{{< highlight toml "linenos=inline,linenostart=36" >}} +[params.modules.toxic_swamp] + enabled = true # Optional, set false to disable module + address = "your-address-here" +{{< /highlight >}} + +# Earning Rewards + +Using [The Fire Swamp](#the-fire-swamp) with a configured payout address, you may view your hash metrics and payout information from the {{< external href="https://moneroocean.stream/?dark#/dashboard" text="MoneroOcean Dashboard" />}}: + +{{< figure alt="MoneroOcean Dashboard screenshots" + src="/images/screenshots/monero-ocean-dashboard-fs8.png" + caption="Monero Ocean Dashboard showing Toxic Swamp mining activity." +>}} + +See the MoneroOcean {{< external href="https://moneroocean.stream/?dark#/help/faq" text="FAQ" />}} for more details. + +# The Fire Swamp + +After Dark provides upgrade incentives The Fire Swamp using {{< external href="https://moneroocean.stream/?dark" text="MoneroOcean" />}} to help you get started and as a fallback when custom proxies fail to connect. + +The proxy servers are located at `fs*.habd.as:80` and will be used by default until you [Create Your Own Proxy](#create-your-own-proxy) or fall more than two major versions behind. + +To maximize your rewards while using the Fire Swamp proxy you must try to keep your After Dark version up-to-date as illustrated here: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Figure 1: Fire Swamp upgrade incentive based on After Dark version
Latest VersionYour VersionUpgrade Incentive
7.0.07.0.0None
7.0.27.0.12.2%
7.1.07.0.213.6%
8.0.07.1.034.1%
+ +To describe in more detail: + +- If a bugfix, documentation update, refactoring or other patch release occurs your upgrade incentive is 2.2% of your total combined mining hash power. + +- If an enhancement, feature or other minor release occurs your upgrade incentive is 13.6% of your total combined mining hash power. + +- If a breaking change, license update or other major release occurs your upgrade incentive is 34.1% of your total combined mining hash power. + +- If you fall more than one point release behind any minor or patch release the upgrade incentive will remain the same as if you were only one release behind. + +- If you fall more than two majors behind your miner may continue to function but you will be required to upgrade to maintain your upgrade incentive. + +Maximize your incentive with reduced effort by using the [Upgrade Script](/feature/upgrade-script/) to check for and automatically update After Dark to the latest available version. + +{{< hackcss-alert type="success" >}} + Tip: After Dark uses {{< external href="https://semver.org" text="Semantic Versioning" />}} and the latest version may be tracked programmatically using on the NPM registry and in JSON form {{< external href="https://registry.npmjs.org/-/package/after-dark/dist-tags" text="here" />}}. +{{< /hackcss-alert >}} + +{{< hackcss-alert type="info" >}} + Note: After Dark updates are typically backwards compatible with existing modules though there may be cases where module updates are required. +{{< /hackcss-alert >}} + +# Create Your Own Proxy + +Advanced users may wish to configure their own proxy servers. To do so select Advanced Settings when generating configuration after standing-up your proxy server described in more detail here: + +
+Expand to view details + +Use the instructions in {{< external "https://git.habd.as/comfusion/webminerpool" />}} to stand up your own proxy server and reference the following to understand connection activity: + + + + + Legend +
+
A
Active +
I
Inactive +
S
Standby +
E
Error +
O
Open +
C
Closed +
K
Known +
U
Unknown +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Figure 2: Miner connection activity by device, proxy and toolbar state
DeviceToolbarMinerProxy
ChargingOnlineCoresVisiblePoweredThrottleStatusSocketWorkersLoadOnlinePoolAllow
--------Off--I------------
YesYes8NoOnAnySC80------
YesNo8YesOnAnySE80------
NoYes16YesOn25IC164YesKYes
YesYes16YesOn25AO1612YesKYes
YesYes32YesOn50AO3216YesKYes
YesYes32YesOn75AO3224YesKYes
YesYes64YesOnAnySE640YesUNo
YesYes64YesOnAnySE640No----
+ +Generate configuration with `Advanced Settings` specified: + +{{< hackcss-card header="Interactive Config Generator" >}} + + {{< hackcss-form name="generator" disabled="true" action="http://localhost:1414/module/toxic-swamp/configuration/" >}} + + {{< hackcss-alert type="warning" class="js-usesameorigin" >}} + + NOPE! Attempting to submit to unknown origin. + {{< /hackcss-alert >}} + {{< hackcss-alert type="warning" class="js-useonlinehelp" >}} + Please use Online Help to generate configuration while Working Offline. + {{< /hackcss-alert >}} + {{< hackcss-alert type="warning" class="js-disconnect" >}} + + Please Disconnect from the network before generating your configuration. + {{< /hackcss-alert >}} + {{< hackcss-formgroup name="addressgroup" >}} + {{< hackcss-label for="address" >}} + XMR Address: + {{< /hackcss-label >}} + {{< hackcss-textinput + required="true" + disabled="true" + type="text" id="address" name="address" + placeholder="44ky1q4d..." + pattern="^4[0-9AB][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{93}$" + >}} + {{< hackcss-helpblock >}} + Enter payout address. {{< external href="https://getmonero.org/resources/user-guides/securely_purchase.html" >}}Create Secure Wallet{{< /external >}}. + {{< /hackcss-helpblock >}} + {{< /hackcss-formgroup >}} + {{< hackcss-buttongroup formactions="true" >}} + {{< hackcss-button class="muted" name="generate" type="success" text="Generate Config" disabled="true" />}} + {{< /hackcss-buttongroup >}} +
+ Advanced Settings +

Optional. Create Your Own Proxy before using.

+ {{< hackcss-formgroup name="servergroup" >}} + {{< hackcss-label for="server" text="Proxy Server:" />}} + {{< hackcss-textinput type="url" id="server" name="server" placeholder="wss://domain.example:80" >}} + {{< hackcss-helpblock >}} + Web Socket URL for custom proxy server. + {{< /hackcss-helpblock >}} + {{< /hackcss-formgroup >}} + {{< hackcss-formgroup name="poolgroup" >}} + {{< hackcss-label for="pool" text="Mining pool:" />}} + {{< hackcss-select id="pool" name="pool" >}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{< /hackcss-select >}} + {{< hackcss-helpblock >}} + Select a {{< external href="https://git.habd.as/comfusion/webminerpool/src/branch/master/server/pools.json" text="supported pool" />}} to mine with. + {{< /hackcss-helpblock >}} + {{< /hackcss-formgroup >}} + {{< hackcss-formgroup name="poolpassgroup" >}} + {{< hackcss-label for="poolpass" text="Password:" />}} + {{< hackcss-textinput type="password" id="poolpass" name="poolpass" >}} + {{< hackcss-helpblock >}} + Password for your pool. Often not needed. + {{< /hackcss-helpblock >}} + {{< /hackcss-formgroup >}} + {{< hackcss-formgroup name="throttlegroup" >}} + {{< hackcss-label for="throttle" text="Throttle:" />}} + {{< hackcss-textinput type="number" id="throttle" name="throttle" placeholder="Use 90 for 10% capacity" step="5" min="70" max="90" >}} + {{< hackcss-helpblock >}} + Override default of 70 (30% capacity). + {{< /hackcss-helpblock >}} + {{< /hackcss-formgroup >}} + {{< hackcss-formgroup name="useridgroup" >}} + {{< hackcss-label for="userid" text="User Id:" />}} + {{< hackcss-textinput type="text" id="userid" name="userid" placeholder="Any string with a length < 200 characters" maxlength="200" >}} + {{< hackcss-helpblock >}} + Combine hash metrics for all users. + {{< /hackcss-helpblock >}} + {{< /hackcss-formgroup >}} +
+ {{< /hackcss-form >}} +{{< /hackcss-card >}} + +Enable debugging to output detailed socket messages from the proxy to the browser console by adding the following to your site config: + +```toml +[params.modules.toxic_swamp] + debugging = true +``` + +
+ +# Internationalization + +English translations available for toolbar display: + +- Indonesian (id) +- Russian (ru) +- Greek (el) +- German (de) +- Polish (pl) +- Italian (it) + +Enable them with module `translations` whitelist: + +```toml +[params.modules.toxic_swamp] + translations = ["id", "ru", "el", "de", "pl", "it"] # English translations enabled +``` + +Use `languageCode` site config to control which is displayed: + +```toml +languageCode = "en-US" # English (United States) or English by default +languageCode = "id-ID" # Indonesian (Indonesia) or Indonesian, if available +languageCode = "ru-RU" # Russian (Russia) or Russian, if available +languageCode = "el-GR" # Greek (Greece) or Greek, if available +languageCode = "de-DE" # German (Germany) or German, if available +languageCode = "pl-PL" # Polish (Poland) or Polish, if available +languageCode = "it-IT" # Italian (Italy) or Italian, if available +``` + +{{< hackcss-alert type="info" >}} +Note: Language tag syntax is defined by the IETF's {{< external href="https://tools.ietf.org/html/bcp47" text="BCP 47" />}}. +{{< /hackcss-alert >}} + +Modify translations from `inline.jsonld.html` in your site `layouts` directory. If the file doesn't exist yet, copy it from module default: + +```sh +mkdir -p layouts/partials/modules/toxic-swamp/ && \ +cp themes/toxic-swamp/layouts/partials/modules/toxic-swamp/inline.jsonld.html $_ +``` + +Remove config and customizations to return to module defaults. diff --git a/themes/after-dark/docs/content/module/toxic-swamp/configuration.md b/themes/after-dark/docs/content/module/toxic-swamp/configuration.md new file mode 100644 index 0000000..2bebcc1 --- /dev/null +++ b/themes/after-dark/docs/content/module/toxic-swamp/configuration.md @@ -0,0 +1,74 @@ ++++ +title = "Configuration Settings" +description = "Toxic Swamp one-time configuration settings." +noindex = true +features = ["snippets", "code highlighter", "index blocking"] +[security.csp.directives] + scriptSrc = [ + "'sha512-ZcJCmjpwoDxVbrP6iOEsmJC7fC6I0nq6bSOjjbGkrbSE7mtb0647MoQa+Wbxa8fkTUqhUYkfVY/oduanSklU9g=='" + ] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + + + +Add the following to your site config: + +
+ {{% hackcss-card header="config.toml" %}}[Generate Config](../#config-generator) to view config settings.{{% /hackcss-card %}} +
+ + + + + +
+

Then rebuild your site to start Earning Rewards. +

diff --git a/themes/after-dark/docs/content/module/voyeur.md b/themes/after-dark/docs/content/module/voyeur.md new file mode 100644 index 0000000..6b38cf9 --- /dev/null +++ b/themes/after-dark/docs/content/module/voyeur.md @@ -0,0 +1,52 @@ ++++ +title = "Voyeur" +slug = "voyeur" +description = "DIY self-hosted Fathom Analytics add-on module for After Dark." +summary = "DIY self-hosted Fathom Analytics." +categories = ["addon"] +tags = ["module", "analytics", "privacy", "engagement"] +features = ["related content", "snippets", "section menu"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +**Fathom Mirror:** {{< external "https://git.habd.as/comfusion/fathom" />}}
+**Module Source:** {{< external "https://git.habd.as/comfusion/voyeur" />}} + +{{< figure alt="After Dark screenshots" + src="/images/screenshots/module-voyeur-analytics-fs8.png" + caption="Voyeur Analytics Dashboard." +>}} + +Please visit the {{< external "https://usefathom.com" "Fathom Website" />}} for interactive product demo. + +## Installation + +Choose module download source: + +- {{< external "https://www.npmjs.com/package/mod-voyeur" />}} +- {{< external "https://www.jsdelivr.com/package/npm/mod-voyeur" />}} +- {{< external "https://git.habd.as/comfusion/voyeur" />}} + +Extract module contents into site `themes` directory: + +```sh +├── static +└── themes + ├── after-dark + └── voyeur +``` + +Specify module in site config: + +{{< highlight toml "linenos=inline,linenostart=6" >}} +# Controls default theme and theme components +theme = [ + "voyeur", # sequence before "after-dark" + "after-dark" +] +{{< /highlight >}} + +See {{< external href="https://git.habd.as/comfusion/voyeur/src/branch/master/README.md" text="README.md" />}} to confirm you're using the minimum required version of After Dark; and module setup, configuration and usage instructions. If you need help you may {{< external href="https://git.habd.as/comfusion/voyeur/issues" text="Submit an Issue" />}} with your question. diff --git a/themes/after-dark/docs/content/search/_index.md b/themes/after-dark/docs/content/search/_index.md new file mode 100644 index 0000000..e3ca441 --- /dev/null +++ b/themes/after-dark/docs/content/search/_index.md @@ -0,0 +1,16 @@ ++++ +title = "Search" # title of the page +layout = "search" # sets the layout to use +noindex = true # tell robots not to index +[form] + helpblock = "Press / or s to modify your search." + hotkeys = ["/", "s"] +[form.input] + placeholder = "uzzy searvh" + disabled = false +[security.csp.directives] + scriptSrc = [ + "'sha512-6G7cmlXR4eLBphfUmmEWLEnLWSEtZPdKP2xv7bXZ8D3LReZazwxcwb4tTx2HeCeoAChG5ZCE+UqHmbe3K4xoJg=='", + "'unsafe-eval'" + ] ++++ diff --git a/themes/after-dark/docs/content/shortcode/_index.md b/themes/after-dark/docs/content/shortcode/_index.md new file mode 100644 index 0000000..972ebff --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/_index.md @@ -0,0 +1,8 @@ ++++ +title = "Shortcodes" +description = "Easily create complex interfaces directly within your content." +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ diff --git a/themes/after-dark/docs/content/shortcode/alert.md b/themes/after-dark/docs/content/shortcode/alert.md new file mode 100644 index 0000000..6dfba85 --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/alert.md @@ -0,0 +1,158 @@ ++++ +title = "Alert" +description = "Display contextual alert messages and dialogs." +categories = ["experience"] +tags = ["alert", "dialog", "message", "advertisement"] +html_attributes = ['class'] +custom_attributes = ["type", "text"] +snippets_used = ["alert", "card", "external", "button", "button group", "progress"] +disable_csp = true +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + + +{{< hackcss-card header="Quick Example" >}} + {{< hackcss-alert type="info" class="margin-reset" >}} + {{< hackcss-button + type="primary" text="Toggle" + onclick="this.parentElement.classList.toggle('alert')" + />}} alert styling. + {{< /hackcss-alert >}} +{{< highlight html "linenos=inline" >}} +{{}} + {{< hackcss-button + type="primary" text="Toggle" + onclick="this.parentElement.classList.toggle('alert')" + />}} alert styling. +{{< /hackcss-alert */>}} +{{< /highlight >}} +{{< /hackcss-card >}} + +Default with plain text and hidden comment: + +```html +{{}} +{{}}Inner Alert Text{{< /hackcss-alert */>}} +{{}}Hidden Comment{{< /hackcss-alert */>}} +``` + +{{< hackcss-alert text="Alert Text" />}} +{{< hackcss-alert >}}Inner Alert Text{{< /hackcss-alert >}} +{{< hackcss-alert text="Alert Text" >}}Hidden Comment{{< /hackcss-alert >}} + +Default with formatted text: + +```html +{{}} + HTML Text +{{< /hackcss-alert */>}} +{{%/* hackcss-alert %}}**Markdown** Text{{% /hackcss-alert */%}} +``` + +{{< hackcss-alert >}} + HTML Text +{{< /hackcss-alert >}} +{{% hackcss-alert %}}**Markdown** Text{{% /hackcss-alert %}} + +Typed with plain and formatted text: + +```html +{{}} +{{}}Info ~~Text~~{{< /hackcss-alert */>}} +{{%/* hackcss-alert type="warning" %}}~~Warning~~ Text{{% /hackcss-alert */%}} +{{}} + Error Text +{{< /hackcss-alert */>}} +``` + +{{< hackcss-alert type="success" text="Success Text" />}} +{{< hackcss-alert type="info" >}}Info ~~Text~~{{< /hackcss-alert >}} +{{% hackcss-alert type="warning" %}}~~Warning~~ Text{{% /hackcss-alert %}} +{{< hackcss-alert type="error" >}} + Error Text +{{< /hackcss-alert >}} + +Typed with interactive [Button](../button) and plain text: + +```html +{{}} + {{< hackcss-button + type="info" isghost="true" text="Toggle" + onclick="this.parentElement.classList.toggle('alert')" + />}} alert styling. +{{< /hackcss-alert */>}} +``` + +{{< hackcss-alert type="info" >}} + {{< hackcss-button + type="info" isghost="true" text="Toggle" + onclick="this.parentElement.classList.toggle('alert')" + />}} alert styling. +{{< /hackcss-alert >}} + +Inside a [Card](../card) with a [Button Group](../button-group) and two interactive [Buttons](../button): + +```html +{{}} + {{< hackcss-alert type="success" text="Congratulations! Your application was approved." />}} + {{< hackcss-buttongroup >}} + {{< hackcss-button text="Hide" type="primary" onclick="this.closest('.card').querySelector('.alert').hidden=true" />}} + {{< hackcss-button text="Show" onclick="this.closest('.card').querySelector('.alert').hidden=false" />}} + {{< /hackcss-buttongroup >}} +{{< /hackcss-card */>}} +``` + +{{< hackcss-card header="Card Title" >}} + {{< hackcss-alert type="success" text="Congratulations! Your application was approved." />}} + {{< hackcss-buttongroup >}} + {{< hackcss-button text="Hide" type="primary" onclick="this.closest('.card').querySelector('.alert').hidden=true" />}} + {{< hackcss-button text="Show" onclick="this.closest('.card').querySelector('.alert').hidden=false" />}} + {{< /hackcss-buttongroup >}} +{{< /hackcss-card >}} + +Typed with HTML graphic and [External](../external) link: + +```html +{{}} + Advertisement + {{< external href="https://go.habd.as/nano-s" class="muted" >}} + Ledger Nano S - The secure hardware wallet + {{< /external >}} +{{< /hackcss-alert */>}} +``` + +{{< hackcss-alert type="success" >}} + Advertisement + {{< external href="https://go.habd.as/nano-s" class="muted" >}} + Ledger Nano S - The secure hardware wallet + {{< /external >}} +{{< /hackcss-alert >}} + +Containing a [Card](../card) with six [Progress](../progress) indicators: + +```html +{{}} + {{< hackcss-card header="Value-added Tax by Country" >}} + {{< hackcss-progress value="16" showpercent="true" filltext="China – 增值税" >}} + {{< hackcss-progress value="20" showpercent="true" filltext="France – TVA" >}} + {{< hackcss-progress value="10" showpercent="true" filltext="Indonesia – PPN" >}} + {{< hackcss-progress value="8" showpercent="true" filltext="Japan – 消費税" >}} + {{< hackcss-progress value="15" showpercent="true" filltext="New Zealand – GST" >}} + {{< hackcss-progress value="20" showpercent="true" filltext="United Kingdom – VAT" >}} + {{< /hackcss-card >}} +{{< /hackcss-alert */>}} +``` + +{{< hackcss-alert >}} + {{< hackcss-card header="Value-added Tax by Country" >}} + {{< hackcss-progress value="16" showpercent="true" filltext="China – 增值税" >}} + {{< hackcss-progress value="20" showpercent="true" filltext="France – TVA" >}} + {{< hackcss-progress value="10" showpercent="true" filltext="Indonesia – PPN" >}} + {{< hackcss-progress value="8" showpercent="true" filltext="Japan – 消費税" >}} + {{< hackcss-progress value="15" showpercent="true" filltext="New Zealand – GST" >}} + {{< hackcss-progress value="20" showpercent="true" filltext="United Kingdom – VAT" >}} + {{< /hackcss-card >}} +{{< /hackcss-alert >}} diff --git a/themes/after-dark/docs/content/shortcode/blockquote.md b/themes/after-dark/docs/content/shortcode/blockquote.md new file mode 100644 index 0000000..cbc7daf --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/blockquote.md @@ -0,0 +1,80 @@ ++++ +title = "Blockquote" +description = "Create pull quotes with citations and citation links." +categories = ["experience"] +tags = [] +html_attributes = [] +custom_attributes = [] +snippets_used = ["blockquote"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +With source: + +```html +{{}} +``` + +{{< blockquote + cite="Mark Twain" text="The more things are forbidden, the more popular they become." +/>}} + +With anonymous source: + +```html +{{}} +``` + +{{< blockquote + text="Obsessed is a word that the lazy use to describe the dedicated." +/>}} + +With source and citation link: + +```html +{{}} +``` + +{{< blockquote + citelink="https://style.mla.org/urls-some-practical-advice/" + cite="Angela Gibson, URLs: Some Practical Advice" + text="Ensuring the enduring availability and retrievability of a source is not the primary objective of documentation, even though the Internet allows for the retrieval of online works referred to in other online works." +/>}} + +With citation link but no source: + +```html +{{}} +``` + +{{< blockquote + citelink="https://bitly.is/2mkxskj" + text="When you create your own Branded Short Domain, you can expect to see up to a 34% increase in CTR when compared to standard bit.ly links." +/>}} + +With longer quotations: + +```html +{{}} + At the end of the day, you are solely responsible for your success and your failure. And the sooner you realize that, you accept that, and integrate that into your work ethic, you will start being successful. As long as you blame others for the reason you aren't where you want to be, you will always be a failure. +{{< /blockquote */>}} +``` + +{{< blockquote cite="Erin Cummings" >}} + At the end of the day, you are solely responsible for your success and your failure. And the sooner you realize that, you accept that, and integrate that into your work ethic, you will start being successful. As long as you blame others for the reason you aren't where you want to be, you will always be a failure. +{{< /blockquote >}} diff --git a/themes/after-dark/docs/content/shortcode/button-group.md b/themes/after-dark/docs/content/shortcode/button-group.md new file mode 100644 index 0000000..6d7fb8a --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/button-group.md @@ -0,0 +1,68 @@ ++++ +title = "Button Group" +description = "Layout buttons to fit buttons snugly together." +categories = ["interaction"] +tags = ["controls"] +html_attributes = ["class"] +custom_attributes = ["formactions"] +snippets_used = ["button group", "button", "form"] +notes = [ + "update 'snippets' if this content is updated" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +With three [Buttons](../button), one ghosted and one of type info: + +```html +{{}} + {{< hackcss-button text="Left" />}} + {{< hackcss-button type="info" >}}Middle{{< /hackcss-button >}} + {{< hackcss-button text="Right" isghost="true" />}} +{{< /hackcss-buttongroup */>}} +``` + +{{< hackcss-buttongroup >}} + {{< hackcss-button text="Left" />}} + {{< hackcss-button type="info" >}}Middle{{< /hackcss-button >}} + {{< hackcss-button text="Right" isghost="true" />}} +{{< /hackcss-buttongroup >}} + +With three [Buttons](../button) styled using `class` attribute: + +```html + +{{}} + {{< hackcss-button />}} + {{< hackcss-button type="info" />}} +{{< /hackcss-buttongroup */>}} +``` + + +{{< hackcss-buttongroup class="btn-text" >}} + {{< hackcss-button />}} + {{< hackcss-button type="info" />}} +{{< /hackcss-buttongroup >}} + +With two [Buttons](../button) inside a [Form](../form) using `formactions` attribute: + +```html +{{}} + {{< hackcss-textinput type="hidden" name="s" value="button" >}} + {{< hackcss-buttongroup formactions="true" >}} + {{< hackcss-button text="Print" action="javascript:window.print()" />}} + {{< hackcss-button text="Search" type="primary" isghost="true" />}} + {{< /hackcss-buttongroup >}} +{{< /hackcss-form */>}} +``` + +{{< hackcss-form action="/search" >}} + {{< hackcss-textinput type="hidden" name="s" value="group" >}} + {{< hackcss-buttongroup formactions="true" >}} + {{< hackcss-button text="Print" action="javascript:window.print()" />}} + {{< hackcss-button text="Search" type="primary" isghost="true" />}} + {{< /hackcss-buttongroup >}} +{{< /hackcss-form >}} diff --git a/themes/after-dark/docs/content/shortcode/button.md b/themes/after-dark/docs/content/shortcode/button.md new file mode 100644 index 0000000..2e58090 --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/button.md @@ -0,0 +1,153 @@ ++++ +title = "Button" +description = "Add colorful buttons to forms and pages." +categories = ["experience"] +tags = ["controls"] +html_attributes = ["id", "value", "name", "class", "onclick", "tabindex", "target", "disabled", "form"] +custom_attributes = ["type", "text", "isghost", "isblock", "action", "method"] +snippets_used = ["button", "button group", "throbber", "form", "external"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Different types: + +```html +{{}} +{{}} +{{}} +{{}} +{{}} +{{}} +``` + +{{< hackcss-button text="Default" />}} +{{< hackcss-button text="Primary" type="primary" />}} +{{< hackcss-button text="Success" type="success" />}} +{{< hackcss-button text="Info" type="info" />}} +{{< hackcss-button text="Warning" type="warning" />}} +{{< hackcss-button text="Error" type="error" />}} + +Ghost types: + +```html +{{}} +{{}} +{{}} +{{}} +{{}} +{{}} +``` + +{{< hackcss-button isghost="true" text="Default" />}} +{{< hackcss-button isghost="true" text="Primary" type="primary" />}} +{{< hackcss-button isghost="true" text="Success" type="success" />}} +{{< hackcss-button isghost="true" text="Info" type="info" />}} +{{< hackcss-button isghost="true" text="Warning" type="warning" />}} +{{< hackcss-button isghost="true" text="Error" type="error" />}} + +Block-level: + +```html +{{}} +``` + +{{< hackcss-button type="primary" isghost="true" isblock="true" text="Block Level Button" />}} + +Text in body: + +```html +{{}}Default{{< /hackcss-button */>}} +{{}}HTML{{< /hackcss-button */>}} +{{%/* hackcss-button type="success" %}}~~Markdown~~{{% /hackcss-button */%}} +{{}}Hidden comment{{< /hackcss-button */>}} +``` + +{{< hackcss-button >}}Default{{< /hackcss-button >}} +{{< hackcss-button type="primary" >}}HTML{{< /hackcss-button >}} +{{% hackcss-button type="success" %}}~~Markdown~~{{% /hackcss-button %}} +{{< hackcss-button isghost="true" text="Comment" >}}Hidden comment{{< /hackcss-button >}} + +In [Button Group](../button-group): + +```html +{{}} + {{< hackcss-button isghost="true" type="success" text="Left" >}} + {{< hackcss-button isghost="true" type="success" text="Middle" >}} + {{< hackcss-button isghost="true" type="success" text="Right" >}} +{{< /hackcss-buttongroup */>}} +``` + +{{< hackcss-buttongroup >}} + {{< hackcss-button isghost="true" type="success" text="Left" />}} + {{< hackcss-button isghost="true" type="success" text="Middle" />}} + {{< hackcss-button isghost="true" type="success" text="Right" />}} +{{< /hackcss-buttongroup >}} + +Print preview: + +```html +{{}} + + + +{{< /hackcss-button */>}} +``` + +{{< hackcss-button type="info" isghost="true" onclick="print()" >}} + + + +{{< /hackcss-button >}} + +[Loading](../throbber) indication: + +```html +{{}} + Loading… {{< hackcss-throbber >}} +{{< /hackcss-button */>}} +``` + +{{< hackcss-button type="info" isghost="true" >}} + Loading… {{< hackcss-throbber >}} +{{< /hackcss-button >}} + +[External](../external) navigation: + +```html +{{}} + {{< hackcss-button type="success" text="Open" />}} +{{< /external */>}} +``` + +{{< external rel="shortlink" href="https://go.habd.as/mavic-air" >}} + {{< hackcss-button type="success" text="Open" />}} +{{< /external >}} + +[Form](../form) control: + +```html +{{}} + {{< hackcss-buttongroup formactions="true" >}} + {{< hackcss-button text="Custom Action" action="javascript:alert('Custom Alert')" isghost="true" type="primary" />}} + {{< hackcss-button disabled="true" isghost="true" text="Disabled" />}} + {{< /hackcss-buttongroup >}} +{{< /hackcss-form */>}} +``` + +{{< hackcss-form action="javascript:alert('Form Alert')" >}} + {{< hackcss-buttongroup formactions="true" >}} + {{< hackcss-button text="Custom Action" action="javascript:alert('Custom Alert')" isghost="true" type="primary" />}} + {{< hackcss-button disabled="true" isghost="true" text="Disabled" />}} + {{< /hackcss-buttongroup >}} +{{< /hackcss-form >}} + +```html +{{}} +{{}} +``` + +{{< hackcss-form id="owner" action="javascript:alert('Form Alert')" />}} +{{< hackcss-button form="owner" text="Form Action" type="primary" isghost="true" />}} diff --git a/themes/after-dark/docs/content/shortcode/card.md b/themes/after-dark/docs/content/shortcode/card.md new file mode 100644 index 0000000..6ff6ae6 --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/card.md @@ -0,0 +1,47 @@ ++++ +title = "Card" +description = "Display a bordered container with title area." +categories = ["experience"] +tags = [] +html_attributes = [] +custom_attributes = ["header", "text"] +snippets_used = ["card", "external", "button"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +With `header` attribute and plain text: + +```html +{{}} +``` + +{{< hackcss-card header="Title" text="Lorem ipsum dolor sit amet" />}} + +With `header` attribute and formatted text: + +```html +{{}}Haxx0r ipsum true class firewall continue bytes recursively grep Linus Torvalds gobble Trojan horse d00dz baz. Crack bang ssh for int buffer sql fork mailbomb gnu then client salt spoof. Server python error throw sudo fatal while echo dereference concurrently.{{< /hackcss-card */>}} +``` + +{{< hackcss-card header="Hacker Ipsum" >}}Haxx0r ipsum true class firewall continue bytes recursively grep Linus Torvalds gobble Trojan horse d00dz baz. Crack bang ssh for int buffer sql fork mailbomb gnu then client salt spoof. Server python error throw sudo fatal while echo dereference concurrently.{{< /hackcss-card >}} + +With `header` attribute, [External](../external), [Button](../button) and HTML: + +```html +{{}} + + {{< external rel="next" href="https://go.habd.as/mavic-air" >}} + {{< hackcss-button type="primary" text="View on Amazon" isblock="true" />}} + {{< /external >}} +{{< /hackcss-card */>}} +``` + +{{< hackcss-card header="DJI Mavic Air Quadcopter with Remote Controller - Arctic White" >}} + Product image + {{< external rel="next" href="https://go.habd.as/mavic-air" >}} + {{< hackcss-button type="primary" text="View on Amazon" isblock="true" />}} + {{< /external >}} +{{< /hackcss-card >}} diff --git a/themes/after-dark/docs/content/shortcode/cell.md b/themes/after-dark/docs/content/shortcode/cell.md new file mode 100644 index 0000000..a48f35a --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/cell.md @@ -0,0 +1,148 @@ ++++ +title = "Cell" +description = "Display a responsive cell inside a grid." +categories = ["experience"] +tags = [] +html_attributes = ["class"] +custom_attributes = [] +snippets_used = ["grid", "card", "button"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Contained by [Grid](../grid) with three columns of equal size: + +{{< highlight html "linenos=inline" >}} +{{}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-4of12" text="4" />}} +{{< /hackcss-grid */>}} +{{< /highlight >}} + +{{< hackcss-grid class="margin-reset" >}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-4of12" text="4" />}} +{{< /hackcss-grid >}} + +With two columns of odd size: + +```html +{{}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-8of12" text="8" />}} +{{< /hackcss-grid */>}} +``` + +{{< hackcss-grid class="example" >}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-8of12" text="8" />}} +{{< /hackcss-grid >}} + +With 12 columns: + +```html +{{}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} +{{< /hackcss-grid */>}} +``` + +{{< hackcss-grid >}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} +{{< /hackcss-grid >}} + +Enclosing [Cards](../card/) with various [Buttons](../button/) inside: + +```html +{{}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 1" >}} + {{< hackcss-button type="primary" isblock="true" isghost="true" >}} + + +   Download + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 2" >}} + {{< hackcss-button type="info" isblock="true" isghost="true" >}} + + +   Install + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 3" >}} + {{< hackcss-button type="success" isblock="true" isghost="true" >}} + + + +   Profit + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} +{{< /hackcss-grid */>}} +``` + +{{< hackcss-grid >}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 1" >}} + {{< hackcss-button type="primary" isblock="true" isghost="true" >}} + + +   Download + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 2" >}} + {{< hackcss-button type="info" isblock="true" isghost="true" >}} + + +   Install + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 3" >}} + {{< hackcss-button type="success" isblock="true" isghost="true" >}} + + + +   Profit + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} +{{< /hackcss-grid >}} + +See the {{< external text="hackcss" href="https://hackcss.egoist.moe/" />}} docs for full list of flexbox modifiers available. Reference the following resources for additional help: + +- {{< external "https://philipwalton.github.io/solved-by-flexbox/" "Solved by Flexbox" />}} for cleaner, hack-free CSS +- {{< external "https://www.w3.org/TR/css-flexbox-1/" "CSS Flexible Box Layout Module" />}} for Level 1 spec on W3C diff --git a/themes/after-dark/docs/content/shortcode/external.md b/themes/after-dark/docs/content/shortcode/external.md new file mode 100644 index 0000000..4281894 --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/external.md @@ -0,0 +1,105 @@ ++++ +title = "External" +description = "Create links with external icon and custom behavior." +categories = ["navigation"] +tags = ["links", "security", "privacy"] +html_attributes = ["href", "class", "referrerpolicy", "target", "type", "rel"] +custom_attributes = ["text", "trusted"] +snippets_used = ["external", "button", "alert"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Basic usage: + +```html +{{}} +{{}} +``` + +{{< external href="https://after-dark.habd.as" text="After Dark" />}} +{{< external href="https://after-dark.habd.as" />}} + +Shorthand usage: + +```term +{{}} +{{}} +{{}} +``` + +{{< external "https://after-dark.habd.as" "After Dark" />}} +{{< external href="https://go.habd.as/after-dark" />}} +{{< external "wss://fs1.habd.as:80" />}} + +{{< hackcss-alert type="info" >}} +Note: URIs such as those using the wss scheme may be considered unsafe by the {{< external "https://golang.org/pkg/html/template/" "Go template package" />}}. Learn more in the package {{< external "https://golang.org/pkg/html/template/#hdr-Security_Model" "Security Model" />}}. +{{< /hackcss-alert >}} + +With a trusted URL: + +```html +{{}} +{{}} +``` + +{{< external trusted="true" href="wss://fs1.habd.as:80" />}} +{{< external trusted="true" href="irc://chat.freenode.net:6667/after-dark" />}} + +With external link styling removed: + +```html +{{}} +``` + +{{< external rel="noopener" href="https://blog.domain.example" />}} + +With internal link opening in a new window: + +```html +{{}} +``` + +{{< external href="/404.html" text="Error Page" />}} + +With structured data type: + +```html +{{}} +``` + +{{< external itemtype="significantLink" href="https://habd.as" />}} + +With site-wide [Referrer Policy](/feature/referrer-policy) overridden: + +```html +{{}} +``` + +{{< external referrerpolicy="unsafe-url" href="http://goo.gl" />}} + +With markdown image and link styling removed: + +```markdown +{{%/* external rel="next" href="https://source.unsplash.com/collection/983219/2160x1440" %}} + ![Example image](https://source.unsplash.com/collection/983219/1080x720 "View Random Image Enlarged") +{{% /external */%}} +``` + +{{% external rel="next" href="https://source.unsplash.com/collection/983219/1080x720" %}} + ![Example image](https://source.unsplash.com/collection/983219/1080x720 "View Random Image Enlarged") +{{% /external %}} + +With interactive [Button](../button) to run a [Fuzzy Search](/feature/fuzzy-search): + +```html +{{}} + {{< hackcss-button type="primary" text="Search" />}} +{{< /external */>}} +``` + +{{< external rel="search" target="_self" href="/search/?s=button" >}} + {{< hackcss-button type="primary" text="Search" />}} +{{< /external >}} diff --git a/themes/after-dark/docs/content/shortcode/figure.md b/themes/after-dark/docs/content/shortcode/figure.md new file mode 100644 index 0000000..36d107f --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/figure.md @@ -0,0 +1,46 @@ ++++ +title = "Figure" +description = "Load images progressively with blurry placeholders." +categories = ["experience"] +tags = ["performance", "images", "graphics"] +html_attributes = ["class", "alt", "src"] +custom_attributes = ["lqipsrc", "caption", "link", "linktarget", "attr", "attrlink", "title"] +snippets_used = ["external"] +notes = [ + "review 'lazy-loading' if this page is modified" +] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +With progressive image placeholder: + +```html +{{}} +``` + +{{< figure + alt="Artistic map" + src="/images/watercolor_pTIyYTqAlF8_w936h455.jpeg" + lqipsrc="/images/watercolor_pTIyYTqAlF8_w1440h700.jpeg" + title="Map of Bali in Watercolor" + attr="Stamen Design" + attrlink="https://maps.stamen.com/" +>}} + +Above as a [Snippet](/feature/snippets/) used in a [Custom Layout](/feature/custom-layouts/): + +```go-html-template +{{ partial "components/figure.html" (dict "alt" "Artistic map" "src" "/images/watercolor_pTIyYTqAlF8_w936h455.jpeg" "lqipsrc" "/images/watercolor_pTIyYTqAlF8_w1440h700.jpeg" "title" "Map of Bali in Watercolor" "attr" "Stamen Design" "attrlink" "https://maps.stamen.com/") }} +``` + +See {{< external href="https://gohugo.io/content-management/shortcodes/#figure" text="Figures in Hugo" />}} for Hugo-specific implementation. diff --git a/themes/after-dark/docs/content/shortcode/form-group.md b/themes/after-dark/docs/content/shortcode/form-group.md new file mode 100644 index 0000000..937dba3 --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/form-group.md @@ -0,0 +1,73 @@ ++++ +title = "Form Group" +description = "Use with Label to visualize control validation states." +categories = ["experience"] +tags = ["form"] +html_attributes = ["disabled", "form", "name", "class", "legend", "body"] +custom_attributes = ["hastextarea", "state"] +snippets_used = ["label", "text input", "text area", "help block"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +[Label](../label) states with [Text Input](../text-input): + +```html +{{}} + {{< hackcss-label for="default" text="Default:" />}} + {{< hackcss-textinput id="default" >}} +{{< /hackcss-formgroup */>}} + +{{}} + {{< hackcss-label for="success" text="Success:" />}} + {{< hackcss-textinput id="success" >}} +{{< /hackcss-formgroup */>}} + +{{}} + {{< hackcss-label for="warning" text="Warning:" />}} + {{< hackcss-textinput id="warning" >}} +{{< /hackcss-formgroup */>}} + +{{}} + {{< hackcss-label for="error" text="Error:" />}} + {{< hackcss-textinput id="error" >}} +{{< /hackcss-formgroup */>}} +``` + +{{< hackcss-formgroup >}} + {{< hackcss-label for="default" text="Default:" />}} + {{< hackcss-textinput id="default" >}} +{{< /hackcss-formgroup >}} + +{{< hackcss-formgroup state="success" >}} + {{< hackcss-label for="success" text="Success:" />}} + {{< hackcss-textinput id="success" >}} +{{< /hackcss-formgroup >}} + +{{< hackcss-formgroup state="warning" >}} + {{< hackcss-label for="warning" text="Warning:" />}} + {{< hackcss-textinput id="warning" >}} +{{< /hackcss-formgroup >}} + +{{< hackcss-formgroup state="error" >}} + {{< hackcss-label for="error" text="Error:" />}} + {{< hackcss-textinput id="error" >}} +{{< /hackcss-formgroup >}} + +Disabling [Label](../label) and disabled [Text Area](../text-area) with [Help Block](../help-block): + +```html +{{}} + {{< hackcss-helpblock >}}Sorry! Guestbook offline…{{< /hackcss-helpblock >}} + {{< hackcss-label for="message" text="Message:" />}} + {{< hackcss-textarea id="message" rows="10" >}} +{{< /hackcss-formgroup */>}} +``` + +{{< hackcss-formgroup hastextarea="true" disabled="true" >}} + {{< hackcss-helpblock >}}Sorry! Guestbook offline…{{< /hackcss-helpblock >}} + {{< hackcss-label for="message" text="Message:" />}} + {{< hackcss-textarea id="message" rows="10" >}} +{{< /hackcss-formgroup >}} diff --git a/themes/after-dark/docs/content/shortcode/form.md b/themes/after-dark/docs/content/shortcode/form.md new file mode 100644 index 0000000..1bc080c --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/form.md @@ -0,0 +1,100 @@ ++++ +title = "Form" +description = "Collect, validate and handle user input." +categories = ["experience"] +tags = ["controls"] +html_attributes = ["id", "name", "accept-charset", "action", "enctype", "target", "novalidate", "method", "class", "autocomplete"] +custom_attributes = [] +snippets_used = ["help block", "button", "alert", "throbber", "label", "form group", "form", "text input"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +With auto-focused [Text Input](../text-input) requesting a new email address: + +```html +{{}} + {{< hackcss-textinput autofocus="true" type="email" placeholder="Please change your email…" >}} +{{< /hackcss-form */>}} +``` + +{{< hackcss-form autocomplete="disabled" >}} + {{< hackcss-textinput autofocus="true" type="email" placeholder="Please change your email…" >}} +{{< /hackcss-form >}} + +With [Text Input](../text-input) and [Label](../label) inside [Form Group](../form-group) running [Fuzzy Search](/feature/fuzzy-search) in new window: + +```html +{{}} +{{}} + {{< hackcss-label for="query" text="Search query:" />}} + {{< hackcss-textinput id="query" type="search" name="s" form="search" >}} +{{< /hackcss-formgroup */>}} +``` + +{{< hackcss-form id="search" action="/search" target="_blank" />}} +{{< hackcss-formgroup >}} + {{< hackcss-label for="query" text="Search query:" />}} + {{< hackcss-textinput id="query" type="search" name="s" form="search" >}} +{{< /hackcss-formgroup >}} + +Two forms with a [Button](../button) and [Text Input](../text-input) inside [Alert](../alert) with [Throbber](../throbber): + +```html +{{}} + {{< hackcss-form id="throttle" method="post" action="/throttle" />}} + {{< hackcss-form id="choke" novalidate="true" />}} + {{< hackcss-button type="primary" form="choke" text="Doh!" disabled="true" />}} + This one doesn't actually do anything… {{< hackcss-throbber >}} + {{< hackcss-textinput type="hidden" name="speed" value="80" form="throttle" >}} +{{< /hackcss-alert */>}} +``` + +{{< hackcss-alert type="info" >}} + {{< hackcss-form id="throttle" method="post" action="/throttle" />}} + {{< hackcss-form id="choke" novalidate="true" />}} + {{< hackcss-button type="primary" form="choke" text="Doh!" disabled="true" />}} + This one doesn't actually do anything… {{< hackcss-throbber >}} + {{< hackcss-textinput type="hidden" name="speed" value="80" form="throttle" >}} +{{< /hackcss-alert >}} + +With [Form Group](../form-group), [Label](../label), required and validated [Text Input](../text-input) and [Help Block](../help-block): + +```html +{{}} + {{< hackcss-formgroup name="integrity" >}} + {{< hackcss-label for="digest" >}} + SHA-512 Digest: + {{< /hackcss-label >}} + {{< hackcss-textinput + required="true" + autofocus="true" + autocomplete="off" + type="text" id="digest" name="digest" + pattern="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" >}} + {{< hackcss-helpblock >}} + Submit with digest to validate installation. + + {{< /hackcss-helpblock >}} + {{< /hackcss-formgroup >}} +{{< /hackcss-form */>}} +``` + +{{< hackcss-form name="validate" action="/validate" >}} + {{< hackcss-formgroup name="integrity" >}} + {{< hackcss-label for="digest" >}} + SHA-512 Digest: + {{< /hackcss-label >}} + {{< hackcss-textinput + required="true" + autocomplete="off" + type="text" id="digest" name="digest" + pattern="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" >}} + {{< hackcss-helpblock >}} + Submit with digest to validate installation. + + {{< /hackcss-helpblock >}} + {{< /hackcss-formgroup >}} +{{< /hackcss-form >}} diff --git a/themes/after-dark/docs/content/shortcode/grid.md b/themes/after-dark/docs/content/shortcode/grid.md new file mode 100644 index 0000000..db300e5 --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/grid.md @@ -0,0 +1,176 @@ ++++ +title = "Grid" +description = "Display a responsive grid with cells." +categories = ["experience"] +tags = [] +html_attributes = ["class"] +custom_attributes = [] +snippets_used = ["cell", "card", "button"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Containing three [Cell](../cell) of equal size: + +{{< highlight html "linenos=inline" >}} +{{}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-4of12" text="4" />}} +{{< /hackcss-grid */>}} +{{< /highlight >}} + +{{< hackcss-grid class="unset-margin" >}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-4of12" text="4" />}} +{{< /hackcss-grid >}} + +With two columns of odd size: + +```html +{{}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-8of12" text="8" />}} +{{< /hackcss-grid */>}} +``` + +{{< hackcss-grid class="example" >}} + {{< hackcss-cell class="-4of12" text="4" />}} + {{< hackcss-cell class="-8of12" text="8" />}} +{{< /hackcss-grid >}} + +With 12 columns: + +```html +{{}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} +{{< /hackcss-grid */>}} +``` + +{{< hackcss-grid >}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} + {{< hackcss-cell class="-1of12" text="1" />}} +{{< /hackcss-grid >}} + +Enclosing [Cards](../card/) with various [Buttons](../button/) inside: + +```html +{{}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 1" >}} + {{< hackcss-button type="primary" isblock="true" isghost="true" >}} + + +   Download + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 2" >}} + {{< hackcss-button type="info" isblock="true" isghost="true" >}} + + +   Install + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 3" >}} + {{< hackcss-button type="success" isblock="true" isghost="true" >}} + + + +   Profit + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} +{{< /hackcss-grid */>}} +``` + +{{< hackcss-grid >}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 1" >}} + {{< hackcss-button type="primary" isblock="true" isghost="true" >}} + + +   Download + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 2" >}} + {{< hackcss-button type="info" isblock="true" isghost="true" >}} + + +   Install + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} + {{< hackcss-cell class="-4of12" >}} + {{< hackcss-card header="Step 3" >}} + {{< hackcss-button type="success" isblock="true" isghost="true" >}} + + + +   Profit + {{< /hackcss-button >}} + {{< /hackcss-card >}} + {{< /hackcss-cell >}} +{{< /hackcss-grid >}} + +Aligning three [SVG Favicons]({{< relref "svg-favicon" >}}) using `-around` modifier: + +```html +{{}} + {{< hackcss-cell class="-2of12" >}} + + {{< /hackcss-cell >}} + {{< hackcss-cell class="-2of12" >}} + + {{< /hackcss-cell >}} + {{< hackcss-cell class="-2of12" >}} + + {{< /hackcss-cell >}} +{{< /hackcss-grid */>}} +``` + +{{< hackcss-grid class="-around" >}} + {{< hackcss-cell class="-2of12" >}} + + {{< /hackcss-cell >}} + {{< hackcss-cell class="-2of12" >}} + + {{< /hackcss-cell >}} + {{< hackcss-cell class="-2of12" >}} + + {{< /hackcss-cell >}} +{{< /hackcss-grid >}} + +See the {{< external text="hackcss" href="https://hackcss.egoist.moe/" />}} docs for full list of flexbox modifiers available. Reference the following resources for additional help: + +- {{< external "https://philipwalton.github.io/solved-by-flexbox/" "Solved by Flexbox" />}} for cleaner, hack-free CSS +- {{< external "https://www.w3.org/TR/css-flexbox-1/" "CSS Flexible Box Layout Module" />}} for Level 1 spec on W3C diff --git a/themes/after-dark/docs/content/shortcode/help-block.md b/themes/after-dark/docs/content/shortcode/help-block.md new file mode 100644 index 0000000..55e9acd --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/help-block.md @@ -0,0 +1,44 @@ ++++ +title = "Help Block" +description = "Combine with form controls to guide user input." +categories = ["experience"] +tags = [] +html_attributes = ["class"] +custom_attributes = ["text"] +snippets_used = ["form group", "text input"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Plain or formatted text: + +```html +{{}} +{{}}Italicized HTML Help Block{{< /hackcss-helpblock */>}} +{{%/* hackcss-helpblock %}}**Bold Markdown Help Block**{{% /hackcss-helpblock */%}} +``` +{{< hackcss-helpblock text="Plain text Help Block" />}} +{{< hackcss-helpblock >}}Italicized HTML Help Block{{< /hackcss-helpblock >}} +{{% hackcss-helpblock %}}**Bold Markdown Help Block**{{% /hackcss-helpblock %}} + +Used above and below [Text Input](../text-input) with `class` attribute: + +```html +{{}} + {{< hackcss-helpblock >}} + Enter a secure password below: + {{< /hackcss-helpblock >}} + {{< hackcss-textinput type="password" minlength="27" >}} + {{< hackcss-helpblock class="muted" text="Min. 27 chars" />}} +{{< /hackcss-formgroup */>}} +``` + +{{< hackcss-formgroup >}} + {{< hackcss-helpblock >}} + Enter a secure password below: + {{< /hackcss-helpblock >}} + {{< hackcss-textinput type="password" minlength="27" >}} + {{< hackcss-helpblock class="muted" text="Min. 27 chars" />}} +{{< /hackcss-formgroup >}} diff --git a/themes/after-dark/docs/content/shortcode/label.md b/themes/after-dark/docs/content/shortcode/label.md new file mode 100644 index 0000000..9cb0601 --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/label.md @@ -0,0 +1,57 @@ ++++ +title = "Label" +description = "Provide accessible captions for form controls." +categories = ["experience"] +tags = [] +html_attributes = ["for", "form"] +custom_attributes = ["text"] +snippets_used = ["label", "text input", "form group", "help block"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Explicit label association with [Text Input](../text-input): + +```html +{{}} +{{}} +``` + +{{< hackcss-label for="query" text="Search query:" />}} +{{< hackcss-textinput type="search" id="query" >}} + +Implicit label association using [Text Input](../text-input) and [Help Block](../help-block): + +```html +{{}} + {{< hackcss-label >}} + {{< hackcss-helpblock text="Enter your Associate Tag:" />}} + {{< hackcss-textinput name="AssociateTag" required="true" pattern="^\b\w*\b-20$" placeholder="associate-20" >}} + {{< /hackcss-label >}} +{{< /hackcss-form */>}} +``` + +{{< hackcss-form >}} + {{< hackcss-label >}} + {{< hackcss-helpblock text="Enter your Associate Tag:" />}} + {{< hackcss-textinput name="AssociateTag" required="true" pattern="^\b\w*\b-20$" placeholder="associate-20" >}} + {{< /hackcss-label >}} +{{< /hackcss-form >}} + +Combined with [Form Group](../form-group) to show [Text Input](../text-input) success state: + +```html +{{}} + {{< hackcss-label for="fullname" text="Full Name:" />}} + {{< hackcss-textinput id="fullname" value="Edgar Allan Poe" required="true" >}} +{{< /hackcss-formgroup */>}} +``` + +{{< hackcss-formgroup state="success" >}} + {{< hackcss-label for="fullname" text="Full Name:" />}} + {{< hackcss-textinput id="fullname" value="Edgar Allan Poe" required="true" >}} +{{< /hackcss-formgroup >}} + +See [Form Group](../form-group) for additional control states. diff --git a/themes/after-dark/docs/content/shortcode/progress.md b/themes/after-dark/docs/content/shortcode/progress.md new file mode 100644 index 0000000..623e633 --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/progress.md @@ -0,0 +1,53 @@ ++++ +title = "Progress" +description = "Show graphical progress bars with completion percentage." +categories = ["experience"] +tags = [] +html_attributes = [] +custom_attributes = ["showpercent", "value", "filltext"] +snippets_used = ["progress", "card", "alert"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Basic usage: + +```html +{{}} +{{}} +{{}} +``` + +{{< hackcss-progress value="40" >}} +{{< hackcss-progress value="30" showpercent="true" >}} +{{< hackcss-progress value="70" showpercent="true" filltext="pemuatan" >}} + +Inside an [Alert](../alert): + +{{< hackcss-alert type="warning" >}} + {{< hackcss-progress value="90" showpercent="true" filltext="Load Average" >}} +{{< /hackcss-alert >}} + +Stacked inside a [Card](../card): + +```html +{{}} + {{< hackcss-progress value="16" showpercent="true" filltext="China – 增值税" >}} + {{< hackcss-progress value="20" showpercent="true" filltext="France – TVA" >}} + {{< hackcss-progress value="10" showpercent="true" filltext="Indonesia – PPN" >}} + {{< hackcss-progress value="8" showpercent="true" filltext="Japan – 消費税" >}} + {{< hackcss-progress value="15" showpercent="true" filltext="New Zealand – GST" >}} + {{< hackcss-progress value="20" showpercent="true" filltext="United Kingdom – VAT" >}} +{{< /hackcss-card */>}} +``` + +{{< hackcss-card header="Value-added Tax by Country" >}} + {{< hackcss-progress value="16" showpercent="true" filltext="China – 增值税" >}} + {{< hackcss-progress value="20" showpercent="true" filltext="France – TVA" >}} + {{< hackcss-progress value="10" showpercent="true" filltext="Indonesia – PPN" >}} + {{< hackcss-progress value="8" showpercent="true" filltext="Japan – 消費税" >}} + {{< hackcss-progress value="15" showpercent="true" filltext="New Zealand – GST" >}} + {{< hackcss-progress value="20" showpercent="true" filltext="United Kingdom – VAT" >}} +{{< /hackcss-card >}} diff --git a/themes/after-dark/docs/content/shortcode/select.md b/themes/after-dark/docs/content/shortcode/select.md new file mode 100644 index 0000000..760218c --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/select.md @@ -0,0 +1,51 @@ ++++ +title = "Select" +description = "List a group of options in a drop-down menu." +categories = ["experience"] +tags = [] +html_attributes = ["name", "class", "disabled", "form"] +custom_attributes = ["body"] +snippets_used = ["label", "form group"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Basic usage: + +```html +{{}} + + + +{{< /hackcss-select */>}} +``` + +{{< hackcss-select >}} + + + +{{< /hackcss-select >}} + +With [Label](../label) inside [Form Group](../form-group): + +```html +{{}} + {{< hackcss-label for="pool" text="Mining pool:" />}} + {{< hackcss-select id="pool" name="pool" >}} + + + + {{< /hackcss-select >}} +{{< /hackcss-formgroup */>}} +``` + +{{< hackcss-formgroup name="poolgroup" >}} + {{< hackcss-label for="pool" text="Mining pool:" />}} + {{< hackcss-select id="pool" name="pool" >}} + + + + {{< /hackcss-select >}} +{{< /hackcss-formgroup >}} diff --git a/themes/after-dark/docs/content/shortcode/text-area.md b/themes/after-dark/docs/content/shortcode/text-area.md new file mode 100644 index 0000000..035c6b7 --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/text-area.md @@ -0,0 +1,51 @@ ++++ +title = "Text Area" +description = "Add a multi-line plain-text editing control." +categories = ["experience"] +tags = ["controls"] +html_attributes = ["id", "name", "class", "autocomplete", "autofocus", "cols", "disabled", "form", "maxlength", "minlength", "name", "placeholder", "readonly", "required", "rows", "spellcheck", "wrap", "tabindex"] +custom_attributes = ["text"] +snippets_used = [] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Read-only with prefilled text: + +```html +{{}} +``` + +{{< hackcss-textarea readonly="true" text="Only this and nothing more." >}} + +With spellcheck disabled: + +```html +{{}} +``` + +{{< hackcss-textarea spellcheck="false" >}} + +With 16 columns and hard wrapping enabled: + +```html +{{}} +``` + +{{< hackcss-textarea cols="16" wrap="hard" >}} + +Inside disabled form group with error label and placeholder: + +```html +{{}} + {{< hackcss-label for="message" text="Message:" />}} + {{< hackcss-textarea id="message" placeholder="Guestbook offline…" rows="10" >}} +{{< /hackcss-formgroup */>}} +``` + +{{< hackcss-formgroup hastextarea="true" disabled="true" state="error" >}} + {{< hackcss-label for="message" text="Message:" />}} + {{< hackcss-textarea id="message" placeholder="Guestbook offline…" rows="10" >}} +{{< /hackcss-formgroup >}} diff --git a/themes/after-dark/docs/content/shortcode/text-input.md b/themes/after-dark/docs/content/shortcode/text-input.md new file mode 100644 index 0000000..8145592 --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/text-input.md @@ -0,0 +1,77 @@ ++++ +title = "Text Input" +description = "Add a single-line plain-text editing control." +categories = ["experience"] +tags = ["controls"] +html_attributes = ["id", "name", "class", "autocomplete", "autofocus", "disabled", "form", "formaction", "formmethod", "formtarget", "height", "max", "maxlength", "min", "minlength", "multiple", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "tabindex", "type", "value", "width"] +custom_attributes = [] +snippets_used = ["text input", "label", "form group", "form", "help block"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Basic usage: + +```html +{{}} +{{}} +{{}} +{{}} +``` + +{{< hackcss-textinput >}} +{{< hackcss-textinput type="password" >}} +{{< hackcss-textinput type="email" placeholder="Please enter your email…" >}} +{{< hackcss-textinput disabled="true" placeholder="Disabled" >}} + +With [Label](../label) and [Help Block](../help-block) in [Form](../form) with custom validation: + +```html +{{}} + {{< hackcss-label >}} + {{< hackcss-helpblock text="Enter your Associate Tag:" />}} + {{< hackcss-textinput name="AssociateTag" required="true" pattern="^\b\w*\b-20$" placeholder="associate-20" >}} + {{< /hackcss-label >}} +{{< /hackcss-form */>}} +``` + +{{< hackcss-form >}} + {{< hackcss-label >}} + {{< hackcss-helpblock text="Enter your Associate Tag:" />}} + {{< hackcss-textinput name="AssociateTag" required="true" pattern="^\b\w*\b-20$" placeholder="associate-20" >}} + {{< /hackcss-label >}} +{{< /hackcss-form >}} + +In [Form Group](../form-group) with warning [Label](../label) and [Help Block](../help-block): + +```html +{{}} + {{< hackcss-label for="key64" text="64-bit PGP key:" />}} + {{< hackcss-textinput spellcheck="false" type="text" id="key64" >}} + {{< hackcss-helpblock text="In this format: BB73 67EE 9A70 A631" />}} +{{< /hackcss-formgroup */>}} +``` + +{{< hackcss-formgroup state="warning" >}} + {{< hackcss-label for="key64" text="64-bit PGP key:" />}} + {{< hackcss-textinput spellcheck="false" type="text" id="key64" >}} + {{< hackcss-helpblock text="In this format: BB73 67EE 9A70 A631" />}} +{{< /hackcss-formgroup >}} + +Typed with [Label](../label) in [Form Group](../form-group) targeting [Form](../form) owner: + +```html +{{}} +{{}} + {{< hackcss-label for="query" text="Search query:" />}} + {{< hackcss-textinput type="search" id="query" form="search" >}} +{{< /hackcss-formgroup */>}} +``` + +{{< hackcss-form id="search" action="/search" />}} +{{< hackcss-formgroup >}} + {{< hackcss-label for="query" text="Search query:" />}} + {{< hackcss-textinput type="search" id="query" name="s" form="search" >}} +{{< /hackcss-formgroup >}} diff --git a/themes/after-dark/docs/content/shortcode/throbber.md b/themes/after-dark/docs/content/shortcode/throbber.md new file mode 100644 index 0000000..3a1677a --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/throbber.md @@ -0,0 +1,35 @@ ++++ +title = "Throbber" +description = "Display a CSS-only loading indicator." +categories = ["experience"] +tags = [] +html_attributes = [] +custom_attributes = [] +snippets_used = ["throbber", "button"] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Basic usage: + +```html +{{}} +``` + +{{< hackcss-throbber >}} + +Inside a [Button](../button): + +```html +{{}} + Please wait… {{< hackcss-throbber >}} +{{< /hackcss-button */>}} +``` + +{{< hackcss-button isghost="true" type="info" >}} + Please wait… {{< hackcss-throbber >}} +{{< /hackcss-button >}} + +Customize by creating your own {{< external text="CSS-only loading" href="https://www.pexels.com/blog/css-only-loaders/" />}} indicator. diff --git a/themes/after-dark/docs/content/shortcode/video/assets/sample.mp4 b/themes/after-dark/docs/content/shortcode/video/assets/sample.mp4 new file mode 100644 index 0000000..b97db78 Binary files /dev/null and b/themes/after-dark/docs/content/shortcode/video/assets/sample.mp4 differ diff --git a/themes/after-dark/docs/content/shortcode/video/index.md b/themes/after-dark/docs/content/shortcode/video/index.md new file mode 100644 index 0000000..1c1e142 --- /dev/null +++ b/themes/after-dark/docs/content/shortcode/video/index.md @@ -0,0 +1,44 @@ ++++ +title = "Video" +description = "Lazy-load videos and control playback options." +categories = ["experience"] +tags = [] +html_attributes = ["class", "autoplay", "controls", "crossorigin", "height", "loop", "muted", "preload", "intrinsicsize", "poster", "src", "width", "playsinline"] +custom_attributes = [] +snippets_used = [] +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +Basic usage: + +```html +{{}} +``` + +{{< video autoplay="true" loop="true" src="assets/sample.mp4" >}} + +Assumes the following directory structure: + +``` +├── assets +├── content +│   └── videos +│   └── gifs +│   ├── assets +│   │ └── sample.mp4 +│   └── index.md +├── content +``` + +With controls: + +```html +{{}} +``` + +{{< video controls="true" src="assets/sample.mp4" >}} + +Absolute `src` and `poster` URLs also possible. Absolute URLs must include a scheme such as `http` or `https`. Root-relative URLs not currently possible. diff --git a/themes/after-dark/docs/content/validate.md b/themes/after-dark/docs/content/validate.md new file mode 100644 index 0000000..299abe5 --- /dev/null +++ b/themes/after-dark/docs/content/validate.md @@ -0,0 +1,82 @@ ++++ +title = "Validate Release" +description = "Complete the included form to validate the release." +noindex = true +[[copyright]] + owner = "Josh Habdas" + date = "2019" + license = "agpl-3.0-or-later" ++++ + +{{< hackcss-form name="validate" action="/validate/" >}} + {{< hackcss-formgroup name="integrity" >}} + {{< hackcss-label for="digest" >}} + SHA-512 Digest: + {{< /hackcss-label >}} + {{< hackcss-textinput + required="true" + autocomplete="off" + spellcheck="false" + type="text" id="digest" name="digest" + pattern="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + placeholder="whUlqT0w6vfvTzd12LpU5kst/Cz3yt9j3ncIHcB4CDQFFiMVPlfX/I+vKl3Y98faqBLlgh6M4pyhiYzZNIPUPA==" + >}} + {{< hackcss-helpblock >}} + Submit with 9.2.3 Release Hash to validate. + + {{< /hackcss-helpblock >}} + {{< /hackcss-formgroup >}} +{{< /hackcss-form >}} + +Valid installations use the [Quick Install](/feature/quick-install) or [Upgrade Script](/feature/upgrade-script) and may be checked offline. See [Release Hashes](/feature/release-hashes) for a more thorough approach to validation. + + diff --git a/themes/after-dark/docs/layouts/extra/list.html b/themes/after-dark/docs/layouts/extra/list.html new file mode 100644 index 0000000..870cca7 --- /dev/null +++ b/themes/after-dark/docs/layouts/extra/list.html @@ -0,0 +1,55 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+ {{ if .Description }} +
{{ .Description }}
+ {{ end }} +
+ + Extras are companion software packages you may find valuable to augment your workflow. Unlike Modules and Shortcodes extras are ancillary to your website. + + + + + + + + + + + + {{ end }} + + +
{{ .Title | singularize }}Description
{{ .Title }}{{ .Description }}
+{{ end }} +{{ define "footer" }} +

{{ partial "pagination.html" . }}

+ + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/docs/layouts/extra/single.html b/themes/after-dark/docs/layouts/extra/single.html new file mode 100644 index 0000000..09528ce --- /dev/null +++ b/themes/after-dark/docs/layouts/extra/single.html @@ -0,0 +1,54 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "title" -}} + {{ .Title }} | {{ .Site.Title }} +{{- end }} +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+ {{ if .Description }} +
{{ .Description }}
+ {{ end }} +
+ {{ .Content }} +
+
+

+ Published + {{ with .Params.categories }} + in {{ delimit (apply (apply (sort .) "partial" "category-link.html" ".") "chomp" ".") ", " " and " }} + {{ end }} + {{ with .Params.features }} + using {{ delimit (apply (apply (sort .) "partial" "feature-link.html" ".") "chomp" ".") ", " " and " }}. + {{ else }} + using basic features. + {{ end }} +

+ {{ partial "post/related-content.html" . }} +
+{{ end }} +{{ define "footer" }} + + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/docs/layouts/feature/list.html b/themes/after-dark/docs/layouts/feature/list.html new file mode 100644 index 0000000..221ea78 --- /dev/null +++ b/themes/after-dark/docs/layouts/feature/list.html @@ -0,0 +1,97 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+ {{ if .Description }} +
{{ .Description }}
+ {{ end }} +
+ {{ .Content }} + + {{ $scratch := newScratch }} + {{ range .Paginator.Pages }} + {{ $scratch.Add "categories" .Params.categories | first 1 }} + {{ end }} + {{ $categories := $scratch.Get "categories" | uniq }} + + {{ range $categories }} +
+

{{ . | title }}

+
+ {{ range where $.Paginator.Pages "Params.categories" "intersect" (slice .) }} +
{{ .Title }} +
{{ .Description }} + {{ end }} +
+
+ {{ end }} +{{ end }} +{{ define "footer" }} +

{{ partial "pagination.html" . }}

+ + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/docs/layouts/feature/single.html b/themes/after-dark/docs/layouts/feature/single.html new file mode 100644 index 0000000..7385158 --- /dev/null +++ b/themes/after-dark/docs/layouts/feature/single.html @@ -0,0 +1,54 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "title" -}} + {{ .Title }} | {{ .Site.Title }} +{{- end }} +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+ {{ if .Description }} +
{{ .Description }}
+ {{ end }} +
+ {{ .Content }} +
+
+

+ {{ .Section | title }} + {{ with .Params.categories }} + in {{ delimit (apply (apply (sort .) "partial" "feature/category-link.html" ".") "chomp" ".") ", " " and " }} + {{ end }} + {{ with .Params.features }} + using {{ delimit (apply (apply (sort .) "partial" "feature-link.html" ".") "chomp" ".") ", " " and " }}. + {{ else }} + using basic features. + {{ end }} +

+ {{ partial "post/related-content.html" . }} +
+{{ end }} +{{ define "footer" }} + + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/docs/layouts/index.html b/themes/after-dark/docs/layouts/index.html new file mode 100644 index 0000000..0039f80 --- /dev/null +++ b/themes/after-dark/docs/layouts/index.html @@ -0,0 +1,119 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "title" -}} + Hugo Dark Theme Site Generator | {{ .Params.title }} +{{- end }} +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} + {{ with resources.Get "css/conditional/layout/landing.css" | minify }} + + {{ end }} +
+

{{ .Title }}v{{ .Site.Data.npm.latest.version }}

+

Hugo Dark Theme Site Generator

+
+ +
+
+

{{ .Description }}

+
+
+
+ {{ .Content }} +
+
+ {{ partial "components/figure.html" (dict "alt" "After Dark screenshots" "src" "/images/minimal-mac_2400x1800-fs8.png" "lqipsrc" "/images/minimal-mac_800x600-fs8.png") }} +
+ {{ range .Params.spotlight }} +
+ {{ with .icon }} + {{ (resources.Get (printf "svg/vendor/bytesize-icons/%s.svg" .)).Content | safeHTML }} + {{ end }} + {{ .title | title }} + {{ if eq .beta true }} + (Now in Beta!) + {{ end }} + {{ if eq .name "workflow" }} + + + + + + + + + + + + + + +
{{ .description | markdownify }}
FeaturesModulesShortcodesExtras
40427+2
+ {{ else }} +

{{ .description | markdownify }}

+ + {{ end }} +
+ {{ end }} + +{{ end }} +{{ define "footer" }} + + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/docs/layouts/module/list.html b/themes/after-dark/docs/layouts/module/list.html new file mode 100644 index 0000000..b734e34 --- /dev/null +++ b/themes/after-dark/docs/layouts/module/list.html @@ -0,0 +1,60 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+ {{ if .Description }} +
{{ .Description }}
+ {{ end }} +
+ + {{ .Content }} + + + + + + + + + + + + + {{ end }} + + +
{{ .Title | singularize }}Description
{{ .Title }}{{ .Params.summary }}
+{{ end }} +{{ define "footer" }} +

{{ partial "pagination.html" . }}

+ + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/docs/layouts/module/single.html b/themes/after-dark/docs/layouts/module/single.html new file mode 100644 index 0000000..cf6eede --- /dev/null +++ b/themes/after-dark/docs/layouts/module/single.html @@ -0,0 +1,64 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "title" -}} + {{ .Title }} | {{ .Site.Title }} +{{- end }} +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+ {{ if .Description }} +
{{ .Description }}
+ {{ end }} +
+ {{ .Content }} +
+
+

+ Published + {{ with .Params.categories }} + in {{ delimit (apply (apply (sort .) "partial" "category-link.html" ".") "chomp" ".") ", " " and " }} + {{ end }} + {{ with .Params.features }} + using {{ delimit (apply (apply (sort .) "partial" "feature-link.html" ".") "chomp" ".") ", " " and " }}. + {{ else }} + using basic features. + {{ end }} +

+ {{ partial "post/related-content.html" . }} +
+{{ end }} +{{ define "footer" }} +
+ + {{ partial "copyright-notice.html" . }} + + {{ if in .Page.RelPermalink "toxic-swamp" }} + {{ if eq .Params.slug "toxic-swamp" }} + {{ $config_generator := resources.Get "/js/config-generator.js" }} + + {{ else if in .Page.RelPermalink "configuration" }} + {{ $configuration := resources.Get "/js/configuration.js" }} + + {{ end }} + {{ end }} +{{ end }} diff --git a/themes/after-dark/docs/layouts/partials/category-link.html b/themes/after-dark/docs/layouts/partials/category-link.html new file mode 100644 index 0000000..bd88567 --- /dev/null +++ b/themes/after-dark/docs/layouts/partials/category-link.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ . | title }} diff --git a/themes/after-dark/docs/layouts/partials/definition-data.html b/themes/after-dark/docs/layouts/partials/definition-data.html new file mode 100644 index 0000000..4d26361 --- /dev/null +++ b/themes/after-dark/docs/layouts/partials/definition-data.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +
{{ . -}} diff --git a/themes/after-dark/docs/layouts/partials/feature-link.html b/themes/after-dark/docs/layouts/partials/feature-link.html new file mode 100644 index 0000000..3e8f686 --- /dev/null +++ b/themes/after-dark/docs/layouts/partials/feature-link.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ . | title }} diff --git a/themes/after-dark/docs/layouts/partials/feature/category-link.html b/themes/after-dark/docs/layouts/partials/feature/category-link.html new file mode 100644 index 0000000..3b9fed8 --- /dev/null +++ b/themes/after-dark/docs/layouts/partials/feature/category-link.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ . | title }} diff --git a/themes/after-dark/docs/layouts/partials/head/favicon.html b/themes/after-dark/docs/layouts/partials/head/favicon.html new file mode 100644 index 0000000..702d1e3 --- /dev/null +++ b/themes/after-dark/docs/layouts/partials/head/favicon.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + diff --git a/themes/after-dark/docs/layouts/partials/masthead.html b/themes/after-dark/docs/layouts/partials/masthead.html new file mode 100644 index 0000000..722198f --- /dev/null +++ b/themes/after-dark/docs/layouts/partials/masthead.html @@ -0,0 +1,49 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $is_section_menu_enabled := ne .Site.Params.show_menu false }} +{{ range $name, $entries := .Site.Menus }} + {{ if or (ne $name "main") (and (eq $name "main") $is_section_menu_enabled) }} + {{ with $.Site.Params.layout.menu }} + {{ $settings := (index . $name) | default dict }} + {{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" $settings "page" $)}} + {{ else }} + {{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" dict "page" $)}} + {{ end }} + {{ end }} +{{ end }} + diff --git a/themes/after-dark/docs/layouts/partials/module-link.html b/themes/after-dark/docs/layouts/partials/module-link.html new file mode 100644 index 0000000..2f222b61 --- /dev/null +++ b/themes/after-dark/docs/layouts/partials/module-link.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ . | title }} diff --git a/themes/after-dark/docs/layouts/partials/shortcode-link.html b/themes/after-dark/docs/layouts/partials/shortcode-link.html new file mode 100644 index 0000000..afd964a --- /dev/null +++ b/themes/after-dark/docs/layouts/partials/shortcode-link.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ . | title }} diff --git a/themes/after-dark/docs/layouts/shortcode/list.html b/themes/after-dark/docs/layouts/shortcode/list.html new file mode 100644 index 0000000..b71adee --- /dev/null +++ b/themes/after-dark/docs/layouts/shortcode/list.html @@ -0,0 +1,56 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+ {{ if .Description }} +
{{ .Description }}
+ {{ end }} +
+ + + + + + + + + + + + + + {{ end }} + + +
Add lazy-loaded images, alerts, blockquotes and design great-looking web forms directly from within your content. Dozens of examples provided below:
{{ .Title | singularize }}Description
{{ .Title }}{{ .Description }}
+

In addition to the above you may {{ partial "components/external.html" (dict "href" "https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes" "body" "Use Hugo's Built-in Shortcodes") }} as well.

+{{ end }} +{{ define "footer" }} +

{{ partial "pagination.html" . }}

+ + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/docs/layouts/shortcode/single.html b/themes/after-dark/docs/layouts/shortcode/single.html new file mode 100644 index 0000000..85266e3 --- /dev/null +++ b/themes/after-dark/docs/layouts/shortcode/single.html @@ -0,0 +1,68 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "title" -}} + {{ .Title }} | {{ .Site.Title }} +{{- end }} +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+ {{ if .Description }} +
{{ .Description }}
+ {{ end }} +
+ + {{ with .Params.html_attributes }} +
HTML attributes: {{ delimit (apply (apply (sort .) "partial" "definition-data.html" ".") "chomp" ".") ", " }} + {{ else }} +
HTML attributes:
None available + {{ end }} + + {{ with .Params.custom_attributes }} +
Custom attributes: {{ delimit (apply (apply (sort .) "partial" "definition-data.html" ".") "chomp" ".") ", " }} + {{ else }} +
Custom attributes:
None available + {{ end }} + {{ .Content }} +
+
+

+ Published + {{ with .Params.categories }} + in {{ delimit (apply (apply (sort .) "partial" "category-link.html" ".") "chomp" ".") ", " " and " }} + {{ end }} + {{ with .Params.snippets_used }} + using {{ delimit (apply (apply (sort .) "partial" "shortcode-link.html" ".") "chomp" ".") ", " " and " }} shortcodes. + {{ else }} + and used alone. + {{ end }} +

+ {{ partial "post/related-content.html" . }} +
+{{ end }} +{{ define "footer" }} + + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/docs/layouts/shortcodes/include.html b/themes/after-dark/docs/layouts/shortcodes/include.html new file mode 100644 index 0000000..e584fb4 --- /dev/null +++ b/themes/after-dark/docs/layouts/shortcodes/include.html @@ -0,0 +1,41 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + + +{{- $type := .Get "type" }} +{{- $file := .Get "file" }} +{{- if and .IsNamedParams }} + {{- if eq $type "image" }}{{ readFile $file | base64Encode }}{{ end -}} + {{- if eq $type "source" }}{{ readFile $file | safeHTML }}{{ end -}} +{{ else }} + {{- readFile (.Get 0) | safeHTML -}} +{{ end -}} diff --git a/themes/after-dark/docs/static/favicon.png b/themes/after-dark/docs/static/favicon.png new file mode 100644 index 0000000..393ca1b Binary files /dev/null and b/themes/after-dark/docs/static/favicon.png differ diff --git a/themes/after-dark/docs/static/images/addon-high-tea_1440x900-fs8.png b/themes/after-dark/docs/static/images/addon-high-tea_1440x900-fs8.png new file mode 100644 index 0000000..5060620 Binary files /dev/null and b/themes/after-dark/docs/static/images/addon-high-tea_1440x900-fs8.png differ diff --git a/themes/after-dark/docs/static/images/addon-high-tea_960x600-fs8.png b/themes/after-dark/docs/static/images/addon-high-tea_960x600-fs8.png new file mode 100644 index 0000000..7a43663 Binary files /dev/null and b/themes/after-dark/docs/static/images/addon-high-tea_960x600-fs8.png differ diff --git a/themes/after-dark/docs/static/images/feature-instant-view-fs8.png b/themes/after-dark/docs/static/images/feature-instant-view-fs8.png new file mode 100644 index 0000000..1b63deb Binary files /dev/null and b/themes/after-dark/docs/static/images/feature-instant-view-fs8.png differ diff --git a/themes/after-dark/docs/static/images/minimal-mac_2400x1800-fs8.png b/themes/after-dark/docs/static/images/minimal-mac_2400x1800-fs8.png new file mode 100644 index 0000000..3668396 Binary files /dev/null and b/themes/after-dark/docs/static/images/minimal-mac_2400x1800-fs8.png differ diff --git a/themes/after-dark/docs/static/images/minimal-mac_800x600-fs8.png b/themes/after-dark/docs/static/images/minimal-mac_800x600-fs8.png new file mode 100644 index 0000000..1bdf701 Binary files /dev/null and b/themes/after-dark/docs/static/images/minimal-mac_800x600-fs8.png differ diff --git a/themes/after-dark/docs/static/images/quick-install-fs8.png b/themes/after-dark/docs/static/images/quick-install-fs8.png new file mode 100644 index 0000000..263c51f Binary files /dev/null and b/themes/after-dark/docs/static/images/quick-install-fs8.png differ diff --git a/themes/after-dark/docs/static/images/quick-install.png b/themes/after-dark/docs/static/images/quick-install.png new file mode 100644 index 0000000..a494939 Binary files /dev/null and b/themes/after-dark/docs/static/images/quick-install.png differ diff --git a/themes/after-dark/docs/static/images/screenshots/after-dark-v6.15.0-homepage-fs8.png b/themes/after-dark/docs/static/images/screenshots/after-dark-v6.15.0-homepage-fs8.png new file mode 100644 index 0000000..3dd7153 Binary files /dev/null and b/themes/after-dark/docs/static/images/screenshots/after-dark-v6.15.0-homepage-fs8.png differ diff --git a/themes/after-dark/docs/static/images/screenshots/feature-featured-posts-fs8.png b/themes/after-dark/docs/static/images/screenshots/feature-featured-posts-fs8.png new file mode 100644 index 0000000..896afc9 Binary files /dev/null and b/themes/after-dark/docs/static/images/screenshots/feature-featured-posts-fs8.png differ diff --git a/themes/after-dark/docs/static/images/screenshots/feature-homepage-fs8.png b/themes/after-dark/docs/static/images/screenshots/feature-homepage-fs8.png new file mode 100644 index 0000000..b683f5c Binary files /dev/null and b/themes/after-dark/docs/static/images/screenshots/feature-homepage-fs8.png differ diff --git a/themes/after-dark/docs/static/images/screenshots/feature-related-content-fs8.png b/themes/after-dark/docs/static/images/screenshots/feature-related-content-fs8.png new file mode 100644 index 0000000..3c5732c Binary files /dev/null and b/themes/after-dark/docs/static/images/screenshots/feature-related-content-fs8.png differ diff --git a/themes/after-dark/docs/static/images/screenshots/module-voyeur-analytics-fs8.png b/themes/after-dark/docs/static/images/screenshots/module-voyeur-analytics-fs8.png new file mode 100644 index 0000000..d59fbd0 Binary files /dev/null and b/themes/after-dark/docs/static/images/screenshots/module-voyeur-analytics-fs8.png differ diff --git a/themes/after-dark/docs/static/images/screenshots/monero-ocean-dashboard-fs8.png b/themes/after-dark/docs/static/images/screenshots/monero-ocean-dashboard-fs8.png new file mode 100644 index 0000000..ae396e9 Binary files /dev/null and b/themes/after-dark/docs/static/images/screenshots/monero-ocean-dashboard-fs8.png differ diff --git a/themes/after-dark/docs/static/images/social-awareness-fs8.png b/themes/after-dark/docs/static/images/social-awareness-fs8.png new file mode 100644 index 0000000..86e86fb Binary files /dev/null and b/themes/after-dark/docs/static/images/social-awareness-fs8.png differ diff --git a/themes/after-dark/docs/static/images/watercolor_pTIyYTqAlF8_w1440h700.jpeg b/themes/after-dark/docs/static/images/watercolor_pTIyYTqAlF8_w1440h700.jpeg new file mode 100644 index 0000000..e907587 Binary files /dev/null and b/themes/after-dark/docs/static/images/watercolor_pTIyYTqAlF8_w1440h700.jpeg differ diff --git a/themes/after-dark/docs/static/images/watercolor_pTIyYTqAlF8_w936h455.jpeg b/themes/after-dark/docs/static/images/watercolor_pTIyYTqAlF8_w936h455.jpeg new file mode 100644 index 0000000..abce6f0 Binary files /dev/null and b/themes/after-dark/docs/static/images/watercolor_pTIyYTqAlF8_w936h455.jpeg differ diff --git a/themes/after-dark/docs/themes/after-dark b/themes/after-dark/docs/themes/after-dark new file mode 120000 index 0000000..c25bddb --- /dev/null +++ b/themes/after-dark/docs/themes/after-dark @@ -0,0 +1 @@ +../.. \ No newline at end of file diff --git a/themes/after-dark/layouts/404.html b/themes/after-dark/layouts/404.html new file mode 100644 index 0000000..0b1bf52 --- /dev/null +++ b/themes/after-dark/layouts/404.html @@ -0,0 +1,130 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . + +This file incorporates work covered by the following copyright and +permission notice: + + Copyright (c) 2018 by Simon FREMAUX (https://codepen.io/dievardump/pen/pyOMeN) + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ -}} + + + + + + + 404 Error | {{ .Site.Title }} + {{ partial "head/favicon.html" . }} + {{ partial "meta/theme-color.html" . }} + + + + +
+ +

404

+
+
+ + diff --git a/themes/after-dark/layouts/_default/baseof.html b/themes/after-dark/layouts/_default/baseof.html new file mode 100644 index 0000000..76c5ace --- /dev/null +++ b/themes/after-dark/layouts/_default/baseof.html @@ -0,0 +1,88 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + + + + {{ partial "meta/content-security-policy.html" . }} + + + + {{ block "title" . }}{{ .Title }} | {{ .Site.Title }}{{ end }} + + + {{ $default_noindex_kinds := slice "section" "taxonomy" "taxonomyTerm" }} + {{ $noindex_kinds := .Site.Params.noindex_kinds | default $default_noindex_kinds }} + {{ $is_noindex_true := and (isset .Params "noindex") .Params.noindex }} + {{ if or (in $noindex_kinds .Kind) ($is_noindex_true) }} + + {{ end }} + {{ template "_internal/opengraph.html" . }} + {{ template "_internal/twitter_cards.html" . }} + {{ partial "meta/ogimage-maybe.html" . }} + {{ partial "meta/telegram-channel-maybe.html" . }} + {{ if eq .Kind "home" }} + {{ partial "meta/verifications.html" . }} + {{ end }} + {{ partial "meta/http-referrer.html" . }} + {{ $import := resources.Get "/js/vendor/fetch-inject.min.js" }} + {{ $baseof := resources.Get "/js/baseof.js" | resources.ExecuteAsTemplate "baseof.js" . }} + + + {{ partial "head/modules.html" . }} + {{ with .OutputFormats.Get "rss" }} + {{ printf "" .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end }} + + {{ if (isset .Params "prev") }} + + {{ end }} + {{ if (isset .Params "next") }} + + {{ end }} + {{ partial "head/favicon.html" . }} + {{ partial "global-styles.html" . }} + {{ $highlights := findRE "class\\s*?=\\s*?\".*?\\bhighlight\\b.*?\"|class\\s*?=\\s*?highlight\\b" .Content }} + {{ if ge (len $highlights) 1 }} + + + {{ end }} + + {{ $hackcss_disabled := .Site.Params.hackcss.disabled | default false }} + {{ $hackcss_mode := .Site.Params.hackcss.mode | default "hack" }} + {{ $hackcss_palette := .Site.Params.hackcss.palette | default "dark" }} + +
{{ block "header" . }}{{ end }}
+
{{ block "main" . }}{{ end }}
+
{{ block "footer" . }}{{ end }}
+ {{ $defaults := .Site.Params.defaults.modules }} + {{ $modules := .Site.Params.modules }} + {{ if (or $modules $defaults) }} + {{ with (default $defaults.toxic_swamp $modules.toxic_swamp) }} + {{ partial "modules/toxic-swamp/toolbar.html" dict }} + {{ end }} + {{ end }} + + diff --git a/themes/after-dark/layouts/_default/home.html b/themes/after-dark/layouts/_default/home.html new file mode 100644 index 0000000..824406f --- /dev/null +++ b/themes/after-dark/layouts/_default/home.html @@ -0,0 +1,77 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "title" -}} + {{ .Site.Title }} +{{- end }} +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+
+ {{ with .Site.Params.layout.home.section }} + {{ if ne $.Site.Params.hackcss.disabled true }} + {{ with resources.Get "css/conditional/layouts/partials/page-thumbs.css" | minify }} + + {{ end }} + {{ end }} + {{ range sort . "weight" "asc" }} +
+ {{ $index := site.GetPage "section" .type }} + {{ $pages := where site.RegularPages "Type" .type }} + {{ $page_count := (default 1 (len $pages)) }} + {{ if eq $page_count 1 }} + {{ partial "page-summary.html" $index }} + {{ else if gt $page_count 1 }} +
+

+ Recent {{ $index.Title }} +

+
{{ $index.Description }}
+
+ {{ partial "page-thumbs.html" (dict "thumbnail_options" .thumbs "page_count" $page_count "limit" .limit "pages" $pages) }} + {{ end }} + {{ if and (lt .limit $page_count) (ne 1 $page_count) }} + + {{ end }} +
+ {{ end }} + {{ end }} + {{ if not .Site.Params.layout.home.hide_blog }} +
+ {{ range (.Paginate (where .Site.RegularPages "Type" "in" (site.Params.layout.homepage.sections | default (slice "post")))).Pages }} + {{ partial "page-summary.html" . }} + {{ end }} +
+ {{ end }} +{{ end }} +{{ define "footer" }} + {{ if not .Site.Params.layout.home.hide_blog }} +

{{ partial "pagination.html" . }}

+ {{ end }} + + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/layouts/_default/index.json b/themes/after-dark/layouts/_default/index.json new file mode 100644 index 0000000..1e90e3b --- /dev/null +++ b/themes/after-dark/layouts/_default/index.json @@ -0,0 +1,27 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{- $scratch := newScratch -}} +{{- $scratch.Add "index" slice -}} +{{- range .Site.RegularPages -}} + {{- if ne .Params.noindex true -}} + {{- $scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "url" .RelPermalink "summary" .Summary) -}} + {{- end -}} +{{- end -}} +{{- $scratch.Get "index" | jsonify -}} diff --git a/themes/after-dark/layouts/_default/list.html b/themes/after-dark/layouts/_default/list.html new file mode 100644 index 0000000..2012bab --- /dev/null +++ b/themes/after-dark/layouts/_default/list.html @@ -0,0 +1,36 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+
+ {{ range .Paginator.Pages }} + {{ partial "page-summary.html" . }} + {{ end }} +{{ end }} +{{ define "footer" }} +

{{ partial "pagination.html" . }}

+ + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/layouts/_default/rss.xml b/themes/after-dark/layouts/_default/rss.xml new file mode 100644 index 0000000..4dfbca4 --- /dev/null +++ b/themes/after-dark/layouts/_default/rss.xml @@ -0,0 +1,53 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + + + https://blogs.law.harvard.edu/tech/rss + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}{{ range first 1 (default slice .Site.Params.images) }} + + {{ if eq $.Title $.Site.Title }}{{ $.Site.Title }}{{ else }}{{ with $.Title }}{{ . }} on {{ end }}{{ $.Site.Title }}{{ end }} + {{ $.Permalink }} + {{ . }} + {{ end }} + 1440 + {{ with .Site.Data.npm.latest }}{{ .name | humanize | title }} {{ .version }} (Hugo {{ hugo.Version }}){{ else }}Hugo {{ hugo.Version }}{{ end }}{{ with .Site.LanguageCode }} + {{ . }}{{ end }}{{ with .Site.Author }} + {{ .email }}{{ with .name }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Author }} + {{ .email }}{{ with .name }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} + {{ . | plainify }}{{ end }}{{ if not now.IsZero }} + {{ dateFormat "Mon, 02 Jan 2006 15:04:05" now.UTC | safeHTML }} UT{{ end }} + {{ with .OutputFormats.Get "rss" -}} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end }}{{ range .Pages }} + + {{ .Title }} + {{ .Permalink }}{{ if not .PublishDate.IsZero }} + {{ dateFormat "Mon, 02 Jan 2006 15:04:05" .Date.UTC | safeHTML }} UT{{ end }}{{ if ne .Site.Params.hide_author true }}{{ if or (.Param "author") .Site.Author.email }} + {{ default .Site.Author.email (.Param "author") }}{{ if and (not (.Param "author")) .Site.Author.name }} ({{ default (.Param "author") .Site.Author.name }}){{ end }}{{ end }}{{ end }} + {{ .Permalink }} + {{ .Summary | plainify }}{{ range .Params.categories }} + {{ . | title }}{{ end }}{{ with .Resources.GetMatch "enclosure" }}{{ if .Params.length }} + {{ end }}{{ end }} + {{ "" | safeHTML }} + {{ end }} + + diff --git a/themes/after-dark/layouts/_default/search.html b/themes/after-dark/layouts/_default/search.html new file mode 100644 index 0000000..fb52762 --- /dev/null +++ b/themes/after-dark/layouts/_default/search.html @@ -0,0 +1,70 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "title" -}} + {{ .Title }} | {{ .Site.Title }} +{{- end }} +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+
+
+ {{ with resources.Get "css/conditional/layouts/search.css" | minify }} + + {{ end }} +
+ +
+ +
+

Showing results for “{ resultsForSearch }”.

+ +
+
+{{ end }} +{{ define "footer" }} + + {{ partial "copyright-notice.html" . }} + + {{ $script := resources.Get "/js/search.js" | resources.ExecuteAsTemplate "search.js" . }} + +{{ end }} diff --git a/themes/after-dark/layouts/_default/single.html b/themes/after-dark/layouts/_default/single.html new file mode 100644 index 0000000..a2cddce --- /dev/null +++ b/themes/after-dark/layouts/_default/single.html @@ -0,0 +1,36 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "title" -}} + {{ .Title }} | {{ .Site.Title }} +{{- end }} +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+
+ {{ .Content }} +{{ end }} +{{ define "footer" }} + + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/layouts/_default/taxonomy.html b/themes/after-dark/layouts/_default/taxonomy.html new file mode 100644 index 0000000..2012bab --- /dev/null +++ b/themes/after-dark/layouts/_default/taxonomy.html @@ -0,0 +1,36 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+
+ {{ range .Paginator.Pages }} + {{ partial "page-summary.html" . }} + {{ end }} +{{ end }} +{{ define "footer" }} +

{{ partial "pagination.html" . }}

+ + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/layouts/_default/terms.html b/themes/after-dark/layouts/_default/terms.html new file mode 100644 index 0000000..f11fc8e --- /dev/null +++ b/themes/after-dark/layouts/_default/terms.html @@ -0,0 +1,35 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+
+
    + {{ range $key, $value := .Data.Terms }} +
  • {{ $key }} ({{ len $value }}) + {{ end }} +
+{{ end }} +{{ define "footer" }} + {{ partial "copyright-notice.html" . }} +{{ end }} diff --git a/themes/after-dark/layouts/partials/components/alert.html b/themes/after-dark/layouts/partials/components/alert.html new file mode 100644 index 0000000..f91215c --- /dev/null +++ b/themes/after-dark/layouts/partials/components/alert.html @@ -0,0 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +
+ {{ .body }} +
diff --git a/themes/after-dark/layouts/partials/components/button.html b/themes/after-dark/layouts/partials/components/button.html new file mode 100644 index 0000000..951e8c0 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/button.html @@ -0,0 +1,34 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + diff --git a/themes/after-dark/layouts/partials/components/buttongroup.html b/themes/after-dark/layouts/partials/components/buttongroup.html new file mode 100644 index 0000000..fb2db35 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/buttongroup.html @@ -0,0 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +
+ {{ .body }} +
diff --git a/themes/after-dark/layouts/partials/components/card.html b/themes/after-dark/layouts/partials/components/card.html new file mode 100644 index 0000000..16aa68c --- /dev/null +++ b/themes/after-dark/layouts/partials/components/card.html @@ -0,0 +1,25 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +
+
{{ .header }}
+
+
{{ .body }}
+
+
diff --git a/themes/after-dark/layouts/partials/components/cell.html b/themes/after-dark/layouts/partials/components/cell.html new file mode 100644 index 0000000..5427e7d --- /dev/null +++ b/themes/after-dark/layouts/partials/components/cell.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +
{{ .body }}
diff --git a/themes/after-dark/layouts/partials/components/external.html b/themes/after-dark/layouts/partials/components/external.html new file mode 100644 index 0000000..0ee49c3 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/external.html @@ -0,0 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{- /**/ -}} +{{ .body | default (replaceRE "^https?://(.*)" "$1" .href) }} +{{- /**/ -}} diff --git a/themes/after-dark/layouts/partials/components/figure.html b/themes/after-dark/layouts/partials/components/figure.html new file mode 100644 index 0000000..345a2e8 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/figure.html @@ -0,0 +1,53 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + + {{ if .link }} + + {{ else }} + {{- if .lqipsrc -}} + + {{- else -}} + + {{- end -}} + {{ end }} + {{ if or (or .title .caption) .attr }} +
+ {{ with .title }} +
{{ . }}
+ {{ end }} + {{ if or .caption .attr }} + + {{ .caption }} + {{ if .attrlink }} + + {{ .attr }} + + {{ end }} + + {{ end }} +
+ {{ end }} + diff --git a/themes/after-dark/layouts/partials/components/form.html b/themes/after-dark/layouts/partials/components/form.html new file mode 100644 index 0000000..67f7160 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/form.html @@ -0,0 +1,32 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +
+ {{- .body -}} +
diff --git a/themes/after-dark/layouts/partials/components/formactions.html b/themes/after-dark/layouts/partials/components/formactions.html new file mode 100644 index 0000000..46f3658 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/formactions.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +
{{ .body }}
diff --git a/themes/after-dark/layouts/partials/components/formgroup.html b/themes/after-dark/layouts/partials/components/formgroup.html new file mode 100644 index 0000000..89cea0a --- /dev/null +++ b/themes/after-dark/layouts/partials/components/formgroup.html @@ -0,0 +1,27 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +
+ {{ with .legend }}{{ . }}{{ end }} + {{ .body }} +
diff --git a/themes/after-dark/layouts/partials/components/grid.html b/themes/after-dark/layouts/partials/components/grid.html new file mode 100644 index 0000000..daf3e63 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/grid.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +
{{ .body }}
diff --git a/themes/after-dark/layouts/partials/components/helpblock.html b/themes/after-dark/layouts/partials/components/helpblock.html new file mode 100644 index 0000000..4bacc1f --- /dev/null +++ b/themes/after-dark/layouts/partials/components/helpblock.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +
{{ .body }}
diff --git a/themes/after-dark/layouts/partials/components/label.html b/themes/after-dark/layouts/partials/components/label.html new file mode 100644 index 0000000..af7f2fd --- /dev/null +++ b/themes/after-dark/layouts/partials/components/label.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ .body }} diff --git a/themes/after-dark/layouts/partials/components/navmenu.html b/themes/after-dark/layouts/partials/components/navmenu.html new file mode 100644 index 0000000..ab81a01 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/navmenu.html @@ -0,0 +1,30 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ if not (eq .settings.hidden true) }} + +{{ end }} diff --git a/themes/after-dark/layouts/partials/components/progress.html b/themes/after-dark/layouts/partials/components/progress.html new file mode 100644 index 0000000..3e46233 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/progress.html @@ -0,0 +1,30 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ if eq .show_percent "true" }} +
+ {{ with .value }} +
+ {{ end }} +
+{{ else }} +
+
+
+{{ end }} diff --git a/themes/after-dark/layouts/partials/components/select.html b/themes/after-dark/layouts/partials/components/select.html new file mode 100644 index 0000000..acc5fab --- /dev/null +++ b/themes/after-dark/layouts/partials/components/select.html @@ -0,0 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + + {{ with .body }}{{ . }}{{ end }} + diff --git a/themes/after-dark/layouts/partials/components/snippets/textattrs.html b/themes/after-dark/layouts/partials/components/snippets/textattrs.html new file mode 100644 index 0000000..93f7e50 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/snippets/textattrs.html @@ -0,0 +1,42 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $permitted_attrs := .permitted_attrs }} +{{ $boolean_attrs := .boolean_attrs }} +{{ $validations := .validations }} +{{ range $name, $value := .attrs }} + {{ if and (ne $value nil) (in $permitted_attrs $name) }} + {{ if ne "class" $name }} + {{ if in $boolean_attrs $name }} + {{ if eq $value "true" }}{{ $name }}{{ end }} + {{ else if index $validations $name }} + {{ if in (index $validations $name) $value }} + {{ $name }}="{{ $value }}" + {{ end }} + {{ else }} + {{ if eq $name "id" }} + {{ $name }}="{{- $value | urlize -}}" + {{ else }} + {{ $name }}="{{ $value }}" + {{ end }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} +class="form-control{{ with .attrs.class }} {{ . }}{{ end }}" diff --git a/themes/after-dark/layouts/partials/components/textarea.html b/themes/after-dark/layouts/partials/components/textarea.html new file mode 100644 index 0000000..486c2cb --- /dev/null +++ b/themes/after-dark/layouts/partials/components/textarea.html @@ -0,0 +1,25 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $permitted_attrs := .permitted_attrs | default (slice "id" "name" "class" "autocomplete" "autofocus" "cols" "disabled" "form" "maxlength" "minlength" "name" "placeholder" "readonly" "required" "rows" "spellcheck" "wrap" "tabindex") }} +{{ $boolean_attrs := .boolean_attrs | default (slice "autofocus" "disabled" "readonly" "required") }} +{{ $validations := .validations | default (dict "spellcheck" (slice "true" "default" "false") "autocomplete" (slice "on" "off") "wrap" (slice "hard" "soft" "off")) }} + diff --git a/themes/after-dark/layouts/partials/components/textinput.html b/themes/after-dark/layouts/partials/components/textinput.html new file mode 100644 index 0000000..0687446 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/textinput.html @@ -0,0 +1,23 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $permitted_attrs := .permitted_attrs | default (slice "id" "name" "class" "autocomplete" "autofocus" "disabled" "form" "formaction" "formmethod" "formnovalidate" "formtarget" "height" "max" "maxlength" "min" "minlength" "multiple" "pattern" "placeholder" "readonly" "required" "size" "spellcheck" "step" "tabindex" "type" "value" "width") }} +{{ $boolean_attrs := .boolean_attrs | default (slice "autofocus" "disabled" "readonly" "required") }} +{{ $validations := .validations | default (dict "type" (slice "email" "hidden" "number" "password" "search" "tel" "text" "url") "spellcheck" (slice "true" "default" "false") "autocomplete" (slice "off" "on" "name" "honorific-prefix" "given-name" "additional-name" "family-name" "honorific-suffix" "nickname" "email" "username" "new-password" "current-password" "organization-title" "organization" "street-address" "address-line1" "address-line2" "address-line3" "address-level4" "address-level3" "address-level2" "address-level1" "country" "country-name" "postal-code" "cc-name" "cc-given-name" "cc-additional-name" "cc-family-name" "cc-number" "cc-exp" "cc-exp-month" "cc-exp-year" "cc-csc" "cc-type" "transaction-currency" "transaction-amount" "language" "bday" "bday-day" "bday-month" "bday-year" "sex" "tel" "tel-country-code" "tel-national" "tel-area-code" "tel-local" "tel-extension" "email" "impp" "url" "photo")) }} + diff --git a/themes/after-dark/layouts/partials/components/throbber.html b/themes/after-dark/layouts/partials/components/throbber.html new file mode 100644 index 0000000..25744cb --- /dev/null +++ b/themes/after-dark/layouts/partials/components/throbber.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + diff --git a/themes/after-dark/layouts/partials/components/video.html b/themes/after-dark/layouts/partials/components/video.html new file mode 100644 index 0000000..72b2229 --- /dev/null +++ b/themes/after-dark/layouts/partials/components/video.html @@ -0,0 +1,52 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $path := (path.Base .node.RelPermalink) }} +{{ $is_src_relative := not (urls.Parse .src).Host }} +{{ $has_poster := ne .poster nil }} +{{ $is_poster_relative := not (urls.Parse .poster).Host }} + + diff --git a/themes/after-dark/layouts/partials/copyright-notice.html b/themes/after-dark/layouts/partials/copyright-notice.html new file mode 100644 index 0000000..1ac5991 --- /dev/null +++ b/themes/after-dark/layouts/partials/copyright-notice.html @@ -0,0 +1,33 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ if .Site.Copyright }} + {{ with (index .Params "copyright") }} + {{ range . }} + Copyright © {{ .date }} {{ .owner }}. + {{ with (index $.Site.Data.licenses .license) }} + Licensed under {{ partial "components/external.html" (dict "href" .link "body" .shorthand "rel" "external noopener license") }}. + {{ else }} + Copyright © {{ .date }} {{ .owner }}. + {{ end }} + {{ end }} + {{ else }} + {{ .Site.Copyright | safeHTML }} + {{ end }} +{{ end }} diff --git a/themes/after-dark/layouts/partials/global-styles.html b/themes/after-dark/layouts/partials/global-styles.html new file mode 100644 index 0000000..72ccfeb --- /dev/null +++ b/themes/after-dark/layouts/partials/global-styles.html @@ -0,0 +1,72 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $custom := resources.Get "css/custom.css" }} +{{ if eq .Site.Params.hackcss.disabled true }} + {{ with (slice $custom | resources.Concat "styles.css").Content }} + {{ if gt (len .) 0 }} + + {{ partial "meta/theme-color.html" . }} + {{ end }} + {{ end }} +{{ else }} + {{ $hack := resources.Get "css/vendor/hack/hack.css" }} + {{ $standard := resources.Get "css/vendor/hack/standard.css" }} + {{ $dark := resources.Get "css/vendor/hack/dark.css" }} + {{ $darkgrey := resources.Get "css/vendor/hack/dark-grey.css" }} + {{ $solarizeddark := resources.Get "css/vendor/hack/solarized-dark.css" }} + {{ $theme := resources.Get "css/theme.css" | minify }} + {{ if eq .Site.Params.hackcss.palette "dark-grey" }} + {{ if eq .Site.Params.hackcss.mode "standard" }} + {{ with (slice $hack $standard $darkgrey $theme $custom | resources.Concat "styles.css").Content }} + + {{ partial "meta/theme-color.html" . }} + {{ end }} + {{ else }} + {{ with (slice $hack $darkgrey $theme $custom | resources.Concat "styles.css").Content }} + + {{ partial "meta/theme-color.html" . }} + {{ end }} + {{ end }} + {{ else if eq .Site.Params.hackcss.palette "solarized-dark" }} + {{ if eq .Site.Params.hackcss.mode "standard" }} + {{ with (slice $hack $standard $solarizeddark $theme $custom | resources.Concat "styles.css").Content }} + + {{ partial "meta/theme-color.html" . }} + {{ end }} + {{ else }} + {{ with (slice $hack $solarizeddark $theme $custom | resources.Concat "styles.css").Content }} + + {{ partial "meta/theme-color.html" . }} + {{ end }} + {{ end }} + {{ else }} + {{ if eq .Site.Params.hackcss.mode "standard" }} + {{ with (slice $hack $standard $dark $theme $custom | resources.Concat "styles.css").Content }} + + {{ partial "meta/theme-color.html" . }} + {{ end }} + {{ else }} + {{ with (slice $hack $dark $theme $custom | resources.Concat "styles.css").Content }} + + {{ partial "meta/theme-color.html" . }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} diff --git a/themes/after-dark/layouts/partials/head/favicon.html b/themes/after-dark/layouts/partials/head/favicon.html new file mode 100644 index 0000000..a12b57e --- /dev/null +++ b/themes/after-dark/layouts/partials/head/favicon.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + diff --git a/themes/after-dark/layouts/partials/head/modules.html b/themes/after-dark/layouts/partials/head/modules.html new file mode 100644 index 0000000..51c4bfb --- /dev/null +++ b/themes/after-dark/layouts/partials/head/modules.html @@ -0,0 +1,35 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $defaults := .Site.Params.defaults.modules }} +{{ $modules := .Site.Params.modules }} +{{ if (or $modules $defaults) }} + {{ with $modules.fractal_forest }} + {{ partial "modules/fractal-forest/index.html" . }} + {{ end }} + {{ with $modules.hall_of_mirrors }} + {{ partial "modules/hall-of-mirrors/index.html" (dict "settings" . "page" $.Page) }} + {{ end }} + {{ with (default $defaults.toxic_swamp $modules.toxic_swamp) }} + {{ partial "modules/toxic-swamp/index.html" (dict "settings" . "data" $.Site.Data) }} + {{ end }} + {{ with $modules.voyeur }} + {{ partial "modules/voyeur/index.html" . }} + {{ end }} +{{ end }} diff --git a/themes/after-dark/layouts/partials/image/header.html b/themes/after-dark/layouts/partials/image/header.html new file mode 100644 index 0000000..137550f --- /dev/null +++ b/themes/after-dark/layouts/partials/image/header.html @@ -0,0 +1,81 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ with $.Resources.GetMatch "*header*" }} + {{ $meta_sameas := .Params.meta.sameas }} + {{ $meta_license := .Params.meta.license }} + {{ $meta_creator := .Params.meta.creator }} + {{ $meta_description := .Params.meta.description }} + {{ $meta_keywords := .Params.meta.keywords }} + {{ $meta_contentlocation := .Params.meta.contentlocation }} + {{ $image300 := .Fill "300x169 q20 Center" }} + {{ $image600 := .Fill "600x338 q60 Center" }} + {{ $image900 := .Fill "900x506 q70 Center" }} + {{ $image1200 := .Fill "1200x675 q80 Center" }} + {{ $image1600 := .Fill "1600x900 q90 Center" }} + +{{ end }} diff --git a/themes/after-dark/layouts/partials/image/thumbnail.html b/themes/after-dark/layouts/partials/image/thumbnail.html new file mode 100644 index 0000000..1d0b3b2 --- /dev/null +++ b/themes/after-dark/layouts/partials/image/thumbnail.html @@ -0,0 +1,79 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ $valid_processing_methods := (slice "resize" "fit" "fill") }} +{{ $options := .options | default slice }} +{{ $image_processing_method := default "fill" (index $options 0) }} +{{ $image_processing_options := index $options 1 }} +{{ if not (in $valid_processing_methods $image_processing_method) }} + {{ errorf "Invalid thumbnail processing method: Must be one of 'fit', 'fill' or 'resize'." }} +{{ else }} + {{ $scratch := newScratch }} + {{ with .node.Resources.GetMatch "*thumbnail*" }} + {{ $meta_sameas := .Params.meta.sameas }} + {{ $meta_license := .Params.meta.license }} + {{ $meta_creator := .Params.meta.creator }} + {{ $meta_description := .Params.meta.description }} + {{ $meta_keywords := .Params.meta.keywords }} + {{ $meta_contentlocation := .Params.meta.contentlocation }} + {{ if (eq $image_processing_method "resize") }} + {{ $scratch.Set "lodpi" (.Resize (default "400x300 q60 Gaussian" $image_processing_options)) }} + {{ $scratch.Set "hidpi" (.Resize (printf "%dx%d q90 Gaussian" (mul ($scratch.Get "lodpi").Width 2) (mul ($scratch.Get "lodpi").Height 2))) }} + {{ else if (eq $image_processing_method "fit") }} + {{ $scratch.Set "lodpi" (.Fit (default "400x300" $image_processing_options)) }} + {{ $scratch.Set "hidpi" (.Fit (printf "%dx%d" (mul ($scratch.Get "lodpi").Width 2) (mul ($scratch.Get "lodpi").Height 2))) }} + {{ else }} + {{ $scratch.Set "lodpi" (.Fill (default "400x300 Center" $image_processing_options)) }} + {{ $scratch.Set "hidpi" (.Fill (printf "%dx%d Center" (mul ($scratch.Get "lodpi").Width 2) (mul ($scratch.Get "lodpi").Height 2))) }} + {{ end }} + + {{ end }} +{{ end }} diff --git a/themes/after-dark/layouts/partials/masthead.html b/themes/after-dark/layouts/partials/masthead.html new file mode 100644 index 0000000..3ddf976 --- /dev/null +++ b/themes/after-dark/layouts/partials/masthead.html @@ -0,0 +1,30 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $is_section_menu_enabled := ne .Site.Params.show_menu false }} +{{ range $name, $entries := .Site.Menus }} + {{ if or (ne $name "main") (and (eq $name "main") $is_section_menu_enabled) }} + {{ with $.Site.Params.layout.menu }} + {{ $settings := (index . $name) | default dict }} + {{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" $settings "page" $)}} + {{ else }} + {{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" dict "page" $)}} + {{ end }} + {{ end }} +{{ end }} diff --git a/themes/after-dark/layouts/partials/meta/content-security-policy.html b/themes/after-dark/layouts/partials/meta/content-security-policy.html new file mode 100644 index 0000000..bc0a658 --- /dev/null +++ b/themes/after-dark/layouts/partials/meta/content-security-policy.html @@ -0,0 +1,60 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $is_disabled := .Param "disable_csp" }} +{{ $site_directives := .Site.Params.security.csp.directives }} +{{ if and $site_directives (ne $is_disabled true) }} + {{ if ge (len $site_directives) 1 }} + + {{ end }} +{{ else if not $is_disabled }} + +{{ end }} diff --git a/themes/after-dark/layouts/partials/meta/http-referrer.html b/themes/after-dark/layouts/partials/meta/http-referrer.html new file mode 100644 index 0000000..9b97bb2 --- /dev/null +++ b/themes/after-dark/layouts/partials/meta/http-referrer.html @@ -0,0 +1,24 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ with .Site.Params.seo.referrer }} + +{{ else }} + +{{ end }} diff --git a/themes/after-dark/layouts/partials/meta/ogimage-maybe.html b/themes/after-dark/layouts/partials/meta/ogimage-maybe.html new file mode 100644 index 0000000..26d6390 --- /dev/null +++ b/themes/after-dark/layouts/partials/meta/ogimage-maybe.html @@ -0,0 +1,32 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{/* + Hack to allow generic site image for Nodes until supported + by the Hugo internal opengraph template. +*/}} +{{ if and (.IsNode) (.Site.Params.images) }} + +{{ end }} +{{/* + If specified, fallback to site image if not overriden at Page level +*/}} +{{ if and (.IsPage) (not .Params.images) (.Site.Params.images) }} + +{{ end }} diff --git a/themes/after-dark/layouts/partials/meta/telegram-channel-maybe.html b/themes/after-dark/layouts/partials/meta/telegram-channel-maybe.html new file mode 100644 index 0000000..d39ed30 --- /dev/null +++ b/themes/after-dark/layouts/partials/meta/telegram-channel-maybe.html @@ -0,0 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ with .Site.Params.seo.telegram_channel }} + +{{ end }} diff --git a/themes/after-dark/layouts/partials/meta/theme-color.html b/themes/after-dark/layouts/partials/meta/theme-color.html new file mode 100644 index 0000000..b7d9b97 --- /dev/null +++ b/themes/after-dark/layouts/partials/meta/theme-color.html @@ -0,0 +1,28 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $cssvar := "--trim-color:\\s*([^!;}]*).*" }} +{{ $hackbg := "pre{background-color:([^!;}]*).*" }} +{{ with index (findRE $cssvar . 1) 0 }} + +{{ else }} + {{ with index (findRE $hackbg . 1) 0 }} + + {{ end }} +{{ end }} diff --git a/themes/after-dark/layouts/partials/meta/verifications.html b/themes/after-dark/layouts/partials/meta/verifications.html new file mode 100644 index 0000000..bb452a9 --- /dev/null +++ b/themes/after-dark/layouts/partials/meta/verifications.html @@ -0,0 +1,31 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ with .Site.Params.seo.webmaster_verifications.google }} + +{{ end }} +{{ with .Site.Params.seo.webmaster_verifications.bing }} + +{{ end }} +{{ with .Site.Params.seo.webmaster_verifications.alexa }} + +{{ end }} +{{ with .Site.Params.seo.webmaster_verifications.yandex }} + +{{ end }} diff --git a/themes/after-dark/layouts/partials/page-summary.html b/themes/after-dark/layouts/partials/page-summary.html new file mode 100644 index 0000000..4f2dad2 --- /dev/null +++ b/themes/after-dark/layouts/partials/page-summary.html @@ -0,0 +1,51 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $page_schema := .Params.schema }} +{{ $section_schema := (.Site.GetPage "section" .Page.Type).Params.schema }} +{{ $schema_type := (default $section_schema.type $page_schema.type) | default "Thing" }} +{{ $article_types := .Site.Data.schema.article_types }} +{{ $is_typeof_article := in $article_types $schema_type }} +
+
+

+ {{ .Title }} +

+ {{ if eq .Type "post" }} +

{{ partial "post/meta.html" . }}

+ {{ end }} + {{ if .Description }} +
{{ .Description }}
+ {{ end }} +
+
+ {{- .Summary -}} +
+ + + + {{ with .Params.images }} + + {{ end }} +
+{{ if .Truncated }} + +{{ end }} diff --git a/themes/after-dark/layouts/partials/page-thumbs.html b/themes/after-dark/layouts/partials/page-thumbs.html new file mode 100644 index 0000000..db84451 --- /dev/null +++ b/themes/after-dark/layouts/partials/page-thumbs.html @@ -0,0 +1,43 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +
    + + + + {{ $thumbnail_options := .thumbnail_options }} + {{ $show_readingtime := .show_readingtime }} + {{ range first (default .page_count .limit) .pages }} + {{ $page_schema := .Params.schema }} + {{ $section_schema := (.Site.GetPage "section" .Page.Type).Params.schema }} + {{ $schema_type := (default $section_schema.type $page_schema.type) | default "Thing" }} +
  • + + + {{ .Description }} + {{ if $show_readingtime }} + + {{ end }} + +
  • + {{ end }} +
diff --git a/themes/after-dark/layouts/partials/pagination.html b/themes/after-dark/layouts/partials/pagination.html new file mode 100644 index 0000000..b0d5abd --- /dev/null +++ b/themes/after-dark/layouts/partials/pagination.html @@ -0,0 +1,32 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + diff --git a/themes/after-dark/layouts/partials/post/byline.html b/themes/after-dark/layouts/partials/post/byline.html new file mode 100644 index 0000000..71d67be --- /dev/null +++ b/themes/after-dark/layouts/partials/post/byline.html @@ -0,0 +1,39 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +

+ Published + {{ if ne .Site.Params.hide_author true }} + {{ with .Params.author }} + by + {{ else }} + by + {{ end }} + {{ end }} + + {{ with .Params.categories }} + in {{ delimit (apply (apply (sort .) "partial" "post/category-link.html" ".") "chomp" ".") ", " " and " }} + {{ end }} + {{ with .Params.tags }} + and tagged {{ delimit (apply (apply (sort .) "partial" "post/tag-link.html" ".") "chomp" ".") ", " " and " }} + {{ end }} + using {{ .WordCount }} words. +

diff --git a/themes/after-dark/layouts/partials/post/category-link.html b/themes/after-dark/layouts/partials/post/category-link.html new file mode 100644 index 0000000..f57c255 --- /dev/null +++ b/themes/after-dark/layouts/partials/post/category-link.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ . }} diff --git a/themes/after-dark/layouts/partials/post/meta.html b/themes/after-dark/layouts/partials/post/meta.html new file mode 100644 index 0000000..f528670 --- /dev/null +++ b/themes/after-dark/layouts/partials/post/meta.html @@ -0,0 +1,34 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + + + + +{{ .ReadingTime }} minute read + + + +{{ if .PublishDate.IsZero }} + Published: +{{ else if lt .PublishDate .Lastmod }} + Modified: +{{ else }} + Published: +{{ end }} diff --git a/themes/after-dark/layouts/partials/post/related-content.html b/themes/after-dark/layouts/partials/post/related-content.html new file mode 100644 index 0000000..c46975b --- /dev/null +++ b/themes/after-dark/layouts/partials/post/related-content.html @@ -0,0 +1,44 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $limit := (index .Site.Params.layout .Type).related.limit | default .Site.Params.related_content_limit }} +{{ $pages := .Site.RegularPages.Related . | first (default 7 $limit) }} +{{ $page_count := len $pages }} +{{ if and (gt $page_count 1) (ne $limit 0) }} + {{ with $pages }} + + {{ end }} +{{ end }} diff --git a/themes/after-dark/layouts/partials/post/tag-link.html b/themes/after-dark/layouts/partials/post/tag-link.html new file mode 100644 index 0000000..255f32e --- /dev/null +++ b/themes/after-dark/layouts/partials/post/tag-link.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + diff --git a/themes/after-dark/layouts/partials/toc-maybe.html b/themes/after-dark/layouts/partials/toc-maybe.html new file mode 100644 index 0000000..00b9460 --- /dev/null +++ b/themes/after-dark/layouts/partials/toc-maybe.html @@ -0,0 +1,25 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ if and (isset .Params "toc") .Params.toc }} +
+ Table of Contents + {{ .TableOfContents }} +
+{{ end }} diff --git a/themes/after-dark/layouts/post/list.html b/themes/after-dark/layouts/post/list.html new file mode 100644 index 0000000..d401c2a --- /dev/null +++ b/themes/after-dark/layouts/post/list.html @@ -0,0 +1,66 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+
+ {{ $scratch := newScratch }} + {{ with (index .Site.Params.layout .Type).featured }} + {{ $scratch.Add "featured" slice }} + {{ range first .limit .items }} + {{ $scratch.Add "featured" (site.GetPage .) }} + {{ end }} + {{ if ge (len ($scratch.Get "featured")) 1 }} + {{ if ne $.Site.Params.hackcss.disabled true }} + {{ with resources.Get "css/conditional/layouts/partials/page-thumbs.css" | minify }} + + {{ end }} + {{ end }} +
+ {{ $index := site.GetPage "section" $.Type }} + {{ $pages := $scratch.Get "featured" }} + {{ $page_count := default 1 (len $pages) }} + {{ if eq $page_count 1 }} + {{ partial "page-summary.html" $index }} + {{ else if gt $page_count 1 }} +
+

+ Featured {{ $index.Title }} +

+
{{ $index.Description }}
+
+ {{ partial "page-thumbs.html" (dict "thumbnail_options" .thumbs "page_count" $page_count "limit" .limit "pages" $pages) }} + {{ end }} +
+ {{ end }} + {{ end }} + {{ range (.Paginate (collections.SymDiff .Pages (default slice ($scratch.Get "featured")))).Pages }} + {{ partial "page-summary.html" . }} + {{ end }} +{{ end }} +{{ define "footer" }} +

{{ partial "pagination.html" . }}

+ + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/layouts/post/single.html b/themes/after-dark/layouts/post/single.html new file mode 100644 index 0000000..977669f --- /dev/null +++ b/themes/after-dark/layouts/post/single.html @@ -0,0 +1,56 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ define "header" }} + {{ partial "masthead.html" . }} +{{ end }} +{{ define "main" }} + {{ if ne $.Site.Params.hackcss.disabled true }} + {{ with resources.Get "css/conditional/layouts/post/single.css" | minify }} + + {{ end }} + {{ end }} +
+ {{ template "_internal/schema.html" . }} +
+

{{ .Title }}

+

+ {{ partial "post/meta.html" . }} +

+ {{ if .Description }} +
{{ .Description }}
+ {{ end }} + {{ partial "image/header.html" . }} +
+ {{ partial "toc-maybe.html" . }} +
+ {{ .Content }} +
+
+
+ {{ partial "post/byline.html" . }} + {{ partial "post/related-content.html" . }} +
+
+{{ end }} +{{ define "footer" }} + + {{ partial "copyright-notice.html" . }} + +{{ end }} diff --git a/themes/after-dark/layouts/shortcodes/blockquote.html b/themes/after-dark/layouts/shortcodes/blockquote.html new file mode 100644 index 0000000..f73b1cb --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/blockquote.html @@ -0,0 +1,34 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $_hugo_config := `{ "version": 1 }` }} +{{ $body := .Get "text" | default .Inner }} +{{ $class := .Get "class" }} +{{ $citelink := .Get "citelink" }} +{{ $cite := .Get "cite" }} + +

{{- $body | plainify -}}

+ {{ if $citelink }} + {{ partial "components/external.html" (dict "href" $citelink "body" $cite) }} + {{ else if $cite }} + {{ $cite }} + {{ else }} + N.N. + {{ end }} + diff --git a/themes/after-dark/layouts/shortcodes/external.html b/themes/after-dark/layouts/shortcodes/external.html new file mode 100644 index 0000000..f6e3c41 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/external.html @@ -0,0 +1,40 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $_hugo_config := `{ "version": 1 }` }} +{{ $href := .Get "href" | default nil -}} +{{ $body := .Get "text" | default .Inner -}} +{{ $class := .Get "class" -}} +{{ $referrerpolicy := .Get "referrerpolicy" -}} +{{ $target := .Get "target" -}} +{{ $title := .Get "title" -}} +{{ $type := .Get "type" -}} +{{ $rel := .Get "rel" -}} +{{ $itemtype := .Get "itemtype" -}} +{{ $trusted := .Get "trusted" -}} +{{- if .IsNamedParams -}} + {{ partial "components/external.html" (dict "href" $href "body" $body "class" $class "referrerpolicy" $referrerpolicy "target" $target "type" $type "title" $title "rel" $rel "itemtype" $itemtype "trusted" $trusted "suppress_external" (and .Inner (eq (len (findRE "external" $rel)) 0))) }} +{{- else if gt (len .Params) 1 -}} + {{ partial "components/external.html" (dict "href" (.Get 0) "body" (.Get 1)) }} +{{- else -}} + {{ partial "components/external.html" (dict "href" (.Get 0)) }} +{{- end -}} +{{- if or (and .IsNamedParams (eq $href nil)) (and (eq .IsNamedParams false) (eq (.Get 0) nil)) }} +

{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid use of external shortcode. Please provide a URL.")) }}

+{{ end -}} diff --git a/themes/after-dark/layouts/shortcodes/figure.html b/themes/after-dark/layouts/shortcodes/figure.html new file mode 100644 index 0000000..b75a289 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/figure.html @@ -0,0 +1,30 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $src := .Get "src" }} +{{ $lqipsrc := .Get "lqipsrc" }} +{{ $caption := .Get "caption" }} +{{ $link := .Get "link" }} +{{ $linktarget := .Get "linktarget" }} +{{ $attr := .Get "attr" }} +{{ $attrlink := .Get "attrlink" }} +{{ $alt := .Get "alt" }} +{{ $title := .Get "title" }} +{{ $class := .Get "class" }} +{{ partial "components/figure.html" (dict "src" $src "lqipsrc" $lqipsrc "caption" $caption "link" $link "linktarget" $linktarget "attr" $attr "attrlink" $attrlink "alt" $alt "title" $title "class" $class) }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-alert.html b/themes/after-dark/layouts/shortcodes/hackcss-alert.html new file mode 100644 index 0000000..cf4e060 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-alert.html @@ -0,0 +1,24 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $_hugo_config := `{ "version": 1 }` }} +{{ $type := .Get "type" }} +{{ $class := .Get "class" }} +{{ $body := .Get "text" | default .Inner }} +{{ partial "components/alert.html" (dict "type" $type "class" $class "body" $body) }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-button.html b/themes/after-dark/layouts/shortcodes/hackcss-button.html new file mode 100644 index 0000000..57609e4 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-button.html @@ -0,0 +1,35 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $type := .Get "type" }} +{{ $body := .Get "text" | default .Inner }} +{{ $isghost := .Get "isghost" }} +{{ $isblock := .Get "isblock" }} +{{ $id := .Get "id" }} +{{ $name := .Get "name" }} +{{ $class := .Get "class" }} +{{ $action := .Get "action" }} +{{ $form := .Get "form" }} +{{ $value := .Get "value" }} +{{ $onclick := .Get "onclick" }} +{{ $disabled := .Get "disabled" }} +{{ $tabindex := .Get "tabindex" }} +{{ $target := .Get "target" }} +{{ $method := .Get "method" }} +{{ partial "components/button.html" (dict "type" $type "body" $body "isghost" $isghost "isblock" $isblock "action" $action "form" $form "value" $value "onclick" $onclick "id" $id "name" $name "class" $class "disabled" $disabled "tabindex" $tabindex "target" $target "method" $method) }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-buttongroup.html b/themes/after-dark/layouts/shortcodes/hackcss-buttongroup.html new file mode 100644 index 0000000..fa6f2f2 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-buttongroup.html @@ -0,0 +1,23 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $formactions := .Get "formactions" }} +{{ $class := .Get "class" }} +{{ $body := .Inner }} +{{ partial "components/buttongroup.html" (dict "formactions" $formactions "class" $class "body" $body) }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-card.html b/themes/after-dark/layouts/shortcodes/hackcss-card.html new file mode 100644 index 0000000..5bf26ba --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-card.html @@ -0,0 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/}} + +{{ $header := .Get "header" }} +{{ $body := .Get "text" | default .Inner }} +{{ partial "components/card.html" (dict "header" $header "body" $body) }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-cell.html b/themes/after-dark/layouts/shortcodes/hackcss-cell.html new file mode 100644 index 0000000..5850404 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-cell.html @@ -0,0 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $class := .Get "class" }} +{{ $body := .Get "text" | default .Inner }} +{{- partial "components/cell.html" (dict "class" $class "body" $body) -}} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-form.html b/themes/after-dark/layouts/shortcodes/hackcss-form.html new file mode 100644 index 0000000..fd059c2 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-form.html @@ -0,0 +1,34 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $accept_charset := .Get "acceptcharset" }} +{{ $id := .Get "id" }} +{{ $name := .Get "name" }} +{{ $action := .Get "action" }} +{{ $enctype := .Get "enctype" }} +{{ $target := .Get "target" }} +{{ $novalidate := .Get "novalidate" }} +{{ $autocomplete := .Get "autocomplete" }} +{{ $method := .Get "method" }} +{{ $class := .Get "class" }} +{{ $body := .Inner }} +{{ partial "components/form.html" (dict "id" $id "name" $name "accept_charset" $accept_charset "action" $action "enctype" $enctype "target" $target "novalidate" $novalidate "method" $method "class" $class "body" $body) }} +{{ if eq "false" $autocomplete }} +

{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid autocomplete value for form. Did you mean \"off\" instead of %q?" $autocomplete)) }}

+{{ end }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-formgroup.html b/themes/after-dark/layouts/shortcodes/hackcss-formgroup.html new file mode 100644 index 0000000..39f36df --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-formgroup.html @@ -0,0 +1,28 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $hastextarea := .Get "hastextarea" }} +{{ $state := .Get "state" }} +{{ $disabled := .Get "disabled" }} +{{ $form := .Get "form" }} +{{ $name := .Get "name" }} +{{ $class := .Get "class" }} +{{ $legend := .Get "legend" }} +{{ $body := .Get "body" | default .Inner }} +{{ partial "components/formgroup.html" (dict "hastextarea" $hastextarea "state" $state "class" $class "disabled" $disabled "form" $form "name" $name "legend" $legend "body" $body) }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-grid.html b/themes/after-dark/layouts/shortcodes/hackcss-grid.html new file mode 100644 index 0000000..b6135c0 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-grid.html @@ -0,0 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $class := .Get "class" }} +{{ $body := .Inner }} +{{- partial "components/grid.html" (dict "class" $class "body" $body) -}} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-helpblock.html b/themes/after-dark/layouts/shortcodes/hackcss-helpblock.html new file mode 100644 index 0000000..abfe793 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-helpblock.html @@ -0,0 +1,22 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $class := .Get "class" }} +{{ $body := .Get "text" | default .Inner }} +{{ partial "components/helpblock.html" (dict "class" $class "body" $body) }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-label.html b/themes/after-dark/layouts/shortcodes/hackcss-label.html new file mode 100644 index 0000000..43f92bf --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-label.html @@ -0,0 +1,23 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $for := .Get "for" }} +{{ $form := .Get "form" }} +{{ $body := .Get "text" | default .Inner }} +{{ partial "components/label.html" (dict "for" $for "form" $form "body" $body) }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-progress.html b/themes/after-dark/layouts/shortcodes/hackcss-progress.html new file mode 100644 index 0000000..e95d109 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-progress.html @@ -0,0 +1,23 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $show_percent := .Get "showpercent" }} +{{ $fill_text := .Get "filltext" | default "Loading" }} +{{ $value := .Get "value" }} +{{ partial "components/progress.html" (dict "show_percent" $show_percent "fill_text" $fill_text "value" $value) }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-select.html b/themes/after-dark/layouts/shortcodes/hackcss-select.html new file mode 100644 index 0000000..ce94bb0 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-select.html @@ -0,0 +1,26 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $id := .Get "id" }} +{{ $name := .Get "name" }} +{{ $class := .Get "class" }} +{{ $disabled := .Get "disabled" }} +{{ $form := .Get "form" }} +{{ $body := .Get "body" | default .Inner }} +{{ partial "components/select.html" (dict "id" $id "name" $name "class" $class "disabled" $disabled "body" $body) }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-textarea.html b/themes/after-dark/layouts/shortcodes/hackcss-textarea.html new file mode 100644 index 0000000..3e792b9 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-textarea.html @@ -0,0 +1,44 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $id := .Get "id" | default nil }} +{{ $name := .Get "name" | default nil }} +{{ $class := .Get "class" | default nil }} +{{ $autocomplete := .Get "autocomplete" | default nil }} +{{ $autofocus := .Get "autofocus" | default nil }} +{{ $cols := .Get "cols" | default nil }} +{{ $disabled := .Get "disabled" | default nil }} +{{ $form := .Get "form" | default nil }} +{{ $maxlength := .Get "maxlength" | default nil }} +{{ $minlength := .Get "minlength" | default nil }} +{{ $placeholder := .Get "placeholder" | default nil }} +{{ $readonly := .Get "readonly" | default nil }} +{{ $required := .Get "required" | default nil }} +{{ $rows := .Get "rows" | default nil }} +{{ $spellcheck := .Get "spellcheck" | default nil }} +{{ $wrap := .Get "wrap" | default nil }} +{{ $tabindex := .Get "tabindex" | default nil }} +{{ $body := .Get "text" | default nil }} +{{ partial "components/textarea.html" (dict "body" $body "attrs" (dict "id" $id "name" $name "class" $class "autocomplete" $autocomplete "autofocus" $autofocus "cols" $cols "disabled" $disabled "form" $form "maxlength" $maxlength "minlength" $minlength "placeholder" $placeholder "readonly" $readonly "required" $required "rows" $rows "spellcheck" $spellcheck "wrap" $wrap "tabindex" $tabindex)) }} +{{ if eq "false" $autocomplete }} +

{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid autocomplete value for textarea. Did you mean \"off\" instead of %q?" $autocomplete)) }}

+{{ end }} +{{ if eq "false" $wrap }} +

{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid wrap value for textarea. Did you mean \"off\" instead of %q?" $wrap)) }}

+{{ end }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-textinput.html b/themes/after-dark/layouts/shortcodes/hackcss-textinput.html new file mode 100644 index 0000000..229df41 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-textinput.html @@ -0,0 +1,50 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $id := .Get "id" | default nil }} +{{ $name := .Get "name" | default nil }} +{{ $class := .Get "class" | default nil }} +{{ $autocomplete := .Get "autocomplete" | default nil }} +{{ $autofocus := .Get "autofocus" | default nil }} +{{ $disabled := .Get "disabled" | default nil }} +{{ $form := .Get "form" | default nil }} +{{ $formaction := .Get "formaction" | default nil }} +{{ $formmethod := .Get "formmethod" | default nil }} +{{ $formtarget := .Get "formtarget" | default nil }} +{{ $height := .Get "height" | default nil }} +{{ $max := .Get "max" | default nil }} +{{ $maxlength := .Get "maxlength" | default nil }} +{{ $min := .Get "min" | default nil }} +{{ $minlength := .Get "minlength" | default nil }} +{{ $multiple := .Get "multiple" | default nil }} +{{ $pattern := .Get "pattern" | default nil }} +{{ $placeholder := .Get "placeholder" | default nil }} +{{ $readonly := .Get "readonly" | default nil }} +{{ $required := .Get "required" | default nil }} +{{ $size := .Get "size" | default nil }} +{{ $spellcheck := .Get "spellcheck" | default nil }} +{{ $step := .Get "step" | default nil }} +{{ $tabindex := .Get "tabindex" | default nil }} +{{ $type := .Get "type" | default nil }} +{{ $value := .Get "value" | default nil }} +{{ $width := .Get "width" | default nil }} +{{ partial "components/textinput.html" (dict "attrs" (dict "id" $id "name" $name "class" $class "autocomplete" $autocomplete "autofocus" $autofocus "disabled" $disabled "form" $form "formaction" $formaction "formmethod" $formmethod "formtarget" $formtarget "height" $height "max" $max "maxlength" $maxlength "min" $min "minlength" $minlength "multiple" $multiple "pattern" $pattern "placeholder" $placeholder "readonly" $readonly "required" $required "size" $size "spellcheck" $spellcheck "step" $step "tabindex" $tabindex "type" $type "value" $value "width" $width)) }} +{{ if eq "false" $autocomplete }} +

{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid autocomplete value for textinput. Did you mean \"off\" instead of %q?" $autocomplete)) }}

+{{ end }} diff --git a/themes/after-dark/layouts/shortcodes/hackcss-throbber.html b/themes/after-dark/layouts/shortcodes/hackcss-throbber.html new file mode 100644 index 0000000..91a88b1 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/hackcss-throbber.html @@ -0,0 +1,20 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ partial "components/throbber.html" . }} diff --git a/themes/after-dark/layouts/shortcodes/navmenu.html b/themes/after-dark/layouts/shortcodes/navmenu.html new file mode 100644 index 0000000..3dca68b --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/navmenu.html @@ -0,0 +1,39 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + + + +{{ $name := .Get 0 | default "main" }} +{{ $entries := index .Site.Menus $name }} +{{ $page := .Page.Page }} +{{ with $.Site.Params.layout.menu }} + {{ $settings := index . $name | default dict }} + {{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" $settings "page" $page)}} +{{ else }} + {{ partial "components/navmenu.html" (dict "name" $name "entries" $entries "settings" dict "page" $page)}} +{{ end }} diff --git a/themes/after-dark/layouts/shortcodes/video.html b/themes/after-dark/layouts/shortcodes/video.html new file mode 100644 index 0000000..0f6ff97 --- /dev/null +++ b/themes/after-dark/layouts/shortcodes/video.html @@ -0,0 +1,34 @@ +{{/* +Copyright (C) 2019 Josh Habdas + +This file is part of After Dark. + +After Dark is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +After Dark is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ -}} + +{{ $class := .Get "class" }} +{{ $autoplay := .Get "autoplay" }} +{{ $controls := .Get "controls" }} +{{ $crossorigin := .Get "crossorigin" }} +{{ $height := .Get "height" }} +{{ $loop := .Get "loop" }} +{{ $muted := .Get "muted" }} +{{ $preload := .Get "preload" }} +{{ $intrinsicsize := .Get "intrinsicsize" }} +{{ $poster := .Get "poster" }} +{{ $src := .Get "src" }} +{{ $width := .Get "width" }} +{{ $playsinline := .Get "playsinline" }} + +{{ partial "components/video.html" (dict "class" $class "autoplay" $autoplay "controls" $controls "crossorigin" $crossorigin "height" $height "loop" $loop "muted" $muted "preload" $preload "intrinsicsize" $intrinsicsize "poster" $poster "src" $src "width" $width "playsinline" $playsinline "node" .Page) }} diff --git a/themes/after-dark/package.json b/themes/after-dark/package.json new file mode 100644 index 0000000..435bbab --- /dev/null +++ b/themes/after-dark/package.json @@ -0,0 +1,55 @@ +{ + "name": "after-dark", + "version": "9.2.3", + "description": "Hugo Dark Theme Site Generator", + "author": "Josh Habdas (https://habd.as)", + "keywords": [ + "hugo", + "dark", + "theme", + "website", + "blog" + ], + "homepage": "https://after-dark.habd.as", + "repository": { + "type": "git", + "url": "https://git.habd.as/comfusion/after-dark.git" + }, + "standard-version": { + "scripts": { + "posttag": "git tag --sign $(git describe --tags $(git rev-list --tags --max-count=1)) $(git describe --tags $(git rev-list --tags --max-count=1))^{} -f -m \"$(git log -1 --pretty=%B)\" -m \"-----BEGIN DIST INTEGRITY-----\" -m \"$(npm pack --dry-run --json . | grep integrity | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '\" ')\" -m \"-----END DIST INTEGRITY-----\"" + } + }, + "scripts": { + "update:lazysizes": "npm up lazysizes && cp -i node_modules/lazysizes/lazysizes.min.js static/js", + "update:lodash:custom": "./node_modules/.bin/lodash include=debounce -p -o static/js/lodash.custom.min.js", + "update:fuse": "npm up fuse.js && cp -i node_modules/fuse.js/dist/fuse.js static/js/fuse.min.js", + "update:vue": "npm up vue && cp -i node_modules/vue/dist/vue.min.js static/js", + "update:mark": "npm up mark.js && cp -i node_modules/mark.js/dist/mark.min.js static/js", + "update:hackcss": "npm up hackcss && cp -ir node_modules/hack/dist/ assets/css/vendor/hack/", + "update:fetch-inject": "npm up fetch-inject && cp -i node_modules/fetch-inject/dist/fetch-inject.min.js assets/js/vendor/fetch-inject.min.js", + "test": "while true; do head -n 100 /dev/urandom; sleep 0.1; done | hexdump -C | grep 'ca fe'", + "integrity": "npm pack --dry-run --json . | grep integrity | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '\" '", + "release": "standard-version", + "commit": "npx git-cz" + }, + "devDependencies": { + "atom-one-chroma": "^2.0.0", + "commitizen": "^4.2.2", + "cz-conventional-changelog": "^3.3.0", + "fetch-inject": "^2.0.4", + "fuse.js": "^6.4.5", + "hack": "^0.8.1", + "lazysizes": "^5.3.0", + "lodash-cli": "^4.17.5", + "mark.js": "^8.11.1", + "standard-version": "^9.1.0", + "vue": "^2.6.12" + }, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } + }, + "license": "AGPL-3.0-or-later" +} diff --git a/themes/after-dark/static/css/syntax.css b/themes/after-dark/static/css/syntax.css new file mode 100644 index 0000000..732bf56 --- /dev/null +++ b/themes/after-dark/static/css/syntax.css @@ -0,0 +1 @@ +.highlight,pre.highlight{background:#000;color:#abb2bf}.highlight pre{background:#000}.highlight .ge{font-style:italic}.highlight .gs{font-weight:700}.highlight .ow{font-weight:700}.highlight .n,.highlight .nf,.highlight .nn,.highlight .o,.highlight .p{color:#abb2bf}.highlight .c,.highlight .c1,.highlight .cm,.highlight .cp,.highlight .cs{color:#5c6370;font-style:italic}.highlight .sr,.highlight .ss{color:#56b6c2}.highlight .k,.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{color:#c678dd}.highlight .l,.highlight .ld,.highlight .s,.highlight .s1,.highlight .s2,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sx{color:#98c379}.highlight .nt,.highlight .nx,.highlight .vi{color:#e06c75}.highlight .il,.highlight .m,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo,.highlight .na{color:#d19a66}.highlight .bp,.highlight .nb,.highlight .nc,.highlight .nd,.highlight .ne,.highlight .ni,.highlight .nl,.highlight .no,.highlight .nv,.highlight .py,.highlight .vc,.highlight .vg{color:#e5c07b}.highlight .err{color:#fff;background-color:#e05252}.highlight .gd{color:#e05252}.highlight .gi{color:#43d08a}.highlight .w{color:#f8f8f2}.highlight .cpf{color:navy}.highlight .gu{color:#75715e}.highlight .lineno{color:#636d83;user-select:none}.highlight .ln{color:#636d83;user-select:none}.highlight .ln:after{content:" "}.highlight .hll{color:#abb2bf;background-color:#3a3f4b}.highlight .hl{color:#abb2bf;background-color:#3a3f4b}.highlight .language-json .w+.s2{color:#e06c75}.highlight .language-json .kc{color:#56b6c2} diff --git a/themes/after-dark/static/images/logo-dark.png b/themes/after-dark/static/images/logo-dark.png new file mode 100644 index 0000000..c2dc193 Binary files /dev/null and b/themes/after-dark/static/images/logo-dark.png differ diff --git a/themes/after-dark/static/images/logo-dark.svg b/themes/after-dark/static/images/logo-dark.svg new file mode 100644 index 0000000..7cc242e --- /dev/null +++ b/themes/after-dark/static/images/logo-dark.svg @@ -0,0 +1,143 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/after-dark/static/js/fuse.min.js b/themes/after-dark/static/js/fuse.min.js new file mode 100644 index 0000000..41a0ebd --- /dev/null +++ b/themes/after-dark/static/js/fuse.min.js @@ -0,0 +1,2252 @@ +/** + * Fuse.js v6.4.5 - Lightweight fuzzy-search (http://fusejs.io) + * + * Copyright (c) 2021 Kiro Risk (http://kiro.me) + * All Rights Reserved. Apache Software License 2.0 + * + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Fuse = factory()); +}(this, (function () { 'use strict'; + + function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + } + + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + + return keys; + } + + function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } + } + + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); + } + + function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + + return function _createSuperInternal() { + var Super = _getPrototypeOf(Derived), + result; + + if (hasNativeReflectConstruct) { + var NewTarget = _getPrototypeOf(this).constructor; + + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possibleConstructorReturn(this, result); + }; + } + + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + + function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; + } + + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + function isArray(value) { + return !Array.isArray ? getTag(value) === '[object Array]' : Array.isArray(value); + } // Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js + + var INFINITY = 1 / 0; + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + + var result = value + ''; + return result == '0' && 1 / value == -INFINITY ? '-0' : result; + } + function toString(value) { + return value == null ? '' : baseToString(value); + } + function isString(value) { + return typeof value === 'string'; + } + function isNumber(value) { + return typeof value === 'number'; + } // Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js + + function isBoolean(value) { + return value === true || value === false || isObjectLike(value) && getTag(value) == '[object Boolean]'; + } + function isObject(value) { + return _typeof(value) === 'object'; + } // Checks if `value` is object-like. + + function isObjectLike(value) { + return isObject(value) && value !== null; + } + function isDefined(value) { + return value !== undefined && value !== null; + } + function isBlank(value) { + return !value.trim().length; + } // Gets the `toStringTag` of `value`. + // Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js + + function getTag(value) { + return value == null ? value === undefined ? '[object Undefined]' : '[object Null]' : Object.prototype.toString.call(value); + } + + var EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available'; + var INCORRECT_INDEX_TYPE = "Incorrect 'index' type"; + var LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = function LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key) { + return "Invalid value for key ".concat(key); + }; + var PATTERN_LENGTH_TOO_LARGE = function PATTERN_LENGTH_TOO_LARGE(max) { + return "Pattern length exceeds max of ".concat(max, "."); + }; + var MISSING_KEY_PROPERTY = function MISSING_KEY_PROPERTY(name) { + return "Missing ".concat(name, " property in key"); + }; + var INVALID_KEY_WEIGHT_VALUE = function INVALID_KEY_WEIGHT_VALUE(key) { + return "Property 'weight' in key '".concat(key, "' must be a positive integer"); + }; + + var hasOwn = Object.prototype.hasOwnProperty; + + var KeyStore = /*#__PURE__*/function () { + function KeyStore(keys) { + var _this = this; + + _classCallCheck(this, KeyStore); + + this._keys = []; + this._keyMap = {}; + var totalWeight = 0; + keys.forEach(function (key) { + var obj = createKey(key); + totalWeight += obj.weight; + + _this._keys.push(obj); + + _this._keyMap[obj.id] = obj; + totalWeight += obj.weight; + }); // Normalize weights so that their sum is equal to 1 + + this._keys.forEach(function (key) { + key.weight /= totalWeight; + }); + } + + _createClass(KeyStore, [{ + key: "get", + value: function get(keyId) { + return this._keyMap[keyId]; + } + }, { + key: "keys", + value: function keys() { + return this._keys; + } + }, { + key: "toJSON", + value: function toJSON() { + return JSON.stringify(this._keys); + } + }]); + + return KeyStore; + }(); + function createKey(key) { + var path = null; + var id = null; + var src = null; + var weight = 1; + + if (isString(key) || isArray(key)) { + src = key; + path = createKeyPath(key); + id = createKeyId(key); + } else { + if (!hasOwn.call(key, 'name')) { + throw new Error(MISSING_KEY_PROPERTY('name')); + } + + var name = key.name; + src = name; + + if (hasOwn.call(key, 'weight')) { + weight = key.weight; + + if (weight <= 0) { + throw new Error(INVALID_KEY_WEIGHT_VALUE(name)); + } + } + + path = createKeyPath(name); + id = createKeyId(name); + } + + return { + path: path, + id: id, + weight: weight, + src: src + }; + } + function createKeyPath(key) { + return isArray(key) ? key : key.split('.'); + } + function createKeyId(key) { + return isArray(key) ? key.join('.') : key; + } + + function get(obj, path) { + var list = []; + var arr = false; + + var deepGet = function deepGet(obj, path, index) { + if (!isDefined(obj)) { + return; + } + + if (!path[index]) { + // If there's no path left, we've arrived at the object we care about. + list.push(obj); + } else { + var key = path[index]; + var value = obj[key]; + + if (!isDefined(value)) { + return; + } // If we're at the last value in the path, and if it's a string/number/bool, + // add it to the list + + + if (index === path.length - 1 && (isString(value) || isNumber(value) || isBoolean(value))) { + list.push(toString(value)); + } else if (isArray(value)) { + arr = true; // Search each item in the array. + + for (var i = 0, len = value.length; i < len; i += 1) { + deepGet(value[i], path, index + 1); + } + } else if (path.length) { + // An object. Recurse further. + deepGet(value, path, index + 1); + } + } + }; // Backwards compatibility (since path used to be a string) + + + deepGet(obj, isString(path) ? path.split('.') : path, 0); + return arr ? list : list[0]; + } + + var MatchOptions = { + // Whether the matches should be included in the result set. When `true`, each record in the result + // set will include the indices of the matched characters. + // These can consequently be used for highlighting purposes. + includeMatches: false, + // When `true`, the matching function will continue to the end of a search pattern even if + // a perfect match has already been located in the string. + findAllMatches: false, + // Minimum number of characters that must be matched before a result is considered a match + minMatchCharLength: 1 + }; + var BasicOptions = { + // When `true`, the algorithm continues searching to the end of the input even if a perfect + // match is found before the end of the same input. + isCaseSensitive: false, + // When true, the matching function will continue to the end of a search pattern even if + includeScore: false, + // List of properties that will be searched. This also supports nested properties. + keys: [], + // Whether to sort the result list, by score + shouldSort: true, + // Default sort function: sort by ascending score, ascending index + sortFn: function sortFn(a, b) { + return a.score === b.score ? a.idx < b.idx ? -1 : 1 : a.score < b.score ? -1 : 1; + } + }; + var FuzzyOptions = { + // Approximately where in the text is the pattern expected to be found? + location: 0, + // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match + // (of both letters and location), a threshold of '1.0' would match anything. + threshold: 0.6, + // Determines how close the match must be to the fuzzy location (specified above). + // An exact letter match which is 'distance' characters away from the fuzzy location + // would score as a complete mismatch. A distance of '0' requires the match be at + // the exact location specified, a threshold of '1000' would require a perfect match + // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold. + distance: 100 + }; + var AdvancedOptions = { + // When `true`, it enables the use of unix-like search commands + useExtendedSearch: false, + // The get function to use when fetching an object's properties. + // The default will search nested paths *ie foo.bar.baz* + getFn: get, + // When `true`, search will ignore `location` and `distance`, so it won't matter + // where in the string the pattern appears. + // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score + ignoreLocation: false, + // When `true`, the calculation for the relevance score (used for sorting) will + // ignore the field-length norm. + // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm + ignoreFieldNorm: false + }; + var Config = _objectSpread2({}, BasicOptions, {}, MatchOptions, {}, FuzzyOptions, {}, AdvancedOptions); + + var SPACE = /[^ ]+/g; // Field-length norm: the shorter the field, the higher the weight. + // Set to 3 decimals to reduce index size. + + function norm() { + var mantissa = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3; + var cache = new Map(); + return { + get: function get(value) { + var numTokens = value.match(SPACE).length; + + if (cache.has(numTokens)) { + return cache.get(numTokens); + } + + var n = parseFloat((1 / Math.sqrt(numTokens)).toFixed(mantissa)); + cache.set(numTokens, n); + return n; + }, + clear: function clear() { + cache.clear(); + } + }; + } + + var FuseIndex = /*#__PURE__*/function () { + function FuseIndex() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref$getFn = _ref.getFn, + getFn = _ref$getFn === void 0 ? Config.getFn : _ref$getFn; + + _classCallCheck(this, FuseIndex); + + this.norm = norm(3); + this.getFn = getFn; + this.isCreated = false; + this.setIndexRecords(); + } + + _createClass(FuseIndex, [{ + key: "setSources", + value: function setSources() { + var docs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + this.docs = docs; + } + }, { + key: "setIndexRecords", + value: function setIndexRecords() { + var records = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + this.records = records; + } + }, { + key: "setKeys", + value: function setKeys() { + var _this = this; + + var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + this.keys = keys; + this._keysMap = {}; + keys.forEach(function (key, idx) { + _this._keysMap[key.id] = idx; + }); + } + }, { + key: "create", + value: function create() { + var _this2 = this; + + if (this.isCreated || !this.docs.length) { + return; + } + + this.isCreated = true; // List is Array + + if (isString(this.docs[0])) { + this.docs.forEach(function (doc, docIndex) { + _this2._addString(doc, docIndex); + }); + } else { + // List is Array + this.docs.forEach(function (doc, docIndex) { + _this2._addObject(doc, docIndex); + }); + } + + this.norm.clear(); + } // Adds a doc to the end of the index + + }, { + key: "add", + value: function add(doc) { + var idx = this.size(); + + if (isString(doc)) { + this._addString(doc, idx); + } else { + this._addObject(doc, idx); + } + } // Removes the doc at the specified index of the index + + }, { + key: "removeAt", + value: function removeAt(idx) { + this.records.splice(idx, 1); // Change ref index of every subsquent doc + + for (var i = idx, len = this.size(); i < len; i += 1) { + this.records[i].i -= 1; + } + } + }, { + key: "getValueForItemAtKeyId", + value: function getValueForItemAtKeyId(item, keyId) { + return item[this._keysMap[keyId]]; + } + }, { + key: "size", + value: function size() { + return this.records.length; + } + }, { + key: "_addString", + value: function _addString(doc, docIndex) { + if (!isDefined(doc) || isBlank(doc)) { + return; + } + + var record = { + v: doc, + i: docIndex, + n: this.norm.get(doc) + }; + this.records.push(record); + } + }, { + key: "_addObject", + value: function _addObject(doc, docIndex) { + var _this3 = this; + + var record = { + i: docIndex, + $: {} + }; // Iterate over every key (i.e, path), and fetch the value at that key + + this.keys.forEach(function (key, keyIndex) { + // console.log(key) + var value = _this3.getFn(doc, key.path); + + if (!isDefined(value)) { + return; + } + + if (isArray(value)) { + (function () { + var subRecords = []; + var stack = [{ + nestedArrIndex: -1, + value: value + }]; + + while (stack.length) { + var _stack$pop = stack.pop(), + nestedArrIndex = _stack$pop.nestedArrIndex, + _value = _stack$pop.value; + + if (!isDefined(_value)) { + continue; + } + + if (isString(_value) && !isBlank(_value)) { + var subRecord = { + v: _value, + i: nestedArrIndex, + n: _this3.norm.get(_value) + }; + subRecords.push(subRecord); + } else if (isArray(_value)) { + _value.forEach(function (item, k) { + stack.push({ + nestedArrIndex: k, + value: item + }); + }); + } + } + + record.$[keyIndex] = subRecords; + })(); + } else if (!isBlank(value)) { + var subRecord = { + v: value, + n: _this3.norm.get(value) + }; + record.$[keyIndex] = subRecord; + } + }); + this.records.push(record); + } + }, { + key: "toJSON", + value: function toJSON() { + return { + keys: this.keys, + records: this.records + }; + } + }]); + + return FuseIndex; + }(); + function createIndex(keys, docs) { + var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref2$getFn = _ref2.getFn, + getFn = _ref2$getFn === void 0 ? Config.getFn : _ref2$getFn; + + var myIndex = new FuseIndex({ + getFn: getFn + }); + myIndex.setKeys(keys.map(createKey)); + myIndex.setSources(docs); + myIndex.create(); + return myIndex; + } + function parseIndex(data) { + var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref3$getFn = _ref3.getFn, + getFn = _ref3$getFn === void 0 ? Config.getFn : _ref3$getFn; + + var keys = data.keys, + records = data.records; + var myIndex = new FuseIndex({ + getFn: getFn + }); + myIndex.setKeys(keys); + myIndex.setIndexRecords(records); + return myIndex; + } + + function transformMatches(result, data) { + var matches = result.matches; + data.matches = []; + + if (!isDefined(matches)) { + return; + } + + matches.forEach(function (match) { + if (!isDefined(match.indices) || !match.indices.length) { + return; + } + + var indices = match.indices, + value = match.value; + var obj = { + indices: indices, + value: value + }; + + if (match.key) { + obj.key = match.key.src; + } + + if (match.idx > -1) { + obj.refIndex = match.idx; + } + + data.matches.push(obj); + }); + } + + function transformScore(result, data) { + data.score = result.score; + } + + function computeScore(pattern) { + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$errors = _ref.errors, + errors = _ref$errors === void 0 ? 0 : _ref$errors, + _ref$currentLocation = _ref.currentLocation, + currentLocation = _ref$currentLocation === void 0 ? 0 : _ref$currentLocation, + _ref$expectedLocation = _ref.expectedLocation, + expectedLocation = _ref$expectedLocation === void 0 ? 0 : _ref$expectedLocation, + _ref$distance = _ref.distance, + distance = _ref$distance === void 0 ? Config.distance : _ref$distance, + _ref$ignoreLocation = _ref.ignoreLocation, + ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation; + + var accuracy = errors / pattern.length; + + if (ignoreLocation) { + return accuracy; + } + + var proximity = Math.abs(expectedLocation - currentLocation); + + if (!distance) { + // Dodge divide by zero error. + return proximity ? 1.0 : accuracy; + } + + return accuracy + proximity / distance; + } + + function convertMaskToIndices() { + var matchmask = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Config.minMatchCharLength; + var indices = []; + var start = -1; + var end = -1; + var i = 0; + + for (var len = matchmask.length; i < len; i += 1) { + var match = matchmask[i]; + + if (match && start === -1) { + start = i; + } else if (!match && start !== -1) { + end = i - 1; + + if (end - start + 1 >= minMatchCharLength) { + indices.push([start, end]); + } + + start = -1; + } + } // (i-1 - start) + 1 => i - start + + + if (matchmask[i - 1] && i - start >= minMatchCharLength) { + indices.push([start, i - 1]); + } + + return indices; + } + + // Machine word size + var MAX_BITS = 32; + + function search(text, pattern, patternAlphabet) { + var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}, + _ref$location = _ref.location, + location = _ref$location === void 0 ? Config.location : _ref$location, + _ref$distance = _ref.distance, + distance = _ref$distance === void 0 ? Config.distance : _ref$distance, + _ref$threshold = _ref.threshold, + threshold = _ref$threshold === void 0 ? Config.threshold : _ref$threshold, + _ref$findAllMatches = _ref.findAllMatches, + findAllMatches = _ref$findAllMatches === void 0 ? Config.findAllMatches : _ref$findAllMatches, + _ref$minMatchCharLeng = _ref.minMatchCharLength, + minMatchCharLength = _ref$minMatchCharLeng === void 0 ? Config.minMatchCharLength : _ref$minMatchCharLeng, + _ref$includeMatches = _ref.includeMatches, + includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches, + _ref$ignoreLocation = _ref.ignoreLocation, + ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation; + + if (pattern.length > MAX_BITS) { + throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS)); + } + + var patternLen = pattern.length; // Set starting location at beginning text and initialize the alphabet. + + var textLen = text.length; // Handle the case when location > text.length + + var expectedLocation = Math.max(0, Math.min(location, textLen)); // Highest score beyond which we give up. + + var currentThreshold = threshold; // Is there a nearby exact match? (speedup) + + var bestLocation = expectedLocation; // Performance: only computer matches when the minMatchCharLength > 1 + // OR if `includeMatches` is true. + + var computeMatches = minMatchCharLength > 1 || includeMatches; // A mask of the matches, used for building the indices + + var matchMask = computeMatches ? Array(textLen) : []; + var index; // Get all exact matches, here for speed up + + while ((index = text.indexOf(pattern, bestLocation)) > -1) { + var score = computeScore(pattern, { + currentLocation: index, + expectedLocation: expectedLocation, + distance: distance, + ignoreLocation: ignoreLocation + }); + currentThreshold = Math.min(score, currentThreshold); + bestLocation = index + patternLen; + + if (computeMatches) { + var i = 0; + + while (i < patternLen) { + matchMask[index + i] = 1; + i += 1; + } + } + } // Reset the best location + + + bestLocation = -1; + var lastBitArr = []; + var finalScore = 1; + var binMax = patternLen + textLen; + var mask = 1 << patternLen - 1; + + for (var _i = 0; _i < patternLen; _i += 1) { + // Scan for the best match; each iteration allows for one more error. + // Run a binary search to determine how far from the match location we can stray + // at this error level. + var binMin = 0; + var binMid = binMax; + + while (binMin < binMid) { + var _score2 = computeScore(pattern, { + errors: _i, + currentLocation: expectedLocation + binMid, + expectedLocation: expectedLocation, + distance: distance, + ignoreLocation: ignoreLocation + }); + + if (_score2 <= currentThreshold) { + binMin = binMid; + } else { + binMax = binMid; + } + + binMid = Math.floor((binMax - binMin) / 2 + binMin); + } // Use the result from this iteration as the maximum for the next. + + + binMax = binMid; + var start = Math.max(1, expectedLocation - binMid + 1); + var finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen; // Initialize the bit array + + var bitArr = Array(finish + 2); + bitArr[finish + 1] = (1 << _i) - 1; + + for (var j = finish; j >= start; j -= 1) { + var currentLocation = j - 1; + var charMatch = patternAlphabet[text.charAt(currentLocation)]; + + if (computeMatches) { + // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`) + matchMask[currentLocation] = +!!charMatch; + } // First pass: exact match + + + bitArr[j] = (bitArr[j + 1] << 1 | 1) & charMatch; // Subsequent passes: fuzzy match + + if (_i) { + bitArr[j] |= (lastBitArr[j + 1] | lastBitArr[j]) << 1 | 1 | lastBitArr[j + 1]; + } + + if (bitArr[j] & mask) { + finalScore = computeScore(pattern, { + errors: _i, + currentLocation: currentLocation, + expectedLocation: expectedLocation, + distance: distance, + ignoreLocation: ignoreLocation + }); // This match will almost certainly be better than any existing match. + // But check anyway. + + if (finalScore <= currentThreshold) { + // Indeed it is + currentThreshold = finalScore; + bestLocation = currentLocation; // Already passed `loc`, downhill from here on in. + + if (bestLocation <= expectedLocation) { + break; + } // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`. + + + start = Math.max(1, 2 * expectedLocation - bestLocation); + } + } + } // No hope for a (better) match at greater error levels. + + + var _score = computeScore(pattern, { + errors: _i + 1, + currentLocation: expectedLocation, + expectedLocation: expectedLocation, + distance: distance, + ignoreLocation: ignoreLocation + }); + + if (_score > currentThreshold) { + break; + } + + lastBitArr = bitArr; + } + + var result = { + isMatch: bestLocation >= 0, + // Count exact matches (those with a score of 0) to be "almost" exact + score: Math.max(0.001, finalScore) + }; + + if (computeMatches) { + var indices = convertMaskToIndices(matchMask, minMatchCharLength); + + if (!indices.length) { + result.isMatch = false; + } else if (includeMatches) { + result.indices = indices; + } + } + + return result; + } + + function createPatternAlphabet(pattern) { + var mask = {}; + + for (var i = 0, len = pattern.length; i < len; i += 1) { + var char = pattern.charAt(i); + mask[char] = (mask[char] || 0) | 1 << len - i - 1; + } + + return mask; + } + + var BitapSearch = /*#__PURE__*/function () { + function BitapSearch(pattern) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$location = _ref.location, + location = _ref$location === void 0 ? Config.location : _ref$location, + _ref$threshold = _ref.threshold, + threshold = _ref$threshold === void 0 ? Config.threshold : _ref$threshold, + _ref$distance = _ref.distance, + distance = _ref$distance === void 0 ? Config.distance : _ref$distance, + _ref$includeMatches = _ref.includeMatches, + includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches, + _ref$findAllMatches = _ref.findAllMatches, + findAllMatches = _ref$findAllMatches === void 0 ? Config.findAllMatches : _ref$findAllMatches, + _ref$minMatchCharLeng = _ref.minMatchCharLength, + minMatchCharLength = _ref$minMatchCharLeng === void 0 ? Config.minMatchCharLength : _ref$minMatchCharLeng, + _ref$isCaseSensitive = _ref.isCaseSensitive, + isCaseSensitive = _ref$isCaseSensitive === void 0 ? Config.isCaseSensitive : _ref$isCaseSensitive, + _ref$ignoreLocation = _ref.ignoreLocation, + ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation; + + _classCallCheck(this, BitapSearch); + + this.options = { + location: location, + threshold: threshold, + distance: distance, + includeMatches: includeMatches, + findAllMatches: findAllMatches, + minMatchCharLength: minMatchCharLength, + isCaseSensitive: isCaseSensitive, + ignoreLocation: ignoreLocation + }; + this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase(); + this.chunks = []; + + if (!this.pattern.length) { + return; + } + + var addChunk = function addChunk(pattern, startIndex) { + _this.chunks.push({ + pattern: pattern, + alphabet: createPatternAlphabet(pattern), + startIndex: startIndex + }); + }; + + var len = this.pattern.length; + + if (len > MAX_BITS) { + var i = 0; + var remainder = len % MAX_BITS; + var end = len - remainder; + + while (i < end) { + addChunk(this.pattern.substr(i, MAX_BITS), i); + i += MAX_BITS; + } + + if (remainder) { + var startIndex = len - MAX_BITS; + addChunk(this.pattern.substr(startIndex), startIndex); + } + } else { + addChunk(this.pattern, 0); + } + } + + _createClass(BitapSearch, [{ + key: "searchIn", + value: function searchIn(text) { + var _this$options = this.options, + isCaseSensitive = _this$options.isCaseSensitive, + includeMatches = _this$options.includeMatches; + + if (!isCaseSensitive) { + text = text.toLowerCase(); + } // Exact match + + + if (this.pattern === text) { + var _result = { + isMatch: true, + score: 0 + }; + + if (includeMatches) { + _result.indices = [[0, text.length - 1]]; + } + + return _result; + } // Otherwise, use Bitap algorithm + + + var _this$options2 = this.options, + location = _this$options2.location, + distance = _this$options2.distance, + threshold = _this$options2.threshold, + findAllMatches = _this$options2.findAllMatches, + minMatchCharLength = _this$options2.minMatchCharLength, + ignoreLocation = _this$options2.ignoreLocation; + var allIndices = []; + var totalScore = 0; + var hasMatches = false; + this.chunks.forEach(function (_ref2) { + var pattern = _ref2.pattern, + alphabet = _ref2.alphabet, + startIndex = _ref2.startIndex; + + var _search = search(text, pattern, alphabet, { + location: location + startIndex, + distance: distance, + threshold: threshold, + findAllMatches: findAllMatches, + minMatchCharLength: minMatchCharLength, + includeMatches: includeMatches, + ignoreLocation: ignoreLocation + }), + isMatch = _search.isMatch, + score = _search.score, + indices = _search.indices; + + if (isMatch) { + hasMatches = true; + } + + totalScore += score; + + if (isMatch && indices) { + allIndices = [].concat(_toConsumableArray(allIndices), _toConsumableArray(indices)); + } + }); + var result = { + isMatch: hasMatches, + score: hasMatches ? totalScore / this.chunks.length : 1 + }; + + if (hasMatches && includeMatches) { + result.indices = allIndices; + } + + return result; + } + }]); + + return BitapSearch; + }(); + + var BaseMatch = /*#__PURE__*/function () { + function BaseMatch(pattern) { + _classCallCheck(this, BaseMatch); + + this.pattern = pattern; + } + + _createClass(BaseMatch, [{ + key: "search", + value: function search() + /*text*/ + {} + }], [{ + key: "isMultiMatch", + value: function isMultiMatch(pattern) { + return getMatch(pattern, this.multiRegex); + } + }, { + key: "isSingleMatch", + value: function isSingleMatch(pattern) { + return getMatch(pattern, this.singleRegex); + } + }]); + + return BaseMatch; + }(); + + function getMatch(pattern, exp) { + var matches = pattern.match(exp); + return matches ? matches[1] : null; + } + + var ExactMatch = /*#__PURE__*/function (_BaseMatch) { + _inherits(ExactMatch, _BaseMatch); + + var _super = _createSuper(ExactMatch); + + function ExactMatch(pattern) { + _classCallCheck(this, ExactMatch); + + return _super.call(this, pattern); + } + + _createClass(ExactMatch, [{ + key: "search", + value: function search(text) { + var isMatch = text === this.pattern; + return { + isMatch: isMatch, + score: isMatch ? 0 : 1, + indices: [0, this.pattern.length - 1] + }; + } + }], [{ + key: "type", + get: function get() { + return 'exact'; + } + }, { + key: "multiRegex", + get: function get() { + return /^="(.*)"$/; + } + }, { + key: "singleRegex", + get: function get() { + return /^=(.*)$/; + } + }]); + + return ExactMatch; + }(BaseMatch); + + var InverseExactMatch = /*#__PURE__*/function (_BaseMatch) { + _inherits(InverseExactMatch, _BaseMatch); + + var _super = _createSuper(InverseExactMatch); + + function InverseExactMatch(pattern) { + _classCallCheck(this, InverseExactMatch); + + return _super.call(this, pattern); + } + + _createClass(InverseExactMatch, [{ + key: "search", + value: function search(text) { + var index = text.indexOf(this.pattern); + var isMatch = index === -1; + return { + isMatch: isMatch, + score: isMatch ? 0 : 1, + indices: [0, text.length - 1] + }; + } + }], [{ + key: "type", + get: function get() { + return 'inverse-exact'; + } + }, { + key: "multiRegex", + get: function get() { + return /^!"(.*)"$/; + } + }, { + key: "singleRegex", + get: function get() { + return /^!(.*)$/; + } + }]); + + return InverseExactMatch; + }(BaseMatch); + + var PrefixExactMatch = /*#__PURE__*/function (_BaseMatch) { + _inherits(PrefixExactMatch, _BaseMatch); + + var _super = _createSuper(PrefixExactMatch); + + function PrefixExactMatch(pattern) { + _classCallCheck(this, PrefixExactMatch); + + return _super.call(this, pattern); + } + + _createClass(PrefixExactMatch, [{ + key: "search", + value: function search(text) { + var isMatch = text.startsWith(this.pattern); + return { + isMatch: isMatch, + score: isMatch ? 0 : 1, + indices: [0, this.pattern.length - 1] + }; + } + }], [{ + key: "type", + get: function get() { + return 'prefix-exact'; + } + }, { + key: "multiRegex", + get: function get() { + return /^\^"(.*)"$/; + } + }, { + key: "singleRegex", + get: function get() { + return /^\^(.*)$/; + } + }]); + + return PrefixExactMatch; + }(BaseMatch); + + var InversePrefixExactMatch = /*#__PURE__*/function (_BaseMatch) { + _inherits(InversePrefixExactMatch, _BaseMatch); + + var _super = _createSuper(InversePrefixExactMatch); + + function InversePrefixExactMatch(pattern) { + _classCallCheck(this, InversePrefixExactMatch); + + return _super.call(this, pattern); + } + + _createClass(InversePrefixExactMatch, [{ + key: "search", + value: function search(text) { + var isMatch = !text.startsWith(this.pattern); + return { + isMatch: isMatch, + score: isMatch ? 0 : 1, + indices: [0, text.length - 1] + }; + } + }], [{ + key: "type", + get: function get() { + return 'inverse-prefix-exact'; + } + }, { + key: "multiRegex", + get: function get() { + return /^!\^"(.*)"$/; + } + }, { + key: "singleRegex", + get: function get() { + return /^!\^(.*)$/; + } + }]); + + return InversePrefixExactMatch; + }(BaseMatch); + + var SuffixExactMatch = /*#__PURE__*/function (_BaseMatch) { + _inherits(SuffixExactMatch, _BaseMatch); + + var _super = _createSuper(SuffixExactMatch); + + function SuffixExactMatch(pattern) { + _classCallCheck(this, SuffixExactMatch); + + return _super.call(this, pattern); + } + + _createClass(SuffixExactMatch, [{ + key: "search", + value: function search(text) { + var isMatch = text.endsWith(this.pattern); + return { + isMatch: isMatch, + score: isMatch ? 0 : 1, + indices: [text.length - this.pattern.length, text.length - 1] + }; + } + }], [{ + key: "type", + get: function get() { + return 'suffix-exact'; + } + }, { + key: "multiRegex", + get: function get() { + return /^"(.*)"\$$/; + } + }, { + key: "singleRegex", + get: function get() { + return /^(.*)\$$/; + } + }]); + + return SuffixExactMatch; + }(BaseMatch); + + var InverseSuffixExactMatch = /*#__PURE__*/function (_BaseMatch) { + _inherits(InverseSuffixExactMatch, _BaseMatch); + + var _super = _createSuper(InverseSuffixExactMatch); + + function InverseSuffixExactMatch(pattern) { + _classCallCheck(this, InverseSuffixExactMatch); + + return _super.call(this, pattern); + } + + _createClass(InverseSuffixExactMatch, [{ + key: "search", + value: function search(text) { + var isMatch = !text.endsWith(this.pattern); + return { + isMatch: isMatch, + score: isMatch ? 0 : 1, + indices: [0, text.length - 1] + }; + } + }], [{ + key: "type", + get: function get() { + return 'inverse-suffix-exact'; + } + }, { + key: "multiRegex", + get: function get() { + return /^!"(.*)"\$$/; + } + }, { + key: "singleRegex", + get: function get() { + return /^!(.*)\$$/; + } + }]); + + return InverseSuffixExactMatch; + }(BaseMatch); + + var FuzzyMatch = /*#__PURE__*/function (_BaseMatch) { + _inherits(FuzzyMatch, _BaseMatch); + + var _super = _createSuper(FuzzyMatch); + + function FuzzyMatch(pattern) { + var _this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$location = _ref.location, + location = _ref$location === void 0 ? Config.location : _ref$location, + _ref$threshold = _ref.threshold, + threshold = _ref$threshold === void 0 ? Config.threshold : _ref$threshold, + _ref$distance = _ref.distance, + distance = _ref$distance === void 0 ? Config.distance : _ref$distance, + _ref$includeMatches = _ref.includeMatches, + includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches, + _ref$findAllMatches = _ref.findAllMatches, + findAllMatches = _ref$findAllMatches === void 0 ? Config.findAllMatches : _ref$findAllMatches, + _ref$minMatchCharLeng = _ref.minMatchCharLength, + minMatchCharLength = _ref$minMatchCharLeng === void 0 ? Config.minMatchCharLength : _ref$minMatchCharLeng, + _ref$isCaseSensitive = _ref.isCaseSensitive, + isCaseSensitive = _ref$isCaseSensitive === void 0 ? Config.isCaseSensitive : _ref$isCaseSensitive, + _ref$ignoreLocation = _ref.ignoreLocation, + ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation; + + _classCallCheck(this, FuzzyMatch); + + _this = _super.call(this, pattern); + _this._bitapSearch = new BitapSearch(pattern, { + location: location, + threshold: threshold, + distance: distance, + includeMatches: includeMatches, + findAllMatches: findAllMatches, + minMatchCharLength: minMatchCharLength, + isCaseSensitive: isCaseSensitive, + ignoreLocation: ignoreLocation + }); + return _this; + } + + _createClass(FuzzyMatch, [{ + key: "search", + value: function search(text) { + return this._bitapSearch.searchIn(text); + } + }], [{ + key: "type", + get: function get() { + return 'fuzzy'; + } + }, { + key: "multiRegex", + get: function get() { + return /^"(.*)"$/; + } + }, { + key: "singleRegex", + get: function get() { + return /^(.*)$/; + } + }]); + + return FuzzyMatch; + }(BaseMatch); + + var IncludeMatch = /*#__PURE__*/function (_BaseMatch) { + _inherits(IncludeMatch, _BaseMatch); + + var _super = _createSuper(IncludeMatch); + + function IncludeMatch(pattern) { + _classCallCheck(this, IncludeMatch); + + return _super.call(this, pattern); + } + + _createClass(IncludeMatch, [{ + key: "search", + value: function search(text) { + var location = 0; + var index; + var indices = []; + var patternLen = this.pattern.length; // Get all exact matches + + while ((index = text.indexOf(this.pattern, location)) > -1) { + location = index + patternLen; + indices.push([index, location - 1]); + } + + var isMatch = !!indices.length; + return { + isMatch: isMatch, + score: isMatch ? 0 : 1, + indices: indices + }; + } + }], [{ + key: "type", + get: function get() { + return 'include'; + } + }, { + key: "multiRegex", + get: function get() { + return /^'"(.*)"$/; + } + }, { + key: "singleRegex", + get: function get() { + return /^'(.*)$/; + } + }]); + + return IncludeMatch; + }(BaseMatch); + + var searchers = [ExactMatch, IncludeMatch, PrefixExactMatch, InversePrefixExactMatch, InverseSuffixExactMatch, SuffixExactMatch, InverseExactMatch, FuzzyMatch]; + var searchersLen = searchers.length; // Regex to split by spaces, but keep anything in quotes together + + var SPACE_RE = / +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/; + var OR_TOKEN = '|'; // Return a 2D array representation of the query, for simpler parsing. + // Example: + // "^core go$ | rb$ | py$ xy$" => [["^core", "go$"], ["rb$"], ["py$", "xy$"]] + + function parseQuery(pattern) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return pattern.split(OR_TOKEN).map(function (item) { + var query = item.trim().split(SPACE_RE).filter(function (item) { + return item && !!item.trim(); + }); + var results = []; + + for (var i = 0, len = query.length; i < len; i += 1) { + var queryItem = query[i]; // 1. Handle multiple query match (i.e, once that are quoted, like `"hello world"`) + + var found = false; + var idx = -1; + + while (!found && ++idx < searchersLen) { + var searcher = searchers[idx]; + var token = searcher.isMultiMatch(queryItem); + + if (token) { + results.push(new searcher(token, options)); + found = true; + } + } + + if (found) { + continue; + } // 2. Handle single query matches (i.e, once that are *not* quoted) + + + idx = -1; + + while (++idx < searchersLen) { + var _searcher = searchers[idx]; + + var _token = _searcher.isSingleMatch(queryItem); + + if (_token) { + results.push(new _searcher(_token, options)); + break; + } + } + } + + return results; + }); + } + + // to a singl match + + var MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]); + /** + * Command-like searching + * ====================== + * + * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`, + * search in a given text. + * + * Search syntax: + * + * | Token | Match type | Description | + * | ----------- | -------------------------- | -------------------------------------- | + * | `jscript` | fuzzy-match | Items that fuzzy match `jscript` | + * | `=scheme` | exact-match | Items that are `scheme` | + * | `'python` | include-match | Items that include `python` | + * | `!ruby` | inverse-exact-match | Items that do not include `ruby` | + * | `^java` | prefix-exact-match | Items that start with `java` | + * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` | + * | `.js$` | suffix-exact-match | Items that end with `.js` | + * | `!.go$` | inverse-suffix-exact-match | Items that do not end with `.go` | + * + * A single pipe character acts as an OR operator. For example, the following + * query matches entries that start with `core` and end with either`go`, `rb`, + * or`py`. + * + * ``` + * ^core go$ | rb$ | py$ + * ``` + */ + + var ExtendedSearch = /*#__PURE__*/function () { + function ExtendedSearch(pattern) { + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$isCaseSensitive = _ref.isCaseSensitive, + isCaseSensitive = _ref$isCaseSensitive === void 0 ? Config.isCaseSensitive : _ref$isCaseSensitive, + _ref$includeMatches = _ref.includeMatches, + includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches, + _ref$minMatchCharLeng = _ref.minMatchCharLength, + minMatchCharLength = _ref$minMatchCharLeng === void 0 ? Config.minMatchCharLength : _ref$minMatchCharLeng, + _ref$ignoreLocation = _ref.ignoreLocation, + ignoreLocation = _ref$ignoreLocation === void 0 ? Config.ignoreLocation : _ref$ignoreLocation, + _ref$findAllMatches = _ref.findAllMatches, + findAllMatches = _ref$findAllMatches === void 0 ? Config.findAllMatches : _ref$findAllMatches, + _ref$location = _ref.location, + location = _ref$location === void 0 ? Config.location : _ref$location, + _ref$threshold = _ref.threshold, + threshold = _ref$threshold === void 0 ? Config.threshold : _ref$threshold, + _ref$distance = _ref.distance, + distance = _ref$distance === void 0 ? Config.distance : _ref$distance; + + _classCallCheck(this, ExtendedSearch); + + this.query = null; + this.options = { + isCaseSensitive: isCaseSensitive, + includeMatches: includeMatches, + minMatchCharLength: minMatchCharLength, + findAllMatches: findAllMatches, + ignoreLocation: ignoreLocation, + location: location, + threshold: threshold, + distance: distance + }; + this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase(); + this.query = parseQuery(this.pattern, this.options); + } + + _createClass(ExtendedSearch, [{ + key: "searchIn", + value: function searchIn(text) { + var query = this.query; + + if (!query) { + return { + isMatch: false, + score: 1 + }; + } + + var _this$options = this.options, + includeMatches = _this$options.includeMatches, + isCaseSensitive = _this$options.isCaseSensitive; + text = isCaseSensitive ? text : text.toLowerCase(); + var numMatches = 0; + var allIndices = []; + var totalScore = 0; // ORs + + for (var i = 0, qLen = query.length; i < qLen; i += 1) { + var searchers = query[i]; // Reset indices + + allIndices.length = 0; + numMatches = 0; // ANDs + + for (var j = 0, pLen = searchers.length; j < pLen; j += 1) { + var searcher = searchers[j]; + + var _searcher$search = searcher.search(text), + isMatch = _searcher$search.isMatch, + indices = _searcher$search.indices, + score = _searcher$search.score; + + if (isMatch) { + numMatches += 1; + totalScore += score; + + if (includeMatches) { + var type = searcher.constructor.type; + + if (MultiMatchSet.has(type)) { + allIndices = [].concat(_toConsumableArray(allIndices), _toConsumableArray(indices)); + } else { + allIndices.push(indices); + } + } + } else { + totalScore = 0; + numMatches = 0; + allIndices.length = 0; + break; + } + } // OR condition, so if TRUE, return + + + if (numMatches) { + var result = { + isMatch: true, + score: totalScore / numMatches + }; + + if (includeMatches) { + result.indices = allIndices; + } + + return result; + } + } // Nothing was matched + + + return { + isMatch: false, + score: 1 + }; + } + }], [{ + key: "condition", + value: function condition(_, options) { + return options.useExtendedSearch; + } + }]); + + return ExtendedSearch; + }(); + + var registeredSearchers = []; + function register() { + registeredSearchers.push.apply(registeredSearchers, arguments); + } + function createSearcher(pattern, options) { + for (var i = 0, len = registeredSearchers.length; i < len; i += 1) { + var searcherClass = registeredSearchers[i]; + + if (searcherClass.condition(pattern, options)) { + return new searcherClass(pattern, options); + } + } + + return new BitapSearch(pattern, options); + } + + var LogicalOperator = { + AND: '$and', + OR: '$or' + }; + var KeyType = { + PATH: '$path', + PATTERN: '$val' + }; + + var isExpression = function isExpression(query) { + return !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]); + }; + + var isPath = function isPath(query) { + return !!query[KeyType.PATH]; + }; + + var isLeaf = function isLeaf(query) { + return !isArray(query) && isObject(query) && !isExpression(query); + }; + + var convertToExplicit = function convertToExplicit(query) { + return _defineProperty({}, LogicalOperator.AND, Object.keys(query).map(function (key) { + return _defineProperty({}, key, query[key]); + })); + }; // When `auto` is `true`, the parse function will infer and initialize and add + // the appropriate `Searcher` instance + + + function parse(query, options) { + var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref3$auto = _ref3.auto, + auto = _ref3$auto === void 0 ? true : _ref3$auto; + + var next = function next(query) { + var keys = Object.keys(query); + var isQueryPath = isPath(query); + + if (!isQueryPath && keys.length > 1 && !isExpression(query)) { + return next(convertToExplicit(query)); + } + + if (isLeaf(query)) { + var key = isQueryPath ? query[KeyType.PATH] : keys[0]; + var pattern = isQueryPath ? query[KeyType.PATTERN] : query[key]; + + if (!isString(pattern)) { + throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key)); + } + + var obj = { + keyId: createKeyId(key), + pattern: pattern + }; + + if (auto) { + obj.searcher = createSearcher(pattern, options); + } + + return obj; + } + + var node = { + children: [], + operator: keys[0] + }; + keys.forEach(function (key) { + var value = query[key]; + + if (isArray(value)) { + value.forEach(function (item) { + node.children.push(next(item)); + }); + } + }); + return node; + }; + + if (!isExpression(query)) { + query = convertToExplicit(query); + } + + return next(query); + } + + var Fuse = /*#__PURE__*/function () { + function Fuse(docs) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var index = arguments.length > 2 ? arguments[2] : undefined; + + _classCallCheck(this, Fuse); + + this.options = _objectSpread2({}, Config, {}, options); + + if (this.options.useExtendedSearch && !true) { + throw new Error(EXTENDED_SEARCH_UNAVAILABLE); + } + + this._keyStore = new KeyStore(this.options.keys); + this.setCollection(docs, index); + } + + _createClass(Fuse, [{ + key: "setCollection", + value: function setCollection(docs, index) { + this._docs = docs; + + if (index && !(index instanceof FuseIndex)) { + throw new Error(INCORRECT_INDEX_TYPE); + } + + this._myIndex = index || createIndex(this.options.keys, this._docs, { + getFn: this.options.getFn + }); + } + }, { + key: "add", + value: function add(doc) { + if (!isDefined(doc)) { + return; + } + + this._docs.push(doc); + + this._myIndex.add(doc); + } + }, { + key: "remove", + value: function remove() { + var predicate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () { + return ( + /* doc, idx */ + false + ); + }; + var results = []; + + for (var i = 0, len = this._docs.length; i < len; i += 1) { + var doc = this._docs[i]; + + if (predicate(doc, i)) { + this.removeAt(i); + i -= 1; + len -= 1; + results.push(doc); + } + } + + return results; + } + }, { + key: "removeAt", + value: function removeAt(idx) { + this._docs.splice(idx, 1); + + this._myIndex.removeAt(idx); + } + }, { + key: "getIndex", + value: function getIndex() { + return this._myIndex; + } + }, { + key: "search", + value: function search(query) { + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$limit = _ref.limit, + limit = _ref$limit === void 0 ? -1 : _ref$limit; + + var _this$options = this.options, + includeMatches = _this$options.includeMatches, + includeScore = _this$options.includeScore, + shouldSort = _this$options.shouldSort, + sortFn = _this$options.sortFn, + ignoreFieldNorm = _this$options.ignoreFieldNorm; + var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query); + computeScore$1(results, { + ignoreFieldNorm: ignoreFieldNorm + }); + + if (shouldSort) { + results.sort(sortFn); + } + + if (isNumber(limit) && limit > -1) { + results = results.slice(0, limit); + } + + return format(results, this._docs, { + includeMatches: includeMatches, + includeScore: includeScore + }); + } + }, { + key: "_searchStringList", + value: function _searchStringList(query) { + var searcher = createSearcher(query, this.options); + var records = this._myIndex.records; + var results = []; // Iterate over every string in the index + + records.forEach(function (_ref2) { + var text = _ref2.v, + idx = _ref2.i, + norm = _ref2.n; + + if (!isDefined(text)) { + return; + } + + var _searcher$searchIn = searcher.searchIn(text), + isMatch = _searcher$searchIn.isMatch, + score = _searcher$searchIn.score, + indices = _searcher$searchIn.indices; + + if (isMatch) { + results.push({ + item: text, + idx: idx, + matches: [{ + score: score, + value: text, + norm: norm, + indices: indices + }] + }); + } + }); + return results; + } + }, { + key: "_searchLogical", + value: function _searchLogical(query) { + var _this = this; + + var expression = parse(query, this.options); + + var evaluate = function evaluate(node, item, idx) { + if (!node.children) { + var keyId = node.keyId, + searcher = node.searcher; + + var matches = _this._findMatches({ + key: _this._keyStore.get(keyId), + value: _this._myIndex.getValueForItemAtKeyId(item, keyId), + searcher: searcher + }); + + if (matches && matches.length) { + return [{ + idx: idx, + item: item, + matches: matches + }]; + } + + return []; + } + /*eslint indent: [2, 2, {"SwitchCase": 1}]*/ + + + switch (node.operator) { + case LogicalOperator.AND: + { + var res = []; + + for (var i = 0, len = node.children.length; i < len; i += 1) { + var child = node.children[i]; + var result = evaluate(child, item, idx); + + if (result.length) { + res.push.apply(res, _toConsumableArray(result)); + } else { + return []; + } + } + + return res; + } + + case LogicalOperator.OR: + { + var _res = []; + + for (var _i = 0, _len = node.children.length; _i < _len; _i += 1) { + var _child = node.children[_i]; + + var _result = evaluate(_child, item, idx); + + if (_result.length) { + _res.push.apply(_res, _toConsumableArray(_result)); + + break; + } + } + + return _res; + } + } + }; + + var records = this._myIndex.records; + var resultMap = {}; + var results = []; + records.forEach(function (_ref3) { + var item = _ref3.$, + idx = _ref3.i; + + if (isDefined(item)) { + var expResults = evaluate(expression, item, idx); + + if (expResults.length) { + // Dedupe when adding + if (!resultMap[idx]) { + resultMap[idx] = { + idx: idx, + item: item, + matches: [] + }; + results.push(resultMap[idx]); + } + + expResults.forEach(function (_ref4) { + var _resultMap$idx$matche; + + var matches = _ref4.matches; + + (_resultMap$idx$matche = resultMap[idx].matches).push.apply(_resultMap$idx$matche, _toConsumableArray(matches)); + }); + } + } + }); + return results; + } + }, { + key: "_searchObjectList", + value: function _searchObjectList(query) { + var _this2 = this; + + var searcher = createSearcher(query, this.options); + var _this$_myIndex = this._myIndex, + keys = _this$_myIndex.keys, + records = _this$_myIndex.records; + var results = []; // List is Array + + records.forEach(function (_ref5) { + var item = _ref5.$, + idx = _ref5.i; + + if (!isDefined(item)) { + return; + } + + var matches = []; // Iterate over every key (i.e, path), and fetch the value at that key + + keys.forEach(function (key, keyIndex) { + matches.push.apply(matches, _toConsumableArray(_this2._findMatches({ + key: key, + value: item[keyIndex], + searcher: searcher + }))); + }); + + if (matches.length) { + results.push({ + idx: idx, + item: item, + matches: matches + }); + } + }); + return results; + } + }, { + key: "_findMatches", + value: function _findMatches(_ref6) { + var key = _ref6.key, + value = _ref6.value, + searcher = _ref6.searcher; + + if (!isDefined(value)) { + return []; + } + + var matches = []; + + if (isArray(value)) { + value.forEach(function (_ref7) { + var text = _ref7.v, + idx = _ref7.i, + norm = _ref7.n; + + if (!isDefined(text)) { + return; + } + + var _searcher$searchIn2 = searcher.searchIn(text), + isMatch = _searcher$searchIn2.isMatch, + score = _searcher$searchIn2.score, + indices = _searcher$searchIn2.indices; + + if (isMatch) { + matches.push({ + score: score, + key: key, + value: text, + idx: idx, + norm: norm, + indices: indices + }); + } + }); + } else { + var text = value.v, + norm = value.n; + + var _searcher$searchIn3 = searcher.searchIn(text), + isMatch = _searcher$searchIn3.isMatch, + score = _searcher$searchIn3.score, + indices = _searcher$searchIn3.indices; + + if (isMatch) { + matches.push({ + score: score, + key: key, + value: text, + norm: norm, + indices: indices + }); + } + } + + return matches; + } + }]); + + return Fuse; + }(); // Practical scoring function + + function computeScore$1(results, _ref8) { + var _ref8$ignoreFieldNorm = _ref8.ignoreFieldNorm, + ignoreFieldNorm = _ref8$ignoreFieldNorm === void 0 ? Config.ignoreFieldNorm : _ref8$ignoreFieldNorm; + results.forEach(function (result) { + var totalScore = 1; + result.matches.forEach(function (_ref9) { + var key = _ref9.key, + norm = _ref9.norm, + score = _ref9.score; + var weight = key ? key.weight : null; + totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm)); + }); + result.score = totalScore; + }); + } + + function format(results, docs) { + var _ref10 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref10$includeMatches = _ref10.includeMatches, + includeMatches = _ref10$includeMatches === void 0 ? Config.includeMatches : _ref10$includeMatches, + _ref10$includeScore = _ref10.includeScore, + includeScore = _ref10$includeScore === void 0 ? Config.includeScore : _ref10$includeScore; + + var transformers = []; + if (includeMatches) transformers.push(transformMatches); + if (includeScore) transformers.push(transformScore); + return results.map(function (result) { + var idx = result.idx; + var data = { + item: docs[idx], + refIndex: idx + }; + + if (transformers.length) { + transformers.forEach(function (transformer) { + transformer(result, data); + }); + } + + return data; + }); + } + + Fuse.version = '6.4.5'; + Fuse.createIndex = createIndex; + Fuse.parseIndex = parseIndex; + Fuse.config = Config; + + { + Fuse.parseQuery = parse; + } + + { + register(ExtendedSearch); + } + + return Fuse; + +}))); diff --git a/themes/after-dark/static/js/lazysizes.min.js b/themes/after-dark/static/js/lazysizes.min.js new file mode 100644 index 0000000..d857f09 --- /dev/null +++ b/themes/after-dark/static/js/lazysizes.min.js @@ -0,0 +1,3 @@ +/*! lazysizes - v5.3.0 */ + +!function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,i=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,o=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],a={},G=Array.prototype.forEach,J=function(e,t){if(!a[t]){a[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return a[t].test(e[$]("class")||"")&&a[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var a;if(a=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(a," "))}},V=function(t,a,e){var i=e?P:"removeEventListener";if(e){V(t,a)}r.forEach(function(e){t[i](e,a)})},X=function(e,t,a,i,r){var n=D.createEvent("Event");if(!a){a={}}a.instance=k;n.initEvent(t,!i,!r);n.detail=a;e.dispatchEvent(n);return n},Y=function(e,t){var a;if(!i&&(a=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}a({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,a){a=a||e.offsetWidth;while(a49?function(){o(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(a){return}a=true;t=r-(f.now()-i);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ie=function(e){var t,a;var i=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-a;if(e0;if(r&&Z(i,"overflow")!="visible"){a=i.getBoundingClientRect();r=C>a.left&&pa.top-1&&g500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w2&&h>2&&!D.hidden){w=f;N=0}else if(h>1&&N>1&&M<6){w=u}else{w=_}}if(l!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;l=n}a=d[t].getBoundingClientRect();if((b=a.bottom)>=s&&(g=a.top)<=z&&(C=a.right)>=s*c&&(p=a.left)<=y&&(b||C||p||g)&&(H.loadHidden||x(d[t]))&&(m&&M<3&&!o&&(h<3||N<4)||W(d[t],n))){R(d[t]);r=true;if(M>9){break}}else if(!r&&m&&!i&&M<4&&N<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!o&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){i=v[0]||d[t]}}if(i&&!r){R(i)}}};var a=ae(t);var S=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}L(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,B);X(t,"lazyloaded")};var i=te(S);var B=function(e){i({target:e.target})};var T=function(e,t){var a=e.getAttribute("data-load-mode")||H.iframeLoadMode;if(a==0){e.contentWindow.location.replace(t)}else if(a==1){e.src=t}};var F=function(e){var t;var a=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(a){e.setAttribute("srcset",a)}};var s=te(function(t,e,a,i,r){var n,s,o,l,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(i){if(a){K(t,H.autosizesClass)}else{t.setAttribute("sizes",i)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){o=t.parentNode;l=o&&j.test(o.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||l);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(L,2500);V(t,B,true)}if(l){G.call(o.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!l){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||l)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,H.fastLoadedClass)}S(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){M--}},true)});var R=function(e){if(e._lazyRace){return}var t;var a=n.test(e.nodeName);var i=a&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=i=="auto";if((r||!m)&&a&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;M++;s(e,t,r,i,a)};var r=ie(function(){H.loadMode=3;a()});var o=function(){if(H.loadMode==3){H.loadMode=2}r()};var l=function(){if(m){return}if(f.now()-e<999){I(l,999);return}m=true;H.loadMode=3;a();q("scroll",o,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",a,true);q("resize",a,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(a).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",a,true);O[P]("DOMAttrModified",a,true);setInterval(a,999)}q("hashchange",a,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,a,true)});if(/d$|^c/.test(D.readyState)){l()}else{q("load",l);D[P]("DOMContentLoaded",a);I(l,2e4)}if(k.elements.length){t();ee._lsFlush()}else{a()}},checkElems:a,unveil:R,_aLSL:o}}(),re=function(){var a;var n=te(function(e,t,a,i){var r,n,s;e._lazysizesWidth=i;i+="px";e.setAttribute("sizes",i);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n=n||0>t||h&&e>=p}function c(){var e=x();if(f(e))return l(e);var t,o=setTimeout;t=e-j,e=n-(e-d),t=h?O(e,p-t):e,m=o(c,t)}function l(e){return m=i,T&&s?u(e):(s=b=i,y)}function a(){var e=x(),t=f(e);if(s=arguments,b=this,d=e,t){if(m===i)return j=e=d,m=setTimeout(c,n),v?u(e):y;if(h)return m=setTimeout(c,n),u(d)}return m===i&&(m=setTimeout(c,n)),y}var s,b,p,y,m,d,j=0,v=false,h=false,T=true; +if(typeof e!="function")throw new TypeError("Expected a function");return n=r(n)||0,t(o)&&(v=!!o.leading,p=(h="maxWait"in o)?g(r(o.maxWait)||0,n):p,T="trailing"in o?!!o.trailing:T),a.cancel=function(){m!==i&&clearTimeout(m),j=0,s=d=b=m=i},a.flush=function(){return m===i?y:l(x())},a},e.isObject=t,e.isObjectLike=n,e.isSymbol=o,e.now=x,e.toNumber=r,e.VERSION="4.17.5",typeof define=="function"&&typeof define.amd=="object"&&define.amd?(p._=e, define(function(){return e})):y?((y.exports=e)._=e,b._=e):p._=e; +}).call(this); \ No newline at end of file diff --git a/themes/after-dark/static/js/mark.min.js b/themes/after-dark/static/js/mark.min.js new file mode 100644 index 0000000..1eea053 --- /dev/null +++ b/themes/after-dark/static/js/mark.min.js @@ -0,0 +1,7 @@ +/*!*************************************************** +* mark.js v8.11.1 +* https://markjs.io/ +* Copyright (c) 2014–2018, Julian Kühnel +* Released under the MIT license https://git.io/vwTVl +*****************************************************/ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Mark=t()}(this,function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=i,this.iframesTimeout=o}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(function(t){var n=e.filter(function(e){return e.contains(t)}).length>0;-1!==e.indexOf(t)||n||e.push(t)}),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var i=e.contentWindow;if(r=i.document,!i||!r)throw new Error("iframe inaccessible")}catch(e){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t=e.getAttribute("src").trim();return"about:blank"===e.contentWindow.location.href&&"about:blank"!==t&&t}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,i=!1,o=null,a=function a(){if(!i){i=!0,clearTimeout(o);try{r.isIframeBlank(e)||(e.removeEventListener("load",a),r.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",a),o=setTimeout(a,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,function(){return!0},function(e){r++,n.waitForIframes(e.querySelector("html"),function(){--r||t()})},function(e){e||t()})}},{key:"forEachIframe",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=t.querySelectorAll("iframe"),s=a.length,c=0;a=Array.prototype.slice.call(a);var u=function(){--s<=0&&o(c)};s||u(),a.forEach(function(t){e.matches(t,i.exclude)?u():i.onIframeReady(t,function(e){n(t)&&(c++,r(e)),u()},u)})}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:null===t?e.nextNode():e.nextNode()&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var i=!1,o=!1;return r.forEach(function(e,t){e.val===n&&(i=t,o=e.handled)}),this.compareNodeIframe(e,t,n)?(!1!==i||o?!1===i||o||(r[i].handled=!0):r.push({val:n,handled:!0}),!0):(!1===i&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var i=this;e.forEach(function(e){e.handled||i.getIframeContents(e.val,function(e){i.createInstanceOnIframe(e).forEachNode(t,n,r)})})}},{key:"iterateThroughNodes",value:function(e,t,n,r,i){for(var o,a=this,s=this.createIterator(t,e,r),c=[],u=[],l=void 0,h=void 0;void 0,o=a.getIteratorNode(s),h=o.prevNode,l=o.node;)this.iframes&&this.forEachIframe(t,function(e){return a.checkIframeFilter(l,h,e,c)},function(t){a.createInstanceOnIframe(t).forEachNode(e,function(e){return u.push(e)},r)}),u.push(l);u.forEach(function(e){n(e)}),this.iframes&&this.handleOpenIframes(c,e,n,r),i()}},{key:"forEachNode",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),a=o.length;a||i(),o.forEach(function(o){var s=function(){r.iterateThroughNodes(e,o,t,n,function(){--a<=0&&i()})};r.iframes?r.waitForIframes(o,s):s()})}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var i=!1;return n.every(function(t){return!r.call(e,t)||(i=!0,!1)}),i}return!1}}]),e}(),o=function(){function o(e){t(this,o),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(o,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==a&&""!==s&&(e=e.replace(new RegExp("("+this.escapeStr(a)+"|"+this.escapeStr(s)+")","gm"+n),r+"("+this.processSynomyms(a)+"|"+this.processSynomyms(s)+")"+r))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,function(e){return"\\"===e.charAt(0)?"?":""})).replace(/(?:\\)*\*/g,function(e){return"\\"===e.charAt(0)?"*":""})}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"})}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],r=[];return e.split("").forEach(function(i){n.every(function(n){if(-1!==n.indexOf(i)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0})}),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n=this.opt.accuracy,r="string"==typeof n?n:n.value,i="";switch(("string"==typeof n?[]:n.limiters).forEach(function(e){i+="|"+t.escapeStr(e)}),r){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(i="\\s"+(i||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+e+"[^"+i+"]*)";case"exactly":return"(^|\\s"+i+")("+e+")(?=$|\\s"+i+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach(function(e){t.opt.separateWordSearch?e.split(" ").forEach(function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)}):e.trim()&&-1===n.indexOf(e)&&n.push(e)}),{keywords:n.sort(function(e,t){return t.length-e.length}),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort(function(e,t){return e.start-t.start}).forEach(function(e){var i=t.callNoMatchOnInvalidRanges(e,r),o=i.start,a=i.end;i.valid&&(e.start=o,e.length=a-o,n.push(e),r=a)}),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,i=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?i=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:i}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,i=!0,o=n.length,a=t-o,s=parseInt(e.start,10)-a;return(r=(s=s>o?o:s)+parseInt(e.length,10))>o&&(r=o,this.log("End range automatically set to the max value of "+o)),s<0||r-s<0||s>o||r>o?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(s,r).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:s,end:r,valid:i}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})},function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){e({value:n,nodes:r})})}},{key:"matchesExclude",value:function(e){return i.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",i=e.splitText(t),o=i.splitText(n-t),a=document.createElement(r);return a.setAttribute("data-markjs","true"),this.opt.className&&a.setAttribute("class",this.opt.className),a.textContent=i.textContent,i.parentNode.replaceChild(a,i),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,i){var o=this;e.nodes.every(function(a,s){var c=e.nodes[s+1];if(void 0===c||c.start>t){if(!r(a.node))return!1;var u=t-a.start,l=(n>a.end?a.end:n)-a.start,h=e.value.substr(0,a.start),f=e.value.substr(l+a.start);if(a.node=o.wrapRangeInTextNode(a.node,u,l),e.value=h+f,e.nodes.forEach(function(t,n){n>=s&&(e.nodes[n].start>0&&n!==s&&(e.nodes[n].start-=l),e.nodes[n].end-=l)}),n-=l,i(a.node.previousSibling,a.start),!(n>a.end))return!1;t=a.end}return!0})}},{key:"wrapMatches",value:function(e,t,n,r,i){var o=this,a=0===t?0:t+1;this.getTextNodes(function(t){t.nodes.forEach(function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[a];)if(n(i[a],t)){var s=i.index;if(0!==a)for(var c=1;c=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function l(e){return null==e?"":Array.isArray(e)||s(e)&&e.toString===a?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function y(e,t){return m.call(e,t)}function g(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var _=/-(\w)/g,b=g(function(e){return e.replace(_,function(e,t){return t?t.toUpperCase():""})}),$=g(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),w=/\B([A-Z])/g,C=g(function(e){return e.replace(w,"-$1").toLowerCase()});var x=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function k(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e){for(var t={},n=0;n0,Z=J&&J.indexOf("edge/")>0,G=(J&&J.indexOf("android"),J&&/iphone|ipad|ipod|ios/.test(J)||"ios"===K),X=(J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J),J&&J.match(/firefox\/(\d+)/)),Y={}.watch,Q=!1;if(z)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,ee)}catch(e){}var te=function(){return void 0===B&&(B=!z&&!V&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),B},ne=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function re(e){return"function"==typeof e&&/native code/.test(e.toString())}var ie,oe="undefined"!=typeof Symbol&&re(Symbol)&&"undefined"!=typeof Reflect&&re(Reflect.ownKeys);ie="undefined"!=typeof Set&&re(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ae=S,se=0,ce=function(){this.id=se++,this.subs=[]};ce.prototype.addSub=function(e){this.subs.push(e)},ce.prototype.removeSub=function(e){h(this.subs,e)},ce.prototype.depend=function(){ce.target&&ce.target.addDep(this)},ce.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t-1)if(o&&!y(i,"default"))a=!1;else if(""===a||a===C(e)){var c=Pe(String,i.type);(c<0||s0&&(st((u=e(u,(a||"")+"_"+c))[0])&&st(f)&&(s[l]=he(f.text+u[0].text),u.shift()),s.push.apply(s,u)):i(u)?st(f)?s[l]=he(f.text+u):""!==u&&s.push(he(u)):st(u)&&st(f)?s[l]=he(f.text+u.text):(r(o._isVList)&&n(u.tag)&&t(u.key)&&n(a)&&(u.key="__vlist"+a+"_"+c+"__"),s.push(u)));return s}(e):void 0}function st(e){return n(e)&&n(e.text)&&!1===e.isComment}function ct(e,t){if(e){for(var n=Object.create(null),r=oe?Reflect.ownKeys(e):Object.keys(e),i=0;i0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==e&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var c in i={},t)t[c]&&"$"!==c[0]&&(i[c]=pt(n,c,t[c]))}else i={};for(var u in n)u in i||(i[u]=dt(n,u));return t&&Object.isExtensible(t)&&(t._normalized=i),R(i,"$stable",a),R(i,"$key",s),R(i,"$hasNormal",o),i}function pt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:at(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function dt(e,t){return function(){return e[t]}}function vt(e,t){var r,i,a,s,c;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),i=0,a=e.length;idocument.createEvent("Event").timeStamp&&(sn=function(){return cn.now()})}function un(){var e,t;for(an=sn(),rn=!0,Qt.sort(function(e,t){return e.id-t.id}),on=0;onon&&Qt[n].id>e.id;)n--;Qt.splice(n+1,0,e)}else Qt.push(e);nn||(nn=!0,Ye(un))}}(this)},fn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||o(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Re(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},fn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},fn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},fn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var pn={enumerable:!0,configurable:!0,get:S,set:S};function dn(e,t,n){pn.get=function(){return this[t][n]},pn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,pn)}function vn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&$e(!1);var o=function(o){i.push(o);var a=Me(o,t,n,e);xe(r,o,a),o in e||dn(e,"_props",o)};for(var a in t)o(a);$e(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?S:x(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;s(t=e._data="function"==typeof t?function(e,t){le();try{return e.call(t,t)}catch(e){return Re(e,t,"data()"),{}}finally{fe()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&y(r,o)||(a=void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&dn(e,"_data",o))}var a;Ce(t,!0)}(e):Ce(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=te();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new fn(e,a||S,S,hn)),i in e||mn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==Y&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===a.call(n)&&e.test(t));var n}function An(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=xn(a.componentOptions);s&&!t(s)&&On(n,o,r,i)}}}function On(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,h(n,t)}!function(t){t.prototype._init=function(t){var n=this;n._uid=bn++,n._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(n,t):n.$options=De($n(n.constructor),t||{},n),n._renderProxy=n,n._self=n,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(n),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&qt(e,t)}(n),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,i=r&&r.context;t.$slots=ut(n._renderChildren,i),t.$scopedSlots=e,t._c=function(e,n,r,i){return Pt(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Pt(t,e,n,r,i,!0)};var o=r&&r.data;xe(t,"$attrs",o&&o.attrs||e,null,!0),xe(t,"$listeners",n._parentListeners||e,null,!0)}(n),Yt(n,"beforeCreate"),function(e){var t=ct(e.$options.inject,e);t&&($e(!1),Object.keys(t).forEach(function(n){xe(e,n,t[n])}),$e(!0))}(n),vn(n),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(n),Yt(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(wn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=ke,e.prototype.$delete=Ae,e.prototype.$watch=function(e,t,n){if(s(t))return _n(this,e,t,n);(n=n||{}).user=!0;var r=new fn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){Re(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(wn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i1?k(t):t;for(var n=k(arguments,1),r='event handler for "'+e+'"',i=0,o=t.length;iparseInt(this.max)&&On(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return F}};Object.defineProperty(e,"config",t),e.util={warn:ae,extend:A,mergeOptions:De,defineReactive:xe},e.set=ke,e.delete=Ae,e.nextTick=Ye,e.observable=function(e){return Ce(e),e},e.options=Object.create(null),M.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,A(e.options.components,Tn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=De(this.options,e),this}}(e),Cn(e),function(e){M.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&s(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}(e)}(wn),Object.defineProperty(wn.prototype,"$isServer",{get:te}),Object.defineProperty(wn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(wn,"FunctionalRenderContext",{value:Tt}),wn.version="2.6.12";var En=p("style,class"),Nn=p("input,textarea,option,select,progress"),jn=function(e,t,n){return"value"===n&&Nn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Dn=p("contenteditable,draggable,spellcheck"),Ln=p("events,caret,typing,plaintext-only"),Mn=function(e,t){return Hn(t)||"false"===t?"false":"contenteditable"===e&&Ln(t)?t:"true"},In=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Fn="http://www.w3.org/1999/xlink",Pn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Rn=function(e){return Pn(e)?e.slice(6,e.length):""},Hn=function(e){return null==e||!1===e};function Bn(e){for(var t=e.data,r=e,i=e;n(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(t=Un(i.data,t));for(;n(r=r.parent);)r&&r.data&&(t=Un(t,r.data));return function(e,t){if(n(e)||n(t))return zn(e,Vn(t));return""}(t.staticClass,t.class)}function Un(e,t){return{staticClass:zn(e.staticClass,t.staticClass),class:n(e.class)?[e.class,t.class]:t.class}}function zn(e,t){return e?t?e+" "+t:e:t||""}function Vn(e){return Array.isArray(e)?function(e){for(var t,r="",i=0,o=e.length;i-1?hr(e,t,n):In(t)?Hn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Dn(t)?e.setAttribute(t,Mn(t,n)):Pn(t)?Hn(n)?e.removeAttributeNS(Fn,Rn(t)):e.setAttributeNS(Fn,t,n):hr(e,t,n)}function hr(e,t,n){if(Hn(n))e.removeAttribute(t);else{if(q&&!W&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var mr={create:dr,update:dr};function yr(e,r){var i=r.elm,o=r.data,a=e.data;if(!(t(o.staticClass)&&t(o.class)&&(t(a)||t(a.staticClass)&&t(a.class)))){var s=Bn(r),c=i._transitionClasses;n(c)&&(s=zn(s,Vn(c))),s!==i._prevClass&&(i.setAttribute("class",s),i._prevClass=s)}}var gr,_r,br,$r,wr,Cr,xr={create:yr,update:yr},kr=/[\w).+\-_$\]]/;function Ar(e){var t,n,r,i,o,a=!1,s=!1,c=!1,u=!1,l=0,f=0,p=0,d=0;for(r=0;r=0&&" "===(h=e.charAt(v));v--);h&&kr.test(h)||(u=!0)}}else void 0===i?(d=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(d,r).trim()),d=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==d&&m(),o)for(r=0;r-1?{exp:e.slice(0,$r),key:'"'+e.slice($r+1)+'"'}:{exp:e,key:null};_r=e,$r=wr=Cr=0;for(;!zr();)Vr(br=Ur())?Jr(br):91===br&&Kr(br);return{exp:e.slice(0,wr),key:e.slice(wr+1,Cr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Ur(){return _r.charCodeAt(++$r)}function zr(){return $r>=gr}function Vr(e){return 34===e||39===e}function Kr(e){var t=1;for(wr=$r;!zr();)if(Vr(e=Ur()))Jr(e);else if(91===e&&t++,93===e&&t--,0===t){Cr=$r;break}}function Jr(e){for(var t=e;!zr()&&(e=Ur())!==t;);}var qr,Wr="__r",Zr="__c";function Gr(e,t,n){var r=qr;return function i(){null!==t.apply(null,arguments)&&Qr(e,i,n,r)}}var Xr=Ve&&!(X&&Number(X[1])<=53);function Yr(e,t,n,r){if(Xr){var i=an,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}qr.addEventListener(e,t,Q?{capture:n,passive:r}:n)}function Qr(e,t,n,r){(r||qr).removeEventListener(e,t._wrapper||t,n)}function ei(e,r){if(!t(e.data.on)||!t(r.data.on)){var i=r.data.on||{},o=e.data.on||{};qr=r.elm,function(e){if(n(e[Wr])){var t=q?"change":"input";e[t]=[].concat(e[Wr],e[t]||[]),delete e[Wr]}n(e[Zr])&&(e.change=[].concat(e[Zr],e.change||[]),delete e[Zr])}(i),rt(i,o,Yr,Qr,Gr,r.context),qr=void 0}}var ti,ni={create:ei,update:ei};function ri(e,r){if(!t(e.data.domProps)||!t(r.data.domProps)){var i,o,a=r.elm,s=e.data.domProps||{},c=r.data.domProps||{};for(i in n(c.__ob__)&&(c=r.data.domProps=A({},c)),s)i in c||(a[i]="");for(i in c){if(o=c[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i&&"PROGRESS"!==a.tagName){a._value=o;var u=t(o)?"":String(o);ii(a,u)&&(a.value=u)}else if("innerHTML"===i&&qn(a.tagName)&&t(a.innerHTML)){(ti=ti||document.createElement("div")).innerHTML=""+o+"";for(var l=ti.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(o!==s[i])try{a[i]=o}catch(e){}}}}function ii(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var r=e.value,i=e._vModifiers;if(n(i)){if(i.number)return f(r)!==f(t);if(i.trim)return r.trim()!==t.trim()}return r!==t}(e,t))}var oi={create:ri,update:ri},ai=g(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t});function si(e){var t=ci(e.style);return e.staticStyle?A(e.staticStyle,t):t}function ci(e){return Array.isArray(e)?O(e):"string"==typeof e?ai(e):e}var ui,li=/^--/,fi=/\s*!important$/,pi=function(e,t,n){if(li.test(t))e.style.setProperty(t,n);else if(fi.test(n))e.style.setProperty(C(t),n.replace(fi,""),"important");else{var r=vi(t);if(Array.isArray(n))for(var i=0,o=n.length;i-1?t.split(yi).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function _i(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function bi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&A(t,$i(e.name||"v")),A(t,e),t}return"string"==typeof e?$i(e):void 0}}var $i=g(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),wi=z&&!W,Ci="transition",xi="animation",ki="transition",Ai="transitionend",Oi="animation",Si="animationend";wi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ki="WebkitTransition",Ai="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Oi="WebkitAnimation",Si="webkitAnimationEnd"));var Ti=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ei(e){Ti(function(){Ti(e)})}function Ni(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),gi(e,t))}function ji(e,t){e._transitionClasses&&h(e._transitionClasses,t),_i(e,t)}function Di(e,t,n){var r=Mi(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ci?Ai:Si,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c0&&(n=Ci,l=a,f=o.length):t===xi?u>0&&(n=xi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Ci:xi:null)?n===Ci?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Ci&&Li.test(r[ki+"Property"])}}function Ii(e,t){for(;e.length1}function Ui(e,t){!0!==t.data.show&&Pi(t)}var zi=function(e){var o,a,s={},c=e.modules,u=e.nodeOps;for(o=0;ov?_(e,t(i[y+1])?null:i[y+1].elm,i,d,y,o):d>y&&$(r,p,v)}(p,h,y,o,l):n(y)?(n(e.text)&&u.setTextContent(p,""),_(p,null,y,0,y.length-1,o)):n(h)?$(h,0,h.length-1):n(e.text)&&u.setTextContent(p,""):e.text!==i.text&&u.setTextContent(p,i.text),n(v)&&n(d=v.hook)&&n(d=d.postpatch)&&d(e,i)}}}function k(e,t,i){if(r(i)&&n(e.parent))e.parent.data.pendingInsert=t;else for(var o=0;o-1,a.selected!==o&&(a.selected=o);else if(N(Wi(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function qi(e,t){return t.every(function(t){return!N(t,e)})}function Wi(e){return"_value"in e?e._value:e.value}function Zi(e){e.target.composing=!0}function Gi(e){e.target.composing&&(e.target.composing=!1,Xi(e.target,"input"))}function Xi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Yi(e){return!e.componentInstance||e.data&&e.data.transition?e:Yi(e.componentInstance._vnode)}var Qi={model:Vi,show:{bind:function(e,t,n){var r=t.value,i=(n=Yi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Pi(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Yi(n)).data&&n.data.transition?(n.data.show=!0,r?Pi(n,function(){e.style.display=e.__vOriginalDisplay}):Ri(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},eo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function to(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?to(zt(t.children)):e}function no(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[b(o)]=i[o];return t}function ro(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var io=function(e){return e.tag||Ut(e)},oo=function(e){return"show"===e.name},ao={name:"transition",props:eo,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(io)).length){var r=this.mode,o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var a=to(o);if(!a)return o;if(this._leaving)return ro(e,o);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=no(this),u=this._vnode,l=to(u);if(a.data.directives&&a.data.directives.some(oo)&&(a.data.show=!0),l&&l.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(a,l)&&!Ut(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},c);if("out-in"===r)return this._leaving=!0,it(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),ro(e,o);if("in-out"===r){if(Ut(a))return u;var p,d=function(){p()};it(c,"afterEnter",d),it(c,"enterCancelled",d),it(f,"delayLeave",function(e){p=e})}}return o}}},so=A({tag:String,moveClass:String},eo);function co(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function uo(e){e.data.newPos=e.elm.getBoundingClientRect()}function lo(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete so.mode;var fo={Transition:ao,TransitionGroup:{props:so,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=no(this),s=0;s-1?Gn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Gn[e]=/HTMLUnknownElement/.test(t.toString())},A(wn.options.directives,Qi),A(wn.options.components,fo),wn.prototype.__patch__=z?zi:S,wn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=ve),Yt(e,"beforeMount"),r=function(){e._update(e._render(),n)},new fn(e,r,S,{before:function(){e._isMounted&&!e._isDestroyed&&Yt(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Yt(e,"mounted")),e}(this,e=e&&z?Yn(e):void 0,t)},z&&setTimeout(function(){F.devtools&&ne&&ne.emit("init",wn)},0);var po=/\{\{((?:.|\r?\n)+?)\}\}/g,vo=/[-.*+?^${}()|[\]\/\\]/g,ho=g(function(e){var t=e[0].replace(vo,"\\$&"),n=e[1].replace(vo,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});var mo={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Fr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Ir(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var yo,go={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Fr(e,"style");n&&(e.staticStyle=JSON.stringify(ai(n)));var r=Ir(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},_o=function(e){return(yo=yo||document.createElement("div")).innerHTML=e,yo.textContent},bo=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),$o=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),wo=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Co=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,xo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ko="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+P.source+"]*",Ao="((?:"+ko+"\\:)?"+ko+")",Oo=new RegExp("^<"+Ao),So=/^\s*(\/?)>/,To=new RegExp("^<\\/"+Ao+"[^>]*>"),Eo=/^]+>/i,No=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Io=/&(?:lt|gt|quot|amp|#39);/g,Fo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Po=p("pre,textarea",!0),Ro=function(e,t){return e&&Po(e)&&"\n"===t[0]};function Ho(e,t){var n=t?Fo:Io;return e.replace(n,function(e){return Mo[e]})}var Bo,Uo,zo,Vo,Ko,Jo,qo,Wo,Zo=/^@|^v-on:/,Go=/^v-|^@|^:|^#/,Xo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Yo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qo=/^\(|\)$/g,ea=/^\[.*\]$/,ta=/:(.*)$/,na=/^:|^\.|^v-bind:/,ra=/\.[^.\]]+(?=[^\]]*$)/g,ia=/^v-slot(:|$)|^#/,oa=/[\r\n]/,aa=/\s+/g,sa=g(_o),ca="_empty_";function ua(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:ma(t),rawAttrsMap:{},parent:n,children:[]}}function la(e,t){Bo=t.warn||Sr,Jo=t.isPreTag||T,qo=t.mustUseProp||T,Wo=t.getTagNamespace||T;t.isReservedTag;zo=Tr(t.modules,"transformNode"),Vo=Tr(t.modules,"preTransformNode"),Ko=Tr(t.modules,"postTransformNode"),Uo=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,a=t.whitespace,s=!1,c=!1;function u(e){if(l(e),s||e.processed||(e=fa(e,t)),i.length||e===n||n.if&&(e.elseif||e.else)&&da(n,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)a=e,(u=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];e.pop()}}(r.children))&&u.if&&da(u,{exp:a.elseif,block:a});else{if(e.slotScope){var o=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=e}r.children.push(e),e.parent=r}var a,u;e.children=e.children.filter(function(e){return!e.slotScope}),l(e),e.pre&&(s=!1),Jo(e.tag)&&(c=!1);for(var f=0;f]*>)","i")),p=e.replace(f,function(e,n,r){return u=r.length,Do(l)||"noscript"===l||(n=n.replace(//g,"$1").replace(//g,"$1")),Ro(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});c+=e.length-p.length,e=p,A(l,c-u,c)}else{var d=e.indexOf("<");if(0===d){if(No.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),c,c+v+3),C(v+3);continue}}if(jo.test(e)){var h=e.indexOf("]>");if(h>=0){C(h+2);continue}}var m=e.match(Eo);if(m){C(m[0].length);continue}var y=e.match(To);if(y){var g=c;C(y[0].length),A(y[1],g,c);continue}var _=x();if(_){k(_),Ro(_.tagName,e)&&C(1);continue}}var b=void 0,$=void 0,w=void 0;if(d>=0){for($=e.slice(d);!(To.test($)||Oo.test($)||No.test($)||jo.test($)||(w=$.indexOf("<",1))<0);)d+=w,$=e.slice(d);b=e.substring(0,d)}d<0&&(b=e),b&&C(b.length),t.chars&&b&&t.chars(b,c-b.length,c)}if(e===n){t.chars&&t.chars(e);break}}function C(t){c+=t,e=e.substring(t)}function x(){var t=e.match(Oo);if(t){var n,r,i={tagName:t[1],attrs:[],start:c};for(C(t[0].length);!(n=e.match(So))&&(r=e.match(xo)||e.match(Co));)r.start=c,C(r[0].length),r.end=c,i.attrs.push(r);if(n)return i.unarySlash=n[1],C(n[0].length),i.end=c,i}}function k(e){var n=e.tagName,c=e.unarySlash;o&&("p"===r&&wo(n)&&A(r),s(n)&&r===n&&A(n));for(var u=a(n)||!!c,l=e.attrs.length,f=new Array(l),p=0;p=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)t.end&&t.end(i[u].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}A()}(e,{warn:Bo,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,o,a,l,f){var p=r&&r.ns||Wo(e);q&&"svg"===p&&(o=function(e){for(var t=[],n=0;nc&&(s.push(o=e.slice(c,i)),a.push(JSON.stringify(o)));var u=Ar(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),Mr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Br(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Br(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Br(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=Ir(e,"value")||"null";Er(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Mr(e,"change",Br(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?Wr:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=Br(t,l);c&&(f="if($event.target.composing)return;"+f),Er(e,"value","("+t+")"),Mr(e,u,f,null,!0),(s||a)&&Mr(e,"blur","$forceUpdate()")}(e,r,i);else if(!F.isReservedTag(o))return Hr(e,r,i),!1;return!0},text:function(e,t){t.value&&Er(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Er(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:bo,mustUseProp:jn,canBeLeftOpenTag:$o,isReservedTag:Wn,getTagNamespace:Zn,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(ba)},xa=g(function(e){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))});function ka(e,t){e&&($a=xa(t.staticKeys||""),wa=t.isReservedTag||T,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||d(e.tag)||!wa(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every($a)))}(t);if(1===t.type){if(!wa(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n|^function(?:\s+[\w$]+)?\s*\(/,Oa=/\([^)]*?\);*$/,Sa=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ta={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ea={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Na=function(e){return"if("+e+")return null;"},ja={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Na("$event.target !== $event.currentTarget"),ctrl:Na("!$event.ctrlKey"),shift:Na("!$event.shiftKey"),alt:Na("!$event.altKey"),meta:Na("!$event.metaKey"),left:Na("'button' in $event && $event.button !== 0"),middle:Na("'button' in $event && $event.button !== 1"),right:Na("'button' in $event && $event.button !== 2")};function Da(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=La(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function La(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return La(e)}).join(",")+"]";var t=Sa.test(e.value),n=Aa.test(e.value),r=Sa.test(e.value.replace(Oa,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(ja[s])o+=ja[s],Ta[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=Na(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ma).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Ma(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ta[e],r=Ea[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Ia={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:S},Fa=function(e){this.options=e,this.warn=e.warn||Sr,this.transforms=Tr(e.modules,"transformCode"),this.dataGenFns=Tr(e.modules,"genData"),this.directives=A(A({},Ia),e.directives);var t=e.isReservedTag||T;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Pa(e,t){var n=new Fa(t);return{render:"with(this){return "+(e?Ra(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ra(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ha(e,t);if(e.once&&!e.onceProcessed)return Ba(e,t);if(e.for&&!e.forProcessed)return za(e,t);if(e.if&&!e.ifProcessed)return Ua(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=qa(e,t),i="_t("+n+(r?","+r:""),o=e.attrs||e.dynamicAttrs?Ga((e.attrs||[]).concat(e.dynamicAttrs||[]).map(function(e){return{name:b(e.name),value:e.value,dynamic:e.dynamic}})):null,a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:qa(t,n,!0);return"_c("+e+","+Va(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Va(e,t));var i=e.inlineTemplate?null:qa(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=Pa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ga(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Ka(e){return 1===e.type&&("slot"===e.tag||e.children.some(Ka))}function Ja(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Ua(e,t,Ja,"null");if(e.for&&!e.forProcessed)return za(e,t,Ja);var r=e.slotScope===ca?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(qa(e,t)||"undefined")+":undefined":qa(e,t)||"undefined":Ra(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function qa(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Ra)(a,t)+s}var c=n?function(e,t){for(var n=0,r=0;r':'
',ts.innerHTML.indexOf(" ")>0}var os=!!z&&is(!1),as=!!z&&is(!0),ss=g(function(e){var t=Yn(e);return t&&t.innerHTML}),cs=wn.prototype.$mount;return wn.prototype.$mount=function(e,t){if((e=e&&Yn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ss(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=rs(r,{outputSourceRange:!1,shouldDecodeNewlines:os,shouldDecodeNewlinesForHref:as,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return cs.call(this,e,t)},wn.compile=rs,wn}); \ No newline at end of file diff --git a/themes/fractal-forest/CHANGELOG.md b/themes/fractal-forest/CHANGELOG.md new file mode 100644 index 0000000..407f8da --- /dev/null +++ b/themes/fractal-forest/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [2.0.0](https://git.habd.as/comfusion/fractal-forest/compare/v1.0.0...v2.0.0) (2019-05-10) + + +### Build System + +* **npm:** add conventional commit script ([9e2074c](https://git.habd.as/comfusion/fractal-forest/commit/9e2074c)) +* **npm:** add release script ([980b402](https://git.habd.as/comfusion/fractal-forest/commit/980b402)) +* **npm:** make after-dark optional dependency ([44931c1](https://git.habd.as/comfusion/fractal-forest/commit/44931c1)) +* **npm:** upgrade standard-version dev dep ([47ff232](https://git.habd.as/comfusion/fractal-forest/commit/47ff232)) + + +### Features + +* add after-dark gpg signed release tags ([5e82940](https://git.habd.as/comfusion/fractal-forest/commit/5e82940)) + + + + +# 1.0.0 (2018-07-25) diff --git a/themes/fractal-forest/COPYING b/themes/fractal-forest/COPYING new file mode 100644 index 0000000..558c966 --- /dev/null +++ b/themes/fractal-forest/COPYING @@ -0,0 +1,12 @@ +Copyright (C) 2018, 2019 by Josh Habdas + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/themes/fractal-forest/Dockerfile b/themes/fractal-forest/Dockerfile new file mode 100644 index 0000000..941e699 --- /dev/null +++ b/themes/fractal-forest/Dockerfile @@ -0,0 +1,44 @@ +# DOCKER-VERSION 17.12.0-ce, build c97c6d6 + +# Pull alpine base image +FROM alpine:latest AS codecbuilder + +# Configure build settings +ENV LIBBPG_VERSION=0.9.8 \ + CPU_CORES=1 + +# Fetch and extract bpg library +RUN cd /tmp && \ + wget https://bellard.org/bpg/libbpg-${LIBBPG_VERSION}.tar.gz && \ + mkdir -p /opt/libbpg && \ + tar --strip-components=1 -xzf libbpg-${LIBBPG_VERSION}.tar.gz -C /opt/libbpg && \ + rm -f libbpg-${LIBBPG_VERSION}.tar.gz + +# Set current working directory +WORKDIR /opt/libbpg + +# Set bpg build options +ENV USE_EMCC=y \ + USE_JCTVC=y \ + USE_X265= + +# Install packages required to build codecs +RUN apk add --update --no-cache \ + build-base cmake libpng-dev libjpeg-turbo-dev \ + sdl-dev sdl_image-dev yasm && \ + echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ + apk add --no-cache emscripten + +# Compile codecs in intermediate container +RUN make -j ${CPU_CORES} && make install + +# Generate js file integrity hashes +RUN apk add --update --no-cache openssl +COPY ./bin/generate-hashes.sh . +RUN chmod +x generate-hashes.sh && ./generate-hashes.sh + +# Move codecs and hashes into busybox container +FROM busybox AS codecs +COPY --from=codecbuilder /usr/local/bin/bpg* /usr/local/bin/ +COPY --from=codecbuilder /opt/libbpg/bpg*.js* /var/www/ +WORKDIR /usr/local/bin diff --git a/themes/fractal-forest/README.md b/themes/fractal-forest/README.md new file mode 100644 index 0000000..6916ebf --- /dev/null +++ b/themes/fractal-forest/README.md @@ -0,0 +1,94 @@ +# Fractal Forest + +> Better Portable Graphics module for [After Dark]. Fractal Forest adds support for Fabrice Bellard's [BPG Image format](https://bellard.org/bpg/). + +[![Latest NPM version](https://img.shields.io/npm/v/fractal-forest.svg?style=flat-square)](https://www.npmjs.com/package/fractal-forest) +[![NPM downloads per month](https://img.shields.io/npm/dm/fractal-forest.svg?style=flat-square)](https://www.npmjs.com/package/fractal-forest) +[![Minimum After Dark version](https://img.shields.io/badge/dynamic/json.svg?url=https://git.habd.as/comfusion/fractal-forest/raw/branch/master/package.json&label=after%20dark&query=$..['after-dark']&colorB=000000&style=flat-square&longCache=false&maxAge=86400)](https://git.habd.as/comfusion/after-dark/) +[![0BSD licensed](https://img.shields.io/npm/l/fractal-forest.svg?style=flat-square&longCache=true)](https://git.habd.as/comfusion/fractal-forest/src/branch/master/COPYING) + +## Setup + +None required. + +## Installation + +1. Copy the contents of this repository into a directory called `themes/fractal-forest` under the root of your After Dark site. +2. Add `fractal-forest` as a [theme component](https://gohugo.io/themes/theme-components/) to your After Dark site `config.toml`, e.g. + + ```toml + theme = [ + "fractal-forest", + "after-dark" + ] + ``` + +3. Add and specify settings for the module in your After Dark site config, e.g. + + ```toml + [params.modules.fractal_forest] + enabled = true # Optional, set false to disable module + decoders = [ + "bpgdec8", # 8-bit only javascript decoder without animation + "bpgdec", # > 8-bit javascript decoder without animation + "bpgdec8a" # 8-bit javascript decoder with animation + ] + crossorigin = "anonymous" # Optional, sets CORS attribute + ``` + +4. Build and deploy your After Dark site. + +For additional information please see [BPG Image format](https://bellard.org/bpg/). + +## Development + +For development, install Docker on your machine: + +- [Get started with Docker for Mac](https://docs.docker.com/docker-for-mac/) +- [Get started with Docker for Windows](https://docs.docker.com/docker-for-windows/) + +Then build the codecs with [`docker build`](https://docs.docker.com/engine/reference/commandline/build/). + +To adjust the version of bpg used simply modify `LIBBPG_VERSION` in the `Dockerfile` for desired version and rebuild. If you're on a multicore system adjust `CPU_CORES` to decrease compilation time. + +Docker build produces an intermediate container image with libbpg source and result of compilation. It also copyies the codecs into a busybox image. + +To access the full `libbpg` source run: + +```sh +$ docker run -it 30c982469f98 +``` + +Where `30c982469f98` is the image id of the intermediate step. + +To access just the codecs run: + +```sh +$ docker run -it 712e9ce47e86 +``` + +Where `712e9ce47e86` is the image id of the final build step. + +To update the javascript decoders in `static/js/bpg` run: + +``` +$ docker run --rm --entrypoint tar 712e9ce47e86 cC /var/www/ . | tar xvC static/js +``` + +Where `712e9ce47e86` is the image id of the final build step. + +Reference the [`libbpg` mirror](https://git.habd.as/jhabdas/libbpg/) for additional compilation settings, `README` and `Makefile`. See the [Docker Documentation](https://docs.docker.com) for help with Docker. + +## Contributing + +Please squash commits and use [Convention Commit](https://www.conventionalcommits.org/) messages. Run `npm run commit` after installing NPM dev dependencies for help creating conventional commit messages. + +## Rights + +Copyright (C) 2018, 2019 by Josh Habdas + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. + +The text of the above license is included in the file COPYING in the source. + +[After Dark]: https://git.habd.as/comfusion/after-dark/ diff --git a/themes/fractal-forest/layouts/partials/modules/fractal-forest/index.html b/themes/fractal-forest/layouts/partials/modules/fractal-forest/index.html new file mode 100644 index 0000000..12f1cc9 --- /dev/null +++ b/themes/fractal-forest/layouts/partials/modules/fractal-forest/index.html @@ -0,0 +1,9 @@ +{{ $crossorigin := .crossorigin }} +{{ if ne .enabled false }} + + {{ range .decoders }} + + {{ end }} +{{ else }} + +{{ end }} diff --git a/themes/fractal-forest/package.json b/themes/fractal-forest/package.json new file mode 100644 index 0000000..ce81001 --- /dev/null +++ b/themes/fractal-forest/package.json @@ -0,0 +1,42 @@ +{ + "name": "fractal-forest", + "version": "2.0.0", + "description": "Better Portable Graphics module for After Dark.", + "author": "Josh Habdas ", + "homepage": "https://after-dark.habd.as/module/fractal-forest/", + "standard-version": { + "scripts": { + "posttag": "git tag --sign $(git describe --tags $(git rev-list --tags --max-count=1)) $(git describe --tags $(git rev-list --tags --max-count=1))^{} -f -m \"$(git log -1 --pretty=%B)\" -m \"-----BEGIN DIST INTEGRITY-----\" -m \"$(npm pack --dry-run --json . | grep integrity | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '\" ')\" -m \"-----END DIST INTEGRITY-----\"" + } + }, + "scripts": { + "test": "while true; do head -n 100 /dev/urandom; sleep 0.1; done | hexdump -C | grep 'ca fe'", + "release": "standard-version", + "commit": "npx git-cz" + }, + "repository": { + "type": "git", + "url": "https://git.habd.as/comfusion/fractal-forest.git" + }, + "keywords": [ + "docker", + "hugo", + "wasm", + "bpg", + "asmjs" + ], + "devDependencies": { + "commitizen": "^3.1.1", + "cz-conventional-changelog": "^2.1.0", + "standard-version": "^6.0.1" + }, + "peerDependencies": { + "after-dark": ">= 5.1.0" + }, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } + }, + "license": "0BSD" +} diff --git a/themes/fractal-forest/static/bpg/cinemagraph-6.bpg b/themes/fractal-forest/static/bpg/cinemagraph-6.bpg new file mode 100644 index 0000000..a222dd3 Binary files /dev/null and b/themes/fractal-forest/static/bpg/cinemagraph-6.bpg differ diff --git a/themes/fractal-forest/static/js/bpgdec.js b/themes/fractal-forest/static/js/bpgdec.js new file mode 100644 index 0000000..2e1457b --- /dev/null +++ b/themes/fractal-forest/static/js/bpgdec.js @@ -0,0 +1,17 @@ +((function(){var Module={};var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=console.log;if(!Module["printErr"])Module["printErr"]=console.warn;var nodeFS;var nodePath;Module["read"]=function read(filename,binary){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](filename);return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};Module["load"]=function load(f){globalEval(read(f))};if(!Module["thisProgram"]){if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=read}else{Module["read"]=function read(){throw"no read() available"}}Module["readBinary"]=function readBinary(f){if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}var data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=(function(status,toThrow){quit(status)})}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return xhr.response}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response)}else{onerror()}};xhr.onerror=onerror;xhr.send(null)};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module["print"])Module["print"]=function print(x){console.log(x)};if(!Module["printErr"])Module["printErr"]=function printErr(x){console.warn(x)}}else{var TRY_USE_DUMP=false;if(!Module["print"])Module["print"]=TRY_USE_DUMP&&typeof dump!=="undefined"?(function(x){dump(x)}):(function(x){})}if(ENVIRONMENT_IS_WORKER){Module["load"]=importScripts}if(typeof Module["setWindowTitle"]==="undefined"){Module["setWindowTitle"]=(function(title){document.title=title})}}else{throw"Unknown runtime environment. Where are we?"}function globalEval(x){eval.call(null,x)}if(!Module["load"]&&Module["read"]){Module["load"]=function load(f){globalEval(Module["read"](f))}}if(!Module["print"]){Module["print"]=(function(){})}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}if(!Module["quit"]){Module["quit"]=(function(status,toThrow){throw toThrow})}Module.print=Module["print"];Module.printErr=Module["printErr"];Module["preRun"]=[];Module["postRun"]=[];for(var key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var Runtime={setTempRet0:(function(value){tempRet0=value;return value}),getTempRet0:(function(){return tempRet0}),stackSave:(function(){return STACKTOP}),stackRestore:(function(stackTop){STACKTOP=stackTop}),getNativeTypeSize:(function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),STACK_ALIGN:16,prepVararg:(function(ptr,type){if(type==="double"||type==="i64"){if(ptr&7){assert((ptr&7)===4);ptr+=4}}else{assert((ptr&3)===0)}return ptr}),getAlignSize:(function(type,size,vararg){if(!vararg&&(type=="i64"||type=="double"))return 8;if(!type)return Math.min(size,8);return Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE)}),dynCall:(function(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[],addFunction:(function(func){for(var i=0;i>2];var end=(ret+size+15|0)&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;if(end>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){HEAP32[DYNAMICTOP_PTR>>2]=ret;return 0}}return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;var ABORT=0;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];if(!func){try{func=eval("_"+ident)}catch(e){}}assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)");return func}var cwrap,ccall;((function(){var JSfuncs={"stackSave":(function(){Runtime.stackSave()}),"stackRestore":(function(){Runtime.stackRestore()}),"arrayToC":(function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=Runtime.stackAlloc(len);stringToUTF8(str,ret,len)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};ccall=function ccallFunc(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}Module["setValue"]=setValue;function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type)}return null}Module["getValue"]=getValue;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module["ALLOC_NORMAL"]=ALLOC_NORMAL;Module["ALLOC_STACK"]=ALLOC_STACK;Module["ALLOC_STATIC"]=ALLOC_STATIC;Module["ALLOC_DYNAMIC"]=ALLOC_DYNAMIC;Module["ALLOC_NONE"]=ALLOC_NONE;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return Module["UTF8ToString"](ptr)}Module["Pointer_stringify"]=Pointer_stringify;function AsciiToString(ptr){var str="";while(1){var ch=HEAP8[ptr++>>0];if(!ch)return str;str+=String.fromCharCode(ch)}}Module["AsciiToString"]=AsciiToString;function stringToAscii(str,outPtr){return writeAsciiToMemory(str,outPtr,false)}Module["stringToAscii"]=stringToAscii;var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx){var endPtr=idx;while(u8Array[endPtr])++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}}Module["UTF8ArrayToString"]=UTF8ArrayToString;function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}Module["UTF8ToString"]=UTF8ToString;function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}Module["stringToUTF8Array"]=stringToUTF8Array;function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}Module["stringToUTF8"]=stringToUTF8;function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}Module["lengthBytesUTF8"]=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function demangle(func){var __cxa_demangle_func=Module["___cxa_demangle"]||Module["__cxa_demangle"];if(__cxa_demangle_func){try{var s=func.substr(1);var len=lengthBytesUTF8(s)+1;var buf=_malloc(len);stringToUTF8(s,buf,len);var status=_malloc(4);var ret=__cxa_demangle_func(buf,0,0,status);if(getValue(status,"i32")===0&&ret){return Pointer_stringify(ret)}}catch(e){}finally{if(buf)_free(buf);if(status)_free(status);if(ret)_free(ret)}return func}Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}Module["stackTrace"]=stackTrace;var HEAP;var buffer;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed;var STACK_BASE,STACKTOP,STACK_MAX;var DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0;staticSealed=false;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||33554432;if(TOTAL_MEMORY0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}Module["addOnPreRun"]=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}Module["intArrayToString"]=intArrayToString;function writeStringToMemory(string,buffer,dontAddNull){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var lastChar,end;if(dontAddNull){end=buffer+lengthBytesUTF8(string);lastChar=HEAP8[end]}stringToUTF8(string,buffer,Infinity);if(dontAddNull)HEAP8[end]=lastChar}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;if(!Math["imul"]||Math["imul"](4294967295,5)!==-5)Math["imul"]=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};Math.imul=Math["imul"];if(!Math["clz32"])Math["clz32"]=(function(x){x=x>>>0;for(var i=0;i<32;i++){if(x&1<<31-i)return i}return 32});Math.clz32=Math["clz32"];if(!Math["trunc"])Math["trunc"]=(function(x){return x<0?Math.ceil(x):Math.floor(x)});Math.trunc=Math["trunc"];var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_round=Math.round;var Math_min=Math.min;var Math_clz32=Math.clz32;var Math_trunc=Math.trunc;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var ASM_CONSTS=[];STATIC_BASE=8;STATICTOP=STATIC_BASE+6096;__ATINIT__.push();allocate([29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,33,0,0,0,34,0,0,0,34,0,0,0,35,0,0,0,35,0,0,0,36,0,0,0,36,0,0,0,37,0,0,0,37,0,0,0,93,6,0,0,0,0,0,0,0,0,0,0,53,54,50,72,34,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,7,0,0,0,1,0,0,0,0,0,0,0,255,255,255,127,54,0,0,0,0,0,0,0,3,1,1,0,36,120,37,120,38,120,0,0,0,0,0,0,56,0,0,0,0,0,0,0,3,1,0,16,36,120,37,120,38,120,0,0,0,0,0,0,58,0,0,0,0,0,0,0,3,0,0,16,36,120,37,120,38,120,0,0,0,0,0,0,32,0,0,0,0,0,0,0,1,0,0,0,36,120,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,0,240,154,249,114,252,138,253,30,254,122,254,197,254,0,255,197,254,122,254,30,254,138,253,114,252,154,249,0,240,0,0,1,0,1,2,0,1,2,3,1,2,3,2,3,3,0,1,0,2,1,0,3,2,1,0,3,2,1,3,2,3,0,0,1,0,1,2,0,1,2,3,0,1,2,3,4,0,1,2,3,4,5,0,1,2,3,4,5,6,0,1,2,3,4,5,6,7,1,2,3,4,5,6,7,2,3,4,5,6,7,3,4,5,6,7,4,5,6,7,5,6,7,6,7,7,0,1,0,2,1,0,3,2,1,0,4,3,2,1,0,5,4,3,2,1,0,6,5,4,3,2,1,0,7,6,5,4,3,2,1,0,7,6,5,4,3,2,1,7,6,5,4,3,2,7,6,5,4,3,7,6,5,4,7,6,5,7,6,7,40,45,51,57,64,72,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,9,9,9,10,10,10,10,10,10,11,11,11,11,11,11,12,12,0,0,0,2,5,9,1,4,8,12,3,7,11,14,6,10,13,15,0,2,1,3,0,2,5,9,14,20,27,35,1,4,8,13,19,26,34,42,3,7,12,18,25,33,41,48,6,11,17,24,32,40,47,53,10,16,23,31,39,46,52,57,15,22,30,38,45,51,56,60,21,29,37,44,50,55,59,62,28,36,43,49,54,58,61,63,0,1,0,1,0,0,1,1,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,1,2,3,16,17,18,19,4,5,6,7,20,21,22,23,8,9,10,11,24,25,26,27,12,13,14,15,28,29,30,31,32,33,34,35,48,49,50,51,36,37,38,39,52,53,54,55,40,41,42,43,56,57,58,59,44,45,46,47,60,61,62,63,0,1,4,5,2,3,4,5,6,6,8,8,7,7,8,8,1,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,2,1,0,0,2,1,0,0,2,1,0,0,2,1,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,153,200,139,141,157,154,154,154,154,154,154,154,154,184,154,154,154,184,63,139,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,153,138,138,111,141,94,138,182,154,139,139,139,139,139,139,110,110,124,125,140,153,125,127,140,109,111,143,127,111,79,108,123,63,110,110,124,125,140,153,125,127,140,109,111,143,127,111,79,108,123,63,91,171,134,141,111,111,125,110,110,94,124,108,124,107,125,141,179,153,125,107,125,141,179,153,125,107,125,141,179,153,125,140,139,182,182,152,136,152,136,153,136,139,111,136,139,111,141,111,140,92,137,138,140,152,138,139,153,74,149,92,139,107,122,152,140,179,166,182,140,227,122,197,138,153,136,167,152,152,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,185,107,139,126,154,197,185,201,154,154,154,149,154,139,154,154,154,152,139,110,122,95,79,63,31,31,153,153,153,153,140,198,140,198,168,79,124,138,94,153,111,149,107,167,154,139,139,139,139,139,139,125,110,94,110,95,79,125,111,110,78,110,111,111,95,94,108,123,108,125,110,94,110,95,79,125,111,110,78,110,111,111,95,94,108,123,108,121,140,61,154,155,154,139,153,139,123,123,63,153,166,183,140,136,153,154,166,183,140,136,153,154,166,183,140,136,153,154,170,153,123,123,107,121,107,121,167,151,183,140,151,183,140,140,140,154,196,196,167,154,152,167,182,182,134,149,136,153,121,136,137,169,194,166,167,154,167,137,182,107,167,91,122,107,167,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,160,107,139,126,154,197,185,201,154,154,154,134,154,139,154,154,183,152,139,154,137,95,79,63,31,31,153,153,153,153,169,198,169,198,168,79,224,167,122,153,111,149,92,167,154,139,139,139,139,139,139,125,110,124,110,95,94,125,111,111,79,125,126,111,111,79,108,123,93,125,110,124,110,95,94,125,111,111,79,125,126,111,111,79,108,123,93,121,140,61,154,170,154,139,153,139,123,123,63,124,166,183,140,136,153,154,166,183,140,136,153,154,166,183,140,136,153,154,170,153,138,138,122,121,122,121,167,151,183,140,151,183,140,140,140,154,196,167,167,154,152,167,182,182,134,149,136,153,121,136,122,169,208,166,167,154,152,167,182,107,167,91,107,107,167,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,6,6,7,8,9,10,11,13,14,16,18,20,22,24,29,30,31,32,33,33,34,34,35,35,36,36,37,37,104,101,118,99,0,0,26,10,1,0,1,2,2,2,2,3,5,7,8,10,12,13,15,17,18,19,20,21,22,23,23,24,24,25,25,26,27,27,28,28,29,29,30,31,32,26,21,17,13,9,5,2,0,254,251,247,243,239,235,230,224,230,235,239,243,247,251,254,0,2,5,9,13,17,21,26,32,64,90,90,90,89,88,87,85,83,82,80,78,75,73,70,67,64,61,57,54,50,46,43,38,36,31,25,22,18,13,9,4,255,0,1,0,0,255,0,1,255,255,1,1,1,255,255,1,1,2,0,3,4,16,16,16,16,17,18,21,24,16,16,16,16,17,19,22,25,16,16,17,18,20,22,25,29,16,16,18,21,24,27,31,36,17,17,20,24,30,35,41,47,18,19,22,27,35,44,54,65,21,22,25,31,41,54,70,88,24,25,29,36,47,65,88,115,16,16,16,16,17,18,20,24,16,16,16,17,18,20,24,25,16,16,17,18,20,24,25,28,16,17,18,20,24,25,28,33,17,18,20,24,25,28,33,41,18,20,24,25,28,33,41,54,20,24,25,28,33,41,54,71,24,25,28,33,41,54,71,91,128,176,208,240,128,167,197,227,128,158,187,216,123,150,178,205,116,142,169,195,111,135,160,185,105,128,152,175,100,122,144,166,95,116,137,158,90,110,130,150,85,104,123,142,81,99,117,135,77,94,111,128,73,89,105,122,69,85,100,116,66,80,95,110,62,76,90,104,59,72,86,99,56,69,81,94,53,65,77,89,51,62,73,85,48,59,69,80,46,56,66,76,43,53,63,72,41,50,59,69,39,48,56,65,37,45,54,62,35,43,51,59,33,41,48,56,32,39,46,53,30,37,43,50,29,35,41,48,27,33,39,45,26,31,37,43,24,30,35,41,23,28,33,39,22,27,32,37,21,26,30,35,20,24,29,33,19,23,27,31,18,22,26,30,17,21,25,28,16,20,23,27,15,19,22,25,14,18,21,24,14,17,20,23,13,16,19,22,12,15,18,21,12,14,17,20,11,14,16,19,11,13,15,18,10,12,15,17,10,12,14,16,9,11,13,15,9,11,12,14,8,10,12,14,8,9,11,13,7,9,11,12,7,9,10,12,7,8,10,11,6,8,9,11,6,7,9,10,6,7,8,9,2,2,2,2,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,62,63,0,0,1,2,2,4,4,5,6,7,8,9,9,11,11,12,13,13,15,15,16,16,18,18,19,19,21,21,22,22,23,24,24,25,26,26,27,27,28,29,29,30,30,30,31,32,32,33,33,33,34,34,35,35,35,36,36,36,37,37,37,38,38,63,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;Module["_bitshift64Ashr"]=_bitshift64Ashr;Module["_i64Subtract"]=_i64Subtract;function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}Module["_sbrk"]=_sbrk;Module["_i64Add"]=_i64Add;Module["_memset"]=_memset;Module["_bitshift64Shl"]=_bitshift64Shl;function _abort(){Module["abort"]()}Module["_llvm_bswap_i32"]=_llvm_bswap_i32;Module["___muldsi3"]=___muldsi3;Module["___muldi3"]=___muldi3;function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;DYNAMICTOP_PTR=allocate(1,"i32",ALLOC_STATIC);STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;staticSealed=true;function invoke_iiii(index,a1,a2,a3){try{return Module["dynCall_iiii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){try{Module["dynCall_viiiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){try{Module["dynCall_viiiiiii"](index,a1,a2,a3,a4,a5,a6,a7)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13){try{Module["dynCall_viiiiiiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vi(index,a1){try{Module["dynCall_vi"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vii(index,a1,a2){try{Module["dynCall_vii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){try{return Module["dynCall_iiiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_ii(index,a1){try{return Module["dynCall_ii"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viii(index,a1,a2,a3){try{Module["dynCall_viii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){try{return Module["dynCall_iiiii"](index,a1,a2,a3,a4)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){try{Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iii(index,a1,a2){try{return Module["dynCall_iii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){try{return Module["dynCall_iiiiii"](index,a1,a2,a3,a4,a5)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiii(index,a1,a2,a3,a4){try{Module["dynCall_viiii"](index,a1,a2,a3,a4)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}Module.asmGlobalArg={"Math":Math,"Int8Array":Int8Array,"Int16Array":Int16Array,"Int32Array":Int32Array,"Uint8Array":Uint8Array,"Uint16Array":Uint16Array,"Uint32Array":Uint32Array,"Float32Array":Float32Array,"Float64Array":Float64Array,"NaN":NaN,"Infinity":Infinity};Module.asmLibraryArg={"abort":abort,"assert":assert,"enlargeMemory":enlargeMemory,"getTotalMemory":getTotalMemory,"abortOnCannotGrowMemory":abortOnCannotGrowMemory,"invoke_iiii":invoke_iiii,"invoke_viiiiiiiiii":invoke_viiiiiiiiii,"invoke_viiiiiii":invoke_viiiiiii,"invoke_viiiiiiiiiiiii":invoke_viiiiiiiiiiiii,"invoke_vi":invoke_vi,"invoke_vii":invoke_vii,"invoke_iiiiiii":invoke_iiiiiii,"invoke_ii":invoke_ii,"invoke_viii":invoke_viii,"invoke_iiiii":invoke_iiiii,"invoke_viiiiii":invoke_viiiiii,"invoke_iii":invoke_iii,"invoke_iiiiii":invoke_iiiiii,"invoke_viiii":invoke_viiii,"___setErrNo":___setErrNo,"_emscripten_memcpy_big":_emscripten_memcpy_big,"_abort":_abort,"DYNAMICTOP_PTR":DYNAMICTOP_PTR,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX};// EMSCRIPTEN_START_ASM +var asm=(function(global,env,buffer) { +"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.DYNAMICTOP_PTR|0;var j=env.tempDoublePtr|0;var k=env.ABORT|0;var l=env.STACKTOP|0;var m=env.STACK_MAX|0;var n=0;var o=0;var p=0;var q=0;var r=global.NaN,s=global.Infinity;var t=0,u=0,v=0,w=0,x=0.0,y=0,z=0,A=0,B=0.0;var C=0;var D=global.Math.floor;var E=global.Math.abs;var F=global.Math.sqrt;var G=global.Math.pow;var H=global.Math.cos;var I=global.Math.sin;var J=global.Math.tan;var K=global.Math.acos;var L=global.Math.asin;var M=global.Math.atan;var N=global.Math.atan2;var O=global.Math.exp;var P=global.Math.log;var Q=global.Math.ceil;var R=global.Math.imul;var S=global.Math.min;var T=global.Math.max;var U=global.Math.clz32;var V=env.abort;var W=env.assert;var X=env.enlargeMemory;var Y=env.getTotalMemory;var Z=env.abortOnCannotGrowMemory;var _=env.invoke_iiii;var $=env.invoke_viiiiiiiiii;var aa=env.invoke_viiiiiii;var ba=env.invoke_viiiiiiiiiiiii;var ca=env.invoke_vi;var da=env.invoke_vii;var ea=env.invoke_iiiiiii;var fa=env.invoke_ii;var ga=env.invoke_viii;var ha=env.invoke_iiiii;var ia=env.invoke_viiiiii;var ja=env.invoke_iii;var ka=env.invoke_iiiiii;var la=env.invoke_viiii;var ma=env.___setErrNo;var na=env._emscripten_memcpy_big;var oa=env._abort;var pa=0.0; +// EMSCRIPTEN_START_FUNCS +function Ea(a){a=a|0;var b=0;b=l;l=l+a|0;l=l+15&-16;return b|0}function Fa(){return l|0}function Ga(a){a=a|0;l=a}function Ha(a,b){a=a|0;b=b|0;l=a;m=b}function Ia(a,b){a=a|0;b=b|0;if(!n){n=a;o=b}}function Ja(a){a=a|0;C=a}function Ka(){return C|0}function La(b,d){b=b|0;d=d|0;var e=0;do if(a[(c[b+204>>2]|0)+43>>0]|0){e=c[(c[b+200>>2]|0)+13128>>2]|0;d=(d|0)%(e|0)|0;if((d|0)!=2?!((e|0)==2&(d|0)==0):0)break;Pf(c[b+152>>2]|0,c[b+136>>2]|0,199)|0}while(0);return}function Ma(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=b+204|0;e=c[g>>2]|0;do if((c[(c[e+1668>>2]|0)+(c[b+2500>>2]<<2)>>2]|0)==(d|0)){Na(b);e=b+1449|0;if(a[e>>0]|0){f=c[g>>2]|0;if(a[f+42>>0]|0?(f=c[f+1676>>2]|0,(c[f+(d<<2)>>2]|0)!=(c[f+(d+-1<<2)>>2]|0)):0)i=5}else i=5;if((i|0)==5)Oa(b);if(((a[b+1448>>0]|0)==0?a[(c[g>>2]|0)+43>>0]|0:0)?(h=c[(c[b+200>>2]|0)+13128>>2]|0,((d|0)%(h|0)|0|0)==0):0){if((h|0)==1){Oa(b);break}if((a[e>>0]|0)==1)Pa(b)}}else{if((a[e+42>>0]|0)!=0?(i=c[e+1676>>2]|0,(c[i+(d<<2)>>2]|0)!=(c[i+(d+-1<<2)>>2]|0)):0){if((a[b+141>>0]|0)==1)Qa(c[b+136>>2]|0);else Na(b);Oa(b);e=c[g>>2]|0}if(a[e+43>>0]|0?(f=b+200|0,((d|0)%(c[(c[f>>2]|0)+13128>>2]|0)|0|0)==0):0){e=b+136|0;Ra((c[e>>2]|0)+224|0)|0;if((a[b+141>>0]|0)==1)Qa(c[e>>2]|0);else Na(b);if((c[(c[f>>2]|0)+13128>>2]|0)==1){Oa(b);break}else{Pa(b);break}}}while(0);return}function Na(a){a=a|0;var b=0,d=0;d=a+136|0;a=(c[d>>2]|0)+204|0;Rd(a,1);sb(a);d=(c[d>>2]|0)+224|0;b=c[a>>2]|0;b=b+((tb(a)|0)/8|0)|0;Md(d,b,((ub(a)|0)+7|0)/8|0);return}function Oa(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;g=c[b+1440>>2]|0;e=2-g|0;e=(g|0)==2|(a[b+2060>>0]|0)==0?e:e^3;g=b+2112|0;f=b+136|0;b=0;do{h=d[912+(e*199|0)+b>>0]|0;j=a[g>>0]|0;i=j<<24>>24;h=((h<<3&120)+-16+((R(j<<24>>24<0?0:(i|0)<51?i:51,((h>>>4)*5|0)+-45|0)|0)>>4)<<1)+-127|0;h=h>>31^h;a[(c[f>>2]|0)+b>>0]=(h|0)>124?h&1|124:h;b=b+1|0}while((b|0)!=199);b=0;do{a[(c[f>>2]|0)+199+b>>0]=0;b=b+1|0}while((b|0)!=4);return}function Pa(a){a=a|0;Pf(c[a+136>>2]|0,c[a+152>>2]|0,199)|0;return}function Qa(a){a=a|0;vb(a+224|0);return}function Ra(a){a=a|0;var b=0,d=0;d=a+4|0;b=(c[d>>2]|0)+-2|0;c[d>>2]=b;if((c[a>>2]|0)<(b<<17|0)){wb(a);a=0}else a=(c[a+16>>2]|0)-(c[a+12>>2]|0)|0;return a|0}function Sa(a){a=a|0;a=c[a+136>>2]|0;return Ta(a+224|0,a)|0}function Ta(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=d[e>>0]|0;g=b+4|0;i=c[g>>2]|0;j=d[5253+((i<<1&384)+f)>>0]|0;i=i-j|0;k=i<<17;l=c[b>>2]|0;h=k-l>>31;c[b>>2]=l-(h&k);c[g>>2]=(h&j-i)+i;f=h^f;a[e>>0]=a[5893+f>>0]|0;h=c[g>>2]|0;e=d[4741+h>>0]|0;c[g>>2]=h<>2]<>2]=e;if(!(e&65535))yb(b);return f&1|0}function Ua(a){a=a|0;var b=0;a=a+136|0;b=c[a>>2]|0;if(!(Ta(b+224|0,b+1|0)|0))a=0;else{a=(Va((c[a>>2]|0)+224|0)|0)==0;a=a?1:2}return a|0}function Va(a){a=a|0;var b=0,d=0;b=c[a>>2]<<1;c[a>>2]=b;if(!(b&65534)){xb(a);b=c[a>>2]|0}d=c[a+4>>2]<<17;if((b|0)<(d|0))b=0;else{c[a>>2]=b-d;b=1}return b|0}function Wa(a){a=a|0;var b=0,d=0;d=a+136|0;a=0;b=Va((c[d>>2]|0)+224|0)|0;do{b=Va((c[d>>2]|0)+224|0)|0|b<<1;a=a+1|0}while((a|0)!=4);return b|0}function Xa(a){a=a|0;var b=0,d=0;d=c[(c[a+200>>2]|0)+52>>2]|0;d=(d|0)>10?31:(1<0){a=0;do{if(!(Va((c[b>>2]|0)+224|0)|0))break a;a=a+1|0}while((a|0)<(d|0))}else a=0;while(0);return a|0}function Ya(a){a=a|0;return Va((c[a+136>>2]|0)+224|0)|0}function Za(a){a=a|0;var b=0;b=a+136|0;a=(Va((c[b>>2]|0)+224|0)|0)<<1;return Va((c[b>>2]|0)+224|0)|0|a|0}function _a(a){a=a|0;return Ra((c[a+136>>2]|0)+224|0)|0}function $a(a){a=a|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+5|0)|0}function ab(a){a=a|0;var b=0,d=0,e=0,f=0;e=a+136|0;a=9;b=0;while(1){d=c[e>>2]|0;if(!(Ta(d+224|0,d+a|0)|0)){a=0;break}b=b+1|0;if((b|0)>=5){a=0;d=0;f=4;break}else a=10}do if((f|0)==4){while(1){f=0;if(!(Va((c[e>>2]|0)+224|0)|0)){f=5;break}a=(1<>2]|0)+224|0)|0)<>2]|0)+224|0)|0}function cb(a){a=a|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+176|0)|0}function db(b){b=b|0;var d=0,e=0,f=0;f=a[(c[b+204>>2]|0)+1633>>0]|0;f=(f&255)>5?f:5;e=f&255;d=b+136|0;a:do if(!(f<<24>>24))b=0;else{b=0;do{f=c[d>>2]|0;if(!(Ta(f+224|0,f+177|0)|0))break a;b=b+1|0}while((b|0)<(e|0))}while(0);return b|0}function eb(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;k=c[b+200>>2]|0;l=(1<>2])+-1|0;j=c[k+13064>>2]|0;i=f>>j;j=g>>j;m=c[b+136>>2]|0;if((a[m+308>>0]|0)!=0|(l&f|0)!=0)h=d[(c[b+4336>>2]|0)+(i+-1+(R(c[k+13140>>2]|0,j)|0))>>0]|0;else h=0;if((l&g|0)!=0|(a[m+309>>0]|0)!=0)f=d[(c[b+4336>>2]|0)+((R(c[k+13140>>2]|0,j+-1|0)|0)+i)>>0]|0;else f=0;return Ta(m+224|0,m+(((h|0)>(e|0)?3:2)+((f|0)>(e|0)&1))|0)|0}function fb(a,b){a=a|0;b=b|0;b=c[a+136>>2]|0;b=(Ta(b+224|0,b+13|0)|0)==0;return (b?3:0)|0}function gb(a){a=a|0;return Ra((c[a+136>>2]|0)+224|0)|0}function hb(a){a=a|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+17|0)|0}function ib(a){a=a|0;var b=0;b=a+136|0;a=0;do{if(!(Va((c[b>>2]|0)+224|0)|0))break;a=a+1|0}while((a|0)<2);return a|0}function jb(a){a=a|0;var b=0,d=0;d=a+136|0;a=0;b=Va((c[d>>2]|0)+224|0)|0;do{b=Va((c[d>>2]|0)+224|0)|0|b<<1;a=a+1|0}while((a|0)!=4);return b|0}function kb(a){a=a|0;var b=0;a=a+136|0;b=c[a>>2]|0;if(!(Ta(b+224|0,b+18|0)|0))a=4;else{b=(Va((c[a>>2]|0)+224|0)|0)<<1;a=Va((c[a>>2]|0)+224|0)|0|b}return a|0}function lb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+(42-b)|0)|0}function mb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+(b+42)|0)|0}function nb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+((b|0)==0?41:40)|0)|0}function ob(a,b){a=a|0;b=b|0;var d=0,e=0;d=a+136|0;b=(b<<2)+166|0;a=0;do{e=c[d>>2]|0;if(!(Ta(e+224|0,e+(b+a)|0)|0))break;a=a+1|0}while((a|0)<4);return a|0}function pb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+(b+174)|0)|0}function qb(f,g,h,i,j,k){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,wa=0,xa=0,za=0,Aa=0,Ba=0,Ca=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0;Pa=l;l=l+96|0;Ea=Pa+24|0;Fa=Pa+8|0;Ga=Pa;Ha=f+136|0;Ka=c[Ha>>2]|0;Ma=c[f+160>>2]|0;Na=c[Ma+32+(k<<2)>>2]|0;Oa=f+200|0;z=c[Oa>>2]|0;La=R(h>>c[z+13180+(k<<2)>>2],Na)|0;La=(c[Ma+(k<<2)>>2]|0)+((g>>c[z+13168+(k<<2)>>2]<>2])+La)|0;z=(k|0)!=0;Ma=Ka+320|0;Ja=z?Ka+11680|0:Ma;g=Ea;h=g+64|0;do{a[g>>0]=0;g=g+1|0}while((g|0)<(h|0));y=1<>2]|0;Ia=y<>0]|0)){m=a[Ka+272>>0]|0;o=f+204|0;xa=c[o>>2]|0;if((a[xa+21>>0]|0)!=0?(d[xa+1629>>0]|0)>=(i|0):0)q=rb(f,k)|0;else q=0;do if(!Aa){g=c[o>>2]|0;if((k|0)==1){g=(c[f+2072>>2]|0)+(c[g+28>>2]|0)|0;h=Ka+302|0}else{g=(c[f+2076>>2]|0)+(c[g+32>>2]|0)|0;h=Ka+303|0}g=g+m+(a[h>>0]|0)|0;m=c[Oa>>2]|0;h=c[m+13192>>2]|0;xa=0-h|0;g=(g|0)<(xa|0)?xa:(g|0)<57?g:57;if((c[m+4>>2]|0)!=1){g=(g|0)<51?g:51;break}if((g|0)>=30)if((g|0)>43){g=g+-6|0;break}else{g=c[8+(g+-30<<2)>>2]|0;break}}else{xa=c[Oa>>2]|0;g=m;h=c[xa+13192>>2]|0;m=xa}while(0);n=h+g|0;h=(c[m+52>>2]|0)+i|0;g=h+-5|0;h=1<>0]|0)>>0]<>0];if((a[m+634>>0]|0)!=0?!((i|0)>2&(q|0)!=0):0){o=c[o>>2]|0;o=(a[o+68>>0]|0)==0?m+635|0:o+69|0;p=((c[Ka+31244>>2]|0)!=1?3:0)+k|0;m=o+((i+-2|0)*384|0)+(p<<6)|0;if((i|0)>3){wa=q;ua=m;x=a[o+1536+((i+-4|0)*6|0)+p>>0]|0}else{wa=q;ua=m;x=16}}else{wa=q;ua=0;x=16}}else{g=0;h=0;n=0;wa=0;ua=0;x=0}ta=i<<1;s=ta+-1|0;xa=i+-2|0;p=Aa?(xa*3|0)+(i+-1>>2)|0:15;r=Aa?i+1>>2:xa;if((ta|0)>1){o=p+52|0;m=0;while(1){ta=c[Ha>>2]|0;if(!(Ta(ta+224|0,ta+(o+(m>>r))|0)|0)){q=m;break}m=m+1|0;if((m|0)>=(s|0)){q=m;break}}o=p+70|0;m=0;while(1){ta=c[Ha>>2]|0;if(!(Ta(ta+224|0,ta+(o+(m>>r))|0)|0)){r=m;break}m=m+1|0;if((m|0)>=(s|0)){r=m;break}}if((q|0)>3){p=(q>>>1)+-1|0;m=Va((c[Ha>>2]|0)+224|0)|0;if((p|0)>1){o=1;do{m=Va((c[Ha>>2]|0)+224|0)|0|m<<1;o=o+1|0}while((o|0)!=(p|0))}q=m+((q&1|2)<3){p=(r>>>1)+-1|0;m=Va((c[Ha>>2]|0)+224|0)|0;if((p|0)>1){o=1;do{m=Va((c[Ha>>2]|0)+224|0)|0|m<<1;o=o+1|0}while((o|0)!=(p|0))}v=m+((r&1|2)<>2;m=v>>2;Ba=44}else{w=q>>2;u=v>>2;switch(j|0){case 0:break;case 1:{sa=736;ta=752;o=d[768+(v<<3)+q>>0]|0;p=728;r=732;s=v;m=w;break a}default:{s=v;t=q;m=w;Ba=44;break a}}o=d[(q&3)+(644+((v&3)<<2))>>0]|0;switch(i|0){case 2:{sa=326;ta=342;p=3716;r=3716;s=v;m=w;break a}case 3:{p=732;r=728;m=660+(u<<1)+w|0;break}case 4:{p=326;r=342;m=644+(u<<2)+w|0;break}default:{p=358;r=422;m=664+(u<<3)+w|0}}sa=326;ta=342;o=(d[m>>0]<<4)+o|0;s=v;m=w}while(0);if((Ba|0)==44){sa=752;ta=736;o=d[768+(t<<3)+s>>0]|0;p=732;r=728;q=t}ra=o+1|0;pa=o>>4;if((pa|0)>-1){qa=(1<0;oa=na?90:88;ma=y+-1>>2;ia=z?27:0;ja=(i|0)==2;ka=(i|0)==3;la=ia+3|0;_=(j|0)==0?9:15;Z=Aa?0:27;$=(wa|0)==0;Y=Aa?42:43;X=Aa?40:41;aa=Ka+31244|0;ba=(wa|0)!=0;ca=(Ca|16|0)==26;da=f+204|0;ea=((n|0)<0)<<31>>31;fa=((h|0)<0)<<31>>31;ha=(i|0)>2&ba;ga=(i|0)<4;U=x&255;V=(Aa&1)<<1;W=V|1;T=ia+(ka?9:12)|0;v=1;S=pa;t=0;o=16;while(1){y=S<<4;j=a[p+S>>0]|0;E=j&255;B=a[r+S>>0]|0;F=B&255;D=(S|0)!=0;if((S|0)<(pa|0)&D){if((E|0)<(qa|0))w=d[Ea+(E+1<<3)+F>>0]|0;else w=0;if((F|0)<(qa|0))x=(d[F+1+(Ea+(E<<3))>>0]|0)+w|0;else x=w;k=c[Ha>>2]|0;w=1;k=(Ta(k+224|0,k+(((x|0)<1?x:1)+oa)|0)|0)&255}else{w=0;k=((B|j)<<24>>24==0|(E|0)==(m|0)&(F|0)==(u|0))&1}a[Ea+(E<<3)+F>>0]=k;x=ra-y|0;if((S|0)==(pa|0)){a[Fa>>0]=x+255;A=x+-2|0;x=1}else{A=15;x=0}if((E|0)<(ma|0))y=(a[Ea+(E+1<<3)+F>>0]|0)!=0&1;else y=0;if((F|0)<(ma|0))y=((a[F+1+(Ea+(E<<3))>>0]|0)!=0&1)<<1|y;do if((A|0)>-1&k<<24>>24!=0){if(!(c[(c[Oa>>2]|0)+13100>>2]|0))if(ja){k=832;j=ia}else Ba=65;else if($){z=(a[za>>0]|0)!=0;if(z|ja){k=z?896:832;j=z?X:ia}else Ba=65}else{k=896;j=X}do if((Ba|0)==65){Ba=0;k=832+((y<<4)+16)|0;if(Aa){y=(B|j)<<24>>24==0?ia:la;if(ka){j=y+_|0;break}else{j=y+21|0;break}}else j=T}while(0);if((A|0)>0){z=j+92|0;y=A;while(1){Q=c[Ha>>2]|0;if(Ta(Q+224|0,Q+(z+(d[k+((d[ta+y>>0]<<2)+(d[sa+y>>0]|0))>>0]|0))|0)|0){a[Fa+(x&255)>>0]=y;x=x+1<<24>>24;w=0}if((y|0)>1)y=y+-1|0;else break}}if(!w){if(c[(c[Oa>>2]|0)+13100>>2]|0)if($?(a[za>>0]|0)==0:0)Ba=78;else w=Y;else Ba=78;if((Ba|0)==78){Ba=0;w=(S|0)==0?Z:j+2|0}Q=c[Ha>>2]|0;if((Ta(Q+224|0,Q+(w+92)|0)|0)!=1)break}a[Fa+(x&255)>>0]=0;x=x+1<<24>>24}while(0);Q=x&255;if(x<<24>>24){w=Aa&D?2:0;if(!(c[(c[Oa>>2]|0)+13116>>2]|0))D=0;else{if($?(a[za>>0]|0)==0:0)t=V;else t=W;D=(d[Ka+199+t>>0]|0)>>>2&255}A=(S|0)!=(pa|0)&(v|0)==0&1|w;B=a[Fa>>0]|0;j=B&255;k=Q>>>0<8?Q:8;if((k|0)>0){z=A<<2;w=-1;y=0;v=1;do{P=v+z|0;O=c[Ha>>2]|0;P=(Ta(O+224|0,O+((na?P+16|0:P)+136)|0)|0)&255;a[Ga+y>>0]=P;if(!(P<<24>>24))v=((v+-1|0)>>>0<2&1)+v|0;else{w=(w|0)==-1?y:w;v=0}y=y+1|0}while((y|0)<(k|0));P=w}else{P=-1;v=1}y=Q+-1|0;O=a[Fa+y>>0]|0;w=O&255;do if(!(a[za>>0]|0)){if((c[aa>>2]|0)==1?ca&(ba&(c[(c[Oa>>2]|0)+13104>>2]|0)!=0):0){w=0;break}w=(j-w|0)>3&1}else w=0;while(0);if((P|0)!=-1){M=c[Ha>>2]|0;M=Ta(M+224|0,M+((na?A|4:A)|160)|0)|0;N=Ga+P|0;a[N>>0]=(d[N>>0]|0)+M}N=(w|0)!=0;k=N&(a[(c[da>>2]|0)+4>>0]|0)!=0;M=k?y&255:x;k=k?17:16;y=M&255;if(!(M<<24>>24))w=0;else{x=0;w=0;do{w=Va((c[Ha>>2]|0)+224|0)|0|w<<1;x=x+1|0}while((x|0)!=(y|0))}M=E<<2;K=F<<2;L=Ka+199+t|0;F=0;E=0;G=w<>0]|0)+M|0;I=(d[ta+I>>0]|0)+K|0;do if((J|0)<8){B=(d[Ga+J>>0]|0)+1|0;A=(J|0)==(P|0);if((B|0)==((A?3:2)|0)&0==((A?0:0)|0))w=0;else{A=E;z=j;w=B;x=0;break}while(1){if(!(Va((c[Ha>>2]|0)+224|0)|0)){Ba=106;break}w=w+1|0;if((w|0)>=31){Ba=109;break}}do if((Ba|0)==106){Ba=0;if((w|0)>=3){Ba=109;break}if((j|0)>0){y=0;x=0}else{x=0;break}do{x=Va((c[Ha>>2]|0)+224|0)|0|x<<1;y=y+1|0}while((y|0)!=(j|0))}while(0);if((Ba|0)==109){Ba=0;k=w+-3|0;y=k+j|0;if((y|0)>0){w=0;x=0;do{w=Va((c[Ha>>2]|0)+224|0)|0|w<<1;x=x+1|0}while((x|0)!=(y|0))}else w=0;x=w;w=(1<>31|0,B|0,0)|0;x=C;B=3<>31;y=c[(c[Oa>>2]|0)+13116>>2]|0;if((x|0)>(z|0)|(x|0)==(z|0)&w>>>0>B>>>0){z=j+1|0;z=(y|0)==0?((z|0)<4?z:4):z}else z=j;if((E|0)!=0|(y|0)==0){A=E;break}k=a[L>>0]|0;y=(k&255)>>>2&255;if((A|0)<(3<>24==0|(A<<1|0)>=(1<>0]=y+k<<24>>24;A=1}else{w=0;while(1){if(!(Va((c[Ha>>2]|0)+224|0)|0)){Ba=120;break}w=w+1|0;if((w|0)>=31){Ba=123;break}}do if((Ba|0)==120){Ba=0;if((w|0)>=3){Ba=123;break}if((j|0)>0){y=0;x=0}else{x=0;break}do{x=Va((c[Ha>>2]|0)+224|0)|0|x<<1;y=y+1|0}while((y|0)!=(j|0))}while(0);if((Ba|0)==123){Ba=0;k=w+-3|0;y=k+j|0;if((y|0)>0){w=0;x=0;do{w=Va((c[Ha>>2]|0)+224|0)|0|w<<1;x=x+1|0}while((x|0)!=(y|0))}else w=0;x=w;w=(1<>31;y=c[(c[Oa>>2]|0)+13116>>2]|0;if((z|0)>=(3<>0]|0;y=(k&255)>>>2&255;if((z|0)<(3<>24==0|(z<<1|0)>=(1<>0]=y+k<<24>>24;A=1;z=j}while(0);if(N&(a[(c[da>>2]|0)+4>>0]|0)!=0){j=Jf(w|0,x|0,F|0,0)|0;F=(j&1|0)==0?1:D<<24>>24!=O<<24>>24;E=Hf(0,0,w|0,x|0)|0;w=F?w:E;x=F?x:C}else j=F;k=(G&32768|0)==0;y=Hf(0,0,w|0,x|0)|0;y=k?w:y;x=k?x:C;k=G<<1&131070;w=y&65535;do if(!(a[za>>0]|0)){do if(!((a[(c[Oa>>2]|0)+634>>0]|0)==0|ha)){if(!(ga|(I|H|0)!=0)){o=U;break}switch(i|0){case 3:{o=(I<<3)+H|0;break}case 4:{o=(I>>>1<<3)+(H>>>1)|0;break}case 5:{o=(I>>>2<<3)+(H>>>2)|0;break}default:o=(I<<2)+H|0}o=d[ua+o>>0]|0}while(0);w=Of(y|0,x|0,n|0,ea|0)|0;w=Of(w|0,C|0,o|0,((o|0)<0)<<31>>31|0)|0;w=Jf(w|0,C|0,h|0,fa|0)|0;w=Gf(w|0,C|0,g|0)|0;x=C;if((x|0)<0){w=(w&-32768|0)==-32768&(x&268435455|0)==268435455?w&65535:-32768;break}else{G=x>>>0<0|(x|0)==0&w>>>0<32767;w=G?w:32767;w=w&65535;break}}while(0);b[Ja+((I<>1]=w;w=J+1|0;if((w|0)==(Q|0))break;F=j;E=A;G=k;j=z;J=w;D=a[Fa+w>>0]|0}}if((S|0)>0)S=S+-1|0;else break}}do if(a[za>>0]|0){if((Ca|16|0)==26?(c[(c[Oa>>2]|0)+13104>>2]|0)!=0:0)ya[c[f+2632>>2]&7](Ja,i&65535,(Ca|0)==26&1)}else{g=(i|0)==2;if(wa|0){h=c[Oa>>2]|0;if(g&(c[h+13096>>2]|0)!=0?(c[Ka+31244>>2]|0)==1:0){g=0;do{Fa=Ja+(15-g<<1)|0;Ga=b[Fa>>1]|0;Ha=Ja+(g<<1)|0;b[Fa>>1]=b[Ha>>1]|0;b[Ha>>1]=Ga;g=g+1|0}while((g|0)!=8)}g=i&65535;ya[c[f+2628>>2]&7](Ja,g,c[h+52>>2]|0);if(!(c[(c[Oa>>2]|0)+13104>>2]|0))break;if(!((Ca|16|0)==26?(c[Ka+31244>>2]|0)==1:0))break;ya[c[f+2632>>2]&7](Ja,g,(Ca|0)==26&1);break}if(g&(Aa&(c[Ka+31244>>2]|0)==1)){va[c[f+2636>>2]&7](Ja,c[(c[Oa>>2]|0)+52>>2]|0);break}h=(q|0)>(s|0)?q:s;if(!h){va[c[f+2656+(xa<<2)>>2]&7](Ja,c[(c[Oa>>2]|0)+52>>2]|0);break}g=s+4+q|0;do if((h|0)>=4)if((h|0)<8){g=(g|0)<8?g:8;break}else{g=(h|0)<12?((g|0)<24?g:24):g;break}else g=(g|0)<4?g:4;while(0);ya[c[f+2640+(xa<<2)>>2]&7](Ja,g,c[(c[Oa>>2]|0)+52>>2]|0)}while(0);if(a[Ka+304>>0]|0?(Ia|0)>0:0){h=c[Ka+284>>2]|0;g=0;do{Ka=Ja+(g<<1)|0;b[Ka>>1]=((R(b[Ma+(g<<1)>>1]|0,h)|0)>>>3)+(e[Ka>>1]|0);g=g+1|0}while((g|0)!=(Ia|0))}Da[c[f+2612+(xa<<2)>>2]&7](La,Ja,Na,c[(c[Oa>>2]|0)+52>>2]|0);l=Pa;return}function rb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+(b|0?47:46)|0)|0}function sb(a){a=a|0;var b=0;b=0-(tb(a)|0)&7;if(b|0)Rd(a,b);return}function tb(a){a=a|0;return c[a+8>>2]|0}function ub(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(tb(a)|0)|0}function vb(a){a=a|0;var b=0,d=0;b=c[a+16>>2]|0;d=c[a>>2]|0;b=(d&1|0)==0?b:b+-1|0;b=(d&511|0)==0?b:b+-1|0;d=(c[a+20>>2]|0)-b|0;if((d|0)>=0)Md(a,b,d);return}function wb(a){a=a|0;var b=0,d=0,e=0;d=a+4|0;e=c[d>>2]|0;b=(e+-256|0)>>>31;c[d>>2]=e<>2]<>2]=b;if(!(b&65535))xb(a);return}function xb(a){a=a|0;var b=0,e=0;b=a+16|0;e=c[b>>2]|0;c[a>>2]=(c[a>>2]|0)+-65535+((d[e+1>>0]|0)<<1|(d[e>>0]|0)<<9);if(e>>>0<(c[a+20>>2]|0)>>>0)c[b>>2]=e+2;return}function yb(a){a=a|0;var b=0,e=0,f=0;f=c[a>>2]|0;e=a+16|0;b=c[e>>2]|0;c[a>>2]=(((d[b+1>>0]|0)<<1|(d[b>>0]|0)<<9)+-65535<<7-(d[4741+((f+-1^f)>>15)>>0]|0))+f;if(b>>>0<(c[a+20>>2]|0)>>>0)c[e>>2]=b+2;return}function zb(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0;d=Ab(b,d,e)|0;f=c[b+136>>2]|0;e=c[f+280>>2]|0;if(e){g=c[(c[b+200>>2]|0)+13192>>2]|0;b=d+52+e+(g<<1)|0;d=b+((b|0)>0?0:-52-g+1|0)|0;d=((d|0)%(g+52|0)|0)-g+b-d|0}a[f+272>>0]=d;return}function Ab(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=c[b+136>>2]|0;m=c[b+200>>2]|0;j=c[m+13080>>2]|0;i=(1<>2]|0)+24>>2]|0);h=j&d;j=j&e;k=c[m+13140>>2]|0;m=c[m+13064>>2]|0;l=h>>m;m=j>>m;f=g+203|0;if((a[f>>0]|0)!=0|(h|j|0)==0){a[f>>0]=(a[g+300>>0]|0)==0&1;f=a[b+2112>>0]|0}else f=c[g+276>>2]|0;if((i&d|0)!=0&(h&i|0)!=0){g=l+-1+(R(m,k)|0)|0;g=a[(c[b+4316>>2]|0)+g>>0]|0}else g=f;if((i&e|0)!=0&(j&i|0)!=0){f=(R(m+-1|0,k)|0)+l|0;f=a[(c[b+4316>>2]|0)+f>>0]|0}return g+1+f>>1|0}function Bb(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;k=c[b+136>>2]|0;l=b+200|0;g=(e|0)>0&(e&7|0)==0;do if(g){if(((a[b+2062>>0]|0)==0?c[k+31312>>2]&4|0:0)?((e|0)%(1<>2]|0)+13080>>2]|0)|0|0)==0:0)break;if((a[(c[b+204>>2]|0)+53>>0]|0)==0?(c[k+31312>>2]&8|0)!=0:0){if(!((e|0)%(1<>2]|0)+13080>>2]|0)|0))break}else m=8;if((m|0)==8?!g:0)break;h=1<>2]|0)+(g+d+(R(c[j>>2]|0,e)|0)>>2)>>0]=2;g=g+4|0}while((g|0)<(h|0))}}while(0);g=(d|0)>0&(d&7|0)==0;do if(g){if(((a[b+2062>>0]|0)==0?c[k+31312>>2]&1|0:0)?((d|0)%(1<>2]|0)+13080>>2]|0)|0|0)==0:0)break;if((a[(c[b+204>>2]|0)+53>>0]|0)==0?(c[k+31312>>2]&2|0)!=0:0){if(!((d|0)%(1<>2]|0)+13080>>2]|0)|0))break}else m=19;if((m|0)==19?!g:0)break;j=1<>2]|0)+((R(c[h>>2]|0,g+e|0)|0)+d>>2)>>0]=2;g=g+4|0}while((g|0)<(j|0))}}while(0);return}function Cb(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;g=b+200|0;j=((c[(c[g>>2]|0)+13120>>2]|0)-f|0)<=(d|0);Db(b,d,e);g=c[g>>2]|0;if(!(a[g+12941>>0]|0)){}else{g=((c[g+13124>>2]|0)-f|0)<=(e|0);h=(e|0)!=0;i=(d|0)!=0;if(i&h)Eb(b,d-f|0,e-f|0);if(i&g)Eb(b,d-f|0,e);h&j?(Eb(b,d,e-f|0),a[b+140>>0]&1):0;j&g?(Eb(b,d,e),a[b+140>>0]&1):0}return}function Db(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;$=l;l=l+32|0;U=$+8|0;N=$;Y=$+18|0;Z=$+16|0;b[Y>>1]=0;b[Z>>1]=0;_=e+200|0;k=c[_>>2]|0;h=c[k+13080>>2]|0;j=1<>h,c[k+13128>>2]|0)|0)+(f>>h)|0;i=c[e+2508>>2]|0;T=c[i+(h<<3)+4>>2]|0;M=c[i+(h<<3)>>2]|0;if((c[k+68>>2]|0)!=0?(a[k+13056>>0]|0)!=0:0)X=1;else X=(a[(c[e+204>>2]|0)+40>>0]|0)!=0;V=c[k+52>>2]|0;W=(f|0)!=0;if(W){L=h+-1|0;O=c[i+(L<<3)+4>>2]|0;L=c[i+(L<<3)>>2]|0}else{O=0;L=0}K=j+f|0;Q=c[k+13120>>2]|0;S=(K|0)>(Q|0)?Q:K;P=j+g|0;J=c[k+13124>>2]|0;P=(P|0)>(J|0)?J:P;K=(Q|0)<=(K|0)?S:S+-8|0;Q=(P|0)>(g|0);if(Q){w=W?f:8;x=(w|0)<(S|0);y=W?f+-8|0:0;z=e+4320|0;A=e+2596|0;B=N+4|0;C=e+160|0;D=Y+1|0;E=Z+1|0;F=e+4300|0;G=e+4284|0;H=e+4324|0;I=e+4304|0;J=e+4288|0;v=(y|0)>=(K|0);u=g;i=T;h=M;do{if(x){r=u+4|0;s=i+-2&-2;p=w;do{m=c[H>>2]|0;t=c[A>>2]|0;j=a[m+((R(t,u)|0)+p>>2)>>0]|0;k=j&255;t=a[m+((R(t,r)|0)+p>>2)>>0]|0;m=t&255;n=t<<24>>24==0;do if((t|j)<<24>>24){t=p+-1|0;o=Kb(e,t,u)|0;o=o+1+(Kb(e,p,u)|0)>>1;q=o+h|0;q=d[1509+((q|0)<0?0:(q|0)<51?q:51)>>0]|0;if(!(j<<24>>24))j=0;else{j=s+(k<<1)+o|0;j=d[1561+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[N>>2]=j;if(n)j=0;else{j=s+(m<<1)+o|0;j=d[1561+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[B>>2]=j;o=c[C>>2]|0;j=c[o+32>>2]|0;k=R(j,u)|0;k=(c[o>>2]|0)+((p<>2]|0)+56>>2])+k)|0;if(X){a[Y>>0]=Lb(e,t,u)|0;a[D>>0]=Lb(e,t,r)|0;a[Z>>0]=Lb(e,p,u)|0;a[E>>0]=Lb(e,p,r)|0;sa[c[I>>2]&7](k,j,q,N,Y,Z,V);break}else{sa[c[J>>2]&7](k,j,q,N,Y,Z,V);break}}while(0);p=p+8|0}while((p|0)<(S|0))}if(!((u|0)==0|v)){s=u+-1|0;r=y;do{n=c[z>>2]|0;t=R(c[A>>2]|0,u)|0;j=a[n+(t+r>>2)>>0]|0;m=j&255;q=r+4|0;t=a[n+(t+q>>2)>>0]|0;n=t&255;o=t<<24>>24==0;do if((t|j)<<24>>24){k=Kb(e,r,s)|0;k=k+1+(Kb(e,r,u)|0)>>1;h=(r|0)>=(f|0);i=h?T:O;h=h?M:L;p=k+h|0;p=d[1509+((p|0)<0?0:(p|0)<51?p:51)>>0]|0;if(!(j<<24>>24))j=0;else{j=(i+-2&-2)+(m<<1)+k|0;j=d[1561+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[N>>2]=j;if(o)j=0;else{j=(i+-2&-2)+(n<<1)+k|0;j=d[1561+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[B>>2]=j;t=c[C>>2]|0;j=c[t+32>>2]|0;k=R(j,u)|0;k=(c[t>>2]|0)+((r<>2]|0)+56>>2])+k)|0;if(X){a[Y>>0]=Lb(e,r,s)|0;a[D>>0]=Lb(e,q,s)|0;a[Z>>0]=Lb(e,r,u)|0;a[E>>0]=Lb(e,q,u)|0;sa[c[F>>2]&7](k,j,p,N,Y,Z,V);break}else{sa[c[G>>2]&7](k,j,p,N,Y,Z,V);break}}while(0);r=r+8|0}while((r|0)<(K|0))}u=u+8|0}while((u|0)<(P|0));k=c[_>>2]|0}else i=T;a:do if(c[k+4>>2]|0){z=W?O:T;A=e+4320|0;B=e+2596|0;C=U+4|0;D=e+160|0;E=Y+1|0;F=Z+1|0;G=e+4308|0;H=e+4292|0;I=e+4324|0;J=e+4312|0;K=e+4296|0;h=1;while(1){j=1<>2];k=1<>2];if(Q){u=j<<3;v=W?f:u;w=(v|0)<(S|0);x=k<<3;y=W?f-u|0:0;t=j<<2;s=k<<2;r=g;do{if(w){o=r+s|0;n=v;do{O=c[I>>2]|0;k=c[B>>2]|0;j=a[O+((R(k,r)|0)+n>>2)>>0]|0;j=j<<24>>24==2;k=(a[O+((R(k,o)|0)+n>>2)>>0]|0)==2;do if(j|k){p=n+-1|0;m=Kb(e,p,o)|0;m=m+1+(Kb(e,n,o)|0)>>1;if(j){j=Kb(e,p,r)|0;j=Mb(e,j+1+(Kb(e,n,r)|0)>>1,h,i)|0}else j=0;c[U>>2]=j;if(k)j=Mb(e,m,h,i)|0;else j=0;c[C>>2]=j;N=c[D>>2]|0;O=c[_>>2]|0;j=c[N+32+(h<<2)>>2]|0;k=R(r>>c[O+13180+(h<<2)>>2],j)|0;k=(c[N+(h<<2)>>2]|0)+((n>>c[O+13168+(h<<2)>>2]<>2])+k)|0;if(X){a[Y>>0]=Lb(e,p,r)|0;a[E>>0]=Lb(e,p,o)|0;a[Z>>0]=Lb(e,n,r)|0;a[F>>0]=Lb(e,n,o)|0;Aa[c[J>>2]&3](k,j,U,Y,Z,V);break}else{Aa[c[K>>2]&3](k,j,U,Y,Z,V);break}}while(0);n=n+u|0}while((n|0)<(S|0))}if(r){n=S-((S|0)==(c[(c[_>>2]|0)+13120>>2]|0)?0:u)|0;if((y|0)<(n|0)){p=r+-1|0;o=y;do{O=c[A>>2]|0;k=R(c[B>>2]|0,r)|0;q=o+t|0;i=(a[O+(k+o>>2)>>0]|0)==2;k=(a[O+(k+q>>2)>>0]|0)==2;do if(i|k){if(i){j=Kb(e,o,p)|0;j=j+1+(Kb(e,o,r)|0)>>1}else j=0;if(k){m=Kb(e,q,p)|0;m=m+1+(Kb(e,q,r)|0)>>1}else m=0;if(i)i=Mb(e,j,h,z)|0;else i=0;c[U>>2]=i;if(k)i=Mb(e,m,h,T)|0;else i=0;c[C>>2]=i;N=c[D>>2]|0;O=c[_>>2]|0;i=c[N+32+(h<<2)>>2]|0;j=R(r>>c[O+13184>>2],i)|0;j=(c[N+(h<<2)>>2]|0)+((o>>c[O+13172>>2]<>2])+j)|0;if(X){a[Y>>0]=Lb(e,o,p)|0;a[E>>0]=Lb(e,q,p)|0;a[Z>>0]=Lb(e,o,r)|0;a[F>>0]=Lb(e,q,r)|0;Aa[c[G>>2]&3](j,i,U,Y,Z,V);break}else{Aa[c[H>>2]&3](j,i,U,Y,Z,V);break}}while(0);o=o+u|0}while((o|0)<(n|0));i=z}else i=z}r=r+x|0}while((r|0)<(P|0))}h=h+1|0;if((h|0)==3)break a;k=c[_>>2]|0}}while(0);l=$;return}function Eb(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0;ga=l;l=l+48|0;Z=ga+16|0;_=ga+34|0;ba=ga+32|0;da=ga+8|0;ea=ga;fa=d+200|0;x=c[fa>>2]|0;y=c[x+13080>>2]|0;T=e>>y;U=f>>y;s=c[x+13128>>2]|0;i=R(U,s)|0;V=i+T|0;k=c[d+204>>2]|0;m=c[k+1668>>2]|0;n=c[m+(V<<2)>>2]|0;W=d+2504|0;X=c[W>>2]|0;Y=X+(V*148|0)|0;b[_>>1]=0;b[ba>>1]=0;c[da>>2]=0;if(!(a[k+42>>0]|0))o=0;else o=(a[k+53>>0]|0)==0;t=(a[(c[d+4352>>2]|0)+V>>0]|0)==0;w=t|o;u=(T|0)==0;c[Z>>2]=u&1;q=(U|0)==0;$=Z+4|0;c[$>>2]=q&1;r=(T|0)==(s+-1|0);aa=Z+8|0;c[aa>>2]=r&1;v=(U|0)==((c[x+13132>>2]|0)+-1|0);ca=Z+12|0;c[ca>>2]=v&1;if(w){if(u)p=0;else{if(o){g=c[k+1676>>2]|0;g=(c[g+(n<<2)>>2]|0)!=(c[g+(c[m+(V+-1<<2)>>2]<<2)>>2]|0)}else g=0;h=g&1;if(t?(Q=c[d+4328>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+(T+-1+i<<2)>>2]|0)):0)g=1;a[_>>0]=g&1;p=h}if(r)j=0;else{if(o){g=c[k+1676>>2]|0;g=(c[g+(n<<2)>>2]|0)!=(c[g+(c[m+(V+1<<2)>>2]<<2)>>2]|0)}else g=0;h=g&1;if(t?(Q=c[d+4328>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+(T+1+i<<2)>>2]|0)):0)g=1;a[_+1>>0]=g&1;j=h}if(q)h=0;else{if(o){g=c[k+1676>>2]|0;g=(c[g+(n<<2)>>2]|0)!=(c[g+(c[m+(V-s<<2)>>2]<<2)>>2]|0)}else g=0;h=g&1;if(t?(Q=c[d+4328>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+((R(s,U+-1|0)|0)+T<<2)>>2]|0)):0)g=1;a[ba>>0]=g&1}if(v)g=0;else{if(o){i=c[k+1676>>2]|0;i=(c[i+(n<<2)>>2]|0)!=(c[i+(c[m+(s+V<<2)>>2]<<2)>>2]|0)}else i=0;g=i&1;if(t?(Q=c[d+4328>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+((R(s,U+1|0)|0)+T<<2)>>2]|0)):0)i=1;a[ba+1>>0]=i&1}if(!(q|u)){if(t){Q=c[d+4328>>2]|0;if(p<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+-1+(R(s,U+-1|0)|0)<<2)>>2]|0):0)S=36;else i=1}else if(!(p<<24>>24))S=36;else i=1;if((S|0)==36)i=h;a[da>>0]=i}if(!(r|q)){if(t){Q=c[d+4328>>2]|0;if(j<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+1+(R(s,U+-1|0)|0)<<2)>>2]|0):0)S=42;else h=1}else if(!(j<<24>>24))S=42;else h=1;a[da+1>>0]=h}if(!(v|r)){if(t){Q=c[d+4328>>2]|0;if(j<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+1+(R(s,U+1|0)|0)<<2)>>2]|0):0)S=48;else h=1}else if(!(j<<24>>24))S=48;else h=1;if((S|0)==48)h=g;a[da+2>>0]=h}if(!(v|u)){if(t){Q=c[d+4328>>2]|0;if(p<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+-1+(R(s,U+1|0)|0)<<2)>>2]|0):0)S=54;else g=1}else if(!(p<<24>>24))S=54;else g=1;a[da+3>>0]=g}}D=c[x+4>>2]|0?3:1;E=d+160|0;F=d+168|0;G=d+2672|0;M=U<<1;H=M+-1|0;I=ea+4|0;J=U+-1|0;K=T+1|0;L=T+-1|0;M=M+2|0;N=ea+4|0;O=U+1|0;Q=T<<1;P=Q+-1|0;Q=Q+2|0;C=d+2676+((w&1)<<2)|0;g=0;i=x;h=y;while(1){n=c[i+13168+(g<<2)>>2]|0;z=e>>n;q=c[i+13180+(g<<2)>>2]|0;A=f>>q;r=c[E>>2]|0;B=c[r+32+(g<<2)>>2]|0;w=1<>n;t=w>>q;n=c[i+13120>>2]>>n;v=n-z|0;s=(s|0)>(v|0)?v:s;q=c[i+13124>>2]>>q;v=q-A|0;t=(t|0)>(v|0)?v:t;v=R(B,A)|0;u=c[i+56>>2]|0;v=(c[r+(g<<2)>>2]|0)+((z<>2]|0)+w+r|0;y=X+(V*148|0)+142+g|0;switch(a[y>>0]|0){case 1:{Fb(x,v,s<>2]&1](v,x,B,w,Y,Z,s,t,g,c[(c[fa>>2]|0)+52>>2]|0);Hb(d,v,x,B,w,e,f,s,t,g);S=78;break}case 2:{o=c[Z>>2]|0;p=c[aa>>2]|0;k=c[ca>>2]|0;if(!(c[$>>2]|0)){S=1-o|0;j=0-(S<>2]=v+(0-B)+j;c[I>>2]=(c[d+172+(g<<2)>>2]|0)+((R(n,H)|0)+z-S<>2]|0)+((L+(R(c[i+13128>>2]|0,J)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0,u);j=r;h=c[fa>>2]|0}i=s<>2]|0)+(((R(c[h+13128>>2]|0,J)|0)+T|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+j|0,i|0)|0;if((p|0)!=1){S=j+i|0;Ib(m+S|0,(c[ea+(((a[(c[W>>2]|0)+((K+(R(c[(c[fa>>2]|0)+13128>>2]|0,J)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+S|0,u)}}if(!k){S=1-o|0;m=0-(S<>2]=v+(R(t,B)|0)+m;c[N>>2]=(c[d+172+(g<<2)>>2]|0)+((R(n,M)|0)+z-S<>2]|0)+((L+(R(c[(c[fa>>2]|0)+13128>>2]|0,O)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0,u);h=r}i=s<>2]|0)+(((R(c[(c[fa>>2]|0)+13128>>2]|0,O)|0)+T|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+h|0,i|0)|0;if((p|0)!=1){S=h+i|0;Ib(j+S|0,(c[ea+(((a[(c[W>>2]|0)+((K+(R(c[(c[fa>>2]|0)+13128>>2]|0,O)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+S|0,u)}}if(!o)if((a[(c[W>>2]|0)+((L+(R(c[(c[fa>>2]|0)+13128>>2]|0,U)|0)|0)*148|0)+142+g>>0]|0)==3){i=(R(q,P)|0)+A<>2]|0)+i|0,u,t,w,r);i=0}else i=1;else i=0;if(!p)if((a[(c[W>>2]|0)+((K+(R(c[(c[fa>>2]|0)+13128>>2]|0,U)|0)|0)*148|0)+142+g>>0]|0)==3){h=(R(q,Q)|0)+A<>2]|0)+h|0,u,t,w,r);h=0}else h=1;else h=0;S=0-(i<>2]&3](v,x,B,w,Y,Z,s,t,g,_,ba,da,c[(c[fa>>2]|0)+52>>2]|0);Hb(d,v,x,B,w,e,f,s,t,g);S=78;break}default:{}}if((S|0)==78){S=0;a[y>>0]=3}g=g+1|0;if((g|0)>=(D|0))break;h=c[fa>>2]|0;i=h;h=c[h+13080>>2]|0}l=ga;return}function Fb(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0;if((d|0)>0){g=0;while(1){Pf(a|0,b|0,c|0)|0;g=g+1|0;if((g|0)==(d|0))break;else{a=a+e|0;b=b+f|0}}}return}function Gb(a,b,d,e,f,g,h,i,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0;m=c[a+200>>2]|0;l=c[m+56>>2]|0;o=c[m+13120>>2]>>c[m+13168+(i<<2)>>2];m=c[m+13124>>2]>>c[m+13180+(i<<2)>>2];p=a+172+(i<<2)|0;n=k<<1;k=g<>2]|0)+((R(o,n)|0)+e<>2]|0)+((R(o,n|1)|0)+e<>2]|0)+((R(m,j)|0)+f<>2]|0)+((R(m,j|1)|0)+f<>2]|0;if(!(a[(c[b+204>>2]|0)+40>>0]|0)){if(a[m+13056>>0]|0?c[m+68>>2]|0:0)n=4}else n=4;if((n|0)==4?(y=c[m+13084>>2]|0,o=1<>2]|0,v=c[m+13180+(l<<2)>>2]|0,w=h>>y,p=i>>y,x=j+h>>y,y=k+i>>y,z=o>>u<>2],(p|0)<(y|0)):0){s=(w|0)<(x|0);r=b+4348|0;o=o>>v;q=(o|0)>0;n=p;do{if(s){b=n-i|0;l=w;do{m=c[t>>2]|0;if(a[(c[r>>2]|0)+((R(c[m+13156>>2]|0,n)|0)+l)>>0]|0?(B=c[m+13084>>2]|0,A=b<>v,B=l-h<>u<>2],q):0){m=d+(R(A,f)|0)+B|0;j=0;k=e+(R(A,g)|0)+B|0;while(1){Pf(m|0,k|0,z|0)|0;j=j+1|0;if((j|0)==(o|0))break;else{m=m+f|0;k=k+g|0}}}l=l+1|0}while((l|0)!=(x|0))}n=n+1|0}while((n|0)!=(y|0))}return}function Ib(c,d,e){c=c|0;d=d|0;e=e|0;if(!e)a[c>>0]=a[d>>0]|0;else b[c>>1]=b[d>>1]|0;return}function Jb(c,d,e,f,g,h){c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;i=(f|0)>0;if(!e){if(i){e=0;while(1){a[c>>0]=a[d>>0]|0;e=e+1|0;if((e|0)==(f|0))break;else{c=c+g|0;d=d+h|0}}}}else if(i){e=0;while(1){b[c>>1]=b[d>>1]|0;e=e+1|0;if((e|0)==(f|0))break;else{c=c+g|0;d=d+h|0}}}return}function Kb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;g=c[b+200>>2]|0;f=c[g+13064>>2]|0;return a[(c[b+4316>>2]|0)+((R(c[g+13140>>2]|0,e>>f)|0)+(d>>f))>>0]|0}function Lb(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;h=c[a+200>>2]|0;i=c[h+13084>>2]|0;if(((e|b|0)>=0?(j=b>>i,f=e>>i,g=c[h+13156>>2]|0,(j|0)<(g|0)):0)?(f|0)<(c[h+13160>>2]|0):0){j=(R(g,f)|0)+j|0;a=d[(c[a+4348>>2]|0)+j>>0]|0}else a=2;return a|0}function Mb(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0;g=c[a+204>>2]|0;b=(c[((e|0)==1?g+28|0:g+32|0)>>2]|0)+b|0;b=(b|0)<0?0:(b|0)<57?b:57;do if((c[(c[a+200>>2]|0)+4>>2]|0)==1){if((b|0)>=30)if((b|0)>43){b=b+-6|0;break}else{b=d[1615+(b+-30)>>0]|0;break}}else b=(b|0)<0?0:(b|0)<51?b:51;while(0);g=f+2+b|0;return d[1561+((g|0)<0?0:(g|0)<53?g:53)>>0]|0|0}function Nb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=c[a+200>>2]|0;i=((c[f+13120>>2]|0)-e|0)<=(b|0);f=((c[f+13124>>2]|0)-e|0)<=(d|0);g=(d|0)!=0;h=(b|0)!=0;if(h&g)Cb(a,b-e|0,d-e|0,e);if(g&i)Cb(a,b,d-e|0,e);if(h&f)Cb(a,b-e|0,d,e);return}function Ob(b){b=b|0;var d=0,e=0,f=0;f=c[b+60>>2]|0;Nd();Ec();d=tc(b)|0;if((d|0)>=0){c[f+4368>>2]=0;c[f+4520>>2]=0;e=c[b+808>>2]|0;if(!(e&2))d=1;else d=c[b+800>>2]&255;a[f+141>>0]=d;if((e&1|0)!=0?(c[b+800>>2]|0)>1:0)d=1;else d=2;a[f+140>>0]=d;d=0}return d|0}function Pb(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0;h=c[a+60>>2]|0;j=g+28|0;a=c[j>>2]|0;if(!a){a=Dc(h,d,1)|0;if((a|0)>=0){c[f>>2]=a;a=0}}else{c[h+2520>>2]=0;i=h+4524|0;b[i>>1]=1;a=Tb(h,c[g+24>>2]|0,a)|0;if((a|0)>=0){a=h+2604|0;if(c[a>>2]|0)c[a>>2]=0;a=c[h+164>>2]|0;if(c[a+304>>2]|0){h=a+128|0;c[h>>2]=e[i>>1];c[h+4>>2]=0;ye(d,a);c[f>>2]=1}a=c[j>>2]|0}}return a|0}function Qb(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=c[b+60>>2]|0;Sb(g);h=g+4412|0;d=g+4392|0;if((c[h>>2]|0)>0){b=0;do{be((c[d>>2]|0)+(b<<2)|0);b=b+1|0}while((b|0)<(c[h>>2]|0))}be(g+4396|0);be(g+4388|0);be(d);be(g+152|0);be(g+168|0);b=0;do{be(g+172+(b<<2)|0);be(g+184+(b<<2)|0);b=b+1|0}while((b|0)!=3);we(g+164|0);b=g+2524|0;yc(g,b,-1);we(b);b=0;do{pe(g+208+(b<<2)|0);b=b+1|0}while((b|0)!=16);b=0;do{pe(g+272+(b<<2)|0);b=b+1|0}while((b|0)!=32);b=0;do{pe(g+400+(b<<2)|0);b=b+1|0}while((b|0)!=256);c[g+200>>2]=0;c[g+204>>2]=0;c[g+196>>2]=0;pe(g+1424|0);be(g+2096|0);be(g+2100|0);be(g+2104|0);f=g+141|0;b=a[f>>0]|0;if((b&255)>1){e=1;do{d=g+72+(e<<2)|0;if(c[d>>2]|0){be(d);be(g+8+(e<<2)|0);b=a[f>>0]|0}e=e+1|0}while((e|0)<(b&255|0))}b=g+136|0;d=g+72|0;if((c[b>>2]|0)==(c[d>>2]|0))c[b>>2]=0;be(d);d=g+4404|0;if((c[h>>2]|0)>0){b=0;do{be((c[d>>2]|0)+(b<<4)|0);b=b+1|0}while((b|0)<(c[h>>2]|0))}be(d);c[h>>2]=0;return 0}function Rb(a){a=a|0;a=c[a+60>>2]|0;Ac(a);c[a+2592>>2]=2147483647;return}function Sb(a){a=a|0;be(a+2504|0);be(a+2508|0);be(a+4332|0);be(a+4336|0);be(a+4340|0);be(a+4344|0);be(a+4348|0);be(a+4316|0);be(a+4328|0);be(a+4352|0);be(a+4320|0);be(a+4324|0);be(a+2096|0);be(a+2104|0);be(a+2100|0);return}function Tb(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;y=b+2520|0;c[y>>2]=0;u=b+2584|0;c[b+2588>>2]=c[u>>2];c[u>>2]=0;x=b+4408|0;c[x>>2]=0;a:do if((f|0)>3){v=b+4470|0;k=b+4412|0;l=b+4396|0;m=b+4384|0;n=b+4392|0;o=b+4380|0;p=b+4404|0;q=b+4376|0;w=b+4388|0;r=b+136|0;s=b+2512|0;t=b+4480|0;while(1){j=(a[v>>0]|0)==0;if(!j){i=c[t>>2]|0;if((i|0)>0){h=0;g=0;do{g=d[e+h>>0]|g<<8;h=h+1|0}while((h|0)<(i|0))}else g=0;f=f-i|0;if((g|0)>(f|0)){e=-1094995529;break a}else{i=e+i|0;h=f}}else{while(1){g=e+1|0;if(((a[e>>0]|0)==0?(a[g>>0]|0)==0:0)?(a[e+2>>0]|0)==1:0)break;if((f|0)<5){e=-1094995529;break a}else{e=g;f=f+-1|0}}g=0;i=e+3|0;h=f+-3|0}g=j?h:g;e=c[k>>2]|0;f=c[x>>2]|0;if((e|0)<=(f|0)){e=e+1|0;f=ce(c[p>>2]|0,e,16)|0;if(!f){e=-12;break a}c[p>>2]=f;j=c[k>>2]|0;Kf(f+(j<<4)|0,0,e-j<<4|0)|0;de(w,e,4)|0;de(l,e,4)|0;de(n,e,4)|0;f=c[l>>2]|0;c[f+(c[k>>2]<<2)>>2]=1024;f=he(c[f+(c[k>>2]<<2)>>2]|0,4)|0;c[(c[n>>2]|0)+(c[k>>2]<<2)>>2]=f;c[k>>2]=e;f=c[x>>2]|0}c[m>>2]=c[(c[l>>2]|0)+(f<<2)>>2];c[o>>2]=c[(c[n>>2]|0)+(f<<2)>>2];e=c[p>>2]|0;g=Ub(b,i,g,e+(f<<4)|0)|0;c[(c[w>>2]|0)+(c[x>>2]<<2)>>2]=c[q>>2];c[(c[l>>2]|0)+(c[x>>2]<<2)>>2]=c[m>>2];A=c[o>>2]|0;z=c[n>>2]|0;j=c[x>>2]|0;c[x>>2]=j+1;c[z+(j<<2)>>2]=A;if((g|0)<0){e=g;break a}e=Vb((c[r>>2]|0)+204|0,c[e+(f<<4)+12>>2]|0,c[e+(f<<4)+8>>2]|0)|0;if((e|0)<0)break a;Wb(b)|0;if((c[s>>2]&-2|0)==36)c[u>>2]=1;f=h-g|0;if((f|0)<=3)break;else e=i+g|0}if((c[x>>2]|0)>0){g=b+4376|0;h=b+4392|0;i=b+4380|0;j=b+4404|0;f=0;do{c[g>>2]=c[(c[w>>2]|0)+(f<<2)>>2];c[i>>2]=c[(c[h>>2]|0)+(f<<2)>>2];A=c[j>>2]|0;if((Xb(b,c[A+(f<<4)+12>>2]|0,c[A+(f<<4)+8>>2]|0)|0)<0)break a;f=f+1|0}while((f|0)<(c[x>>2]|0))}}else e=0;while(0);return e|0}function Ub(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;n=b+4376|0;c[n>>2]=0;a:do if((e|0)>1){g=0;while(1){if(!(a[d+g>>0]|0)){h=g+-1|0;if((g|0)>0)g=(a[d+h>>0]|0)==0?h:g;h=g+2|0;if(((h|0)<(e|0)?(a[d+(g+1)>>0]|0)==0:0)?(i=a[d+h>>0]|0,(i&255)<4):0)break}h=g+2|0;if((g+3|0)<(e|0))g=h;else break a}e=i<<24>>24==3?e:g;h=g}else h=0;while(0);b:do if((h|0)<(e+-1|0)){fe(f,f+4|0,e+32|0);o=c[f>>2]|0;if(!o)e=-12;else{Pf(o|0,d|0,h|0)|0;i=h+2|0;c:do if((i|0)<(e|0)){m=b+4384|0;l=b+4380|0;g=h;b=h;while(1){k=d+i|0;j=a[k>>0]|0;h=a[d+b>>0]|0;do if((j&255)<=3)if(!(h<<24>>24))if(!(a[d+(b+1)>>0]|0)){if(j<<24>>24!=3){i=g;e=b;break c}i=g+1|0;a[o+g>>0]=0;g=g+2|0;a[o+i>>0]=0;b=b+3|0;k=c[n>>2]|0;c[n>>2]=k+1;h=c[m>>2]|0;if((h|0)>(k|0)){h=c[l>>2]|0;if(!h)break}else{h=h<<1;c[m>>2]=h;de(l,h,4)|0;h=c[l>>2]|0;if(!h){e=-12;break b}}c[h+((c[n>>2]|0)+-1<<2)>>2]=i}else{h=0;p=26}else p=26;else{a[o+g>>0]=h;a[o+(g+1)>>0]=a[d+(b+1)>>0]|0;g=g+2|0;b=i;h=a[k>>0]|0;p=26}while(0);if((p|0)==26){p=0;a[o+g>>0]=h;g=g+1|0;b=b+1|0}i=b+2|0;if((i|0)>=(e|0)){p=15;break}}}else{g=h;b=h;p=15}while(0);if((p|0)==15)if((b|0)<(e|0)){i=e+g|0;h=b;while(1){a[o+g>>0]=a[d+h>>0]|0;h=h+1|0;if((h|0)==(e|0))break;else g=g+1|0}i=i-b|0}else{i=g;e=b}g=o+i|0;h=g+32|0;do{a[g>>0]=0;g=g+1|0}while((g|0)<(h|0));c[f+12>>2]=o;c[f+8>>2]=i}}else{c[f+12>>2]=d;c[f+8>>2]=e}while(0);return e|0}function Vb(a,b,c){a=a|0;b=b|0;c=c|0;return nc(a,b,c>>>0>268435455?-8:c<<3)|0}function Wb(a){a=a|0;var b=0,d=0;b=(c[a+136>>2]|0)+204|0;if(!(Sd(b)|0)){c[a+2512>>2]=Pd(b,6)|0;d=Pd(b,6)|0;b=(Pd(b,3)|0)+-1|0;c[a+2516>>2]=b;return ((b|0)<0?-1094995529:(d|0)==0&1)|0}else return -1094995529;return 0}function Xb(d,f,g){d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;f=Vb((c[d+136>>2]|0)+204|0,f,g)|0;a:do if((f|0)>=0){f=Wb(d)|0;b:do if((f|0)>=0){if(!f){f=0;break a}k=d+2512|0;switch(c[k>>2]|0){case 48:{f=fd(d)|0;if((f|0)<0)break b;else{f=0;break a}}case 34:{f=jd(d)|0;if((f|0)<0)break b;else{f=0;break a}}case 40:case 39:{f=pd(d)|0;if((f|0)<0)break b;else{f=0;break a}}case 9:case 8:case 7:case 6:case 21:case 20:case 19:case 18:case 17:case 16:case 5:case 4:case 3:case 2:case 0:case 1:{f=Yb(d)|0;if((f|0)<0)break a;i=d+2592|0;g=c[i>>2]|0;j=c[k>>2]|0;c:do if((g|0)==2147483647){switch(j|0){case 18:case 16:case 17:case 21:{g=c[d+2572>>2]|0;break}case 20:case 19:{g=-2147483648;break}default:{g=2147483647;break c}}c[i>>2]=g}while(0);h=(j|0)==9;if((j&-2|0)==8){if((c[d+2572>>2]|0)<=(g|0)){c[d+2604>>2]=0;f=0;break a}if(h)c[i>>2]=-2147483648}if(!(a[d+1448>>0]|0))if(!(c[d+2520>>2]|0))break b;else f=j;else{f=Zb(d)|0;if((f|0)<0)break a;f=c[k>>2]|0}if((f|0)!=(c[d+4416>>2]|0)){f=-1094995529;break a}f=_b(d)|0;k=c[d+200>>2]|0;if((f|0)>=(R(c[k+13132>>2]|0,c[k+13128>>2]|0)|0))c[d+2604>>2]=1;if((f|0)<0)break b;else{f=0;break a}}case 37:case 36:{f=d+4364|0;b[f>>1]=(e[f>>1]|0)+1&255;c[d+2592>>2]=2147483647;f=0;break a}default:{f=0;break a}}}while(0);f=(c[(c[d+4>>2]|0)+688>>2]&8|0)==0?0:f}while(0);return f|0}function Yb(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=f+136|0;v=(c[u>>2]|0)+204|0;t=(Sd(v)|0)&255;m=f+1448|0;a[m>>0]=t;n=f+2512|0;g=c[n>>2]|0;if(!(t<<24>>24==0|(g+-16|0)>>>0>4)?(t=f+4364|0,b[t>>1]=(e[t>>1]|0)+1&255,c[f+2592>>2]=2147483647,(g+-19|0)>>>0<2):0){zc(f);g=c[n>>2]|0}l=f+2046|0;a[l>>0]=0;if((g&-8|0)==16)a[l>>0]=Sd(v)|0;g=Ud(v)|0;c[f+1428>>2]=g;a:do if(g>>>0<=255?(i=c[f+400+(g<<2)>>2]|0,(i|0)!=0):0){h=a[m>>0]|0;if(!(h<<24>>24)){g=f+204|0;i=c[i+4>>2]|0;if((c[g>>2]|0)!=(i|0)){g=-1094995529;break}t=g}else{t=f+204|0;i=c[i+4>>2]|0}c[t>>2]=i;j=c[n>>2]|0;k=(j|0)==21;if(k?(c[f+2588>>2]|0)==1:0)a[l>>0]=1;s=f+200|0;g=c[s>>2]|0;i=c[(c[f+272+(c[i>>2]<<2)>>2]|0)+4>>2]|0;if((g|0)!=(i|0)){c[s>>2]=i;do if(g|0?!(k|(j&-8|0)!=16):0){if(((c[i+13120>>2]|0)==(c[g+13120>>2]|0)?(c[i+13124>>2]|0)==(c[g+13124>>2]|0):0)?(c[i+76+(((c[i+72>>2]|0)+-1|0)*12|0)>>2]|0)==(c[g+76+(((c[g+72>>2]|0)+-1|0)*12|0)>>2]|0):0)break;a[l>>0]=0}while(0);zc(f);g=oc(f,c[s>>2]|0)|0;if((g|0)<0)break;g=f+4364|0;b[g>>1]=(e[g>>1]|0)+1&255;c[f+2592>>2]=2147483647;g=c[s>>2]|0;h=a[m>>0]|0}r=c[f+4>>2]|0;c[r+832>>2]=d[g+302>>0];c[r+836>>2]=d[g+335>>0];r=f+1449|0;a[r>>0]=0;do if(!(h<<24>>24)){if(a[(c[t>>2]|0)+41>>0]|0){a[r>>0]=Sd(v)|0;g=c[s>>2]|0}g=(R(c[g+13128>>2]<<1,c[g+13132>>2]|0)|0)+-2|0;o=g>>>0>65535;g=o?g>>>16:g;o=o?16:0;p=(g&65280|0)==0;g=Pd(v,(p?o:o|8)+(d[2334+(p?g:g>>>8)>>0]|0)|0)|0;c[f+1432>>2]=g;p=c[s>>2]|0;if(g>>>0>=(R(c[p+13132>>2]|0,c[p+13128>>2]|0)|0)>>>0){g=-1094995529;break a}if(a[r>>0]|0){g=f+156|0;if(!(a[g>>0]|0)){g=-1094995529;break a}else{p=g;break}}else{c[f+1436>>2]=g;i=f+2580|0;c[i>>2]=(c[i>>2]|0)+1;i=f+156|0;q=31;break}}else{c[f+1436>>2]=0;c[f+1432>>2]=0;c[f+2580>>2]=0;i=f+156|0;a[i>>0]=0;q=31}while(0);if((q|0)==31){a[i>>0]=0;if((c[(c[t>>2]|0)+1624>>2]|0)>0){g=0;do{Rd(v,1);g=g+1|0}while((g|0)<(c[(c[t>>2]|0)+1624>>2]|0))}g=Ud(v)|0;c[f+1440>>2]=g;if(g>>>0>=3){g=-1094995529;break}if(!((g|0)==2?1:(c[n>>2]&-8|0)!=16)){g=-1094995529;break}g=f+1450|0;a[g>>0]=1;if(a[(c[t>>2]|0)+39>>0]|0)a[g>>0]=Sd(v)|0;if(a[(c[s>>2]|0)+8>>0]|0)a[f+1451>>0]=Pd(v,2)|0;if(((c[n>>2]|0)+-19|0)>>>0>=2)oa();c[f+1620>>2]=0;c[f+2572>>2]=0;if(!(c[f+2516>>2]|0))c[f+2576>>2]=0;do if(a[(c[s>>2]|0)+12941>>0]|0){a[f+2056>>0]=Sd(v)|0;if(!(c[(c[s>>2]|0)+4>>2]|0)){a[f+2057>>0]=0;a[f+2058>>0]=0;break}else{p=(Sd(v)|0)&255;a[f+2058>>0]=p;a[f+2057>>0]=p;break}}else{a[f+2056>>0]=0;a[f+2057>>0]=0;a[f+2058>>0]=0}while(0);c[f+2052>>2]=0;c[f+2048>>2]=0;c[f+2068>>2]=pc(v)|0;g=c[t>>2]|0;if(!(a[g+36>>0]|0)){c[f+2072>>2]=0;h=0}else{c[f+2072>>2]=pc(v)|0;h=pc(v)|0;g=c[t>>2]|0}c[f+2076>>2]=h;if(!(a[g+1631>>0]|0))h=0;else{h=(Sd(v)|0)&255;g=c[t>>2]|0}a[f+2080>>0]=h;b:do if(!(a[g+55>>0]|0)){a[f+2061>>0]=0;c[f+2084>>2]=0;g=0;q=61}else{do if(a[g+56>>0]|0){if(!(Sd(v)|0)){g=c[t>>2]|0;break}p=(Sd(v)|0)&255;a[f+2061>>0]=p;if(p<<24>>24)break b;c[f+2084>>2]=(pc(v)|0)<<1;g=(pc(v)|0)<<1;q=61;break b}while(0);a[f+2061>>0]=a[g+57>>0]|0;c[f+2084>>2]=c[g+60>>2];g=c[g+64>>2]|0;q=61}while(0);if((q|0)==61)c[f+2088>>2]=g;g=a[(c[t>>2]|0)+54>>0]|0;c:do if(!(g<<24>>24))g=0;else{do if(!(a[f+2056>>0]|0)){if(a[f+2057>>0]|0)break;if(a[f+2061>>0]|0)break c}while(0);g=(Sd(v)|0)&255}while(0);a[f+2062>>0]=g;p=i}o=f+2108|0;c[o>>2]=0;n=c[t>>2]|0;if(!((a[n+42>>0]|0)==0?!(a[n+43>>0]|0):0))q=71;d:do if((q|0)==71){q=Ud(v)|0;c[o>>2]=q;if((q|0)<=0){c[f+4368>>2]=0;break}k=(Ud(v)|0)+1|0;j=k>>4;k=k&15;l=f+2096|0;be(l);q=f+2100|0;be(q);m=f+2104|0;be(m);c[l>>2]=he(c[o>>2]|0,4)|0;c[q>>2]=he(c[o>>2]|0,4)|0;n=he(c[o>>2]|0,4)|0;c[m>>2]=n;if(c[l>>2]|0?!((n|0)==0|(c[q>>2]|0)==0):0){if((c[o>>2]|0)>0){m=(j|0)>0;n=(k|0)==0;i=0;do{if(m){g=0;h=0;do{g=(Pd(v,16)|0)+(g<<16)|0;h=h+1|0}while((h|0)!=(j|0))}else g=0;if(!n)g=(Pd(v,k)|0)+(g<>2]|0)+(i<<2)>>2]=g+1;i=i+1|0}while((i|0)<(c[o>>2]|0))}g=f+141|0;do if((d[g>>0]|0)>1){q=c[t>>2]|0;if((c[q+48>>2]|0)<=1?(c[q+44>>2]|0)<=1:0)break;c[f+4368>>2]=0;a[g>>0]=1;break d}while(0);c[f+4368>>2]=0;break}c[o>>2]=0;g=-12;break a}while(0);if(a[(c[t>>2]|0)+1628>>0]|0){h=Ud(v)|0;o=Lf(h|0,0,3)|0;m=C;q=qc(v)|0;n=((q|0)<0)<<31>>31;if((m|0)>(n|0)|(m|0)==(n|0)&o>>>0>q>>>0){g=-1094995529;break}if(h|0){g=0;do{Rd(v,8);g=g+1|0}while((g|0)!=(h|0))}}h=c[t>>2]|0;t=(c[h+16>>2]|0)+26+(c[f+2068>>2]|0)|0;i=t&255;a[f+2112>>0]=i;t=t<<24;if((t|0)<=855638016?(t>>24|0)>=(0-(c[(c[s>>2]|0)+13192>>2]|0)|0):0){t=c[f+1432>>2]|0;c[f+2500>>2]=t;if((t|0)==0?a[r>>0]|0:0){g=-1094995529;break}if((qc(v)|0)>=0){g=c[u>>2]|0;a[g+203>>0]=(a[r>>0]|0)==0&1;if(!(a[h+22>>0]|0))a[g+272>>0]=i;a[p>>0]=1;a[g+302>>0]=0;a[g+303>>0]=0;g=0}else g=-1094995529}else g=-1094995529}else g=-1094995529;while(0);return g|0}function Zb(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=c[b+136>>2]|0;e=b+200|0;i=c[e>>2]|0;g=c[i+13064>>2]|0;f=c[i+13120>>2]>>g;g=(c[i+13124>>2]>>g)+1|0;i=b+2596|0;j=b+2600|0;Kf(c[b+4320>>2]|0,0,R(c[j>>2]|0,c[i>>2]|0)|0)|0;Kf(c[b+4324>>2]|0,0,R(c[j>>2]|0,c[i>>2]|0)|0)|0;i=c[e>>2]|0;Kf(c[b+4344>>2]|0,0,R(c[i+13152>>2]|0,c[i+13148>>2]|0)|0)|0;i=c[e>>2]|0;Kf(c[b+4348>>2]|0,0,R((c[i+13160>>2]|0)+1|0,(c[i+13156>>2]|0)+1|0)|0)|0;Kf(c[b+4328>>2]|0,-1,R((f<<2)+4|0,g)|0)|0;c[b+2604>>2]=0;g=b+2512|0;c[b+4416>>2]=c[g>>2];f=c[b+204>>2]|0;if(a[f+42>>0]|0)c[d+312>>2]=c[c[f+1648>>2]>>2]<>2]|0)+13080>>2];f=b+160|0;d=Bc(b,f,c[b+2572>>2]|0)|0;if((d|0)>=0){e=b+2520|0;c[(c[c[e>>2]>>2]|0)+80>>2]=(c[g>>2]&-8|0)==16&1;c[(c[f>>2]|0)+84>>2]=3-(c[b+1440>>2]|0);d=b+164|0;xe(c[d>>2]|0);d=Dc(b,c[d>>2]|0,0)|0;if((d|0)<0)h=7;else d=0}else{e=b+2520|0;h=7}if((h|0)==7){c[e>>2]=0}return d|0}function _b(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+8|0;b=d;c[e>>2]=0;c[e+4>>2]=1;a=c[a+4>>2]|0;wa[c[a+816>>2]&1](a,1,e,b,1,4)|0;l=d;return c[b>>2]|0}function $b(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;r=c[b+60>>2]|0;p=r+200|0;h=c[p>>2]|0;s=1<>2];q=r+204|0;d=c[q>>2]|0;b=c[(c[d+1668>>2]|0)+(c[r+2500>>2]<<2)>>2]|0;e=(a[r+1449>>0]|0)==0;do if((b|0)!=0|e){if(!e?(c[(c[r+4328>>2]|0)+(c[(c[d+1672>>2]|0)+(b+-1<<2)>>2]<<2)>>2]|0)!=(c[r+1436>>2]|0):0){b=-1094995529;break}j=s+-1|0;k=r+2084|0;l=r+2508|0;m=r+2088|0;n=r+2062|0;o=r+4352|0;g=0;f=0;e=h;d=c[h+13120>>2]|0;do{if((b|0)>=(c[e+13136>>2]|0))break;h=c[(c[(c[q>>2]|0)+1672>>2]|0)+(b<<2)>>2]|0;g=c[e+13080>>2]|0;i=j+d>>g;f=((h|0)%(i|0)|0)<>2]|0)+13080>>2]|0;bc(r,f>>i,g>>i);i=c[l>>2]|0;c[i+(h<<3)>>2]=c[k>>2];c[i+(h<<3)+4>>2]=c[m>>2];a[(c[o>>2]|0)+h>>0]=a[n>>0]|0;i=cc(r,f,g,c[(c[p>>2]|0)+13080>>2]|0,0)|0;if((i|0)<0){t=8;break}b=b+1|0;La(r,b);Nb(r,f,g,s);e=c[p>>2]|0;d=c[e+13120>>2]|0}while((i|0)!=0);if((t|0)==8){c[(c[r+4328>>2]|0)+(h<<2)>>2]=-1;b=i;break}if((f+s|0)>=(d|0)?(g+s|0)>=(c[e+13124>>2]|0):0)Cb(r,f,g,s)}else b=-1094995529;while(0);return b|0}function ac(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;o=c[b+136>>2]|0;k=c[b+200>>2]|0;g=k+13080|0;h=1<>2];l=c[b+204>>2]|0;m=c[(c[l+1672>>2]|0)+(f<<2)>>2]|0;p=c[b+1436>>2]|0;n=m-p|0;i=c[b+4328>>2]|0;j=i+(m<<2)|0;c[j>>2]=p;do if(!(a[l+43>>0]|0)){b=a[l+42>>0]|0;if(!(b<<24>>24)){c[o+312>>2]=c[k+13120>>2];b=0;break}if((f|0)!=0?(p=c[l+1676>>2]|0,(c[p+(f<<2)>>2]|0)!=(c[p+(f+-1<<2)>>2]|0)):0){p=c[g>>2]|0;c[o+312>>2]=(c[(c[l+1648>>2]|0)+(c[(c[l+1664>>2]|0)+(d>>p<<2)>>2]<<2)>>2]<>0]=1}}else{if((d|0)==0?(h+-1&e|0)==0:0)a[o+203>>0]=1;c[o+312>>2]=c[k+13120>>2];b=a[l+42>>0]|0}while(0);h=h+e|0;p=c[k+13124>>2]|0;c[o+316>>2]=(h|0)>(p|0)?p:h;h=o+31312|0;c[h>>2]=0;if(!(b<<24>>24)){if(!n){c[h>>2]=1;b=1}else b=0;if((n|0)<(c[k+13128>>2]|0)){b=b|4;c[h>>2]=b}}else{if((d|0)>0){p=c[l+1676>>2]|0;g=m+-1|0;if((c[p+(f<<2)>>2]|0)==(c[p+(c[(c[l+1668>>2]|0)+(g<<2)>>2]<<2)>>2]|0))b=0;else{c[h>>2]=2;b=2}if((c[j>>2]|0)!=(c[i+(g<<2)>>2]|0)){b=b|1;c[h>>2]=b}}else b=0;if((e|0)>0){p=c[l+1676>>2]|0;g=m-(c[k+13128>>2]|0)|0;if((c[p+(f<<2)>>2]|0)!=(c[p+(c[(c[l+1668>>2]|0)+(g<<2)>>2]<<2)>>2]|0)){b=b|8;c[h>>2]=b}if((c[j>>2]|0)!=(c[i+(g<<2)>>2]|0)){b=b|4;c[h>>2]=b}}}h=(d|0)>0;if(h&(n|0)>0)g=(b>>>1&1^1)&255;else g=0;a[o+308>>0]=g;if((e|0)>0){g=c[k+13128>>2]|0;if((n|0)<(g|0))b=0;else b=(b>>>3&1^1)&255;a[o+309>>0]=b;if((n+1|0)<(g|0))b=0;else{b=c[l+1676>>2]|0;b=(c[b+(f<<2)>>2]|0)==(c[b+(c[(c[l+1668>>2]|0)+(m+1-g<<2)>>2]<<2)>>2]|0)&1}a[o+310>>0]=b;if(h&(n|0)>(g|0)){b=c[l+1676>>2]|0;b=(c[b+(f<<2)>>2]|0)==(c[b+(c[(c[l+1668>>2]|0)+(m+-1-g<<2)>>2]<<2)>>2]|0)&1}else b=0}else{a[o+309>>0]=0;a[o+310>>0]=0;b=0}a[o+311>>0]=b;return}function bc(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;h=c[e+136>>2]|0;B=e+2504|0;C=c[B>>2]|0;D=e+200|0;A=(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)+f|0;if((a[e+2056>>0]|0)==0?(a[e+2057>>0]|0)==0:0){h=0;i=0}else{if((f|0)>0?(a[h+308>>0]|0)!=0:0)i=Sa(e)|0;else i=0;if(!((g|0)<1|(i|0)!=0))if(!(a[h+309>>0]|0)){h=0;i=0}else{h=Sa(e)|0;i=0}else h=0}t=c[(c[D>>2]|0)+4>>2]|0?3:1;u=e+204|0;v=C+(A*148|0)+143|0;w=C+(A*148|0)+144|0;x=C+(A*148|0)+104|0;y=C+(A*148|0)+108|0;z=(h|0)==0;s=(i|h|0)==0;o=(i|0)==0;p=g+-1|0;q=f+-1|0;m=C+(A*148|0)+144|0;l=0;do{r=c[u>>2]|0;r=d[((l|0)==0?r+1644|0:r+1645|0)>>0]|0;if(a[e+2056+l>>0]|0){j=(l|0)==2;do if(j){h=a[v>>0]|0;a[w>>0]=h;c[y>>2]=c[x>>2];n=m}else{if(s){h=(Ua(e)|0)&255;n=C+(A*148|0)+142+l|0;a[n>>0]=h;break}if(!o){h=a[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+142+l>>0]|0;n=C+(A*148|0)+142+l|0;a[n>>0]=h;break}if(z)h=0;else h=a[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+142+l>>0]|0;n=C+(A*148|0)+142+l|0;a[n>>0]=h}while(0);if(h<<24>>24){h=0;do{do if(!s){if(!o){i=c[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+(l<<4)+(h<<2)>>2]|0;break}if(z)i=0;else i=c[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+(l<<4)+(h<<2)>>2]|0}else i=Xa(e)|0;while(0);c[C+(A*148|0)+(l<<4)+(h<<2)>>2]=i;h=h+1|0}while((h|0)!=4);do if((a[n>>0]|0)!=1){if(!j){if(s){c[C+(A*148|0)+100+(l<<2)>>2]=Za(e)|0;break}if(!o){c[C+(A*148|0)+100+(l<<2)>>2]=c[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+100+(l<<2)>>2];break}if(z)h=0;else h=c[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+100+(l<<2)>>2]|0;c[C+(A*148|0)+100+(l<<2)>>2]=h}}else{h=0;do{do if(c[C+(A*148|0)+(l<<4)+(h<<2)>>2]|0){if(s){i=Ya(e)|0;break}if(!o){i=c[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+48+(l<<4)+(h<<2)>>2]|0;break}if(!z)i=c[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+48+(l<<4)+(h<<2)>>2]|0;else i=0}else i=0;while(0);c[C+(A*148|0)+48+(l<<4)+(h<<2)>>2]=i;h=h+1|0}while((h|0)!=4);if(s){a[C+(A*148|0)+96+l>>0]=Wa(e)|0;break}if(!o){a[C+(A*148|0)+96+l>>0]=a[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+96+l>>0]|0;break}if(z)h=0;else h=a[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+96+l>>0]|0;a[C+(A*148|0)+96+l>>0]=h}while(0);b[C+(A*148|0)+112+(l*10|0)>>1]=0;j=0;do{h=c[C+(A*148|0)+(l<<4)+(j<<2)>>2]|0;i=j;j=j+1|0;k=C+(A*148|0)+112+(l*10|0)+(j<<1)|0;b[k>>1]=h;if((a[n>>0]|0)==2){if((i|0)>1){h=0-h|0;b[k>>1]=h}}else if(c[C+(A*148|0)+48+(l<<4)+(i<<2)>>2]|0){h=0-h|0;b[k>>1]=h}b[k>>1]=h<<16>>16<>0]=0;l=l+1|0}while((l|0)<(t|0));return}function cc(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;p=c[b+136>>2]|0;s=1<>2]|0;k=b+204|0;i=c[k>>2]|0;o=(1<<(c[j+13080>>2]|0)-(c[i+24>>2]|0))+-1|0;c[p+31232>>2]=h;r=s+e|0;if(((r|0)<=(c[j+13120>>2]|0)?(s+f|0)<=(c[j+13124>>2]|0):0)?(c[j+13064>>2]|0)>>>0>>0:0){j=eb(b,h,e,f)|0;i=c[k>>2]|0}else j=(c[j+13064>>2]|0)>>>0>>0&1;if(a[i+22>>0]|0?((c[(c[q>>2]|0)+13080>>2]|0)-(c[i+24>>2]|0)|0)>>>0<=g>>>0:0){a[p+300>>0]=0;c[p+280>>2]=0}if(a[b+2080>>0]|0?((c[(c[q>>2]|0)+13080>>2]|0)-(d[i+1632>>0]|0)|0)>>>0<=g>>>0:0)a[p+301>>0]=0;a:do if(!j){i=dc(b,e,f,g)|0;if((i|0)>=0){i=c[q>>2]|0;j=1<>2];if((r|0)%(j|0)|0|0?(r|0)<(c[i+13120>>2]|0):0){i=1;break}s=s+f|0;if((s|0)%(j|0)|0|0?(s|0)<(c[i+13124>>2]|0):0){i=1;break}i=(_a(b)|0)==0&1}}else{l=s>>1;m=l+e|0;n=l+f|0;g=g+-1|0;k=h+1|0;i=cc(b,e,f,g,k)|0;if((i|0)>=0){do if(i){j=c[q>>2]|0;if((m|0)<(c[j+13120>>2]|0)){i=cc(b,m,f,g,k)|0;if((i|0)<0)break a;if(!i){i=0;break}j=c[q>>2]|0}if((n|0)<(c[j+13124>>2]|0)){i=cc(b,e,n,g,k)|0;if((i|0)<0)break a;if(!i){i=0;break}j=c[q>>2]|0}if((m|0)<(c[j+13120>>2]|0)?(n|0)<(c[j+13124>>2]|0):0){i=cc(b,m,n,g,k)|0;if((i|0)<0)break a}}else i=0;while(0);if((o&r|0)==0?(o&s+f|0)==0:0)c[p+276>>2]=a[p+272>>0];if(!i)i=0;else{i=c[q>>2]|0;if((m+l|0)<(c[i+13120>>2]|0))i=1;else i=(n+l|0)<(c[i+13124>>2]|0);i=i&1}}}while(0);return i|0}function dc(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;y=c[b+136>>2]|0;B=b+200|0;w=c[B>>2]|0;v=c[w+13064>>2]|0;u=c[w+13140>>2]|0;r=b+204|0;w=1<<(c[w+13080>>2]|0)-(c[(c[r>>2]|0)+24>>2]|0);c[y+31236>>2]=e;c[y+31240>>2]=f;m=y+31252|0;a[m>>0]=1;o=y+31244|0;c[o>>2]=1;j=y+31248|0;c[j>>2]=0;p=y+31254|0;a[p>>0]=0;n=y+31253|0;a[n>>0]=0;k=b+4332|0;t=(R(f>>v,u)|0)+(e>>v)|0;a[(c[k>>2]|0)+t>>0]=0;x=y+31268|0;a[x>>0]=1;a[x+1>>0]=1;a[x+2>>0]=1;a[x+3>>0]=1;x=1<>v;w=w+-1|0;if(a[(c[r>>2]|0)+40>>0]|0){s=($a(b)|0)&255;a[y+31256>>0]=s;if(s<<24>>24)ec(b,e,f,g)}else a[y+31256>>0]=0;s=(v|0)>0;if(s){h=0;i=t;while(1){Kf((c[k>>2]|0)+i|0,0,v|0)|0;h=h+1|0;if((h|0)==(v|0))break;else i=i+u|0}}if(!((c[o>>2]|0)==1?(c[(c[B>>2]|0)+13064>>2]|0)!=(g|0):0))q=9;if((q|0)==9?(i=fb(b,g)|0,c[j>>2]=i,k=c[o>>2]|0,a[p>>0]=(i|0)==3&(k|0)==1&1,(k|0)!=1):0)oa();if((((c[j>>2]|0)==0?(l=c[B>>2]|0,(c[l+68>>2]|0)!=0):0)?(c[l+13048>>2]|0)>>>0<=g>>>0:0)?(c[l+13052>>2]|0)>>>0>=g>>>0:0){h=(gb(b)|0)&255;a[n>>0]=h}else h=a[n>>0]|0;if(h<<24>>24){fc(b,e,f,g);h=gc(b,e,f,g)|0;if(a[(c[B>>2]|0)+13056>>0]|0)ec(b,e,f,g);if((h|0)>=0)q=22}else{hc(b,e,f,g);q=22}a:do if((q|0)==22){do if(!(a[n>>0]|0)){if(!(a[m>>0]|0)){if(a[b+2061>>0]|0)break;Bb(b,e,f,g);break}h=c[B>>2]|0;if((c[o>>2]|0)==1)h=(d[p>>0]|0)+(c[h+13092>>2]|0)|0;else h=c[h+13088>>2]|0;a[y+31255>>0]=h;h=ic(b,e,f,e,f,e,f,g,g,0,0,2592,2592)|0;if((h|0)<0)break a}while(0);if(a[(c[r>>2]|0)+22>>0]|0?(a[y+300>>0]|0)==0:0)zb(b,e,f,g);if(s){j=b+4316|0;k=y+272|0;i=0;h=t;while(1){Kf((c[j>>2]|0)+h|0,a[k>>0]|0,v|0)|0;i=i+1|0;if((i|0)==(v|0))break;else h=h+u|0}}if((w&x+e|0)==0?(w&x+f|0)==0:0)c[y+276>>2]=a[y+272>>0];h=c[B>>2]|0;i=c[h+13064>>2]|0;k=x>>i;j=e>>i;i=f>>i;if((k|0)>0?(z=b+4336|0,A=c[y+31232>>2]&255,Kf((c[z>>2]|0)+((R(c[h+13140>>2]|0,i)|0)+j)|0,A|0,k|0)|0,(k|0)!=1):0){h=1;do{Kf((c[z>>2]|0)+((R(c[(c[B>>2]|0)+13140>>2]|0,h+i|0)|0)+j)|0,A|0,k|0)|0;h=h+1|0}while((h|0)!=(k|0));h=0}else h=0}while(0);return h|0}function ec(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;k=1<>2]|0;h=c[j+13084>>2]|0;l=c[j+13156>>2]|0;f=k+d|0;g=c[j+13120>>2]|0;k=k+e|0;j=c[j+13124>>2]|0;e=e>>h;k=((k|0)>(j|0)?j:k)>>h;if((e|0)<(k|0)){j=d>>h;h=((f|0)>(g|0)?g:f)>>h;i=(j|0)<(h|0);g=b+4348|0;do{if(i){d=R(e,l)|0;f=j;do{a[(c[g>>2]|0)+(f+d)>>0]=2;f=f+1|0}while((f|0)!=(h|0))}e=e+1|0}while((e|0)!=(k|0))}return}function fc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=c[a+200>>2]|0;f=c[h+13084>>2]|0;e=1<>f;h=c[h+13156>>2]|0;g=b>>f;f=d>>f;d=(e|0)==0?1:e;if((d|0)>0){b=a+4340|0;e=0;do{Kf((c[b>>2]|0)+((R(e+f|0,h)|0)+g)|0,1,d|0)|0;e=e+1|0}while((e|0)<(d|0))}return}function gc(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;t=l;l=l+32|0;q=t;s=1<>2]|0;j=c[y+32>>2]|0;m=R(j,f)|0;k=b+200|0;i=c[k>>2]|0;h=c[i+56>>2]|0;m=(c[y>>2]|0)+((e<>2]|0;u=c[i+13184>>2]|0;o=R(f>>u,n)|0;v=c[i+13172>>2]|0;o=(c[y+4>>2]|0)+((e>>v<>2]|0;w=c[i+13188>>2]|0;r=R(f>>w,p)|0;x=c[i+13176>>2]|0;r=(c[y+8>>2]|0)+((e>>x<>0]|0,s<>x,s>>w)|0)+(R(s>>v,s>>u)|0)|0;h=(R(u,d[i+13045>>0]|0)|0)+h|0;i=mc((c[b+136>>2]|0)+224|0,h+7>>3)|0;if(!(a[b+2061>>0]|0))Bb(b,e,f,g);e=nc(q,i,h)|0;if((e|0)>=0){y=b+2608|0;e=c[k>>2]|0;sa[c[y>>2]&7](m,j,s,s,q,d[e+13044>>0]|0,c[e+52>>2]|0);e=c[k>>2]|0;sa[c[y>>2]&7](o,n,s>>c[e+13172>>2],s>>c[e+13184>>2],q,d[e+13045>>0]|0,c[e+52>>2]|0);e=c[k>>2]|0;sa[c[y>>2]&7](r,p,s>>c[e+13176>>2],s>>c[e+13188>>2],q,d[e+13045>>0]|0,c[e+52>>2]|0);e=0}l=t;return e|0}function hc(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+16|0;p=s;r=c[b+136>>2]|0;j=(c[r+31248>>2]|0)==3;h=1<>0]=hb(b)|0;f=f+1|0}while((f|0)<(q|0));g=g+1|0}while((g|0)<(q|0));h=h>>(j&1);i=r+31264|0;j=r+31260|0;f=0;do{k=f<<1;m=(R(f,h)|0)+e|0;g=0;do{n=g+k|0;o=a[p+n>>0]|0;if(!(o<<24>>24))c[i>>2]=jb(b)|0;else c[j>>2]=ib(b)|0;a[r+31268+n>>0]=lc(b,(R(g,h)|0)+d|0,m,h,o&255)|0;g=g+1|0}while((g|0)<(q|0));f=f+1|0}while((f|0)<(q|0));switch(c[(c[b+200>>2]|0)+4>>2]|0){case 3:{h=0;do{j=h<<1;i=0;do{g=kb(b)|0;k=i+j|0;a[r+31281+k>>0]=g;f=a[r+31268+k>>0]|0;if((g|0)!=4){p=a[1634+g>>0]|0;f=f<<24>>24==p<<24>>24?34:p}a[r+31277+k>>0]=f;i=i+1|0}while((i|0)<(q|0));h=h+1|0}while((h|0)<(q|0));break}case 2:{g=kb(b)|0;a[r+31281>>0]=g;f=a[r+31268>>0]|0;if((g|0)!=4){b=a[1634+g>>0]|0;f=f<<24>>24==b<<24>>24?34:b}a[r+31277>>0]=a[1638+(f&255)>>0]|0;break}case 0:break;default:{g=kb(b)|0;f=a[r+31268>>0]|0;if((g|0)!=4){b=a[1634+g>>0]|0;f=f<<24>>24==b<<24>>24?34:b}a[r+31277>>0]=f}}l=s;return}function ic(b,e,f,g,h,i,j,k,m,n,o,p,q){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+16|0;B=E+8|0;C=E;A=c[b+136>>2]|0;r=c[p>>2]|0;c[B>>2]=r;s=c[p+4>>2]|0;v=B+4|0;c[v>>2]=s;x=c[q>>2]|0;c[C>>2]=x;q=c[q+4>>2]|0;w=C+4|0;c[w>>2]=q;u=a[A+31254>>0]|0;if(u<<24>>24){if((n|0)==1){c[A+288>>2]=d[A+31268+o>>0];p=(c[(c[b+200>>2]|0)+4>>2]|0)==3?o:0;D=5}}else{c[A+288>>2]=d[A+31268>>0];p=0;D=5}if((D|0)==5){c[A+292>>2]=d[A+31277+p>>0];c[A+296>>2]=d[A+31281+p>>0]}y=b+200|0;p=c[y>>2]|0;t=(c[p+13076>>2]|0)>>>0>>0;if(((!t?(c[p+13072>>2]|0)>>>0>>0:0)?(d[A+31255>>0]|0)>(n|0):0)?!((n|0)==0&u<<24>>24!=0):0)t=(lb(b,m)|0)&255;else{if((c[p+13088>>2]|0)==0?(c[A+31244>>2]|0)==0:0)p=(n|0)==0&(c[A+31248>>2]|0)!=0;else p=0;if(t)p=1;else p=p|(n|0)==0&u<<24>>24!=0;t=p&1}p=c[(c[y>>2]|0)+4>>2]|0;if((m|0)>2)if(!p)p=x;else D=20;else if((p|0)==3)D=20;else p=x;if((D|0)==20){p=(n|0)!=0;if(!(p&(r|0)==0)){r=mb(b,n)|0;c[B>>2]=r;if((c[(c[y>>2]|0)+4>>2]|0)==2?(m|0)==3|t<<24>>24==0:0){s=mb(b,n)|0;c[v>>2]=s}}else r=0;if(!(p&(x|0)==0)){p=mb(b,n)|0;c[C>>2]=p;if((c[(c[y>>2]|0)+4>>2]|0)==2?(m|0)==3|t<<24>>24==0:0){q=mb(b,n)|0;c[w>>2]=q}}else p=0}if(!(t<<24>>24)){y=c[y>>2]|0;t=c[y+13072>>2]|0;u=1<>2]|0;if(((r|n|p|0)==0?(c[A+31244>>2]|0)!=1:0)?((q|s|0)==0?1:(c[y+4>>2]|0)!=2):0)q=1;else q=nb(b,n)|0;p=jc(b,e,f,g,h,i,j,k,m,o,q,B,C)|0;if((p|0)>=0){if(q|0?(z=1<>t,v)|0;p=0;do{a[(c[r>>2]|0)+((p+e>>t)+s)>>0]=1;p=p+u|0}while((p|0)<(z|0));q=q+u|0}while((q|0)<(z|0))}if(((a[b+2061>>0]|0)==0?(Bb(b,e,f,m),(a[(c[b+204>>2]|0)+40>>0]|0)!=0):0)?(a[A+31256>>0]|0)!=0:0){ec(b,e,f,m);D=47}else D=47}}else{r=m+-1|0;t=1<=0){p=ic(b,s,f,e,f,i,j,k,r,q,1,B,C)|0;if((p|0)>=0){p=ic(b,e,t,e,f,i,j,k,r,q,2,B,C)|0;if((p|0)>=0){p=ic(b,s,t,e,f,i,j,k,r,q,3,B,C)|0;if((p|0)>-1)D=47}}}}if((D|0)==47)p=0;l=E;return p|0}function jc(d,e,f,g,h,i,j,k,l,m,n,o,p){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=c[d+136>>2]|0;E=d+200|0;C=l-(c[(c[E>>2]|0)+13172>>2]|0)|0;D=A+31244|0;r=1<>2]|0)==1){ed(d,e,f,r,r);uc(d,e,f,l,0)}y=(n|0)!=0;n=(c[o>>2]|0)==0;do if(y)if(n)w=10;else{r=1;w=14}else if(n?(c[p>>2]|0)==0:0){q=c[E>>2]|0;n=c[q+4>>2]|0;if((n|0)==2){if(c[o+4>>2]|0){w=10;break}if(c[p+4>>2]|0){w=10;break}}if(!((n|0)==0|(c[D>>2]|0)!=1)){if((l|0)>2|(n|0)==3){r=1<<(c[q+13172>>2]|0)+C;q=1<<(c[q+13184>>2]|0)+C;ed(d,e,f,r,q);uc(d,e,f,C,1);uc(d,e,f,C,2);n=(1<>2]|0)+4>>2]|0)!=2){n=0;break}ed(d,e,n,r,q);uc(d,e,n,C,1);uc(d,e,n,C,2);n=0;break}if((m|0)==3?(s=1<>2]|0)+l,ed(d,g,h,s,t),uc(d,g,h,l,1),uc(d,g,h,l,2),u=r+h|0,(c[(c[E>>2]|0)+4>>2]|0)==2):0){ed(d,g,u,s,t);uc(d,g,u,l,1);uc(d,g,u,l,2);n=0}else n=0}else n=0}else{r=1;w=14}while(0);if((w|0)==10)if(!(c[p>>2]|0))if((c[(c[E>>2]|0)+4>>2]|0)==2)if(!(c[o+4>>2]|0)){r=(c[p+4>>2]|0)!=0;w=14}else{r=1;w=14}else{r=0;w=14}else{r=1;w=14}a:do if((w|0)==14){s=d+204|0;if(a[(c[s>>2]|0)+22>>0]|0?(v=A+300|0,(a[v>>0]|0)==0):0){B=ab(d)|0;q=A+280|0;c[q>>2]=B;if(B){B=(bb(d)|0)==1;n=c[q>>2]|0;if(B){n=0-n|0;c[q>>2]=n}}else n=0;a[v>>0]=1;B=(c[(c[E>>2]|0)+13192>>2]|0)/2|0;if((n|0)<(-26-B|0)|(n|0)>(B+25|0)){n=-1094995529;break}zb(d,i,j,k)}if((r&(a[d+2080>>0]|0)!=0?(a[A+31256>>0]|0)==0:0)?(x=A+301|0,(a[x>>0]|0)==0):0){if(!(cb(d)|0)){a[A+302>>0]=0;n=0}else{n=c[s>>2]|0;if(!(a[n+1633>>0]|0))q=0;else{q=db(d)|0;n=c[s>>2]|0}a[A+302>>0]=a[n+1634+q>>0]|0;n=a[n+1639+q>>0]|0}a[A+303>>0]=n;a[x>>0]=1}if((l|0)<4&(c[D>>2]|0)==1){n=c[A+288>>2]|0;B=c[A+292>>2]|0;B=(B+-6|0)>>>0<9?2:(B+-22|0)>>>0<9&1;n=(n+-6|0)>>>0<9?2:(n+-22|0)>>>0<9&1}else{B=0;n=0}z=A+304|0;a[z>>0]=0;if(y)qb(d,e,f,l,n,0);q=c[E>>2]|0;n=c[q+4>>2]|0;if(!n)n=0;else{if(!((l|0)>2|(n|0)==3)){if((m|0)!=3){n=0;break}s=1<>2]|0)+l;n=0;do{q=(n<>2]|0)==1){ed(d,g,q,s,r);uc(d,g,q,l,1)}if(c[o+(n<<2)>>2]|0)qb(d,g,q,l,B,1);n=n+1|0}while((n|0)<(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0));n=0;while(1){q=(n<>2]|0)==1){ed(d,g,q,s,r);uc(d,g,q,l,2)}if(c[p+(n<<2)>>2]|0)qb(d,g,q,l,B,2);n=n+1|0;if((n|0)>=(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0)){n=0;break a}}}m=1<<(c[q+13172>>2]|0)+C;x=1<<(c[q+13184>>2]|0)+C;do if(y&(a[(c[s>>2]|0)+1630>>0]|0)!=0){if(c[D>>2]|0){l=(c[A+296>>2]|0)==4;a[z>>0]=l&1;if(!l)break}else a[z>>0]=1;kc(d,0)}else a[z>>0]=0;while(0);u=d+160|0;i=A+320|0;v=A+11680|0;j=1<0;w=d+2612+(C+-2<<2)|0;t=A+284|0;n=0;do{q=(n<>2]|0)==1){ed(d,e,q,m,x);uc(d,e,q,C,1)}if(!(c[o+(n<<2)>>2]|0)){if(a[z>>0]|0){A=c[u>>2]|0;q=c[A+36>>2]|0;r=c[E>>2]|0;s=R(f>>c[r+13184>>2],q)|0;s=(c[A+4>>2]|0)+((e>>c[r+13172>>2]<>2])+s)|0;if(k){n=0;do{b[v+(n<<1)>>1]=(R(b[i+(n<<1)>>1]|0,c[t>>2]|0)|0)>>>3;n=n+1|0}while((n|0)!=(j|0));n=j}else n=0;Da[c[w>>2]&7](s,v,q,c[r+52>>2]|0)}}else qb(d,e,q,C,B,1);n=n+1|0}while((n|0)<(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0));if(!(a[z>>0]|0))n=0;else{kc(d,1);n=0}do{q=(n<>2]|0)==1){ed(d,e,q,m,x);uc(d,e,q,C,2)}if(!(c[p+(n<<2)>>2]|0)){if(a[z>>0]|0){o=c[u>>2]|0;q=c[o+40>>2]|0;r=c[E>>2]|0;s=R(f>>c[r+13188>>2],q)|0;s=(c[o+8>>2]|0)+((e>>c[r+13176>>2]<>2])+s)|0;if(k){n=0;do{b[v+(n<<1)>>1]=(R(b[i+(n<<1)>>1]|0,c[t>>2]|0)|0)>>>3;n=n+1|0}while((n|0)!=(j|0));n=j}else n=0;Da[c[w>>2]&7](s,v,q,c[r+52>>2]|0)}}else qb(d,e,q,C,B,2);n=n+1|0}while((n|0)<(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0));n=0}}while(0);return n|0}function kc(a,b){a=a|0;b=b|0;var d=0,e=0;e=c[a+136>>2]|0;d=ob(a,b)|0;if(!d)a=0;else a=1-((pb(a,b)|0)<<1)<>2]=a;return}function lc(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+16|0;o=s;m=c[b+136>>2]|0;i=c[b+200>>2]|0;n=c[i+13084>>2]|0;p=e>>n;q=f>>n;r=c[i+13156>>2]|0;n=g>>n;i=c[i+13080>>2]|0;g=(1<>0]|0)!=0|(g&f|0)!=0){j=(R(q+-1|0,r)|0)+p|0;j=d[(c[b+4340>>2]|0)+j>>0]|0}else j=1;if((g&e|0)!=0|(a[m+308>>0]|0)!=0){e=p+-1+(R(q,r)|0)|0;e=d[(c[b+4340>>2]|0)+e>>0]|0}else e=1;g=(f>>i<>>0<2){c[o>>2]=0;c[o+4>>2]=1;i=26;j=0;g=1;break}else{c[o>>2]=e;g=(e+29&31)+2|0;c[o+4>>2]=g;i=(e+31&31)+2|0;j=e;break}else{c[o>>2]=e;c[o+4>>2]=g;if((g|0)==0|(e|0)==0){i=(e|0)==1?26:(g|0)!=1?1:26;j=e}else{i=0;j=e}}while(0);k=o+8|0;c[k>>2]=i;if(!h){f=o+4|0;if((j|0)>(g|0)){e=g&255;c[f>>2]=j;c[o>>2]=e;g=j}else e=j;if((e|0)>(i|0)){h=i&255;c[k>>2]=e;c[o>>2]=h;i=e;e=h}if((g|0)>(i|0)){c[k>>2]=g;c[f>>2]=i&255}g=c[m+31264>>2]|0;g=((g|0)>=(e|0)&1)+g|0;e=1;do{g=((g|0)>=(c[o+(e<<2)>>2]|0)&1)+g|0;e=e+1|0}while((e|0)!=3)}else g=c[o+(c[m+31260>>2]<<2)>>2]|0;f=(n|0)==0?1:n;if((f|0)>0){i=b+4340|0;j=g&255;e=0;do{Kf((c[i>>2]|0)+((R(e+q|0,r)|0)+p)|0,j|0,f|0)|0;e=e+1|0}while((e|0)<(f|0))}l=s;return g|0}function mc(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+16>>2]|0;e=c[a>>2]|0;d=(e&1|0)==0?d:d+-1|0;d=(e&511|0)==0?d:d+-1|0;e=(c[a+20>>2]|0)-d|0;if((e|0)<(b|0))d=0;else Md(a,d+b|0,e-b|0);return d|0}function nc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=(b|0)!=0&d>>>0<2147483640;d=e?d:0;b=e?b:0;c[a>>2]=b;c[a+12>>2]=d;c[a+16>>2]=d+8;c[a+4>>2]=b+(d+7>>3);c[a+8>>2]=0;return (e?0:-1094995529)|0}function oc(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;j=l;l=l+16|0;g=j;Sb(b);f=sc(b,e)|0;if((f|0)<0){Sb(b);c[b+200>>2]=0}else{h=b+4|0;i=c[h>>2]|0;c[i+124>>2]=c[e+13120>>2];c[i+128>>2]=c[e+13124>>2];c[i+116>>2]=c[e+12>>2];c[i+120>>2]=c[e+16>>2];c[i+136>>2]=c[e+60>>2];c[i+172>>2]=c[e+76+(((c[e+72>>2]|0)+-1|0)*12|0)+4>>2];i=e+160|0;c[g>>2]=c[i>>2];c[g+4>>2]=c[i+4>>2];if(!(c[e+176>>2]|0))f=1;else f=c[e+184>>2]|0?2:1;i=c[h>>2]|0;c[i+392>>2]=f;if(!(c[e+188>>2]|0)){f=2;g=2;h=2}else{f=d[e+194>>0]|0;g=d[e+193>>0]|0;h=d[e+192>>0]|0}c[i+380>>2]=h;c[i+384>>2]=g;c[i+388>>2]=f;Fc(b+2608|0,c[e+52>>2]|0);g=b+200|0;if(a[e+12941>>0]|0){f=c[g>>2]|0;h=c[f+4>>2]|0?3:1;i=(1<>2])+2|0;i=R(i,i)|0;c[b+168>>2]=Yd(i<>2])|0;f=0;do{i=c[g>>2]|0;k=c[i+13124>>2]>>c[i+13180+(f<<2)>>2];m=R(c[i+13120>>2]>>c[i+13168+(f<<2)>>2]<<1,c[i+13132>>2]|0)|0;c[b+172+(f<<2)>>2]=Yd(m<>2])|0;i=c[g>>2]|0;k=R(k<<1,c[i+13128>>2]|0)|0;c[b+184+(f<<2)>>2]=Yd(k<>2])|0;f=f+1|0}while((f|0)<(h|0))}c[g>>2]=e;c[b+196>>2]=c[(c[b+208+(c[e>>2]<<2)>>2]|0)+4>>2];f=0}l=j;return f|0}function pc(a){a=a|0;return Xd(a)|0}function qc(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(rc(a)|0)|0}function rc(a){a=a|0;return c[a+8>>2]|0}function sc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=c[b+13064>>2]|0;j=c[b+13120>>2]|0;o=c[b+13124>>2]|0;d=R((o>>d)+1|0,(j>>d)+1|0)|0;e=R(c[b+13132>>2]|0,c[b+13128>>2]|0)|0;f=b+13156|0;g=b+13160|0;h=R(c[g>>2]|0,c[f>>2]|0)|0;i=a+2596|0;c[i>>2]=(j>>2)+1;j=a+2600|0;c[j>>2]=(o>>2)+1;o=a+2504|0;c[o>>2]=ie(e,148)|0;p=ie(e,8)|0;c[a+2508>>2]=p;if(((((((!((p|0)==0|(c[o>>2]|0)==0)?(q=b+13144|0,o=b+13140|0,p=a+4332|0,c[p>>2]=Yd(R(c[o>>2]|0,c[q>>2]|0)|0)|0,o=he(c[q>>2]|0,c[o>>2]|0)|0,c[a+4336>>2]=o,!((o|0)==0|(c[p>>2]|0)==0)):0)?(k=a+4344|0,c[k>>2]=he(c[b+13148>>2]|0,c[b+13152>>2]|0)|0,q=a+4340|0,c[q>>2]=ee(h)|0,l=Yd(R((c[g>>2]|0)+1|0,(c[f>>2]|0)+1|0)|0)|0,c[a+4348>>2]=l,(c[q>>2]|0)!=0):0)?!((l|0)==0|(c[k>>2]|0)==0):0)?(m=a+4352|0,c[m>>2]=Yd(e)|0,n=a+4328|0,c[n>>2]=he(d,4)|0,q=he(d,1)|0,c[a+4316>>2]=q,(q|0)!=0):0)?(c[m>>2]|0)!=0:0)?(c[n>>2]|0)!=0:0)?(q=a+4320|0,c[q>>2]=ie(c[i>>2]|0,c[j>>2]|0)|0,p=ie(c[i>>2]|0,c[j>>2]|0)|0,c[a+4324>>2]=p,!((p|0)==0|(c[q>>2]|0)==0)):0)a=0;else{Sb(a);a=-12}return a|0}function tc(b){b=b|0;var d=0,e=0,f=0;e=c[b+60>>2]|0;c[e+4>>2]=b;f=ee(31328)|0;c[e+136>>2]=f;if((((f|0)!=0?(c[e+72>>2]=f,c[e+8>>2]=e,f=Yd(199)|0,c[e+152>>2]=f,(f|0)!=0):0)?(f=ue()|0,c[e+164>>2]=f,(f|0)!=0):0)?(d=ue()|0,c[e+2524>>2]=d,(d|0)!=0):0){c[e+2528>>2]=d;c[e+2592>>2]=2147483647;a[e+4469>>0]=1;c[e+2584>>2]=0;b=0}else{Qb(b)|0;b=-12}return b|0}function uc(d,f,g,h,i){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0;ua=l;l=l+528|0;ia=ua+390|0;ja=ua+260|0;da=ua+130|0;ka=ua;na=c[d+136>>2]|0;oa=c[d+200>>2]|0;sa=c[oa+52>>2]|0;t=c[oa+13168+(i<<2)>>2]|0;O=c[oa+13180+(i<<2)>>2]|0;ta=1<>2]|0;v=ta<>2]|0;o=f>>m&n;p=g>>m&n;u=c[d+204>>2]|0;q=c[u+1684>>2]|0;r=n+2|0;s=c[q+((R(p,r)|0)+o<<2)>>2]|0;qa=c[d+160>>2]|0;pa=(c[qa+32+(i<<2)>>2]|0)>>>1;F=0-pa|0;qa=(c[qa+(i<<2)>>2]|0)+(f>>t<<1)+((R(pa,g>>O)|0)<<1)|0;ba=(i|0)==0;ra=c[(ba?na+288|0:na+292|0)>>2]|0;k=ia+2|0;j=da+2|0;la=ja+2|0;ma=ka+2|0;if(!(c[na+31288>>2]|0))y=0;else y=(s|0)>(c[q+(o+-1+(R(p+(v>>m)&n,r)|0)<<2)>>2]|0);x=y&1;z=c[na+31292>>2]|0;Y=c[na+31300>>2]|0;D=c[na+31296>>2]|0;if(!(c[na+31304>>2]|0))B=0;else B=(s|0)>(c[q+((R(r,p+-1|0)|0)+(n&o+(w>>m))<<2)>>2]|0);d=B&1;H=(v<<1)+g|0;M=oa+13124|0;E=c[M>>2]|0;N=v+g|0;H=((H|0)>(E|0)?E:H)-N>>O;E=(w<<1)+f|0;I=c[oa+13120>>2]|0;A=w+f|0;E=((E|0)>(I|0)?I:E)-A>>t;I=u+20|0;if((a[I>>0]|0)==1){t=c[oa+13084>>2]|0;q=v>>t;r=w>>t;s=(1<>2]|0)-(N>>t)|0;o=(q|0)>(o|0)?o:q;if((o|0)>0){m=0;n=0;do{m=m|1;n=n+2|0}while((n|0)<(o|0));x=m}else x=0}if((z|0)==1&p){o=(c[oa+13160>>2]|0)-(g>>t)|0;o=(q|0)>(o|0)?o:q;if((o|0)>0){m=0;n=0;do{m=m|1;n=n+2|0}while((n|0)<(o|0));p=m}else p=0}else p=z;if((D|0)==1&s){n=(c[oa+13156>>2]|0)-(f>>t)|0;n=(r|0)>(n|0)?n:r;if((n|0)>0){m=0;o=0;do{m=m|1;o=o+2|0}while((o|0)<(n|0));o=m}else o=0}else o=D;if(B&s){m=(c[oa+13156>>2]|0)-(A>>t)|0;m=(r|0)>(m|0)?m:r;if((m|0)>0){d=0;n=0;do{d=d|1;n=n+2|0}while((n|0)<(m|0))}else d=0}m=k;n=m+128|0;do{b[m>>1]=32896;m=m+2|0}while((m|0)<(n|0));m=j;n=m+128|0;do{b[m>>1]=32896;m=m+2|0}while((m|0)<(n|0));b[da>>1]=128;z=p;D=o;s=d}else s=d;t=(Y|0)!=0;if(t){B=b[qa+(~pa<<1)>>1]|0;b[ia>>1]=B;b[da>>1]=B}u=(D|0)!=0;if(u)Pf(j|0,qa+(F<<1)|0,ta<<1|0)|0;v=(s|0)!=0;if(v?(G=j+(ta<<1)|0,Pf(G|0,qa+(F<<1)+(ta<<1)|0,ta<<1|0)|0,J=Of(e[qa+(ta+-1-pa+E<<1)>>1]|0,0,65537,65537)|0,K=C,L=ta-E|0,(L|0)>0):0){m=G+(E<<1)|0;d=0;do{G=m+(d<<1)|0;F=G;b[F>>1]=J;b[F+2>>1]=J>>>16;G=G+4|0;b[G>>1]=K;b[G+2>>1]=K>>>16;d=d+4|0}while((d|0)<(L|0))}r=(z|0)!=0;if(r&(h|0)!=31){d=0;do{b[k+(d<<1)>>1]=b[qa+((R(d,pa)|0)+-1<<1)>>1]|0;d=d+1|0}while((d|0)<(ta|0))}q=(x|0)!=0;if(q){m=H+ta|0;if((H|0)>0){d=ta;do{b[k+(d<<1)>>1]=b[qa+((R(d,pa)|0)+-1<<1)>>1]|0;d=d+1|0}while((d|0)<(m|0))}n=Of(e[qa+((R(m+-1|0,pa)|0)+-1<<1)>>1]|0,0,65537,65537)|0;o=C;p=ta-H|0;if((p|0)>0){m=k+(ta<<1)+(H<<1)|0;d=0;do{L=m+(d<<1)|0;K=L;b[K>>1]=n;b[K+2>>1]=n>>>16;L=L+4|0;b[L>>1]=o;b[L+2>>1]=o>>>16;d=d+4|0}while((d|0)<(p|0))}}if((a[I>>0]|0)==1?(P=x|z|Y,D|s|P|0):0){L=ta<<1;d=c[M>>2]|0;n=d-g>>O;n=q?(((L<>1]|0;if(!P)b[ia>>1]=d;b[ia>>1]=d;if(!r?(Q=Of(d&65535|0,0,65537,65537)|0,S=C,(h|0)!=31):0){d=0;do{P=k+(d<<1)|0;O=P;b[O>>1]=Q;b[O+2>>1]=Q>>>16;P=P+4|0;b[P>>1]=S;b[P+2>>1]=S>>>16;d=d+4|0}while((d|0)<(ta|0))}if(!q?(T=Of(e[k+(ta+-1<<1)>>1]|0,0,65537,65537)|0,U=C,(h|0)!=31):0){m=k+(ta<<1)|0;d=0;do{S=m+(d<<1)|0;Q=S;b[Q>>1]=T;b[Q+2>>1]=T>>>16;S=S+4|0;b[S>>1]=U;b[S+2>>1]=U>>>16;d=d+4|0}while((d|0)<(ta|0))}if(((g|0)==0|(f|0)==0)&(f|0)==0&(n|0)>0)Kf(k|0,0,((n+2147483647|0)>>>2<<3)+8|0)|0;b[da>>1]=b[ia>>1]|0}a:do if(!q){if(r){m=Of(e[k+(ta+-1<<1)>>1]|0,0,65537,65537)|0;n=C;if((h|0)==31){V=73;break}o=k+(ta<<1)|0;d=0;while(1){V=o+(d<<1)|0;U=V;b[U>>1]=m;b[U+2>>1]=m>>>16;V=V+4|0;b[V>>1]=n;b[V+2>>1]=n>>>16;d=d+4|0;if((d|0)>=(ta|0)){V=70;break a}}}if(t){m=Of(e[ia>>1]|0,0,65537,65537)|0;n=C;o=ta<<1;if((h|0)==31){V=75;break}else d=0;while(1){X=k+(d<<1)|0;W=X;b[W>>1]=m;b[W+2>>1]=m>>>16;X=X+4|0;b[X>>1]=n;b[X+2>>1]=n>>>16;d=d+4|0;if((d|0)>=(o|0)){V=73;break a}}}if(u){m=b[j>>1]|0;b[ia>>1]=m;m=Of(m&65535|0,0,65537,65537)|0;n=C;o=ta<<1;if((h|0)==31){V=78;break}else d=0;while(1){Y=k+(d<<1)|0;X=Y;b[X>>1]=m;b[X+2>>1]=m>>>16;Y=Y+4|0;b[Y>>1]=n;b[Y+2>>1]=n>>>16;d=d+4|0;if((d|0)>=(o|0)){V=75;break a}}}if(!v){m=1<>1]=m;n=Of(m&65535|0,0,65537,65537)|0;o=C;q=ta<<1;p=(h|0)==31;if(p){V=74;break}else d=0;do{V=j+(d<<1)|0;U=V;b[U>>1]=n;b[U+2>>1]=n>>>16;V=V+4|0;b[V>>1]=o;b[V+2>>1]=o>>>16;d=d+4|0}while((d|0)<(q|0));m=Of(m&65535|0,0,65537,65537)|0;n=C;if(p){V=70;break}else d=0;while(1){V=k+(d<<1)|0;U=V;b[U>>1]=m;b[U+2>>1]=m>>>16;V=V+4|0;b[V>>1]=n;b[V+2>>1]=n>>>16;d=d+4|0;if((d|0)>=(q|0)){V=70;break a}}}m=j+(ta<<1)|0;d=b[m>>1]|0;n=Of(d&65535|0,0,65537,65537)|0;o=C;p=(h|0)==31;if(p){b[ia>>1]=d;break}else d=0;do{_=j+(d<<1)|0;Z=_;b[Z>>1]=n;b[Z+2>>1]=n>>>16;_=_+4|0;b[_>>1]=o;b[_+2>>1]=o>>>16;d=d+4|0}while((d|0)<(ta|0));m=b[m>>1]|0;b[ia>>1]=m;m=Of(m&65535|0,0,65537,65537)|0;n=C;o=ta<<1;if(p)V=78;else{d=0;do{_=k+(d<<1)|0;Z=_;b[Z>>1]=m;b[Z+2>>1]=m>>>16;_=_+4|0;b[_>>1]=n;b[_+2>>1]=n>>>16;d=d+4|0}while((d|0)<(o|0));V=78}}else V=70;while(0);if((V|0)==70)if((z|0)==0?(W=Of(e[k+(ta<<1)>>1]|0,0,65537,65537)|0,X=C,(h|0)!=31):0){d=0;do{V=k+(d<<1)|0;U=V;b[U>>1]=W;b[U+2>>1]=W>>>16;V=V+4|0;b[V>>1]=X;b[V+2>>1]=X>>>16;d=d+4|0}while((d|0)<(ta|0));V=73}else V=73;if((V|0)==73)if(!Y)V=74;else V=75;if((V|0)==74){b[ia>>1]=b[k>>1]|0;V=75}if((V|0)==75)if((D|0)==0?(Z=Of(e[ia>>1]|0,0,65537,65537)|0,_=C,(h|0)!=31):0){d=0;do{Y=j+(d<<1)|0;X=Y;b[X>>1]=Z;b[X+2>>1]=Z>>>16;Y=Y+4|0;b[Y>>1]=_;b[Y+2>>1]=_>>>16;d=d+4|0}while((d|0)<(ta|0));V=78}else V=78;if(((V|0)==78?!v:0)?($=Of(e[j+(ta+-1<<1)>>1]|0,0,65537,65537)|0,aa=C,(h|0)!=31):0){m=j+(ta<<1)|0;d=0;do{_=m+(d<<1)|0;Z=_;b[Z>>1]=$;b[Z+2>>1]=$>>>16;_=_+4|0;b[_>>1]=aa;b[_+2>>1]=aa>>>16;d=d+4|0}while((d|0)<(ta|0))}s=b[ia>>1]|0;b[da>>1]=s;b:do if(!(c[oa+13112>>2]|0)){if(!ba?(c[oa+4>>2]|0)!=3:0)break;if((h|0)!=2&(ra|0)!=1?(aa=ra+-26|0,aa=(aa|0)>-1?aa:26-ra|0,$=ra+-10|0,$=($|0)>-1?$:10-ra|0,(((aa|0)>($|0)?$:aa)|0)>(c[164+(h+-3<<2)>>2]|0)):0){d=1<>0]|0)!=0)?(ea=s&65535,ca=b[da+128>>1]|0,fa=ca&65535,da=fa+ea-(e[da+64>>1]<<1)|0,(((da|0)>-1?da:0-da|0)|0)<(d|0)):0)?(ha=ia+128|0,ga=b[ha>>1]|0,da=(ga&65535)+ea-(e[ia+64>>1]<<1)|0,(((da|0)>-1?da:0-da|0)|0)<(d|0)):0){b[ka>>1]=s;b[ka+128>>1]=ca;d=0;do{la=d;d=d+1|0;b[ma+(la<<1)>>1]=((R(d,fa)|0)+32+(R(63-la|0,ea)|0)|0)>>>6}while((d|0)!=63);b[k>>1]=(((s&65535)*63|0)+32+(ga&65535)|0)>>>6;d=1;while(1){la=d;d=d+1|0;b[k+(la<<1)>>1]=((R(e[ia>>1]|0,63-la|0)|0)+32+(R(e[ha>>1]|0,d)|0)|0)>>>6;if((d|0)==63){j=ma;break b}}}r=ta<<1;q=r+-1|0;d=b[k+(q<<1)>>1]|0;b[la+(q<<1)>>1]=d;m=b[j+(q<<1)>>1]|0;b[ma+(q<<1)>>1]=m;r=r+-2|0;q=(r|0)>-1;if(q){p=r;n=b[k+(r<<1)>>1]|0;while(1){ia=p;p=p+-1|0;o=b[k+(p<<1)>>1]|0;b[la+(ia<<1)>>1]=((d&65535)+2+((n&65535)<<1)+(o&65535)|0)>>>2;if((ia|0)<=0)break;else{d=n;n=o}}}ia=((e[k>>1]|0)+2+((s&65535)<<1)+(e[j>>1]|0)|0)>>>2&65535;b[ja>>1]=ia;b[ka>>1]=ia;if(q){n=r;d=b[j+(r<<1)>>1]|0;while(1){ka=n;n=n+-1|0;k=b[j+(n<<1)>>1]|0;b[ma+(ka<<1)>>1]=((m&65535)+2+((d&65535)<<1)+(k&65535)|0)>>>2;if((ka|0)<=0){k=la;j=ma;break}else{m=d;d=k}}}else{k=la;j=ma}}}while(0);switch(ra|0){case 0:{vc(qa,j,k,pa,h);break}case 1:{wc(qa,j,k,pa,h,i);break}default:{if(!(c[oa+13104>>2]|0))d=0;else d=(a[na+31256>>0]|0)!=0;xc(qa,j,k,pa,i,ra,ta,d&1,sa)}}l=ua;return}function vc(a,c,d,f,g){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;m=1<>1]|0,n-h|0)|0;q=h;h=h+1|0;s=R(e[o>>1]|0,h)|0;r=R(e[c+(q<<1)>>1]|0,k)|0;b[a+(q+l<<1)>>1]=t+m+s+r+(R(e[p>>1]|0,g)|0)>>i}while((h|0)<(m|0))}while((g|0)<(m|0))}return}function wc(c,d,f,g,h,i){c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;p=1<>1]|0)+j+(e[d+(k<<1)>>1]|0)|0;k=k+1|0}while((k|0)<(p|0));h=j>>h+1;m=Of(h|0,((h|0)<0)<<31>>31|0,65537,65537)|0;n=C;if(!l){k=0;do{l=R(k,g)|0;j=0;do{q=c+(j+l<<1)|0;r=q;a[r>>0]=m;a[r+1>>0]=m>>8;a[r+2>>0]=m>>16;a[r+3>>0]=m>>24;q=q+4|0;a[q>>0]=n;a[q+1>>0]=n>>8;a[q+2>>0]=n>>16;a[q+3>>0]=n>>24;j=j+4|0}while((j|0)<(p|0));k=k+1|0}while((k|0)<(p|0))}}else h=p>>h+1;if((i|0)==0&(p|0)<32?(b[c>>1]=((h<<1)+2+(e[f>>1]|0)+(e[d>>1]|0)|0)>>>2,o=(p|0)>1,o):0){k=(h*3|0)+2|0;j=1;do{b[c+(j<<1)>>1]=(k+(e[d+(j<<1)>>1]|0)|0)>>>2;j=j+1|0}while((j|0)!=(p|0));if(o){k=(h*3|0)+2|0;j=1;do{b[c+((R(j,g)|0)<<1)>>1]=(k+(e[f+(j<<1)>>1]|0)|0)>>>2;j=j+1|0}while((j|0)!=(p|0))}}return}function xc(c,f,g,h,i,j,k,m,n){c=c|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;x=l;l=l+208|0;w=a[1673+(j+-2)>>0]|0;s=x+(k<<1)|0;o=(R(w,k)|0)>>5;q=j+-11|0;r=q>>>0<15&(o|0)<-1;if((j|0)>17){p=f+-2|0;if(r){if((k|0)>=0)Pf(s|0,p|0,(k>>>2<<3)+8|0)|0;p=b[296+(q<<1)>>1]|0;while(1){b[s+(o<<1)>>1]=b[g+(((R(p,o)|0)+128>>8)+-1<<1)>>1]|0;if((o|0)<-1)o=o+1|0;else{p=s;break}}}v=(k|0)>0;if(v){u=0;do{o=u;u=u+1|0;s=R(u,w)|0;r=s>>5;s=s&31;if(!s){r=r+1|0;q=R(o,h)|0;o=0;do{s=p+(r+o<<1)|0;z=s;z=d[z>>0]|d[z+1>>0]<<8|d[z+2>>0]<<16|d[z+3>>0]<<24;s=s+4|0;s=d[s>>0]|d[s+1>>0]<<8|d[s+2>>0]<<16|d[s+3>>0]<<24;t=c+(o+q<<1)|0;y=t;a[y>>0]=z;a[y+1>>0]=z>>8;a[y+2>>0]=z>>16;a[y+3>>0]=z>>24;t=t+4|0;a[t>>0]=s;a[t+1>>0]=s>>8;a[t+2>>0]=s>>16;a[t+3>>0]=s>>24;o=o+4|0}while((o|0)<(k|0))}else{t=32-s|0;q=R(o,h)|0;o=0;do{z=o+r|0;y=R(e[p+(z+1<<1)>>1]|0,t)|0;b[c+(o+q<<1)>>1]=(y+16+(R(e[p+(z+2<<1)>>1]|0,s)|0)|0)>>>5;z=o|1;y=z+r|0;A=R(e[p+(y+1<<1)>>1]|0,t)|0;b[c+(z+q<<1)>>1]=(A+16+(R(e[p+(y+2<<1)>>1]|0,s)|0)|0)>>>5;z=o|2;y=z+r|0;A=R(e[p+(y+1<<1)>>1]|0,t)|0;b[c+(z+q<<1)>>1]=(A+16+(R(e[p+(y+2<<1)>>1]|0,s)|0)|0)>>>5;z=o|3;y=z+r|0;A=R(e[p+(y+1<<1)>>1]|0,t)|0;b[c+(z+q<<1)>>1]=(A+16+(R(e[p+(y+2<<1)>>1]|0,s)|0)|0)>>>5;o=o+4|0}while((o|0)<(k|0))}}while((u|0)!=(k|0))}if((i|0)==0&(j|0)==26&(k|0)<32&(m|0)==0&v){r=g+-2|0;q=1<>1]|0)-(e[r>>1]|0)>>1)+(e[f>>1]|0)|0;b[c+((R(o,h)|0)<<1)>>1]=(A&p|0)==0?A:0-A>>31&q;o=o+1|0}while((o|0)!=(k|0))}}else{p=g+-2|0;if(r){if((k|0)>=0)Pf(s|0,p|0,(k>>>2<<3)+8|0)|0;p=b[296+(q<<1)>>1]|0;while(1){b[s+(o<<1)>>1]=b[f+(((R(p,o)|0)+128>>8)+-1<<1)>>1]|0;if((o|0)<-1)o=o+1|0;else{p=s;break}}}v=(k|0)>0;if(v){t=0;do{u=t;t=t+1|0;r=R(t,w)|0;q=r>>5;r=r&31;if(!r){q=q+1|0;o=0;do{b[c+((R(o,h)|0)+u<<1)>>1]=b[p+(q+o<<1)>>1]|0;o=o+1|0}while((o|0)!=(k|0))}else{s=32-r|0;o=0;do{A=o+q|0;z=R(e[p+(A+1<<1)>>1]|0,s)|0;b[c+((R(o,h)|0)+u<<1)>>1]=(z+16+(R(e[p+(A+2<<1)>>1]|0,r)|0)|0)>>>5;o=o+1|0}while((o|0)!=(k|0))}}while((t|0)!=(k|0))}if((i|0)==0&(j|0)==10&(k|0)<32&(m|0)==0&v){r=f+-2|0;q=1<>1]|0)-(e[r>>1]|0)>>1)+(e[g>>1]|0)|0;b[c+(o<<1)>>1]=(A&p|0)==0?A:0-A>>31&q;A=o|1;z=((e[f+(A<<1)>>1]|0)-(e[r>>1]|0)>>1)+(e[g>>1]|0)|0;b[c+(A<<1)>>1]=(z&p|0)==0?z:0-z>>31&q;A=o|2;z=((e[f+(A<<1)>>1]|0)-(e[r>>1]|0)>>1)+(e[g>>1]|0)|0;b[c+(A<<1)>>1]=(z&p|0)==0?z:0-z>>31&q;A=o|3;z=((e[f+(A<<1)>>1]|0)-(e[r>>1]|0)>>1)+(e[g>>1]|0)|0;b[c+(A<<1)>>1]=(z&p|0)==0?z:0-z>>31&q;o=o+4|0}while((o|0)<(k|0))}}l=x;return}function yc(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0;g=c[e>>2]|0;if((g|0?c[g+304>>2]|0:0)?(h=e+46|0,g=(d[h>>0]|0)&(f^255)&255,a[h>>0]=g,g<<24>>24==0):0){Id(c[b+4>>2]|0,e+4|0);c[e+24>>2]=0}return}function zc(a){a=a|0;yc(a,a+2524|0,6);return}function Ac(a){a=a|0;yc(a,a+2524|0,-1);return}function Bc(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0;h=d+4364|0;if(((c[(c[d+2524>>2]|0)+304>>2]|0)!=0?(b[d+2568>>1]|0)==(b[h>>1]|0):0)?(c[d+2544>>2]|0)==(f|0):0)d=-1094995529;else{g=Cc(d)|0;if(!g)d=-12;else{c[e>>2]=c[g>>2];c[d+2520>>2]=g;a[g+46>>0]=a[d+1450>>0]|0?3:2;c[g+20>>2]=f;b[g+44>>1]=b[h>>1]|0;h=g+28|0;d=(c[d+200>>2]|0)+20|0;c[h>>2]=c[d>>2];c[h+4>>2]=c[d+4>>2];c[h+8>>2]=c[d+8>>2];c[h+12>>2]=c[d+12>>2];d=0}}return d|0}function Cc(a){a=a|0;var b=0,d=0;b=a+2524|0;if((c[(c[b>>2]|0)+304>>2]|0)==0?(Hd(c[a+4>>2]|0,a+2528|0,1)|0)>=0:0){d=c[a+200>>2]|0;c[a+2540>>2]=R(c[d+13132>>2]|0,c[d+13128>>2]|0)|0;d=c[a+4520>>2]|0;a=c[b>>2]|0;c[a+244>>2]=(d|0)==1&1;c[a+240>>2]=(d+-1|0)>>>0<2&1}else b=0;return b|0}function Dc(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;q=d+2046|0;s=d+4366|0;l=(f|0)==0;m=d+4364|0;n=d+200|0;o=d+2572|0;p=d+2524|0;h=d+2570|0;i=d+2544|0;j=d+2568|0;k=d+2568|0;g=d+2570|0;while(1){if((a[q>>0]|0)==1)if(((a[h>>0]&8)==0?(c[i>>2]|0)!=(c[o>>2]|0):0)?(b[j>>1]|0)==(b[s>>1]|0):0){yc(d,p,1);f=h}else f=h;else f=g;if(!(a[f>>0]&1))f=0;else f=(b[k>>1]|0)==(b[s>>1]|0)&1;if(((l?(b[s>>1]|0)==(b[m>>1]|0):0)?(r=c[n>>2]|0,r|0):0)?(f|0)<=(c[r+76+(((c[r+72>>2]|0)+-1|0)*12|0)+4>>2]|0):0){f=0;break}if(f|0){t=14;break}f=b[s>>1]|0;if(f<<16>>16==(b[m>>1]|0)){f=0;break}b[s>>1]=(f&65535)+1&255}if((t|0)==14){g=d+2524|0;f=ze(e,c[g>>2]|0)|0;if(!(a[d+2570>>0]&8))yc(d,g,1);else yc(d,g,9);f=(f|0)<0?f:1}return f|0}function Ec(){var b=0,c=0,d=0,e=0,f=0;if(!(a[3717]|0)){c=0;do{b=0;do{f=(R(b<<1|1,c)|0)&127;d=f>>>0>63;f=d?f+-64|0:f;d=d?-1:1;e=(f|0)>31;a[3717+(c<<5)+b>>0]=R(a[1706+(e?64-f|0:f)>>0]|0,e?0-d|0:d)|0;b=b+1|0}while((b|0)!=32);c=c+1|0}while((c|0)!=32)}return}function Fc(a,b){a=a|0;b=b|0;c[a>>2]=4;c[a+4>>2]=1;c[a+8>>2]=2;c[a+12>>2]=3;c[a+16>>2]=4;c[a+20>>2]=1;c[a+24>>2]=2;c[a+28>>2]=1;c[a+32>>2]=3;c[a+36>>2]=4;c[a+40>>2]=5;c[a+44>>2]=6;c[a+48>>2]=2;c[a+52>>2]=3;c[a+56>>2]=4;c[a+60>>2]=5;c[a+64>>2]=1;c[a+68>>2]=1;c[a+72>>2]=2;c[a+1676>>2]=5;c[a+1680>>2]=6;c[a+1684>>2]=1;c[a+1688>>2]=2;c[a+1692>>2]=5;c[a+1696>>2]=6;c[a+1700>>2]=1;c[a+1704>>2]=2;return}function Gc(a,c,d,e,f,g,h){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0;k=c>>>1;if((e|0)>0){l=(d|0)>0;j=h-g|0;i=0;h=a;while(1){if(l){c=0;do{b[h+(c<<1)>>1]=(Pd(f,g)|0)<>>1;j=1<>1]|0)+(e[a>>1]|0)|0;b[a>>1]=(l&i|0)==0?l:0-l>>31&j;d=d+1|0;if((d|0)==4)break;else c=c+2|0}h=h+1|0;if((h|0)==4)break;else{g=g+8|0;f=f+(k<<1)|0}}return}function Ic(a,c,d,f){a=a|0;c=c|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;k=d>>>1;j=1<>1]|0)+(e[a>>1]|0)|0;b[a>>1]=(l&i|0)==0?l:0-l>>31&j;d=d+1|0;if((d|0)==8)break;else c=c+2|0}h=h+1|0;if((h|0)==8)break;else{g=g+16|0;f=f+(k<<1)|0}}return}function Jc(a,c,d,f){a=a|0;c=c|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;k=d>>>1;j=1<>1]|0)+(e[a>>1]|0)|0;b[a>>1]=(l&i|0)==0?l:0-l>>31&j;d=d+1|0;if((d|0)==16)break;else c=c+2|0}h=h+1|0;if((h|0)==16)break;else{g=g+32|0;f=f+(k<<1)|0}}return}function Kc(a,c,d,f){a=a|0;c=c|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;k=d>>>1;j=1<>1]|0)+(e[a>>1]|0)|0;b[a>>1]=(l&i|0)==0?l:0-l>>31&j;d=d+1|0;if((d|0)==32)break;else c=c+2|0}h=h+1|0;if((h|0)==32)break;else{g=g+64|0;f=f+(k<<1)|0}}return}function Lc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;h=c<<16>>16;g=15-d-h|0;h=1<0){f=1<>16!=31){d=a;c=0;do{e=0;do{b[d>>1]=(b[d>>1]|0)+f>>g;d=d+2|0;e=e+1|0}while((e|0)<(h|0));c=c+1|0}while((c|0)<(h|0))}}else if(c<<16>>16!=31){f=0-g|0;e=0;d=a;do{c=0;do{b[d>>1]=b[d>>1]<>16);if(!d){if(c<<16>>16!=31){h=(i|0)>1;g=0;d=a;while(1){if(h){c=1;f=b[d>>1]|0;do{a=d+(c<<1)|0;f=(e[a>>1]|0)+(f&65535)&65535;b[a>>1]=f;c=c+1|0}while((c|0)!=(i|0))}g=g+1|0;if((g|0)>=(i|0))break;else d=d+(i<<1)|0}}}else{g=i+-1|0;if((i|0)>1){f=0;d=a;do{d=d+(i<<1)|0;c=0;do{a=d+(c<<1)|0;b[a>>1]=(e[a>>1]|0)+(e[d+(c-i<<1)>>1]|0);c=c+1|0}while((c|0)!=(i|0));f=f+1|0}while((f|0)!=(g|0))}}return}function Nc(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=0;e=a;while(1){o=b[e>>1]|0;m=e+16|0;k=b[m>>1]|0;i=k+o|0;f=e+24|0;n=b[f>>1]|0;l=n+k|0;g=o-n|0;j=e+8|0;h=(b[j>>1]|0)*74|0;n=((o-k+n|0)*74|0)+64|0;k=n>>7;b[m>>1]=(k+32768|0)>>>0>65535?n>>31^32767:k;m=(i*29|0)+64+(l*55|0)+h|0;k=m>>7;b[e>>1]=(k+32768|0)>>>0>65535?m>>31^32767:k;l=(R(l,-29)|0)+64+(g*55|0)+h|0;k=l>>7;b[j>>1]=(k+32768|0)>>>0>65535?l>>31^32767:k;h=(i*55|0)+64+(g*29|0)-h|0;g=h>>7;b[f>>1]=(g+32768|0)>>>0>65535?h>>31^32767:g;d=d+1|0;if((d|0)==4)break;else e=e+2|0}e=20-c|0;c=1<>1]|0;i=a+4|0;g=b[i>>1]|0;l=g+f|0;o=a+6|0;h=b[o>>1]|0;j=h+g|0;m=f-h|0;k=a+2|0;n=(b[k>>1]|0)*74|0;h=((f-g+h|0)*74|0)+c>>e;b[i>>1]=(h+32768|0)>>>0>65535?h>>31^32767:h;i=(l*29|0)+c+(j*55|0)+n>>e;b[a>>1]=(i+32768|0)>>>0>65535?i>>31^32767:i;j=(R(j,-29)|0)+c+(m*55|0)+n>>e;b[k>>1]=(j+32768|0)>>>0>65535?j>>31^32767:j;n=(l*55|0)+c+(m*29|0)-n>>e;b[o>>1]=(n+32768|0)>>>0>65535?n>>31^32767:n;d=d+1|0;if((d|0)==4)break;else a=a+8|0}return}function Oc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=0;e=a;while(1){l=b[e>>1]<<6;i=e+16|0;j=b[i>>1]<<6;g=j+l|0;j=l-j|0;l=e+8|0;k=b[l>>1]|0;f=e+24|0;m=b[f>>1]|0;h=(m*36|0)+(k*83|0)|0;k=(R(m,-83)|0)+(k*36|0)|0;m=g+64+h|0;n=m>>7;b[e>>1]=(n+32768|0)>>>0>65535?m>>31^32767:n;n=j+64+k|0;m=n>>7;b[l>>1]=(m+32768|0)>>>0>65535?n>>31^32767:m;k=j-k+64|0;j=k>>7;b[i>>1]=(j+32768|0)>>>0>65535?k>>31^32767:j;h=g-h+64|0;g=h>>7;b[f>>1]=(g+32768|0)>>>0>65535?h>>31^32767:g;c=c+1|0;if((c|0)==4)break;else e=e+2|0}d=20-d|0;f=1<>1]<<6;k=c+4|0;i=b[k>>1]<<6;h=c+2|0;j=b[h>>1]|0;n=c+6|0;l=b[n>>1]|0;m=(l*36|0)+(j*83|0)|0;j=(R(l,-83)|0)+(j*36|0)|0;l=i+g+f|0;a=l+m>>d;b[c>>1]=(a+32768|0)>>>0>65535?a>>31^32767:a;i=g-i+f|0;g=i+j>>d;b[h>>1]=(g+32768|0)>>>0>65535?g>>31^32767:g;j=i-j>>d;b[k>>1]=(j+32768|0)>>>0>65535?j>>31^32767:j;m=l-m>>d;b[n>>1]=(m+32768|0)>>>0>65535?m>>31^32767:m;e=e+1|0;if((e|0)==4)break;else c=c+8|0}return}function Pc(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+32|0;t=v+16|0;u=v;r=(e|0)<8;o=e+4|0;s=t+4|0;p=t+8|0;q=t+12|0;m=0;n=d;o=(o|0)<8?o:8;while(1){c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;c[u+12>>2]=0;i=(o|0)>1;g=0;do{if(i){j=u+(g<<2)|0;h=1;k=c[j>>2]|0;do{k=(R(b[n+(h<<3<<1)>>1]|0,a[3717+(h<<2<<5)+g>>0]|0)|0)+k|0;h=h+2|0}while((h|0)<(o|0));c[j>>2]=k}g=g+1|0}while((g|0)!=4);j=b[n>>1]<<6;i=b[n+64>>1]<<6;k=i+j|0;i=j-i|0;j=b[n+32>>1]|0;g=b[n+96>>1]|0;h=(g*36|0)+(j*83|0)|0;j=(R(g,-83)|0)+(j*36|0)|0;g=h+k|0;c[t>>2]=g;c[s>>2]=j+i;c[p>>2]=i-j;c[q>>2]=k-h;h=0;while(1){k=c[u+(h<<2)>>2]|0;i=g+64+k|0;j=i>>7;b[n+(h<<3<<1)>>1]=(j+32768|0)>>>0>65535?i>>31^32767:j;k=g-k+64|0;g=k>>7;b[n+(7-h<<3<<1)>>1]=(g+32768|0)>>>0>65535?k>>31^32767:g;g=h+1|0;if((g|0)==4)break;h=g;g=c[t+(g<<2)>>2]|0}o=(o|0)<8&((m|0)!=0&(m&3|0)==0)?o+-4|0:o;m=m+1|0;if((m|0)==8)break;else n=n+2|0}s=r?e:8;n=20-f|0;o=1<1;p=t+4|0;q=t+8|0;r=t+12|0;k=d;m=0;while(1){c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;c[u+12>>2]=0;h=0;do{if(e){j=u+(h<<2)|0;g=1;i=c[j>>2]|0;do{i=(R(b[k+(g<<1)>>1]|0,a[3717+(g<<2<<5)+h>>0]|0)|0)+i|0;g=g+2|0}while((g|0)<(s|0));c[j>>2]=i}h=h+1|0}while((h|0)!=4);f=b[k>>1]<<6;j=b[k+8>>1]<<6;d=j+f|0;j=f-j|0;f=b[k+4>>1]|0;g=b[k+12>>1]|0;h=(g*36|0)+(f*83|0)|0;f=(R(g,-83)|0)+(f*36|0)|0;g=h+d|0;c[t>>2]=g;c[p>>2]=f+j;c[q>>2]=j-f;c[r>>2]=d-h;h=0;while(1){d=c[u+(h<<2)>>2]|0;g=g+o|0;f=g+d>>n;b[k+(h<<1)>>1]=(f+32768|0)>>>0>65535?f>>31^32767:f;g=g-d>>n;b[k+(7-h<<1)>>1]=(g+32768|0)>>>0>65535?g>>31^32767:g;g=h+1|0;if((g|0)==4)break;h=g;g=c[t+(g<<2)>>2]|0}m=m+1|0;if((m|0)==8)break;else k=k+16|0}l=v;return}function Qc(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+96|0;u=y+64|0;v=y+32|0;w=y+16|0;x=y;t=(e|0)<16;o=e+4|0;p=w+4|0;q=w+8|0;r=w+12|0;s=u+28|0;m=0;n=d;o=(o|0)<16?o:16;while(1){c[v>>2]=0;c[v+4>>2]=0;c[v+8>>2]=0;c[v+12>>2]=0;c[v+16>>2]=0;c[v+20>>2]=0;c[v+24>>2]=0;c[v+28>>2]=0;i=(o|0)>1;g=0;do{if(i){j=v+(g<<2)|0;h=1;k=c[j>>2]|0;do{k=(R(b[n+(h<<4<<1)>>1]|0,a[3717+(h<<1<<5)+g>>0]|0)|0)+k|0;h=h+2|0}while((h|0)<(o|0));c[j>>2]=k}g=g+1|0}while((g|0)!=8);c[x>>2]=0;c[x+4>>2]=0;c[x+8>>2]=0;c[x+12>>2]=0;h=0;do{i=x+(h<<2)|0;g=1;j=c[i>>2]|0;do{j=(R(b[n+(g<<5<<1)>>1]|0,a[3717+(g<<2<<5)+h>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<8);c[i>>2]=j;h=h+1|0}while((h|0)!=4);i=b[n>>1]<<6;h=b[n+256>>1]<<6;j=h+i|0;h=i-h|0;i=b[n+128>>1]|0;k=b[n+384>>1]|0;g=(k*36|0)+(i*83|0)|0;i=(R(k,-83)|0)+(i*36|0)|0;k=g+j|0;c[w>>2]=k;c[p>>2]=i+h;c[q>>2]=h-i;c[r>>2]=j-g;g=c[x>>2]|0;c[u>>2]=g+k;c[s>>2]=k-g;g=1;do{j=c[w+(g<<2)>>2]|0;k=c[x+(g<<2)>>2]|0;c[u+(g<<2)>>2]=k+j;c[u+(7-g<<2)>>2]=j-k;g=g+1|0}while((g|0)!=4);g=0;do{k=c[u+(g<<2)>>2]|0;j=c[v+(g<<2)>>2]|0;h=k+64+j|0;i=h>>7;b[n+(g<<4<<1)>>1]=(i+32768|0)>>>0>65535?h>>31^32767:i;j=k-j+64|0;k=j>>7;b[n+(15-g<<4<<1)>>1]=(k+32768|0)>>>0>65535?j>>31^32767:k;g=g+1|0}while((g|0)!=8);o=(o|0)<16&((m|0)!=0&(m&3|0)==0)?o+-4|0:o;m=m+1|0;if((m|0)==16)break;else n=n+2|0}t=t?e:16;n=20-f|0;o=1<1;p=w+4|0;q=w+8|0;r=w+12|0;s=u+28|0;k=d;m=0;while(1){c[v>>2]=0;c[v+4>>2]=0;c[v+8>>2]=0;c[v+12>>2]=0;c[v+16>>2]=0;c[v+20>>2]=0;c[v+24>>2]=0;c[v+28>>2]=0;h=0;do{if(e){i=v+(h<<2)|0;g=1;j=c[i>>2]|0;do{j=(R(b[k+(g<<1)>>1]|0,a[3717+(g<<1<<5)+h>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<(t|0));c[i>>2]=j}h=h+1|0}while((h|0)!=8);c[x>>2]=0;c[x+4>>2]=0;c[x+8>>2]=0;c[x+12>>2]=0;h=0;do{i=x+(h<<2)|0;g=1;j=c[i>>2]|0;do{j=(R(b[k+(g<<1<<1)>>1]|0,a[3717+(g<<2<<5)+h>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<8);c[i>>2]=j;h=h+1|0}while((h|0)!=4);j=b[k>>1]<<6;i=b[k+16>>1]<<6;f=i+j|0;i=j-i|0;j=b[k+8>>1]|0;d=b[k+24>>1]|0;g=(d*36|0)+(j*83|0)|0;j=(R(d,-83)|0)+(j*36|0)|0;d=g+f|0;c[w>>2]=d;c[p>>2]=j+i;c[q>>2]=i-j;c[r>>2]=f-g;g=c[x>>2]|0;c[u>>2]=g+d;c[s>>2]=d-g;g=1;do{f=c[w+(g<<2)>>2]|0;d=c[x+(g<<2)>>2]|0;c[u+(g<<2)>>2]=d+f;c[u+(7-g<<2)>>2]=f-d;g=g+1|0}while((g|0)!=4);g=0;do{d=c[v+(g<<2)>>2]|0;f=(c[u+(g<<2)>>2]|0)+o|0;j=f+d>>n;b[k+(g<<1)>>1]=(j+32768|0)>>>0>65535?j>>31^32767:j;d=f-d>>n;b[k+(15-g<<1)>>1]=(d+32768|0)>>>0>65535?d>>31^32767:d;g=g+1|0}while((g|0)!=8);m=m+1|0;if((m|0)==16)break;else k=k+32|0}l=y;return}function Rc(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;C=l;l=l+224|0;w=C+160|0;x=C+96|0;y=C+64|0;z=C+32|0;A=C+16|0;B=C;u=(e|0)<32;p=e+4|0;q=A+4|0;r=A+8|0;s=A+12|0;t=y+28|0;n=0;o=d;p=(p|0)<32?p:32;while(1){g=x;h=g+64|0;do{c[g>>2]=0;g=g+4|0}while((g|0)<(h|0));i=(p|0)>1;g=0;do{if(i){j=x+(g<<2)|0;h=1;k=c[j>>2]|0;do{k=(R(b[o+(h<<5<<1)>>1]|0,a[3717+(h<<5)+g>>0]|0)|0)+k|0;h=h+2|0}while((h|0)<(p|0));c[j>>2]=k}g=g+1|0}while((g|0)!=16);c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;c[z+12>>2]=0;c[z+16>>2]=0;c[z+20>>2]=0;c[z+24>>2]=0;c[z+28>>2]=0;i=(p|0)/2|0;j=(p|0)>3;h=0;do{if(j){k=z+(h<<2)|0;g=1;m=c[k>>2]|0;do{m=(R(b[o+(g<<6<<1)>>1]|0,a[3717+(g<<1<<5)+h>>0]|0)|0)+m|0;g=g+2|0}while((g|0)<(i|0));c[k>>2]=m}h=h+1|0}while((h|0)!=8);c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;c[B+12>>2]=0;h=0;do{i=B+(h<<2)|0;g=1;j=c[i>>2]|0;do{j=(R(b[o+(g<<7<<1)>>1]|0,a[3717+(g<<2<<5)+h>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<8);c[i>>2]=j;h=h+1|0}while((h|0)!=4);k=b[o>>1]<<6;j=b[o+1024>>1]<<6;m=j+k|0;j=k-j|0;k=b[o+512>>1]|0;v=b[o+1536>>1]|0;g=(v*36|0)+(k*83|0)|0;k=(R(v,-83)|0)+(k*36|0)|0;v=g+m|0;c[A>>2]=v;c[q>>2]=k+j;c[r>>2]=j-k;c[s>>2]=m-g;g=c[B>>2]|0;c[y>>2]=g+v;c[t>>2]=v-g;g=1;do{m=c[A+(g<<2)>>2]|0;v=c[B+(g<<2)>>2]|0;c[y+(g<<2)>>2]=v+m;c[y+(7-g<<2)>>2]=m-v;g=g+1|0}while((g|0)!=4);g=0;do{m=c[y+(g<<2)>>2]|0;v=c[z+(g<<2)>>2]|0;c[w+(g<<2)>>2]=v+m;c[w+(15-g<<2)>>2]=m-v;g=g+1|0}while((g|0)!=8);g=0;do{v=c[w+(g<<2)>>2]|0;m=c[x+(g<<2)>>2]|0;j=v+64+m|0;k=j>>7;b[o+(g<<5<<1)>>1]=(k+32768|0)>>>0>65535?j>>31^32767:k;m=v-m+64|0;v=m>>7;b[o+(31-g<<5<<1)>>1]=(v+32768|0)>>>0>65535?m>>31^32767:v;g=g+1|0}while((g|0)!=16);p=(p|0)<32&((n|0)!=0&(n&3|0)==0)?p+-4|0:p;n=n+1|0;if((n|0)==32)break;else o=o+2|0}v=u?e:32;n=20-f|0;o=1<1;e=(v|0)/2|0;q=(v|0)>3;r=A+4|0;s=A+8|0;t=A+12|0;u=y+28|0;k=d;m=0;while(1){g=x;h=g+64|0;do{c[g>>2]=0;g=g+4|0}while((g|0)<(h|0));h=0;do{if(p){i=x+(h<<2)|0;g=1;j=c[i>>2]|0;do{j=(R(b[k+(g<<1)>>1]|0,a[3717+(g<<5)+h>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<(v|0));c[i>>2]=j}h=h+1|0}while((h|0)!=16);c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;c[z+12>>2]=0;c[z+16>>2]=0;c[z+20>>2]=0;c[z+24>>2]=0;c[z+28>>2]=0;h=0;do{if(q){i=z+(h<<2)|0;g=1;j=c[i>>2]|0;do{d=g<<1;j=(R(b[k+(d<<1)>>1]|0,a[3717+(d<<5)+h>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<(e|0));c[i>>2]=j}h=h+1|0}while((h|0)!=8);c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;c[B+12>>2]=0;h=0;do{i=B+(h<<2)|0;g=1;j=c[i>>2]|0;do{d=g<<2;j=(R(b[k+(d<<1)>>1]|0,a[3717+(d<<5)+h>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<8);c[i>>2]=j;h=h+1|0}while((h|0)!=4);j=b[k>>1]<<6;i=b[k+32>>1]<<6;f=i+j|0;i=j-i|0;j=b[k+16>>1]|0;d=b[k+48>>1]|0;g=(d*36|0)+(j*83|0)|0;j=(R(d,-83)|0)+(j*36|0)|0;d=g+f|0;c[A>>2]=d;c[r>>2]=j+i;c[s>>2]=i-j;c[t>>2]=f-g;g=c[B>>2]|0;c[y>>2]=g+d;c[u>>2]=d-g;g=1;do{f=c[A+(g<<2)>>2]|0;d=c[B+(g<<2)>>2]|0;c[y+(g<<2)>>2]=d+f;c[y+(7-g<<2)>>2]=f-d;g=g+1|0}while((g|0)!=4);g=0;do{f=c[y+(g<<2)>>2]|0;d=c[z+(g<<2)>>2]|0;c[w+(g<<2)>>2]=d+f;c[w+(15-g<<2)>>2]=f-d;g=g+1|0}while((g|0)!=8);g=0;do{d=c[x+(g<<2)>>2]|0;f=(c[w+(g<<2)>>2]|0)+o|0;j=f+d>>n;b[k+(g<<1)>>1]=(j+32768|0)>>>0>65535?j>>31^32767:j;d=f-d>>n;b[k+(31-g<<1)>>1]=(d+32768|0)>>>0>65535?d>>31^32767:d;g=g+1|0}while((g|0)!=16);m=m+1|0;if((m|0)==32)break;else k=k+64|0}l=C;return}function Sc(a,c){a=a|0;c=c|0;var d=0,e=0,f=0;e=14-c|0;e=((b[a>>1]|0)+1>>1)+(1<>e&65535;c=0;do{f=c<<2;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=4);c=c+1|0}while((c|0)!=4);return}function Tc(a,c){a=a|0;c=c|0;var d=0,e=0,f=0;e=14-c|0;e=((b[a>>1]|0)+1>>1)+(1<>e&65535;c=0;do{f=c<<3;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=8);c=c+1|0}while((c|0)!=8);return}function Uc(a,c){a=a|0;c=c|0;var d=0,e=0,f=0;e=14-c|0;e=((b[a>>1]|0)+1>>1)+(1<>e&65535;c=0;do{f=c<<4;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=16);c=c+1|0}while((c|0)!=16);return}function Vc(a,c){a=a|0;c=c|0;var d=0,e=0,f=0;e=14-c|0;e=((b[a>>1]|0)+1>>1)+(1<>e&65535;c=0;do{f=c<<5;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=32);c=c+1|0}while((c|0)!=32);return}function Wc(a,f,g,h,i,j,k,m,n,o){a=a|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+128|0;t=u;j=t;p=j+128|0;do{c[j>>2]=0;j=j+4|0}while((j|0)<(p|0));p=d[i+96+n>>0]|0;s=g>>>1;j=0;do{r=j;j=j+1|0;c[t+((r+p&31)<<2)>>2]=b[i+112+(n*10|0)+(j<<1)>>1]}while((j|0)!=4);r=o+-5|0;h=h>>>1;if((m|0)>0){q=(k|0)>0;n=1<>1]|0;a=a+(c[t+(a>>>r<<2)>>2]|0)|0;b[p+(j<<1)>>1]=(a&i|0)==0?a:0-a>>31&n;j=j+1|0}while((j|0)!=(k|0))}g=g+1|0;if((g|0)==(m|0))break;else{f=f+(h<<1)|0;p=p+(s<<1)|0}}}l=u;return}function Xc(a,d,f,g,h,i,j,k,l,m,n,o,p){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,v=0;r=h+112+(l*10|0)|0;q=c[h+100+(l<<2)>>2]|0;v=f>>>1;u=g>>>1;if((q|0)!=1){if(c[i>>2]|0){o=b[r>>1]|0;if((k|0)>0){f=1<>1]|0)+o|0;b[a+((R(n,v)|0)<<1)>>1]=(t&m|0)==0?t:0-t>>31&f;n=n+1|0}while((n|0)!=(k|0));n=1}else n=1}else n=0;if(c[i+8>>2]|0){g=b[r>>1]|0;j=j+-1|0;if((k|0)>0){f=1<>1]|0)+g|0;b[a+((R(o,v)|0)+j<<1)>>1]=(t&m|0)==0?t:0-t>>31&f;o=o+1|0}while((o|0)!=(k|0))}}if(!q){m=j;o=k;j=0}else{t=j;s=11}}else{t=j;n=0;s=11}if((s|0)==11){if(c[i+4>>2]|0){o=b[r>>1]|0;if((n|0)<(t|0)){f=1<>1]|0)+o|0;b[a+(j<<1)>>1]=(s&m|0)==0?s:0-s>>31&f;j=j+1|0}while((j|0)!=(t|0));j=1}else j=1}else j=0;if(c[i+12>>2]|0){s=b[r>>1]|0;o=k+-1|0;g=R(o,v)|0;q=R(o,u)|0;if((n|0)<(t|0)){f=1<>1]|0)+s|0;b[a+(m+g<<1)>>1]=(k&r|0)==0?k:0-k>>31&f;m=m+1|0}while((m|0)!=(t|0));m=t}else m=t}else{m=t;o=k}}dd(a,d,v,u,h,m,o,l,n,j,p);return}function Yc(d,f,g,h,i,j,k,l,m,n,o,p,q){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;z=i+112+(m*10|0)|0;D=c[i+100+(m<<2)>>2]|0;M=g>>>1;K=h>>>1;E=(D|0)!=1;if(E){if(c[j>>2]|0){h=b[z>>1]|0;if((l|0)>0){u=1<>1]|0)+h|0;b[d+((R(g,M)|0)<<1)>>1]=(C&t|0)==0?C:0-C>>31&u;g=g+1|0}while((g|0)!=(l|0));w=1}else w=1}else w=0;if(c[j+8>>2]|0){v=b[z>>1]|0;g=k+-1|0;if((l|0)>0){u=1<>1]|0)+v|0;b[d+((R(h,M)|0)+g<<1)>>1]=(C&t|0)==0?C:0-C>>31&u;h=h+1|0}while((h|0)!=(l|0))}}else g=k;if(!D){C=g;x=0;B=0}else{y=w;A=11}}else{g=k;y=0;A=11}if((A|0)==11){if(c[j+4>>2]|0){t=b[z>>1]|0;if((y|0)<(g|0)){v=1<>1]|0)+t|0;b[d+(h<<1)>>1]=(C&u|0)==0?C:0-C>>31&v;h=h+1|0}while((h|0)!=(g|0));x=1}else x=1}else x=0;if(c[j+12>>2]|0){w=b[z>>1]|0;l=l+-1|0;u=R(l,M)|0;v=R(l,K)|0;if((y|0)<(g|0)){t=1<>1]|0)+w|0;b[d+(h+u<<1)>>1]=(C&k|0)==0?C:0-C>>31&t;h=h+1|0}while((h|0)!=(g|0));C=g;w=y;B=1}else{C=g;w=y;B=1}}else{C=g;w=y;B=1}}dd(d,f,M,K,i,C,l,m,w,x,q);i=(D|0)==2;if(!(i&(a[p>>0]|0)==0)){h=p+1|0;g=(D|0)==3;if(g&(a[h>>0]|0)==0)if(!(c[j+4>>2]|0)){t=(c[j+8>>2]|0)==0;q=1;k=0;A=h}else{t=0;q=1;k=0;A=h}else{t=0;q=g;k=0;A=h}}else{if(!(c[j>>2]|0))g=(c[j+4>>2]|0)==0;else g=0;t=0;q=0;k=g&1;A=p+1|0}u=t&1;z=p+2|0;if(i&(a[z>>0]|0)==0?(c[j+8>>2]|0)==0:0)g=(c[j+12>>2]|0)==0;else g=0;v=g&1;y=p+3|0;if(q&(a[y>>0]|0)==0?(c[j>>2]|0)==0:0)g=(c[j+12>>2]|0)==0;else g=0;t=g&1;if(E&(a[n>>0]|0)!=0?(F=k+x|0,G=l-t|0,(F|0)<(G|0)):0){g=F;do{b[d+((R(g,M)|0)<<1)>>1]=b[f+((R(g,K)|0)<<1)>>1]|0;g=g+1|0}while((g|0)!=(G|0))}if(E&(a[n+1>>0]|0)!=0?(H=u+x|0,I=l-v|0,(H|0)<(I|0)):0){h=C+-1|0;g=H;do{b[d+(h+(R(g,M)|0)<<1)>>1]=b[f+(h+(R(g,K)|0)<<1)>>1]|0;g=g+1|0}while((g|0)!=(I|0))}if(B&(a[o>>0]|0)!=0?(s=k+w|0,J=C-u|0,(s|0)<(J|0)):0)do{b[d+(s<<1)>>1]=b[f+(s<<1)>>1]|0;s=s+1|0}while((s|0)!=(J|0));if(B&(a[o+1>>0]|0)!=0?(r=t+w|0,L=C-v|0,(r|0)<(L|0)):0){g=l+-1|0;s=R(g,K)|0;g=R(g,M)|0;do{b[d+(r+g<<1)>>1]=b[f+(r+s<<1)>>1]|0;r=r+1|0}while((r|0)!=(L|0))}if(i&(a[p>>0]|0)!=0)b[d>>1]=b[f>>1]|0;s=C+-1|0;if(q&(a[A>>0]|0)!=0)b[d+(s<<1)>>1]=b[f+(s<<1)>>1]|0;r=l+-1|0;if(i&(a[z>>0]|0)!=0)b[d+(s+(R(r,M)|0)<<1)>>1]=b[f+(s+(R(r,K)|0)<<1)>>1]|0;if(q&(a[y>>0]|0)!=0){d=d+((R(r,M)|0)<<1)|0;b[d>>1]=b[f+((R(r,K)|0)<<1)>>1]|0}return}function Zc(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;cd(a,b,2,c,d,e,f,g);return}function _c(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;cd(a,2,b,c,d,e,f,g);return}function $c(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;bd(a,b,2,c,d,e,f);return}function ad(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;bd(a,2,b,c,d,e,f);return}function bd(d,f,g,h,i,j,k){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;A=f>>>1;y=g>>>1;z=k+-8|0;v=y<<2;w=R(A,-2)|0;x=0-A|0;u=1<>2]<=1){m=0-l|0;n=(a[i+s>>0]|0)==0;o=(a[j+s>>0]|0)==0;g=0;k=d;while(1){p=k+(x<<1)|0;q=e[p>>1]|0;r=e[k>>1]|0;f=(e[k+(w<<1)>>1]|0)+4-(e[k+(A<<1)>>1]|0)+(r-q<<2)>>3;f=(f|0)<(m|0)?m:(f|0)>(l|0)?l:f;if(n){q=f+q|0;b[p>>1]=(q&t|0)==0?q:0-q>>31&u}if(o){r=r-f|0;b[k>>1]=(r&t|0)==0?r:0-r>>31&u}g=g+1|0;if((g|0)==4)break;else k=k+(y<<1)|0}}s=s+1|0;if((s|0)==2)break;else d=d+(v<<1)|0}return}function cd(d,f,g,h,i,j,k,l){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0;fa=f>>>1;ea=g>>>1;da=l+-8|0;M=h<>3;Z=M>>2;_=R(fa,-4)|0;$=fa*3|0;aa=S+_|0;ba=S+$|0;ca=(M>>1)+M>>3;K=1<>1]|0;l=b[d+(O<<1)>>1]|0;m=b[d+(P<<1)>>1]|0;f=m&65535;x=(h&65535)-((l&65535)<<1)+f|0;x=(x|0)>-1?x:0-x|0;s=b[d+(Q<<1)>>1]|0;r=b[d+(fa<<1)>>1]|0;q=b[d>>1]|0;g=q&65535;z=(s&65535)-((r&65535)<<1)+g|0;z=(z|0)>-1?z:0-z|0;n=e[d+(V<<1)>>1]|0;y=(e[d+(T<<1)>>1]|0)-((e[d+(U<<1)>>1]|0)<<1)+n|0;y=(y|0)>-1?y:0-y|0;o=e[d+(S<<1)>>1]|0;A=(e[d+(W<<1)>>1]|0)-((e[d+(X<<1)>>1]|0)<<1)+o|0;A=(A|0)>-1?A:0-A|0;t=z+x|0;u=A+y|0;H=c[i+(I<<2)>>2]<>0]|0;B=a[k+I>>0]|0;a:do if((u+t|0)<(M|0)){v=(H*5|0)+1>>1;G=(e[d+(_<<1)>>1]|0)-f|0;p=b[d+($<<1)>>1]|0;F=(p&65535)-g|0;if((((((F|0)>-1?F:0-F|0)+((G|0)>-1?G:0-G|0)|0)<(Y|0)?(G=f-g|0,(((G|0)>-1?G:0-G|0)|0)<(v|0)):0)?(G=(e[d+(aa<<1)>>1]|0)-n|0,F=(e[d+(ba<<1)>>1]|0)-o|0,(((F|0)>-1?F:0-F|0)+((G|0)>-1?G:0-G|0)|0)<(Y|0)):0)?(G=n-o|0,((t<<1|0)<(Z|0)?(((G|0)>-1?G:0-G|0)|0)<(v|0):0)&(u<<1|0)<(Z|0)):0){x=H<<1;v=w<<24>>24==0;w=0-x|0;u=B<<24>>24==0;f=0;t=d;while(1){o=h&65535;n=l&65535;m=m&65535;l=q&65535;h=r&65535;g=s&65535;if(v){H=e[t+(_<<1)>>1]|0;G=((o+4+h+(m+n+l<<1)|0)>>>3)-m|0;b[t+(P<<1)>>1]=((G|0)<(w|0)?w:(G|0)>(x|0)?x:G)+m;G=((o+2+n+m+l|0)>>>2)-n|0;b[t+(O<<1)>>1]=((G|0)<(w|0)?w:(G|0)>(x|0)?x:G)+n;H=((o*3|0)+4+n+m+l+(H<<1)>>3)-o|0;b[t+(N<<1)>>1]=((H|0)<(w|0)?w:(H|0)>(x|0)?x:H)+o}if(u){H=((n+4+g+(l+m+h<<1)|0)>>>3)-l|0;b[t>>1]=((H|0)<(w|0)?w:(H|0)>(x|0)?x:H)+l;H=((m+2+l+h+g|0)>>>2)-h|0;b[t+(fa<<1)>>1]=((H|0)<(w|0)?w:(H|0)>(x|0)?x:H)+h;H=((m+4+l+h+(g*3|0)+((p&65535)<<1)|0)>>>3)-g|0;b[t+(Q<<1)>>1]=((H|0)<(w|0)?w:(H|0)>(x|0)?x:H)+g}g=t+(ea<<1)|0;f=f+1|0;if((f|0)==4)break a;t=g;h=b[g+(N<<1)>>1]|0;l=b[g+(O<<1)>>1]|0;m=b[g+(P<<1)>>1]|0;q=b[g>>1]|0;r=b[g+(fa<<1)>>1]|0;s=b[g+(Q<<1)>>1]|0;p=b[g+($<<1)>>1]|0}}E=H>>1;F=H*10|0;G=0-H|0;D=w<<24>>24==0;C=B<<24>>24==0;B=D&(y+x|0)<(ca|0);y=0-E|0;x=C&(A+z|0)<(ca|0);f=0;w=d;while(1){u=h&65535;v=w+(O<<1)|0;p=l&65535;t=w+(P<<1)|0;o=m&65535;m=q&65535;n=w+(fa<<1)|0;l=r&65535;h=s&65535;g=((m-o|0)*9|0)+8+(R(l-p|0,-3)|0)>>4;if((((g|0)>-1?g:0-g|0)|0)<(F|0)){g=(g|0)<(G|0)?G:(g|0)>(H|0)?H:g;if(D){A=g+o|0;b[t>>1]=(A&J|0)==0?A:0-A>>31&K}if(C){A=m-g|0;b[w>>1]=(A&J|0)==0?A:0-A>>31&K}if(B){A=((u+1+o|0)>>>1)-p+g>>1;A=((A|0)<(y|0)?y:(A|0)>(E|0)?E:A)+p|0;b[v>>1]=(A&J|0)==0?A:0-A>>31&K}if(x){A=((m+1+h|0)>>>1)-l-g>>1;A=((A|0)<(y|0)?y:(A|0)>(E|0)?E:A)+l|0;b[n>>1]=(A&J|0)==0?A:0-A>>31&K}}g=w+(ea<<1)|0;f=f+1|0;if((f|0)==4)break a;w=g;h=b[g+(N<<1)>>1]|0;l=b[g+(O<<1)>>1]|0;m=b[g+(P<<1)>>1]|0;q=b[g>>1]|0;r=b[g+(fa<<1)>>1]|0;s=b[g+(Q<<1)>>1]|0}}while(0);I=I+1|0;if((I|0)==2)break;else d=d+(L<<1)|0}return}function dd(e,f,g,h,i,j,k,l,m,n,o){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;p=c[i+100+(l<<2)>>2]|0;x=a[1738+(p<<2)>>0]|0;y=a[1738+(p<<2)+2>>0]|0;if((n|0)<(k|0)){u=R((a[1738+(p<<2)+3>>0]|0)+n|0,h)|0;z=(m|0)<(j|0);w=1<>0]|0)+n|0,h)|0;s=n;p=R(n,h)|0;while(1){if(z){n=r+x|0;q=u+y|0;o=m;do{A=b[f+(o+p<<1)>>1]|0;C=b[f+(n+o<<1)>>1]|0;B=b[f+(q+o<<1)>>1]|0;A=(b[i+112+(l*10|0)+(d[1754+(((A&65535)>(C&65535)?3:((A<<16>>16!=C<<16>>16)<<31>>31)+2|0)+((A&65535)>(B&65535)?1:(A<<16>>16!=B<<16>>16)<<31>>31))>>0]<<1)>>1]|0)+(A&65535)|0;b[e+(o+t<<1)>>1]=(A&v|0)==0?A:0-A>>31&w;o=o+1|0}while((o|0)!=(j|0))}s=s+1|0;if((s|0)==(k|0))break;else{t=t+g|0;u=u+h|0;r=r+h|0;p=p+h|0}}}return}function ed(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;n=c[b+136>>2]|0;j=1<>2]|0)+13080>>2];o=j+-1|0;k=o&e;l=(o&f|0)!=0;i=(a[n+309>>0]|0)!=0|l;b=i&1;c[n+31296>>2]=b;m=(a[n+308>>0]|0)!=0|(k|0)!=0;c[n+31292>>2]=m&1;if(!(o&(f|e)))i=d[n+311>>0]|0;else i=m&i&1;c[n+31300>>2]=i;if((k+g|0)==(j|0))b=(a[n+310>>0]|0)!=0&(l^1)&1;c[n+31308>>2]=b;if(!b)b=0;else b=(g+e|0)<(c[n+312>>2]|0);c[n+31304>>2]=b&1;c[n+31288>>2]=(h+f|0)<(c[n+316>>2]|0)&m&1;return}function fd(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;w=l;l=l+16|0;t=w;p=(c[b+136>>2]|0)+204|0;r=me(13196)|0;c[t>>2]=r;v=r;a:do if(r){s=r+4|0;q=c[s>>2]|0;e=gd(b)|0;if((e|0)>=0){c[q>>2]=0;g=q+72|0;c[g>>2]=1;o=Pd(p,8)|0;f=q+4|0;c[f>>2]=o;do if((o|0)<=3){a[q+8>>0]=0;m=q+13120|0;c[m>>2]=Td(p,32)|0;e=Td(p,32)|0;n=q+13124|0;c[n>>2]=e;e=Dd(c[m>>2]|0,e,0,c[b+4>>2]|0)|0;if((e|0)>=0){o=q+52|0;c[o>>2]=(Pd(p,8)|0)+8;switch(c[f>>2]|0){case 0:{f=32;break}case 1:{f=54;break}case 2:{f=56;break}default:f=58}c[q+60>>2]=f;c[q+56>>2]=1;f=Ae(f)|0;if(f){c[q+13180>>2]=0;c[q+13168>>2]=0;k=d[f+5>>0]|0;c[q+13172>>2]=k;c[q+13176>>2]=k;k=d[f+6>>0]|0;c[q+13184>>2]=k;c[q+13188>>2]=k;c[q+64>>2]=8;if((c[g>>2]|0)>0){f=0;do{c[q+76+(f*12|0)>>2]=1;c[q+76+(f*12|0)+4>>2]=0;c[q+76+(f*12|0)+8>>2]=-1;f=f+1|0}while((f|0)<(c[g>>2]|0))}g=(Ud(p)|0)+3|0;f=q+13064|0;c[f>>2]=g;g=1<>2]=h+(c[m>>2]|0)&g;c[n>>2]=(c[n>>2]|0)+h&g;g=q+13068|0;c[g>>2]=Ud(p)|0;h=q+13072|0;c[h>>2]=(Ud(p)|0)+2;j=Ud(p)|0;k=c[h>>2]|0;i=q+13076|0;c[i>>2]=k+j;if(k>>>0<(c[f>>2]|0)>>>0){x=Ud(p)|0;j=q+13092|0;c[j>>2]=x;k=q+13088|0;c[k>>2]=x;a[q+12940>>0]=1;a[q+12941>>0]=Sd(p)|0;x=Sd(p)|0;c[q+68>>2]=x;if(x|0){x=q+13044|0;a[x>>0]=(Pd(p,4)|0)+1;a[q+13045>>0]=(Pd(p,4)|0)+1;y=(Ud(p)|0)+3|0;c[q+13048>>2]=y;c[q+13052>>2]=(Ud(p)|0)+y;if((d[x>>0]|0|0)>(c[o>>2]|0)){e=-1094995529;break}a[q+13056>>0]=Sd(p)|0}c[q+2184>>2]=0;a[q+12942>>0]=0;a[q+13060>>0]=1;a[q+13061>>0]=Sd(p)|0;c[q+160>>2]=0;c[q+164>>2]=1;if(Sd(p)|0?(y=Sd(p)|0,Rd(p,7),y|0):0){c[q+13096>>2]=Sd(p)|0;c[q+13100>>2]=Sd(p)|0;c[q+13104>>2]=Sd(p)|0;c[q+13108>>2]=Sd(p)|0;Sd(p)|0;c[q+13112>>2]=Sd(p)|0;Sd(p)|0;c[q+13116>>2]=Sd(p)|0;Sd(p)|0}m=c[m>>2]|0;c[q+12>>2]=m;n=c[n>>2]|0;c[q+16>>2]=n;f=c[f>>2]|0;y=(c[g>>2]|0)+f|0;c[q+13080>>2]=y;g=f+-1|0;c[q+13084>>2]=g;x=1<>y;c[q+13128>>2]=z;x=n+-1+x>>y;c[q+13132>>2]=x;c[q+13136>>2]=R(z,x)|0;c[q+13140>>2]=m>>f;c[q+13144>>2]=n>>f;x=c[h>>2]|0;c[q+13148>>2]=m>>x;c[q+13152>>2]=n>>x;c[q+13156>>2]=m>>g;c[q+13160>>2]=n>>g;x=y-x|0;c[q+13164>>2]=(1<>2]=((c[o>>2]|0)*6|0)+-48;if((((!(y>>>0>6?1:((1<>2]|0)>>>0<=x>>>0:0)?(c[j>>2]|0)>>>0<=x>>>0:0)?(c[i>>2]|0)>>>0<=(y>>>0<5?y:5)>>>0:0)?(hd(p)|0)>=0:0){h=b+272|0;e=c[h>>2]|0;if((e|0)!=0?(Af(c[e+4>>2]|0,c[s>>2]|0,c[r+8>>2]|0)|0)==0:0){pe(t);e=0;break a}else e=0;do{f=b+400+(e<<2)|0;g=c[f>>2]|0;do if(g|0){if(c[c[g+4>>2]>>2]|0)break;pe(f)}while(0);e=e+1|0}while((e|0)!=256);e=c[h>>2]|0;do if(e|0?(u=b+200|0,(c[u>>2]|0)==(c[e+4>>2]|0)):0){y=b+1424|0;pe(y);z=ne(c[h>>2]|0)|0;c[y>>2]=z;if(z|0)break;c[u>>2]=0}while(0);pe(h);c[h>>2]=v;e=0;break a}}else e=-1094995529}else e=-22}}else e=-1094995529;while(0);pe(t)}}else e=-12;while(0);l=w;return e|0}function gd(b){b=b|0;var d=0,e=0,f=0,g=0;e=me(468)|0;if(!e)d=-12;else{f=c[e+4>>2]|0;c[f+4>>2]=1;g=f+8|0;c[g>>2]=1;a[f>>0]=0;c[f+348>>2]=1;d=0;do{c[f+352+(d<<2)>>2]=1;c[f+380+(d<<2)>>2]=0;c[f+408+(d<<2)>>2]=-1;d=d+1|0}while((d|0)<(c[g>>2]|0));c[f+436>>2]=0;c[f+440>>2]=1;a[f+444>>0]=0;d=b+208|0;pe(d);c[d>>2]=e;d=0}return d|0}function hd(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(id(a)|0)|0}function id(a){a=a|0;return c[a+8>>2]|0} +function jd(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;M=l;l=l+16|0;L=M+4|0;H=M;K=(c[b+136>>2]|0)+204|0;i=ee(1692)|0;c[H>>2]=i;a:do if(!i)d=-12;else{J=je(i,1692,6,0,0)|0;c[L>>2]=J;I=J;if(!J){be(H);d=-12;break}a[i+53>>0]=1;f=i+44|0;c[f>>2]=1;g=i+48|0;c[g>>2]=1;h=i+52|0;a[h>>0]=1;a[i+57>>0]=0;c[i+60>>2]=0;c[i+64>>2]=0;a[i+1629>>0]=2;J=Ud(K)|0;b:do if((J>>>0<=255?(d=Ud(K)|0,c[i>>2]=d,d>>>0<=31):0)?(e=c[b+272+(d<<2)>>2]|0,(e|0)!=0):0){G=c[e+4>>2]|0;a[i+41>>0]=Sd(K)|0;a[i+39>>0]=Sd(K)|0;c[i+1624>>2]=Pd(K,3)|0;a[i+4>>0]=Sd(K)|0;a[i+5>>0]=Sd(K)|0;c[i+8>>2]=(Ud(K)|0)+1;c[i+12>>2]=(Ud(K)|0)+1;c[i+16>>2]=ld(K)|0;a[i+20>>0]=Sd(K)|0;a[i+21>>0]=Sd(K)|0;F=(Sd(K)|0)&255;a[i+22>>0]=F;d=i+24|0;c[d>>2]=0;if(F<<24>>24)c[d>>2]=Ud(K)|0;F=ld(K)|0;c[i+28>>2]=F;if((F+12|0)>>>0<=24?(F=ld(K)|0,c[i+32>>2]=F,(F+12|0)>>>0<=24):0){a[i+36>>0]=Sd(K)|0;a[i+37>>0]=Sd(K)|0;a[i+38>>0]=Sd(K)|0;a[i+40>>0]=Sd(K)|0;F=i+42|0;a[F>>0]=Sd(K)|0;a[i+43>>0]=Sd(K)|0;if(!(a[F>>0]|0))o=c[H>>2]|0;else{c[f>>2]=(Ud(K)|0)+1;d=(Ud(K)|0)+1|0;c[g>>2]=d;e=c[f>>2]|0;if(!e){d=-1094995529;break}if((d|0)==0?1:(e|0)>=(c[G+13120>>2]|0)){d=-1094995529;break}if((d|0)>=(c[G+13124>>2]|0)){d=-1094995529;break}E=i+1648|0;c[E>>2]=he(e,4)|0;F=he(c[g>>2]|0,4)|0;c[i+1652>>2]=F;if((c[E>>2]|0)==0|(F|0)==0){d=-12;break}F=(Sd(K)|0)&255;a[h>>0]=F;if(!(F<<24>>24)){F=c[f>>2]|0;d=F+-1|0;if((F|0)>1){i=c[H>>2]|0;f=i+1648|0;j=i+44|0;e=0;g=0;d=0;while(1){h=(Ud(K)|0)+1|0;c[(c[f>>2]|0)+(e<<2)>>2]=h;g=Jf(h|0,0,g|0,d|0)|0;h=C;e=e+1|0;d=(c[j>>2]|0)+-1|0;if((e|0)>=(d|0))break;else d=h}}else{h=0;g=0}e=c[G+13128>>2]|0;f=((e|0)<0)<<31>>31;if(!(f>>>0>h>>>0|(f|0)==(h|0)&e>>>0>g>>>0)){d=-1094995529;break}j=Hf(e|0,f|0,g|0,h|0)|0;c[(c[i+1648>>2]|0)+(d<<2)>>2]=j;j=c[H>>2]|0;i=j+48|0;F=c[i>>2]|0;d=F+-1|0;if((F|0)>1){f=j+1652|0;e=0;g=0;d=0;while(1){h=(Ud(K)|0)+1|0;c[(c[f>>2]|0)+(e<<2)>>2]=h;g=Jf(h|0,0,g|0,d|0)|0;h=C;e=e+1|0;d=(c[i>>2]|0)+-1|0;if((e|0)>=(d|0))break;else d=h}}else{h=0;g=0}e=c[G+13132>>2]|0;f=((e|0)<0)<<31>>31;if(!(f>>>0>h>>>0|(f|0)==(h|0)&e>>>0>g>>>0)){d=-1094995529;break}F=Hf(e|0,f|0,g|0,h|0)|0;c[(c[j+1652>>2]|0)+(d<<2)>>2]=F}F=(Sd(K)|0)&255;o=c[H>>2]|0;a[o+53>>0]=F}a[o+54>>0]=Sd(K)|0;F=(Sd(K)|0)&255;a[o+55>>0]=F;if((F<<24>>24?(a[o+56>>0]=Sd(K)|0,F=(Sd(K)|0)&255,a[o+57>>0]=F,F<<24>>24==0):0)?(F=o+60|0,c[F>>2]=(ld(K)|0)<<1,E=(ld(K)|0)<<1,c[o+64>>2]=E,(E+13|0)>>>0>26?1:((c[F>>2]|0)+13|0)>>>0>26):0){d=-1094995529;break}F=(Sd(K)|0)&255;a[o+68>>0]=F;if(F<<24>>24){d=o+69|0;md(d);d=nd(b,d,G)|0;if((d|0)<0)break}else d=0;a[o+1617>>0]=Sd(K)|0;F=(Ud(K)|0)+2|0;c[o+1620>>2]=F;E=G+13080|0;if(F>>>0<=(c[E>>2]|0)>>>0){a[o+1628>>0]=Sd(K)|0;if(Sd(K)|0?(F=Sd(K)|0,Pd(K,7)|0,F|0):0)od(b,o);j=o+44|0;i=o+1656|0;c[i>>2]=he((c[j>>2]|0)+1|0,4)|0;m=o+48|0;k=o+1660|0;c[k>>2]=he((c[m>>2]|0)+1|0,4)|0;F=G+13128|0;D=he(c[F>>2]|0,4)|0;n=o+1664|0;c[n>>2]=D;if((c[i>>2]|0)!=0?!((c[k>>2]|0)==0|(D|0)==0):0){do if(a[o+52>>0]|0){f=o+1648|0;e=c[f>>2]|0;if(!e){c[f>>2]=he(c[j>>2]|0,4)|0;c[o+1652>>2]=he(c[m>>2]|0,4)|0;e=c[f>>2]|0;if(!e){d=-12;break b}}h=c[o+1652>>2]|0;if(!h){d=-12;break b}f=c[j>>2]|0;if((f|0)>0){g=0;do{D=g;g=g+1|0;B=c[F>>2]|0;c[e+(D<<2)>>2]=((R(B,g)|0)/(f|0)|0)-((R(B,D)|0)/(f|0)|0);f=c[j>>2]|0}while((g|0)<(f|0))}e=c[m>>2]|0;if((e|0)<=0)break;g=G+13132|0;f=0;do{D=f;f=f+1|0;B=c[g>>2]|0;c[h+(D<<2)>>2]=((R(B,f)|0)/(e|0)|0)-((R(B,D)|0)/(e|0)|0);e=c[m>>2]|0}while((f|0)<(e|0))}while(0);i=c[i>>2]|0;c[i>>2]=0;if((c[j>>2]|0)>0){f=c[o+1648>>2]|0;e=0;g=0;do{g=(c[f+(e<<2)>>2]|0)+g|0;e=e+1|0;c[i+(e<<2)>>2]=g}while((e|0)<(c[j>>2]|0))}g=c[k>>2]|0;c[g>>2]=0;if((c[m>>2]|0)>0){f=c[o+1652>>2]|0;e=0;h=0;do{h=(c[f+(e<<2)>>2]|0)+h|0;e=e+1|0;c[g+(e<<2)>>2]=h}while((e|0)<(c[m>>2]|0))}e=c[F>>2]|0;if((e|0)>0){h=c[n>>2]|0;f=0;g=0;do{f=(g>>>0>(c[i+(f<<2)>>2]|0)>>>0&1)+f|0;c[h+(g<<2)>>2]=f;g=g+1|0;e=c[F>>2]|0}while((g|0)<(e|0))}B=R(c[G+13132>>2]|0,e)|0;A=o+1668|0;c[A>>2]=he(B,4)|0;e=o+1672|0;c[e>>2]=he(B,4)|0;f=o+1676|0;c[f>>2]=he(B,4)|0;D=G+13164|0;g=(c[D>>2]|0)+2|0;g=he(R(g,g)|0,4)|0;c[o+1688>>2]=g;if(!(c[A>>2]|0)){d=-12;break}if(!(c[e>>2]|0)){d=-12;break}if((c[f>>2]|0)==0|(g|0)==0){d=-12;break}if((B|0)>0){y=c[H>>2]|0;n=y+44|0;o=y+1656|0;p=y+48|0;q=y+1660|0;r=y+1652|0;s=c[q>>2]|0;t=c[y+1648>>2]|0;u=c[o>>2]|0;v=c[y+1668>>2]|0;w=c[y+1672>>2]|0;x=y+1652|0;y=y+1648|0;m=0;do{k=c[F>>2]|0;z=(m|0)%(k|0)|0;A=(m|0)/(k|0)|0;f=c[n>>2]|0;e=0;while(1){if((e|0)>=(f|0)){j=0;break}g=e+1|0;if(z>>>0<(c[(c[o>>2]|0)+(g<<2)>>2]|0)>>>0){j=e;break}else e=g}f=c[p>>2]|0;e=0;while(1){if((e|0)>=(f|0)){i=0;break}g=e+1|0;if(A>>>0<(c[(c[q>>2]|0)+(g<<2)>>2]|0)>>>0){i=e;break}else e=g}if((j|0)>0){g=c[(c[x>>2]|0)+(i<<2)>>2]|0;h=c[y>>2]|0;e=0;f=0;do{e=(R(c[h+(f<<2)>>2]|0,g)|0)+e|0;f=f+1|0}while((f|0)!=(j|0))}else e=0;if((i|0)>0){g=c[r>>2]|0;f=0;do{e=(R(c[g+(f<<2)>>2]|0,k)|0)+e|0;f=f+1|0}while((f|0)!=(i|0))}A=R(c[t+(j<<2)>>2]|0,A-(c[s+(i<<2)>>2]|0)|0)|0;A=e+z+A-(c[u+(j<<2)>>2]|0)|0;c[v+(m<<2)>>2]=A;c[w+(A<<2)>>2]=m;m=m+1|0}while((m|0)!=(B|0))}f=c[H>>2]|0;u=f+48|0;g=c[u>>2]|0;if((g|0)>0){v=f+44|0;w=f+1660|0;t=f+1656|0;x=f+1676|0;s=f+1668|0;e=0;h=0;f=c[v>>2]|0;do if((f|0)>0){p=c[w>>2]|0;r=h+1|0;q=p+(r<<2)|0;p=p+(h<<2)|0;o=0;g=c[q>>2]|0;do{i=c[p>>2]|0;h=o;o=o+1|0;if(i>>>0>>0){m=c[t>>2]|0;n=m+(o<<2)|0;m=m+(h<<2)|0;f=c[n>>2]|0;do{h=c[m>>2]|0;if(h>>>0>>0){j=c[x>>2]|0;k=c[s>>2]|0;g=h;do{c[j+(c[k+((R(c[F>>2]|0,i)|0)+g<<2)>>2]<<2)>>2]=e;g=g+1|0;f=c[n>>2]|0}while(g>>>0>>0);g=c[q>>2]|0}i=i+1|0}while(i>>>0>>0);f=c[v>>2]|0}e=e+1|0}while((o|0)<(f|0));h=r;g=c[u>>2]|0}else h=h+1|0;while((h|0)<(g|0));f=c[H>>2]|0}else e=0;m=he(e,4)|0;c[f+1680>>2]=m;if(!m){d=-12;break}n=f+48|0;e=c[n>>2]|0;if((e|0)>0){k=f+44|0;o=f+1660|0;p=f+1656|0;j=0;g=c[k>>2]|0;do{if((g|0)>0){h=(c[o>>2]|0)+(j<<2)|0;i=c[p>>2]|0;e=0;do{B=R(c[F>>2]|0,c[h>>2]|0)|0;c[m+((R(g,j)|0)+e<<2)>>2]=(c[i+(e<<2)>>2]|0)+B;e=e+1|0;g=c[k>>2]|0}while((e|0)<(g|0));e=c[n>>2]|0}j=j+1|0}while((j|0)<(e|0))}r=(c[E>>2]|0)-(c[G+13072>>2]|0)|0;g=c[f+1688>>2]|0;e=c[D>>2]|0;c[f+1684>>2]=g+(e+3<<2);do if((e|0)>-2){f=0;e=e+2|0;do{c[g+((R(e,f)|0)<<2)>>2]=-1;c[g+(f<<2)>>2]=-1;f=f+1|0;h=c[D>>2]|0;e=h+2|0}while((f|0)<(e|0));if((h|0)<0)break;q=c[H>>2]|0;n=q+1668|0;o=r<<1;p=(r|0)>0;q=q+1684|0;m=0;e=h;while(1){if((e|0)>=0){i=m>>r;j=c[n>>2]|0;k=c[q>>2]|0;h=0;while(1){f=c[j+((R(c[F>>2]|0,i)|0)+(h>>r)<<2)>>2]<>2]=f;e=c[D>>2]|0;if((h|0)<(e|0))h=h+1|0;else break}}if((m|0)<(e|0))m=m+1|0;else break}}while(0);if((hd(K)|0)<0)break;d=b+400+(J<<2)|0;pe(d);c[d>>2]=I;d=0;break a}else d=-12}else d=-1094995529}else d=-1094995529}else d=-1094995529;while(0);pe(L)}while(0);l=M;return d|0}function kd(a,b){a=a|0;b=b|0;var d=0;a=l;l=l+16|0;d=a;c[d>>2]=b;be(b+1648|0);be(b+1652|0);be(b+1656|0);be(b+1660|0);be(b+1664|0);be(b+1668|0);be(b+1672|0);be(b+1680|0);be(b+1676|0);be(b+1688|0);be(d);l=a;return}function ld(a){a=a|0;return Xd(a)|0}function md(b){b=b|0;var c=0,d=0,e=0;c=0;do{d=b+(c<<6)|0;e=d+16|0;do{a[d>>0]=16;d=d+1|0}while((d|0)<(e|0));a[b+1536+c>>0]=16;a[b+1542+c>>0]=16;c=c+1|0}while((c|0)!=6);d=b+384|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+448|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+512|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+576|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+640|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+704|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+768|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+832|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+896|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+960|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1024|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1088|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1152|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1216|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1280|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1344|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1408|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1472|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));return}function nd(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;o=(c[b+136>>2]|0)+204|0;l=0;a:while(1){p=(l|0)>0?64:16;q=(l|0)>1;r=l+-2|0;m=(l|0)==3?3:1;j=1<<(l<<1)+4;j=(j|0)<64?j:64;n=(l|0)==0;k=0;do{if(!(((Sd(o)|0)&255)<<24>>24)){b=Ud(o)|0;if(b|0){if(k>>>0>>0){b=-1094995529;break a}b=k-b|0;Pf(e+(l*384|0)+(k<<6)|0,e+(l*384|0)+(b<<6)|0,p|0)|0;if(q)a[e+1536+(r*6|0)+k>>0]=a[e+1536+(r*6|0)+b>>0]|0}}else{if(q){g=(ld(o)|0)+8|0;a[e+1536+(r*6|0)+k>>0]=g;b=0}else{b=0;g=8}do{if(n){h=(d[342+b>>0]|0)<<2;i=326+b|0}else{h=(d[422+b>>0]|0)<<3;i=358+b|0}i=(d[i>>0]|0)+h|0;g=(g+256+(ld(o)|0)|0)%256|0;a[e+(l*384|0)+(k<<6)+i>>0]=g;b=b+1|0}while((b|0)<(j|0))}k=k+m|0}while((k|0)<6);l=l+1|0;if((l|0)>=4){s=16;break}}if((s|0)==16)if((c[f+4>>2]|0)==3){b=0;do{a[e+1216+b>>0]=a[e+832+b>>0]|0;a[e+1280+b>>0]=a[e+896+b>>0]|0;a[e+1408+b>>0]=a[e+1024+b>>0]|0;a[e+1472+b>>0]=a[e+1088+b>>0]|0;b=b+1|0}while((b|0)!=64);a[e+1543>>0]=a[e+1537>>0]|0;a[e+1544>>0]=a[e+1538>>0]|0;a[e+1546>>0]=a[e+1540>>0]|0;a[e+1547>>0]=a[e+1541>>0]|0;b=0}else b=0;return b|0}function od(b,e){b=b|0;e=e|0;var f=0,g=0,h=0;g=(c[b+136>>2]|0)+204|0;if(a[e+21>>0]|0)a[e+1629>>0]=(Ud(g)|0)+2;a[e+1630>>0]=Sd(g)|0;f=(Sd(g)|0)&255;a[e+1631>>0]=f;if(f<<24>>24){a[e+1632>>0]=Ud(g)|0;b=Ud(g)|0;f=e+1633|0;a[f>>0]=b;if((b&255)>>>0<5){b=0;while(1){a[e+1634+b>>0]=Xd(g)|0;a[e+1639+b>>0]=Xd(g)|0;if((b|0)<(d[f>>0]|0))b=b+1|0;else{h=6;break}}}}else h=6;if((h|0)==6){a[e+1644>>0]=Ud(g)|0;a[e+1645>>0]=Ud(g)|0}return}function pd(a){a=a|0;var b=0;b=a+136|0;do qd(a);while((rd((c[b>>2]|0)+204|0)|0)!=0);return 1}function qd(a){a=a|0;var d=0,e=0,f=0,g=0;f=(c[a+136>>2]|0)+204|0;e=0;do{d=Pd(f,8)|0;e=d+e|0}while((d|0)==255);d=0;do{g=Pd(f,8)|0;d=g+d|0}while((g|0)==255);a:do if((c[a+2512>>2]|0)!=39)if((e|0)==132){ud(a);break}else{Rd(f,d<<3);break}else switch(e|0){case 256:{ud(a);break a}case 257:{b[a+4524>>1]=Pd(f,16)|0;break a}default:{Rd(f,d<<3);break a}}while(0);return}function rd(a){a=a|0;if((sd(a)|0)>0)a=(Qd(a,8)|0)!=128;else a=0;return a&1|0}function sd(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(td(a)|0)|0}function td(a){a=a|0;return c[a+8>>2]|0}function ud(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;f=(c[b+136>>2]|0)+204|0;h=(Pd(f,8)|0)&255;g=b+4468|0;e=0;do{switch(h<<24>>24){case 0:{a[g>>0]=1;d=0;do{a[b+4420+(e<<4)+d>>0]=Pd(f,8)|0;d=d+1|0}while((d|0)!=16);break}case 1:{Rd(f,16);break}case 2:{Rd(f,32);break}default:{}}e=e+1|0}while((e|0)!=3);return}function vd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;d=c[b+52>>2]|0;f=a+60|0;if((d|0)>0)if((c[f>>2]|0)==0?(d=ee(d)|0,c[f>>2]=d,(d|0)==0):0)d=-12;else e=5;else{c[f>>2]=0;e=5}if((e|0)==5){e=a+12|0;c[e>>2]=b;c[a+424>>2]=0;c[a+800>>2]=1;d=a+912|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[d+12>>2]=0;d=a+936|0;c[d>>2]=0;c[d+4>>2]=-2147483648;d=a+928|0;c[d>>2]=0;c[d+4>>2]=-2147483648;d=xa[c[b+76>>2]&3](a)|0;if((d|0)<0){be(f);c[e>>2]=0}else d=0}return d|0}function wd(a){a=a|0;var b=0,d=0,e=0;if(a|0){b=a+12|0;d=c[b>>2]|0;if(d|0?(e=c[d+92>>2]|0,e|0):0)xa[e&3](a)|0;c[a+796>>2]=0;be(a+60|0);c[b>>2]=0;c[a+808>>2]=0}return 0}function xd(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;if((f|0)>0){j=(e|0)==0;h=0;do{i=d+(R(h,g)|0)|0;i=Ba[b&1](a,i)|0;if(!j)c[e+(h<<2)>>2]=i;h=h+1|0}while((h|0)!=(f|0))}return 0}function yd(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((f|0)>0){h=(e|0)==0;g=0;do{i=za[b&1](a,d,g,0)|0;if(!h)c[e+(g<<2)>>2]=i;g=g+1|0}while((g|0)!=(f|0))}return 0}function zd(b,f,g){b=b|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=Ae(c[f+76>>2]|0)|0;m=l+4|0;a:do if(!(a[m>>0]|0))b=0;else{n=f+64|0;i=l+5|0;j=f+68|0;k=l+6|0;h=0;while(1){b=(R((((e[l+8+(h<<1)>>1]|0)>>>11&15)+8&65535)>>>3,c[n>>2]|0)|0)+31&-32;if((h+-1|0)>>>0<2){b=0-(0-b>>d[i>>0])|0;c[f+32+(h<<2)>>2]=b;g=0-(0-((c[j>>2]|0)+31&-32)>>d[k>>0])|0}else{c[f+32+(h<<2)>>2]=b;g=(c[j>>2]|0)+31&-32}b=le((R(b,g)|0)+32|0)|0;c[f+304+(h<<2)>>2]=b;if(!b){b=-1;break a}c[f+(h<<2)>>2]=c[b+4>>2];h=h+1|0;if((h|0)>=(d[m>>0]|0)){b=0;break}}}while(0);return b|0}function Ad(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;Kf(a|0,0,976)|0;e=(b|0)!=0;if(e){d=c[b+8>>2]|0;c[a+48>>2]=c[b+12>>2]}else d=-1;c[a+8>>2]=d;c[a+100>>2]=0;c[a+104>>2]=1;c[a+888>>2]=0;c[a+892>>2]=1;c[a+896>>2]=0;c[a+900>>2]=1;c[a+476>>2]=1;c[a+816>>2]=1;c[a+820>>2]=1;c[a+220>>2]=0;c[a+224>>2]=1;c[a+136>>2]=-1;c[a+416>>2]=-1;d=a+696|0;c[d>>2]=0;c[d+4>>2]=-2147483648;if((e?(f=c[b+52>>2]|0,(f|0)!=0):0)?(f=ee(f)|0,c[a+60>>2]=f,(f|0)==0):0)d=-12;else d=0;return d|0}function Bd(a){a=a|0;var b=0;b=Yd(976)|0;if(b){if((Ad(b,a)|0)<0){ae(b);b=0}}else b=0;return b|0}function Cd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+80|0;i=j;f=i;g=e;h=f+80|0;do{c[f>>2]=c[g>>2];f=f+4|0;g=g+4|0}while((f|0)<(h|0));h=a+12|0;g=c[h>>2]|0;do if((g|0)!=0?(c[g+8>>2]|0)==0:0){c[d>>2]=0;f=c[a+124>>2]|0;g=c[a+128>>2]|0;if(g|f|0?Dd(f,g,0,0)|0:0){f=-22;break}xe(b);f=c[h>>2]|0;if(((c[f+16>>2]&32|0)==0?(c[e+28>>2]|0)==0:0)?(c[a+808>>2]&1|0)==0:0){f=0;break}f=za[c[f+88>>2]&1](a,b,d,i)|0;if(!(c[d>>2]|0)){xe(b);break}else{d=a+424|0;c[d>>2]=(c[d>>2]|0)+1;break}}else f=-22;while(0);l=j;return f|0}function Dd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((a|0)>0&(b|0)>0?(a+128|0)>>>0<(268435455/((b+128|0)>>>0)|0)>>>0:0)a=0;else a=-22;return a|0}function Ed(a,b){a=a|0;b=b|0;return 0}function Fd(a,b,c){a=a|0;b=b|0;c=c|0;return Gd(a,b,c)|0}function Gd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;k=a+8|0;if(!(c[k>>2]|0)){g=c[a+116>>2]|0;h=c[a+120>>2]|0;if((Dd(g,h,0,0)|0)>=0?(j=c[a+136>>2]|0,(j|0)>=0):0){f=b+64|0;e=b+68|0;if((c[f>>2]|0)>=1?(c[e>>2]|0)>=1:0)e=1;else{i=c[a+792>>2]|0;l=0-(0-(c[a+124>>2]|0)>>i)|0;c[f>>2]=(g|0)>(l|0)?g:l;i=0-(0-(c[a+128>>2]|0)>>i)|0;c[e>>2]=(h|0)>(i|0)?h:i;e=0}c[b+76>>2]=j;f=e;i=8}else e=-22}else{f=1;i=8}if((i|0)==8){e=qa[c[a+476>>2]&1](a,b,d)|0;if(!(c[k>>2]|f)){c[b+64>>2]=c[a+116>>2];c[b+68>>2]=c[a+120>>2]}}return e|0}function Hd(a,b,d){a=a|0;b=b|0;d=d|0;c[b+4>>2]=a;return Fd(a,c[b>>2]|0,d)|0}function Id(a,b){a=a|0;b=b|0;a=c[b>>2]|0;if(a|0)xe(a);return}function Jd(a){a=a|0;return}function Kd(a,b,c){a=a|0;b=b|0;c=c|0;return}function Ld(a){a=a|0;var b=0;b=a+8|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+16|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+64|0;c[b>>2]=-1;c[b+4>>2]=-1;b=a+72|0;c[b>>2]=0;c[b+4>>2]=0;b=a+32|0;c[a>>2]=0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;return}function Md(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0;g=a+16|0;c[a+12>>2]=b;c[a+20>>2]=b+e;h=b+1|0;c[g>>2]=h;e=(d[b>>0]|0)<<18;c[a>>2]=e;f=b+2|0;c[g>>2]=f;e=(d[h>>0]|0)<<10|e;c[a>>2]=e;c[g>>2]=b+3;c[a>>2]=(d[f>>0]|0)<<2|e|2;c[a+4>>2]=510;return}function Nd(){if(!(c[650]|0)){Od();c[650]=1}return}function Od(){var b=0,c=0,e=0,f=0,g=0;b=0;while(1)if(b){f=(b&65280|0)==0;a[4741+b>>0]=(f?8:0)-(d[2334+(f?b:b>>>8)>>0]|0);b=b+1|0;if((b|0)==512){f=0;break}else continue}else{a[4741+b>>0]=9;b=1;continue}do{c=f<<1;b=0;do{g=a[1887+(f<<2)+b>>0]|0;e=(b<<7)+c|0;a[5253+(e|1)>>0]=g;a[5253+e>>0]=g;b=b+1|0}while((b|0)!=4);e=(d[2143+f>>0]|0)<<1;a[5765+(c+128)>>0]=e;a[5765+(c+129)>>0]=e|1;e=128-c|0;if(!f){b=0;c=1}else{c=(d[2207+f>>0]|0)<<1;b=(c|1)&255;c=c&255}a[5765+(e+-1)>>0]=c;a[5765+(e+-2)>>0]=b;f=f+1|0}while((f|0)!=64);b=6021;c=2271;e=b+63|0;do{a[b>>0]=a[c>>0]|0;b=b+1|0;c=c+1|0}while((b|0)<(e|0));return}function Pd(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;e=a+8|0;g=c[e>>2]|0;f=c[a+16>>2]|0;a=(c[a>>2]|0)+(g>>>3)|0;a=(Mf(d[a>>0]|d[a+1>>0]<<8|d[a+2>>0]<<16|d[a+3>>0]<<24|0)|0)<<(g&7)>>>(32-b|0);b=g+b|0;c[e>>2]=f>>>0>b>>>0?b:f;return a|0}function Qd(a,b){a=a|0;b=b|0;var e=0;e=c[a+8>>2]|0;a=(c[a>>2]|0)+(e>>>3)|0;return (Mf(d[a>>0]|d[a+1>>0]<<8|d[a+2>>0]<<16|d[a+3>>0]<<24|0)|0)<<(e&7)>>>(32-b|0)|0}function Rd(a,b){a=a|0;b=b|0;var d=0;d=a+8|0;a=c[a+16>>2]|0;b=(c[d>>2]|0)+b|0;c[d>>2]=a>>>0>b>>>0?b:a;return}function Sd(a){a=a|0;var b=0,e=0,f=0;e=a+8|0;f=c[e>>2]|0;b=(d[(c[a>>2]|0)+(f>>>3)>>0]|0)<<(f&7)>>>7&1;c[e>>2]=((f|0)<(c[a+16>>2]|0)&1)+f;return b|0}function Td(a,b){a=a|0;b=b|0;var c=0;do if(b)if((b|0)<26){a=Pd(a,b)|0;break}else{b=b+-16|0;c=(Pd(a,16)|0)<>>0>65535;e=b?e>>>16:e;b=b?16:0;c=(e&65280|0)==0;b=31-(d[2334+(c?e:e>>>8)>>0]|0)-(c?b:b|8)|0;Wd(a,b);return (Td(a,b+1|0)|0)+-1|0}function Vd(a){a=a|0;var b=0,d=0;b=l;l=l+32|0;d=b;c[d>>2]=c[a>>2];c[d+4>>2]=c[a+4>>2];c[d+8>>2]=c[a+8>>2];c[d+12>>2]=c[a+12>>2];c[d+16>>2]=c[a+16>>2];a=Td(d,32)|0;l=b;return a|0}function Wd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=a+8|0;e=c[d>>2]|0;f=0-e|0;a=(c[a+16>>2]|0)-e|0;c[d>>2]=((b|0)<(f|0)?f:(a|0)<(b|0)?a:b)+e;return}function Xd(a){a=a|0;a=Ud(a)|0;return ((a&1|0)==0?0-(a>>>1)|0:(a+1|0)>>>1)|0}function Yd(a){a=a|0;var b=0,d=0;d=(c[44]|0)+-32|0;b=a;while(1){if(d>>>0>>0){a=0;break}a=qf(b)|0;if((b|0)!=0|(a|0)!=0)break;else b=1}return a|0}function Zd(a,b){a=a|0;b=b|0;if(((c[44]|0)+-32|0)>>>0>>0)a=0;else a=yf(a,((b|0)==0&1)+b|0)|0;return a|0}function _d(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;f=g;if(!(($d(d,b,f)|0)==0?(f=c[f>>2]|0,e=Zd(a,f)|0,!((f|0)!=0&(e|0)==0)):0)){ae(a);e=0}l=g;return e|0}function $d(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=R(b,a)|0;if((a|0)!=0&(b|a)>>>0>65535?((e>>>0)/(a>>>0)|0|0)!=(b|0):0)a=-22;else{c[d>>2]=e;a=0}return a|0}function ae(a){a=a|0;wf(a);return}function be(a){a=a|0;ae(c[a>>2]|0);c[a>>2]=0;return}function ce(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)!=0?(2147483647/(c>>>0)|0)>>>0>b>>>0:0)a=Zd(a,R(c,b)|0)|0;else a=0;return a|0}function de(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=_d(c[a>>2]|0,b,d)|0;c[a>>2]=e;return ((d|0)!=0&((b|0)!=0&(e|0)==0)?-12:0)|0}function ee(a){a=a|0;var b=0;b=Yd(a)|0;if(b|0)Kf(b|0,0,a|0)|0;return b|0}function fe(a,b,c){a=a|0;b=b|0;c=c|0;ge(a,b,c);return}function ge(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;if((c[b>>2]|0)>>>0<=d>>>0){e=((d*17|0)>>>4)+32|0;d=e>>>0>d>>>0?e:d;ae(c[a>>2]|0);e=Yd(d)|0;c[a>>2]=e;c[b>>2]=(e|0)==0?0:d}return}function he(a,b){a=a|0;b=b|0;if((b|0)!=0?(2147483647/(b>>>0)|0)>>>0>a>>>0:0)a=Yd(R(b,a)|0)|0;else a=0;return a|0}function ie(a,b){a=a|0;b=b|0;if((b|0)!=0?(2147483647/(b>>>0)|0)>>>0>a>>>0:0)a=ee(R(b,a)|0)|0;else a=0;return a|0}function je(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;j=l;l=l+16|0;h=j;g=ee(24)|0;c[h>>2]=g;i=g;do if(g){c[g>>2]=a;c[g+4>>2]=b;c[g+12>>2]=d|0?d:7;c[g+16>>2]=e;c[g+8>>2]=1;if(f&1|0){g=g+20|0;c[g>>2]=c[g>>2]|1}d=ee(12)|0;if(!d){be(h);d=0;break}else{c[d>>2]=i;c[d+4>>2]=a;c[d+8>>2]=b;break}}else d=0;while(0);l=j;return d|0}function ke(a,b){a=a|0;b=b|0;ae(b);return}function le(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;d=e;b=Yd(a)|0;c[d>>2]=b;if(b){a=je(b,a,7,0,0)|0;if(!a){be(d);a=0}}else a=0;l=e;return a|0}function me(a){a=a|0;var b=0;b=le(a)|0;if(!b)b=0;else Kf(c[b+4>>2]|0,0,a|0)|0;return b|0}function ne(a){a=a|0;var b=0;b=ee(12)|0;if(!b)b=0;else{c[b>>2]=c[a>>2];c[b+4>>2]=c[a+4>>2];c[b+8>>2]=c[a+8>>2];oe((c[a>>2]|0)+8|0,1)|0}return b|0}function oe(a,b){a=a|0;b=b|0;var d=0;d=c[a>>2]|0;c[a>>2]=d+b;return d+b|0}function pe(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;d=f;if((a|0?(e=c[a>>2]|0,e|0):0)?(b=c[e>>2]|0,c[d>>2]=b,be(a),b,(oe(b+8|0,-1)|0)==0):0){va[c[b+12>>2]&7](c[b+16>>2]|0,c[b>>2]|0);be(d)}l=f;return}function qe(a,b,d){a=a|0;b=b|0;d=d|0;a=a+360|0;c[a>>2]=b;c[a+4>>2]=d;return}function re(a,b,d){a=a|0;b=b|0;d=d|0;a=a+376|0;c[a>>2]=b;c[a+4>>2]=d;return}function se(a,b,d){a=a|0;b=b|0;d=d|0;a=a+368|0;c[a>>2]=b;c[a+4>>2]=d;return}function te(a,b){a=a|0;b=b|0;c[a+392>>2]=b;return}function ue(){var a=0;a=ee(400)|0;if(!a)a=0;else ve(a);return a|0}function ve(a){a=a|0;var b=0;Kf(a|0,0,400)|0;b=a+136|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+144|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+128|0;c[b>>2]=0;c[b+4>>2]=-2147483648;qe(a,0,-2147483648);re(a,0,0);se(a,-1,-1);te(a,-1);c[a+80>>2]=1;c[a+120>>2]=0;c[a+124>>2]=1;c[a+76>>2]=-1;c[a+344>>2]=2;c[a+348>>2]=2;c[a+352>>2]=2;c[a+340>>2]=0;c[a+356>>2]=0;return}function we(a){a=a|0;var b=0;if(a|0?(b=c[a>>2]|0,b|0):0){xe(b);be(a)}return}function xe(a){a=a|0;var b=0;b=0;do{pe(a+304+(b<<2)|0);b=b+1|0}while((b|0)!=8);ve(a);return}function ye(a,b){a=a|0;b=b|0;Pf(a|0,b|0,400)|0;Kf(b|0,0,400)|0;ve(b);return}function ze(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;c[a+76>>2]=c[b+76>>2];c[a+64>>2]=c[b+64>>2];c[a+68>>2]=c[b+68>>2];c[a+388>>2]=c[b+388>>2];h=b+296|0;g=c[h+4>>2]|0;d=a+296|0;c[d>>2]=c[h>>2];c[d+4>>2]=g;c[a+72>>2]=c[b+72>>2];d=c[b+304>>2]|0;if(!d)oa();else{f=0;e=d}while(1){if(e|0?(h=ne(e)|0,c[a+304+(f<<2)>>2]=h,(h|0)==0):0){e=5;break}d=f+1|0;if(d>>>0>=8){e=8;break}f=d;e=c[b+304+(d<<2)>>2]|0}if((e|0)==5){xe(a);d=-12}else if((e|0)==8){c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];c[a+16>>2]=c[b+16>>2];c[a+20>>2]=c[b+20>>2];c[a+24>>2]=c[b+24>>2];c[a+28>>2]=c[b+28>>2];d=a+32|0;h=b+32|0;c[d>>2]=c[h>>2];c[d+4>>2]=c[h+4>>2];c[d+8>>2]=c[h+8>>2];c[d+12>>2]=c[h+12>>2];c[d+16>>2]=c[h+16>>2];c[d+20>>2]=c[h+20>>2];c[d+24>>2]=c[h+24>>2];c[d+28>>2]=c[h+28>>2];d=0}return d|0}function Ae(a){a=a|0;var b=0,d=0;b=0;while(1){if((c[180+(b*24|0)>>2]|0)==(a|0)){d=3;break}b=b+1|0;if(b>>>0>=4){b=0;break}}if((d|0)==3)b=180+(b*24|0)+4|0;return b|0}function Be(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=(c[b+24>>2]|0)==0?1:3;do if((f|0)<=(e|0))if((f|0)==(e|0)&(a[b+29>>0]|0)!=0){f=c[b+12>>2]|0;c[d>>2]=c[f+32>>2];f=c[f>>2]|0;break}else{c[d>>2]=0;f=0;break}else{f=c[b+8>>2]|0;c[d>>2]=c[f+32+(e<<2)>>2];f=c[f+(e<<2)>>2]|0}while(0);return f|0}function Ce(d,e){d=d|0;e=e|0;var f=0;if(!(c[d+8>>2]|0))d=-1;else{c[e>>2]=c[d+16>>2];c[e+4>>2]=c[d+20>>2];a[e+8>>0]=c[d+24>>2];f=a[d+31>>0]|0;a[e+9>>0]=(a[d+29>>0]|0)!=0&f<<24>>24==0&1;a[e+12>>0]=a[d+33>>0]|0;a[e+13>>0]=f;a[e+14>>0]=a[d+32>>0]|0;a[e+10>>0]=c[d+36>>2];a[e+11>>0]=a[d+30>>0]|0;a[e+15>>0]=a[d+34>>0]|0;b[e+16>>1]=b[d+48>>1]|0;d=0}return d|0}function De(b,d){b=b|0;d=d|0;var e=0,f=0;if((c[b+8>>2]|0)!=0?(f=b+68|0,(a[f>>0]|0)==0):0){e=Ee(b,d)|0;if(!e){a[f>>0]=1;c[b+72>>2]=d;c[b+92>>2]=Be(b,b+108|0,0)|0;if(!(c[b+24>>2]|0))e=1;else{c[b+96>>2]=Be(b,b+112|0,1)|0;c[b+100>>2]=Be(b,b+116|0,2)|0;e=3}if(!(a[b+29>>0]|0))e=0;else e=Be(b,b+120|0,e)|0;c[b+104>>2]=e;c[b+80>>2]=0;e=0}}else e=-1;return e|0}function Ee(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;if(e>>>0>1)e=-1;else{a[b+76>>0]=(e|0)==1&1;g=b+77|0;a[g>>0]=0;a[b+78>>0]=0;h=b+24|0;if(((c[h>>2]|0)+-1|0)>>>0<2?(e=b+16|0,i=c[e>>2]|0,f=b+84|0,c[f>>2]=(i+1|0)/2|0,c[b+88>>2]=((c[b+20>>2]|0)+1|0)/2|0,c[b+124>>2]=Yd(i<<1)|0,c[b+128>>2]=Yd(c[e>>2]<<1)|0,c[b+196>>2]=Yd((c[f>>2]<<1)+14|0)|0,(c[h>>2]|0)==1):0){e=0;do{c[b+132+(e<<2)>>2]=Yd(c[f>>2]<<1)|0;c[b+164+(e<<2)>>2]=Yd(c[f>>2]<<1)|0;e=e+1|0}while((e|0)!=8)}e=b+36|0;Fe(b+200|0,d[b+30>>0]|0,a[g>>0]|0?16:8,c[e>>2]|0,d[b+32>>0]|0);if(!(c[h>>2]|0))e=7;else e=c[276+(c[e>>2]<<2)>>2]|0;c[b+248>>2]=e;e=0}return e|0}function Fe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0;n=30-d|0;g=+((1<>2]=Df(i*(q*2.0))|0;o=1.0-g;p=o-h;c[a+24>>2]=Df(i*(g*2.0*o/p))|0;c[a+28>>2]=Df(i*(h*2.0*q/p))|0;c[a+32>>2]=Df(i*(o*2.0))|0}d=Df(j)|0;c[a+8>>2]=d;c[a>>2]=n;e=1<>2]=e;c[a+36>>2]=1<>2]=d;c[a+16>>2]=e;c[a+40>>2]=b;c[a+44>>2]=f;return}function Ge(d,f,g,h,i,j,k){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0;if((c[d+40>>2]|0)==8?(c[d+44>>2]|0)==0:0){if((j|0)>0){h=0;i=f;while(1){p=b[g+(h<<1)>>1]&255;a[i>>0]=p;a[i+1>>0]=p;a[i+2>>0]=p;h=h+1|0;if((h|0)==(j|0))break;else i=i+k|0}}}else l=5;if((l|0)==5?(m=c[d+12>>2]|0,n=c[d+16>>2]|0,o=c[d>>2]|0,(j|0)>0):0){h=0;while(1){p=(He((R(e[g+(h<<1)>>1]|0,m)|0)+n>>o)|0)&255;a[f>>0]=p;a[f+1>>0]=p;a[f+2>>0]=p;h=h+1|0;if((h|0)==(j|0))break;else f=f+k|0}}return}function He(a){a=a|0;return ((a|0)<0?0:(a|0)<255?a:255)|0}function Ie(b,d,f,g,h,i,j){b=b|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;s=c[b+20>>2]|0;m=c[b+24>>2]|0;n=c[b+28>>2]|0;o=c[b+32>>2]|0;p=c[b+12>>2]|0;q=c[b+16>>2]|0;r=c[b>>2]|0;l=c[b+36>>2]|0;if((i|0)>0){k=0;b=d;while(1){t=R(e[f+(k<<1)>>1]|0,p)|0;d=(e[g+(k<<1)>>1]|0)-l|0;u=(e[h+(k<<1)>>1]|0)-l|0;t=t+q|0;a[b>>0]=He(t+(R(u,s)|0)>>r)|0;a[b+1>>0]=He(t-((R(u,n)|0)+(R(d,m)|0))>>r)|0;a[b+2>>0]=He(t+(R(d,o)|0)>>r)|0;k=k+1|0;if((k|0)==(i|0))break;else b=b+j|0}}return}function Je(d,f,g,h,i,j,k){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0;if((c[d+40>>2]|0)==8?(c[d+44>>2]|0)==0:0){if((j|0)>0){l=0;m=f;while(1){a[m>>0]=b[i+(l<<1)>>1];a[m+1>>0]=b[g+(l<<1)>>1];a[m+2>>0]=b[h+(l<<1)>>1];l=l+1|0;if((l|0)==(j|0))break;else m=m+k|0}}}else n=5;if((n|0)==5?(o=c[d+12>>2]|0,p=c[d+16>>2]|0,q=c[d>>2]|0,(j|0)>0):0){l=0;while(1){a[f>>0]=He((R(e[i+(l<<1)>>1]|0,o)|0)+p>>q)|0;a[f+1>>0]=He((R(e[g+(l<<1)>>1]|0,o)|0)+p>>q)|0;a[f+2>>0]=He((R(e[h+(l<<1)>>1]|0,o)|0)+p>>q)|0;l=l+1|0;if((l|0)==(j|0))break;else f=f+k|0}}return}function Ke(b,d,f,g,h,i,j){b=b|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;o=c[b+12>>2]|0;m=c[b+16>>2]|0;n=c[b>>2]|0;l=c[b+36>>2]|0;if((i|0)>0){k=0;b=d;while(1){q=e[f+(k<<1)>>1]|0;r=(e[g+(k<<1)>>1]|0)-l|0;d=(e[h+(k<<1)>>1]|0)-l|0;p=q-r|0;a[b>>0]=He((R(p+d|0,o)|0)+m>>n)|0;a[b+1>>0]=He((R(r+q|0,o)|0)+m>>n)|0;a[b+2>>0]=He((R(p-d|0,o)|0)+m>>n)|0;k=k+1|0;if((k|0)==(i|0))break;else b=b+j|0}}return}function Le(a,b,d){a=a|0;b=b|0;d=d|0;c[b>>2]=0;c[d>>2]=1;return}function Me(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;p=b+80|0;r=c[p>>2]|0;a:do if(r>>>0<(c[b+20>>2]|0)>>>0){s=c[b+16>>2]|0;n=(c[b+92>>2]|0)+(R(c[b+108>>2]|0,r)|0)|0;o=b+76|0;if(!(a[o>>0]|0))q=a[b+78>>0]|0?4:3;else q=4;switch(c[b+24>>2]|0){case 0:{sa[c[b+248>>2]&7](b+200|0,e,n,0,0,s,q);break}case 1:{if(!r){h=b+96|0;i=b+112|0;j=b+100|0;k=b+116|0;l=b+84|0;m=b+88|0;g=0;do{f=(g|0)>4?g+-8|0:g;if((f|0)<0)f=0;else{t=c[m>>2]|0;f=(f|0)<(t|0)?f:t+-1|0}u=(c[h>>2]|0)+(R(c[i>>2]|0,f)|0)|0;t=(c[j>>2]|0)+(R(c[k>>2]|0,f)|0)|0;Pf(c[b+132+(g<<2)>>2]|0,u|0,c[l>>2]<<1|0)|0;Pf(c[b+164+(g<<2)>>2]|0,t|0,c[l>>2]<<1|0)|0;g=g+1|0}while((g|0)!=8)}f=r>>1;g=(f|0)%8|0;u=r&1;h=b+124|0;l=b+196|0;m=b+30|0;t=b+28|0;Ne(c[h>>2]|0,b+132|0,s,g,c[l>>2]|0,d[m>>0]|0,u,d[t>>0]|0);i=b+128|0;Ne(c[i>>2]|0,b+164|0,s,g,c[l>>2]|0,d[m>>0]|0,u,d[t>>0]|0);if(u|0){m=(g+5|0)%8|0;l=f+5|0;t=c[b+88>>2]|0;t=(l|0)<(t|0)?l:t+-1|0;l=(c[b+96>>2]|0)+(R(t,c[b+112>>2]|0)|0)|0;t=(c[b+100>>2]|0)+(R(c[b+116>>2]|0,t)|0)|0;u=b+84|0;Pf(c[b+132+(m<<2)>>2]|0,l|0,c[u>>2]<<1|0)|0;Pf(c[b+164+(m<<2)>>2]|0,t|0,c[u>>2]<<1|0)|0}sa[c[b+248>>2]&7](b+200|0,e,n,c[h>>2]|0,c[i>>2]|0,s,q);break}case 2:{u=(c[b+96>>2]|0)+(R(c[b+112>>2]|0,r)|0)|0;j=(c[b+100>>2]|0)+(R(c[b+116>>2]|0,r)|0)|0;t=b+124|0;k=b+30|0;l=b+28|0;m=b+196|0;Oe(c[t>>2]|0,u,s,d[k>>0]|0,d[l>>0]|0,c[m>>2]|0);u=b+128|0;Oe(c[u>>2]|0,j,s,d[k>>0]|0,d[l>>0]|0,c[m>>2]|0);sa[c[b+248>>2]&7](b+200|0,e,n,c[t>>2]|0,c[u>>2]|0,s,q);break}case 3:{t=(c[b+96>>2]|0)+(R(c[b+112>>2]|0,r)|0)|0;u=(c[b+100>>2]|0)+(R(c[b+116>>2]|0,r)|0)|0;sa[c[b+248>>2]&7](b+200|0,e,n,t,u,s,q);break}default:{f=-1;break a}}do if(!(a[b+31>>0]|0)){if(a[o>>0]|0){if(!(a[b+29>>0]|0)){Qe(e+3|0,s);break}Re(b+200|0,e+3|0,(c[b+104>>2]|0)+(R(c[b+120>>2]|0,r)|0)|0,s);if(a[b+33>>0]|0)Se(e,s)}}else{Pe(b+200|0,e,(c[b+104>>2]|0)+(R(c[b+120>>2]|0,r)|0)|0,s,q);if(a[o>>0]|0)Qe(e+3|0,s)}while(0);c[p>>2]=(c[p>>2]|0)+1;f=0}else f=-1;while(0);return f|0}function Ne(a,d,f,g,h,i,j,k){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;n=c[d+((g+5&7)<<2)>>2]|0;o=c[d+((g+6&7)<<2)>>2]|0;p=c[d+((g+7&7)<<2)>>2]|0;q=c[d+((g&7)<<2)>>2]|0;r=c[d+((g+1&7)<<2)>>2]|0;s=c[d+((g+2&7)<<2)>>2]|0;g=c[d+((g+3&7)<<2)>>2]|0;l=i+-8|0;m=1<>1;t=(f+1|0)/2|0;d=(f|0)>0;if(!j){if(d){d=0;do{u=R(e[o+(d<<1)>>1]|0,-6)|0;j=R(e[r+(d<<1)>>1]|0,-10)|0;b[h+(d+3<<1)>>1]=((e[n+(d<<1)>>1]|0)<<1)+m+u+((e[p+(d<<1)>>1]|0)*18|0)+((e[q+(d<<1)>>1]|0)*57|0)+j+((e[s+(d<<1)>>1]|0)<<2)-(e[g+(d<<1)>>1]|0)>>l;d=d+1|0}while((d|0)<(t|0))}}else if(d){d=0;do{j=R(e[p+(d<<1)>>1]|0,-10)|0;u=R(e[s+(d<<1)>>1]|0,-6)|0;b[h+(d+3<<1)>>1]=m-(e[n+(d<<1)>>1]|0)+((e[o+(d<<1)>>1]|0)<<2)+j+((e[q+(d<<1)>>1]|0)*57|0)+((e[r+(d<<1)>>1]|0)*18|0)+u+((e[g+(d<<1)>>1]|0)<<1)>>l;d=d+1|0}while((d|0)<(t|0))}m=h+6|0;g=b[m>>1]|0;d=0;do{b[h+(d<<1)>>1]=g;d=d+1|0}while((d|0)!=3);l=t+3|0;g=b[h+(t+2<<1)>>1]|0;d=0;do{b[h+(l+d<<1)>>1]=g;d=d+1|0}while((d|0)!=4);if(!k)Ye(a,m,f,i);else Ze(a,m,f,i);return}function Oe(a,c,d,e,f,g){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;j=(d+1|0)/2|0;k=g+6|0;Pf(k|0,c|0,j<<1|0)|0;i=b[c>>1]|0;h=0;do{b[g+(h<<1)>>1]=i;h=h+1|0}while((h|0)!=3);i=b[c+(j+-1<<1)>>1]|0;c=j+3|0;h=0;do{b[g+(c+h<<1)>>1]=i;h=h+1|0}while((h|0)!=4);if(!f)Ve(a,k,d,e);else We(a,k,d,e);return}function Pe(b,f,g,h,i){b=b|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0;k=c[b+40>>2]|0;l=1<0){j=0;b=f;while(1){m=e[g+(j<<1)>>1]|0;a[b>>0]=(R(d[b>>0]|0,m)|0)+l>>k;f=b+1|0;a[f>>0]=(R(d[f>>0]|0,m)|0)+l>>k;f=b+2|0;a[f>>0]=(R(d[f>>0]|0,m)|0)+l>>k;j=j+1|0;if((j|0)==(h|0))break;else b=b+i|0}}return}function Qe(b,c){b=b|0;c=c|0;var d=0;if((c|0)>0){d=0;while(1){a[b>>0]=-1;d=d+1|0;if((d|0)==(c|0))break;else b=b+4|0}}return}function Re(d,f,g,h){d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0;if((c[d+40>>2]|0)==8){if((h|0)>0){d=0;while(1){a[f>>0]=b[g+(d<<1)>>1];d=d+1|0;if((d|0)==(h|0))break;else f=f+4|0}}}else{j=c[d+8>>2]|0;k=c[d+4>>2]|0;i=c[d>>2]|0;if((h|0)>0){d=0;while(1){a[f>>0]=(R(e[g+(d<<1)>>1]|0,j)|0)+k>>i;d=d+1|0;if((d|0)==(h|0))break;else f=f+4|0}}}return}function Se(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if(!(c[651]|0)){c[651]=1;Te()}if((e|0)>0){h=0;while(1){g=a[b+3>>0]|0;f=g&255;if(!(g<<24>>24)){a[b>>0]=-1;a[b+1>>0]=-1;g=b+2|0;f=-1}else{i=c[2608+(f<<2)>>2]|0;a[b>>0]=Ue(d[b>>0]|0,f,i)|0;j=b+1|0;a[j>>0]=Ue(d[j>>0]|0,f,i)|0;j=b+2|0;g=j;f=(Ue(d[j>>0]|0,f,i)|0)&255}a[g>>0]=f;h=h+1|0;if((h|0)==(e|0))break;else b=b+4|0}}return}function Te(){var a=0;a=1;do{c[2608+(a<<2)>>2]=(((a|0)/2|0)+16711808|0)/(a|0)|0;a=a+1|0}while((a|0)!=256);return}function Ue(a,b,c){a=a|0;b=b|0;c=c|0;c=((R(c,a)|0)+32768|0)>>>16;return (a>>>0>>0?c:255)|0}function Ve(a,c,d,f){a=a|0;c=c|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;i=(1<1){l=d+-2|0;k=l>>>1;j=k+1|0;k=k<<1;h=k+2|0;g=c;f=a;while(1){b[f>>1]=b[g>>1]|0;n=R((e[g+4>>1]|0)+(e[g+-2>>1]|0)|0,-11)|0;m=g;g=g+2|0;b[f+2>>1]=Xe(32-(e[m+-6>>1]|0)-(e[m+8>>1]|0)+((e[m+6>>1]|0)+(e[m+-4>>1]|0)<<2)+n+(((e[g>>1]|0)+(e[m>>1]|0)|0)*40|0)>>6,i)|0;d=d+-2|0;if((d|0)<=1)break;else f=f+4|0}a=a+(h<<1)|0;f=c+(j<<1)|0;d=l-k|0}else f=c;if(d|0)b[a>>1]=b[f>>1]|0;return}function We(a,c,d,f){a=a|0;c=c|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=(1<>1]|0;g=e[c+-4>>1]|0;j=e[c+-2>>1]|0;h=e[c>>1]|0;f=e[c+2>>1]|0;i=e[c+4>>1]|0;if((d|0)>1){q=d+-2|0;p=q>>>1;r=p<<1;o=r+2|0;p=p+1|0;n=h;l=a;m=c;while(1){h=e[m+6>>1]|0;t=n*57|0;b[l>>1]=Xe((k<<1)+32+(R(g,-6)|0)+(j*18|0)+t+(R(f,-10)|0)+(i<<2)-h>>6,s)|0;b[l+2>>1]=Xe(32-k+(g<<2)+(R(j,-10)|0)+t+(f*18|0)+(R(i,-6)|0)+(h<<1)>>6,s)|0;d=d+-2|0;if((d|0)<=1)break;else{t=i;l=l+4|0;m=m+2|0;i=h;k=g;g=j;j=n;n=f;f=t}}m=h;h=f;l=n;a=a+(o<<1)|0;c=c+(p<<1)|0;f=q-r|0}else{m=i;i=f;l=j;j=g;g=k;f=d}if(f|0)b[a>>1]=Xe((g<<1)+32+(R(j,-6)|0)+(l*18|0)+(h*57|0)+(R(i,-10)|0)+(m<<2)-(e[c+6>>1]|0)>>6,s)|0;return}function Xe(a,b){a=a|0;b=b|0;return ((a|0)<0?0:(a|0)>(b|0)?b:a)|0}function Ye(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;m=(1<>1;i=20-e|0;g=1<1){k=d+-2|0;l=k>>>1;j=l+1|0;l=l<<1;h=l+2|0;f=c;e=a;while(1){b[e>>1]=Xe((b[f>>1]|0)+o>>n,m)|0;q=R((b[f+4>>1]|0)+(b[f+-2>>1]|0)|0,-11)|0;p=f;f=f+2|0;b[e+2>>1]=Xe(g-(b[p+-6>>1]|0)-(b[p+8>>1]|0)+((b[p+6>>1]|0)+(b[p+-4>>1]|0)<<2)+q+(((b[f>>1]|0)+(b[p>>1]|0)|0)*40|0)>>i,m)|0;d=d+-2|0;if((d|0)<=1)break;else e=e+4|0}a=a+(h<<1)|0;e=c+(j<<1)|0;d=k-l|0}else e=c;if(d|0)b[a>>1]=Xe((b[e>>1]|0)+o>>n,m)|0;return}function Ze(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;t=(1<>1]|0;f=b[c+-4>>1]|0;i=b[c+-2>>1]|0;g=b[c>>1]|0;e=b[c+2>>1]|0;h=b[c+4>>1]|0;if((d|0)>1){p=d+-2|0;o=p>>>1;q=o<<1;n=q+2|0;o=o+1|0;m=g;k=a;l=c;while(1){g=b[l+6>>1]|0;u=m*57|0;b[k>>1]=Xe((j<<1)+s+(R(f,-6)|0)+(i*18|0)+u+(R(e,-10)|0)+(h<<2)-g>>r,t)|0;b[k+2>>1]=Xe(s-j+(f<<2)+(R(i,-10)|0)+u+(e*18|0)+(R(h,-6)|0)+(g<<1)>>r,t)|0;d=d+-2|0;if((d|0)<=1)break;else{u=h;k=k+4|0;l=l+2|0;h=g;j=f;f=i;i=m;m=e;e=u}}l=g;g=e;k=m;a=a+(n<<1)|0;c=c+(o<<1)|0;e=p-q|0}else{l=h;h=e;k=i;i=f;f=j;e=d}if(e|0)b[a>>1]=Xe((f<<1)+s+(R(i,-6)|0)+(k*18|0)+(g*57|0)+(R(h,-10)|0)+(l<<2)-(b[c+6>>1]|0)>>r,t)|0;return}function _e(){return ee(252)|0}function $e(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+48|0;v=y;h=af(v,f,g,d[e+40>>0]|0)|0;do if((h|0)>=0){x=c[v>>2]|0;q=c[v+4>>2]|0;m=a[v+12>>0]|0;r=m&255;n=c[v+24>>2]|0;o=a[v+13>>0]|0;s=o&255;t=e+16|0;c[t>>2]=x;u=e+20|0;c[u>>2]=q;i=c[v+8>>2]|0;j=e+24|0;c[j>>2]=i;switch(i|0){case 5:{i=2;p=4;break}case 4:{i=1;p=4;break}default:{k=1;j=i}}if((p|0)==4){c[j>>2]=i;k=0;j=i}a[e+28>>0]=k;a[e+29>>0]=m;a[e+33>>0]=a[v+15>>0]|0;a[e+31>>0]=a[v+14>>0]|0;a[e+32>>0]=a[v+16>>0]|0;c[e+36>>2]=n;a[e+30>>0]=o;a[e+34>>0]=a[v+17>>0]|0;b[e+48>>1]=b[v+18>>1]|0;b[e+50>>1]=b[v+20>>1]|0;b[e+52>>1]=b[v+22>>1]|0;i=e+44|0;c[i>>2]=c[v+32>>2];if(((((c[v+28>>2]|0)+h|0)>>>0<=g>>>0?(bf(e,f+h|0,g-h|0,x,q,j,s,r)|0)>=0:0)?(cf(e),w=c[e+8>>2]|0,(c[w+64>>2]|0)>=(c[t>>2]|0)):0)?(c[w+68>>2]|0)>=(c[u>>2]|0):0){c[e+80>>2]=-1;h=0;break}we(e+8|0);we(e+12|0);c[i>>2]=0;h=-1}while(0);l=y;return h|0}function af(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=l;l=l+32|0;x=J+20|0;A=J+16|0;C=J+8|0;D=J+12|0;E=J+4|0;F=J;a:do if(((((((f|0)>=6?(a[e>>0]|0)==66:0)?(a[e+1>>0]|0)==80:0)?(a[e+2>>0]|0)==71:0)?(a[e+3>>0]|0)==-5:0)?(H=a[e+4>>0]|0,h=H&255,n=h>>>5,c[d+8>>2]=n,(H&255)<=191):0)?(H=(h&15)+8|0,a[d+13>>0]=H,H>>>0<=14):0){o=a[e+5>>0]|0;z=o&255;p=z>>>4;c[d+24>>2]=p;w=z&8;i=z>>>2&1;a[d+16>>0]=z>>>1&1;G=d+17|0;a[G>>0]=z&1;z=d+18|0;b[z>>1]=0;H=d+20|0;b[H>>1]=0;B=d+22|0;b[B>>1]=0;j=d+12|0;a[j>>0]=0;k=d+14|0;a[k>>0]=0;m=d+15|0;a[m>>0]=0;if(!(h&16))if(!i)h=0;else{a[j>>0]=1;a[k>>0]=1;h=1}else{a[j>>0]=1;a[m>>0]=i;h=0}if(((((((o&255)<=79?(p|0)==0&h<<24>>24==0|(n|0)!=0:0)?(q=mf(d,e+6|0,f+-6|0)|0,(q|0)>=0):0)?(r=q+6|0,s=d+4|0,t=mf(s,e+r|0,f-r|0)|0,(t|0)>=0):0)?(u=t+r|0,(c[d>>2]|0)!=0):0)?(c[s>>2]|0)!=0:0)?(I=d+28|0,v=mf(I,e+u|0,f-u|0)|0,(v|0)>=0):0){h=v+u|0;c[x>>2]=0;b:do if(!w){c[d+32>>2]=0;y=43}else{i=mf(x,e+h|0,f-h|0)|0;if((i|0)<0){h=-1;break a}h=i+h|0;i=d+32|0;c[i>>2]=0;r=(c[x>>2]|0)+h|0;if((r|0)>(f|0)){h=-1;break a}q=(g|0)!=0;if(!q?(a[G>>0]|0)==0:0){h=r;break}if((r|0)<=(h|0)){y=43;break}while(1){j=nf(A,e+h|0,r-h|0)|0;if((j|0)<0){h=-1;break a}h=j+h|0;j=mf(C,e+h|0,r-h|0)|0;if((j|0)<0){h=-1;break a}n=j+h|0;o=c[C>>2]|0;h=o+n|0;if(h>>>0>r>>>0){h=-1;break a}p=c[A>>2]|0;if((a[G>>0]|0)!=0&(p|0)==5){j=mf(D,e+n|0,r-n|0)|0;if((j|0)<0)break;j=j+n|0;k=mf(E,e+j|0,r-j|0)|0;if((k|0)<0)break;y=k+j|0;if((mf(F,e+y|0,r-y|0)|0)<0)break;j=c[E>>2]|0;k=c[F>>2]|0;if((j|0)==0|(k|0)==0)break;if((j&65535|0)!=(j|0))break;if((k&65535|0)!=(k|0))break;m=c[D>>2]|0;if((m&65535|0)!=(m|0))break;b[z>>1]=m;b[H>>1]=j;b[B>>1]=k}if(q){x=Yd(16)|0;c[x>>2]=p;g=x+4|0;c[g>>2]=o;y=x+12|0;c[y>>2]=0;c[i>>2]=x;i=Yd(o)|0;c[x+8>>2]=i;Pf(i|0,e+n|0,c[g>>2]|0)|0;i=y}if((r|0)<=(h|0)){y=43;break b}}h=-1;break a}while(0);if((y|0)==43)if((a[G>>0]|0)!=0?(b[H>>1]|0)==0:0){h=-1;break}if(!(c[I>>2]|0))c[I>>2]=f-h}else h=-1}else h=-1;while(0);l=J;return h|0}function bf(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;k=o+12|0;m=o;df(k);df(m);if(i){i=ef(k,a+12|0,a+4|0,b,d,e,f,0,h)|0;if((i|0)<0)i=-1;else{j=b+i|0;b=d-i|0;n=4}}else{j=b;b=d;n=4}if((n|0)==4){i=ef(m,a+8|0,a,j,b,e,f,g,h)|0;if((i|0)<0)i=-1;else{n=b-i|0;i=ff(a,k,m,j+i|0,n)|0;ae(c[k>>2]|0);ae(c[m>>2]|0);i=(i|0)<0?-1:d-n+i|0}}l=o;return i|0}function cf(a){a=a|0;var b=0,d=0;b=a+4|0;d=c[b>>2]|0;if(d|0){wd(d)|0;ae(c[b>>2]|0);c[b>>2]=0}b=c[a>>2]|0;if(b|0){wd(b)|0;ae(c[a>>2]|0);c[a>>2]=0}return}function df(a){a=a|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;return}function ef(a,b,d,e,f,g,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+16|0;p=q+8|0;k=q+4|0;m=q;e=kf(k,m,e,f,g,h,i,j)|0;do if((((e|0)>=0?(k=c[k>>2]|0,m=lf(a,k,c[m>>2]|0)|0,ae(k),(m|0)>=0):0)?(n=Bd(64)|0,(n|0)!=0):0)?(m=ue()|0,c[p>>2]=m,o=m,(m|0)!=0):0){m=n+688|0;c[m>>2]=c[m>>2]|1;if((vd(n,64,0)|0)<0){we(p);e=-1;break}else{c[d>>2]=n;c[b>>2]=o;break}}else e=-1;while(0);l=q;return e|0}function ff(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+16|0;u=y;x=b+4|0;i=c[x>>2]|0;v=(i|0)!=0;c[u>>2]=0;c[u+4>>2]=0;a:do if((h|0)>0){s=u+((v&1)<<2)|0;m=1;i=h;while(1){if((i|0)<((m?5:2)|0)){i=-1;break a}if(m)k=0;else k=(a[g+2>>0]|0)==0?4:3;if((i|0)<(k+3|0)){i=-1;break a}q=g+k|0;r=d[q>>0]|0;n=r<<5&32|(d[g+(k+1)>>0]|0)>>>3;r=r>>>1;j=r&63;if(j>>>0>40|((r&60|0)==32|(j|0)==39)){if(c[u>>2]|0?c[s>>2]|0:0)break}else if((j>>>0<10|(j+-16|0)>>>0<6?(t=k+2|0,(t|0)<(i|0)):0)?(a[g+t>>0]|0)<0:0){if(c[u>>2]|0?c[s>>2]|0:0)break;c[u+((v&(n|0)==1&1)<<2)>>2]=1}r=gf(g,i,(m^1)&1)|0;if((r|0)<0){i=-1;break a}o=r-k|0;p=o+3|0;m=v&(n|0)==1;j=m?e:f;k=j+8|0;if((hf(j,(c[k>>2]|0)+p|0)|0)<0){i=-1;break a}j=(c[j>>2]|0)+(c[k>>2]|0)|0;a[j>>0]=0;a[j+1>>0]=0;a[j+2>>0]=1;Pf(j+3|0,q|0,o|0)|0;if(m){q=j+4|0;a[q>>0]=a[q>>0]&7}c[k>>2]=(c[k>>2]|0)+p;i=i-r|0;if((i|0)>0){m=0;g=g+r|0}else break}g=i;i=c[x>>2]|0;w=22}else{g=h;w=22}while(0);do if((w|0)==22){if(i|0){i=e+8|0;if((hf(e,(c[i>>2]|0)+32|0)|0)<0){i=-1;break}if((jf(c[x>>2]|0,c[b+12>>2]|0,c[e>>2]|0,c[i>>2]|0)|0)<0){i=-1;break}}i=f+8|0;if((hf(f,(c[i>>2]|0)+32|0)|0)<0)i=-1;else{i=(jf(c[b>>2]|0,c[b+8>>2]|0,c[f>>2]|0,c[i>>2]|0)|0)<0;i=i?-1:h-g|0}}while(0);l=y;return i|0}function gf(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;do if(d){if((c|0)>3){if(a[b>>0]|0){d=-1;break}if(((a[b+1>>0]|0)==0?(a[b+2>>0]|0)==0:0)?(a[b+3>>0]|0)==1:0){d=4;e=11;break}}else{if((c|0)!=3){d=-1;break}if(a[b>>0]|0){d=-1;break}}if((a[b+1>>0]|0)==0?(a[b+2>>0]|0)==1:0){d=3;e=11}else d=-1}else{d=0;e=11}while(0);a:do if((e|0)==11){e=d+2|0;if((e|0)<=(c|0))if((e|0)<(c|0)){h=d;while(1){d=h;h=h+1|0;if(!(a[b+d>>0]|0)){f=(a[b+h>>0]|0)==0;if(f?(a[b+e>>0]|0)==1:0)break a;g=d+3|0;if((!((g|0)>=(c|0)|f^1)?(a[b+e>>0]|0)==0:0)?(a[b+g>>0]|0)==1:0)break a;else d=g}else d=d+3|0;if((d|0)>=(c|0)){d=c;break}else e=d}}else d=c;else d=-1}while(0);return d|0}function hf(a,b){a=a|0;b=b|0;var d=0,e=0;e=a+4|0;d=c[e>>2]|0;if((d|0)<(b|0)){d=(d*3|0)/2|0;b=(d|0)<(b|0)?b:d;d=Zd(c[a>>2]|0,b)|0;if(!d)b=-1;else{c[a>>2]=d;c[e>>2]=b;b=0}}else b=0;return b|0}function jf(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;i=l;l=l+96|0;g=i;h=i+80|0;Ld(g);c[g+24>>2]=e;c[g+28>>2]=f;e=e+f|0;f=e+32|0;do{a[e>>0]=0;e=e+1|0}while((e|0)<(f|0));g=Cd(b,d,h,g)|0;l=i;return ((g|0)<0|(c[h>>2]|0)==0)<<31>>31|0}function kf(b,d,e,f,g,h,i,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+16|0;k=q;c[b>>2]=0;p=mf(k,e,f)|0;if((p|0)>=0?(o=c[k>>2]|0,o>>>0<=(f-p|0)>>>0):0){m=o+10|0;n=Yd(m)|0;i=i&255;a[n>>0]=i;a[n+1>>0]=g>>>24;a[n+2>>0]=g>>>16;a[n+3>>0]=g>>>8;a[n+4>>0]=g;a[n+5>>0]=h>>>24;a[n+6>>0]=h>>>16;a[n+7>>0]=h>>>8;a[n+8>>0]=h;a[n+9>>0]=j+248;Pf(n+10|0,e+p|0,o|0)|0;g=Yd((m<<1)+6|0)|0;a[g>>0]=0;a[g+1>>0]=0;a[g+2>>0]=0;a[g+3>>0]=1;a[g+4>>0]=96;a[g+5>>0]=1;if((m|0)>0){e=0;f=6;while(1){k=e+1|0;if((k|0)<(m|0)&i<<24>>24==0?(a[n+k>>0]|0)==0:0){a[g+f>>0]=0;a[g+(f+1)>>0]=0;a[g+(f+2)>>0]=3;k=e+2|0;f=f+3|0}else{a[g+f>>0]=i;f=f+1|0}if((k|0)>=(m|0))break;e=k;i=a[n+k>>0]|0}if(!f){f=0;k=12}else k=11}else{f=6;k=11}if((k|0)==11)if(!(a[g+(f+-1)>>0]|0))k=12;if((k|0)==12){a[g+f>>0]=-128;f=f+1|0}ae(n);c[d>>2]=f;c[b>>2]=g;f=p+o|0}else f=-1;l=q;return f|0}function lf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=a+8|0;if((hf(a,(c[e>>2]|0)+d|0)|0)<0)a=-1;else{Pf((c[a>>2]|0)+(c[e>>2]|0)|0,b|0,d|0)|0;c[e>>2]=(c[e>>2]|0)+d;a=0}return a|0}function mf(a,b,d){a=a|0;b=b|0;d=d|0;b=nf(a,b,d)|0;if((b|0)>=0)b=(c[a>>2]|0)>>>0>1073741823?-1:b;return b|0}function nf(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0;a:do if((f|0)>=1){g=a[e>>0]|0;h=g&255;if(g<<24>>24>-1){c[b>>2]=h;f=1;break}if(g<<24>>24!=-128){g=h&127;h=e+1|0;while(1){if((f|0)<2){f=-1;break a}i=h;h=h+1|0;i=d[i>>0]|0;g=i&127|g<<7;if(!(i&128))break;else f=f+-1|0}c[b>>2]=g;f=h-e|0}else f=-1}else f=-1;while(0);return f|0}function of(a){a=a|0;pf(a);ae(c[a+56>>2]|0);cf(a);we(a+8|0);we(a+12|0);ae(a);return}function pf(a){a=a|0;var b=0;ae(c[a+124>>2]|0);ae(c[a+128>>2]|0);b=0;do{ae(c[a+132+(b<<2)>>2]|0);ae(c[a+164+(b<<2)>>2]|0);b=b+1|0}while((b|0)!=8);ae(c[a+196>>2]|0);return}function qf(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:do if((a+-1|0)>>>0>2147483582)b=0;else{b=c[909]|0;if(!b){b=If(64)|0;if((b|0)==(-1|0)){b=0;break}c[910]=If(0)|0;c[909]=3632;c[908]=3632;c[912]=3644;c[911]=3644;i=b+16|0;rf(i,170);sf(i,3644);sf(b+24|0,3632);b=c[909]|0}i=tf(a)|0;g=b+-8|0;a=uf(g)|0;b:do if(i>>>0>>0){e=g;d=g;a=g;j=10}else{h=c[908]|0;e=a;a=g;f=g;d=g;while(1){if((b|0)==(h|0))break;if((i|0)==(e|0)){j=13;break}b=c[b+4>>2]|0;g=b+-8|0;a=uf(g)|0;if(i>>>0>>0){e=g;d=g;a=g;j=10;break b}else{e=a;a=g;f=g;d=g}}if((j|0)==13){vf(b);break}if((If(i+32-e|0)|0)==(-1|0)){b=0;break a}c[910]=If(0)|0;b=h;e=f;j=10}while(0);if((j|0)==10){j=e+i|0;sf(j,d);sf(j+8|0,b);rf(j,170);vf(b)}rf(a,85)}while(0);return b|0}function rf(b,c){b=b|0;c=c|0;a[b+-1>>0]=c;return}function sf(a,b){a=a|0;b=b|0;var d=0,e=0;e=b+4|0;d=c[e>>2]|0;c[e>>2]=a;c[a>>2]=b;c[a+4>>2]=d;c[d>>2]=a;return}function tf(a){a=a|0;return a+40&-32|0}function uf(a){a=a|0;var b=0;b=c[a+4>>2]|0;return ((b|0)==3644?c[910]|0:b)-a|0}function vf(a){a=a|0;var b=0;b=c[a>>2]|0;a=c[a+4>>2]|0;c[b+4>>2]=a;c[a>>2]=b;return}function wf(a){a=a|0;var b=0,d=0;if(a|0){b=a+-8|0;sf(a,3632);rf(b,170);d=c[b>>2]|0;if((d|0)!=3644?(xf(d)|0)==170:0){vf(b);vf(a);b=d}a=c[b+4>>2]|0;if((a|0)!=3644?(xf(a)|0)==170:0){vf(a);b=b+8|0;vf(b);d=a+8|0;sf(b,d);vf(d)}}return}function xf(a){a=a|0;return d[a+-1>>0]|0|0}function yf(a,b){a=a|0;b=b|0;var d=0,e=0;do if(a){if(!b){wf(a);d=0;break}d=qf(b)|0;if(!d)d=0;else{e=(c[a+-4>>2]|0)-a+-1|0;Pf(d|0,a|0,(e>>>0>b>>>0?b:e)|0)|0;wf(a)}}else d=qf(b)|0;while(0);return d|0}function zf(){return 3652}function Af(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;a:do if(!d)b=0;else{while(1){e=a[b>>0]|0;f=a[c>>0]|0;if(e<<24>>24!=f<<24>>24)break;d=d+-1|0;if(!d){b=0;break a}else{b=b+1|0;c=c+1|0}}b=(e&255)-(f&255)|0}while(0);return b|0}function Bf(a){a=a|0;return 0}function Cf(a){a=a|0;return 0}function Df(a){a=+a;var b=0;b=Cf(32)|0;a=+Ef(a);return ~~a|0}function Ef(a){a=+a;var b=0,d=0;h[j>>3]=a;b=c[j+4>>2]|0;d=b&2146435072;if(!(d>>>0>1126170624|(d|0)==1126170624&0>0)){b=(b|0)<0;a=(b?4503599627370496.0:-4503599627370496.0)+((b?-4503599627370496.0:4503599627370496.0)+a);if(a==0.0)a=b?-0.0:0.0}return +a}function Ff(){}function Gf(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b>>c;return a>>>c|(b&(1<>c-32|0}function Hf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return (C=d,a-c>>>0|0)|0}function If(a){a=a|0;var b=0,d=0;d=a+15&-16|0;b=c[i>>2]|0;a=b+d|0;if((d|0)>0&(a|0)<(b|0)|(a|0)<0){Z()|0;ma(12);return -1}c[i>>2]=a;if((a|0)>(Y()|0)?(X()|0)==0:0){ma(12);c[i>>2]=b;return -1}return b|0}function Jf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return (C=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function Kf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=b+e|0;d=d&255;if((e|0)>=67){while(b&3){a[b>>0]=d;b=b+1|0}f=h&-4|0;g=f-64|0;i=d|d<<8|d<<16|d<<24;while((b|0)<=(g|0)){c[b>>2]=i;c[b+4>>2]=i;c[b+8>>2]=i;c[b+12>>2]=i;c[b+16>>2]=i;c[b+20>>2]=i;c[b+24>>2]=i;c[b+28>>2]=i;c[b+32>>2]=i;c[b+36>>2]=i;c[b+40>>2]=i;c[b+44>>2]=i;c[b+48>>2]=i;c[b+52>>2]=i;c[b+56>>2]=i;c[b+60>>2]=i;b=b+64|0}while((b|0)<(f|0)){c[b>>2]=i;b=b+4|0}}while((b|0)<(h|0)){a[b>>0]=d;b=b+1|0}return h-e|0}function Lf(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b<>>32-c;return a<>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function Nf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=R(e,f)|0;d=a>>>16;a=(c>>>16)+(R(e,d)|0)|0;e=b>>>16;b=R(e,f)|0;return (C=(a>>>16)+(R(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function Of(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=Nf(e,f)|0;a=C;return (C=(R(b,f)|0)+(R(d,e)|0)+a|a&0,c|0|0)|0}function Pf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192)return na(b|0,d|0,e|0)|0;h=b|0;g=b+e|0;if((b&3)==(d&3)){while(b&3){if(!e)return h|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}e=g&-4|0;f=e-64|0;while((b|0)<=(f|0)){c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];c[b+12>>2]=c[d+12>>2];c[b+16>>2]=c[d+16>>2];c[b+20>>2]=c[d+20>>2];c[b+24>>2]=c[d+24>>2];c[b+28>>2]=c[d+28>>2];c[b+32>>2]=c[d+32>>2];c[b+36>>2]=c[d+36>>2];c[b+40>>2]=c[d+40>>2];c[b+44>>2]=c[d+44>>2];c[b+48>>2]=c[d+48>>2];c[b+52>>2]=c[d+52>>2];c[b+56>>2]=c[d+56>>2];c[b+60>>2]=c[d+60>>2];b=b+64|0;d=d+64|0}while((b|0)<(e|0)){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}}else{e=g-4|0;while((b|0)<(e|0)){a[b>>0]=a[d>>0]|0;a[b+1>>0]=a[d+1>>0]|0;a[b+2>>0]=a[d+2>>0]|0;a[b+3>>0]=a[d+3>>0]|0;b=b+4|0;d=d+4|0}}while((b|0)<(g|0)){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}return h|0}function Qf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa[a&1](b|0,c|0,d|0)|0}function Rf(a,b,c,d,e,f,g,h,i,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;ra[a&1](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)}function Sf(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;sa[a&7](b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function Tf(a,b,c,d,e,f,g,h,i,j,k,l,m,n){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;ta[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0,m|0,n|0)}function Uf(a,b){a=a|0;b=b|0;ua[a&1](b|0)}function Vf(a,b,c){a=a|0;b=b|0;c=c|0;va[a&7](b|0,c|0)}function Wf(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return wa[a&1](b|0,c|0,d|0,e|0,f|0,g|0)|0}function Xf(a,b){a=a|0;b=b|0;return xa[a&3](b|0)|0}function Yf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ya[a&7](b|0,c|0,d|0)}function Zf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return za[a&1](b|0,c|0,d|0,e|0)|0}function _f(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;Aa[a&3](b|0,c|0,d|0,e|0,f|0,g|0)}function $f(a,b,c){a=a|0;b=b|0;c=c|0;return Ba[a&1](b|0,c|0)|0}function ag(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Ca[a&1](b|0,c|0,d|0,e|0,f|0)|0}function bg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Da[a&7](b|0,c|0,d|0,e|0)}function cg(a,b,c){a=a|0;b=b|0;c=c|0;V(0);return 0}function dg(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;V(1)}function eg(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;V(2)}function fg(a,b,c,d,e,f,g,h,i,j,k,l,m){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;V(3)}function gg(a){a=a|0;V(4)}function hg(a,b){a=a|0;b=b|0;V(5)}function ig(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;V(6);return 0}function jg(a){a=a|0;V(7);return 0}function kg(a,b,c){a=a|0;b=b|0;c=c|0;V(8)}function lg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;V(9);return 0}function mg(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;V(10)}function ng(a,b){a=a|0;b=b|0;V(11);return 0}function og(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;V(12);return 0}function pg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;V(13)} + +// EMSCRIPTEN_END_FUNCS +var qa=[cg,zd];var ra=[dg,Wc];var sa=[eg,Ie,Je,Ke,Gc,Zc,_c,Ge];var ta=[fg,Xc,Yc,fg];var ua=[gg,Rb];var va=[hg,Nc,Sc,Tc,Uc,Vc,kd,ke];var wa=[ig,xd];var xa=[jg,Ob,Qb,jg];var ya=[kg,Lc,Mc,Oc,Pc,Qc,Rc,kg];var za=[lg,Pb];var Aa=[mg,$c,ad,mg];var Ba=[ng,$b];var Ca=[og,yd];var Da=[pg,Hc,Ic,Jc,Kc,pg,pg,pg];return{___muldsi3:Nf,_sbrk:If,_i64Subtract:Hf,_free:wf,_bpg_decoder_decode:$e,_bpg_decoder_start:De,_i64Add:Jf,_bpg_decoder_open:_e,_bitshift64Ashr:Gf,_memset:Kf,_bpg_decoder_get_info:Ce,_malloc:qf,_emscripten_get_global_libc:zf,_memcpy:Pf,_bpg_decoder_get_line:Me,_bpg_decoder_close:of,_bpg_decoder_get_frame_duration:Le,___muldi3:Of,_llvm_bswap_i32:Mf,_bitshift64Shl:Lf,runPostSets:Ff,stackAlloc:Ea,stackSave:Fa,stackRestore:Ga,establishStackSpace:Ha,setTempRet0:Ja,getTempRet0:Ka,setThrew:Ia,stackAlloc:Ea,stackSave:Fa,stackRestore:Ga,establishStackSpace:Ha,setThrew:Ia,setTempRet0:Ja,getTempRet0:Ka,dynCall_iiii:Qf,dynCall_viiiiiiiiii:Rf,dynCall_viiiiiii:Sf,dynCall_viiiiiiiiiiiii:Tf,dynCall_vi:Uf,dynCall_vii:Vf,dynCall_iiiiiii:Wf,dynCall_ii:Xf,dynCall_viii:Yf,dynCall_iiiii:Zf,dynCall_viiiiii:_f,dynCall_iii:$f,dynCall_iiiiii:ag,dynCall_viiii:bg}}) + + +// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var _bpg_decoder_decode=Module["_bpg_decoder_decode"]=asm["_bpg_decoder_decode"];var _bpg_decoder_start=Module["_bpg_decoder_start"]=asm["_bpg_decoder_start"];var stackSave=Module["stackSave"]=asm["stackSave"];var getTempRet0=Module["getTempRet0"]=asm["getTempRet0"];var setThrew=Module["setThrew"]=asm["setThrew"];var _bpg_decoder_get_line=Module["_bpg_decoder_get_line"]=asm["_bpg_decoder_get_line"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _bitshift64Ashr=Module["_bitshift64Ashr"]=asm["_bitshift64Ashr"];var _memset=Module["_memset"]=asm["_memset"];var _bpg_decoder_get_info=Module["_bpg_decoder_get_info"]=asm["_bpg_decoder_get_info"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var setTempRet0=Module["setTempRet0"]=asm["setTempRet0"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _emscripten_get_global_libc=Module["_emscripten_get_global_libc"]=asm["_emscripten_get_global_libc"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var ___muldsi3=Module["___muldsi3"]=asm["___muldsi3"];var _free=Module["_free"]=asm["_free"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var _bpg_decoder_open=Module["_bpg_decoder_open"]=asm["_bpg_decoder_open"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var _bpg_decoder_close=Module["_bpg_decoder_close"]=asm["_bpg_decoder_close"];var _malloc=Module["_malloc"]=asm["_malloc"];var _bpg_decoder_get_frame_duration=Module["_bpg_decoder_get_frame_duration"]=asm["_bpg_decoder_get_frame_duration"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_viiiiiiiiii=Module["dynCall_viiiiiiiiii"]=asm["dynCall_viiiiiiiiii"];var dynCall_viiiiiii=Module["dynCall_viiiiiii"]=asm["dynCall_viiiiiii"];var dynCall_viiiiiiiiiiiii=Module["dynCall_viiiiiiiiiiiii"]=asm["dynCall_viiiiiiiiiiiii"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_iiiii=Module["dynCall_iiiii"]=asm["dynCall_iiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiiiii=Module["dynCall_iiiiii"]=asm["dynCall_iiiiii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];Runtime.stackAlloc=Module["stackAlloc"];Runtime.stackSave=Module["stackSave"];Runtime.stackRestore=Module["stackRestore"];Runtime.establishStackSpace=Module["establishStackSpace"];Runtime.setTempRet0=Module["setTempRet0"];Runtime.getTempRet0=Module["getTempRet0"];Module["asm"]=asm;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=Module.callMain=function callMain(args){args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<4-1;i++){argv.push(0)}}var argv=[allocate(intArrayFromString(Module["thisProgram"]),"i8",ALLOC_NORMAL)];pad();for(var i=0;i0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["exit"](status)}Module["quit"](status,new ExitStatus(status))}Module["exit"]=Module.exit=exit;var abortDecorators=[];function abort(what){if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output="abort("+what+") at "+stackTrace()+extra;if(abortDecorators){abortDecorators.forEach((function(decorator){output=decorator(output,what)}))}throw output}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}run();window["BPGDecoder"]=(function(ctx){this.ctx=ctx;this["imageData"]=null;this["onload"]=null;this["frames"]=null;this["loop_count"]=0});window["BPGDecoder"].prototype={malloc:Module["cwrap"]("malloc","number",["number"]),free:Module["cwrap"]("free","void",["number"]),bpg_decoder_open:Module["cwrap"]("bpg_decoder_open","number",[]),bpg_decoder_decode:Module["cwrap"]("bpg_decoder_decode","number",["number","array","number"]),bpg_decoder_get_info:Module["cwrap"]("bpg_decoder_get_info","number",["number","number"]),bpg_decoder_start:Module["cwrap"]("bpg_decoder_start","number",["number","number"]),bpg_decoder_get_frame_duration:Module["cwrap"]("bpg_decoder_get_frame_duration","void",["number","number","number"]),bpg_decoder_get_line:Module["cwrap"]("bpg_decoder_get_line","number",["number","number"]),bpg_decoder_close:Module["cwrap"]("bpg_decoder_close","void",["number"]),load:(function(url){var request=new XMLHttpRequest;var this1=this;request.open("get",url,true);request.responseType="arraybuffer";request.onload=(function(event){this1._onload(request,event)});request.send()}),_onload:(function(request,event){var data=request.response;var array=new Uint8Array(data);var img,w,h,img_info_buf,cimg,p0,rgba_line,w4,frame_count;var heap8,heap16,heap32,dst,i,y,duration,frames,loop_count;img=this.bpg_decoder_open();if(this.bpg_decoder_decode(img,array,array.length)<0){console.log("could not decode image");return}img_info_buf=this.malloc(5*4);this.bpg_decoder_get_info(img,img_info_buf);heap8=Module["HEAPU8"];heap16=Module["HEAPU16"];heap32=Module["HEAPU32"];w=heap32[img_info_buf>>2];h=heap32[img_info_buf+4>>2];loop_count=heap16[img_info_buf+16>>1];w4=w*4;rgba_line=this.malloc(w4);frame_count=0;frames=[];for(;;){if(this.bpg_decoder_start(img,1)<0)break;this.bpg_decoder_get_frame_duration(img,img_info_buf,img_info_buf+4);duration=heap32[img_info_buf>>2]*1e3/heap32[img_info_buf+4>>2];cimg=this.ctx.createImageData(w,h);dst=cimg.data;p0=0;for(y=0;y=frames.length){if(dec["loop_count"]==0||dec.loop_counter=0){dec.frame_index=frame_index;ctx.putImageData(frames[frame_index]["img"],0,0);setTimeout(next_frame,frames[frame_index]["duration"])}}canvas.width=imageData.width;canvas.height=imageData.height;ctx.putImageData(imageData,0,0);if(frames.length>1){dec.frame_index=0;dec.loop_counter=0;setTimeout(next_frame,frames[0]["duration"])}}).bind(dec,canvas,ctx);dec.load(url)}})}))() + + + + diff --git a/themes/fractal-forest/static/js/bpgdec.js.sha384 b/themes/fractal-forest/static/js/bpgdec.js.sha384 new file mode 100644 index 0000000..d32f70f --- /dev/null +++ b/themes/fractal-forest/static/js/bpgdec.js.sha384 @@ -0,0 +1 @@ +WjNxxN+t6/zyZRw8QQPGVYHSU1N3kcbNWWkGQRigK1zD12fGnNwIJpM7RmYEDOzK diff --git a/themes/fractal-forest/static/js/bpgdec8.js b/themes/fractal-forest/static/js/bpgdec8.js new file mode 100644 index 0000000..ef324e4 --- /dev/null +++ b/themes/fractal-forest/static/js/bpgdec8.js @@ -0,0 +1,17 @@ +((function(){var Module={};var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=console.log;if(!Module["printErr"])Module["printErr"]=console.warn;var nodeFS;var nodePath;Module["read"]=function read(filename,binary){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](filename);return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};Module["load"]=function load(f){globalEval(read(f))};if(!Module["thisProgram"]){if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=read}else{Module["read"]=function read(){throw"no read() available"}}Module["readBinary"]=function readBinary(f){if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}var data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=(function(status,toThrow){quit(status)})}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return xhr.response}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response)}else{onerror()}};xhr.onerror=onerror;xhr.send(null)};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module["print"])Module["print"]=function print(x){console.log(x)};if(!Module["printErr"])Module["printErr"]=function printErr(x){console.warn(x)}}else{var TRY_USE_DUMP=false;if(!Module["print"])Module["print"]=TRY_USE_DUMP&&typeof dump!=="undefined"?(function(x){dump(x)}):(function(x){})}if(ENVIRONMENT_IS_WORKER){Module["load"]=importScripts}if(typeof Module["setWindowTitle"]==="undefined"){Module["setWindowTitle"]=(function(title){document.title=title})}}else{throw"Unknown runtime environment. Where are we?"}function globalEval(x){eval.call(null,x)}if(!Module["load"]&&Module["read"]){Module["load"]=function load(f){globalEval(Module["read"](f))}}if(!Module["print"]){Module["print"]=(function(){})}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}if(!Module["quit"]){Module["quit"]=(function(status,toThrow){throw toThrow})}Module.print=Module["print"];Module.printErr=Module["printErr"];Module["preRun"]=[];Module["postRun"]=[];for(var key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var Runtime={setTempRet0:(function(value){tempRet0=value;return value}),getTempRet0:(function(){return tempRet0}),stackSave:(function(){return STACKTOP}),stackRestore:(function(stackTop){STACKTOP=stackTop}),getNativeTypeSize:(function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),STACK_ALIGN:16,prepVararg:(function(ptr,type){if(type==="double"||type==="i64"){if(ptr&7){assert((ptr&7)===4);ptr+=4}}else{assert((ptr&3)===0)}return ptr}),getAlignSize:(function(type,size,vararg){if(!vararg&&(type=="i64"||type=="double"))return 8;if(!type)return Math.min(size,8);return Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE)}),dynCall:(function(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[],addFunction:(function(func){for(var i=0;i>2];var end=(ret+size+15|0)&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;if(end>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){HEAP32[DYNAMICTOP_PTR>>2]=ret;return 0}}return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;var ABORT=0;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];if(!func){try{func=eval("_"+ident)}catch(e){}}assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)");return func}var cwrap,ccall;((function(){var JSfuncs={"stackSave":(function(){Runtime.stackSave()}),"stackRestore":(function(){Runtime.stackRestore()}),"arrayToC":(function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=Runtime.stackAlloc(len);stringToUTF8(str,ret,len)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};ccall=function ccallFunc(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}Module["setValue"]=setValue;function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type)}return null}Module["getValue"]=getValue;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module["ALLOC_NORMAL"]=ALLOC_NORMAL;Module["ALLOC_STACK"]=ALLOC_STACK;Module["ALLOC_STATIC"]=ALLOC_STATIC;Module["ALLOC_DYNAMIC"]=ALLOC_DYNAMIC;Module["ALLOC_NONE"]=ALLOC_NONE;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return Module["UTF8ToString"](ptr)}Module["Pointer_stringify"]=Pointer_stringify;function AsciiToString(ptr){var str="";while(1){var ch=HEAP8[ptr++>>0];if(!ch)return str;str+=String.fromCharCode(ch)}}Module["AsciiToString"]=AsciiToString;function stringToAscii(str,outPtr){return writeAsciiToMemory(str,outPtr,false)}Module["stringToAscii"]=stringToAscii;var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx){var endPtr=idx;while(u8Array[endPtr])++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}}Module["UTF8ArrayToString"]=UTF8ArrayToString;function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}Module["UTF8ToString"]=UTF8ToString;function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}Module["stringToUTF8Array"]=stringToUTF8Array;function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}Module["stringToUTF8"]=stringToUTF8;function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}Module["lengthBytesUTF8"]=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function demangle(func){var __cxa_demangle_func=Module["___cxa_demangle"]||Module["__cxa_demangle"];if(__cxa_demangle_func){try{var s=func.substr(1);var len=lengthBytesUTF8(s)+1;var buf=_malloc(len);stringToUTF8(s,buf,len);var status=_malloc(4);var ret=__cxa_demangle_func(buf,0,0,status);if(getValue(status,"i32")===0&&ret){return Pointer_stringify(ret)}}catch(e){}finally{if(buf)_free(buf);if(status)_free(status);if(ret)_free(ret)}return func}Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}Module["stackTrace"]=stackTrace;var HEAP;var buffer;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed;var STACK_BASE,STACKTOP,STACK_MAX;var DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0;staticSealed=false;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||33554432;if(TOTAL_MEMORY0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}Module["addOnPreRun"]=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}Module["intArrayToString"]=intArrayToString;function writeStringToMemory(string,buffer,dontAddNull){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var lastChar,end;if(dontAddNull){end=buffer+lengthBytesUTF8(string);lastChar=HEAP8[end]}stringToUTF8(string,buffer,Infinity);if(dontAddNull)HEAP8[end]=lastChar}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;if(!Math["imul"]||Math["imul"](4294967295,5)!==-5)Math["imul"]=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};Math.imul=Math["imul"];if(!Math["clz32"])Math["clz32"]=(function(x){x=x>>>0;for(var i=0;i<32;i++){if(x&1<<31-i)return i}return 32});Math.clz32=Math["clz32"];if(!Math["trunc"])Math["trunc"]=(function(x){return x<0?Math.ceil(x):Math.floor(x)});Math.trunc=Math["trunc"];var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_round=Math.round;var Math_min=Math.min;var Math_clz32=Math.clz32;var Math_trunc=Math.trunc;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var ASM_CONSTS=[];STATIC_BASE=8;STATICTOP=STATIC_BASE+6096;__ATINIT__.push();allocate([29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,33,0,0,0,34,0,0,0,34,0,0,0,35,0,0,0,35,0,0,0,36,0,0,0,36,0,0,0,37,0,0,0,37,0,0,0,93,6,0,0,0,0,0,0,0,0,0,0,53,54,50,72,34,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,7,0,0,0,1,0,0,0,0,0,0,0,255,255,255,127,0,0,0,0,0,0,0,0,3,1,1,0,36,56,37,56,38,56,0,0,0,0,0,0,4,0,0,0,0,0,0,0,3,1,0,16,36,56,37,56,38,56,0,0,0,0,0,0,5,0,0,0,0,0,0,0,3,0,0,16,36,56,37,56,38,56,0,0,0,0,0,0,8,0,0,0,0,0,0,0,1,0,0,0,36,56,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,0,240,154,249,114,252,138,253,30,254,122,254,197,254,0,255,197,254,122,254,30,254,138,253,114,252,154,249,0,240,0,0,1,0,1,2,0,1,2,3,1,2,3,2,3,3,0,1,0,2,1,0,3,2,1,0,3,2,1,3,2,3,0,0,1,0,1,2,0,1,2,3,0,1,2,3,4,0,1,2,3,4,5,0,1,2,3,4,5,6,0,1,2,3,4,5,6,7,1,2,3,4,5,6,7,2,3,4,5,6,7,3,4,5,6,7,4,5,6,7,5,6,7,6,7,7,0,1,0,2,1,0,3,2,1,0,4,3,2,1,0,5,4,3,2,1,0,6,5,4,3,2,1,0,7,6,5,4,3,2,1,0,7,6,5,4,3,2,1,7,6,5,4,3,2,7,6,5,4,3,7,6,5,4,7,6,5,7,6,7,40,45,51,57,64,72,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,9,9,9,10,10,10,10,10,10,11,11,11,11,11,11,12,12,0,0,0,2,5,9,1,4,8,12,3,7,11,14,6,10,13,15,0,2,1,3,0,2,5,9,14,20,27,35,1,4,8,13,19,26,34,42,3,7,12,18,25,33,41,48,6,11,17,24,32,40,47,53,10,16,23,31,39,46,52,57,15,22,30,38,45,51,56,60,21,29,37,44,50,55,59,62,28,36,43,49,54,58,61,63,0,1,0,1,0,0,1,1,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,1,2,3,16,17,18,19,4,5,6,7,20,21,22,23,8,9,10,11,24,25,26,27,12,13,14,15,28,29,30,31,32,33,34,35,48,49,50,51,36,37,38,39,52,53,54,55,40,41,42,43,56,57,58,59,44,45,46,47,60,61,62,63,0,1,4,5,2,3,4,5,6,6,8,8,7,7,8,8,1,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,2,1,0,0,2,1,0,0,2,1,0,0,2,1,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,153,200,139,141,157,154,154,154,154,154,154,154,154,184,154,154,154,184,63,139,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,153,138,138,111,141,94,138,182,154,139,139,139,139,139,139,110,110,124,125,140,153,125,127,140,109,111,143,127,111,79,108,123,63,110,110,124,125,140,153,125,127,140,109,111,143,127,111,79,108,123,63,91,171,134,141,111,111,125,110,110,94,124,108,124,107,125,141,179,153,125,107,125,141,179,153,125,107,125,141,179,153,125,140,139,182,182,152,136,152,136,153,136,139,111,136,139,111,141,111,140,92,137,138,140,152,138,139,153,74,149,92,139,107,122,152,140,179,166,182,140,227,122,197,138,153,136,167,152,152,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,185,107,139,126,154,197,185,201,154,154,154,149,154,139,154,154,154,152,139,110,122,95,79,63,31,31,153,153,153,153,140,198,140,198,168,79,124,138,94,153,111,149,107,167,154,139,139,139,139,139,139,125,110,94,110,95,79,125,111,110,78,110,111,111,95,94,108,123,108,125,110,94,110,95,79,125,111,110,78,110,111,111,95,94,108,123,108,121,140,61,154,155,154,139,153,139,123,123,63,153,166,183,140,136,153,154,166,183,140,136,153,154,166,183,140,136,153,154,170,153,123,123,107,121,107,121,167,151,183,140,151,183,140,140,140,154,196,196,167,154,152,167,182,182,134,149,136,153,121,136,137,169,194,166,167,154,167,137,182,107,167,91,122,107,167,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,160,107,139,126,154,197,185,201,154,154,154,134,154,139,154,154,183,152,139,154,137,95,79,63,31,31,153,153,153,153,169,198,169,198,168,79,224,167,122,153,111,149,92,167,154,139,139,139,139,139,139,125,110,124,110,95,94,125,111,111,79,125,126,111,111,79,108,123,93,125,110,124,110,95,94,125,111,111,79,125,126,111,111,79,108,123,93,121,140,61,154,170,154,139,153,139,123,123,63,124,166,183,140,136,153,154,166,183,140,136,153,154,166,183,140,136,153,154,170,153,138,138,122,121,122,121,167,151,183,140,151,183,140,140,140,154,196,167,167,154,152,167,182,182,134,149,136,153,121,136,122,169,208,166,167,154,152,167,182,107,167,91,107,107,167,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,6,6,7,8,9,10,11,13,14,16,18,20,22,24,29,30,31,32,33,33,34,34,35,35,36,36,37,37,104,101,118,99,0,0,26,10,1,0,1,2,2,2,2,3,5,7,8,10,12,13,15,17,18,19,20,21,22,23,23,24,24,25,25,26,27,27,28,28,29,29,30,31,32,26,21,17,13,9,5,2,0,254,251,247,243,239,235,230,224,230,235,239,243,247,251,254,0,2,5,9,13,17,21,26,32,64,90,90,90,89,88,87,85,83,82,80,78,75,73,70,67,64,61,57,54,50,46,43,38,36,31,25,22,18,13,9,4,255,0,1,0,0,255,0,1,255,255,1,1,1,255,255,1,1,2,0,3,4,16,16,16,16,17,18,21,24,16,16,16,16,17,19,22,25,16,16,17,18,20,22,25,29,16,16,18,21,24,27,31,36,17,17,20,24,30,35,41,47,18,19,22,27,35,44,54,65,21,22,25,31,41,54,70,88,24,25,29,36,47,65,88,115,16,16,16,16,17,18,20,24,16,16,16,17,18,20,24,25,16,16,17,18,20,24,25,28,16,17,18,20,24,25,28,33,17,18,20,24,25,28,33,41,18,20,24,25,28,33,41,54,20,24,25,28,33,41,54,71,24,25,28,33,41,54,71,91,128,176,208,240,128,167,197,227,128,158,187,216,123,150,178,205,116,142,169,195,111,135,160,185,105,128,152,175,100,122,144,166,95,116,137,158,90,110,130,150,85,104,123,142,81,99,117,135,77,94,111,128,73,89,105,122,69,85,100,116,66,80,95,110,62,76,90,104,59,72,86,99,56,69,81,94,53,65,77,89,51,62,73,85,48,59,69,80,46,56,66,76,43,53,63,72,41,50,59,69,39,48,56,65,37,45,54,62,35,43,51,59,33,41,48,56,32,39,46,53,30,37,43,50,29,35,41,48,27,33,39,45,26,31,37,43,24,30,35,41,23,28,33,39,22,27,32,37,21,26,30,35,20,24,29,33,19,23,27,31,18,22,26,30,17,21,25,28,16,20,23,27,15,19,22,25,14,18,21,24,14,17,20,23,13,16,19,22,12,15,18,21,12,14,17,20,11,14,16,19,11,13,15,18,10,12,15,17,10,12,14,16,9,11,13,15,9,11,12,14,8,10,12,14,8,9,11,13,7,9,11,12,7,9,10,12,7,8,10,11,6,8,9,11,6,7,9,10,6,7,8,9,2,2,2,2,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,62,63,0,0,1,2,2,4,4,5,6,7,8,9,9,11,11,12,13,13,15,15,16,16,18,18,19,19,21,21,22,22,23,24,24,25,26,26,27,27,28,29,29,30,30,30,31,32,32,33,33,33,34,34,35,35,35,36,36,36,37,37,37,38,38,63,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;Module["_bitshift64Ashr"]=_bitshift64Ashr;Module["_i64Subtract"]=_i64Subtract;function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}Module["_sbrk"]=_sbrk;Module["_i64Add"]=_i64Add;Module["_memset"]=_memset;Module["_bitshift64Shl"]=_bitshift64Shl;function _abort(){Module["abort"]()}Module["_llvm_bswap_i32"]=_llvm_bswap_i32;Module["___muldsi3"]=___muldsi3;Module["___muldi3"]=___muldi3;function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;DYNAMICTOP_PTR=allocate(1,"i32",ALLOC_STATIC);STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;staticSealed=true;function invoke_iiii(index,a1,a2,a3){try{return Module["dynCall_iiii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){try{Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vi(index,a1){try{Module["dynCall_vi"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vii(index,a1,a2){try{Module["dynCall_vii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){try{return Module["dynCall_iiiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){try{Module["dynCall_viiiiiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_ii(index,a1){try{return Module["dynCall_ii"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viii(index,a1,a2,a3){try{Module["dynCall_viii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){try{Module["dynCall_viiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){try{return Module["dynCall_iiiii"](index,a1,a2,a3,a4)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){try{Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iii(index,a1,a2){try{return Module["dynCall_iii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){try{return Module["dynCall_iiiiii"](index,a1,a2,a3,a4,a5)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){try{Module["dynCall_viiiiiii"](index,a1,a2,a3,a4,a5,a6,a7)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}Module.asmGlobalArg={"Math":Math,"Int8Array":Int8Array,"Int16Array":Int16Array,"Int32Array":Int32Array,"Uint8Array":Uint8Array,"Uint16Array":Uint16Array,"Uint32Array":Uint32Array,"Float32Array":Float32Array,"Float64Array":Float64Array,"NaN":NaN,"Infinity":Infinity};Module.asmLibraryArg={"abort":abort,"assert":assert,"enlargeMemory":enlargeMemory,"getTotalMemory":getTotalMemory,"abortOnCannotGrowMemory":abortOnCannotGrowMemory,"invoke_iiii":invoke_iiii,"invoke_viiiii":invoke_viiiii,"invoke_vi":invoke_vi,"invoke_vii":invoke_vii,"invoke_iiiiiii":invoke_iiiiiii,"invoke_viiiiiiiiiiii":invoke_viiiiiiiiiiii,"invoke_ii":invoke_ii,"invoke_viii":invoke_viii,"invoke_viiiiiiiii":invoke_viiiiiiiii,"invoke_iiiii":invoke_iiiii,"invoke_viiiiii":invoke_viiiiii,"invoke_iii":invoke_iii,"invoke_iiiiii":invoke_iiiiii,"invoke_viiiiiii":invoke_viiiiiii,"___setErrNo":___setErrNo,"_emscripten_memcpy_big":_emscripten_memcpy_big,"_abort":_abort,"DYNAMICTOP_PTR":DYNAMICTOP_PTR,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX};// EMSCRIPTEN_START_ASM +var asm=(function(global,env,buffer) { +"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.DYNAMICTOP_PTR|0;var j=env.tempDoublePtr|0;var k=env.ABORT|0;var l=env.STACKTOP|0;var m=env.STACK_MAX|0;var n=0;var o=0;var p=0;var q=0;var r=global.NaN,s=global.Infinity;var t=0,u=0,v=0,w=0,x=0.0,y=0,z=0,A=0,B=0.0;var C=0;var D=global.Math.floor;var E=global.Math.abs;var F=global.Math.sqrt;var G=global.Math.pow;var H=global.Math.cos;var I=global.Math.sin;var J=global.Math.tan;var K=global.Math.acos;var L=global.Math.asin;var M=global.Math.atan;var N=global.Math.atan2;var O=global.Math.exp;var P=global.Math.log;var Q=global.Math.ceil;var R=global.Math.imul;var S=global.Math.min;var T=global.Math.max;var U=global.Math.clz32;var V=env.abort;var W=env.assert;var X=env.enlargeMemory;var Y=env.getTotalMemory;var Z=env.abortOnCannotGrowMemory;var _=env.invoke_iiii;var $=env.invoke_viiiii;var aa=env.invoke_vi;var ba=env.invoke_vii;var ca=env.invoke_iiiiiii;var da=env.invoke_viiiiiiiiiiii;var ea=env.invoke_ii;var fa=env.invoke_viii;var ga=env.invoke_viiiiiiiii;var ha=env.invoke_iiiii;var ia=env.invoke_viiiiii;var ja=env.invoke_iii;var ka=env.invoke_iiiiii;var la=env.invoke_viiiiiii;var ma=env.___setErrNo;var na=env._emscripten_memcpy_big;var oa=env._abort;var pa=0.0; +// EMSCRIPTEN_START_FUNCS +function Ea(a){a=a|0;var b=0;b=l;l=l+a|0;l=l+15&-16;return b|0}function Fa(){return l|0}function Ga(a){a=a|0;l=a}function Ha(a,b){a=a|0;b=b|0;l=a;m=b}function Ia(a,b){a=a|0;b=b|0;if(!n){n=a;o=b}}function Ja(a){a=a|0;C=a}function Ka(){return C|0}function La(b,d){b=b|0;d=d|0;var e=0;do if(a[(c[b+204>>2]|0)+43>>0]|0){e=c[(c[b+200>>2]|0)+13128>>2]|0;d=(d|0)%(e|0)|0;if((d|0)!=2?!((e|0)==2&(d|0)==0):0)break;Pf(c[b+152>>2]|0,c[b+136>>2]|0,199)|0}while(0);return}function Ma(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=b+204|0;e=c[g>>2]|0;do if((c[(c[e+1668>>2]|0)+(c[b+2500>>2]<<2)>>2]|0)==(d|0)){Na(b);e=b+1449|0;if(a[e>>0]|0){f=c[g>>2]|0;if(a[f+42>>0]|0?(f=c[f+1676>>2]|0,(c[f+(d<<2)>>2]|0)!=(c[f+(d+-1<<2)>>2]|0)):0)i=5}else i=5;if((i|0)==5)Oa(b);if(((a[b+1448>>0]|0)==0?a[(c[g>>2]|0)+43>>0]|0:0)?(h=c[(c[b+200>>2]|0)+13128>>2]|0,((d|0)%(h|0)|0|0)==0):0){if((h|0)==1){Oa(b);break}if((a[e>>0]|0)==1)Pa(b)}}else{if((a[e+42>>0]|0)!=0?(i=c[e+1676>>2]|0,(c[i+(d<<2)>>2]|0)!=(c[i+(d+-1<<2)>>2]|0)):0){if((a[b+141>>0]|0)==1)Qa(c[b+136>>2]|0);else Na(b);Oa(b);e=c[g>>2]|0}if(a[e+43>>0]|0?(f=b+200|0,((d|0)%(c[(c[f>>2]|0)+13128>>2]|0)|0|0)==0):0){e=b+136|0;Ra((c[e>>2]|0)+224|0)|0;if((a[b+141>>0]|0)==1)Qa(c[e>>2]|0);else Na(b);if((c[(c[f>>2]|0)+13128>>2]|0)==1){Oa(b);break}else{Pa(b);break}}}while(0);return}function Na(a){a=a|0;var b=0,d=0;d=a+136|0;a=(c[d>>2]|0)+204|0;Rd(a,1);sb(a);d=(c[d>>2]|0)+224|0;b=c[a>>2]|0;b=b+((tb(a)|0)/8|0)|0;Md(d,b,((ub(a)|0)+7|0)/8|0);return}function Oa(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;g=c[b+1440>>2]|0;e=2-g|0;e=(g|0)==2|(a[b+2060>>0]|0)==0?e:e^3;g=b+2112|0;f=b+136|0;b=0;do{h=d[912+(e*199|0)+b>>0]|0;j=a[g>>0]|0;i=j<<24>>24;h=((h<<3&120)+-16+((R(j<<24>>24<0?0:(i|0)<51?i:51,((h>>>4)*5|0)+-45|0)|0)>>4)<<1)+-127|0;h=h>>31^h;a[(c[f>>2]|0)+b>>0]=(h|0)>124?h&1|124:h;b=b+1|0}while((b|0)!=199);b=0;do{a[(c[f>>2]|0)+199+b>>0]=0;b=b+1|0}while((b|0)!=4);return}function Pa(a){a=a|0;Pf(c[a+136>>2]|0,c[a+152>>2]|0,199)|0;return}function Qa(a){a=a|0;vb(a+224|0);return}function Ra(a){a=a|0;var b=0,d=0;d=a+4|0;b=(c[d>>2]|0)+-2|0;c[d>>2]=b;if((c[a>>2]|0)<(b<<17|0)){wb(a);a=0}else a=(c[a+16>>2]|0)-(c[a+12>>2]|0)|0;return a|0}function Sa(a){a=a|0;a=c[a+136>>2]|0;return Ta(a+224|0,a)|0}function Ta(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=d[e>>0]|0;g=b+4|0;i=c[g>>2]|0;j=d[5253+((i<<1&384)+f)>>0]|0;i=i-j|0;k=i<<17;l=c[b>>2]|0;h=k-l>>31;c[b>>2]=l-(h&k);c[g>>2]=(h&j-i)+i;f=h^f;a[e>>0]=a[5893+f>>0]|0;h=c[g>>2]|0;e=d[4741+h>>0]|0;c[g>>2]=h<>2]<>2]=e;if(!(e&65535))yb(b);return f&1|0}function Ua(a){a=a|0;var b=0;a=a+136|0;b=c[a>>2]|0;if(!(Ta(b+224|0,b+1|0)|0))a=0;else{a=(Va((c[a>>2]|0)+224|0)|0)==0;a=a?1:2}return a|0}function Va(a){a=a|0;var b=0,d=0;b=c[a>>2]<<1;c[a>>2]=b;if(!(b&65534)){xb(a);b=c[a>>2]|0}d=c[a+4>>2]<<17;if((b|0)<(d|0))b=0;else{c[a>>2]=b-d;b=1}return b|0}function Wa(a){a=a|0;var b=0,d=0;d=a+136|0;a=0;b=Va((c[d>>2]|0)+224|0)|0;do{b=Va((c[d>>2]|0)+224|0)|0|b<<1;a=a+1|0}while((a|0)!=4);return b|0}function Xa(a){a=a|0;var b=0,d=0;d=c[(c[a+200>>2]|0)+52>>2]|0;d=(d|0)>10?31:(1<0){a=0;do{if(!(Va((c[b>>2]|0)+224|0)|0))break a;a=a+1|0}while((a|0)<(d|0))}else a=0;while(0);return a|0}function Ya(a){a=a|0;return Va((c[a+136>>2]|0)+224|0)|0}function Za(a){a=a|0;var b=0;b=a+136|0;a=(Va((c[b>>2]|0)+224|0)|0)<<1;return Va((c[b>>2]|0)+224|0)|0|a|0}function _a(a){a=a|0;return Ra((c[a+136>>2]|0)+224|0)|0}function $a(a){a=a|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+5|0)|0}function ab(a){a=a|0;var b=0,d=0,e=0,f=0;e=a+136|0;a=9;b=0;while(1){d=c[e>>2]|0;if(!(Ta(d+224|0,d+a|0)|0)){a=0;break}b=b+1|0;if((b|0)>=5){a=0;d=0;f=4;break}else a=10}do if((f|0)==4){while(1){f=0;if(!(Va((c[e>>2]|0)+224|0)|0)){f=5;break}a=(1<>2]|0)+224|0)|0)<>2]|0)+224|0)|0}function cb(a){a=a|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+176|0)|0}function db(b){b=b|0;var d=0,e=0,f=0;f=a[(c[b+204>>2]|0)+1633>>0]|0;f=(f&255)>5?f:5;e=f&255;d=b+136|0;a:do if(!(f<<24>>24))b=0;else{b=0;do{f=c[d>>2]|0;if(!(Ta(f+224|0,f+177|0)|0))break a;b=b+1|0}while((b|0)<(e|0))}while(0);return b|0}function eb(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;k=c[b+200>>2]|0;l=(1<>2])+-1|0;j=c[k+13064>>2]|0;i=f>>j;j=g>>j;m=c[b+136>>2]|0;if((a[m+308>>0]|0)!=0|(l&f|0)!=0)h=d[(c[b+4336>>2]|0)+(i+-1+(R(c[k+13140>>2]|0,j)|0))>>0]|0;else h=0;if((l&g|0)!=0|(a[m+309>>0]|0)!=0)f=d[(c[b+4336>>2]|0)+((R(c[k+13140>>2]|0,j+-1|0)|0)+i)>>0]|0;else f=0;return Ta(m+224|0,m+(((h|0)>(e|0)?3:2)+((f|0)>(e|0)&1))|0)|0}function fb(a,b){a=a|0;b=b|0;b=c[a+136>>2]|0;b=(Ta(b+224|0,b+13|0)|0)==0;return (b?3:0)|0}function gb(a){a=a|0;return Ra((c[a+136>>2]|0)+224|0)|0}function hb(a){a=a|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+17|0)|0}function ib(a){a=a|0;var b=0;b=a+136|0;a=0;do{if(!(Va((c[b>>2]|0)+224|0)|0))break;a=a+1|0}while((a|0)<2);return a|0}function jb(a){a=a|0;var b=0,d=0;d=a+136|0;a=0;b=Va((c[d>>2]|0)+224|0)|0;do{b=Va((c[d>>2]|0)+224|0)|0|b<<1;a=a+1|0}while((a|0)!=4);return b|0}function kb(a){a=a|0;var b=0;a=a+136|0;b=c[a>>2]|0;if(!(Ta(b+224|0,b+18|0)|0))a=4;else{b=(Va((c[a>>2]|0)+224|0)|0)<<1;a=Va((c[a>>2]|0)+224|0)|0|b}return a|0}function lb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+(42-b)|0)|0}function mb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+(b+42)|0)|0}function nb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+((b|0)==0?41:40)|0)|0}function ob(a,b){a=a|0;b=b|0;var d=0,e=0;d=a+136|0;b=(b<<2)+166|0;a=0;do{e=c[d>>2]|0;if(!(Ta(e+224|0,e+(b+a)|0)|0))break;a=a+1|0}while((a|0)<4);return a|0}function pb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+(b+174)|0)|0}function qb(f,g,h,i,j,k){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,ua=0,va=0,wa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0;Pa=l;l=l+96|0;Ea=Pa+24|0;Fa=Pa+8|0;Ga=Pa;Ha=f+136|0;La=c[Ha>>2]|0;Na=c[f+160>>2]|0;Oa=c[Na+32+(k<<2)>>2]|0;Ia=f+200|0;z=c[Ia>>2]|0;Ma=R(h>>c[z+13180+(k<<2)>>2],Oa)|0;Ma=(c[Na+(k<<2)>>2]|0)+((g>>c[z+13168+(k<<2)>>2]<>2])+Ma)|0;z=(k|0)!=0;Na=La+320|0;Ka=z?La+11680|0:Na;g=Ea;h=g+64|0;do{a[g>>0]=0;g=g+1|0}while((g|0)<(h|0));y=1<>2]|0;Ja=y<>0]|0)){m=a[La+272>>0]|0;o=f+204|0;za=c[o>>2]|0;if((a[za+21>>0]|0)!=0?(d[za+1629>>0]|0)>=(i|0):0)q=rb(f,k)|0;else q=0;do if(!Ba){g=c[o>>2]|0;if((k|0)==1){g=(c[f+2072>>2]|0)+(c[g+28>>2]|0)|0;h=La+302|0}else{g=(c[f+2076>>2]|0)+(c[g+32>>2]|0)|0;h=La+303|0}g=g+m+(a[h>>0]|0)|0;m=c[Ia>>2]|0;h=c[m+13192>>2]|0;za=0-h|0;g=(g|0)<(za|0)?za:(g|0)<57?g:57;if((c[m+4>>2]|0)!=1){g=(g|0)<51?g:51;break}if((g|0)>=30)if((g|0)>43){g=g+-6|0;break}else{g=c[8+(g+-30<<2)>>2]|0;break}}else{za=c[Ia>>2]|0;g=m;h=c[za+13192>>2]|0;m=za}while(0);n=h+g|0;h=(c[m+52>>2]|0)+i|0;g=h+-5|0;h=1<>0]|0)>>0]<>0];if((a[m+634>>0]|0)!=0?!((i|0)>2&(q|0)!=0):0){o=c[o>>2]|0;o=(a[o+68>>0]|0)==0?m+635|0:o+69|0;p=((c[La+31244>>2]|0)!=1?3:0)+k|0;m=o+((i+-2|0)*384|0)+(p<<6)|0;if((i|0)>3){ya=q;wa=m;x=a[o+1536+((i+-4|0)*6|0)+p>>0]|0}else{ya=q;wa=m;x=16}}else{ya=q;wa=0;x=16}}else{g=0;h=0;n=0;ya=0;wa=0;x=0}va=i<<1;s=va+-1|0;za=i+-2|0;p=Ba?(za*3|0)+(i+-1>>2)|0:15;r=Ba?i+1>>2:za;if((va|0)>1){o=p+52|0;m=0;while(1){va=c[Ha>>2]|0;if(!(Ta(va+224|0,va+(o+(m>>r))|0)|0)){q=m;break}m=m+1|0;if((m|0)>=(s|0)){q=m;break}}o=p+70|0;m=0;while(1){va=c[Ha>>2]|0;if(!(Ta(va+224|0,va+(o+(m>>r))|0)|0)){r=m;break}m=m+1|0;if((m|0)>=(s|0)){r=m;break}}if((q|0)>3){p=(q>>>1)+-1|0;m=Va((c[Ha>>2]|0)+224|0)|0;if((p|0)>1){o=1;do{m=Va((c[Ha>>2]|0)+224|0)|0|m<<1;o=o+1|0}while((o|0)!=(p|0))}q=m+((q&1|2)<3){p=(r>>>1)+-1|0;m=Va((c[Ha>>2]|0)+224|0)|0;if((p|0)>1){o=1;do{m=Va((c[Ha>>2]|0)+224|0)|0|m<<1;o=o+1|0}while((o|0)!=(p|0))}v=m+((r&1|2)<>2;m=v>>2;Ca=44}else{w=q>>2;u=v>>2;switch(j|0){case 0:break;case 1:{ua=736;va=752;o=d[768+(v<<3)+q>>0]|0;p=728;r=732;s=v;m=w;break a}default:{s=v;t=q;m=w;Ca=44;break a}}o=d[(q&3)+(644+((v&3)<<2))>>0]|0;switch(i|0){case 2:{ua=326;va=342;p=3716;r=3716;s=v;m=w;break a}case 3:{p=732;r=728;m=660+(u<<1)+w|0;break}case 4:{p=326;r=342;m=644+(u<<2)+w|0;break}default:{p=358;r=422;m=664+(u<<3)+w|0}}ua=326;va=342;o=(d[m>>0]<<4)+o|0;s=v;m=w}while(0);if((Ca|0)==44){ua=752;va=736;o=d[768+(t<<3)+s>>0]|0;p=732;r=728;q=t}ra=o+1|0;pa=o>>4;if((pa|0)>-1){qa=(1<0;oa=na?90:88;ma=y+-1>>2;ia=z?27:0;ja=(i|0)==2;ka=(i|0)==3;la=ia+3|0;_=(j|0)==0?9:15;Z=Ba?0:27;$=(ya|0)==0;Y=Ba?42:43;X=Ba?40:41;aa=La+31244|0;ba=(ya|0)!=0;ca=(Da|16|0)==26;da=f+204|0;ea=((n|0)<0)<<31>>31;fa=((h|0)<0)<<31>>31;ha=(i|0)>2&ba;ga=(i|0)<4;U=x&255;V=(Ba&1)<<1;W=V|1;T=ia+(ka?9:12)|0;v=1;S=pa;t=0;o=16;while(1){y=S<<4;j=a[p+S>>0]|0;E=j&255;B=a[r+S>>0]|0;F=B&255;D=(S|0)!=0;if((S|0)<(pa|0)&D){if((E|0)<(qa|0))w=d[Ea+(E+1<<3)+F>>0]|0;else w=0;if((F|0)<(qa|0))x=(d[F+1+(Ea+(E<<3))>>0]|0)+w|0;else x=w;k=c[Ha>>2]|0;w=1;k=(Ta(k+224|0,k+(((x|0)<1?x:1)+oa)|0)|0)&255}else{w=0;k=((B|j)<<24>>24==0|(E|0)==(m|0)&(F|0)==(u|0))&1}a[Ea+(E<<3)+F>>0]=k;x=ra-y|0;if((S|0)==(pa|0)){a[Fa>>0]=x+255;A=x+-2|0;x=1}else{A=15;x=0}if((E|0)<(ma|0))y=(a[Ea+(E+1<<3)+F>>0]|0)!=0&1;else y=0;if((F|0)<(ma|0))y=((a[F+1+(Ea+(E<<3))>>0]|0)!=0&1)<<1|y;do if((A|0)>-1&k<<24>>24!=0){if(!(c[(c[Ia>>2]|0)+13100>>2]|0))if(ja){k=832;j=ia}else Ca=65;else if($){z=(a[Aa>>0]|0)!=0;if(z|ja){k=z?896:832;j=z?X:ia}else Ca=65}else{k=896;j=X}do if((Ca|0)==65){Ca=0;k=832+((y<<4)+16)|0;if(Ba){y=(B|j)<<24>>24==0?ia:la;if(ka){j=y+_|0;break}else{j=y+21|0;break}}else j=T}while(0);if((A|0)>0){z=j+92|0;y=A;while(1){Q=c[Ha>>2]|0;if(Ta(Q+224|0,Q+(z+(d[k+((d[va+y>>0]<<2)+(d[ua+y>>0]|0))>>0]|0))|0)|0){a[Fa+(x&255)>>0]=y;x=x+1<<24>>24;w=0}if((y|0)>1)y=y+-1|0;else break}}if(!w){if(c[(c[Ia>>2]|0)+13100>>2]|0)if($?(a[Aa>>0]|0)==0:0)Ca=78;else w=Y;else Ca=78;if((Ca|0)==78){Ca=0;w=(S|0)==0?Z:j+2|0}Q=c[Ha>>2]|0;if((Ta(Q+224|0,Q+(w+92)|0)|0)!=1)break}a[Fa+(x&255)>>0]=0;x=x+1<<24>>24}while(0);Q=x&255;if(x<<24>>24){w=Ba&D?2:0;if(!(c[(c[Ia>>2]|0)+13116>>2]|0))D=0;else{if($?(a[Aa>>0]|0)==0:0)t=V;else t=W;D=(d[La+199+t>>0]|0)>>>2&255}A=(S|0)!=(pa|0)&(v|0)==0&1|w;B=a[Fa>>0]|0;j=B&255;k=Q>>>0<8?Q:8;if((k|0)>0){z=A<<2;w=-1;y=0;v=1;do{P=v+z|0;O=c[Ha>>2]|0;P=(Ta(O+224|0,O+((na?P+16|0:P)+136)|0)|0)&255;a[Ga+y>>0]=P;if(!(P<<24>>24))v=((v+-1|0)>>>0<2&1)+v|0;else{w=(w|0)==-1?y:w;v=0}y=y+1|0}while((y|0)<(k|0));P=w}else{P=-1;v=1}y=Q+-1|0;O=a[Fa+y>>0]|0;w=O&255;do if(!(a[Aa>>0]|0)){if((c[aa>>2]|0)==1?ca&(ba&(c[(c[Ia>>2]|0)+13104>>2]|0)!=0):0){w=0;break}w=(j-w|0)>3&1}else w=0;while(0);if((P|0)!=-1){M=c[Ha>>2]|0;M=Ta(M+224|0,M+((na?A|4:A)|160)|0)|0;N=Ga+P|0;a[N>>0]=(d[N>>0]|0)+M}N=(w|0)!=0;k=N&(a[(c[da>>2]|0)+4>>0]|0)!=0;M=k?y&255:x;k=k?17:16;y=M&255;if(!(M<<24>>24))w=0;else{x=0;w=0;do{w=Va((c[Ha>>2]|0)+224|0)|0|w<<1;x=x+1|0}while((x|0)!=(y|0))}M=E<<2;K=F<<2;L=La+199+t|0;F=0;E=0;G=w<>0]|0)+M|0;I=(d[va+I>>0]|0)+K|0;do if((J|0)<8){B=(d[Ga+J>>0]|0)+1|0;A=(J|0)==(P|0);if((B|0)==((A?3:2)|0)&0==((A?0:0)|0))w=0;else{A=E;z=j;w=B;x=0;break}while(1){if(!(Va((c[Ha>>2]|0)+224|0)|0)){Ca=106;break}w=w+1|0;if((w|0)>=31){Ca=109;break}}do if((Ca|0)==106){Ca=0;if((w|0)>=3){Ca=109;break}if((j|0)>0){y=0;x=0}else{x=0;break}do{x=Va((c[Ha>>2]|0)+224|0)|0|x<<1;y=y+1|0}while((y|0)!=(j|0))}while(0);if((Ca|0)==109){Ca=0;k=w+-3|0;y=k+j|0;if((y|0)>0){w=0;x=0;do{w=Va((c[Ha>>2]|0)+224|0)|0|w<<1;x=x+1|0}while((x|0)!=(y|0))}else w=0;x=w;w=(1<>31|0,B|0,0)|0;x=C;B=3<>31;y=c[(c[Ia>>2]|0)+13116>>2]|0;if((x|0)>(z|0)|(x|0)==(z|0)&w>>>0>B>>>0){z=j+1|0;z=(y|0)==0?((z|0)<4?z:4):z}else z=j;if((E|0)!=0|(y|0)==0){A=E;break}k=a[L>>0]|0;y=(k&255)>>>2&255;if((A|0)<(3<>24==0|(A<<1|0)>=(1<>0]=y+k<<24>>24;A=1}else{w=0;while(1){if(!(Va((c[Ha>>2]|0)+224|0)|0)){Ca=120;break}w=w+1|0;if((w|0)>=31){Ca=123;break}}do if((Ca|0)==120){Ca=0;if((w|0)>=3){Ca=123;break}if((j|0)>0){y=0;x=0}else{x=0;break}do{x=Va((c[Ha>>2]|0)+224|0)|0|x<<1;y=y+1|0}while((y|0)!=(j|0))}while(0);if((Ca|0)==123){Ca=0;k=w+-3|0;y=k+j|0;if((y|0)>0){w=0;x=0;do{w=Va((c[Ha>>2]|0)+224|0)|0|w<<1;x=x+1|0}while((x|0)!=(y|0))}else w=0;x=w;w=(1<>31;y=c[(c[Ia>>2]|0)+13116>>2]|0;if((z|0)>=(3<>0]|0;y=(k&255)>>>2&255;if((z|0)<(3<>24==0|(z<<1|0)>=(1<>0]=y+k<<24>>24;A=1;z=j}while(0);if(N&(a[(c[da>>2]|0)+4>>0]|0)!=0){j=Jf(w|0,x|0,F|0,0)|0;F=(j&1|0)==0?1:D<<24>>24!=O<<24>>24;E=Hf(0,0,w|0,x|0)|0;w=F?w:E;x=F?x:C}else j=F;k=(G&32768|0)==0;y=Hf(0,0,w|0,x|0)|0;y=k?w:y;x=k?x:C;k=G<<1&131070;w=y&65535;do if(!(a[Aa>>0]|0)){do if(!((a[(c[Ia>>2]|0)+634>>0]|0)==0|ha)){if(!(ga|(I|H|0)!=0)){o=U;break}switch(i|0){case 3:{o=(I<<3)+H|0;break}case 4:{o=(I>>>1<<3)+(H>>>1)|0;break}case 5:{o=(I>>>2<<3)+(H>>>2)|0;break}default:o=(I<<2)+H|0}o=d[wa+o>>0]|0}while(0);w=Of(y|0,x|0,n|0,ea|0)|0;w=Of(w|0,C|0,o|0,((o|0)<0)<<31>>31|0)|0;w=Jf(w|0,C|0,h|0,fa|0)|0;w=Gf(w|0,C|0,g|0)|0;x=C;if((x|0)<0){w=(w&-32768|0)==-32768&(x&268435455|0)==268435455?w&65535:-32768;break}else{G=x>>>0<0|(x|0)==0&w>>>0<32767;w=G?w:32767;w=w&65535;break}}while(0);b[Ka+((I<>1]=w;w=J+1|0;if((w|0)==(Q|0))break;F=j;E=A;G=k;j=z;J=w;D=a[Fa+w>>0]|0}}if((S|0)>0)S=S+-1|0;else break}}do if(a[Aa>>0]|0){if((Da|16|0)==26?(c[(c[Ia>>2]|0)+13104>>2]|0)!=0:0)xa[c[f+2632>>2]&7](Ka,i&65535,(Da|0)==26&1)}else{g=(i|0)==2;if(ya|0){if(g&(c[(c[Ia>>2]|0)+13096>>2]|0)!=0?(c[La+31244>>2]|0)==1:0){g=0;do{Fa=Ka+(15-g<<1)|0;Ga=b[Fa>>1]|0;Ha=Ka+(g<<1)|0;b[Fa>>1]=b[Ha>>1]|0;b[Ha>>1]=Ga;g=g+1|0}while((g|0)!=8)}g=i&65535;ta[c[f+2628>>2]&7](Ka,g);if(!(c[(c[Ia>>2]|0)+13104>>2]|0))break;if(!((Da|16|0)==26?(c[La+31244>>2]|0)==1:0))break;xa[c[f+2632>>2]&7](Ka,g,(Da|0)==26&1);break}if(g&(Ba&(c[La+31244>>2]|0)==1)){sa[c[f+2636>>2]&7](Ka);break}h=(q|0)>(s|0)?q:s;if(!h){sa[c[f+2656+(za<<2)>>2]&7](Ka);break}g=s+4+q|0;do if((h|0)>=4)if((h|0)<8){g=(g|0)<8?g:8;break}else{g=(h|0)<12?((g|0)<24?g:24):g;break}else g=(g|0)<4?g:4;while(0);ta[c[f+2640+(za<<2)>>2]&7](Ka,g)}while(0);if(a[La+304>>0]|0?(Ja|0)>0:0){h=c[La+284>>2]|0;g=0;do{La=Ka+(g<<1)|0;b[La>>1]=((R(b[Na+(g<<1)>>1]|0,h)|0)>>>3)+(e[La>>1]|0);g=g+1|0}while((g|0)!=(Ja|0))}xa[c[f+2612+(za<<2)>>2]&7](Ma,Ka,Oa);l=Pa;return}function rb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Ta(a+224|0,a+(b|0?47:46)|0)|0}function sb(a){a=a|0;var b=0;b=0-(tb(a)|0)&7;if(b|0)Rd(a,b);return}function tb(a){a=a|0;return c[a+8>>2]|0}function ub(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(tb(a)|0)|0}function vb(a){a=a|0;var b=0,d=0;b=c[a+16>>2]|0;d=c[a>>2]|0;b=(d&1|0)==0?b:b+-1|0;b=(d&511|0)==0?b:b+-1|0;d=(c[a+20>>2]|0)-b|0;if((d|0)>=0)Md(a,b,d);return}function wb(a){a=a|0;var b=0,d=0,e=0;d=a+4|0;e=c[d>>2]|0;b=(e+-256|0)>>>31;c[d>>2]=e<>2]<>2]=b;if(!(b&65535))xb(a);return}function xb(a){a=a|0;var b=0,e=0;b=a+16|0;e=c[b>>2]|0;c[a>>2]=(c[a>>2]|0)+-65535+((d[e+1>>0]|0)<<1|(d[e>>0]|0)<<9);if(e>>>0<(c[a+20>>2]|0)>>>0)c[b>>2]=e+2;return}function yb(a){a=a|0;var b=0,e=0,f=0;f=c[a>>2]|0;e=a+16|0;b=c[e>>2]|0;c[a>>2]=(((d[b+1>>0]|0)<<1|(d[b>>0]|0)<<9)+-65535<<7-(d[4741+((f+-1^f)>>15)>>0]|0))+f;if(b>>>0<(c[a+20>>2]|0)>>>0)c[e>>2]=b+2;return}function zb(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0;d=Ab(b,d,e)|0;f=c[b+136>>2]|0;e=c[f+280>>2]|0;if(e){g=c[(c[b+200>>2]|0)+13192>>2]|0;b=d+52+e+(g<<1)|0;d=b+((b|0)>0?0:-52-g+1|0)|0;d=((d|0)%(g+52|0)|0)-g+b-d|0}a[f+272>>0]=d;return}function Ab(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=c[b+136>>2]|0;m=c[b+200>>2]|0;j=c[m+13080>>2]|0;i=(1<>2]|0)+24>>2]|0);h=j&d;j=j&e;k=c[m+13140>>2]|0;m=c[m+13064>>2]|0;l=h>>m;m=j>>m;f=g+203|0;if((a[f>>0]|0)!=0|(h|j|0)==0){a[f>>0]=(a[g+300>>0]|0)==0&1;f=a[b+2112>>0]|0}else f=c[g+276>>2]|0;if((i&d|0)!=0&(h&i|0)!=0){g=l+-1+(R(m,k)|0)|0;g=a[(c[b+4316>>2]|0)+g>>0]|0}else g=f;if((i&e|0)!=0&(j&i|0)!=0){f=(R(m+-1|0,k)|0)+l|0;f=a[(c[b+4316>>2]|0)+f>>0]|0}return g+1+f>>1|0}function Bb(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;k=c[b+136>>2]|0;l=b+200|0;g=(e|0)>0&(e&7|0)==0;do if(g){if(((a[b+2062>>0]|0)==0?c[k+31312>>2]&4|0:0)?((e|0)%(1<>2]|0)+13080>>2]|0)|0|0)==0:0)break;if((a[(c[b+204>>2]|0)+53>>0]|0)==0?(c[k+31312>>2]&8|0)!=0:0){if(!((e|0)%(1<>2]|0)+13080>>2]|0)|0))break}else m=8;if((m|0)==8?!g:0)break;h=1<>2]|0)+(g+d+(R(c[j>>2]|0,e)|0)>>2)>>0]=2;g=g+4|0}while((g|0)<(h|0))}}while(0);g=(d|0)>0&(d&7|0)==0;do if(g){if(((a[b+2062>>0]|0)==0?c[k+31312>>2]&1|0:0)?((d|0)%(1<>2]|0)+13080>>2]|0)|0|0)==0:0)break;if((a[(c[b+204>>2]|0)+53>>0]|0)==0?(c[k+31312>>2]&2|0)!=0:0){if(!((d|0)%(1<>2]|0)+13080>>2]|0)|0))break}else m=19;if((m|0)==19?!g:0)break;j=1<>2]|0)+((R(c[h>>2]|0,g+e|0)|0)+d>>2)>>0]=2;g=g+4|0}while((g|0)<(j|0))}}while(0);return}function Cb(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;g=b+200|0;j=((c[(c[g>>2]|0)+13120>>2]|0)-f|0)<=(d|0);Db(b,d,e);g=c[g>>2]|0;if(!(a[g+12941>>0]|0)){}else{g=((c[g+13124>>2]|0)-f|0)<=(e|0);h=(e|0)!=0;i=(d|0)!=0;if(i&h)Eb(b,d-f|0,e-f|0);if(i&g)Eb(b,d-f|0,e);h&j?(Eb(b,d,e-f|0),a[b+140>>0]&1):0;j&g?(Eb(b,d,e),a[b+140>>0]&1):0}return}function Db(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;_=l;l=l+32|0;U=_+8|0;N=_;X=_+18|0;Y=_+16|0;b[X>>1]=0;b[Y>>1]=0;Z=e+200|0;k=c[Z>>2]|0;h=c[k+13080>>2]|0;j=1<>h,c[k+13128>>2]|0)|0)+(f>>h)|0;i=c[e+2508>>2]|0;T=c[i+(h<<3)+4>>2]|0;M=c[i+(h<<3)>>2]|0;if((c[k+68>>2]|0)!=0?(a[k+13056>>0]|0)!=0:0)W=1;else W=(a[(c[e+204>>2]|0)+40>>0]|0)!=0;V=(f|0)!=0;if(V){L=h+-1|0;O=c[i+(L<<3)+4>>2]|0;L=c[i+(L<<3)>>2]|0}else{O=0;L=0}K=j+f|0;Q=c[k+13120>>2]|0;S=(K|0)>(Q|0)?Q:K;P=j+g|0;J=c[k+13124>>2]|0;P=(P|0)>(J|0)?J:P;K=(Q|0)<=(K|0)?S:S+-8|0;Q=(P|0)>(g|0);if(Q){w=V?f:8;x=(w|0)<(S|0);y=V?f+-8|0:0;z=e+4320|0;A=e+2596|0;B=N+4|0;C=e+160|0;D=X+1|0;E=Y+1|0;F=e+4300|0;G=e+4284|0;H=e+4324|0;I=e+4304|0;J=e+4288|0;v=(y|0)>=(K|0);u=g;i=T;h=M;do{if(x){q=u+4|0;r=i+-2&-2;p=w;do{m=c[H>>2]|0;t=c[A>>2]|0;j=a[m+((R(t,u)|0)+p>>2)>>0]|0;k=j&255;t=a[m+((R(t,q)|0)+p>>2)>>0]|0;m=t&255;n=t<<24>>24==0;do if((t|j)<<24>>24){s=p+-1|0;o=Kb(e,s,u)|0;o=o+1+(Kb(e,p,u)|0)>>1;t=o+h|0;t=d[1509+((t|0)<0?0:(t|0)<51?t:51)>>0]|0;if(!(j<<24>>24))j=0;else{j=r+(k<<1)+o|0;j=d[1561+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[N>>2]=j;if(n)j=0;else{j=r+(m<<1)+o|0;j=d[1561+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[B>>2]=j;o=c[C>>2]|0;j=c[o+32>>2]|0;k=R(j,u)|0;k=(c[o>>2]|0)+((p<>2]|0)+56>>2])+k)|0;if(W){a[X>>0]=Lb(e,s,u)|0;a[D>>0]=Lb(e,s,q)|0;a[Y>>0]=Lb(e,p,u)|0;a[E>>0]=Lb(e,p,q)|0;Aa[c[I>>2]&3](k,j,t,N,X,Y);break}else{Aa[c[J>>2]&3](k,j,t,N,X,Y);break}}while(0);p=p+8|0}while((p|0)<(S|0))}if(!((u|0)==0|v)){s=u+-1|0;r=y;do{n=c[z>>2]|0;t=R(c[A>>2]|0,u)|0;j=a[n+(t+r>>2)>>0]|0;m=j&255;q=r+4|0;t=a[n+(t+q>>2)>>0]|0;n=t&255;o=t<<24>>24==0;do if((t|j)<<24>>24){k=Kb(e,r,s)|0;k=k+1+(Kb(e,r,u)|0)>>1;h=(r|0)>=(f|0);i=h?T:O;h=h?M:L;p=k+h|0;p=d[1509+((p|0)<0?0:(p|0)<51?p:51)>>0]|0;if(!(j<<24>>24))j=0;else{j=(i+-2&-2)+(m<<1)+k|0;j=d[1561+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[N>>2]=j;if(o)j=0;else{j=(i+-2&-2)+(n<<1)+k|0;j=d[1561+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[B>>2]=j;t=c[C>>2]|0;j=c[t+32>>2]|0;k=R(j,u)|0;k=(c[t>>2]|0)+((r<>2]|0)+56>>2])+k)|0;if(W){a[X>>0]=Lb(e,r,s)|0;a[D>>0]=Lb(e,q,s)|0;a[Y>>0]=Lb(e,r,u)|0;a[E>>0]=Lb(e,q,u)|0;Aa[c[F>>2]&3](k,j,p,N,X,Y);break}else{Aa[c[G>>2]&3](k,j,p,N,X,Y);break}}while(0);r=r+8|0}while((r|0)<(K|0))}u=u+8|0}while((u|0)<(P|0));k=c[Z>>2]|0}else i=T;a:do if(c[k+4>>2]|0){z=V?O:T;A=e+4320|0;B=e+2596|0;C=U+4|0;D=e+160|0;E=X+1|0;F=Y+1|0;G=e+4308|0;H=e+4292|0;I=e+4324|0;J=e+4312|0;K=e+4296|0;h=1;while(1){j=1<>2];k=1<>2];if(Q){u=j<<3;v=V?f:u;w=(v|0)<(S|0);x=k<<3;y=V?f-u|0:0;t=j<<2;s=k<<2;r=g;do{if(w){o=r+s|0;n=v;do{O=c[I>>2]|0;k=c[B>>2]|0;j=a[O+((R(k,r)|0)+n>>2)>>0]|0;j=j<<24>>24==2;k=(a[O+((R(k,o)|0)+n>>2)>>0]|0)==2;do if(j|k){p=n+-1|0;m=Kb(e,p,o)|0;m=m+1+(Kb(e,n,o)|0)>>1;if(j){j=Kb(e,p,r)|0;j=Mb(e,j+1+(Kb(e,n,r)|0)>>1,h,i)|0}else j=0;c[U>>2]=j;if(k)j=Mb(e,m,h,i)|0;else j=0;c[C>>2]=j;N=c[D>>2]|0;O=c[Z>>2]|0;j=c[N+32+(h<<2)>>2]|0;k=R(r>>c[O+13180+(h<<2)>>2],j)|0;k=(c[N+(h<<2)>>2]|0)+((n>>c[O+13168+(h<<2)>>2]<>2])+k)|0;if(W){a[X>>0]=Lb(e,p,r)|0;a[E>>0]=Lb(e,p,o)|0;a[Y>>0]=Lb(e,n,r)|0;a[F>>0]=Lb(e,n,o)|0;ra[c[J>>2]&3](k,j,U,X,Y);break}else{ra[c[K>>2]&3](k,j,U,X,Y);break}}while(0);n=n+u|0}while((n|0)<(S|0))}if(r){n=S-((S|0)==(c[(c[Z>>2]|0)+13120>>2]|0)?0:u)|0;if((y|0)<(n|0)){p=r+-1|0;o=y;do{O=c[A>>2]|0;k=R(c[B>>2]|0,r)|0;q=o+t|0;i=(a[O+(k+o>>2)>>0]|0)==2;k=(a[O+(k+q>>2)>>0]|0)==2;do if(i|k){if(i){j=Kb(e,o,p)|0;j=j+1+(Kb(e,o,r)|0)>>1}else j=0;if(k){m=Kb(e,q,p)|0;m=m+1+(Kb(e,q,r)|0)>>1}else m=0;if(i)i=Mb(e,j,h,z)|0;else i=0;c[U>>2]=i;if(k)i=Mb(e,m,h,T)|0;else i=0;c[C>>2]=i;N=c[D>>2]|0;O=c[Z>>2]|0;i=c[N+32+(h<<2)>>2]|0;j=R(r>>c[O+13184>>2],i)|0;j=(c[N+(h<<2)>>2]|0)+((o>>c[O+13172>>2]<>2])+j)|0;if(W){a[X>>0]=Lb(e,o,p)|0;a[E>>0]=Lb(e,q,p)|0;a[Y>>0]=Lb(e,o,r)|0;a[F>>0]=Lb(e,q,r)|0;ra[c[G>>2]&3](j,i,U,X,Y);break}else{ra[c[H>>2]&3](j,i,U,X,Y);break}}while(0);o=o+u|0}while((o|0)<(n|0));i=z}else i=z}r=r+x|0}while((r|0)<(P|0))}h=h+1|0;if((h|0)==3)break a;k=c[Z>>2]|0}}while(0);l=_;return}function Eb(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0;ga=l;l=l+48|0;Z=ga+16|0;_=ga+34|0;ba=ga+32|0;da=ga+8|0;ea=ga;fa=d+200|0;x=c[fa>>2]|0;y=c[x+13080>>2]|0;T=e>>y;U=f>>y;s=c[x+13128>>2]|0;i=R(U,s)|0;V=i+T|0;k=c[d+204>>2]|0;m=c[k+1668>>2]|0;n=c[m+(V<<2)>>2]|0;W=d+2504|0;X=c[W>>2]|0;Y=X+(V*148|0)|0;b[_>>1]=0;b[ba>>1]=0;c[da>>2]=0;if(!(a[k+42>>0]|0))o=0;else o=(a[k+53>>0]|0)==0;t=(a[(c[d+4352>>2]|0)+V>>0]|0)==0;w=t|o;u=(T|0)==0;c[Z>>2]=u&1;q=(U|0)==0;$=Z+4|0;c[$>>2]=q&1;r=(T|0)==(s+-1|0);aa=Z+8|0;c[aa>>2]=r&1;v=(U|0)==((c[x+13132>>2]|0)+-1|0);ca=Z+12|0;c[ca>>2]=v&1;if(w){if(u)p=0;else{if(o){g=c[k+1676>>2]|0;g=(c[g+(n<<2)>>2]|0)!=(c[g+(c[m+(V+-1<<2)>>2]<<2)>>2]|0)}else g=0;h=g&1;if(t?(Q=c[d+4328>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+(T+-1+i<<2)>>2]|0)):0)g=1;a[_>>0]=g&1;p=h}if(r)j=0;else{if(o){g=c[k+1676>>2]|0;g=(c[g+(n<<2)>>2]|0)!=(c[g+(c[m+(V+1<<2)>>2]<<2)>>2]|0)}else g=0;h=g&1;if(t?(Q=c[d+4328>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+(T+1+i<<2)>>2]|0)):0)g=1;a[_+1>>0]=g&1;j=h}if(q)h=0;else{if(o){g=c[k+1676>>2]|0;g=(c[g+(n<<2)>>2]|0)!=(c[g+(c[m+(V-s<<2)>>2]<<2)>>2]|0)}else g=0;h=g&1;if(t?(Q=c[d+4328>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+((R(s,U+-1|0)|0)+T<<2)>>2]|0)):0)g=1;a[ba>>0]=g&1}if(v)g=0;else{if(o){i=c[k+1676>>2]|0;i=(c[i+(n<<2)>>2]|0)!=(c[i+(c[m+(s+V<<2)>>2]<<2)>>2]|0)}else i=0;g=i&1;if(t?(Q=c[d+4328>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+((R(s,U+1|0)|0)+T<<2)>>2]|0)):0)i=1;a[ba+1>>0]=i&1}if(!(q|u)){if(t){Q=c[d+4328>>2]|0;if(p<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+-1+(R(s,U+-1|0)|0)<<2)>>2]|0):0)S=36;else i=1}else if(!(p<<24>>24))S=36;else i=1;if((S|0)==36)i=h;a[da>>0]=i}if(!(r|q)){if(t){Q=c[d+4328>>2]|0;if(j<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+1+(R(s,U+-1|0)|0)<<2)>>2]|0):0)S=42;else h=1}else if(!(j<<24>>24))S=42;else h=1;a[da+1>>0]=h}if(!(v|r)){if(t){Q=c[d+4328>>2]|0;if(j<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+1+(R(s,U+1|0)|0)<<2)>>2]|0):0)S=48;else h=1}else if(!(j<<24>>24))S=48;else h=1;if((S|0)==48)h=g;a[da+2>>0]=h}if(!(v|u)){if(t){Q=c[d+4328>>2]|0;if(p<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+-1+(R(s,U+1|0)|0)<<2)>>2]|0):0)S=54;else g=1}else if(!(p<<24>>24))S=54;else g=1;a[da+3>>0]=g}}D=c[x+4>>2]|0?3:1;E=d+160|0;F=d+168|0;G=d+2672|0;M=U<<1;H=M+-1|0;I=ea+4|0;J=U+-1|0;K=T+1|0;L=T+-1|0;M=M+2|0;N=ea+4|0;O=U+1|0;Q=T<<1;P=Q+-1|0;Q=Q+2|0;C=d+2676+((w&1)<<2)|0;g=0;i=x;h=y;while(1){n=c[i+13168+(g<<2)>>2]|0;z=e>>n;q=c[i+13180+(g<<2)>>2]|0;A=f>>q;r=c[E>>2]|0;B=c[r+32+(g<<2)>>2]|0;w=1<>n;t=w>>q;n=c[i+13120>>2]>>n;v=n-z|0;s=(s|0)>(v|0)?v:s;q=c[i+13124>>2]>>q;v=q-A|0;t=(t|0)>(v|0)?v:t;v=R(B,A)|0;u=c[i+56>>2]|0;v=(c[r+(g<<2)>>2]|0)+((z<>2]|0)+w+r|0;y=X+(V*148|0)+142+g|0;switch(a[y>>0]|0){case 1:{Fb(x,v,s<>2]&1](v,x,B,w,Y,Z,s,t,g);Hb(d,v,x,B,w,e,f,s,t,g);S=78;break}case 2:{o=c[Z>>2]|0;p=c[aa>>2]|0;k=c[ca>>2]|0;if(!(c[$>>2]|0)){S=1-o|0;j=0-(S<>2]=v+(0-B)+j;c[I>>2]=(c[d+172+(g<<2)>>2]|0)+((R(n,H)|0)+z-S<>2]|0)+((L+(R(c[i+13128>>2]|0,J)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0,u);j=r;h=c[fa>>2]|0}i=s<>2]|0)+(((R(c[h+13128>>2]|0,J)|0)+T|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+j|0,i|0)|0;if((p|0)!=1){S=j+i|0;Ib(m+S|0,(c[ea+(((a[(c[W>>2]|0)+((K+(R(c[(c[fa>>2]|0)+13128>>2]|0,J)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+S|0,u)}}if(!k){S=1-o|0;m=0-(S<>2]=v+(R(t,B)|0)+m;c[N>>2]=(c[d+172+(g<<2)>>2]|0)+((R(n,M)|0)+z-S<>2]|0)+((L+(R(c[(c[fa>>2]|0)+13128>>2]|0,O)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0,u);h=r}i=s<>2]|0)+(((R(c[(c[fa>>2]|0)+13128>>2]|0,O)|0)+T|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+h|0,i|0)|0;if((p|0)!=1){S=h+i|0;Ib(j+S|0,(c[ea+(((a[(c[W>>2]|0)+((K+(R(c[(c[fa>>2]|0)+13128>>2]|0,O)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+S|0,u)}}if(!o)if((a[(c[W>>2]|0)+((L+(R(c[(c[fa>>2]|0)+13128>>2]|0,U)|0)|0)*148|0)+142+g>>0]|0)==3){i=(R(q,P)|0)+A<>2]|0)+i|0,u,t,w,r);i=0}else i=1;else i=0;if(!p)if((a[(c[W>>2]|0)+((K+(R(c[(c[fa>>2]|0)+13128>>2]|0,U)|0)|0)*148|0)+142+g>>0]|0)==3){h=(R(q,Q)|0)+A<>2]|0)+h|0,u,t,w,r);h=0}else h=1;else h=0;S=0-(i<>2]&3](v,x,B,w,Y,Z,s,t,g,_,ba,da);Hb(d,v,x,B,w,e,f,s,t,g);S=78;break}default:{}}if((S|0)==78){S=0;a[y>>0]=3}g=g+1|0;if((g|0)>=(D|0))break;h=c[fa>>2]|0;i=h;h=c[h+13080>>2]|0}l=ga;return}function Fb(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0;if((d|0)>0){g=0;while(1){Pf(a|0,b|0,c|0)|0;g=g+1|0;if((g|0)==(d|0))break;else{a=a+e|0;b=b+f|0}}}return}function Gb(a,b,d,e,f,g,h,i,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0;m=c[a+200>>2]|0;l=c[m+56>>2]|0;o=c[m+13120>>2]>>c[m+13168+(i<<2)>>2];m=c[m+13124>>2]>>c[m+13180+(i<<2)>>2];p=a+172+(i<<2)|0;n=k<<1;k=g<>2]|0)+((R(o,n)|0)+e<>2]|0)+((R(o,n|1)|0)+e<>2]|0)+((R(m,j)|0)+f<>2]|0)+((R(m,j|1)|0)+f<>2]|0;if(!(a[(c[b+204>>2]|0)+40>>0]|0)){if(a[m+13056>>0]|0?c[m+68>>2]|0:0)n=4}else n=4;if((n|0)==4?(y=c[m+13084>>2]|0,o=1<>2]|0,v=c[m+13180+(l<<2)>>2]|0,w=h>>y,p=i>>y,x=j+h>>y,y=k+i>>y,z=o>>u<>2],(p|0)<(y|0)):0){s=(w|0)<(x|0);r=b+4348|0;o=o>>v;q=(o|0)>0;n=p;do{if(s){b=n-i|0;l=w;do{m=c[t>>2]|0;if(a[(c[r>>2]|0)+((R(c[m+13156>>2]|0,n)|0)+l)>>0]|0?(B=c[m+13084>>2]|0,A=b<>v,B=l-h<>u<>2],q):0){m=d+(R(A,f)|0)+B|0;j=0;k=e+(R(A,g)|0)+B|0;while(1){Pf(m|0,k|0,z|0)|0;j=j+1|0;if((j|0)==(o|0))break;else{m=m+f|0;k=k+g|0}}}l=l+1|0}while((l|0)!=(x|0))}n=n+1|0}while((n|0)!=(y|0))}return}function Ib(c,d,e){c=c|0;d=d|0;e=e|0;if(!e)a[c>>0]=a[d>>0]|0;else b[c>>1]=b[d>>1]|0;return}function Jb(c,d,e,f,g,h){c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;i=(f|0)>0;if(!e){if(i){e=0;while(1){a[c>>0]=a[d>>0]|0;e=e+1|0;if((e|0)==(f|0))break;else{c=c+g|0;d=d+h|0}}}}else if(i){e=0;while(1){b[c>>1]=b[d>>1]|0;e=e+1|0;if((e|0)==(f|0))break;else{c=c+g|0;d=d+h|0}}}return}function Kb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;g=c[b+200>>2]|0;f=c[g+13064>>2]|0;return a[(c[b+4316>>2]|0)+((R(c[g+13140>>2]|0,e>>f)|0)+(d>>f))>>0]|0}function Lb(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;h=c[a+200>>2]|0;i=c[h+13084>>2]|0;if(((e|b|0)>=0?(j=b>>i,f=e>>i,g=c[h+13156>>2]|0,(j|0)<(g|0)):0)?(f|0)<(c[h+13160>>2]|0):0){j=(R(g,f)|0)+j|0;a=d[(c[a+4348>>2]|0)+j>>0]|0}else a=2;return a|0}function Mb(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0;g=c[a+204>>2]|0;b=(c[((e|0)==1?g+28|0:g+32|0)>>2]|0)+b|0;b=(b|0)<0?0:(b|0)<57?b:57;do if((c[(c[a+200>>2]|0)+4>>2]|0)==1){if((b|0)>=30)if((b|0)>43){b=b+-6|0;break}else{b=d[1615+(b+-30)>>0]|0;break}}else b=(b|0)<0?0:(b|0)<51?b:51;while(0);g=f+2+b|0;return d[1561+((g|0)<0?0:(g|0)<53?g:53)>>0]|0|0}function Nb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=c[a+200>>2]|0;i=((c[f+13120>>2]|0)-e|0)<=(b|0);f=((c[f+13124>>2]|0)-e|0)<=(d|0);g=(d|0)!=0;h=(b|0)!=0;if(h&g)Cb(a,b-e|0,d-e|0,e);if(g&i)Cb(a,b,d-e|0,e);if(h&f)Cb(a,b-e|0,d,e);return}function Ob(b){b=b|0;var d=0,e=0,f=0;f=c[b+60>>2]|0;Nd();Ec();d=tc(b)|0;if((d|0)>=0){c[f+4368>>2]=0;c[f+4520>>2]=0;e=c[b+808>>2]|0;if(!(e&2))d=1;else d=c[b+800>>2]&255;a[f+141>>0]=d;if((e&1|0)!=0?(c[b+800>>2]|0)>1:0)d=1;else d=2;a[f+140>>0]=d;d=0}return d|0}function Pb(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0;h=c[a+60>>2]|0;j=g+28|0;a=c[j>>2]|0;if(!a){a=Dc(h,d,1)|0;if((a|0)>=0){c[f>>2]=a;a=0}}else{c[h+2520>>2]=0;i=h+4524|0;b[i>>1]=1;a=Tb(h,c[g+24>>2]|0,a)|0;if((a|0)>=0){a=h+2604|0;if(c[a>>2]|0)c[a>>2]=0;a=c[h+164>>2]|0;if(c[a+304>>2]|0){h=a+128|0;c[h>>2]=e[i>>1];c[h+4>>2]=0;ye(d,a);c[f>>2]=1}a=c[j>>2]|0}}return a|0}function Qb(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=c[b+60>>2]|0;Sb(g);h=g+4412|0;d=g+4392|0;if((c[h>>2]|0)>0){b=0;do{be((c[d>>2]|0)+(b<<2)|0);b=b+1|0}while((b|0)<(c[h>>2]|0))}be(g+4396|0);be(g+4388|0);be(d);be(g+152|0);be(g+168|0);b=0;do{be(g+172+(b<<2)|0);be(g+184+(b<<2)|0);b=b+1|0}while((b|0)!=3);we(g+164|0);b=g+2524|0;yc(g,b,-1);we(b);b=0;do{pe(g+208+(b<<2)|0);b=b+1|0}while((b|0)!=16);b=0;do{pe(g+272+(b<<2)|0);b=b+1|0}while((b|0)!=32);b=0;do{pe(g+400+(b<<2)|0);b=b+1|0}while((b|0)!=256);c[g+200>>2]=0;c[g+204>>2]=0;c[g+196>>2]=0;pe(g+1424|0);be(g+2096|0);be(g+2100|0);be(g+2104|0);f=g+141|0;b=a[f>>0]|0;if((b&255)>1){e=1;do{d=g+72+(e<<2)|0;if(c[d>>2]|0){be(d);be(g+8+(e<<2)|0);b=a[f>>0]|0}e=e+1|0}while((e|0)<(b&255|0))}b=g+136|0;d=g+72|0;if((c[b>>2]|0)==(c[d>>2]|0))c[b>>2]=0;be(d);d=g+4404|0;if((c[h>>2]|0)>0){b=0;do{be((c[d>>2]|0)+(b<<4)|0);b=b+1|0}while((b|0)<(c[h>>2]|0))}be(d);c[h>>2]=0;return 0}function Rb(a){a=a|0;a=c[a+60>>2]|0;Ac(a);c[a+2592>>2]=2147483647;return}function Sb(a){a=a|0;be(a+2504|0);be(a+2508|0);be(a+4332|0);be(a+4336|0);be(a+4340|0);be(a+4344|0);be(a+4348|0);be(a+4316|0);be(a+4328|0);be(a+4352|0);be(a+4320|0);be(a+4324|0);be(a+2096|0);be(a+2104|0);be(a+2100|0);return}function Tb(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;y=b+2520|0;c[y>>2]=0;u=b+2584|0;c[b+2588>>2]=c[u>>2];c[u>>2]=0;x=b+4408|0;c[x>>2]=0;a:do if((f|0)>3){v=b+4470|0;k=b+4412|0;l=b+4396|0;m=b+4384|0;n=b+4392|0;o=b+4380|0;p=b+4404|0;q=b+4376|0;w=b+4388|0;r=b+136|0;s=b+2512|0;t=b+4480|0;while(1){j=(a[v>>0]|0)==0;if(!j){i=c[t>>2]|0;if((i|0)>0){h=0;g=0;do{g=d[e+h>>0]|g<<8;h=h+1|0}while((h|0)<(i|0))}else g=0;f=f-i|0;if((g|0)>(f|0)){e=-1094995529;break a}else{i=e+i|0;h=f}}else{while(1){g=e+1|0;if(((a[e>>0]|0)==0?(a[g>>0]|0)==0:0)?(a[e+2>>0]|0)==1:0)break;if((f|0)<5){e=-1094995529;break a}else{e=g;f=f+-1|0}}g=0;i=e+3|0;h=f+-3|0}g=j?h:g;e=c[k>>2]|0;f=c[x>>2]|0;if((e|0)<=(f|0)){e=e+1|0;f=ce(c[p>>2]|0,e,16)|0;if(!f){e=-12;break a}c[p>>2]=f;j=c[k>>2]|0;Kf(f+(j<<4)|0,0,e-j<<4|0)|0;de(w,e,4)|0;de(l,e,4)|0;de(n,e,4)|0;f=c[l>>2]|0;c[f+(c[k>>2]<<2)>>2]=1024;f=he(c[f+(c[k>>2]<<2)>>2]|0,4)|0;c[(c[n>>2]|0)+(c[k>>2]<<2)>>2]=f;c[k>>2]=e;f=c[x>>2]|0}c[m>>2]=c[(c[l>>2]|0)+(f<<2)>>2];c[o>>2]=c[(c[n>>2]|0)+(f<<2)>>2];e=c[p>>2]|0;g=Ub(b,i,g,e+(f<<4)|0)|0;c[(c[w>>2]|0)+(c[x>>2]<<2)>>2]=c[q>>2];c[(c[l>>2]|0)+(c[x>>2]<<2)>>2]=c[m>>2];A=c[o>>2]|0;z=c[n>>2]|0;j=c[x>>2]|0;c[x>>2]=j+1;c[z+(j<<2)>>2]=A;if((g|0)<0){e=g;break a}e=Vb((c[r>>2]|0)+204|0,c[e+(f<<4)+12>>2]|0,c[e+(f<<4)+8>>2]|0)|0;if((e|0)<0)break a;Wb(b)|0;if((c[s>>2]&-2|0)==36)c[u>>2]=1;f=h-g|0;if((f|0)<=3)break;else e=i+g|0}if((c[x>>2]|0)>0){g=b+4376|0;h=b+4392|0;i=b+4380|0;j=b+4404|0;f=0;do{c[g>>2]=c[(c[w>>2]|0)+(f<<2)>>2];c[i>>2]=c[(c[h>>2]|0)+(f<<2)>>2];A=c[j>>2]|0;if((Xb(b,c[A+(f<<4)+12>>2]|0,c[A+(f<<4)+8>>2]|0)|0)<0)break a;f=f+1|0}while((f|0)<(c[x>>2]|0))}}else e=0;while(0);return e|0}function Ub(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;n=b+4376|0;c[n>>2]=0;a:do if((e|0)>1){g=0;while(1){if(!(a[d+g>>0]|0)){h=g+-1|0;if((g|0)>0)g=(a[d+h>>0]|0)==0?h:g;h=g+2|0;if(((h|0)<(e|0)?(a[d+(g+1)>>0]|0)==0:0)?(i=a[d+h>>0]|0,(i&255)<4):0)break}h=g+2|0;if((g+3|0)<(e|0))g=h;else break a}e=i<<24>>24==3?e:g;h=g}else h=0;while(0);b:do if((h|0)<(e+-1|0)){fe(f,f+4|0,e+32|0);o=c[f>>2]|0;if(!o)e=-12;else{Pf(o|0,d|0,h|0)|0;i=h+2|0;c:do if((i|0)<(e|0)){m=b+4384|0;l=b+4380|0;g=h;b=h;while(1){k=d+i|0;j=a[k>>0]|0;h=a[d+b>>0]|0;do if((j&255)<=3)if(!(h<<24>>24))if(!(a[d+(b+1)>>0]|0)){if(j<<24>>24!=3){i=g;e=b;break c}i=g+1|0;a[o+g>>0]=0;g=g+2|0;a[o+i>>0]=0;b=b+3|0;k=c[n>>2]|0;c[n>>2]=k+1;h=c[m>>2]|0;if((h|0)>(k|0)){h=c[l>>2]|0;if(!h)break}else{h=h<<1;c[m>>2]=h;de(l,h,4)|0;h=c[l>>2]|0;if(!h){e=-12;break b}}c[h+((c[n>>2]|0)+-1<<2)>>2]=i}else{h=0;p=26}else p=26;else{a[o+g>>0]=h;a[o+(g+1)>>0]=a[d+(b+1)>>0]|0;g=g+2|0;b=i;h=a[k>>0]|0;p=26}while(0);if((p|0)==26){p=0;a[o+g>>0]=h;g=g+1|0;b=b+1|0}i=b+2|0;if((i|0)>=(e|0)){p=15;break}}}else{g=h;b=h;p=15}while(0);if((p|0)==15)if((b|0)<(e|0)){i=e+g|0;h=b;while(1){a[o+g>>0]=a[d+h>>0]|0;h=h+1|0;if((h|0)==(e|0))break;else g=g+1|0}i=i-b|0}else{i=g;e=b}g=o+i|0;h=g+32|0;do{a[g>>0]=0;g=g+1|0}while((g|0)<(h|0));c[f+12>>2]=o;c[f+8>>2]=i}}else{c[f+12>>2]=d;c[f+8>>2]=e}while(0);return e|0}function Vb(a,b,c){a=a|0;b=b|0;c=c|0;return nc(a,b,c>>>0>268435455?-8:c<<3)|0}function Wb(a){a=a|0;var b=0,d=0;b=(c[a+136>>2]|0)+204|0;if(!(Sd(b)|0)){c[a+2512>>2]=Pd(b,6)|0;d=Pd(b,6)|0;b=(Pd(b,3)|0)+-1|0;c[a+2516>>2]=b;return ((b|0)<0?-1094995529:(d|0)==0&1)|0}else return -1094995529;return 0}function Xb(d,f,g){d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;f=Vb((c[d+136>>2]|0)+204|0,f,g)|0;a:do if((f|0)>=0){f=Wb(d)|0;b:do if((f|0)>=0){if(!f){f=0;break a}k=d+2512|0;switch(c[k>>2]|0){case 48:{f=fd(d)|0;if((f|0)<0)break b;else{f=0;break a}}case 34:{f=jd(d)|0;if((f|0)<0)break b;else{f=0;break a}}case 40:case 39:{f=pd(d)|0;if((f|0)<0)break b;else{f=0;break a}}case 9:case 8:case 7:case 6:case 21:case 20:case 19:case 18:case 17:case 16:case 5:case 4:case 3:case 2:case 0:case 1:{f=Yb(d)|0;if((f|0)<0)break a;i=d+2592|0;g=c[i>>2]|0;j=c[k>>2]|0;c:do if((g|0)==2147483647){switch(j|0){case 18:case 16:case 17:case 21:{g=c[d+2572>>2]|0;break}case 20:case 19:{g=-2147483648;break}default:{g=2147483647;break c}}c[i>>2]=g}while(0);h=(j|0)==9;if((j&-2|0)==8){if((c[d+2572>>2]|0)<=(g|0)){c[d+2604>>2]=0;f=0;break a}if(h)c[i>>2]=-2147483648}if(!(a[d+1448>>0]|0))if(!(c[d+2520>>2]|0))break b;else f=j;else{f=Zb(d)|0;if((f|0)<0)break a;f=c[k>>2]|0}if((f|0)!=(c[d+4416>>2]|0)){f=-1094995529;break a}f=_b(d)|0;k=c[d+200>>2]|0;if((f|0)>=(R(c[k+13132>>2]|0,c[k+13128>>2]|0)|0))c[d+2604>>2]=1;if((f|0)<0)break b;else{f=0;break a}}case 37:case 36:{f=d+4364|0;b[f>>1]=(e[f>>1]|0)+1&255;c[d+2592>>2]=2147483647;f=0;break a}default:{f=0;break a}}}while(0);f=(c[(c[d+4>>2]|0)+688>>2]&8|0)==0?0:f}while(0);return f|0}function Yb(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=f+136|0;v=(c[u>>2]|0)+204|0;t=(Sd(v)|0)&255;m=f+1448|0;a[m>>0]=t;n=f+2512|0;g=c[n>>2]|0;if(!(t<<24>>24==0|(g+-16|0)>>>0>4)?(t=f+4364|0,b[t>>1]=(e[t>>1]|0)+1&255,c[f+2592>>2]=2147483647,(g+-19|0)>>>0<2):0){zc(f);g=c[n>>2]|0}l=f+2046|0;a[l>>0]=0;if((g&-8|0)==16)a[l>>0]=Sd(v)|0;g=Ud(v)|0;c[f+1428>>2]=g;a:do if(g>>>0<=255?(i=c[f+400+(g<<2)>>2]|0,(i|0)!=0):0){h=a[m>>0]|0;if(!(h<<24>>24)){g=f+204|0;i=c[i+4>>2]|0;if((c[g>>2]|0)!=(i|0)){g=-1094995529;break}t=g}else{t=f+204|0;i=c[i+4>>2]|0}c[t>>2]=i;j=c[n>>2]|0;k=(j|0)==21;if(k?(c[f+2588>>2]|0)==1:0)a[l>>0]=1;s=f+200|0;g=c[s>>2]|0;i=c[(c[f+272+(c[i>>2]<<2)>>2]|0)+4>>2]|0;if((g|0)!=(i|0)){c[s>>2]=i;do if(g|0?!(k|(j&-8|0)!=16):0){if(((c[i+13120>>2]|0)==(c[g+13120>>2]|0)?(c[i+13124>>2]|0)==(c[g+13124>>2]|0):0)?(c[i+76+(((c[i+72>>2]|0)+-1|0)*12|0)>>2]|0)==(c[g+76+(((c[g+72>>2]|0)+-1|0)*12|0)>>2]|0):0)break;a[l>>0]=0}while(0);zc(f);g=oc(f,c[s>>2]|0)|0;if((g|0)<0)break;g=f+4364|0;b[g>>1]=(e[g>>1]|0)+1&255;c[f+2592>>2]=2147483647;g=c[s>>2]|0;h=a[m>>0]|0}r=c[f+4>>2]|0;c[r+832>>2]=d[g+302>>0];c[r+836>>2]=d[g+335>>0];r=f+1449|0;a[r>>0]=0;do if(!(h<<24>>24)){if(a[(c[t>>2]|0)+41>>0]|0){a[r>>0]=Sd(v)|0;g=c[s>>2]|0}g=(R(c[g+13128>>2]<<1,c[g+13132>>2]|0)|0)+-2|0;o=g>>>0>65535;g=o?g>>>16:g;o=o?16:0;p=(g&65280|0)==0;g=Pd(v,(p?o:o|8)+(d[2334+(p?g:g>>>8)>>0]|0)|0)|0;c[f+1432>>2]=g;p=c[s>>2]|0;if(g>>>0>=(R(c[p+13132>>2]|0,c[p+13128>>2]|0)|0)>>>0){g=-1094995529;break a}if(a[r>>0]|0){g=f+156|0;if(!(a[g>>0]|0)){g=-1094995529;break a}else{p=g;break}}else{c[f+1436>>2]=g;i=f+2580|0;c[i>>2]=(c[i>>2]|0)+1;i=f+156|0;q=31;break}}else{c[f+1436>>2]=0;c[f+1432>>2]=0;c[f+2580>>2]=0;i=f+156|0;a[i>>0]=0;q=31}while(0);if((q|0)==31){a[i>>0]=0;if((c[(c[t>>2]|0)+1624>>2]|0)>0){g=0;do{Rd(v,1);g=g+1|0}while((g|0)<(c[(c[t>>2]|0)+1624>>2]|0))}g=Ud(v)|0;c[f+1440>>2]=g;if(g>>>0>=3){g=-1094995529;break}if(!((g|0)==2?1:(c[n>>2]&-8|0)!=16)){g=-1094995529;break}g=f+1450|0;a[g>>0]=1;if(a[(c[t>>2]|0)+39>>0]|0)a[g>>0]=Sd(v)|0;if(a[(c[s>>2]|0)+8>>0]|0)a[f+1451>>0]=Pd(v,2)|0;if(((c[n>>2]|0)+-19|0)>>>0>=2)oa();c[f+1620>>2]=0;c[f+2572>>2]=0;if(!(c[f+2516>>2]|0))c[f+2576>>2]=0;do if(a[(c[s>>2]|0)+12941>>0]|0){a[f+2056>>0]=Sd(v)|0;if(!(c[(c[s>>2]|0)+4>>2]|0)){a[f+2057>>0]=0;a[f+2058>>0]=0;break}else{p=(Sd(v)|0)&255;a[f+2058>>0]=p;a[f+2057>>0]=p;break}}else{a[f+2056>>0]=0;a[f+2057>>0]=0;a[f+2058>>0]=0}while(0);c[f+2052>>2]=0;c[f+2048>>2]=0;c[f+2068>>2]=pc(v)|0;g=c[t>>2]|0;if(!(a[g+36>>0]|0)){c[f+2072>>2]=0;h=0}else{c[f+2072>>2]=pc(v)|0;h=pc(v)|0;g=c[t>>2]|0}c[f+2076>>2]=h;if(!(a[g+1631>>0]|0))h=0;else{h=(Sd(v)|0)&255;g=c[t>>2]|0}a[f+2080>>0]=h;b:do if(!(a[g+55>>0]|0)){a[f+2061>>0]=0;c[f+2084>>2]=0;g=0;q=61}else{do if(a[g+56>>0]|0){if(!(Sd(v)|0)){g=c[t>>2]|0;break}p=(Sd(v)|0)&255;a[f+2061>>0]=p;if(p<<24>>24)break b;c[f+2084>>2]=(pc(v)|0)<<1;g=(pc(v)|0)<<1;q=61;break b}while(0);a[f+2061>>0]=a[g+57>>0]|0;c[f+2084>>2]=c[g+60>>2];g=c[g+64>>2]|0;q=61}while(0);if((q|0)==61)c[f+2088>>2]=g;g=a[(c[t>>2]|0)+54>>0]|0;c:do if(!(g<<24>>24))g=0;else{do if(!(a[f+2056>>0]|0)){if(a[f+2057>>0]|0)break;if(a[f+2061>>0]|0)break c}while(0);g=(Sd(v)|0)&255}while(0);a[f+2062>>0]=g;p=i}o=f+2108|0;c[o>>2]=0;n=c[t>>2]|0;if(!((a[n+42>>0]|0)==0?!(a[n+43>>0]|0):0))q=71;d:do if((q|0)==71){q=Ud(v)|0;c[o>>2]=q;if((q|0)<=0){c[f+4368>>2]=0;break}k=(Ud(v)|0)+1|0;j=k>>4;k=k&15;l=f+2096|0;be(l);q=f+2100|0;be(q);m=f+2104|0;be(m);c[l>>2]=he(c[o>>2]|0,4)|0;c[q>>2]=he(c[o>>2]|0,4)|0;n=he(c[o>>2]|0,4)|0;c[m>>2]=n;if(c[l>>2]|0?!((n|0)==0|(c[q>>2]|0)==0):0){if((c[o>>2]|0)>0){m=(j|0)>0;n=(k|0)==0;i=0;do{if(m){g=0;h=0;do{g=(Pd(v,16)|0)+(g<<16)|0;h=h+1|0}while((h|0)!=(j|0))}else g=0;if(!n)g=(Pd(v,k)|0)+(g<>2]|0)+(i<<2)>>2]=g+1;i=i+1|0}while((i|0)<(c[o>>2]|0))}g=f+141|0;do if((d[g>>0]|0)>1){q=c[t>>2]|0;if((c[q+48>>2]|0)<=1?(c[q+44>>2]|0)<=1:0)break;c[f+4368>>2]=0;a[g>>0]=1;break d}while(0);c[f+4368>>2]=0;break}c[o>>2]=0;g=-12;break a}while(0);if(a[(c[t>>2]|0)+1628>>0]|0){h=Ud(v)|0;o=Lf(h|0,0,3)|0;m=C;q=qc(v)|0;n=((q|0)<0)<<31>>31;if((m|0)>(n|0)|(m|0)==(n|0)&o>>>0>q>>>0){g=-1094995529;break}if(h|0){g=0;do{Rd(v,8);g=g+1|0}while((g|0)!=(h|0))}}h=c[t>>2]|0;t=(c[h+16>>2]|0)+26+(c[f+2068>>2]|0)|0;i=t&255;a[f+2112>>0]=i;t=t<<24;if((t|0)<=855638016?(t>>24|0)>=(0-(c[(c[s>>2]|0)+13192>>2]|0)|0):0){t=c[f+1432>>2]|0;c[f+2500>>2]=t;if((t|0)==0?a[r>>0]|0:0){g=-1094995529;break}if((qc(v)|0)>=0){g=c[u>>2]|0;a[g+203>>0]=(a[r>>0]|0)==0&1;if(!(a[h+22>>0]|0))a[g+272>>0]=i;a[p>>0]=1;a[g+302>>0]=0;a[g+303>>0]=0;g=0}else g=-1094995529}else g=-1094995529}else g=-1094995529;while(0);return g|0}function Zb(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=c[b+136>>2]|0;e=b+200|0;i=c[e>>2]|0;g=c[i+13064>>2]|0;f=c[i+13120>>2]>>g;g=(c[i+13124>>2]>>g)+1|0;i=b+2596|0;j=b+2600|0;Kf(c[b+4320>>2]|0,0,R(c[j>>2]|0,c[i>>2]|0)|0)|0;Kf(c[b+4324>>2]|0,0,R(c[j>>2]|0,c[i>>2]|0)|0)|0;i=c[e>>2]|0;Kf(c[b+4344>>2]|0,0,R(c[i+13152>>2]|0,c[i+13148>>2]|0)|0)|0;i=c[e>>2]|0;Kf(c[b+4348>>2]|0,0,R((c[i+13160>>2]|0)+1|0,(c[i+13156>>2]|0)+1|0)|0)|0;Kf(c[b+4328>>2]|0,-1,R((f<<2)+4|0,g)|0)|0;c[b+2604>>2]=0;g=b+2512|0;c[b+4416>>2]=c[g>>2];f=c[b+204>>2]|0;if(a[f+42>>0]|0)c[d+312>>2]=c[c[f+1648>>2]>>2]<>2]|0)+13080>>2];f=b+160|0;d=Bc(b,f,c[b+2572>>2]|0)|0;if((d|0)>=0){e=b+2520|0;c[(c[c[e>>2]>>2]|0)+80>>2]=(c[g>>2]&-8|0)==16&1;c[(c[f>>2]|0)+84>>2]=3-(c[b+1440>>2]|0);d=b+164|0;xe(c[d>>2]|0);d=Dc(b,c[d>>2]|0,0)|0;if((d|0)<0)h=7;else d=0}else{e=b+2520|0;h=7}if((h|0)==7){c[e>>2]=0}return d|0}function _b(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+8|0;b=d;c[e>>2]=0;c[e+4>>2]=1;a=c[a+4>>2]|0;ua[c[a+816>>2]&1](a,1,e,b,1,4)|0;l=d;return c[b>>2]|0}function $b(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;r=c[b+60>>2]|0;p=r+200|0;h=c[p>>2]|0;s=1<>2];q=r+204|0;d=c[q>>2]|0;b=c[(c[d+1668>>2]|0)+(c[r+2500>>2]<<2)>>2]|0;e=(a[r+1449>>0]|0)==0;do if((b|0)!=0|e){if(!e?(c[(c[r+4328>>2]|0)+(c[(c[d+1672>>2]|0)+(b+-1<<2)>>2]<<2)>>2]|0)!=(c[r+1436>>2]|0):0){b=-1094995529;break}j=s+-1|0;k=r+2084|0;l=r+2508|0;m=r+2088|0;n=r+2062|0;o=r+4352|0;g=0;f=0;e=h;d=c[h+13120>>2]|0;do{if((b|0)>=(c[e+13136>>2]|0))break;h=c[(c[(c[q>>2]|0)+1672>>2]|0)+(b<<2)>>2]|0;g=c[e+13080>>2]|0;i=j+d>>g;f=((h|0)%(i|0)|0)<>2]|0)+13080>>2]|0;bc(r,f>>i,g>>i);i=c[l>>2]|0;c[i+(h<<3)>>2]=c[k>>2];c[i+(h<<3)+4>>2]=c[m>>2];a[(c[o>>2]|0)+h>>0]=a[n>>0]|0;i=cc(r,f,g,c[(c[p>>2]|0)+13080>>2]|0,0)|0;if((i|0)<0){t=8;break}b=b+1|0;La(r,b);Nb(r,f,g,s);e=c[p>>2]|0;d=c[e+13120>>2]|0}while((i|0)!=0);if((t|0)==8){c[(c[r+4328>>2]|0)+(h<<2)>>2]=-1;b=i;break}if((f+s|0)>=(d|0)?(g+s|0)>=(c[e+13124>>2]|0):0)Cb(r,f,g,s)}else b=-1094995529;while(0);return b|0}function ac(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;o=c[b+136>>2]|0;k=c[b+200>>2]|0;g=k+13080|0;h=1<>2];l=c[b+204>>2]|0;m=c[(c[l+1672>>2]|0)+(f<<2)>>2]|0;p=c[b+1436>>2]|0;n=m-p|0;i=c[b+4328>>2]|0;j=i+(m<<2)|0;c[j>>2]=p;do if(!(a[l+43>>0]|0)){b=a[l+42>>0]|0;if(!(b<<24>>24)){c[o+312>>2]=c[k+13120>>2];b=0;break}if((f|0)!=0?(p=c[l+1676>>2]|0,(c[p+(f<<2)>>2]|0)!=(c[p+(f+-1<<2)>>2]|0)):0){p=c[g>>2]|0;c[o+312>>2]=(c[(c[l+1648>>2]|0)+(c[(c[l+1664>>2]|0)+(d>>p<<2)>>2]<<2)>>2]<>0]=1}}else{if((d|0)==0?(h+-1&e|0)==0:0)a[o+203>>0]=1;c[o+312>>2]=c[k+13120>>2];b=a[l+42>>0]|0}while(0);h=h+e|0;p=c[k+13124>>2]|0;c[o+316>>2]=(h|0)>(p|0)?p:h;h=o+31312|0;c[h>>2]=0;if(!(b<<24>>24)){if(!n){c[h>>2]=1;b=1}else b=0;if((n|0)<(c[k+13128>>2]|0)){b=b|4;c[h>>2]=b}}else{if((d|0)>0){p=c[l+1676>>2]|0;g=m+-1|0;if((c[p+(f<<2)>>2]|0)==(c[p+(c[(c[l+1668>>2]|0)+(g<<2)>>2]<<2)>>2]|0))b=0;else{c[h>>2]=2;b=2}if((c[j>>2]|0)!=(c[i+(g<<2)>>2]|0)){b=b|1;c[h>>2]=b}}else b=0;if((e|0)>0){p=c[l+1676>>2]|0;g=m-(c[k+13128>>2]|0)|0;if((c[p+(f<<2)>>2]|0)!=(c[p+(c[(c[l+1668>>2]|0)+(g<<2)>>2]<<2)>>2]|0)){b=b|8;c[h>>2]=b}if((c[j>>2]|0)!=(c[i+(g<<2)>>2]|0)){b=b|4;c[h>>2]=b}}}h=(d|0)>0;if(h&(n|0)>0)g=(b>>>1&1^1)&255;else g=0;a[o+308>>0]=g;if((e|0)>0){g=c[k+13128>>2]|0;if((n|0)<(g|0))b=0;else b=(b>>>3&1^1)&255;a[o+309>>0]=b;if((n+1|0)<(g|0))b=0;else{b=c[l+1676>>2]|0;b=(c[b+(f<<2)>>2]|0)==(c[b+(c[(c[l+1668>>2]|0)+(m+1-g<<2)>>2]<<2)>>2]|0)&1}a[o+310>>0]=b;if(h&(n|0)>(g|0)){b=c[l+1676>>2]|0;b=(c[b+(f<<2)>>2]|0)==(c[b+(c[(c[l+1668>>2]|0)+(m+-1-g<<2)>>2]<<2)>>2]|0)&1}else b=0}else{a[o+309>>0]=0;a[o+310>>0]=0;b=0}a[o+311>>0]=b;return}function bc(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;h=c[e+136>>2]|0;B=e+2504|0;C=c[B>>2]|0;D=e+200|0;A=(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)+f|0;if((a[e+2056>>0]|0)==0?(a[e+2057>>0]|0)==0:0){h=0;i=0}else{if((f|0)>0?(a[h+308>>0]|0)!=0:0)i=Sa(e)|0;else i=0;if(!((g|0)<1|(i|0)!=0))if(!(a[h+309>>0]|0)){h=0;i=0}else{h=Sa(e)|0;i=0}else h=0}t=c[(c[D>>2]|0)+4>>2]|0?3:1;u=e+204|0;v=C+(A*148|0)+143|0;w=C+(A*148|0)+144|0;x=C+(A*148|0)+104|0;y=C+(A*148|0)+108|0;z=(h|0)==0;s=(i|h|0)==0;o=(i|0)==0;p=g+-1|0;q=f+-1|0;m=C+(A*148|0)+144|0;l=0;do{r=c[u>>2]|0;r=d[((l|0)==0?r+1644|0:r+1645|0)>>0]|0;if(a[e+2056+l>>0]|0){j=(l|0)==2;do if(j){h=a[v>>0]|0;a[w>>0]=h;c[y>>2]=c[x>>2];n=m}else{if(s){h=(Ua(e)|0)&255;n=C+(A*148|0)+142+l|0;a[n>>0]=h;break}if(!o){h=a[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+142+l>>0]|0;n=C+(A*148|0)+142+l|0;a[n>>0]=h;break}if(z)h=0;else h=a[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+142+l>>0]|0;n=C+(A*148|0)+142+l|0;a[n>>0]=h}while(0);if(h<<24>>24){h=0;do{do if(!s){if(!o){i=c[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+(l<<4)+(h<<2)>>2]|0;break}if(z)i=0;else i=c[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+(l<<4)+(h<<2)>>2]|0}else i=Xa(e)|0;while(0);c[C+(A*148|0)+(l<<4)+(h<<2)>>2]=i;h=h+1|0}while((h|0)!=4);do if((a[n>>0]|0)!=1){if(!j){if(s){c[C+(A*148|0)+100+(l<<2)>>2]=Za(e)|0;break}if(!o){c[C+(A*148|0)+100+(l<<2)>>2]=c[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+100+(l<<2)>>2];break}if(z)h=0;else h=c[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+100+(l<<2)>>2]|0;c[C+(A*148|0)+100+(l<<2)>>2]=h}}else{h=0;do{do if(c[C+(A*148|0)+(l<<4)+(h<<2)>>2]|0){if(s){i=Ya(e)|0;break}if(!o){i=c[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+48+(l<<4)+(h<<2)>>2]|0;break}if(!z)i=c[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+48+(l<<4)+(h<<2)>>2]|0;else i=0}else i=0;while(0);c[C+(A*148|0)+48+(l<<4)+(h<<2)>>2]=i;h=h+1|0}while((h|0)!=4);if(s){a[C+(A*148|0)+96+l>>0]=Wa(e)|0;break}if(!o){a[C+(A*148|0)+96+l>>0]=a[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+96+l>>0]|0;break}if(z)h=0;else h=a[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+96+l>>0]|0;a[C+(A*148|0)+96+l>>0]=h}while(0);b[C+(A*148|0)+112+(l*10|0)>>1]=0;j=0;do{h=c[C+(A*148|0)+(l<<4)+(j<<2)>>2]|0;i=j;j=j+1|0;k=C+(A*148|0)+112+(l*10|0)+(j<<1)|0;b[k>>1]=h;if((a[n>>0]|0)==2){if((i|0)>1){h=0-h|0;b[k>>1]=h}}else if(c[C+(A*148|0)+48+(l<<4)+(i<<2)>>2]|0){h=0-h|0;b[k>>1]=h}b[k>>1]=h<<16>>16<>0]=0;l=l+1|0}while((l|0)<(t|0));return}function cc(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;p=c[b+136>>2]|0;s=1<>2]|0;k=b+204|0;i=c[k>>2]|0;o=(1<<(c[j+13080>>2]|0)-(c[i+24>>2]|0))+-1|0;c[p+31232>>2]=h;r=s+e|0;if(((r|0)<=(c[j+13120>>2]|0)?(s+f|0)<=(c[j+13124>>2]|0):0)?(c[j+13064>>2]|0)>>>0>>0:0){j=eb(b,h,e,f)|0;i=c[k>>2]|0}else j=(c[j+13064>>2]|0)>>>0>>0&1;if(a[i+22>>0]|0?((c[(c[q>>2]|0)+13080>>2]|0)-(c[i+24>>2]|0)|0)>>>0<=g>>>0:0){a[p+300>>0]=0;c[p+280>>2]=0}if(a[b+2080>>0]|0?((c[(c[q>>2]|0)+13080>>2]|0)-(d[i+1632>>0]|0)|0)>>>0<=g>>>0:0)a[p+301>>0]=0;a:do if(!j){i=dc(b,e,f,g)|0;if((i|0)>=0){i=c[q>>2]|0;j=1<>2];if((r|0)%(j|0)|0|0?(r|0)<(c[i+13120>>2]|0):0){i=1;break}s=s+f|0;if((s|0)%(j|0)|0|0?(s|0)<(c[i+13124>>2]|0):0){i=1;break}i=(_a(b)|0)==0&1}}else{l=s>>1;m=l+e|0;n=l+f|0;g=g+-1|0;k=h+1|0;i=cc(b,e,f,g,k)|0;if((i|0)>=0){do if(i){j=c[q>>2]|0;if((m|0)<(c[j+13120>>2]|0)){i=cc(b,m,f,g,k)|0;if((i|0)<0)break a;if(!i){i=0;break}j=c[q>>2]|0}if((n|0)<(c[j+13124>>2]|0)){i=cc(b,e,n,g,k)|0;if((i|0)<0)break a;if(!i){i=0;break}j=c[q>>2]|0}if((m|0)<(c[j+13120>>2]|0)?(n|0)<(c[j+13124>>2]|0):0){i=cc(b,m,n,g,k)|0;if((i|0)<0)break a}}else i=0;while(0);if((o&r|0)==0?(o&s+f|0)==0:0)c[p+276>>2]=a[p+272>>0];if(!i)i=0;else{i=c[q>>2]|0;if((m+l|0)<(c[i+13120>>2]|0))i=1;else i=(n+l|0)<(c[i+13124>>2]|0);i=i&1}}}while(0);return i|0}function dc(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;y=c[b+136>>2]|0;B=b+200|0;w=c[B>>2]|0;v=c[w+13064>>2]|0;u=c[w+13140>>2]|0;r=b+204|0;w=1<<(c[w+13080>>2]|0)-(c[(c[r>>2]|0)+24>>2]|0);c[y+31236>>2]=e;c[y+31240>>2]=f;m=y+31252|0;a[m>>0]=1;o=y+31244|0;c[o>>2]=1;j=y+31248|0;c[j>>2]=0;p=y+31254|0;a[p>>0]=0;n=y+31253|0;a[n>>0]=0;k=b+4332|0;t=(R(f>>v,u)|0)+(e>>v)|0;a[(c[k>>2]|0)+t>>0]=0;x=y+31268|0;a[x>>0]=1;a[x+1>>0]=1;a[x+2>>0]=1;a[x+3>>0]=1;x=1<>v;w=w+-1|0;if(a[(c[r>>2]|0)+40>>0]|0){s=($a(b)|0)&255;a[y+31256>>0]=s;if(s<<24>>24)ec(b,e,f,g)}else a[y+31256>>0]=0;s=(v|0)>0;if(s){h=0;i=t;while(1){Kf((c[k>>2]|0)+i|0,0,v|0)|0;h=h+1|0;if((h|0)==(v|0))break;else i=i+u|0}}if(!((c[o>>2]|0)==1?(c[(c[B>>2]|0)+13064>>2]|0)!=(g|0):0))q=9;if((q|0)==9?(i=fb(b,g)|0,c[j>>2]=i,k=c[o>>2]|0,a[p>>0]=(i|0)==3&(k|0)==1&1,(k|0)!=1):0)oa();if((((c[j>>2]|0)==0?(l=c[B>>2]|0,(c[l+68>>2]|0)!=0):0)?(c[l+13048>>2]|0)>>>0<=g>>>0:0)?(c[l+13052>>2]|0)>>>0>=g>>>0:0){h=(gb(b)|0)&255;a[n>>0]=h}else h=a[n>>0]|0;if(h<<24>>24){fc(b,e,f,g);h=gc(b,e,f,g)|0;if(a[(c[B>>2]|0)+13056>>0]|0)ec(b,e,f,g);if((h|0)>=0)q=22}else{hc(b,e,f,g);q=22}a:do if((q|0)==22){do if(!(a[n>>0]|0)){if(!(a[m>>0]|0)){if(a[b+2061>>0]|0)break;Bb(b,e,f,g);break}h=c[B>>2]|0;if((c[o>>2]|0)==1)h=(d[p>>0]|0)+(c[h+13092>>2]|0)|0;else h=c[h+13088>>2]|0;a[y+31255>>0]=h;h=ic(b,e,f,e,f,e,f,g,g,0,0,2592,2592)|0;if((h|0)<0)break a}while(0);if(a[(c[r>>2]|0)+22>>0]|0?(a[y+300>>0]|0)==0:0)zb(b,e,f,g);if(s){j=b+4316|0;k=y+272|0;i=0;h=t;while(1){Kf((c[j>>2]|0)+h|0,a[k>>0]|0,v|0)|0;i=i+1|0;if((i|0)==(v|0))break;else h=h+u|0}}if((w&x+e|0)==0?(w&x+f|0)==0:0)c[y+276>>2]=a[y+272>>0];h=c[B>>2]|0;i=c[h+13064>>2]|0;k=x>>i;j=e>>i;i=f>>i;if((k|0)>0?(z=b+4336|0,A=c[y+31232>>2]&255,Kf((c[z>>2]|0)+((R(c[h+13140>>2]|0,i)|0)+j)|0,A|0,k|0)|0,(k|0)!=1):0){h=1;do{Kf((c[z>>2]|0)+((R(c[(c[B>>2]|0)+13140>>2]|0,h+i|0)|0)+j)|0,A|0,k|0)|0;h=h+1|0}while((h|0)!=(k|0));h=0}else h=0}while(0);return h|0}function ec(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;k=1<>2]|0;h=c[j+13084>>2]|0;l=c[j+13156>>2]|0;f=k+d|0;g=c[j+13120>>2]|0;k=k+e|0;j=c[j+13124>>2]|0;e=e>>h;k=((k|0)>(j|0)?j:k)>>h;if((e|0)<(k|0)){j=d>>h;h=((f|0)>(g|0)?g:f)>>h;i=(j|0)<(h|0);g=b+4348|0;do{if(i){d=R(e,l)|0;f=j;do{a[(c[g>>2]|0)+(f+d)>>0]=2;f=f+1|0}while((f|0)!=(h|0))}e=e+1|0}while((e|0)!=(k|0))}return}function fc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=c[a+200>>2]|0;f=c[h+13084>>2]|0;e=1<>f;h=c[h+13156>>2]|0;g=b>>f;f=d>>f;d=(e|0)==0?1:e;if((d|0)>0){b=a+4340|0;e=0;do{Kf((c[b>>2]|0)+((R(e+f|0,h)|0)+g)|0,1,d|0)|0;e=e+1|0}while((e|0)<(d|0))}return}function gc(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;t=l;l=l+32|0;q=t;s=1<>2]|0;j=c[y+32>>2]|0;m=R(j,f)|0;k=b+200|0;i=c[k>>2]|0;h=c[i+56>>2]|0;m=(c[y>>2]|0)+((e<>2]|0;u=c[i+13184>>2]|0;o=R(f>>u,n)|0;v=c[i+13172>>2]|0;o=(c[y+4>>2]|0)+((e>>v<>2]|0;w=c[i+13188>>2]|0;r=R(f>>w,p)|0;x=c[i+13176>>2]|0;r=(c[y+8>>2]|0)+((e>>x<>0]|0,s<>x,s>>w)|0)+(R(s>>v,s>>u)|0)|0;h=(R(u,d[i+13045>>0]|0)|0)+h|0;i=mc((c[b+136>>2]|0)+224|0,h+7>>3)|0;if(!(a[b+2061>>0]|0))Bb(b,e,f,g);e=nc(q,i,h)|0;if((e|0)>=0){y=b+2608|0;Aa[c[y>>2]&3](m,j,s,s,q,d[(c[k>>2]|0)+13044>>0]|0);e=c[k>>2]|0;Aa[c[y>>2]&3](o,n,s>>c[e+13172>>2],s>>c[e+13184>>2],q,d[e+13045>>0]|0);e=c[k>>2]|0;Aa[c[y>>2]&3](r,p,s>>c[e+13176>>2],s>>c[e+13188>>2],q,d[e+13045>>0]|0);e=0}l=t;return e|0}function hc(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+16|0;p=s;r=c[b+136>>2]|0;j=(c[r+31248>>2]|0)==3;h=1<>0]=hb(b)|0;f=f+1|0}while((f|0)<(q|0));g=g+1|0}while((g|0)<(q|0));h=h>>(j&1);i=r+31264|0;j=r+31260|0;f=0;do{k=f<<1;m=(R(f,h)|0)+e|0;g=0;do{n=g+k|0;o=a[p+n>>0]|0;if(!(o<<24>>24))c[i>>2]=jb(b)|0;else c[j>>2]=ib(b)|0;a[r+31268+n>>0]=lc(b,(R(g,h)|0)+d|0,m,h,o&255)|0;g=g+1|0}while((g|0)<(q|0));f=f+1|0}while((f|0)<(q|0));switch(c[(c[b+200>>2]|0)+4>>2]|0){case 3:{h=0;do{j=h<<1;i=0;do{g=kb(b)|0;k=i+j|0;a[r+31281+k>>0]=g;f=a[r+31268+k>>0]|0;if((g|0)!=4){p=a[1634+g>>0]|0;f=f<<24>>24==p<<24>>24?34:p}a[r+31277+k>>0]=f;i=i+1|0}while((i|0)<(q|0));h=h+1|0}while((h|0)<(q|0));break}case 2:{g=kb(b)|0;a[r+31281>>0]=g;f=a[r+31268>>0]|0;if((g|0)!=4){b=a[1634+g>>0]|0;f=f<<24>>24==b<<24>>24?34:b}a[r+31277>>0]=a[1638+(f&255)>>0]|0;break}case 0:break;default:{g=kb(b)|0;f=a[r+31268>>0]|0;if((g|0)!=4){b=a[1634+g>>0]|0;f=f<<24>>24==b<<24>>24?34:b}a[r+31277>>0]=f}}l=s;return}function ic(b,e,f,g,h,i,j,k,m,n,o,p,q){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+16|0;B=E+8|0;C=E;A=c[b+136>>2]|0;r=c[p>>2]|0;c[B>>2]=r;s=c[p+4>>2]|0;v=B+4|0;c[v>>2]=s;x=c[q>>2]|0;c[C>>2]=x;q=c[q+4>>2]|0;w=C+4|0;c[w>>2]=q;u=a[A+31254>>0]|0;if(u<<24>>24){if((n|0)==1){c[A+288>>2]=d[A+31268+o>>0];p=(c[(c[b+200>>2]|0)+4>>2]|0)==3?o:0;D=5}}else{c[A+288>>2]=d[A+31268>>0];p=0;D=5}if((D|0)==5){c[A+292>>2]=d[A+31277+p>>0];c[A+296>>2]=d[A+31281+p>>0]}y=b+200|0;p=c[y>>2]|0;t=(c[p+13076>>2]|0)>>>0>>0;if(((!t?(c[p+13072>>2]|0)>>>0>>0:0)?(d[A+31255>>0]|0)>(n|0):0)?!((n|0)==0&u<<24>>24!=0):0)t=(lb(b,m)|0)&255;else{if((c[p+13088>>2]|0)==0?(c[A+31244>>2]|0)==0:0)p=(n|0)==0&(c[A+31248>>2]|0)!=0;else p=0;if(t)p=1;else p=p|(n|0)==0&u<<24>>24!=0;t=p&1}p=c[(c[y>>2]|0)+4>>2]|0;if((m|0)>2)if(!p)p=x;else D=20;else if((p|0)==3)D=20;else p=x;if((D|0)==20){p=(n|0)!=0;if(!(p&(r|0)==0)){r=mb(b,n)|0;c[B>>2]=r;if((c[(c[y>>2]|0)+4>>2]|0)==2?(m|0)==3|t<<24>>24==0:0){s=mb(b,n)|0;c[v>>2]=s}}else r=0;if(!(p&(x|0)==0)){p=mb(b,n)|0;c[C>>2]=p;if((c[(c[y>>2]|0)+4>>2]|0)==2?(m|0)==3|t<<24>>24==0:0){q=mb(b,n)|0;c[w>>2]=q}}else p=0}if(!(t<<24>>24)){y=c[y>>2]|0;t=c[y+13072>>2]|0;u=1<>2]|0;if(((r|n|p|0)==0?(c[A+31244>>2]|0)!=1:0)?((q|s|0)==0?1:(c[y+4>>2]|0)!=2):0)q=1;else q=nb(b,n)|0;p=jc(b,e,f,g,h,i,j,k,m,o,q,B,C)|0;if((p|0)>=0){if(q|0?(z=1<>t,v)|0;p=0;do{a[(c[r>>2]|0)+((p+e>>t)+s)>>0]=1;p=p+u|0}while((p|0)<(z|0));q=q+u|0}while((q|0)<(z|0))}if(((a[b+2061>>0]|0)==0?(Bb(b,e,f,m),(a[(c[b+204>>2]|0)+40>>0]|0)!=0):0)?(a[A+31256>>0]|0)!=0:0){ec(b,e,f,m);D=47}else D=47}}else{r=m+-1|0;t=1<=0){p=ic(b,s,f,e,f,i,j,k,r,q,1,B,C)|0;if((p|0)>=0){p=ic(b,e,t,e,f,i,j,k,r,q,2,B,C)|0;if((p|0)>=0){p=ic(b,s,t,e,f,i,j,k,r,q,3,B,C)|0;if((p|0)>-1)D=47}}}}if((D|0)==47)p=0;l=E;return p|0}function jc(d,e,f,g,h,i,j,k,l,m,n,o,p){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;B=c[d+136>>2]|0;E=d+200|0;C=l-(c[(c[E>>2]|0)+13172>>2]|0)|0;D=B+31244|0;r=1<>2]|0)==1){ed(d,e,f,r,r);uc(d,e,f,l,0)}z=(n|0)!=0;n=(c[o>>2]|0)==0;do if(z)if(n)w=10;else{r=1;w=14}else if(n?(c[p>>2]|0)==0:0){q=c[E>>2]|0;n=c[q+4>>2]|0;if((n|0)==2){if(c[o+4>>2]|0){w=10;break}if(c[p+4>>2]|0){w=10;break}}if(!((n|0)==0|(c[D>>2]|0)!=1)){if((l|0)>2|(n|0)==3){r=1<<(c[q+13172>>2]|0)+C;q=1<<(c[q+13184>>2]|0)+C;ed(d,e,f,r,q);uc(d,e,f,C,1);uc(d,e,f,C,2);n=(1<>2]|0)+4>>2]|0)!=2){n=0;break}ed(d,e,n,r,q);uc(d,e,n,C,1);uc(d,e,n,C,2);n=0;break}if((m|0)==3?(s=1<>2]|0)+l,ed(d,g,h,s,t),uc(d,g,h,l,1),uc(d,g,h,l,2),u=r+h|0,(c[(c[E>>2]|0)+4>>2]|0)==2):0){ed(d,g,u,s,t);uc(d,g,u,l,1);uc(d,g,u,l,2);n=0}else n=0}else n=0}else{r=1;w=14}while(0);if((w|0)==10)if(!(c[p>>2]|0))if((c[(c[E>>2]|0)+4>>2]|0)==2)if(!(c[o+4>>2]|0)){r=(c[p+4>>2]|0)!=0;w=14}else{r=1;w=14}else{r=0;w=14}else{r=1;w=14}a:do if((w|0)==14){s=d+204|0;if(a[(c[s>>2]|0)+22>>0]|0?(v=B+300|0,(a[v>>0]|0)==0):0){A=ab(d)|0;q=B+280|0;c[q>>2]=A;if(A){A=(bb(d)|0)==1;n=c[q>>2]|0;if(A){n=0-n|0;c[q>>2]=n}}else n=0;a[v>>0]=1;A=(c[(c[E>>2]|0)+13192>>2]|0)/2|0;if((n|0)<(-26-A|0)|(n|0)>(A+25|0)){n=-1094995529;break}zb(d,i,j,k)}if((r&(a[d+2080>>0]|0)!=0?(a[B+31256>>0]|0)==0:0)?(x=B+301|0,(a[x>>0]|0)==0):0){if(!(cb(d)|0)){a[B+302>>0]=0;n=0}else{n=c[s>>2]|0;if(!(a[n+1633>>0]|0))q=0;else{q=db(d)|0;n=c[s>>2]|0}a[B+302>>0]=a[n+1634+q>>0]|0;n=a[n+1639+q>>0]|0}a[B+303>>0]=n;a[x>>0]=1}if((l|0)<4&(c[D>>2]|0)==1){n=c[B+288>>2]|0;A=c[B+292>>2]|0;A=(A+-6|0)>>>0<9?2:(A+-22|0)>>>0<9&1;n=(n+-6|0)>>>0<9?2:(n+-22|0)>>>0<9&1}else{A=0;n=0}y=B+304|0;a[y>>0]=0;if(z)qb(d,e,f,l,n,0);q=c[E>>2]|0;n=c[q+4>>2]|0;if(!n)n=0;else{if(!((l|0)>2|(n|0)==3)){if((m|0)!=3){n=0;break}s=1<>2]|0)+l;n=0;do{q=(n<>2]|0)==1){ed(d,g,q,s,r);uc(d,g,q,l,1)}if(c[o+(n<<2)>>2]|0)qb(d,g,q,l,A,1);n=n+1|0}while((n|0)<(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0));n=0;while(1){q=(n<>2]|0)==1){ed(d,g,q,s,r);uc(d,g,q,l,2)}if(c[p+(n<<2)>>2]|0)qb(d,g,q,l,A,2);n=n+1|0;if((n|0)>=(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0)){n=0;break a}}}x=1<<(c[q+13172>>2]|0)+C;w=1<<(c[q+13184>>2]|0)+C;do if(z&(a[(c[s>>2]|0)+1630>>0]|0)!=0){if(c[D>>2]|0){l=(c[B+296>>2]|0)==4;a[y>>0]=l&1;if(!l)break}else a[y>>0]=1;kc(d,0)}else a[y>>0]=0;while(0);t=d+160|0;u=B+320|0;i=B+11680|0;v=1<0;k=d+2612+(C+-2<<2)|0;s=B+284|0;n=0;do{q=(n<>2]|0)==1){ed(d,e,q,x,w);uc(d,e,q,C,1)}if(!(c[o+(n<<2)>>2]|0)){if(a[y>>0]|0){l=c[t>>2]|0;q=c[l+36>>2]|0;B=c[E>>2]|0;r=R(f>>c[B+13184>>2],q)|0;r=(c[l+4>>2]|0)+((e>>c[B+13172>>2]<>2])+r)|0;if(j){n=0;do{b[i+(n<<1)>>1]=(R(b[u+(n<<1)>>1]|0,c[s>>2]|0)|0)>>>3;n=n+1|0}while((n|0)!=(v|0));n=v}else n=0;xa[c[k>>2]&7](r,i,q)}}else qb(d,e,q,C,A,1);n=n+1|0}while((n|0)<(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0));if(!(a[y>>0]|0))n=0;else{kc(d,1);n=0}do{q=(n<>2]|0)==1){ed(d,e,q,x,w);uc(d,e,q,C,2)}if(!(c[p+(n<<2)>>2]|0)){if(a[y>>0]|0){B=c[t>>2]|0;q=c[B+40>>2]|0;o=c[E>>2]|0;r=R(f>>c[o+13188>>2],q)|0;r=(c[B+8>>2]|0)+((e>>c[o+13176>>2]<>2])+r)|0;if(j){n=0;do{b[i+(n<<1)>>1]=(R(b[u+(n<<1)>>1]|0,c[s>>2]|0)|0)>>>3;n=n+1|0}while((n|0)!=(v|0));n=v}else n=0;xa[c[k>>2]&7](r,i,q)}}else qb(d,e,q,C,A,2);n=n+1|0}while((n|0)<(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0));n=0}}while(0);return n|0}function kc(a,b){a=a|0;b=b|0;var d=0,e=0;e=c[a+136>>2]|0;d=ob(a,b)|0;if(!d)a=0;else a=1-((pb(a,b)|0)<<1)<>2]=a;return}function lc(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+16|0;o=s;m=c[b+136>>2]|0;i=c[b+200>>2]|0;n=c[i+13084>>2]|0;p=e>>n;q=f>>n;r=c[i+13156>>2]|0;n=g>>n;i=c[i+13080>>2]|0;g=(1<>0]|0)!=0|(g&f|0)!=0){j=(R(q+-1|0,r)|0)+p|0;j=d[(c[b+4340>>2]|0)+j>>0]|0}else j=1;if((g&e|0)!=0|(a[m+308>>0]|0)!=0){e=p+-1+(R(q,r)|0)|0;e=d[(c[b+4340>>2]|0)+e>>0]|0}else e=1;g=(f>>i<>>0<2){c[o>>2]=0;c[o+4>>2]=1;i=26;j=0;g=1;break}else{c[o>>2]=e;g=(e+29&31)+2|0;c[o+4>>2]=g;i=(e+31&31)+2|0;j=e;break}else{c[o>>2]=e;c[o+4>>2]=g;if((g|0)==0|(e|0)==0){i=(e|0)==1?26:(g|0)!=1?1:26;j=e}else{i=0;j=e}}while(0);k=o+8|0;c[k>>2]=i;if(!h){f=o+4|0;if((j|0)>(g|0)){e=g&255;c[f>>2]=j;c[o>>2]=e;g=j}else e=j;if((e|0)>(i|0)){h=i&255;c[k>>2]=e;c[o>>2]=h;i=e;e=h}if((g|0)>(i|0)){c[k>>2]=g;c[f>>2]=i&255}g=c[m+31264>>2]|0;g=((g|0)>=(e|0)&1)+g|0;e=1;do{g=((g|0)>=(c[o+(e<<2)>>2]|0)&1)+g|0;e=e+1|0}while((e|0)!=3)}else g=c[o+(c[m+31260>>2]<<2)>>2]|0;f=(n|0)==0?1:n;if((f|0)>0){i=b+4340|0;j=g&255;e=0;do{Kf((c[i>>2]|0)+((R(e+q|0,r)|0)+p)|0,j|0,f|0)|0;e=e+1|0}while((e|0)<(f|0))}l=s;return g|0}function mc(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+16>>2]|0;e=c[a>>2]|0;d=(e&1|0)==0?d:d+-1|0;d=(e&511|0)==0?d:d+-1|0;e=(c[a+20>>2]|0)-d|0;if((e|0)<(b|0))d=0;else Md(a,d+b|0,e-b|0);return d|0}function nc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=(b|0)!=0&d>>>0<2147483640;d=e?d:0;b=e?b:0;c[a>>2]=b;c[a+12>>2]=d;c[a+16>>2]=d+8;c[a+4>>2]=b+(d+7>>3);c[a+8>>2]=0;return (e?0:-1094995529)|0}function oc(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;j=l;l=l+16|0;g=j;Sb(b);f=sc(b,e)|0;if((f|0)<0){Sb(b);c[b+200>>2]=0}else{h=b+4|0;i=c[h>>2]|0;c[i+124>>2]=c[e+13120>>2];c[i+128>>2]=c[e+13124>>2];c[i+116>>2]=c[e+12>>2];c[i+120>>2]=c[e+16>>2];c[i+136>>2]=c[e+60>>2];c[i+172>>2]=c[e+76+(((c[e+72>>2]|0)+-1|0)*12|0)+4>>2];i=e+160|0;c[g>>2]=c[i>>2];c[g+4>>2]=c[i+4>>2];if(!(c[e+176>>2]|0))f=1;else f=c[e+184>>2]|0?2:1;i=c[h>>2]|0;c[i+392>>2]=f;if(!(c[e+188>>2]|0)){f=2;g=2;h=2}else{f=d[e+194>>0]|0;g=d[e+193>>0]|0;h=d[e+192>>0]|0}c[i+380>>2]=h;c[i+384>>2]=g;c[i+388>>2]=f;Fc(b+2608|0,c[e+52>>2]|0);g=b+200|0;if(a[e+12941>>0]|0){f=c[g>>2]|0;h=c[f+4>>2]|0?3:1;i=(1<>2])+2|0;i=R(i,i)|0;c[b+168>>2]=Yd(i<>2])|0;f=0;do{i=c[g>>2]|0;k=c[i+13124>>2]>>c[i+13180+(f<<2)>>2];m=R(c[i+13120>>2]>>c[i+13168+(f<<2)>>2]<<1,c[i+13132>>2]|0)|0;c[b+172+(f<<2)>>2]=Yd(m<>2])|0;i=c[g>>2]|0;k=R(k<<1,c[i+13128>>2]|0)|0;c[b+184+(f<<2)>>2]=Yd(k<>2])|0;f=f+1|0}while((f|0)<(h|0))}c[g>>2]=e;c[b+196>>2]=c[(c[b+208+(c[e>>2]<<2)>>2]|0)+4>>2];f=0}l=j;return f|0}function pc(a){a=a|0;return Xd(a)|0}function qc(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(rc(a)|0)|0}function rc(a){a=a|0;return c[a+8>>2]|0}function sc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=c[b+13064>>2]|0;j=c[b+13120>>2]|0;o=c[b+13124>>2]|0;d=R((o>>d)+1|0,(j>>d)+1|0)|0;e=R(c[b+13132>>2]|0,c[b+13128>>2]|0)|0;f=b+13156|0;g=b+13160|0;h=R(c[g>>2]|0,c[f>>2]|0)|0;i=a+2596|0;c[i>>2]=(j>>2)+1;j=a+2600|0;c[j>>2]=(o>>2)+1;o=a+2504|0;c[o>>2]=ie(e,148)|0;p=ie(e,8)|0;c[a+2508>>2]=p;if(((((((!((p|0)==0|(c[o>>2]|0)==0)?(q=b+13144|0,o=b+13140|0,p=a+4332|0,c[p>>2]=Yd(R(c[o>>2]|0,c[q>>2]|0)|0)|0,o=he(c[q>>2]|0,c[o>>2]|0)|0,c[a+4336>>2]=o,!((o|0)==0|(c[p>>2]|0)==0)):0)?(k=a+4344|0,c[k>>2]=he(c[b+13148>>2]|0,c[b+13152>>2]|0)|0,q=a+4340|0,c[q>>2]=ee(h)|0,l=Yd(R((c[g>>2]|0)+1|0,(c[f>>2]|0)+1|0)|0)|0,c[a+4348>>2]=l,(c[q>>2]|0)!=0):0)?!((l|0)==0|(c[k>>2]|0)==0):0)?(m=a+4352|0,c[m>>2]=Yd(e)|0,n=a+4328|0,c[n>>2]=he(d,4)|0,q=he(d,1)|0,c[a+4316>>2]=q,(q|0)!=0):0)?(c[m>>2]|0)!=0:0)?(c[n>>2]|0)!=0:0)?(q=a+4320|0,c[q>>2]=ie(c[i>>2]|0,c[j>>2]|0)|0,p=ie(c[i>>2]|0,c[j>>2]|0)|0,c[a+4324>>2]=p,!((p|0)==0|(c[q>>2]|0)==0)):0)a=0;else{Sb(a);a=-12}return a|0}function tc(b){b=b|0;var d=0,e=0,f=0;e=c[b+60>>2]|0;c[e+4>>2]=b;f=ee(31328)|0;c[e+136>>2]=f;if((((f|0)!=0?(c[e+72>>2]=f,c[e+8>>2]=e,f=Yd(199)|0,c[e+152>>2]=f,(f|0)!=0):0)?(f=ue()|0,c[e+164>>2]=f,(f|0)!=0):0)?(d=ue()|0,c[e+2524>>2]=d,(d|0)!=0):0){c[e+2528>>2]=d;c[e+2592>>2]=2147483647;a[e+4469>>0]=1;c[e+2584>>2]=0;b=0}else{Qb(b)|0;b=-12}return b|0}function uc(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0;la=l;l=l+272|0;aa=la+195|0;ba=la+130|0;X=la+65|0;ca=la;fa=c[b+136>>2]|0;ga=c[b+200>>2]|0;s=c[ga+13168+(h<<2)>>2]|0;L=c[ga+13180+(h<<2)>>2]|0;ka=1<>2]|0;u=ka<>2]|0;n=e>>k&m;o=f>>k&m;t=c[b+204>>2]|0;p=c[t+1684>>2]|0;q=m+2|0;r=c[p+((R(o,q)|0)+n<<2)>>2]|0;ia=c[b+160>>2]|0;ha=c[ia+32+(h<<2)>>2]|0;D=0-ha|0;ia=(c[ia+(h<<2)>>2]|0)+(e>>s)+(R(ha,f>>L)|0)|0;V=(h|0)==0;ja=c[(V?fa+288|0:fa+292|0)>>2]|0;j=aa+1|0;i=X+1|0;da=ba+1|0;ea=ca+1|0;if(!(c[fa+31288>>2]|0))x=0;else x=(r|0)>(c[p+(n+-1+(R(o+(u>>k)&m,q)|0)<<2)>>2]|0);w=x&1;y=c[fa+31292>>2]|0;S=c[fa+31300>>2]|0;B=c[fa+31296>>2]|0;if(!(c[fa+31304>>2]|0))A=0;else A=(r|0)>(c[p+((R(q,o+-1|0)|0)+(m&n+(v>>k))<<2)>>2]|0);b=A&1;G=(u<<1)+f|0;J=ga+13124|0;C=c[J>>2]|0;K=u+f|0;G=((G|0)>(C|0)?C:G)-K>>L;C=(v<<1)+e|0;F=c[ga+13120>>2]|0;z=v+e|0;C=((C|0)>(F|0)?F:C)-z>>s;F=t+20|0;if((a[F>>0]|0)==1){s=c[ga+13084>>2]|0;p=u>>s;q=v>>s;r=(1<>2]|0)-(K>>s)|0;n=(p|0)>(n|0)?n:p;if((n|0)>0){k=0;m=0;do{k=k|1;m=m+2|0}while((m|0)<(n|0));w=k}else w=0}if((y|0)==1&o){n=(c[ga+13160>>2]|0)-(f>>s)|0;n=(p|0)>(n|0)?n:p;if((n|0)>0){k=0;m=0;do{k=k|1;m=m+2|0}while((m|0)<(n|0));o=k}else o=0}else o=y;if((B|0)==1&r){m=(c[ga+13156>>2]|0)-(e>>s)|0;m=(q|0)>(m|0)?m:q;if((m|0)>0){k=0;n=0;do{k=k|1;n=n+2|0}while((n|0)<(m|0));n=k}else n=0}else n=B;if(A&r){k=(c[ga+13156>>2]|0)-(z>>s)|0;k=(q|0)>(k|0)?k:q;if((k|0)>0){b=0;m=0;do{b=b|1;m=m+2|0}while((m|0)<(k|0))}else b=0}k=j;m=k+64|0;do{a[k>>0]=128;k=k+1|0}while((k|0)<(m|0));k=X;m=k+65|0;do{a[k>>0]=128;k=k+1|0}while((k|0)<(m|0));y=o;B=n;q=b}else q=b;r=(S|0)!=0;if(r){A=a[ia+~ha>>0]|0;a[aa>>0]=A;a[X>>0]=A}s=(B|0)!=0;if(s)Pf(i|0,ia+D|0,ka|0)|0;t=(q|0)!=0;if(t?(E=i+ka|0,Pf(E|0,ia+D+ka|0,ka|0)|0,H=R(d[ia+(ka+-1-ha+C)>>0]|0,16843009)|0,I=ka-C|0,(I|0)>0):0){k=E+C|0;b=0;do{E=k+b|0;a[E>>0]=H;a[E+1>>0]=H>>8;a[E+2>>0]=H>>16;a[E+3>>0]=H>>24;b=b+4|0}while((b|0)<(I|0))}p=(y|0)!=0;if(p&(g|0)!=31){b=0;do{a[j+b>>0]=a[ia+((R(b,ha)|0)+-1)>>0]|0;b=b+1|0}while((b|0)<(ka|0))}o=(w|0)!=0;if(o){k=G+ka|0;if((G|0)>0){b=ka;do{a[j+b>>0]=a[ia+((R(b,ha)|0)+-1)>>0]|0;b=b+1|0}while((b|0)<(k|0))}m=R(d[ia+((R(k+-1|0,ha)|0)+-1)>>0]|0,16843009)|0;n=ka-G|0;if((n|0)>0){k=j+ka+G|0;b=0;do{I=k+b|0;a[I>>0]=m;a[I+1>>0]=m>>8;a[I+2>>0]=m>>16;a[I+3>>0]=m>>24;b=b+4|0}while((b|0)<(n|0))}}if((a[F>>0]|0)==1?(M=w|y|S,B|q|M|0):0){I=ka<<1;b=c[J>>2]|0;m=b-f>>L;m=o?(((I<>0]|0;if(!M)a[aa>>0]=b;a[aa>>0]=b;if(!p?(N=R(b&255,16843009)|0,(g|0)!=31):0){b=0;do{M=j+b|0;a[M>>0]=N;a[M+1>>0]=N>>8;a[M+2>>0]=N>>16;a[M+3>>0]=N>>24;b=b+4|0}while((b|0)<(ka|0))}if(!o?(O=R(d[j+(ka+-1)>>0]|0,16843009)|0,(g|0)!=31):0){k=j+ka|0;b=0;do{N=k+b|0;a[N>>0]=O;a[N+1>>0]=O>>8;a[N+2>>0]=O>>16;a[N+3>>0]=O>>24;b=b+4|0}while((b|0)<(ka|0))}if(((f|0)==0|(e|0)==0)&(e|0)==0&(m|0)>0)Kf(j|0,0,m+3&-4|0)|0;a[X>>0]=a[aa>>0]|0}a:do if(!o){if(p){k=R(d[j+(ka+-1)>>0]|0,16843009)|0;if((g|0)==31){P=72;break}m=j+ka|0;b=0;while(1){P=m+b|0;a[P>>0]=k;a[P+1>>0]=k>>8;a[P+2>>0]=k>>16;a[P+3>>0]=k>>24;b=b+4|0;if((b|0)>=(ka|0)){P=69;break a}}}if(r){k=R(d[aa>>0]|0,16843009)|0;m=ka<<1;if((g|0)==31){P=74;break}else b=0;while(1){Q=j+b|0;a[Q>>0]=k;a[Q+1>>0]=k>>8;a[Q+2>>0]=k>>16;a[Q+3>>0]=k>>24;b=b+4|0;if((b|0)>=(m|0)){P=72;break a}}}if(s){k=a[i>>0]|0;a[aa>>0]=k;k=R(k&255,16843009)|0;m=ka<<1;if((g|0)==31){P=77;break}else b=0;while(1){S=j+b|0;a[S>>0]=k;a[S+1>>0]=k>>8;a[S+2>>0]=k>>16;a[S+3>>0]=k>>24;b=b+4|0;if((b|0)>=(m|0)){P=74;break a}}}if(!t){a[aa>>0]=-128;k=ka<<1;if((g|0)==31){P=73;break}Kf(i|0,-128,((k|0)>4?k:4)+3&-4|0)|0;b=0;while(1){P=j+b|0;a[P>>0]=-2139062144;a[P+1>>0]=-2139062144>>8;a[P+2>>0]=-2139062144>>16;a[P+3>>0]=-2139062144>>24;b=b+4|0;if((b|0)>=(k|0)){P=69;break a}}}k=i+ka|0;b=a[k>>0]|0;m=R(b&255,16843009)|0;n=(g|0)==31;if(n){a[aa>>0]=b;break}else b=0;do{T=i+b|0;a[T>>0]=m;a[T+1>>0]=m>>8;a[T+2>>0]=m>>16;a[T+3>>0]=m>>24;b=b+4|0}while((b|0)<(ka|0));k=a[k>>0]|0;a[aa>>0]=k;k=R(k&255,16843009)|0;m=ka<<1;if(n)P=77;else{b=0;do{T=j+b|0;a[T>>0]=k;a[T+1>>0]=k>>8;a[T+2>>0]=k>>16;a[T+3>>0]=k>>24;b=b+4|0}while((b|0)<(m|0));P=77}}else P=69;while(0);if((P|0)==69)if((y|0)==0?(Q=R(d[j+ka>>0]|0,16843009)|0,(g|0)!=31):0){b=0;do{P=j+b|0;a[P>>0]=Q;a[P+1>>0]=Q>>8;a[P+2>>0]=Q>>16;a[P+3>>0]=Q>>24;b=b+4|0}while((b|0)<(ka|0));P=72}else P=72;if((P|0)==72)if(!S)P=73;else P=74;if((P|0)==73){a[aa>>0]=a[j>>0]|0;P=74}if((P|0)==74)if((B|0)==0?(T=R(d[aa>>0]|0,16843009)|0,(g|0)!=31):0){b=0;do{S=i+b|0;a[S>>0]=T;a[S+1>>0]=T>>8;a[S+2>>0]=T>>16;a[S+3>>0]=T>>24;b=b+4|0}while((b|0)<(ka|0));P=77}else P=77;if(((P|0)==77?!t:0)?(U=R(d[i+(ka+-1)>>0]|0,16843009)|0,(g|0)!=31):0){k=i+ka|0;b=0;do{T=k+b|0;a[T>>0]=U;a[T+1>>0]=U>>8;a[T+2>>0]=U>>16;a[T+3>>0]=U>>24;b=b+4|0}while((b|0)<(ka|0))}r=a[aa>>0]|0;a[X>>0]=r;b:do if(!(c[ga+13112>>2]|0)){if(!V?(c[ga+4>>2]|0)!=3:0)break;if((g|0)!=2&(ja|0)!=1?(U=ja+-26|0,U=(U|0)>-1?U:26-ja|0,T=ja+-10|0,T=(T|0)>-1?T:10-ja|0,(((U|0)>(T|0)?T:U)|0)>(c[164+(g+-3<<2)>>2]|0)):0){if(((g|0)==5&(V&(a[ga+13061>>0]|0)!=0)?(Y=r&255,W=a[X+64>>0]|0,Z=W&255,X=Z+Y-(d[X+32>>0]<<1)|0,(((X|0)>-1?X:0-X|0)|0)<8):0)?($=aa+64|0,_=a[$>>0]|0,X=(_&255)+Y-(d[aa+32>>0]<<1)|0,(((X|0)>-1?X:0-X|0)|0)<8):0){a[ca>>0]=r;a[ca+64>>0]=W;b=0;do{da=b;b=b+1|0;a[ea+da>>0]=((R(b,Z)|0)+32+(R(63-da|0,Y)|0)|0)>>>6}while((b|0)!=63);a[j>>0]=(((r&255)*63|0)+32+(_&255)|0)>>>6;b=1;while(1){da=b;b=b+1|0;a[j+da>>0]=((R(d[aa>>0]|0,63-da|0)|0)+32+(R(d[$>>0]|0,b)|0)|0)>>>6;if((b|0)==63){i=ea;break b}}}q=ka<<1;p=q+-1|0;b=a[j+p>>0]|0;a[da+p>>0]=b;k=a[i+p>>0]|0;a[ea+p>>0]=k;q=q+-2|0;p=(q|0)>-1;if(p){o=q;m=a[j+q>>0]|0;while(1){aa=o;o=o+-1|0;n=a[j+o>>0]|0;a[da+aa>>0]=((b&255)+2+((m&255)<<1)+(n&255)|0)>>>2;if((aa|0)<=0)break;else{b=m;m=n}}}aa=((d[j>>0]|0)+2+((r&255)<<1)+(d[i>>0]|0)|0)>>>2&255;a[ba>>0]=aa;a[ca>>0]=aa;if(p){m=q;b=a[i+q>>0]|0;while(1){ca=m;m=m+-1|0;j=a[i+m>>0]|0;a[ea+ca>>0]=((k&255)+2+((b&255)<<1)+(j&255)|0)>>>2;if((ca|0)<=0){j=da;i=ea;break}else{k=b;b=j}}}else{j=da;i=ea}}}while(0);switch(ja|0){case 0:{vc(ia,i,j,ha,g);break}case 1:{wc(ia,i,j,ha,g,h);break}default:{if(!(c[ga+13104>>2]|0))b=0;else b=(a[fa+31256>>0]|0)!=0;xc(ia,i,j,ha,h,ja,ka,b&1)}}l=la;return}function vc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;m=1<>0]|0,n-h|0)|0;q=h;h=h+1|0;s=R(d[o>>0]|0,h)|0;r=R(d[c+q>>0]|0,k)|0;a[b+(q+l)>>0]=t+m+s+r+(R(d[p>>0]|0,g)|0)>>i}while((h|0)<(m|0))}while((g|0)<(m|0))}return}function wc(b,c,e,f,g,h){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;n=1<>0]|0)+i+(d[c+j>>0]|0)|0;j=j+1|0}while((j|0)<(n|0));g=i>>g+1;l=R(g,16843009)|0;if(!k){j=0;do{k=R(j,f)|0;i=0;do{o=b+(i+k)|0;a[o>>0]=l;a[o+1>>0]=l>>8;a[o+2>>0]=l>>16;a[o+3>>0]=l>>24;i=i+4|0}while((i|0)<(n|0));j=j+1|0}while((j|0)<(n|0))}}else g=n>>g+1;if((h|0)==0&(n|0)<32?(a[b>>0]=((g<<1)+2+(d[e>>0]|0)+(d[c>>0]|0)|0)>>>2,m=(n|0)>1,m):0){j=(g*3|0)+2|0;i=1;do{a[b+i>>0]=(j+(d[c+i>>0]|0)|0)>>>2;i=i+1|0}while((i|0)!=(n|0));if(m){j=(g*3|0)+2|0;i=1;do{a[b+(R(i,f)|0)>>0]=(j+(d[e+i>>0]|0)|0)>>>2;i=i+1|0}while((i|0)!=(n|0))}}return}function xc(c,e,f,g,h,i,j,k){c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;v=l;l=l+112|0;u=a[1673+(i+-2)>>0]|0;q=v+j|0;m=(R(u,j)|0)>>5;o=i+-11|0;p=o>>>0<15&(m|0)<-1;if((i|0)>17){n=e+-1|0;if(p){if((j|0)>=0)Pf(q|0,n|0,j+4&-4|0)|0;n=b[296+(o<<1)>>1]|0;while(1){a[q+m>>0]=a[f+(((R(n,m)|0)+128>>8)+-1)>>0]|0;if((m|0)<-1)m=m+1|0;else{n=q;break}}}t=(j|0)>0;if(t){s=0;do{m=s;s=s+1|0;q=R(s,u)|0;p=q>>5;q=q&31;if(!q){p=p+1|0;o=R(m,g)|0;m=0;do{q=n+(p+m)|0;q=d[q>>0]|d[q+1>>0]<<8|d[q+2>>0]<<16|d[q+3>>0]<<24;r=c+(m+o)|0;a[r>>0]=q;a[r+1>>0]=q>>8;a[r+2>>0]=q>>16;a[r+3>>0]=q>>24;m=m+4|0}while((m|0)<(j|0))}else{r=32-q|0;o=R(m,g)|0;m=0;do{w=m+p|0;x=R(d[n+(w+1)>>0]|0,r)|0;a[c+(m+o)>>0]=(x+16+(R(d[n+(w+2)>>0]|0,q)|0)|0)>>>5;w=m|1;x=w+p|0;y=R(d[n+(x+1)>>0]|0,r)|0;a[c+(w+o)>>0]=(y+16+(R(d[n+(x+2)>>0]|0,q)|0)|0)>>>5;w=m|2;x=w+p|0;y=R(d[n+(x+1)>>0]|0,r)|0;a[c+(w+o)>>0]=(y+16+(R(d[n+(x+2)>>0]|0,q)|0)|0)>>>5;w=m|3;x=w+p|0;y=R(d[n+(x+1)>>0]|0,r)|0;a[c+(w+o)>>0]=(y+16+(R(d[n+(x+2)>>0]|0,q)|0)|0)>>>5;m=m+4|0}while((m|0)<(j|0))}}while((s|0)!=(j|0))}if((h|0)==0&(i|0)==26&(j|0)<32&(k|0)==0&t){n=f+-1|0;m=0;do{y=((d[f+m>>0]|0)-(d[n>>0]|0)>>1)+(d[e>>0]|0)|0;a[c+(R(m,g)|0)>>0]=y>>>0>255?0-y>>31:y;m=m+1|0}while((m|0)!=(j|0))}}else{n=f+-1|0;if(p){if((j|0)>=0)Pf(q|0,n|0,j+4&-4|0)|0;n=b[296+(o<<1)>>1]|0;while(1){a[q+m>>0]=a[e+(((R(n,m)|0)+128>>8)+-1)>>0]|0;if((m|0)<-1)m=m+1|0;else{n=q;break}}}t=(j|0)>0;if(t){r=0;do{s=r;r=r+1|0;p=R(r,u)|0;o=p>>5;p=p&31;if(!p){o=o+1|0;m=0;do{a[c+((R(m,g)|0)+s)>>0]=a[n+(o+m)>>0]|0;m=m+1|0}while((m|0)!=(j|0))}else{q=32-p|0;m=0;do{y=m+o|0;x=R(d[n+(y+1)>>0]|0,q)|0;a[c+((R(m,g)|0)+s)>>0]=(x+16+(R(d[n+(y+2)>>0]|0,p)|0)|0)>>>5;m=m+1|0}while((m|0)!=(j|0))}}while((r|0)!=(j|0))}if((h|0)==0&(i|0)==10&(j|0)<32&(k|0)==0&t){n=e+-1|0;m=0;do{y=((d[e+m>>0]|0)-(d[n>>0]|0)>>1)+(d[f>>0]|0)|0;a[c+m>>0]=y>>>0>255?0-y>>31:y;y=m|1;x=((d[e+y>>0]|0)-(d[n>>0]|0)>>1)+(d[f>>0]|0)|0;a[c+y>>0]=x>>>0>255?0-x>>31:x;y=m|2;x=((d[e+y>>0]|0)-(d[n>>0]|0)>>1)+(d[f>>0]|0)|0;a[c+y>>0]=x>>>0>255?0-x>>31:x;y=m|3;x=((d[e+y>>0]|0)-(d[n>>0]|0)>>1)+(d[f>>0]|0)|0;a[c+y>>0]=x>>>0>255?0-x>>31:x;m=m+4|0}while((m|0)<(j|0))}}l=v;return}function yc(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0;g=c[e>>2]|0;if((g|0?c[g+304>>2]|0:0)?(h=e+46|0,g=(d[h>>0]|0)&(f^255)&255,a[h>>0]=g,g<<24>>24==0):0){Id(c[b+4>>2]|0,e+4|0);c[e+24>>2]=0}return}function zc(a){a=a|0;yc(a,a+2524|0,6);return}function Ac(a){a=a|0;yc(a,a+2524|0,-1);return}function Bc(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0;h=d+4364|0;if(((c[(c[d+2524>>2]|0)+304>>2]|0)!=0?(b[d+2568>>1]|0)==(b[h>>1]|0):0)?(c[d+2544>>2]|0)==(f|0):0)d=-1094995529;else{g=Cc(d)|0;if(!g)d=-12;else{c[e>>2]=c[g>>2];c[d+2520>>2]=g;a[g+46>>0]=a[d+1450>>0]|0?3:2;c[g+20>>2]=f;b[g+44>>1]=b[h>>1]|0;h=g+28|0;d=(c[d+200>>2]|0)+20|0;c[h>>2]=c[d>>2];c[h+4>>2]=c[d+4>>2];c[h+8>>2]=c[d+8>>2];c[h+12>>2]=c[d+12>>2];d=0}}return d|0}function Cc(a){a=a|0;var b=0,d=0;b=a+2524|0;if((c[(c[b>>2]|0)+304>>2]|0)==0?(Hd(c[a+4>>2]|0,a+2528|0,1)|0)>=0:0){d=c[a+200>>2]|0;c[a+2540>>2]=R(c[d+13132>>2]|0,c[d+13128>>2]|0)|0;d=c[a+4520>>2]|0;a=c[b>>2]|0;c[a+244>>2]=(d|0)==1&1;c[a+240>>2]=(d+-1|0)>>>0<2&1}else b=0;return b|0}function Dc(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;q=d+2046|0;s=d+4366|0;l=(f|0)==0;m=d+4364|0;n=d+200|0;o=d+2572|0;p=d+2524|0;h=d+2570|0;i=d+2544|0;j=d+2568|0;k=d+2568|0;g=d+2570|0;while(1){if((a[q>>0]|0)==1)if(((a[h>>0]&8)==0?(c[i>>2]|0)!=(c[o>>2]|0):0)?(b[j>>1]|0)==(b[s>>1]|0):0){yc(d,p,1);f=h}else f=h;else f=g;if(!(a[f>>0]&1))f=0;else f=(b[k>>1]|0)==(b[s>>1]|0)&1;if(((l?(b[s>>1]|0)==(b[m>>1]|0):0)?(r=c[n>>2]|0,r|0):0)?(f|0)<=(c[r+76+(((c[r+72>>2]|0)+-1|0)*12|0)+4>>2]|0):0){f=0;break}if(f|0){t=14;break}f=b[s>>1]|0;if(f<<16>>16==(b[m>>1]|0)){f=0;break}b[s>>1]=(f&65535)+1&255}if((t|0)==14){g=d+2524|0;f=ze(e,c[g>>2]|0)|0;if(!(a[d+2570>>0]&8))yc(d,g,1);else yc(d,g,9);f=(f|0)<0?f:1}return f|0}function Ec(){var b=0,c=0,d=0,e=0,f=0;if(!(a[3717]|0)){c=0;do{b=0;do{f=(R(b<<1|1,c)|0)&127;d=f>>>0>63;f=d?f+-64|0:f;d=d?-1:1;e=(f|0)>31;a[3717+(c<<5)+b>>0]=R(a[1706+(e?64-f|0:f)>>0]|0,e?0-d|0:d)|0;b=b+1|0}while((b|0)!=32);c=c+1|0}while((c|0)!=32)}return}function Fc(a,b){a=a|0;b=b|0;c[a>>2]=1;c[a+4>>2]=1;c[a+8>>2]=2;c[a+12>>2]=3;c[a+16>>2]=4;c[a+20>>2]=1;c[a+24>>2]=5;c[a+28>>2]=2;c[a+32>>2]=2;c[a+36>>2]=3;c[a+40>>2]=4;c[a+44>>2]=5;c[a+48>>2]=3;c[a+52>>2]=4;c[a+56>>2]=5;c[a+60>>2]=6;c[a+64>>2]=1;c[a+68>>2]=1;c[a+72>>2]=2;c[a+1676>>2]=2;c[a+1680>>2]=3;c[a+1684>>2]=1;c[a+1688>>2]=2;c[a+1692>>2]=2;c[a+1696>>2]=3;c[a+1700>>2]=1;c[a+1704>>2]=2;return}function Gc(b,c,d,e,f,g){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;if((e|0)>0){j=(d|0)>0;k=8-g|0;i=0;while(1){if(j){h=0;do{a[b+h>>0]=(Pd(f,g)|0)<>1]|0)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?0-k>>31:k;g=g+1|0;if((g|0)==4)break;else h=h+2|0}i=i+1|0;if((i|0)==4)break;else{e=e+8|0;c=c+f|0}}return}function Ic(c,e,f){c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;i=0;while(1){g=0;h=e;while(1){j=c+g|0;k=(b[h>>1]|0)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?0-k>>31:k;g=g+1|0;if((g|0)==8)break;else h=h+2|0}i=i+1|0;if((i|0)==8)break;else{e=e+16|0;c=c+f|0}}return}function Jc(c,e,f){c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;i=0;while(1){g=0;h=e;while(1){j=c+g|0;k=(b[h>>1]|0)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?0-k>>31:k;g=g+1|0;if((g|0)==16)break;else h=h+2|0}i=i+1|0;if((i|0)==16)break;else{e=e+32|0;c=c+f|0}}return}function Kc(c,e,f){c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;i=0;while(1){g=0;h=e;while(1){j=c+g|0;k=(b[h>>1]|0)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?0-k>>31:k;g=g+1|0;if((g|0)==32)break;else h=h+2|0}i=i+1|0;if((i|0)==32)break;else{e=e+64|0;c=c+f|0}}return}function Lc(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0;g=c<<16>>16;e=7-g|0;g=1<0){f=1<>16!=31){c=0;do{d=0;do{b[a>>1]=(b[a>>1]|0)+f>>e;a=a+2|0;d=d+1|0}while((d|0)<(g|0));c=c+1|0}while((c|0)<(g|0))}}else if(c<<16>>16!=31){e=0-e|0;d=0;do{c=0;do{b[a>>1]=b[a>>1]<>16);if(!d){if(c<<16>>16!=31){h=(i|0)>1;g=0;d=a;while(1){if(h){c=1;f=b[d>>1]|0;do{a=d+(c<<1)|0;f=(e[a>>1]|0)+(f&65535)&65535;b[a>>1]=f;c=c+1|0}while((c|0)!=(i|0))}g=g+1|0;if((g|0)>=(i|0))break;else d=d+(i<<1)|0}}}else{g=i+-1|0;if((i|0)>1){f=0;d=a;do{d=d+(i<<1)|0;c=0;do{a=d+(c<<1)|0;b[a>>1]=(e[a>>1]|0)+(e[d+(c-i<<1)>>1]|0);c=c+1|0}while((c|0)!=(i|0));f=f+1|0}while((f|0)!=(g|0))}}return}function Nc(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=0;d=a;while(1){n=b[d>>1]|0;l=d+16|0;j=b[l>>1]|0;h=j+n|0;e=d+24|0;m=b[e>>1]|0;k=m+j|0;f=n-m|0;i=d+8|0;g=(b[i>>1]|0)*74|0;m=((n-j+m|0)*74|0)+64|0;j=m>>7;b[l>>1]=(j+32768|0)>>>0>65535?m>>31^32767:j;l=(h*29|0)+64+(k*55|0)+g|0;j=l>>7;b[d>>1]=(j+32768|0)>>>0>65535?l>>31^32767:j;k=(R(k,-29)|0)+64+(f*55|0)+g|0;j=k>>7;b[i>>1]=(j+32768|0)>>>0>65535?k>>31^32767:j;g=(h*55|0)+64+(f*29|0)-g|0;f=g>>7;b[e>>1]=(f+32768|0)>>>0>65535?g>>31^32767:f;c=c+1|0;if((c|0)==4){c=0;break}else d=d+2|0}while(1){e=b[a>>1]|0;g=a+4|0;i=b[g>>1]|0;k=i+e|0;n=a+6|0;f=b[n>>1]|0;h=f+i|0;m=e-f|0;j=a+2|0;l=(b[j>>1]|0)*74|0;f=((e-i+f|0)*74|0)+2048|0;i=f>>12;b[g>>1]=(i+32768|0)>>>0>65535?f>>31^32767:i;g=(k*29|0)+2048+(h*55|0)+l|0;i=g>>12;b[a>>1]=(i+32768|0)>>>0>65535?g>>31^32767:i;h=(R(h,-29)|0)+2048+(m*55|0)+l|0;i=h>>12;b[j>>1]=(i+32768|0)>>>0>65535?h>>31^32767:i;l=(k*55|0)+2048+(m*29|0)-l|0;m=l>>12;b[n>>1]=(m+32768|0)>>>0>65535?l>>31^32767:m;c=c+1|0;if((c|0)==4)break;else a=a+8|0}return}function Oc(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=0;d=a;while(1){k=b[d>>1]<<6;h=d+16|0;i=b[h>>1]<<6;f=i+k|0;i=k-i|0;k=d+8|0;j=b[k>>1]|0;e=d+24|0;l=b[e>>1]|0;g=(l*36|0)+(j*83|0)|0;j=(R(l,-83)|0)+(j*36|0)|0;l=f+64+g|0;m=l>>7;b[d>>1]=(m+32768|0)>>>0>65535?l>>31^32767:m;m=i+64+j|0;l=m>>7;b[k>>1]=(l+32768|0)>>>0>65535?m>>31^32767:l;j=i-j+64|0;i=j>>7;b[h>>1]=(i+32768|0)>>>0>65535?j>>31^32767:i;g=f-g+64|0;f=g>>7;b[e>>1]=(f+32768|0)>>>0>65535?g>>31^32767:f;c=c+1|0;if((c|0)==4){c=0;break}else d=d+2|0}while(1){g=b[a>>1]<<6;j=a+4|0;i=b[j>>1]<<6;l=i+g|0;i=g-i|0;g=a+2|0;h=b[g>>1]|0;m=a+6|0;f=b[m>>1]|0;k=(f*36|0)+(h*83|0)|0;h=(R(f,-83)|0)+(h*36|0)|0;f=l+2048+k|0;e=f>>12;b[a>>1]=(e+32768|0)>>>0>65535?f>>31^32767:e;e=i+2048+h|0;f=e>>12;b[g>>1]=(f+32768|0)>>>0>65535?e>>31^32767:f;h=i-h+2048|0;i=h>>12;b[j>>1]=(i+32768|0)>>>0>65535?h>>31^32767:i;k=l-k+2048|0;l=k>>12;b[m>>1]=(l+32768|0)>>>0>65535?k>>31^32767:l;c=c+1|0;if((c|0)==4)break;else a=a+8|0}return}function Pc(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+32|0;s=u+16|0;t=u;p=(e|0)<8;n=e+4|0;q=s+4|0;r=s+8|0;o=s+12|0;k=0;m=d;n=(n|0)<8?n:8;while(1){c[t>>2]=0;c[t+4>>2]=0;c[t+8>>2]=0;c[t+12>>2]=0;h=(n|0)>1;f=0;do{if(h){i=t+(f<<2)|0;g=1;j=c[i>>2]|0;do{j=(R(b[m+(g<<3<<1)>>1]|0,a[3717+(g<<2<<5)+f>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<(n|0));c[i>>2]=j}f=f+1|0}while((f|0)!=4);i=b[m>>1]<<6;h=b[m+64>>1]<<6;j=h+i|0;h=i-h|0;i=b[m+32>>1]|0;f=b[m+96>>1]|0;g=(f*36|0)+(i*83|0)|0;i=(R(f,-83)|0)+(i*36|0)|0;f=g+j|0;c[s>>2]=f;c[q>>2]=i+h;c[r>>2]=h-i;c[o>>2]=j-g;g=0;while(1){j=c[t+(g<<2)>>2]|0;h=f+64+j|0;i=h>>7;b[m+(g<<3<<1)>>1]=(i+32768|0)>>>0>65535?h>>31^32767:i;j=f-j+64|0;f=j>>7;b[m+(7-g<<3<<1)>>1]=(f+32768|0)>>>0>65535?j>>31^32767:f;f=g+1|0;if((f|0)==4)break;g=f;f=c[s+(f<<2)>>2]|0}n=(n|0)<8&((k|0)!=0&(k&3|0)==0)?n+-4|0:n;k=k+1|0;if((k|0)==8)break;else m=m+2|0}k=p?e:8;m=(k|0)>1;n=s+4|0;e=s+8|0;o=s+12|0;j=0;while(1){c[t>>2]=0;c[t+4>>2]=0;c[t+8>>2]=0;c[t+12>>2]=0;g=0;do{if(m){h=t+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[d+(f<<1)>>1]|0,a[3717+(f<<2<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<(k|0));c[h>>2]=i}g=g+1|0}while((g|0)!=4);q=b[d>>1]<<6;p=b[d+8>>1]<<6;r=p+q|0;p=q-p|0;q=b[d+4>>1]|0;f=b[d+12>>1]|0;g=(f*36|0)+(q*83|0)|0;q=(R(f,-83)|0)+(q*36|0)|0;f=g+r|0;c[s>>2]=f;c[n>>2]=q+p;c[e>>2]=p-q;c[o>>2]=r-g;g=0;while(1){r=c[t+(g<<2)>>2]|0;p=f+2048+r|0;q=p>>12;b[d+(g<<1)>>1]=(q+32768|0)>>>0>65535?p>>31^32767:q;r=f-r+2048|0;f=r>>12;b[d+(7-g<<1)>>1]=(f+32768|0)>>>0>65535?r>>31^32767:f;f=g+1|0;if((f|0)==4)break;g=f;f=c[s+(f<<2)>>2]|0}j=j+1|0;if((j|0)==8)break;else d=d+16|0}l=u;return}function Qc(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+96|0;t=x+64|0;u=x+32|0;v=x+16|0;w=x;s=(e|0)<16;n=e+4|0;o=v+4|0;p=v+8|0;q=v+12|0;r=t+28|0;k=0;m=d;n=(n|0)<16?n:16;while(1){c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;c[u+12>>2]=0;c[u+16>>2]=0;c[u+20>>2]=0;c[u+24>>2]=0;c[u+28>>2]=0;h=(n|0)>1;f=0;do{if(h){i=u+(f<<2)|0;g=1;j=c[i>>2]|0;do{j=(R(b[m+(g<<4<<1)>>1]|0,a[3717+(g<<1<<5)+f>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<(n|0));c[i>>2]=j}f=f+1|0}while((f|0)!=8);c[w>>2]=0;c[w+4>>2]=0;c[w+8>>2]=0;c[w+12>>2]=0;g=0;do{h=w+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[m+(f<<5<<1)>>1]|0,a[3717+(f<<2<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<8);c[h>>2]=i;g=g+1|0}while((g|0)!=4);h=b[m>>1]<<6;g=b[m+256>>1]<<6;i=g+h|0;g=h-g|0;h=b[m+128>>1]|0;j=b[m+384>>1]|0;f=(j*36|0)+(h*83|0)|0;h=(R(j,-83)|0)+(h*36|0)|0;j=f+i|0;c[v>>2]=j;c[o>>2]=h+g;c[p>>2]=g-h;c[q>>2]=i-f;f=c[w>>2]|0;c[t>>2]=f+j;c[r>>2]=j-f;f=1;do{i=c[v+(f<<2)>>2]|0;j=c[w+(f<<2)>>2]|0;c[t+(f<<2)>>2]=j+i;c[t+(7-f<<2)>>2]=i-j;f=f+1|0}while((f|0)!=4);f=0;do{j=c[t+(f<<2)>>2]|0;i=c[u+(f<<2)>>2]|0;g=j+64+i|0;h=g>>7;b[m+(f<<4<<1)>>1]=(h+32768|0)>>>0>65535?g>>31^32767:h;i=j-i+64|0;j=i>>7;b[m+(15-f<<4<<1)>>1]=(j+32768|0)>>>0>65535?i>>31^32767:j;f=f+1|0}while((f|0)!=8);n=(n|0)<16&((k|0)!=0&(k&3|0)==0)?n+-4|0:n;k=k+1|0;if((k|0)==16)break;else m=m+2|0}m=s?e:16;n=(m|0)>1;e=v+4|0;o=v+8|0;p=v+12|0;q=t+28|0;j=d;k=0;while(1){c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;c[u+12>>2]=0;c[u+16>>2]=0;c[u+20>>2]=0;c[u+24>>2]=0;c[u+28>>2]=0;g=0;do{if(n){h=u+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[j+(f<<1)>>1]|0,a[3717+(f<<1<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<(m|0));c[h>>2]=i}g=g+1|0}while((g|0)!=8);c[w>>2]=0;c[w+4>>2]=0;c[w+8>>2]=0;c[w+12>>2]=0;g=0;do{h=w+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[j+(f<<1<<1)>>1]|0,a[3717+(f<<2<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<8);c[h>>2]=i;g=g+1|0}while((g|0)!=4);r=b[j>>1]<<6;i=b[j+16>>1]<<6;s=i+r|0;i=r-i|0;r=b[j+8>>1]|0;d=b[j+24>>1]|0;f=(d*36|0)+(r*83|0)|0;r=(R(d,-83)|0)+(r*36|0)|0;d=f+s|0;c[v>>2]=d;c[e>>2]=r+i;c[o>>2]=i-r;c[p>>2]=s-f;f=c[w>>2]|0;c[t>>2]=f+d;c[q>>2]=d-f;f=1;do{s=c[v+(f<<2)>>2]|0;d=c[w+(f<<2)>>2]|0;c[t+(f<<2)>>2]=d+s;c[t+(7-f<<2)>>2]=s-d;f=f+1|0}while((f|0)!=4);f=0;do{d=c[t+(f<<2)>>2]|0;s=c[u+(f<<2)>>2]|0;i=d+2048+s|0;r=i>>12;b[j+(f<<1)>>1]=(r+32768|0)>>>0>65535?i>>31^32767:r;s=d-s+2048|0;d=s>>12;b[j+(15-f<<1)>>1]=(d+32768|0)>>>0>65535?s>>31^32767:d;f=f+1|0}while((f|0)!=8);k=k+1|0;if((k|0)==16)break;else j=j+32|0}l=x;return}function Rc(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;A=l;l=l+224|0;u=A+160|0;v=A+96|0;w=A+64|0;x=A+32|0;y=A+16|0;z=A;t=(e|0)<32;o=e+4|0;p=y+4|0;q=y+8|0;r=y+12|0;s=w+28|0;m=0;n=d;o=(o|0)<32?o:32;while(1){f=v;g=f+64|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));h=(o|0)>1;f=0;do{if(h){i=v+(f<<2)|0;g=1;j=c[i>>2]|0;do{j=(R(b[n+(g<<5<<1)>>1]|0,a[3717+(g<<5)+f>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<(o|0));c[i>>2]=j}f=f+1|0}while((f|0)!=16);c[x>>2]=0;c[x+4>>2]=0;c[x+8>>2]=0;c[x+12>>2]=0;c[x+16>>2]=0;c[x+20>>2]=0;c[x+24>>2]=0;c[x+28>>2]=0;h=(o|0)/2|0;i=(o|0)>3;g=0;do{if(i){j=x+(g<<2)|0;f=1;k=c[j>>2]|0;do{k=(R(b[n+(f<<6<<1)>>1]|0,a[3717+(f<<1<<5)+g>>0]|0)|0)+k|0;f=f+2|0}while((f|0)<(h|0));c[j>>2]=k}g=g+1|0}while((g|0)!=8);c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;c[z+12>>2]=0;g=0;do{h=z+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[n+(f<<7<<1)>>1]|0,a[3717+(f<<2<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<8);c[h>>2]=i;g=g+1|0}while((g|0)!=4);i=b[n>>1]<<6;h=b[n+1024>>1]<<6;j=h+i|0;h=i-h|0;i=b[n+512>>1]|0;k=b[n+1536>>1]|0;f=(k*36|0)+(i*83|0)|0;i=(R(k,-83)|0)+(i*36|0)|0;k=f+j|0;c[y>>2]=k;c[p>>2]=i+h;c[q>>2]=h-i;c[r>>2]=j-f;f=c[z>>2]|0;c[w>>2]=f+k;c[s>>2]=k-f;f=1;do{j=c[y+(f<<2)>>2]|0;k=c[z+(f<<2)>>2]|0;c[w+(f<<2)>>2]=k+j;c[w+(7-f<<2)>>2]=j-k;f=f+1|0}while((f|0)!=4);f=0;do{j=c[w+(f<<2)>>2]|0;k=c[x+(f<<2)>>2]|0;c[u+(f<<2)>>2]=k+j;c[u+(15-f<<2)>>2]=j-k;f=f+1|0}while((f|0)!=8);f=0;do{k=c[u+(f<<2)>>2]|0;j=c[v+(f<<2)>>2]|0;h=k+64+j|0;i=h>>7;b[n+(f<<5<<1)>>1]=(i+32768|0)>>>0>65535?h>>31^32767:i;j=k-j+64|0;k=j>>7;b[n+(31-f<<5<<1)>>1]=(k+32768|0)>>>0>65535?j>>31^32767:k;f=f+1|0}while((f|0)!=16);o=(o|0)<32&((m|0)!=0&(m&3|0)==0)?o+-4|0:o;m=m+1|0;if((m|0)==32)break;else n=n+2|0}m=t?e:32;n=(m|0)>1;o=(m|0)/2|0;e=(m|0)>3;p=y+4|0;q=y+8|0;r=y+12|0;s=w+28|0;j=d;k=0;while(1){f=v;g=f+64|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));g=0;do{if(n){h=v+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[j+(f<<1)>>1]|0,a[3717+(f<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<(m|0));c[h>>2]=i}g=g+1|0}while((g|0)!=16);c[x>>2]=0;c[x+4>>2]=0;c[x+8>>2]=0;c[x+12>>2]=0;c[x+16>>2]=0;c[x+20>>2]=0;c[x+24>>2]=0;c[x+28>>2]=0;g=0;do{if(e){h=x+(g<<2)|0;f=1;i=c[h>>2]|0;do{d=f<<1;i=(R(b[j+(d<<1)>>1]|0,a[3717+(d<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<(o|0));c[h>>2]=i}g=g+1|0}while((g|0)!=8);c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;c[z+12>>2]=0;g=0;do{h=z+(g<<2)|0;f=1;i=c[h>>2]|0;do{d=f<<2;i=(R(b[j+(d<<1)>>1]|0,a[3717+(d<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<8);c[h>>2]=i;g=g+1|0}while((g|0)!=4);i=b[j>>1]<<6;h=b[j+32>>1]<<6;t=h+i|0;h=i-h|0;i=b[j+16>>1]|0;d=b[j+48>>1]|0;f=(d*36|0)+(i*83|0)|0;i=(R(d,-83)|0)+(i*36|0)|0;d=f+t|0;c[y>>2]=d;c[p>>2]=i+h;c[q>>2]=h-i;c[r>>2]=t-f;f=c[z>>2]|0;c[w>>2]=f+d;c[s>>2]=d-f;f=1;do{t=c[y+(f<<2)>>2]|0;d=c[z+(f<<2)>>2]|0;c[w+(f<<2)>>2]=d+t;c[w+(7-f<<2)>>2]=t-d;f=f+1|0}while((f|0)!=4);f=0;do{t=c[w+(f<<2)>>2]|0;d=c[x+(f<<2)>>2]|0;c[u+(f<<2)>>2]=d+t;c[u+(15-f<<2)>>2]=t-d;f=f+1|0}while((f|0)!=8);f=0;do{d=c[u+(f<<2)>>2]|0;t=c[v+(f<<2)>>2]|0;h=d+2048+t|0;i=h>>12;b[j+(f<<1)>>1]=(i+32768|0)>>>0>65535?h>>31^32767:i;t=d-t+2048|0;d=t>>12;b[j+(31-f<<1)>>1]=(d+32768|0)>>>0>65535?t>>31^32767:d;f=f+1|0}while((f|0)!=16);k=k+1|0;if((k|0)==32)break;else j=j+64|0}l=A;return}function Sc(a){a=a|0;var c=0,d=0,e=0,f=0;e=((((b[a>>1]|0)+1|0)>>>1)+32|0)>>>6&65535;c=0;do{f=c<<2;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=4);c=c+1|0}while((c|0)!=4);return}function Tc(a){a=a|0;var c=0,d=0,e=0,f=0;e=((((b[a>>1]|0)+1|0)>>>1)+32|0)>>>6&65535;c=0;do{f=c<<3;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=8);c=c+1|0}while((c|0)!=8);return}function Uc(a){a=a|0;var c=0,d=0,e=0,f=0;e=((((b[a>>1]|0)+1|0)>>>1)+32|0)>>>6&65535;c=0;do{f=c<<4;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=16);c=c+1|0}while((c|0)!=16);return}function Vc(a){a=a|0;var c=0,d=0,e=0,f=0;e=((((b[a>>1]|0)+1|0)>>>1)+32|0)>>>6&65535;c=0;do{f=c<<5;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=32);c=c+1|0}while((c|0)!=32);return}function Wc(e,f,g,h,i,j,k,m,n){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0;q=l;l=l+128|0;p=q;j=p;o=j+128|0;do{c[j>>2]=0;j=j+4|0}while((j|0)<(o|0));o=d[i+96+n>>0]|0;j=0;do{r=j;j=j+1|0;c[p+((r+o&31)<<2)>>2]=b[i+112+(n*10|0)+(j<<1)>>1]}while((j|0)!=4);if((m|0)>0){i=(k|0)>0;o=0;while(1){if(i){j=0;do{r=d[f+j>>0]|0;r=r+(c[p+(r>>>3<<2)>>2]|0)|0;a[e+j>>0]=r>>>0>255?0-r>>31:r;j=j+1|0}while((j|0)!=(k|0))}o=o+1|0;if((o|0)==(m|0))break;else{f=f+h|0;e=e+g|0}}}l=q;return}function Xc(e,f,g,h,i,j,k,l,m,n,o,p){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0;r=i+112+(m*10|0)|0;q=c[i+100+(m<<2)>>2]|0;if((q|0)!=1){if(c[j>>2]|0){p=b[r>>1]|0;if((l|0)>0){o=0;do{s=(d[f+(R(o,h)|0)>>0]|0)+p|0;a[e+(R(o,g)|0)>>0]=s>>>0>255?0-s>>31:s;o=o+1|0}while((o|0)!=(l|0));o=1}else o=1}else o=0;if(c[j+8>>2]|0){n=b[r>>1]|0;k=k+-1|0;if((l|0)>0){p=0;do{s=(d[f+((R(p,h)|0)+k)>>0]|0)+n|0;a[e+((R(p,g)|0)+k)>>0]=s>>>0>255?0-s>>31:s;p=p+1|0}while((p|0)!=(l|0))}}if(!q){n=k;p=l;k=0}else{s=k;t=9}}else{s=k;o=0;t=9}if((t|0)==9){if(c[j+4>>2]|0){p=b[r>>1]|0;if((o|0)<(s|0)){k=o;do{t=(d[f+k>>0]|0)+p|0;a[e+k>>0]=t>>>0>255?0-t>>31:t;k=k+1|0}while((k|0)!=(s|0));k=1}else k=1}else k=0;if(c[j+12>>2]|0){j=b[r>>1]|0;p=l+-1|0;q=R(p,g)|0;r=R(p,h)|0;if((o|0)<(s|0)){n=o;do{l=(d[f+(n+r)>>0]|0)+j|0;a[e+(n+q)>>0]=l>>>0>255?0-l>>31:l;n=n+1|0}while((n|0)!=(s|0));n=s}else n=s}else{n=s;p=l}}dd(e,f,g,h,i,n,p,m,o,k);return}function Yc(e,f,g,h,i,j,k,l,m,n,o,p){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;v=i+112+(m*10|0)|0;z=c[i+100+(m<<2)>>2]|0;G=(z|0)!=1;if(G){if(c[j>>2]|0){t=b[v>>1]|0;if((l|0)>0){s=0;do{D=(d[f+(R(s,h)|0)>>0]|0)+t|0;a[e+(R(s,g)|0)>>0]=D>>>0>255?0-D>>31:D;s=s+1|0}while((s|0)!=(l|0));u=1}else u=1}else u=0;if(c[j+8>>2]|0){t=b[v>>1]|0;k=k+-1|0;if((l|0)>0){s=0;do{D=(d[f+((R(s,h)|0)+k)>>0]|0)+t|0;a[e+((R(s,g)|0)+k)>>0]=D>>>0>255?0-D>>31:D;s=s+1|0}while((s|0)!=(l|0))}}if(!z){D=k;w=0;B=0}else{x=u;y=9}}else{x=0;y=9}if((y|0)==9){if(c[j+4>>2]|0){t=b[v>>1]|0;if((x|0)<(k|0)){s=x;do{D=(d[f+s>>0]|0)+t|0;a[e+s>>0]=D>>>0>255?0-D>>31:D;s=s+1|0}while((s|0)!=(k|0));w=1}else w=1}else w=0;if(c[j+12>>2]|0){v=b[v>>1]|0;l=l+-1|0;t=R(l,g)|0;u=R(l,h)|0;if((x|0)<(k|0)){s=x;do{D=(d[f+(s+u)>>0]|0)+v|0;a[e+(s+t)>>0]=D>>>0>255?0-D>>31:D;s=s+1|0}while((s|0)!=(k|0));D=k;u=x;B=1}else{D=k;u=x;B=1}}else{D=k;u=x;B=1}}dd(e,f,g,h,i,D,l,m,u,w);C=(z|0)==2;if(!(C&(a[p>>0]|0)==0)){s=p+1|0;k=(z|0)==3;if(k&(a[s>>0]|0)==0)if(!(c[j+4>>2]|0)){t=(c[j+8>>2]|0)==0;A=1;y=0;z=s}else{t=0;A=1;y=0;z=s}else{t=0;A=k;y=0;z=s}}else{if(!(c[j>>2]|0))k=(c[j+4>>2]|0)==0;else k=0;t=0;A=0;y=k&1;z=p+1|0}v=t&1;m=p+2|0;if(C&(a[m>>0]|0)==0?(c[j+8>>2]|0)==0:0)k=(c[j+12>>2]|0)==0;else k=0;x=k&1;i=p+3|0;if(A&(a[i>>0]|0)==0?(c[j>>2]|0)==0:0)k=(c[j+12>>2]|0)==0;else k=0;t=k&1;if(G&(a[n>>0]|0)!=0?(E=y+w|0,F=l-t|0,(E|0)<(F|0)):0){k=E;do{a[e+(R(k,g)|0)>>0]=a[f+(R(k,h)|0)>>0]|0;k=k+1|0}while((k|0)!=(F|0))}if(G&(a[n+1>>0]|0)!=0?(H=v+w|0,I=l-x|0,(H|0)<(I|0)):0){s=D+-1|0;k=H;do{a[e+(s+(R(k,g)|0))>>0]=a[f+(s+(R(k,h)|0))>>0]|0;k=k+1|0}while((k|0)!=(I|0))}if(B&(a[o>>0]|0)!=0?(r=y+u|0,J=D-v|0,(r|0)<(J|0)):0)do{a[e+r>>0]=a[f+r>>0]|0;r=r+1|0}while((r|0)!=(J|0));if(B&(a[o+1>>0]|0)!=0?(q=t+u|0,K=D-x|0,(q|0)<(K|0)):0){k=l+-1|0;r=R(k,h)|0;k=R(k,g)|0;do{a[e+(q+k)>>0]=a[f+(q+r)>>0]|0;q=q+1|0}while((q|0)!=(K|0))}if(C&(a[p>>0]|0)!=0)a[e>>0]=a[f>>0]|0;r=D+-1|0;if(A&(a[z>>0]|0)!=0)a[e+r>>0]=a[f+r>>0]|0;q=l+-1|0;if(C&(a[m>>0]|0)!=0){K=e+(r+(R(q,g)|0))|0;a[K>>0]=a[f+(r+(R(q,h)|0))>>0]|0}if(A&(a[i>>0]|0)!=0){g=e+(R(q,g)|0)|0;a[g>>0]=a[f+(R(q,h)|0)>>0]|0}return}function Zc(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;cd(a,b,1,c,d,e,f);return}function _c(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;cd(a,1,b,c,d,e,f);return}function $c(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;bd(a,b,1,c,d,e);return}function ad(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;bd(a,1,b,c,d,e);return}function bd(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;u=f<<2;v=R(e,-2)|0;w=0-e|0;t=0;while(1){p=c[g+(t<<2)>>2]|0;if((p|0)>=1){q=0-p|0;r=(a[h+t>>0]|0)==0;s=(a[i+t>>0]|0)==0;n=0;o=b;while(1){k=o+w|0;m=d[k>>0]|0;l=d[o>>0]|0;j=(d[o+v>>0]|0)+4-(d[o+e>>0]|0)+(l-m<<2)>>3;j=(j|0)<(q|0)?q:(j|0)>(p|0)?p:j;m=j+m|0;if(r)a[k>>0]=m>>>0>255?0-m>>31:m;j=l-j|0;if(s)a[o>>0]=j>>>0>255?0-j>>31:j;n=n+1|0;if((n|0)==4)break;else o=o+f|0}}t=t+1|0;if((t|0)==2)break;else b=b+u|0}return}function cd(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;aa=R(e,-3)|0;ba=R(e,-2)|0;ca=0-e|0;M=e<<1;N=f*3|0;O=N+aa|0;P=N+ba|0;Q=N-e|0;S=N+M|0;T=N+e|0;U=g>>3;V=g>>2;W=R(e,-4)|0;X=e*3|0;Y=N+W|0;Z=N+X|0;_=(g>>1)+g>>3;$=f<<2;L=0;while(1){m=a[b+aa>>0]|0;n=a[b+ba>>0]|0;o=a[b+ca>>0]|0;k=o&255;z=(m&255)-((n&255)<<1)+k|0;z=(z|0)>-1?z:0-z|0;u=a[b+M>>0]|0;t=a[b+e>>0]|0;s=a[b>>0]|0;l=s&255;B=(u&255)-((t&255)<<1)+l|0;B=(B|0)>-1?B:0-B|0;p=d[b+Q>>0]|0;A=(d[b+O>>0]|0)-((d[b+P>>0]|0)<<1)+p|0;A=(A|0)>-1?A:0-A|0;q=d[b+N>>0]|0;C=(d[b+S>>0]|0)-((d[b+T>>0]|0)<<1)+q|0;C=(C|0)>-1?C:0-C|0;v=B+z|0;w=C+A|0;K=c[h+(L<<2)>>2]|0;y=a[i+L>>0]|0;D=a[j+L>>0]|0;a:do if((w+v|0)<(g|0)){x=(K*5|0)+1>>1;J=(d[b+W>>0]|0)-k|0;r=a[b+X>>0]|0;I=(r&255)-l|0;if((((((I|0)>-1?I:0-I|0)+((J|0)>-1?J:0-J|0)|0)<(U|0)?(J=k-l|0,(((J|0)>-1?J:0-J|0)|0)<(x|0)):0)?(J=(d[b+Y>>0]|0)-p|0,I=(d[b+Z>>0]|0)-q|0,(((I|0)>-1?I:0-I|0)+((J|0)>-1?J:0-J|0)|0)<(U|0)):0)?(J=p-q|0,((v<<1|0)<(V|0)?(((J|0)>-1?J:0-J|0)|0)<(x|0):0)&(w<<1|0)<(V|0)):0){z=K<<1;x=y<<24>>24==0;y=0-z|0;w=D<<24>>24==0;k=0;v=b;while(1){q=m&255;p=n&255;o=o&255;n=s&255;m=t&255;l=u&255;if(x){K=d[v+W>>0]|0;J=((q+4+m+(o+p+n<<1)|0)>>>3)-o|0;a[v+ca>>0]=((J|0)<(y|0)?y:(J|0)>(z|0)?z:J)+o;J=((q+2+p+o+n|0)>>>2)-p|0;a[v+ba>>0]=((J|0)<(y|0)?y:(J|0)>(z|0)?z:J)+p;K=((q*3|0)+4+p+o+n+(K<<1)>>3)-q|0;a[v+aa>>0]=((K|0)<(y|0)?y:(K|0)>(z|0)?z:K)+q}if(w){K=((p+4+l+(n+o+m<<1)|0)>>>3)-n|0;a[v>>0]=((K|0)<(y|0)?y:(K|0)>(z|0)?z:K)+n;K=((o+2+n+m+l|0)>>>2)-m|0;a[v+e>>0]=((K|0)<(y|0)?y:(K|0)>(z|0)?z:K)+m;K=((o+4+n+m+(l*3|0)+((r&255)<<1)|0)>>>3)-l|0;a[v+M>>0]=((K|0)<(y|0)?y:(K|0)>(z|0)?z:K)+l}l=v+f|0;k=k+1|0;if((k|0)==4)break a;v=l;m=a[l+aa>>0]|0;n=a[l+ba>>0]|0;o=a[l+ca>>0]|0;s=a[l>>0]|0;t=a[l+e>>0]|0;u=a[l+M>>0]|0;r=a[l+X>>0]|0}}H=K>>1;I=K*10|0;J=0-K|0;G=y<<24>>24==0;F=D<<24>>24==0;E=G&(A+z|0)<(_|0);D=0-H|0;A=F&(C+B|0)<(_|0);k=0;z=b;while(1){x=m&255;y=z+ba|0;w=n&255;r=z+ca|0;v=o&255;p=s&255;q=z+e|0;o=t&255;n=u&255;l=((p-v|0)*9|0)+8+(R(o-w|0,-3)|0)>>4;if((((l|0)>-1?l:0-l|0)|0)<(I|0)){m=(l|0)<(J|0)?J:(l|0)>(K|0)?K:l;l=m+v|0;if(G)a[r>>0]=l>>>0>255?0-l>>31:l;l=p-m|0;if(F)a[z>>0]=l>>>0>255?0-l>>31:l;if(E){C=((x+1+v|0)>>>1)-w+m>>1;C=((C|0)<(D|0)?D:(C|0)>(H|0)?H:C)+w|0;a[y>>0]=C>>>0>255?0-C>>31:C}if(A){C=((p+1+n|0)>>>1)-o-m>>1;C=((C|0)<(D|0)?D:(C|0)>(H|0)?H:C)+o|0;a[q>>0]=C>>>0>255?0-C>>31:C}}l=z+f|0;k=k+1|0;if((k|0)==4)break a;z=l;m=a[l+aa>>0]|0;n=a[l+ba>>0]|0;o=a[l+ca>>0]|0;s=a[l>>0]|0;t=a[l+e>>0]|0;u=a[l+M>>0]|0}}while(0);L=L+1|0;if((L|0)==2)break;else b=b+$|0}return}function dd(e,f,g,h,i,j,k,l,m,n){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;o=c[i+100+(l<<2)>>2]|0;v=a[1738+(o<<2)>>0]|0;w=a[1738+(o<<2)+2>>0]|0;if((n|0)<(k|0)){u=R((a[1738+(o<<2)+3>>0]|0)+n|0,h)|0;x=(m|0)<(j|0);t=R(n,g)|0;r=R((a[1738+(o<<2)+1>>0]|0)+n|0,h)|0;s=n;n=R(n,h)|0;while(1){if(x){p=r+v|0;q=u+w|0;o=m;do{y=a[f+(o+n)>>0]|0;A=a[f+(p+o)>>0]|0;z=a[f+(q+o)>>0]|0;y=(b[i+112+(l*10|0)+(d[1754+(((y&255)>(A&255)?3:((y<<24>>24!=A<<24>>24)<<31>>31)+2|0)+((y&255)>(z&255)?1:(y<<24>>24!=z<<24>>24)<<31>>31))>>0]<<1)>>1]|0)+(y&255)|0;a[e+(o+t)>>0]=y>>>0>255?0-y>>31:y;o=o+1|0}while((o|0)!=(j|0))}s=s+1|0;if((s|0)==(k|0))break;else{t=t+g|0;u=u+h|0;r=r+h|0;n=n+h|0}}}return}function ed(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;n=c[b+136>>2]|0;j=1<>2]|0)+13080>>2];o=j+-1|0;k=o&e;l=(o&f|0)!=0;i=(a[n+309>>0]|0)!=0|l;b=i&1;c[n+31296>>2]=b;m=(a[n+308>>0]|0)!=0|(k|0)!=0;c[n+31292>>2]=m&1;if(!(o&(f|e)))i=d[n+311>>0]|0;else i=m&i&1;c[n+31300>>2]=i;if((k+g|0)==(j|0))b=(a[n+310>>0]|0)!=0&(l^1)&1;c[n+31308>>2]=b;if(!b)b=0;else b=(g+e|0)<(c[n+312>>2]|0);c[n+31304>>2]=b&1;c[n+31288>>2]=(h+f|0)<(c[n+316>>2]|0)&m&1;return}function fd(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;v=l;l=l+16|0;t=v;p=(c[b+136>>2]|0)+204|0;r=me(13196)|0;c[t>>2]=r;u=r;a:do if(r){s=r+4|0;q=c[s>>2]|0;e=gd(b)|0;if((e|0)>=0){c[q>>2]=0;g=q+72|0;c[g>>2]=1;o=Pd(p,8)|0;f=q+4|0;c[f>>2]=o;do if((o|0)<=3){a[q+8>>0]=0;m=q+13120|0;c[m>>2]=Td(p,32)|0;e=Td(p,32)|0;n=q+13124|0;c[n>>2]=e;e=Dd(c[m>>2]|0,e,0,c[b+4>>2]|0)|0;if((e|0)>=0){k=Pd(p,8)|0;o=q+52|0;c[o>>2]=k+8;if(!k){switch(c[f>>2]|0){case 0:{f=8;break}case 1:{f=0;break}case 2:{f=4;break}default:f=5}c[q+60>>2]=f;c[q+56>>2]=0;f=Ae(f)|0;if(f){c[q+13180>>2]=0;c[q+13168>>2]=0;k=d[f+5>>0]|0;c[q+13172>>2]=k;c[q+13176>>2]=k;k=d[f+6>>0]|0;c[q+13184>>2]=k;c[q+13188>>2]=k;c[q+64>>2]=8;if((c[g>>2]|0)>0){f=0;do{c[q+76+(f*12|0)>>2]=1;c[q+76+(f*12|0)+4>>2]=0;c[q+76+(f*12|0)+8>>2]=-1;f=f+1|0}while((f|0)<(c[g>>2]|0))}g=(Ud(p)|0)+3|0;f=q+13064|0;c[f>>2]=g;g=1<>2]=h+(c[m>>2]|0)&g;c[n>>2]=(c[n>>2]|0)+h&g;g=q+13068|0;c[g>>2]=Ud(p)|0;h=q+13072|0;c[h>>2]=(Ud(p)|0)+2;j=Ud(p)|0;k=c[h>>2]|0;i=q+13076|0;c[i>>2]=k+j;if(k>>>0<(c[f>>2]|0)>>>0){w=Ud(p)|0;j=q+13092|0;c[j>>2]=w;k=q+13088|0;c[k>>2]=w;a[q+12940>>0]=1;a[q+12941>>0]=Sd(p)|0;w=Sd(p)|0;c[q+68>>2]=w;if(w|0){w=q+13044|0;a[w>>0]=(Pd(p,4)|0)+1;a[q+13045>>0]=(Pd(p,4)|0)+1;x=(Ud(p)|0)+3|0;c[q+13048>>2]=x;c[q+13052>>2]=(Ud(p)|0)+x;if((d[w>>0]|0|0)>(c[o>>2]|0)){e=-1094995529;break}a[q+13056>>0]=Sd(p)|0}c[q+2184>>2]=0;a[q+12942>>0]=0;a[q+13060>>0]=1;a[q+13061>>0]=Sd(p)|0;c[q+160>>2]=0;c[q+164>>2]=1;if(Sd(p)|0?(x=Sd(p)|0,Rd(p,7),x|0):0){c[q+13096>>2]=Sd(p)|0;c[q+13100>>2]=Sd(p)|0;c[q+13104>>2]=Sd(p)|0;c[q+13108>>2]=Sd(p)|0;Sd(p)|0;c[q+13112>>2]=Sd(p)|0;Sd(p)|0;c[q+13116>>2]=Sd(p)|0;Sd(p)|0}m=c[m>>2]|0;c[q+12>>2]=m;n=c[n>>2]|0;c[q+16>>2]=n;f=c[f>>2]|0;x=(c[g>>2]|0)+f|0;c[q+13080>>2]=x;g=f+-1|0;c[q+13084>>2]=g;w=1<>x;c[q+13128>>2]=y;w=n+-1+w>>x;c[q+13132>>2]=w;c[q+13136>>2]=R(y,w)|0;c[q+13140>>2]=m>>f;c[q+13144>>2]=n>>f;w=c[h>>2]|0;c[q+13148>>2]=m>>w;c[q+13152>>2]=n>>w;c[q+13156>>2]=m>>g;c[q+13160>>2]=n>>g;w=x-w|0;c[q+13164>>2]=(1<>2]=((c[o>>2]|0)*6|0)+-48;if((((!(x>>>0>6?1:((1<>2]|0)>>>0<=w>>>0:0)?(c[j>>2]|0)>>>0<=w>>>0:0)?(c[i>>2]|0)>>>0<=(x>>>0<5?x:5)>>>0:0)?(hd(p)|0)>=0:0){h=b+272|0;e=c[h>>2]|0;if((e|0)!=0?(Af(c[e+4>>2]|0,c[s>>2]|0,c[r+8>>2]|0)|0)==0:0){pe(t);e=0;break a}else e=0;do{f=b+400+(e<<2)|0;g=c[f>>2]|0;do if(g|0){if(c[c[g+4>>2]>>2]|0)break;pe(f)}while(0);e=e+1|0}while((e|0)!=256);e=c[h>>2]|0;do if(e|0){f=b+200|0;if((c[f>>2]|0)!=(c[e+4>>2]|0))break;x=b+1424|0;pe(x);y=ne(c[h>>2]|0)|0;c[x>>2]=y;if(y|0)break;c[f>>2]=0}while(0);pe(h);c[h>>2]=u;e=0;break a}}else e=-1094995529}else e=-22}else e=-1094995529}}else e=-1094995529;while(0);pe(t)}}else e=-12;while(0);l=v;return e|0}function gd(b){b=b|0;var d=0,e=0,f=0,g=0;e=me(468)|0;if(!e)d=-12;else{f=c[e+4>>2]|0;c[f+4>>2]=1;g=f+8|0;c[g>>2]=1;a[f>>0]=0;c[f+348>>2]=1;d=0;do{c[f+352+(d<<2)>>2]=1;c[f+380+(d<<2)>>2]=0;c[f+408+(d<<2)>>2]=-1;d=d+1|0}while((d|0)<(c[g>>2]|0));c[f+436>>2]=0;c[f+440>>2]=1;a[f+444>>0]=0;d=b+208|0;pe(d);c[d>>2]=e;d=0}return d|0}function hd(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(id(a)|0)|0}function id(a){a=a|0;return c[a+8>>2]|0}function jd(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;M=l;l=l+16|0;L=M+4|0;H=M;K=(c[b+136>>2]|0)+204|0;i=ee(1692)|0;c[H>>2]=i;a:do if(!i)d=-12;else{J=je(i,1692,6,0,0)|0;c[L>>2]=J;I=J;if(!J){be(H);d=-12;break}a[i+53>>0]=1;f=i+44|0;c[f>>2]=1;g=i+48|0;c[g>>2]=1;h=i+52|0;a[h>>0]=1;a[i+57>>0]=0;c[i+60>>2]=0;c[i+64>>2]=0;a[i+1629>>0]=2;J=Ud(K)|0;b:do if((J>>>0<=255?(d=Ud(K)|0,c[i>>2]=d,d>>>0<=31):0)?(e=c[b+272+(d<<2)>>2]|0,(e|0)!=0):0){G=c[e+4>>2]|0;a[i+41>>0]=Sd(K)|0;a[i+39>>0]=Sd(K)|0;c[i+1624>>2]=Pd(K,3)|0;a[i+4>>0]=Sd(K)|0;a[i+5>>0]=Sd(K)|0;c[i+8>>2]=(Ud(K)|0)+1;c[i+12>>2]=(Ud(K)|0)+1;c[i+16>>2]=ld(K)|0;a[i+20>>0]=Sd(K)|0;a[i+21>>0]=Sd(K)|0;F=(Sd(K)|0)&255;a[i+22>>0]=F;d=i+24|0;c[d>>2]=0;if(F<<24>>24)c[d>>2]=Ud(K)|0;F=ld(K)|0;c[i+28>>2]=F;if((F+12|0)>>>0<=24?(F=ld(K)|0,c[i+32>>2]=F,(F+12|0)>>>0<=24):0){a[i+36>>0]=Sd(K)|0;a[i+37>>0]=Sd(K)|0;a[i+38>>0]=Sd(K)|0;a[i+40>>0]=Sd(K)|0;F=i+42|0;a[F>>0]=Sd(K)|0;a[i+43>>0]=Sd(K)|0;if(!(a[F>>0]|0))o=c[H>>2]|0;else{c[f>>2]=(Ud(K)|0)+1;d=(Ud(K)|0)+1|0;c[g>>2]=d;e=c[f>>2]|0;if(!e){d=-1094995529;break}if((d|0)==0?1:(e|0)>=(c[G+13120>>2]|0)){d=-1094995529;break}if((d|0)>=(c[G+13124>>2]|0)){d=-1094995529;break}E=i+1648|0;c[E>>2]=he(e,4)|0;F=he(c[g>>2]|0,4)|0;c[i+1652>>2]=F;if((c[E>>2]|0)==0|(F|0)==0){d=-12;break}F=(Sd(K)|0)&255;a[h>>0]=F;if(!(F<<24>>24)){F=c[f>>2]|0;d=F+-1|0;if((F|0)>1){i=c[H>>2]|0;f=i+1648|0;j=i+44|0;e=0;g=0;d=0;while(1){h=(Ud(K)|0)+1|0;c[(c[f>>2]|0)+(e<<2)>>2]=h;g=Jf(h|0,0,g|0,d|0)|0;h=C;e=e+1|0;d=(c[j>>2]|0)+-1|0;if((e|0)>=(d|0))break;else d=h}}else{h=0;g=0}e=c[G+13128>>2]|0;f=((e|0)<0)<<31>>31;if(!(f>>>0>h>>>0|(f|0)==(h|0)&e>>>0>g>>>0)){d=-1094995529;break}j=Hf(e|0,f|0,g|0,h|0)|0;c[(c[i+1648>>2]|0)+(d<<2)>>2]=j;j=c[H>>2]|0;i=j+48|0;F=c[i>>2]|0;d=F+-1|0;if((F|0)>1){f=j+1652|0;e=0;g=0;d=0;while(1){h=(Ud(K)|0)+1|0;c[(c[f>>2]|0)+(e<<2)>>2]=h;g=Jf(h|0,0,g|0,d|0)|0;h=C;e=e+1|0;d=(c[i>>2]|0)+-1|0;if((e|0)>=(d|0))break;else d=h}}else{h=0;g=0}e=c[G+13132>>2]|0;f=((e|0)<0)<<31>>31;if(!(f>>>0>h>>>0|(f|0)==(h|0)&e>>>0>g>>>0)){d=-1094995529;break}F=Hf(e|0,f|0,g|0,h|0)|0;c[(c[j+1652>>2]|0)+(d<<2)>>2]=F}F=(Sd(K)|0)&255;o=c[H>>2]|0;a[o+53>>0]=F}a[o+54>>0]=Sd(K)|0;F=(Sd(K)|0)&255;a[o+55>>0]=F;if((F<<24>>24?(a[o+56>>0]=Sd(K)|0,F=(Sd(K)|0)&255,a[o+57>>0]=F,F<<24>>24==0):0)?(F=o+60|0,c[F>>2]=(ld(K)|0)<<1,E=(ld(K)|0)<<1,c[o+64>>2]=E,(E+13|0)>>>0>26?1:((c[F>>2]|0)+13|0)>>>0>26):0){d=-1094995529;break}F=(Sd(K)|0)&255;a[o+68>>0]=F;if(F<<24>>24){d=o+69|0;md(d);d=nd(b,d,G)|0;if((d|0)<0)break}else d=0;a[o+1617>>0]=Sd(K)|0;F=(Ud(K)|0)+2|0;c[o+1620>>2]=F;E=G+13080|0;if(F>>>0<=(c[E>>2]|0)>>>0){a[o+1628>>0]=Sd(K)|0;if(Sd(K)|0?(F=Sd(K)|0,Pd(K,7)|0,F|0):0)od(b,o);j=o+44|0;i=o+1656|0;c[i>>2]=he((c[j>>2]|0)+1|0,4)|0;m=o+48|0;k=o+1660|0;c[k>>2]=he((c[m>>2]|0)+1|0,4)|0;F=G+13128|0;D=he(c[F>>2]|0,4)|0;n=o+1664|0;c[n>>2]=D;if((c[i>>2]|0)!=0?!((c[k>>2]|0)==0|(D|0)==0):0){do if(a[o+52>>0]|0){f=o+1648|0;e=c[f>>2]|0;if(!e){c[f>>2]=he(c[j>>2]|0,4)|0;c[o+1652>>2]=he(c[m>>2]|0,4)|0;e=c[f>>2]|0;if(!e){d=-12;break b}}h=c[o+1652>>2]|0;if(!h){d=-12;break b}f=c[j>>2]|0;if((f|0)>0){g=0;do{D=g;g=g+1|0;B=c[F>>2]|0;c[e+(D<<2)>>2]=((R(B,g)|0)/(f|0)|0)-((R(B,D)|0)/(f|0)|0);f=c[j>>2]|0}while((g|0)<(f|0))}e=c[m>>2]|0;if((e|0)<=0)break;g=G+13132|0;f=0;do{D=f;f=f+1|0;B=c[g>>2]|0;c[h+(D<<2)>>2]=((R(B,f)|0)/(e|0)|0)-((R(B,D)|0)/(e|0)|0);e=c[m>>2]|0}while((f|0)<(e|0))}while(0);i=c[i>>2]|0;c[i>>2]=0;if((c[j>>2]|0)>0){f=c[o+1648>>2]|0;e=0;g=0;do{g=(c[f+(e<<2)>>2]|0)+g|0;e=e+1|0;c[i+(e<<2)>>2]=g}while((e|0)<(c[j>>2]|0))}g=c[k>>2]|0;c[g>>2]=0;if((c[m>>2]|0)>0){f=c[o+1652>>2]|0;e=0;h=0;do{h=(c[f+(e<<2)>>2]|0)+h|0;e=e+1|0;c[g+(e<<2)>>2]=h}while((e|0)<(c[m>>2]|0))}e=c[F>>2]|0;if((e|0)>0){h=c[n>>2]|0;f=0;g=0;do{f=(g>>>0>(c[i+(f<<2)>>2]|0)>>>0&1)+f|0;c[h+(g<<2)>>2]=f;g=g+1|0;e=c[F>>2]|0}while((g|0)<(e|0))}B=R(c[G+13132>>2]|0,e)|0;A=o+1668|0;c[A>>2]=he(B,4)|0;e=o+1672|0;c[e>>2]=he(B,4)|0;f=o+1676|0;c[f>>2]=he(B,4)|0;D=G+13164|0;g=(c[D>>2]|0)+2|0;g=he(R(g,g)|0,4)|0;c[o+1688>>2]=g;if(!(c[A>>2]|0)){d=-12;break}if(!(c[e>>2]|0)){d=-12;break}if((c[f>>2]|0)==0|(g|0)==0){d=-12;break}if((B|0)>0){y=c[H>>2]|0;n=y+44|0;o=y+1656|0;p=y+48|0;q=y+1660|0;r=y+1652|0;s=c[q>>2]|0;t=c[y+1648>>2]|0;u=c[o>>2]|0;v=c[y+1668>>2]|0;w=c[y+1672>>2]|0;x=y+1652|0;y=y+1648|0;m=0;do{k=c[F>>2]|0;z=(m|0)%(k|0)|0;A=(m|0)/(k|0)|0;f=c[n>>2]|0;e=0;while(1){if((e|0)>=(f|0)){j=0;break}g=e+1|0;if(z>>>0<(c[(c[o>>2]|0)+(g<<2)>>2]|0)>>>0){j=e;break}else e=g}f=c[p>>2]|0;e=0;while(1){if((e|0)>=(f|0)){i=0;break}g=e+1|0;if(A>>>0<(c[(c[q>>2]|0)+(g<<2)>>2]|0)>>>0){i=e;break}else e=g}if((j|0)>0){g=c[(c[x>>2]|0)+(i<<2)>>2]|0;h=c[y>>2]|0;e=0;f=0;do{e=(R(c[h+(f<<2)>>2]|0,g)|0)+e|0;f=f+1|0}while((f|0)!=(j|0))}else e=0;if((i|0)>0){g=c[r>>2]|0;f=0;do{e=(R(c[g+(f<<2)>>2]|0,k)|0)+e|0;f=f+1|0}while((f|0)!=(i|0))}A=R(c[t+(j<<2)>>2]|0,A-(c[s+(i<<2)>>2]|0)|0)|0;A=e+z+A-(c[u+(j<<2)>>2]|0)|0;c[v+(m<<2)>>2]=A;c[w+(A<<2)>>2]=m;m=m+1|0}while((m|0)!=(B|0))}f=c[H>>2]|0;u=f+48|0;g=c[u>>2]|0;if((g|0)>0){v=f+44|0;w=f+1660|0;t=f+1656|0;x=f+1676|0;s=f+1668|0;e=0;h=0;f=c[v>>2]|0;do if((f|0)>0){p=c[w>>2]|0;r=h+1|0;q=p+(r<<2)|0;p=p+(h<<2)|0;o=0;g=c[q>>2]|0;do{i=c[p>>2]|0;h=o;o=o+1|0;if(i>>>0>>0){m=c[t>>2]|0;n=m+(o<<2)|0;m=m+(h<<2)|0;f=c[n>>2]|0;do{h=c[m>>2]|0;if(h>>>0>>0){j=c[x>>2]|0;k=c[s>>2]|0;g=h;do{c[j+(c[k+((R(c[F>>2]|0,i)|0)+g<<2)>>2]<<2)>>2]=e;g=g+1|0;f=c[n>>2]|0}while(g>>>0>>0);g=c[q>>2]|0}i=i+1|0}while(i>>>0>>0);f=c[v>>2]|0}e=e+1|0}while((o|0)<(f|0));h=r;g=c[u>>2]|0}else h=h+1|0;while((h|0)<(g|0));f=c[H>>2]|0}else e=0;m=he(e,4)|0;c[f+1680>>2]=m;if(!m){d=-12;break}n=f+48|0;e=c[n>>2]|0;if((e|0)>0){k=f+44|0;o=f+1660|0;p=f+1656|0;j=0;g=c[k>>2]|0;do{if((g|0)>0){h=(c[o>>2]|0)+(j<<2)|0;i=c[p>>2]|0;e=0;do{B=R(c[F>>2]|0,c[h>>2]|0)|0;c[m+((R(g,j)|0)+e<<2)>>2]=(c[i+(e<<2)>>2]|0)+B;e=e+1|0;g=c[k>>2]|0}while((e|0)<(g|0));e=c[n>>2]|0}j=j+1|0}while((j|0)<(e|0))}r=(c[E>>2]|0)-(c[G+13072>>2]|0)|0;g=c[f+1688>>2]|0;e=c[D>>2]|0;c[f+1684>>2]=g+(e+3<<2);do if((e|0)>-2){f=0;e=e+2|0;do{c[g+((R(e,f)|0)<<2)>>2]=-1;c[g+(f<<2)>>2]=-1;f=f+1|0;h=c[D>>2]|0;e=h+2|0}while((f|0)<(e|0));if((h|0)<0)break;q=c[H>>2]|0;n=q+1668|0;o=r<<1;p=(r|0)>0;q=q+1684|0;m=0;e=h;while(1){if((e|0)>=0){i=m>>r;j=c[n>>2]|0;k=c[q>>2]|0;h=0;while(1){f=c[j+((R(c[F>>2]|0,i)|0)+(h>>r)<<2)>>2]<>2]=f;e=c[D>>2]|0;if((h|0)<(e|0))h=h+1|0;else break}}if((m|0)<(e|0))m=m+1|0;else break}}while(0);if((hd(K)|0)<0)break;d=b+400+(J<<2)|0;pe(d);c[d>>2]=I;d=0;break a}else d=-12}else d=-1094995529}else d=-1094995529}else d=-1094995529;while(0);pe(L)}while(0);l=M;return d|0}function kd(a,b){a=a|0;b=b|0;var d=0;a=l;l=l+16|0;d=a;c[d>>2]=b;be(b+1648|0);be(b+1652|0);be(b+1656|0);be(b+1660|0);be(b+1664|0);be(b+1668|0);be(b+1672|0);be(b+1680|0);be(b+1676|0);be(b+1688|0);be(d);l=a;return}function ld(a){a=a|0;return Xd(a)|0}function md(b){b=b|0;var c=0,d=0,e=0;c=0;do{d=b+(c<<6)|0;e=d+16|0;do{a[d>>0]=16;d=d+1|0}while((d|0)<(e|0));a[b+1536+c>>0]=16;a[b+1542+c>>0]=16;c=c+1|0}while((c|0)!=6);d=b+384|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+448|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+512|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+576|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+640|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+704|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+768|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+832|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+896|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+960|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1024|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1088|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1152|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1216|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1280|0;c=1759;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1344|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1408|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1472|0;c=1823;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));return} +function nd(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;o=(c[b+136>>2]|0)+204|0;l=0;a:while(1){p=(l|0)>0?64:16;q=(l|0)>1;r=l+-2|0;m=(l|0)==3?3:1;j=1<<(l<<1)+4;j=(j|0)<64?j:64;n=(l|0)==0;k=0;do{if(!(((Sd(o)|0)&255)<<24>>24)){b=Ud(o)|0;if(b|0){if(k>>>0>>0){b=-1094995529;break a}b=k-b|0;Pf(e+(l*384|0)+(k<<6)|0,e+(l*384|0)+(b<<6)|0,p|0)|0;if(q)a[e+1536+(r*6|0)+k>>0]=a[e+1536+(r*6|0)+b>>0]|0}}else{if(q){g=(ld(o)|0)+8|0;a[e+1536+(r*6|0)+k>>0]=g;b=0}else{b=0;g=8}do{if(n){h=(d[342+b>>0]|0)<<2;i=326+b|0}else{h=(d[422+b>>0]|0)<<3;i=358+b|0}i=(d[i>>0]|0)+h|0;g=(g+256+(ld(o)|0)|0)%256|0;a[e+(l*384|0)+(k<<6)+i>>0]=g;b=b+1|0}while((b|0)<(j|0))}k=k+m|0}while((k|0)<6);l=l+1|0;if((l|0)>=4){s=16;break}}if((s|0)==16)if((c[f+4>>2]|0)==3){b=0;do{a[e+1216+b>>0]=a[e+832+b>>0]|0;a[e+1280+b>>0]=a[e+896+b>>0]|0;a[e+1408+b>>0]=a[e+1024+b>>0]|0;a[e+1472+b>>0]=a[e+1088+b>>0]|0;b=b+1|0}while((b|0)!=64);a[e+1543>>0]=a[e+1537>>0]|0;a[e+1544>>0]=a[e+1538>>0]|0;a[e+1546>>0]=a[e+1540>>0]|0;a[e+1547>>0]=a[e+1541>>0]|0;b=0}else b=0;return b|0}function od(b,e){b=b|0;e=e|0;var f=0,g=0,h=0;g=(c[b+136>>2]|0)+204|0;if(a[e+21>>0]|0)a[e+1629>>0]=(Ud(g)|0)+2;a[e+1630>>0]=Sd(g)|0;f=(Sd(g)|0)&255;a[e+1631>>0]=f;if(f<<24>>24){a[e+1632>>0]=Ud(g)|0;b=Ud(g)|0;f=e+1633|0;a[f>>0]=b;if((b&255)>>>0<5){b=0;while(1){a[e+1634+b>>0]=Xd(g)|0;a[e+1639+b>>0]=Xd(g)|0;if((b|0)<(d[f>>0]|0))b=b+1|0;else{h=6;break}}}}else h=6;if((h|0)==6){a[e+1644>>0]=Ud(g)|0;a[e+1645>>0]=Ud(g)|0}return}function pd(a){a=a|0;var b=0;b=a+136|0;do qd(a);while((rd((c[b>>2]|0)+204|0)|0)!=0);return 1}function qd(a){a=a|0;var d=0,e=0,f=0,g=0;f=(c[a+136>>2]|0)+204|0;e=0;do{d=Pd(f,8)|0;e=d+e|0}while((d|0)==255);d=0;do{g=Pd(f,8)|0;d=g+d|0}while((g|0)==255);a:do if((c[a+2512>>2]|0)!=39)if((e|0)==132){ud(a);break}else{Rd(f,d<<3);break}else switch(e|0){case 256:{ud(a);break a}case 257:{b[a+4524>>1]=Pd(f,16)|0;break a}default:{Rd(f,d<<3);break a}}while(0);return}function rd(a){a=a|0;if((sd(a)|0)>0)a=(Qd(a,8)|0)!=128;else a=0;return a&1|0}function sd(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(td(a)|0)|0}function td(a){a=a|0;return c[a+8>>2]|0}function ud(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;f=(c[b+136>>2]|0)+204|0;h=(Pd(f,8)|0)&255;g=b+4468|0;e=0;do{switch(h<<24>>24){case 0:{a[g>>0]=1;d=0;do{a[b+4420+(e<<4)+d>>0]=Pd(f,8)|0;d=d+1|0}while((d|0)!=16);break}case 1:{Rd(f,16);break}case 2:{Rd(f,32);break}default:{}}e=e+1|0}while((e|0)!=3);return}function vd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;d=c[b+52>>2]|0;f=a+60|0;if((d|0)>0)if((c[f>>2]|0)==0?(d=ee(d)|0,c[f>>2]=d,(d|0)==0):0)d=-12;else e=5;else{c[f>>2]=0;e=5}if((e|0)==5){e=a+12|0;c[e>>2]=b;c[a+424>>2]=0;c[a+800>>2]=1;d=a+912|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[d+12>>2]=0;d=a+936|0;c[d>>2]=0;c[d+4>>2]=-2147483648;d=a+928|0;c[d>>2]=0;c[d+4>>2]=-2147483648;d=wa[c[b+76>>2]&3](a)|0;if((d|0)<0){be(f);c[e>>2]=0}else d=0}return d|0}function wd(a){a=a|0;var b=0,d=0,e=0;if(a|0){b=a+12|0;d=c[b>>2]|0;if(d|0?(e=c[d+92>>2]|0,e|0):0)wa[e&3](a)|0;c[a+796>>2]=0;be(a+60|0);c[b>>2]=0;c[a+808>>2]=0}return 0}function xd(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;if((f|0)>0){j=(e|0)==0;h=0;do{i=d+(R(h,g)|0)|0;i=Ba[b&1](a,i)|0;if(!j)c[e+(h<<2)>>2]=i;h=h+1|0}while((h|0)!=(f|0))}return 0}function yd(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((f|0)>0){h=(e|0)==0;g=0;do{i=za[b&1](a,d,g,0)|0;if(!h)c[e+(g<<2)>>2]=i;g=g+1|0}while((g|0)!=(f|0))}return 0}function zd(b,f,g){b=b|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=Ae(c[f+76>>2]|0)|0;m=l+4|0;a:do if(!(a[m>>0]|0))b=0;else{n=f+64|0;i=l+5|0;j=f+68|0;k=l+6|0;h=0;while(1){b=(R((((e[l+8+(h<<1)>>1]|0)>>>11&15)+8&65535)>>>3,c[n>>2]|0)|0)+31&-32;if((h+-1|0)>>>0<2){b=0-(0-b>>d[i>>0])|0;c[f+32+(h<<2)>>2]=b;g=0-(0-((c[j>>2]|0)+31&-32)>>d[k>>0])|0}else{c[f+32+(h<<2)>>2]=b;g=(c[j>>2]|0)+31&-32}b=le((R(b,g)|0)+32|0)|0;c[f+304+(h<<2)>>2]=b;if(!b){b=-1;break a}c[f+(h<<2)>>2]=c[b+4>>2];h=h+1|0;if((h|0)>=(d[m>>0]|0)){b=0;break}}}while(0);return b|0}function Ad(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;Kf(a|0,0,976)|0;e=(b|0)!=0;if(e){d=c[b+8>>2]|0;c[a+48>>2]=c[b+12>>2]}else d=-1;c[a+8>>2]=d;c[a+100>>2]=0;c[a+104>>2]=1;c[a+888>>2]=0;c[a+892>>2]=1;c[a+896>>2]=0;c[a+900>>2]=1;c[a+476>>2]=1;c[a+816>>2]=1;c[a+820>>2]=1;c[a+220>>2]=0;c[a+224>>2]=1;c[a+136>>2]=-1;c[a+416>>2]=-1;d=a+696|0;c[d>>2]=0;c[d+4>>2]=-2147483648;if((e?(f=c[b+52>>2]|0,(f|0)!=0):0)?(f=ee(f)|0,c[a+60>>2]=f,(f|0)==0):0)d=-12;else d=0;return d|0}function Bd(a){a=a|0;var b=0;b=Yd(976)|0;if(b){if((Ad(b,a)|0)<0){ae(b);b=0}}else b=0;return b|0}function Cd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+80|0;i=j;f=i;g=e;h=f+80|0;do{c[f>>2]=c[g>>2];f=f+4|0;g=g+4|0}while((f|0)<(h|0));h=a+12|0;g=c[h>>2]|0;do if((g|0)!=0?(c[g+8>>2]|0)==0:0){c[d>>2]=0;f=c[a+124>>2]|0;g=c[a+128>>2]|0;if(g|f|0?Dd(f,g,0,0)|0:0){f=-22;break}xe(b);f=c[h>>2]|0;if(((c[f+16>>2]&32|0)==0?(c[e+28>>2]|0)==0:0)?(c[a+808>>2]&1|0)==0:0){f=0;break}f=za[c[f+88>>2]&1](a,b,d,i)|0;if(!(c[d>>2]|0)){xe(b);break}else{d=a+424|0;c[d>>2]=(c[d>>2]|0)+1;break}}else f=-22;while(0);l=j;return f|0}function Dd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((a|0)>0&(b|0)>0?(a+128|0)>>>0<(268435455/((b+128|0)>>>0)|0)>>>0:0)a=0;else a=-22;return a|0}function Ed(a,b){a=a|0;b=b|0;return 0}function Fd(a,b,c){a=a|0;b=b|0;c=c|0;return Gd(a,b,c)|0}function Gd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;k=a+8|0;if(!(c[k>>2]|0)){g=c[a+116>>2]|0;h=c[a+120>>2]|0;if((Dd(g,h,0,0)|0)>=0?(j=c[a+136>>2]|0,(j|0)>=0):0){f=b+64|0;e=b+68|0;if((c[f>>2]|0)>=1?(c[e>>2]|0)>=1:0)e=1;else{i=c[a+792>>2]|0;l=0-(0-(c[a+124>>2]|0)>>i)|0;c[f>>2]=(g|0)>(l|0)?g:l;i=0-(0-(c[a+128>>2]|0)>>i)|0;c[e>>2]=(h|0)>(i|0)?h:i;e=0}c[b+76>>2]=j;f=e;i=8}else e=-22}else{f=1;i=8}if((i|0)==8){e=qa[c[a+476>>2]&1](a,b,d)|0;if(!(c[k>>2]|f)){c[b+64>>2]=c[a+116>>2];c[b+68>>2]=c[a+120>>2]}}return e|0}function Hd(a,b,d){a=a|0;b=b|0;d=d|0;c[b+4>>2]=a;return Fd(a,c[b>>2]|0,d)|0}function Id(a,b){a=a|0;b=b|0;a=c[b>>2]|0;if(a|0)xe(a);return}function Jd(a){a=a|0;return}function Kd(a,b,c){a=a|0;b=b|0;c=c|0;return}function Ld(a){a=a|0;var b=0;b=a+8|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+16|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+64|0;c[b>>2]=-1;c[b+4>>2]=-1;b=a+72|0;c[b>>2]=0;c[b+4>>2]=0;b=a+32|0;c[a>>2]=0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;return}function Md(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0;g=a+16|0;c[a+12>>2]=b;c[a+20>>2]=b+e;h=b+1|0;c[g>>2]=h;e=(d[b>>0]|0)<<18;c[a>>2]=e;f=b+2|0;c[g>>2]=f;e=(d[h>>0]|0)<<10|e;c[a>>2]=e;c[g>>2]=b+3;c[a>>2]=(d[f>>0]|0)<<2|e|2;c[a+4>>2]=510;return}function Nd(){if(!(c[650]|0)){Od();c[650]=1}return}function Od(){var b=0,c=0,e=0,f=0,g=0;b=0;while(1)if(b){f=(b&65280|0)==0;a[4741+b>>0]=(f?8:0)-(d[2334+(f?b:b>>>8)>>0]|0);b=b+1|0;if((b|0)==512){f=0;break}else continue}else{a[4741+b>>0]=9;b=1;continue}do{c=f<<1;b=0;do{g=a[1887+(f<<2)+b>>0]|0;e=(b<<7)+c|0;a[5253+(e|1)>>0]=g;a[5253+e>>0]=g;b=b+1|0}while((b|0)!=4);e=(d[2143+f>>0]|0)<<1;a[5765+(c+128)>>0]=e;a[5765+(c+129)>>0]=e|1;e=128-c|0;if(!f){b=0;c=1}else{c=(d[2207+f>>0]|0)<<1;b=(c|1)&255;c=c&255}a[5765+(e+-1)>>0]=c;a[5765+(e+-2)>>0]=b;f=f+1|0}while((f|0)!=64);b=6021;c=2271;e=b+63|0;do{a[b>>0]=a[c>>0]|0;b=b+1|0;c=c+1|0}while((b|0)<(e|0));return}function Pd(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;e=a+8|0;g=c[e>>2]|0;f=c[a+16>>2]|0;a=(c[a>>2]|0)+(g>>>3)|0;a=(Mf(d[a>>0]|d[a+1>>0]<<8|d[a+2>>0]<<16|d[a+3>>0]<<24|0)|0)<<(g&7)>>>(32-b|0);b=g+b|0;c[e>>2]=f>>>0>b>>>0?b:f;return a|0}function Qd(a,b){a=a|0;b=b|0;var e=0;e=c[a+8>>2]|0;a=(c[a>>2]|0)+(e>>>3)|0;return (Mf(d[a>>0]|d[a+1>>0]<<8|d[a+2>>0]<<16|d[a+3>>0]<<24|0)|0)<<(e&7)>>>(32-b|0)|0}function Rd(a,b){a=a|0;b=b|0;var d=0;d=a+8|0;a=c[a+16>>2]|0;b=(c[d>>2]|0)+b|0;c[d>>2]=a>>>0>b>>>0?b:a;return}function Sd(a){a=a|0;var b=0,e=0,f=0;e=a+8|0;f=c[e>>2]|0;b=(d[(c[a>>2]|0)+(f>>>3)>>0]|0)<<(f&7)>>>7&1;c[e>>2]=((f|0)<(c[a+16>>2]|0)&1)+f;return b|0}function Td(a,b){a=a|0;b=b|0;var c=0;do if(b)if((b|0)<26){a=Pd(a,b)|0;break}else{b=b+-16|0;c=(Pd(a,16)|0)<>>0>65535;e=b?e>>>16:e;b=b?16:0;c=(e&65280|0)==0;b=31-(d[2334+(c?e:e>>>8)>>0]|0)-(c?b:b|8)|0;Wd(a,b);return (Td(a,b+1|0)|0)+-1|0}function Vd(a){a=a|0;var b=0,d=0;b=l;l=l+32|0;d=b;c[d>>2]=c[a>>2];c[d+4>>2]=c[a+4>>2];c[d+8>>2]=c[a+8>>2];c[d+12>>2]=c[a+12>>2];c[d+16>>2]=c[a+16>>2];a=Td(d,32)|0;l=b;return a|0}function Wd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=a+8|0;e=c[d>>2]|0;f=0-e|0;a=(c[a+16>>2]|0)-e|0;c[d>>2]=((b|0)<(f|0)?f:(a|0)<(b|0)?a:b)+e;return}function Xd(a){a=a|0;a=Ud(a)|0;return ((a&1|0)==0?0-(a>>>1)|0:(a+1|0)>>>1)|0}function Yd(a){a=a|0;var b=0,d=0;d=(c[44]|0)+-32|0;b=a;while(1){if(d>>>0>>0){a=0;break}a=qf(b)|0;if((b|0)!=0|(a|0)!=0)break;else b=1}return a|0}function Zd(a,b){a=a|0;b=b|0;if(((c[44]|0)+-32|0)>>>0>>0)a=0;else a=yf(a,((b|0)==0&1)+b|0)|0;return a|0}function _d(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;f=g;if(!(($d(d,b,f)|0)==0?(f=c[f>>2]|0,e=Zd(a,f)|0,!((f|0)!=0&(e|0)==0)):0)){ae(a);e=0}l=g;return e|0}function $d(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=R(b,a)|0;if((a|0)!=0&(b|a)>>>0>65535?((e>>>0)/(a>>>0)|0|0)!=(b|0):0)a=-22;else{c[d>>2]=e;a=0}return a|0}function ae(a){a=a|0;wf(a);return}function be(a){a=a|0;ae(c[a>>2]|0);c[a>>2]=0;return}function ce(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)!=0?(2147483647/(c>>>0)|0)>>>0>b>>>0:0)a=Zd(a,R(c,b)|0)|0;else a=0;return a|0}function de(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=_d(c[a>>2]|0,b,d)|0;c[a>>2]=e;return ((d|0)!=0&((b|0)!=0&(e|0)==0)?-12:0)|0}function ee(a){a=a|0;var b=0;b=Yd(a)|0;if(b|0)Kf(b|0,0,a|0)|0;return b|0}function fe(a,b,c){a=a|0;b=b|0;c=c|0;ge(a,b,c);return}function ge(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;if((c[b>>2]|0)>>>0<=d>>>0){e=((d*17|0)>>>4)+32|0;d=e>>>0>d>>>0?e:d;ae(c[a>>2]|0);e=Yd(d)|0;c[a>>2]=e;c[b>>2]=(e|0)==0?0:d}return}function he(a,b){a=a|0;b=b|0;if((b|0)!=0?(2147483647/(b>>>0)|0)>>>0>a>>>0:0)a=Yd(R(b,a)|0)|0;else a=0;return a|0}function ie(a,b){a=a|0;b=b|0;if((b|0)!=0?(2147483647/(b>>>0)|0)>>>0>a>>>0:0)a=ee(R(b,a)|0)|0;else a=0;return a|0}function je(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;j=l;l=l+16|0;h=j;g=ee(24)|0;c[h>>2]=g;i=g;do if(g){c[g>>2]=a;c[g+4>>2]=b;c[g+12>>2]=d|0?d:7;c[g+16>>2]=e;c[g+8>>2]=1;if(f&1|0){g=g+20|0;c[g>>2]=c[g>>2]|1}d=ee(12)|0;if(!d){be(h);d=0;break}else{c[d>>2]=i;c[d+4>>2]=a;c[d+8>>2]=b;break}}else d=0;while(0);l=j;return d|0}function ke(a,b){a=a|0;b=b|0;ae(b);return}function le(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;d=e;b=Yd(a)|0;c[d>>2]=b;if(b){a=je(b,a,7,0,0)|0;if(!a){be(d);a=0}}else a=0;l=e;return a|0}function me(a){a=a|0;var b=0;b=le(a)|0;if(!b)b=0;else Kf(c[b+4>>2]|0,0,a|0)|0;return b|0}function ne(a){a=a|0;var b=0;b=ee(12)|0;if(!b)b=0;else{c[b>>2]=c[a>>2];c[b+4>>2]=c[a+4>>2];c[b+8>>2]=c[a+8>>2];oe((c[a>>2]|0)+8|0,1)|0}return b|0}function oe(a,b){a=a|0;b=b|0;var d=0;d=c[a>>2]|0;c[a>>2]=d+b;return d+b|0}function pe(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;d=f;if((a|0?(e=c[a>>2]|0,e|0):0)?(b=c[e>>2]|0,c[d>>2]=b,be(a),b,(oe(b+8|0,-1)|0)==0):0){ta[c[b+12>>2]&7](c[b+16>>2]|0,c[b>>2]|0);be(d)}l=f;return}function qe(a,b,d){a=a|0;b=b|0;d=d|0;a=a+360|0;c[a>>2]=b;c[a+4>>2]=d;return}function re(a,b,d){a=a|0;b=b|0;d=d|0;a=a+376|0;c[a>>2]=b;c[a+4>>2]=d;return}function se(a,b,d){a=a|0;b=b|0;d=d|0;a=a+368|0;c[a>>2]=b;c[a+4>>2]=d;return}function te(a,b){a=a|0;b=b|0;c[a+392>>2]=b;return}function ue(){var a=0;a=ee(400)|0;if(!a)a=0;else ve(a);return a|0}function ve(a){a=a|0;var b=0;Kf(a|0,0,400)|0;b=a+136|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+144|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+128|0;c[b>>2]=0;c[b+4>>2]=-2147483648;qe(a,0,-2147483648);re(a,0,0);se(a,-1,-1);te(a,-1);c[a+80>>2]=1;c[a+120>>2]=0;c[a+124>>2]=1;c[a+76>>2]=-1;c[a+344>>2]=2;c[a+348>>2]=2;c[a+352>>2]=2;c[a+340>>2]=0;c[a+356>>2]=0;return}function we(a){a=a|0;var b=0;if(a|0?(b=c[a>>2]|0,b|0):0){xe(b);be(a)}return}function xe(a){a=a|0;var b=0;b=0;do{pe(a+304+(b<<2)|0);b=b+1|0}while((b|0)!=8);ve(a);return}function ye(a,b){a=a|0;b=b|0;Pf(a|0,b|0,400)|0;Kf(b|0,0,400)|0;ve(b);return}function ze(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;c[a+76>>2]=c[b+76>>2];c[a+64>>2]=c[b+64>>2];c[a+68>>2]=c[b+68>>2];c[a+388>>2]=c[b+388>>2];h=b+296|0;g=c[h+4>>2]|0;d=a+296|0;c[d>>2]=c[h>>2];c[d+4>>2]=g;c[a+72>>2]=c[b+72>>2];d=c[b+304>>2]|0;if(!d)oa();else{f=0;e=d}while(1){if(e|0?(h=ne(e)|0,c[a+304+(f<<2)>>2]=h,(h|0)==0):0){e=5;break}d=f+1|0;if(d>>>0>=8){e=8;break}f=d;e=c[b+304+(d<<2)>>2]|0}if((e|0)==5){xe(a);d=-12}else if((e|0)==8){c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];c[a+16>>2]=c[b+16>>2];c[a+20>>2]=c[b+20>>2];c[a+24>>2]=c[b+24>>2];c[a+28>>2]=c[b+28>>2];d=a+32|0;h=b+32|0;c[d>>2]=c[h>>2];c[d+4>>2]=c[h+4>>2];c[d+8>>2]=c[h+8>>2];c[d+12>>2]=c[h+12>>2];c[d+16>>2]=c[h+16>>2];c[d+20>>2]=c[h+20>>2];c[d+24>>2]=c[h+24>>2];c[d+28>>2]=c[h+28>>2];d=0}return d|0}function Ae(a){a=a|0;var b=0,d=0;b=0;while(1){if((c[180+(b*24|0)>>2]|0)==(a|0)){d=3;break}b=b+1|0;if(b>>>0>=4){b=0;break}}if((d|0)==3)b=180+(b*24|0)+4|0;return b|0}function Be(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=(c[b+24>>2]|0)==0?1:3;do if((f|0)<=(e|0))if((f|0)==(e|0)&(a[b+29>>0]|0)!=0){f=c[b+12>>2]|0;c[d>>2]=c[f+32>>2];f=c[f>>2]|0;break}else{c[d>>2]=0;f=0;break}else{f=c[b+8>>2]|0;c[d>>2]=c[f+32+(e<<2)>>2];f=c[f+(e<<2)>>2]|0}while(0);return f|0}function Ce(d,e){d=d|0;e=e|0;var f=0;if(!(c[d+8>>2]|0))d=-1;else{c[e>>2]=c[d+16>>2];c[e+4>>2]=c[d+20>>2];a[e+8>>0]=c[d+24>>2];f=a[d+31>>0]|0;a[e+9>>0]=(a[d+29>>0]|0)!=0&f<<24>>24==0&1;a[e+12>>0]=a[d+33>>0]|0;a[e+13>>0]=f;a[e+14>>0]=a[d+32>>0]|0;a[e+10>>0]=c[d+36>>2];a[e+11>>0]=a[d+30>>0]|0;a[e+15>>0]=a[d+34>>0]|0;b[e+16>>1]=b[d+48>>1]|0;d=0}return d|0}function De(b,d){b=b|0;d=d|0;var e=0,f=0;if((c[b+8>>2]|0)!=0?(f=b+68|0,(a[f>>0]|0)==0):0){e=Ee(b,d)|0;if(!e){a[f>>0]=1;c[b+72>>2]=d;c[b+92>>2]=Be(b,b+108|0,0)|0;if(!(c[b+24>>2]|0))e=1;else{c[b+96>>2]=Be(b,b+112|0,1)|0;c[b+100>>2]=Be(b,b+116|0,2)|0;e=3}if(!(a[b+29>>0]|0))e=0;else e=Be(b,b+120|0,e)|0;c[b+104>>2]=e;c[b+80>>2]=0;e=0}}else e=-1;return e|0}function Ee(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;if(e>>>0>1)e=-1;else{a[b+76>>0]=(e|0)==1&1;g=b+77|0;a[g>>0]=0;a[b+78>>0]=0;h=b+24|0;if(((c[h>>2]|0)+-1|0)>>>0<2?(e=b+16|0,i=c[e>>2]|0,f=b+84|0,c[f>>2]=(i+1|0)/2|0,c[b+88>>2]=((c[b+20>>2]|0)+1|0)/2|0,c[b+124>>2]=Yd(i)|0,c[b+128>>2]=Yd(c[e>>2]|0)|0,c[b+196>>2]=Yd((c[f>>2]<<1)+14|0)|0,(c[h>>2]|0)==1):0){e=0;do{c[b+132+(e<<2)>>2]=Yd(c[f>>2]|0)|0;c[b+164+(e<<2)>>2]=Yd(c[f>>2]|0)|0;e=e+1|0}while((e|0)!=8)}e=b+36|0;Fe(b+200|0,d[b+30>>0]|0,a[g>>0]|0?16:8,c[e>>2]|0,d[b+32>>0]|0);if(!(c[h>>2]|0))e=4;else e=c[276+(c[e>>2]<<2)>>2]|0;c[b+248>>2]=e;e=0}return e|0}function Fe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0;n=30-d|0;g=+((1<>2]=Df(i*(q*2.0))|0;o=1.0-g;p=o-h;c[a+24>>2]=Df(i*(g*2.0*o/p))|0;c[a+28>>2]=Df(i*(h*2.0*q/p))|0;c[a+32>>2]=Df(i*(o*2.0))|0}d=Df(j)|0;c[a+8>>2]=d;c[a>>2]=n;e=1<>2]=e;c[a+36>>2]=1<>2]=d;c[a+16>>2]=e;c[a+40>>2]=b;c[a+44>>2]=f;return}function Ge(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0;if((c[b+40>>2]|0)==8?(c[b+44>>2]|0)==0:0){if((i|0)>0){g=0;h=e;while(1){o=a[f+g>>0]|0;a[h>>0]=o;a[h+1>>0]=o;a[h+2>>0]=o;g=g+1|0;if((g|0)==(i|0))break;else h=h+j|0}}}else k=5;if((k|0)==5?(l=c[b+12>>2]|0,m=c[b+16>>2]|0,n=c[b>>2]|0,(i|0)>0):0){g=0;while(1){o=(He((R(d[f+g>>0]|0,l)|0)+m>>n)|0)&255;a[e>>0]=o;a[e+1>>0]=o;a[e+2>>0]=o;g=g+1|0;if((g|0)==(i|0))break;else e=e+j|0}}return}function He(a){a=a|0;return ((a|0)<0?0:(a|0)<255?a:255)|0}function Ie(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;s=c[b+20>>2]|0;m=c[b+24>>2]|0;n=c[b+28>>2]|0;o=c[b+32>>2]|0;p=c[b+12>>2]|0;q=c[b+16>>2]|0;r=c[b>>2]|0;l=c[b+36>>2]|0;if((i|0)>0){k=0;b=e;while(1){t=R(d[f+k>>0]|0,p)|0;e=(d[g+k>>0]|0)-l|0;u=(d[h+k>>0]|0)-l|0;t=t+q|0;a[b>>0]=He(t+(R(u,s)|0)>>r)|0;a[b+1>>0]=He(t-((R(u,n)|0)+(R(e,m)|0))>>r)|0;a[b+2>>0]=He(t+(R(e,o)|0)>>r)|0;k=k+1|0;if((k|0)==(i|0))break;else b=b+j|0}}return}function Je(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0;if((c[b+40>>2]|0)==8?(c[b+44>>2]|0)==0:0){if((i|0)>0){k=0;l=e;while(1){a[l>>0]=a[h+k>>0]|0;a[l+1>>0]=a[f+k>>0]|0;a[l+2>>0]=a[g+k>>0]|0;k=k+1|0;if((k|0)==(i|0))break;else l=l+j|0}}}else m=5;if((m|0)==5?(n=c[b+12>>2]|0,o=c[b+16>>2]|0,p=c[b>>2]|0,(i|0)>0):0){k=0;while(1){a[e>>0]=He((R(d[h+k>>0]|0,n)|0)+o>>p)|0;a[e+1>>0]=He((R(d[f+k>>0]|0,n)|0)+o>>p)|0;a[e+2>>0]=He((R(d[g+k>>0]|0,n)|0)+o>>p)|0;k=k+1|0;if((k|0)==(i|0))break;else e=e+j|0}}return}function Ke(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;o=c[b+12>>2]|0;m=c[b+16>>2]|0;n=c[b>>2]|0;l=c[b+36>>2]|0;if((i|0)>0){k=0;b=e;while(1){q=d[f+k>>0]|0;r=(d[g+k>>0]|0)-l|0;e=(d[h+k>>0]|0)-l|0;p=q-r|0;a[b>>0]=He((R(p+e|0,o)|0)+m>>n)|0;a[b+1>>0]=He((R(r+q|0,o)|0)+m>>n)|0;a[b+2>>0]=He((R(p-e|0,o)|0)+m>>n)|0;k=k+1|0;if((k|0)==(i|0))break;else b=b+j|0}}return}function Le(a,b,d){a=a|0;b=b|0;d=d|0;c[b>>2]=0;c[d>>2]=1;return}function Me(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;p=b+80|0;r=c[p>>2]|0;a:do if(r>>>0<(c[b+20>>2]|0)>>>0){s=c[b+16>>2]|0;n=(c[b+92>>2]|0)+(R(c[b+108>>2]|0,r)|0)|0;o=b+76|0;if(!(a[o>>0]|0))q=a[b+78>>0]|0?4:3;else q=4;switch(c[b+24>>2]|0){case 0:{Da[c[b+248>>2]&7](b+200|0,e,n,0,0,s,q);break}case 1:{if(!r){h=b+96|0;i=b+112|0;j=b+100|0;k=b+116|0;l=b+84|0;m=b+88|0;g=0;do{f=(g|0)>4?g+-8|0:g;if((f|0)<0)f=0;else{t=c[m>>2]|0;f=(f|0)<(t|0)?f:t+-1|0}u=(c[h>>2]|0)+(R(c[i>>2]|0,f)|0)|0;t=(c[j>>2]|0)+(R(c[k>>2]|0,f)|0)|0;Pf(c[b+132+(g<<2)>>2]|0,u|0,c[l>>2]|0)|0;Pf(c[b+164+(g<<2)>>2]|0,t|0,c[l>>2]|0)|0;g=g+1|0}while((g|0)!=8)}f=r>>1;g=(f|0)%8|0;u=r&1;h=b+124|0;l=b+196|0;m=b+30|0;t=b+28|0;Ne(c[h>>2]|0,b+132|0,s,g,c[l>>2]|0,d[m>>0]|0,u,d[t>>0]|0);i=b+128|0;Ne(c[i>>2]|0,b+164|0,s,g,c[l>>2]|0,d[m>>0]|0,u,d[t>>0]|0);if(u|0){m=(g+5|0)%8|0;l=f+5|0;t=c[b+88>>2]|0;t=(l|0)<(t|0)?l:t+-1|0;l=(c[b+96>>2]|0)+(R(t,c[b+112>>2]|0)|0)|0;t=(c[b+100>>2]|0)+(R(c[b+116>>2]|0,t)|0)|0;u=b+84|0;Pf(c[b+132+(m<<2)>>2]|0,l|0,c[u>>2]|0)|0;Pf(c[b+164+(m<<2)>>2]|0,t|0,c[u>>2]|0)|0}Da[c[b+248>>2]&7](b+200|0,e,n,c[h>>2]|0,c[i>>2]|0,s,q);break}case 2:{u=(c[b+96>>2]|0)+(R(c[b+112>>2]|0,r)|0)|0;j=(c[b+100>>2]|0)+(R(c[b+116>>2]|0,r)|0)|0;t=b+124|0;k=b+30|0;l=b+28|0;m=b+196|0;Oe(c[t>>2]|0,u,s,d[k>>0]|0,d[l>>0]|0,c[m>>2]|0);u=b+128|0;Oe(c[u>>2]|0,j,s,d[k>>0]|0,d[l>>0]|0,c[m>>2]|0);Da[c[b+248>>2]&7](b+200|0,e,n,c[t>>2]|0,c[u>>2]|0,s,q);break}case 3:{t=(c[b+96>>2]|0)+(R(c[b+112>>2]|0,r)|0)|0;u=(c[b+100>>2]|0)+(R(c[b+116>>2]|0,r)|0)|0;Da[c[b+248>>2]&7](b+200|0,e,n,t,u,s,q);break}default:{f=-1;break a}}do if(!(a[b+31>>0]|0)){if(a[o>>0]|0){if(!(a[b+29>>0]|0)){Qe(e+3|0,s);break}Re(b+200|0,e+3|0,(c[b+104>>2]|0)+(R(c[b+120>>2]|0,r)|0)|0,s);if(a[b+33>>0]|0)Se(e,s)}}else{Pe(b+200|0,e,(c[b+104>>2]|0)+(R(c[b+120>>2]|0,r)|0)|0,s,q);if(a[o>>0]|0)Qe(e+3|0,s)}while(0);c[p>>2]=(c[p>>2]|0)+1;f=0}else f=-1;while(0);return f|0}function Ne(a,e,f,g,h,i,j,k){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;n=c[e+((g+5&7)<<2)>>2]|0;o=c[e+((g+6&7)<<2)>>2]|0;p=c[e+((g+7&7)<<2)>>2]|0;q=c[e+((g&7)<<2)>>2]|0;r=c[e+((g+1&7)<<2)>>2]|0;s=c[e+((g+2&7)<<2)>>2]|0;g=c[e+((g+3&7)<<2)>>2]|0;l=i+-8|0;m=1<>1;t=(f+1|0)/2|0;e=(f|0)>0;if(!j){if(e){e=0;do{u=R(d[o+e>>0]|0,-6)|0;j=R(d[r+e>>0]|0,-10)|0;b[h+(e+3<<1)>>1]=((d[n+e>>0]|0)<<1)+m+u+((d[p+e>>0]|0)*18|0)+((d[q+e>>0]|0)*57|0)+j+((d[s+e>>0]|0)<<2)-(d[g+e>>0]|0)>>l;e=e+1|0}while((e|0)<(t|0))}}else if(e){e=0;do{j=R(d[p+e>>0]|0,-10)|0;u=R(d[s+e>>0]|0,-6)|0;b[h+(e+3<<1)>>1]=m-(d[n+e>>0]|0)+((d[o+e>>0]|0)<<2)+j+((d[q+e>>0]|0)*57|0)+((d[r+e>>0]|0)*18|0)+u+((d[g+e>>0]|0)<<1)>>l;e=e+1|0}while((e|0)<(t|0))}m=h+6|0;g=b[m>>1]|0;e=0;do{b[h+(e<<1)>>1]=g;e=e+1|0}while((e|0)!=3);l=t+3|0;g=b[h+(t+2<<1)>>1]|0;e=0;do{b[h+(l+e<<1)>>1]=g;e=e+1|0}while((e|0)!=4);if(!k)Ye(a,m,f,i);else Ze(a,m,f,i);return}function Oe(b,c,d,e,f,g){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0;i=(d+1|0)/2|0;h=g+3|0;Pf(h|0,c|0,i|0)|0;Kf(g|0,a[c>>0]|0,3)|0;Kf(g+(i+3)|0,a[c+(i+-1)>>0]|0,4)|0;if(!f)Ve(b,h,d,e);else We(b,h,d,e);return}function Pe(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0;j=c[b+40>>2]|0;k=1<0){i=0;b=e;while(1){l=d[f+i>>0]|0;a[b>>0]=(R(d[b>>0]|0,l)|0)+k>>j;e=b+1|0;a[e>>0]=(R(d[e>>0]|0,l)|0)+k>>j;e=b+2|0;a[e>>0]=(R(d[e>>0]|0,l)|0)+k>>j;i=i+1|0;if((i|0)==(g|0))break;else b=b+h|0}}return}function Qe(b,c){b=b|0;c=c|0;var d=0;if((c|0)>0){d=0;while(1){a[b>>0]=-1;d=d+1|0;if((d|0)==(c|0))break;else b=b+4|0}}return}function Re(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;if((c[b+40>>2]|0)==8){if((g|0)>0){b=0;while(1){a[e>>0]=a[f+b>>0]|0;b=b+1|0;if((b|0)==(g|0))break;else e=e+4|0}}}else{i=c[b+8>>2]|0;j=c[b+4>>2]|0;h=c[b>>2]|0;if((g|0)>0){b=0;while(1){a[e>>0]=(R(d[f+b>>0]|0,i)|0)+j>>h;b=b+1|0;if((b|0)==(g|0))break;else e=e+4|0}}}return}function Se(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if(!(c[651]|0)){c[651]=1;Te()}if((e|0)>0){h=0;while(1){g=a[b+3>>0]|0;f=g&255;if(!(g<<24>>24)){a[b>>0]=-1;a[b+1>>0]=-1;g=b+2|0;f=-1}else{i=c[2608+(f<<2)>>2]|0;a[b>>0]=Ue(d[b>>0]|0,f,i)|0;j=b+1|0;a[j>>0]=Ue(d[j>>0]|0,f,i)|0;j=b+2|0;g=j;f=(Ue(d[j>>0]|0,f,i)|0)&255}a[g>>0]=f;h=h+1|0;if((h|0)==(e|0))break;else b=b+4|0}}return}function Te(){var a=0;a=1;do{c[2608+(a<<2)>>2]=(((a|0)/2|0)+16711808|0)/(a|0)|0;a=a+1|0}while((a|0)!=256);return}function Ue(a,b,c){a=a|0;b=b|0;c=c|0;c=((R(c,a)|0)+32768|0)>>>16;return (a>>>0>>0?c:255)|0}function Ve(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;i=(1<1){l=e+-2|0;k=l>>>1;j=k+1|0;k=k<<1;h=k+2|0;g=c;f=b;while(1){a[f>>0]=a[g>>0]|0;n=R((d[g+2>>0]|0)+(d[g+-1>>0]|0)|0,-11)|0;m=g;g=g+1|0;a[f+1>>0]=Xe(32-(d[m+-3>>0]|0)-(d[m+4>>0]|0)+((d[m+3>>0]|0)+(d[m+-2>>0]|0)<<2)+n+(((d[g>>0]|0)+(d[m>>0]|0)|0)*40|0)>>6,i)|0;e=e+-2|0;if((e|0)<=1)break;else f=f+2|0}b=b+h|0;f=c+j|0;e=l-k|0}else f=c;if(e|0)a[b>>0]=a[f>>0]|0;return}function We(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=(1<>0]|0;g=d[c+-2>>0]|0;j=d[c+-1>>0]|0;h=d[c>>0]|0;f=d[c+1>>0]|0;i=d[c+2>>0]|0;if((e|0)>1){q=e+-2|0;p=q>>>1;r=p<<1;o=r+2|0;p=p+1|0;n=h;l=b;m=c;while(1){h=d[m+3>>0]|0;t=n*57|0;a[l>>0]=Xe((k<<1)+32+(R(g,-6)|0)+(j*18|0)+t+(R(f,-10)|0)+(i<<2)-h>>6,s)|0;a[l+1>>0]=Xe(32-k+(g<<2)+(R(j,-10)|0)+t+(f*18|0)+(R(i,-6)|0)+(h<<1)>>6,s)|0;e=e+-2|0;if((e|0)<=1)break;else{t=i;l=l+2|0;m=m+1|0;i=h;k=g;g=j;j=n;n=f;f=t}}m=h;h=f;l=n;b=b+o|0;c=c+p|0;f=q-r|0}else{m=i;i=f;l=j;j=g;g=k;f=e}if(f|0)a[b>>0]=Xe((g<<1)+32+(R(j,-6)|0)+(l*18|0)+(h*57|0)+(R(i,-10)|0)+(m<<2)-(d[c+3>>0]|0)>>6,s)|0;return}function Xe(a,b){a=a|0;b=b|0;return ((a|0)<0?0:(a|0)>(b|0)?b:a)|0}function Ye(c,d,e,f){c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;n=(1<>1;j=20-f|0;h=1<1){l=e+-2|0;m=l>>>1;k=m+1|0;m=m<<1;i=m+2|0;g=d;f=c;while(1){a[f>>0]=Xe((b[g>>1]|0)+p>>o,n)|0;r=R((b[g+4>>1]|0)+(b[g+-2>>1]|0)|0,-11)|0;q=g;g=g+2|0;a[f+1>>0]=Xe(h-(b[q+-6>>1]|0)-(b[q+8>>1]|0)+((b[q+6>>1]|0)+(b[q+-4>>1]|0)<<2)+r+(((b[g>>1]|0)+(b[q>>1]|0)|0)*40|0)>>j,n)|0;e=e+-2|0;if((e|0)<=1)break;else f=f+2|0}c=c+i|0;f=d+(k<<1)|0;e=l-m|0}else f=d;if(e|0)a[c>>0]=Xe((b[f>>1]|0)+p>>o,n)|0;return}function Ze(c,d,e,f){c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=(1<>1]|0;g=b[d+-4>>1]|0;j=b[d+-2>>1]|0;h=b[d>>1]|0;f=b[d+2>>1]|0;i=b[d+4>>1]|0;if((e|0)>1){q=e+-2|0;p=q>>>1;r=p<<1;o=r+2|0;p=p+1|0;n=h;l=c;m=d;while(1){h=b[m+6>>1]|0;v=n*57|0;a[l>>0]=Xe((k<<1)+t+(R(g,-6)|0)+(j*18|0)+v+(R(f,-10)|0)+(i<<2)-h>>s,u)|0;a[l+1>>0]=Xe(t-k+(g<<2)+(R(j,-10)|0)+v+(f*18|0)+(R(i,-6)|0)+(h<<1)>>s,u)|0;e=e+-2|0;if((e|0)<=1)break;else{v=i;l=l+2|0;m=m+2|0;i=h;k=g;g=j;j=n;n=f;f=v}}m=h;h=f;l=n;c=c+o|0;d=d+(p<<1)|0;f=q-r|0}else{m=i;i=f;l=j;j=g;g=k;f=e}if(f|0)a[c>>0]=Xe((g<<1)+t+(R(j,-6)|0)+(l*18|0)+(h*57|0)+(R(i,-10)|0)+(m<<2)-(b[d+6>>1]|0)>>s,u)|0;return}function _e(){return ee(252)|0}function $e(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+48|0;v=y;h=af(v,f,g,d[e+40>>0]|0)|0;do if((h|0)>=0){x=c[v>>2]|0;q=c[v+4>>2]|0;m=a[v+12>>0]|0;r=m&255;n=c[v+24>>2]|0;o=a[v+13>>0]|0;s=o&255;t=e+16|0;c[t>>2]=x;u=e+20|0;c[u>>2]=q;i=c[v+8>>2]|0;j=e+24|0;c[j>>2]=i;switch(i|0){case 5:{i=2;p=4;break}case 4:{i=1;p=4;break}default:{k=1;j=i}}if((p|0)==4){c[j>>2]=i;k=0;j=i}a[e+28>>0]=k;a[e+29>>0]=m;a[e+33>>0]=a[v+15>>0]|0;a[e+31>>0]=a[v+14>>0]|0;a[e+32>>0]=a[v+16>>0]|0;c[e+36>>2]=n;a[e+30>>0]=o;a[e+34>>0]=a[v+17>>0]|0;b[e+48>>1]=b[v+18>>1]|0;b[e+50>>1]=b[v+20>>1]|0;b[e+52>>1]=b[v+22>>1]|0;i=e+44|0;c[i>>2]=c[v+32>>2];if(((((c[v+28>>2]|0)+h|0)>>>0<=g>>>0?(bf(e,f+h|0,g-h|0,x,q,j,s,r)|0)>=0:0)?(cf(e),w=c[e+8>>2]|0,(c[w+64>>2]|0)>=(c[t>>2]|0)):0)?(c[w+68>>2]|0)>=(c[u>>2]|0):0){c[e+80>>2]=-1;h=0;break}we(e+8|0);we(e+12|0);c[i>>2]=0;h=-1}while(0);l=y;return h|0}function af(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=l;l=l+32|0;x=J+20|0;A=J+16|0;C=J+8|0;D=J+12|0;E=J+4|0;F=J;a:do if(((((((f|0)>=6?(a[e>>0]|0)==66:0)?(a[e+1>>0]|0)==80:0)?(a[e+2>>0]|0)==71:0)?(a[e+3>>0]|0)==-5:0)?(H=a[e+4>>0]|0,h=H&255,n=h>>>5,c[d+8>>2]=n,(H&255)<=191):0)?(H=(h&15)+8|0,a[d+13>>0]=H,H>>>0<=14):0){o=a[e+5>>0]|0;z=o&255;p=z>>>4;c[d+24>>2]=p;w=z&8;i=z>>>2&1;a[d+16>>0]=z>>>1&1;G=d+17|0;a[G>>0]=z&1;z=d+18|0;b[z>>1]=0;H=d+20|0;b[H>>1]=0;B=d+22|0;b[B>>1]=0;j=d+12|0;a[j>>0]=0;k=d+14|0;a[k>>0]=0;m=d+15|0;a[m>>0]=0;if(!(h&16))if(!i)h=0;else{a[j>>0]=1;a[k>>0]=1;h=1}else{a[j>>0]=1;a[m>>0]=i;h=0}if(((((((o&255)<=79?(p|0)==0&h<<24>>24==0|(n|0)!=0:0)?(q=mf(d,e+6|0,f+-6|0)|0,(q|0)>=0):0)?(r=q+6|0,s=d+4|0,t=mf(s,e+r|0,f-r|0)|0,(t|0)>=0):0)?(u=t+r|0,(c[d>>2]|0)!=0):0)?(c[s>>2]|0)!=0:0)?(I=d+28|0,v=mf(I,e+u|0,f-u|0)|0,(v|0)>=0):0){h=v+u|0;c[x>>2]=0;b:do if(!w){c[d+32>>2]=0;y=43}else{i=mf(x,e+h|0,f-h|0)|0;if((i|0)<0){h=-1;break a}h=i+h|0;i=d+32|0;c[i>>2]=0;r=(c[x>>2]|0)+h|0;if((r|0)>(f|0)){h=-1;break a}q=(g|0)!=0;if(!q?(a[G>>0]|0)==0:0){h=r;break}if((r|0)<=(h|0)){y=43;break}while(1){j=nf(A,e+h|0,r-h|0)|0;if((j|0)<0){h=-1;break a}h=j+h|0;j=mf(C,e+h|0,r-h|0)|0;if((j|0)<0){h=-1;break a}n=j+h|0;o=c[C>>2]|0;h=o+n|0;if(h>>>0>r>>>0){h=-1;break a}p=c[A>>2]|0;if((a[G>>0]|0)!=0&(p|0)==5){j=mf(D,e+n|0,r-n|0)|0;if((j|0)<0)break;j=j+n|0;k=mf(E,e+j|0,r-j|0)|0;if((k|0)<0)break;y=k+j|0;if((mf(F,e+y|0,r-y|0)|0)<0)break;j=c[E>>2]|0;k=c[F>>2]|0;if((j|0)==0|(k|0)==0)break;if((j&65535|0)!=(j|0))break;if((k&65535|0)!=(k|0))break;m=c[D>>2]|0;if((m&65535|0)!=(m|0))break;b[z>>1]=m;b[H>>1]=j;b[B>>1]=k}if(q){x=Yd(16)|0;c[x>>2]=p;g=x+4|0;c[g>>2]=o;y=x+12|0;c[y>>2]=0;c[i>>2]=x;i=Yd(o)|0;c[x+8>>2]=i;Pf(i|0,e+n|0,c[g>>2]|0)|0;i=y}if((r|0)<=(h|0)){y=43;break b}}h=-1;break a}while(0);if((y|0)==43)if((a[G>>0]|0)!=0?(b[H>>1]|0)==0:0){h=-1;break}if(!(c[I>>2]|0))c[I>>2]=f-h}else h=-1}else h=-1;while(0);l=J;return h|0}function bf(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;k=o+12|0;m=o;df(k);df(m);if(i){i=ef(k,a+12|0,a+4|0,b,d,e,f,0,h)|0;if((i|0)<0)i=-1;else{j=b+i|0;b=d-i|0;n=4}}else{j=b;b=d;n=4}if((n|0)==4){i=ef(m,a+8|0,a,j,b,e,f,g,h)|0;if((i|0)<0)i=-1;else{n=b-i|0;i=ff(a,k,m,j+i|0,n)|0;ae(c[k>>2]|0);ae(c[m>>2]|0);i=(i|0)<0?-1:d-n+i|0}}l=o;return i|0}function cf(a){a=a|0;var b=0,d=0;b=a+4|0;d=c[b>>2]|0;if(d|0){wd(d)|0;ae(c[b>>2]|0);c[b>>2]=0}b=c[a>>2]|0;if(b|0){wd(b)|0;ae(c[a>>2]|0);c[a>>2]=0}return}function df(a){a=a|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;return}function ef(a,b,d,e,f,g,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+16|0;p=q+8|0;k=q+4|0;m=q;e=kf(k,m,e,f,g,h,i,j)|0;do if((((e|0)>=0?(k=c[k>>2]|0,m=lf(a,k,c[m>>2]|0)|0,ae(k),(m|0)>=0):0)?(n=Bd(64)|0,(n|0)!=0):0)?(m=ue()|0,c[p>>2]=m,o=m,(m|0)!=0):0){m=n+688|0;c[m>>2]=c[m>>2]|1;if((vd(n,64,0)|0)<0){we(p);e=-1;break}else{c[d>>2]=n;c[b>>2]=o;break}}else e=-1;while(0);l=q;return e|0}function ff(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+16|0;u=y;x=b+4|0;i=c[x>>2]|0;v=(i|0)!=0;c[u>>2]=0;c[u+4>>2]=0;a:do if((h|0)>0){s=u+((v&1)<<2)|0;m=1;i=h;while(1){if((i|0)<((m?5:2)|0)){i=-1;break a}if(m)k=0;else k=(a[g+2>>0]|0)==0?4:3;if((i|0)<(k+3|0)){i=-1;break a}q=g+k|0;r=d[q>>0]|0;n=r<<5&32|(d[g+(k+1)>>0]|0)>>>3;r=r>>>1;j=r&63;if(j>>>0>40|((r&60|0)==32|(j|0)==39)){if(c[u>>2]|0?c[s>>2]|0:0)break}else if((j>>>0<10|(j+-16|0)>>>0<6?(t=k+2|0,(t|0)<(i|0)):0)?(a[g+t>>0]|0)<0:0){if(c[u>>2]|0?c[s>>2]|0:0)break;c[u+((v&(n|0)==1&1)<<2)>>2]=1}r=gf(g,i,(m^1)&1)|0;if((r|0)<0){i=-1;break a}o=r-k|0;p=o+3|0;m=v&(n|0)==1;j=m?e:f;k=j+8|0;if((hf(j,(c[k>>2]|0)+p|0)|0)<0){i=-1;break a}j=(c[j>>2]|0)+(c[k>>2]|0)|0;a[j>>0]=0;a[j+1>>0]=0;a[j+2>>0]=1;Pf(j+3|0,q|0,o|0)|0;if(m){q=j+4|0;a[q>>0]=a[q>>0]&7}c[k>>2]=(c[k>>2]|0)+p;i=i-r|0;if((i|0)>0){m=0;g=g+r|0}else break}g=i;i=c[x>>2]|0;w=22}else{g=h;w=22}while(0);do if((w|0)==22){if(i|0){i=e+8|0;if((hf(e,(c[i>>2]|0)+32|0)|0)<0){i=-1;break}if((jf(c[x>>2]|0,c[b+12>>2]|0,c[e>>2]|0,c[i>>2]|0)|0)<0){i=-1;break}}i=f+8|0;if((hf(f,(c[i>>2]|0)+32|0)|0)<0)i=-1;else{i=(jf(c[b>>2]|0,c[b+8>>2]|0,c[f>>2]|0,c[i>>2]|0)|0)<0;i=i?-1:h-g|0}}while(0);l=y;return i|0}function gf(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;do if(d){if((c|0)>3){if(a[b>>0]|0){d=-1;break}if(((a[b+1>>0]|0)==0?(a[b+2>>0]|0)==0:0)?(a[b+3>>0]|0)==1:0){d=4;e=11;break}}else{if((c|0)!=3){d=-1;break}if(a[b>>0]|0){d=-1;break}}if((a[b+1>>0]|0)==0?(a[b+2>>0]|0)==1:0){d=3;e=11}else d=-1}else{d=0;e=11}while(0);a:do if((e|0)==11){e=d+2|0;if((e|0)<=(c|0))if((e|0)<(c|0)){h=d;while(1){d=h;h=h+1|0;if(!(a[b+d>>0]|0)){f=(a[b+h>>0]|0)==0;if(f?(a[b+e>>0]|0)==1:0)break a;g=d+3|0;if((!((g|0)>=(c|0)|f^1)?(a[b+e>>0]|0)==0:0)?(a[b+g>>0]|0)==1:0)break a;else d=g}else d=d+3|0;if((d|0)>=(c|0)){d=c;break}else e=d}}else d=c;else d=-1}while(0);return d|0}function hf(a,b){a=a|0;b=b|0;var d=0,e=0;e=a+4|0;d=c[e>>2]|0;if((d|0)<(b|0)){d=(d*3|0)/2|0;b=(d|0)<(b|0)?b:d;d=Zd(c[a>>2]|0,b)|0;if(!d)b=-1;else{c[a>>2]=d;c[e>>2]=b;b=0}}else b=0;return b|0}function jf(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;i=l;l=l+96|0;g=i;h=i+80|0;Ld(g);c[g+24>>2]=e;c[g+28>>2]=f;e=e+f|0;f=e+32|0;do{a[e>>0]=0;e=e+1|0}while((e|0)<(f|0));g=Cd(b,d,h,g)|0;l=i;return ((g|0)<0|(c[h>>2]|0)==0)<<31>>31|0}function kf(b,d,e,f,g,h,i,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+16|0;k=q;c[b>>2]=0;p=mf(k,e,f)|0;if((p|0)>=0?(o=c[k>>2]|0,o>>>0<=(f-p|0)>>>0):0){m=o+10|0;n=Yd(m)|0;i=i&255;a[n>>0]=i;a[n+1>>0]=g>>>24;a[n+2>>0]=g>>>16;a[n+3>>0]=g>>>8;a[n+4>>0]=g;a[n+5>>0]=h>>>24;a[n+6>>0]=h>>>16;a[n+7>>0]=h>>>8;a[n+8>>0]=h;a[n+9>>0]=j+248;Pf(n+10|0,e+p|0,o|0)|0;g=Yd((m<<1)+6|0)|0;a[g>>0]=0;a[g+1>>0]=0;a[g+2>>0]=0;a[g+3>>0]=1;a[g+4>>0]=96;a[g+5>>0]=1;if((m|0)>0){e=0;f=6;while(1){k=e+1|0;if((k|0)<(m|0)&i<<24>>24==0?(a[n+k>>0]|0)==0:0){a[g+f>>0]=0;a[g+(f+1)>>0]=0;a[g+(f+2)>>0]=3;k=e+2|0;f=f+3|0}else{a[g+f>>0]=i;f=f+1|0}if((k|0)>=(m|0))break;e=k;i=a[n+k>>0]|0}if(!f){f=0;k=12}else k=11}else{f=6;k=11}if((k|0)==11)if(!(a[g+(f+-1)>>0]|0))k=12;if((k|0)==12){a[g+f>>0]=-128;f=f+1|0}ae(n);c[d>>2]=f;c[b>>2]=g;f=p+o|0}else f=-1;l=q;return f|0}function lf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=a+8|0;if((hf(a,(c[e>>2]|0)+d|0)|0)<0)a=-1;else{Pf((c[a>>2]|0)+(c[e>>2]|0)|0,b|0,d|0)|0;c[e>>2]=(c[e>>2]|0)+d;a=0}return a|0}function mf(a,b,d){a=a|0;b=b|0;d=d|0;b=nf(a,b,d)|0;if((b|0)>=0)b=(c[a>>2]|0)>>>0>1073741823?-1:b;return b|0}function nf(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0;a:do if((f|0)>=1){g=a[e>>0]|0;h=g&255;if(g<<24>>24>-1){c[b>>2]=h;f=1;break}if(g<<24>>24!=-128){g=h&127;h=e+1|0;while(1){if((f|0)<2){f=-1;break a}i=h;h=h+1|0;i=d[i>>0]|0;g=i&127|g<<7;if(!(i&128))break;else f=f+-1|0}c[b>>2]=g;f=h-e|0}else f=-1}else f=-1;while(0);return f|0}function of(a){a=a|0;pf(a);ae(c[a+56>>2]|0);cf(a);we(a+8|0);we(a+12|0);ae(a);return}function pf(a){a=a|0;var b=0;ae(c[a+124>>2]|0);ae(c[a+128>>2]|0);b=0;do{ae(c[a+132+(b<<2)>>2]|0);ae(c[a+164+(b<<2)>>2]|0);b=b+1|0}while((b|0)!=8);ae(c[a+196>>2]|0);return}function qf(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:do if((a+-1|0)>>>0>2147483582)b=0;else{b=c[909]|0;if(!b){b=If(64)|0;if((b|0)==(-1|0)){b=0;break}c[910]=If(0)|0;c[909]=3632;c[908]=3632;c[912]=3644;c[911]=3644;i=b+16|0;rf(i,170);sf(i,3644);sf(b+24|0,3632);b=c[909]|0}i=tf(a)|0;g=b+-8|0;a=uf(g)|0;b:do if(i>>>0>>0){e=g;d=g;a=g;j=10}else{h=c[908]|0;e=a;a=g;f=g;d=g;while(1){if((b|0)==(h|0))break;if((i|0)==(e|0)){j=13;break}b=c[b+4>>2]|0;g=b+-8|0;a=uf(g)|0;if(i>>>0>>0){e=g;d=g;a=g;j=10;break b}else{e=a;a=g;f=g;d=g}}if((j|0)==13){vf(b);break}if((If(i+32-e|0)|0)==(-1|0)){b=0;break a}c[910]=If(0)|0;b=h;e=f;j=10}while(0);if((j|0)==10){j=e+i|0;sf(j,d);sf(j+8|0,b);rf(j,170);vf(b)}rf(a,85)}while(0);return b|0}function rf(b,c){b=b|0;c=c|0;a[b+-1>>0]=c;return}function sf(a,b){a=a|0;b=b|0;var d=0,e=0;e=b+4|0;d=c[e>>2]|0;c[e>>2]=a;c[a>>2]=b;c[a+4>>2]=d;c[d>>2]=a;return}function tf(a){a=a|0;return a+40&-32|0}function uf(a){a=a|0;var b=0;b=c[a+4>>2]|0;return ((b|0)==3644?c[910]|0:b)-a|0}function vf(a){a=a|0;var b=0;b=c[a>>2]|0;a=c[a+4>>2]|0;c[b+4>>2]=a;c[a>>2]=b;return}function wf(a){a=a|0;var b=0,d=0;if(a|0){b=a+-8|0;sf(a,3632);rf(b,170);d=c[b>>2]|0;if((d|0)!=3644?(xf(d)|0)==170:0){vf(b);vf(a);b=d}a=c[b+4>>2]|0;if((a|0)!=3644?(xf(a)|0)==170:0){vf(a);b=b+8|0;vf(b);d=a+8|0;sf(b,d);vf(d)}}return}function xf(a){a=a|0;return d[a+-1>>0]|0|0}function yf(a,b){a=a|0;b=b|0;var d=0,e=0;do if(a){if(!b){wf(a);d=0;break}d=qf(b)|0;if(!d)d=0;else{e=(c[a+-4>>2]|0)-a+-1|0;Pf(d|0,a|0,(e>>>0>b>>>0?b:e)|0)|0;wf(a)}}else d=qf(b)|0;while(0);return d|0}function zf(){return 3652}function Af(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;a:do if(!d)b=0;else{while(1){e=a[b>>0]|0;f=a[c>>0]|0;if(e<<24>>24!=f<<24>>24)break;d=d+-1|0;if(!d){b=0;break a}else{b=b+1|0;c=c+1|0}}b=(e&255)-(f&255)|0}while(0);return b|0}function Bf(a){a=a|0;return 0}function Cf(a){a=a|0;return 0}function Df(a){a=+a;var b=0;b=Cf(32)|0;a=+Ef(a);return ~~a|0}function Ef(a){a=+a;var b=0,d=0;h[j>>3]=a;b=c[j+4>>2]|0;d=b&2146435072;if(!(d>>>0>1126170624|(d|0)==1126170624&0>0)){b=(b|0)<0;a=(b?4503599627370496.0:-4503599627370496.0)+((b?-4503599627370496.0:4503599627370496.0)+a);if(a==0.0)a=b?-0.0:0.0}return +a}function Ff(){}function Gf(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b>>c;return a>>>c|(b&(1<>c-32|0}function Hf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return (C=d,a-c>>>0|0)|0}function If(a){a=a|0;var b=0,d=0;d=a+15&-16|0;b=c[i>>2]|0;a=b+d|0;if((d|0)>0&(a|0)<(b|0)|(a|0)<0){Z()|0;ma(12);return -1}c[i>>2]=a;if((a|0)>(Y()|0)?(X()|0)==0:0){ma(12);c[i>>2]=b;return -1}return b|0}function Jf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return (C=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function Kf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=b+e|0;d=d&255;if((e|0)>=67){while(b&3){a[b>>0]=d;b=b+1|0}f=h&-4|0;g=f-64|0;i=d|d<<8|d<<16|d<<24;while((b|0)<=(g|0)){c[b>>2]=i;c[b+4>>2]=i;c[b+8>>2]=i;c[b+12>>2]=i;c[b+16>>2]=i;c[b+20>>2]=i;c[b+24>>2]=i;c[b+28>>2]=i;c[b+32>>2]=i;c[b+36>>2]=i;c[b+40>>2]=i;c[b+44>>2]=i;c[b+48>>2]=i;c[b+52>>2]=i;c[b+56>>2]=i;c[b+60>>2]=i;b=b+64|0}while((b|0)<(f|0)){c[b>>2]=i;b=b+4|0}}while((b|0)<(h|0)){a[b>>0]=d;b=b+1|0}return h-e|0}function Lf(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b<>>32-c;return a<>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function Nf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=R(e,f)|0;d=a>>>16;a=(c>>>16)+(R(e,d)|0)|0;e=b>>>16;b=R(e,f)|0;return (C=(a>>>16)+(R(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function Of(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=Nf(e,f)|0;a=C;return (C=(R(b,f)|0)+(R(d,e)|0)+a|a&0,c|0|0)|0}function Pf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192)return na(b|0,d|0,e|0)|0;h=b|0;g=b+e|0;if((b&3)==(d&3)){while(b&3){if(!e)return h|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}e=g&-4|0;f=e-64|0;while((b|0)<=(f|0)){c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];c[b+12>>2]=c[d+12>>2];c[b+16>>2]=c[d+16>>2];c[b+20>>2]=c[d+20>>2];c[b+24>>2]=c[d+24>>2];c[b+28>>2]=c[d+28>>2];c[b+32>>2]=c[d+32>>2];c[b+36>>2]=c[d+36>>2];c[b+40>>2]=c[d+40>>2];c[b+44>>2]=c[d+44>>2];c[b+48>>2]=c[d+48>>2];c[b+52>>2]=c[d+52>>2];c[b+56>>2]=c[d+56>>2];c[b+60>>2]=c[d+60>>2];b=b+64|0;d=d+64|0}while((b|0)<(e|0)){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}}else{e=g-4|0;while((b|0)<(e|0)){a[b>>0]=a[d>>0]|0;a[b+1>>0]=a[d+1>>0]|0;a[b+2>>0]=a[d+2>>0]|0;a[b+3>>0]=a[d+3>>0]|0;b=b+4|0;d=d+4|0}}while((b|0)<(g|0)){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}return h|0}function Qf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qa[a&1](b|0,c|0,d|0)|0}function Rf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;ra[a&3](b|0,c|0,d|0,e|0,f|0)}function Sf(a,b){a=a|0;b=b|0;sa[a&7](b|0)}function Tf(a,b,c){a=a|0;b=b|0;c=c|0;ta[a&7](b|0,c|0)}function Uf(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return ua[a&1](b|0,c|0,d|0,e|0,f|0,g|0)|0}function Vf(a,b,c,d,e,f,g,h,i,j,k,l,m){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;va[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0,m|0)}function Wf(a,b){a=a|0;b=b|0;return wa[a&3](b|0)|0}function Xf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;xa[a&7](b|0,c|0,d|0)}function Yf(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;ya[a&1](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function Zf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return za[a&1](b|0,c|0,d|0,e|0)|0}function _f(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;Aa[a&3](b|0,c|0,d|0,e|0,f|0,g|0)}function $f(a,b,c){a=a|0;b=b|0;c=c|0;return Ba[a&1](b|0,c|0)|0}function ag(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Ca[a&1](b|0,c|0,d|0,e|0,f|0)|0}function bg(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;Da[a&7](b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function cg(a,b,c){a=a|0;b=b|0;c=c|0;V(0);return 0}function dg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;V(1)}function eg(a){a=a|0;V(2)}function fg(a,b){a=a|0;b=b|0;V(3)}function gg(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;V(4);return 0}function hg(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;V(5)}function ig(a){a=a|0;V(6);return 0}function jg(a,b,c){a=a|0;b=b|0;c=c|0;V(7)}function kg(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;V(8)}function lg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;V(9);return 0}function mg(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;V(10)}function ng(a,b){a=a|0;b=b|0;V(11);return 0}function og(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;V(12);return 0}function pg(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;V(13)} + +// EMSCRIPTEN_END_FUNCS +var qa=[cg,zd];var ra=[dg,$c,ad,dg];var sa=[eg,Rb,Nc,Sc,Tc,Uc,Vc,eg];var ta=[fg,Lc,Oc,Pc,Qc,Rc,kd,ke];var ua=[gg,xd];var va=[hg,Xc,Yc,hg];var wa=[ig,Ob,Qb,ig];var xa=[jg,Hc,Ic,Jc,Kc,Mc,jg,jg];var ya=[kg,Wc];var za=[lg,Pb];var Aa=[mg,Gc,Zc,_c];var Ba=[ng,$b];var Ca=[og,yd];var Da=[pg,Ie,Je,Ke,Ge,pg,pg,pg];return{___muldsi3:Nf,_sbrk:If,_i64Subtract:Hf,_free:wf,_bpg_decoder_decode:$e,_bpg_decoder_start:De,_i64Add:Jf,_bpg_decoder_open:_e,_bitshift64Ashr:Gf,_memset:Kf,_bpg_decoder_get_info:Ce,_malloc:qf,_emscripten_get_global_libc:zf,_memcpy:Pf,_bpg_decoder_get_line:Me,_bpg_decoder_close:of,_bpg_decoder_get_frame_duration:Le,___muldi3:Of,_llvm_bswap_i32:Mf,_bitshift64Shl:Lf,runPostSets:Ff,stackAlloc:Ea,stackSave:Fa,stackRestore:Ga,establishStackSpace:Ha,setTempRet0:Ja,getTempRet0:Ka,setThrew:Ia,stackAlloc:Ea,stackSave:Fa,stackRestore:Ga,establishStackSpace:Ha,setThrew:Ia,setTempRet0:Ja,getTempRet0:Ka,dynCall_iiii:Qf,dynCall_viiiii:Rf,dynCall_vi:Sf,dynCall_vii:Tf,dynCall_iiiiiii:Uf,dynCall_viiiiiiiiiiii:Vf,dynCall_ii:Wf,dynCall_viii:Xf,dynCall_viiiiiiiii:Yf,dynCall_iiiii:Zf,dynCall_viiiiii:_f,dynCall_iii:$f,dynCall_iiiiii:ag,dynCall_viiiiiii:bg}}) + + +// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var _bpg_decoder_decode=Module["_bpg_decoder_decode"]=asm["_bpg_decoder_decode"];var _bpg_decoder_start=Module["_bpg_decoder_start"]=asm["_bpg_decoder_start"];var stackSave=Module["stackSave"]=asm["stackSave"];var getTempRet0=Module["getTempRet0"]=asm["getTempRet0"];var setThrew=Module["setThrew"]=asm["setThrew"];var _bpg_decoder_get_line=Module["_bpg_decoder_get_line"]=asm["_bpg_decoder_get_line"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _bitshift64Ashr=Module["_bitshift64Ashr"]=asm["_bitshift64Ashr"];var _memset=Module["_memset"]=asm["_memset"];var _bpg_decoder_get_info=Module["_bpg_decoder_get_info"]=asm["_bpg_decoder_get_info"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var setTempRet0=Module["setTempRet0"]=asm["setTempRet0"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _emscripten_get_global_libc=Module["_emscripten_get_global_libc"]=asm["_emscripten_get_global_libc"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var ___muldsi3=Module["___muldsi3"]=asm["___muldsi3"];var _free=Module["_free"]=asm["_free"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var _bpg_decoder_open=Module["_bpg_decoder_open"]=asm["_bpg_decoder_open"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var _bpg_decoder_close=Module["_bpg_decoder_close"]=asm["_bpg_decoder_close"];var _malloc=Module["_malloc"]=asm["_malloc"];var _bpg_decoder_get_frame_duration=Module["_bpg_decoder_get_frame_duration"]=asm["_bpg_decoder_get_frame_duration"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_viiiiiiiiiiii=Module["dynCall_viiiiiiiiiiii"]=asm["dynCall_viiiiiiiiiiii"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_viiiiiiiii=Module["dynCall_viiiiiiiii"]=asm["dynCall_viiiiiiiii"];var dynCall_iiiii=Module["dynCall_iiiii"]=asm["dynCall_iiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiiiii=Module["dynCall_iiiiii"]=asm["dynCall_iiiiii"];var dynCall_viiiiiii=Module["dynCall_viiiiiii"]=asm["dynCall_viiiiiii"];Runtime.stackAlloc=Module["stackAlloc"];Runtime.stackSave=Module["stackSave"];Runtime.stackRestore=Module["stackRestore"];Runtime.establishStackSpace=Module["establishStackSpace"];Runtime.setTempRet0=Module["setTempRet0"];Runtime.getTempRet0=Module["getTempRet0"];Module["asm"]=asm;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=Module.callMain=function callMain(args){args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<4-1;i++){argv.push(0)}}var argv=[allocate(intArrayFromString(Module["thisProgram"]),"i8",ALLOC_NORMAL)];pad();for(var i=0;i0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["exit"](status)}Module["quit"](status,new ExitStatus(status))}Module["exit"]=Module.exit=exit;var abortDecorators=[];function abort(what){if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output="abort("+what+") at "+stackTrace()+extra;if(abortDecorators){abortDecorators.forEach((function(decorator){output=decorator(output,what)}))}throw output}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}run();window["BPGDecoder"]=(function(ctx){this.ctx=ctx;this["imageData"]=null;this["onload"]=null;this["frames"]=null;this["loop_count"]=0});window["BPGDecoder"].prototype={malloc:Module["cwrap"]("malloc","number",["number"]),free:Module["cwrap"]("free","void",["number"]),bpg_decoder_open:Module["cwrap"]("bpg_decoder_open","number",[]),bpg_decoder_decode:Module["cwrap"]("bpg_decoder_decode","number",["number","array","number"]),bpg_decoder_get_info:Module["cwrap"]("bpg_decoder_get_info","number",["number","number"]),bpg_decoder_start:Module["cwrap"]("bpg_decoder_start","number",["number","number"]),bpg_decoder_get_frame_duration:Module["cwrap"]("bpg_decoder_get_frame_duration","void",["number","number","number"]),bpg_decoder_get_line:Module["cwrap"]("bpg_decoder_get_line","number",["number","number"]),bpg_decoder_close:Module["cwrap"]("bpg_decoder_close","void",["number"]),load:(function(url){var request=new XMLHttpRequest;var this1=this;request.open("get",url,true);request.responseType="arraybuffer";request.onload=(function(event){this1._onload(request,event)});request.send()}),_onload:(function(request,event){var data=request.response;var array=new Uint8Array(data);var img,w,h,img_info_buf,cimg,p0,rgba_line,w4,frame_count;var heap8,heap16,heap32,dst,i,y,duration,frames,loop_count;img=this.bpg_decoder_open();if(this.bpg_decoder_decode(img,array,array.length)<0){console.log("could not decode image");return}img_info_buf=this.malloc(5*4);this.bpg_decoder_get_info(img,img_info_buf);heap8=Module["HEAPU8"];heap16=Module["HEAPU16"];heap32=Module["HEAPU32"];w=heap32[img_info_buf>>2];h=heap32[img_info_buf+4>>2];loop_count=heap16[img_info_buf+16>>1];w4=w*4;rgba_line=this.malloc(w4);frame_count=0;frames=[];for(;;){if(this.bpg_decoder_start(img,1)<0)break;this.bpg_decoder_get_frame_duration(img,img_info_buf,img_info_buf+4);duration=heap32[img_info_buf>>2]*1e3/heap32[img_info_buf+4>>2];cimg=this.ctx.createImageData(w,h);dst=cimg.data;p0=0;for(y=0;y=frames.length){if(dec["loop_count"]==0||dec.loop_counter=0){dec.frame_index=frame_index;ctx.putImageData(frames[frame_index]["img"],0,0);setTimeout(next_frame,frames[frame_index]["duration"])}}canvas.width=imageData.width;canvas.height=imageData.height;ctx.putImageData(imageData,0,0);if(frames.length>1){dec.frame_index=0;dec.loop_counter=0;setTimeout(next_frame,frames[0]["duration"])}}).bind(dec,canvas,ctx);dec.load(url)}})}))() + + + + diff --git a/themes/fractal-forest/static/js/bpgdec8.js.sha384 b/themes/fractal-forest/static/js/bpgdec8.js.sha384 new file mode 100644 index 0000000..895f733 --- /dev/null +++ b/themes/fractal-forest/static/js/bpgdec8.js.sha384 @@ -0,0 +1 @@ +3CqYbTw/dZv6ybsLOIogCZfTfFFvzYJQZfDBWUuXQyunCKxoE4rXbJLZSpjZa9gA diff --git a/themes/fractal-forest/static/js/bpgdec8a.js b/themes/fractal-forest/static/js/bpgdec8a.js new file mode 100644 index 0000000..f15ad08 --- /dev/null +++ b/themes/fractal-forest/static/js/bpgdec8a.js @@ -0,0 +1,17 @@ +((function(){var Module={};var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=console.log;if(!Module["printErr"])Module["printErr"]=console.warn;var nodeFS;var nodePath;Module["read"]=function read(filename,binary){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](filename);return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};Module["load"]=function load(f){globalEval(read(f))};if(!Module["thisProgram"]){if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=read}else{Module["read"]=function read(){throw"no read() available"}}Module["readBinary"]=function readBinary(f){if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}var data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=(function(status,toThrow){quit(status)})}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return xhr.response}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response)}else{onerror()}};xhr.onerror=onerror;xhr.send(null)};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module["print"])Module["print"]=function print(x){console.log(x)};if(!Module["printErr"])Module["printErr"]=function printErr(x){console.warn(x)}}else{var TRY_USE_DUMP=false;if(!Module["print"])Module["print"]=TRY_USE_DUMP&&typeof dump!=="undefined"?(function(x){dump(x)}):(function(x){})}if(ENVIRONMENT_IS_WORKER){Module["load"]=importScripts}if(typeof Module["setWindowTitle"]==="undefined"){Module["setWindowTitle"]=(function(title){document.title=title})}}else{throw"Unknown runtime environment. Where are we?"}function globalEval(x){eval.call(null,x)}if(!Module["load"]&&Module["read"]){Module["load"]=function load(f){globalEval(Module["read"](f))}}if(!Module["print"]){Module["print"]=(function(){})}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}if(!Module["quit"]){Module["quit"]=(function(status,toThrow){throw toThrow})}Module.print=Module["print"];Module.printErr=Module["printErr"];Module["preRun"]=[];Module["postRun"]=[];for(var key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var Runtime={setTempRet0:(function(value){tempRet0=value;return value}),getTempRet0:(function(){return tempRet0}),stackSave:(function(){return STACKTOP}),stackRestore:(function(stackTop){STACKTOP=stackTop}),getNativeTypeSize:(function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),STACK_ALIGN:16,prepVararg:(function(ptr,type){if(type==="double"||type==="i64"){if(ptr&7){assert((ptr&7)===4);ptr+=4}}else{assert((ptr&3)===0)}return ptr}),getAlignSize:(function(type,size,vararg){if(!vararg&&(type=="i64"||type=="double"))return 8;if(!type)return Math.min(size,8);return Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE)}),dynCall:(function(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[],addFunction:(function(func){for(var i=0;i>2];var end=(ret+size+15|0)&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;if(end>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){HEAP32[DYNAMICTOP_PTR>>2]=ret;return 0}}return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;var ABORT=0;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];if(!func){try{func=eval("_"+ident)}catch(e){}}assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)");return func}var cwrap,ccall;((function(){var JSfuncs={"stackSave":(function(){Runtime.stackSave()}),"stackRestore":(function(){Runtime.stackRestore()}),"arrayToC":(function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=Runtime.stackAlloc(len);stringToUTF8(str,ret,len)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};ccall=function ccallFunc(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}Module["setValue"]=setValue;function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type)}return null}Module["getValue"]=getValue;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module["ALLOC_NORMAL"]=ALLOC_NORMAL;Module["ALLOC_STACK"]=ALLOC_STACK;Module["ALLOC_STATIC"]=ALLOC_STATIC;Module["ALLOC_DYNAMIC"]=ALLOC_DYNAMIC;Module["ALLOC_NONE"]=ALLOC_NONE;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return Module["UTF8ToString"](ptr)}Module["Pointer_stringify"]=Pointer_stringify;function AsciiToString(ptr){var str="";while(1){var ch=HEAP8[ptr++>>0];if(!ch)return str;str+=String.fromCharCode(ch)}}Module["AsciiToString"]=AsciiToString;function stringToAscii(str,outPtr){return writeAsciiToMemory(str,outPtr,false)}Module["stringToAscii"]=stringToAscii;var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx){var endPtr=idx;while(u8Array[endPtr])++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}}Module["UTF8ArrayToString"]=UTF8ArrayToString;function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}Module["UTF8ToString"]=UTF8ToString;function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}Module["stringToUTF8Array"]=stringToUTF8Array;function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}Module["stringToUTF8"]=stringToUTF8;function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}Module["lengthBytesUTF8"]=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function demangle(func){var __cxa_demangle_func=Module["___cxa_demangle"]||Module["__cxa_demangle"];if(__cxa_demangle_func){try{var s=func.substr(1);var len=lengthBytesUTF8(s)+1;var buf=_malloc(len);stringToUTF8(s,buf,len);var status=_malloc(4);var ret=__cxa_demangle_func(buf,0,0,status);if(getValue(status,"i32")===0&&ret){return Pointer_stringify(ret)}}catch(e){}finally{if(buf)_free(buf);if(status)_free(status);if(ret)_free(ret)}return func}Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}Module["stackTrace"]=stackTrace;var HEAP;var buffer;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed;var STACK_BASE,STACKTOP,STACK_MAX;var DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0;staticSealed=false;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||33554432;if(TOTAL_MEMORY0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}Module["addOnPreRun"]=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}Module["intArrayToString"]=intArrayToString;function writeStringToMemory(string,buffer,dontAddNull){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var lastChar,end;if(dontAddNull){end=buffer+lengthBytesUTF8(string);lastChar=HEAP8[end]}stringToUTF8(string,buffer,Infinity);if(dontAddNull)HEAP8[end]=lastChar}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;if(!Math["imul"]||Math["imul"](4294967295,5)!==-5)Math["imul"]=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};Math.imul=Math["imul"];if(!Math["clz32"])Math["clz32"]=(function(x){x=x>>>0;for(var i=0;i<32;i++){if(x&1<<31-i)return i}return 32});Math.clz32=Math["clz32"];if(!Math["trunc"])Math["trunc"]=(function(x){return x<0?Math.ceil(x):Math.floor(x)});Math.trunc=Math["trunc"];var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_round=Math.round;var Math_min=Math.min;var Math_clz32=Math.clz32;var Math_trunc=Math.trunc;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var ASM_CONSTS=[];STATIC_BASE=8;STATICTOP=STATIC_BASE+6272;__ATINIT__.push();allocate([0,0,0,0,0,0,0,0,254,58,10,254,252,54,16,254,250,46,28,252,252,36,36,252,252,28,46,250,254,16,54,252,254,10,58,254,0,0,0,0,255,4,246,58,17,251,1,0,255,4,246,58,17,251,1,0,255,4,245,40,40,245,4,255,255,4,245,40,40,245,4,255,0,1,251,17,58,246,4,255,0,1,251,17,58,246,4,255,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,33,0,0,0,34,0,0,0,34,0,0,0,35,0,0,0,35,0,0,0,36,0,0,0,36,0,0,0,37,0,0,0,37,0,0,0,246,6,0,0,0,0,0,0,0,0,0,0,53,54,50,72,34,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,7,0,0,0,1,0,0,0,0,0,0,0,255,255,255,127,0,0,0,0,0,0,0,0,3,1,1,0,36,56,37,56,38,56,0,0,0,0,0,0,4,0,0,0,0,0,0,0,3,1,0,16,36,56,37,56,38,56,0,0,0,0,0,0,5,0,0,0,0,0,0,0,3,0,0,16,36,56,37,56,38,56,0,0,0,0,0,0,8,0,0,0,0,0,0,0,1,0,0,0,36,56,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,0,240,154,249,114,252,138,253,30,254,122,254,197,254,0,255,197,254,122,254,30,254,138,253,114,252,154,249,0,240,0,0,1,0,1,2,0,1,2,3,1,2,3,2,3,3,0,1,0,2,1,0,3,2,1,0,3,2,1,3,2,3,0,0,1,0,1,2,0,1,2,3,0,1,2,3,4,0,1,2,3,4,5,0,1,2,3,4,5,6,0,1,2,3,4,5,6,7,1,2,3,4,5,6,7,2,3,4,5,6,7,3,4,5,6,7,4,5,6,7,5,6,7,6,7,7,0,1,0,2,1,0,3,2,1,0,4,3,2,1,0,5,4,3,2,1,0,6,5,4,3,2,1,0,7,6,5,4,3,2,1,0,7,6,5,4,3,2,1,7,6,5,4,3,2,7,6,5,4,3,7,6,5,4,7,6,5,7,6,7,40,45,51,57,64,72,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,9,9,9,10,10,10,10,10,10,11,11,11,11,11,11,12,12,0,0,0,2,5,9,1,4,8,12,3,7,11,14,6,10,13,15,0,2,1,3,0,2,5,9,14,20,27,35,1,4,8,13,19,26,34,42,3,7,12,18,25,33,41,48,6,11,17,24,32,40,47,53,10,16,23,31,39,46,52,57,15,22,30,38,45,51,56,60,21,29,37,44,50,55,59,62,28,36,43,49,54,58,61,63,0,1,0,1,0,0,1,1,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,0,1,2,3,16,17,18,19,4,5,6,7,20,21,22,23,8,9,10,11,24,25,26,27,12,13,14,15,28,29,30,31,32,33,34,35,48,49,50,51,36,37,38,39,52,53,54,55,40,41,42,43,56,57,58,59,44,45,46,47,60,61,62,63,0,1,4,5,2,3,4,5,6,6,8,8,7,7,8,8,1,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,2,1,0,0,2,1,0,0,2,1,0,0,2,1,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,153,200,139,141,157,154,154,154,154,154,154,154,154,184,154,154,154,184,63,139,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,153,138,138,111,141,94,138,182,154,139,139,139,139,139,139,110,110,124,125,140,153,125,127,140,109,111,143,127,111,79,108,123,63,110,110,124,125,140,153,125,127,140,109,111,143,127,111,79,108,123,63,91,171,134,141,111,111,125,110,110,94,124,108,124,107,125,141,179,153,125,107,125,141,179,153,125,107,125,141,179,153,125,140,139,182,182,152,136,152,136,153,136,139,111,136,139,111,141,111,140,92,137,138,140,152,138,139,153,74,149,92,139,107,122,152,140,179,166,182,140,227,122,197,138,153,136,167,152,152,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,185,107,139,126,154,197,185,201,154,154,154,149,154,139,154,154,154,152,139,110,122,95,79,63,31,31,153,153,153,153,140,198,140,198,168,79,124,138,94,153,111,149,107,167,154,139,139,139,139,139,139,125,110,94,110,95,79,125,111,110,78,110,111,111,95,94,108,123,108,125,110,94,110,95,79,125,111,110,78,110,111,111,95,94,108,123,108,121,140,61,154,155,154,139,153,139,123,123,63,153,166,183,140,136,153,154,166,183,140,136,153,154,166,183,140,136,153,154,170,153,123,123,107,121,107,121,167,151,183,140,151,183,140,140,140,154,196,196,167,154,152,167,182,182,134,149,136,153,121,136,137,169,194,166,167,154,167,137,182,107,167,91,122,107,167,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,160,107,139,126,154,197,185,201,154,154,154,134,154,139,154,154,183,152,139,154,137,95,79,63,31,31,153,153,153,153,169,198,169,198,168,79,224,167,122,153,111,149,92,167,154,139,139,139,139,139,139,125,110,124,110,95,94,125,111,111,79,125,126,111,111,79,108,123,93,125,110,124,110,95,94,125,111,111,79,125,126,111,111,79,108,123,93,121,140,61,154,170,154,139,153,139,123,123,63,124,166,183,140,136,153,154,166,183,140,136,153,154,166,183,140,136,153,154,170,153,138,138,122,121,122,121,167,151,183,140,151,183,140,140,140,154,196,167,167,154,152,167,182,182,134,149,136,153,121,136,122,169,208,166,167,154,152,167,182,107,167,91,107,107,167,154,154,154,154,154,154,154,154,154,154,154,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,6,6,7,8,9,10,11,13,14,16,18,20,22,24,29,30,31,32,33,33,34,34,35,35,36,36,37,37,0,0,0,0,1,0,2,0,3,0,0,0,4,0,0,0,5,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,104,101,118,99,0,0,26,10,1,0,1,2,2,2,2,3,5,7,8,10,12,13,15,17,18,19,20,21,22,23,23,24,24,25,25,26,27,27,28,28,29,29,30,31,32,26,21,17,13,9,5,2,0,254,251,247,243,239,235,230,224,230,235,239,243,247,251,254,0,2,5,9,13,17,21,26,32,64,90,90,90,89,88,87,85,83,82,80,78,75,73,70,67,64,61,57,54,50,46,43,38,36,31,25,22,18,13,9,4,255,0,1,0,0,255,0,1,255,255,1,1,1,255,255,1,1,2,0,3,4,0,1,1,0,0,2,2,0,1,2,2,1,0,3,3,0,1,3,3,1,2,3,3,2,16,16,16,16,17,18,21,24,16,16,16,16,17,19,22,25,16,16,17,18,20,22,25,29,16,16,18,21,24,27,31,36,17,17,20,24,30,35,41,47,18,19,22,27,35,44,54,65,21,22,25,31,41,54,70,88,24,25,29,36,47,65,88,115,16,16,16,16,17,18,20,24,16,16,16,17,18,20,24,25,16,16,17,18,20,24,25,28,16,17,18,20,24,25,28,33,17,18,20,24,25,28,33,41,18,20,24,25,28,33,41,54,20,24,25,28,33,41,54,71,24,25,28,33,41,54,71,91,128,176,208,240,128,167,197,227,128,158,187,216,123,150,178,205,116,142,169,195,111,135,160,185,105,128,152,175,100,122,144,166,95,116,137,158,90,110,130,150,85,104,123,142,81,99,117,135,77,94,111,128,73,89,105,122,69,85,100,116,66,80,95,110,62,76,90,104,59,72,86,99,56,69,81,94,53,65,77,89,51,62,73,85,48,59,69,80,46,56,66,76,43,53,63,72,41,50,59,69,39,48,56,65,37,45,54,62,35,43,51,59,33,41,48,56,32,39,46,53,30,37,43,50,29,35,41,48,27,33,39,45,26,31,37,43,24,30,35,41,23,28,33,39,22,27,32,37,21,26,30,35,20,24,29,33,19,23,27,31,18,22,26,30,17,21,25,28,16,20,23,27,15,19,22,25,14,18,21,24,14,17,20,23,13,16,19,22,12,15,18,21,12,14,17,20,11,14,16,19,11,13,15,18,10,12,15,17,10,12,14,16,9,11,13,15,9,11,12,14,8,10,12,14,8,9,11,13,7,9,11,12,7,9,10,12,7,8,10,11,6,8,9,11,6,7,9,10,6,7,8,9,2,2,2,2,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,62,63,0,0,1,2,2,4,4,5,6,7,8,9,9,11,11,12,13,13,15,15,16,16,18,18,19,19,21,21,22,22,23,24,24,25,26,26,27,27,28,29,29,30,30,30,31,32,32,33,33,33,34,34,35,35,35,36,36,36,37,37,37,38,38,63,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;Module["_bitshift64Ashr"]=_bitshift64Ashr;Module["_i64Subtract"]=_i64Subtract;function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}Module["_sbrk"]=_sbrk;Module["_i64Add"]=_i64Add;Module["_memset"]=_memset;Module["_bitshift64Shl"]=_bitshift64Shl;function _abort(){Module["abort"]()}Module["_llvm_bswap_i32"]=_llvm_bswap_i32;Module["___muldsi3"]=___muldsi3;Module["___muldi3"]=___muldi3;function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;DYNAMICTOP_PTR=allocate(1,"i32",ALLOC_STATIC);STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;staticSealed=true;function invoke_iiii(index,a1,a2,a3){try{return Module["dynCall_iiii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){try{Module["dynCall_viiiiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){try{Module["dynCall_viiiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){try{Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vi(index,a1){try{Module["dynCall_vi"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_vii(index,a1,a2){try{Module["dynCall_vii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){try{return Module["dynCall_iiiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){try{Module["dynCall_viiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){try{Module["dynCall_viiiiiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_ii(index,a1){try{return Module["dynCall_ii"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viii(index,a1,a2,a3){try{Module["dynCall_viii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){try{Module["dynCall_viiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){try{return Module["dynCall_iiiii"](index,a1,a2,a3,a4)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){try{Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iii(index,a1,a2){try{return Module["dynCall_iii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){try{return Module["dynCall_iiiiii"](index,a1,a2,a3,a4,a5)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){try{Module["dynCall_viiiiiii"](index,a1,a2,a3,a4,a5,a6,a7)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;Module["setThrew"](1,0)}}Module.asmGlobalArg={"Math":Math,"Int8Array":Int8Array,"Int16Array":Int16Array,"Int32Array":Int32Array,"Uint8Array":Uint8Array,"Uint16Array":Uint16Array,"Uint32Array":Uint32Array,"Float32Array":Float32Array,"Float64Array":Float64Array,"NaN":NaN,"Infinity":Infinity};Module.asmLibraryArg={"abort":abort,"assert":assert,"enlargeMemory":enlargeMemory,"getTotalMemory":getTotalMemory,"abortOnCannotGrowMemory":abortOnCannotGrowMemory,"invoke_iiii":invoke_iiii,"invoke_viiiiiiiiiii":invoke_viiiiiiiiiii,"invoke_viiiiiiiiii":invoke_viiiiiiiiii,"invoke_viiiii":invoke_viiiii,"invoke_vi":invoke_vi,"invoke_vii":invoke_vii,"invoke_iiiiiii":invoke_iiiiiii,"invoke_viiiiiiiii":invoke_viiiiiiiii,"invoke_viiiiiiiiiiii":invoke_viiiiiiiiiiii,"invoke_ii":invoke_ii,"invoke_viii":invoke_viii,"invoke_viiiiiiii":invoke_viiiiiiii,"invoke_iiiii":invoke_iiiii,"invoke_viiiiii":invoke_viiiiii,"invoke_iii":invoke_iii,"invoke_iiiiii":invoke_iiiiii,"invoke_viiiiiii":invoke_viiiiiii,"___setErrNo":___setErrNo,"_emscripten_memcpy_big":_emscripten_memcpy_big,"_abort":_abort,"DYNAMICTOP_PTR":DYNAMICTOP_PTR,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX};// EMSCRIPTEN_START_ASM +var asm=(function(global,env,buffer) { +"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.DYNAMICTOP_PTR|0;var j=env.tempDoublePtr|0;var k=env.ABORT|0;var l=env.STACKTOP|0;var m=env.STACK_MAX|0;var n=0;var o=0;var p=0;var q=0;var r=global.NaN,s=global.Infinity;var t=0,u=0,v=0,w=0,x=0.0,y=0,z=0,A=0,B=0.0;var C=0;var D=global.Math.floor;var E=global.Math.abs;var F=global.Math.sqrt;var G=global.Math.pow;var H=global.Math.cos;var I=global.Math.sin;var J=global.Math.tan;var K=global.Math.acos;var L=global.Math.asin;var M=global.Math.atan;var N=global.Math.atan2;var O=global.Math.exp;var P=global.Math.log;var Q=global.Math.ceil;var R=global.Math.imul;var S=global.Math.min;var T=global.Math.max;var U=global.Math.clz32;var V=env.abort;var W=env.assert;var X=env.enlargeMemory;var Y=env.getTotalMemory;var Z=env.abortOnCannotGrowMemory;var _=env.invoke_iiii;var $=env.invoke_viiiiiiiiiii;var aa=env.invoke_viiiiiiiiii;var ba=env.invoke_viiiii;var ca=env.invoke_vi;var da=env.invoke_vii;var ea=env.invoke_iiiiiii;var fa=env.invoke_viiiiiiiii;var ga=env.invoke_viiiiiiiiiiii;var ha=env.invoke_ii;var ia=env.invoke_viii;var ja=env.invoke_viiiiiiii;var ka=env.invoke_iiiii;var la=env.invoke_viiiiii;var ma=env.invoke_iii;var na=env.invoke_iiiiii;var oa=env.invoke_viiiiiii;var pa=env.___setErrNo;var qa=env._emscripten_memcpy_big;var ra=env._abort;var sa=0.0; +// EMSCRIPTEN_START_FUNCS +function Ka(a){a=a|0;var b=0;b=l;l=l+a|0;l=l+15&-16;return b|0}function La(){return l|0}function Ma(a){a=a|0;l=a}function Na(a,b){a=a|0;b=b|0;l=a;m=b}function Oa(a,b){a=a|0;b=b|0;if(!n){n=a;o=b}}function Pa(a){a=a|0;C=a}function Qa(){return C|0}function Ra(b,d){b=b|0;d=d|0;var e=0;do if(a[(c[b+204>>2]|0)+43>>0]|0){e=c[(c[b+200>>2]|0)+13128>>2]|0;d=(d|0)%(e|0)|0;if((d|0)!=2?!((e|0)==2&(d|0)==0):0)break;fh(c[b+152>>2]|0,c[b+136>>2]|0,199)|0}while(0);return}function Sa(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=b+204|0;e=c[g>>2]|0;do if((c[(c[e+1668>>2]|0)+(c[b+3488>>2]<<2)>>2]|0)==(d|0)){Ta(b);e=b+2437|0;if(a[e>>0]|0){f=c[g>>2]|0;if(a[f+42>>0]|0?(f=c[f+1676>>2]|0,(c[f+(d<<2)>>2]|0)!=(c[f+(d+-1<<2)>>2]|0)):0)i=5}else i=5;if((i|0)==5)Ua(b);if(((a[b+2436>>0]|0)==0?a[(c[g>>2]|0)+43>>0]|0:0)?(h=c[(c[b+200>>2]|0)+13128>>2]|0,((d|0)%(h|0)|0|0)==0):0){if((h|0)==1){Ua(b);break}if((a[e>>0]|0)==1)Va(b)}}else{if((a[e+42>>0]|0)!=0?(i=c[e+1676>>2]|0,(c[i+(d<<2)>>2]|0)!=(c[i+(d+-1<<2)>>2]|0)):0){if((a[b+141>>0]|0)==1)Wa(c[b+136>>2]|0);else Ta(b);Ua(b);e=c[g>>2]|0}if(a[e+43>>0]|0?(f=b+200|0,((d|0)%(c[(c[f>>2]|0)+13128>>2]|0)|0|0)==0):0){e=b+136|0;Xa((c[e>>2]|0)+224|0)|0;if((a[b+141>>0]|0)==1)Wa(c[e>>2]|0);else Ta(b);if((c[(c[f>>2]|0)+13128>>2]|0)==1){Ua(b);break}else{Va(b);break}}}while(0);return}function Ta(a){a=a|0;var b=0,d=0;d=a+136|0;a=(c[d>>2]|0)+204|0;Ve(a,1);Jb(a);d=(c[d>>2]|0)+224|0;b=c[a>>2]|0;b=b+((Kb(a)|0)/8|0)|0;Qe(d,b,((Lb(a)|0)+7|0)/8|0);return}function Ua(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;g=c[b+2428>>2]|0;e=2-g|0;e=(g|0)==2|(a[b+3048>>0]|0)==0?e:e^3;g=b+3100|0;f=b+136|0;b=0;do{h=d[1e3+(e*199|0)+b>>0]|0;j=a[g>>0]|0;i=j<<24>>24;h=((h<<3&120)+-16+((R(j<<24>>24<0?0:(i|0)<51?i:51,((h>>>4)*5|0)+-45|0)|0)>>4)<<1)+-127|0;h=h>>31^h;a[(c[f>>2]|0)+b>>0]=(h|0)>124?h&1|124:h;b=b+1|0}while((b|0)!=199);b=0;do{a[(c[f>>2]|0)+199+b>>0]=0;b=b+1|0}while((b|0)!=4);return}function Va(a){a=a|0;fh(c[a+136>>2]|0,c[a+152>>2]|0,199)|0;return}function Wa(a){a=a|0;Mb(a+224|0);return}function Xa(a){a=a|0;var b=0,d=0;d=a+4|0;b=(c[d>>2]|0)+-2|0;c[d>>2]=b;if((c[a>>2]|0)<(b<<17|0)){Nb(a);a=0}else a=(c[a+16>>2]|0)-(c[a+12>>2]|0)|0;return a|0}function Ya(a){a=a|0;a=c[a+136>>2]|0;return Za(a+224|0,a)|0}function Za(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=d[e>>0]|0;g=b+4|0;i=c[g>>2]|0;j=d[5429+((i<<1&384)+f)>>0]|0;i=i-j|0;k=i<<17;l=c[b>>2]|0;h=k-l>>31;c[b>>2]=l-(h&k);c[g>>2]=(h&j-i)+i;f=h^f;a[e>>0]=a[6069+f>>0]|0;h=c[g>>2]|0;e=d[4917+h>>0]|0;c[g>>2]=h<>2]<>2]=e;if(!(e&65535))Pb(b);return f&1|0}function _a(a){a=a|0;var b=0;a=a+136|0;b=c[a>>2]|0;if(!(Za(b+224|0,b+1|0)|0))a=0;else{a=($a((c[a>>2]|0)+224|0)|0)==0;a=a?1:2}return a|0}function $a(a){a=a|0;var b=0,d=0;b=c[a>>2]<<1;c[a>>2]=b;if(!(b&65534)){Ob(a);b=c[a>>2]|0}d=c[a+4>>2]<<17;if((b|0)<(d|0))b=0;else{c[a>>2]=b-d;b=1}return b|0}function ab(a){a=a|0;var b=0,d=0;d=a+136|0;a=0;b=$a((c[d>>2]|0)+224|0)|0;do{b=$a((c[d>>2]|0)+224|0)|0|b<<1;a=a+1|0}while((a|0)!=4);return b|0}function bb(a){a=a|0;var b=0,d=0;d=c[(c[a+200>>2]|0)+52>>2]|0;d=(d|0)>10?31:(1<0){a=0;do{if(!($a((c[b>>2]|0)+224|0)|0))break a;a=a+1|0}while((a|0)<(d|0))}else a=0;while(0);return a|0}function cb(a){a=a|0;return $a((c[a+136>>2]|0)+224|0)|0}function db(a){a=a|0;var b=0;b=a+136|0;a=($a((c[b>>2]|0)+224|0)|0)<<1;return $a((c[b>>2]|0)+224|0)|0|a|0}function eb(a){a=a|0;return Xa((c[a+136>>2]|0)+224|0)|0}function fb(a){a=a|0;a=c[a+136>>2]|0;return Za(a+224|0,a+5|0)|0}function gb(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;h=c[b+200>>2]|0;i=c[h+13140>>2]|0;h=(1<>2])+-1|0;j=c[b+136>>2]|0;if((a[j+308>>0]|0)!=0|(h&d|0)!=0)d=(a[(c[b+7584>>2]|0)+(f+-1+(R(i,g)|0))>>0]|0)!=0&1;else d=0;if((h&e|0)!=0|(a[j+309>>0]|0)!=0)d=((a[(c[b+7584>>2]|0)+((R(i,g+-1|0)|0)+f)>>0]|0)!=0&1)+d|0;return Za(j+224|0,j+(d+6)|0)|0}function hb(a){a=a|0;var b=0,d=0,e=0,f=0;e=a+136|0;a=9;b=0;while(1){d=c[e>>2]|0;if(!(Za(d+224|0,d+a|0)|0)){a=0;break}b=b+1|0;if((b|0)>=5){a=0;d=0;f=4;break}else a=10}do if((f|0)==4){while(1){f=0;if(!($a((c[e>>2]|0)+224|0)|0)){f=5;break}a=(1<>2]|0)+224|0)|0)<>2]|0)+224|0)|0}function jb(a){a=a|0;a=c[a+136>>2]|0;return Za(a+224|0,a+176|0)|0}function kb(b){b=b|0;var d=0,e=0,f=0;f=a[(c[b+204>>2]|0)+1633>>0]|0;f=(f&255)>5?f:5;e=f&255;d=b+136|0;a:do if(!(f<<24>>24))b=0;else{b=0;do{f=c[d>>2]|0;if(!(Za(f+224|0,f+177|0)|0))break a;b=b+1|0}while((b|0)<(e|0))}while(0);return b|0}function lb(a){a=a|0;a=c[a+136>>2]|0;return Za(a+224|0,a+12|0)|0}function mb(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;k=c[b+200>>2]|0;l=(1<>2])+-1|0;j=c[k+13064>>2]|0;i=f>>j;j=g>>j;m=c[b+136>>2]|0;if((a[m+308>>0]|0)!=0|(l&f|0)!=0)h=d[(c[b+7588>>2]|0)+(i+-1+(R(c[k+13140>>2]|0,j)|0))>>0]|0;else h=0;if((l&g|0)!=0|(a[m+309>>0]|0)!=0)f=d[(c[b+7588>>2]|0)+((R(c[k+13140>>2]|0,j+-1|0)|0)+i)>>0]|0;else f=0;return Za(m+224|0,m+(((h|0)>(e|0)?3:2)+((f|0)>(e|0)&1))|0)|0}function nb(b,d){b=b|0;d=d|0;var e=0,f=0;e=b+136|0;f=c[e>>2]|0;do if(!(Za(f+224|0,f+13|0)|0)){b=c[b+200>>2]|0;if((c[b+13064>>2]|0)==(d|0)){b=c[e>>2]|0;if((c[b+31244>>2]|0)==1){b=3;break}if(Za(b+224|0,b+14|0)|0){b=1;break}if((d|0)==3){b=2;break}b=c[e>>2]|0;b=(Za(b+224|0,b+15|0)|0)==0;b=b?3:2;break}f=(a[b+12940>>0]|0)==0;b=c[e>>2]|0;b=(Za(b+224|0,b+14|0)|0)!=0;if(f){b=b?1:2;break}d=c[e>>2]|0;d=(Za(d+224|0,d+16|0)|0)!=0;if(b){if(d){b=1;break}b=($a((c[e>>2]|0)+224|0)|0)==0;b=b?4:5;break}else{if(d){b=2;break}b=($a((c[e>>2]|0)+224|0)|0)==0;b=b?6:7;break}}else b=0;while(0);return b|0}function ob(a){a=a|0;return Xa((c[a+136>>2]|0)+224|0)|0}function pb(a){a=a|0;a=c[a+136>>2]|0;return Za(a+224|0,a+17|0)|0}function qb(a){a=a|0;var b=0;b=a+136|0;a=0;do{if(!($a((c[b>>2]|0)+224|0)|0))break;a=a+1|0}while((a|0)<2);return a|0}function rb(a){a=a|0;var b=0,d=0;d=a+136|0;a=0;b=$a((c[d>>2]|0)+224|0)|0;do{b=$a((c[d>>2]|0)+224|0)|0|b<<1;a=a+1|0}while((a|0)!=4);return b|0}function sb(a){a=a|0;var b=0;a=a+136|0;b=c[a>>2]|0;if(!(Za(b+224|0,b+18|0)|0))a=4;else{b=($a((c[a>>2]|0)+224|0)|0)<<1;a=$a((c[a>>2]|0)+224|0)|0|b}return a|0}function tb(a){a=a|0;var b=0,d=0;d=a+136|0;b=c[d>>2]|0;b=Za(b+224|0,b+21|0)|0;a:do if(b){a=a+3080|0;if(b>>>0<((c[a>>2]|0)+-1|0)>>>0)do{if(!($a((c[d>>2]|0)+224|0)|0))break a;b=b+1|0}while(b>>>0<((c[a>>2]|0)+-1|0)>>>0)}else b=0;while(0);return b|0}function ub(a){a=a|0;a=c[a+136>>2]|0;return Za(a+224|0,a+20|0)|0}function vb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;f=a+136|0;a=c[f>>2]|0;e=a+224|0;if((d+b|0)!=12)if(!(Za(e,a+((c[a+31232>>2]|0)+22)|0)|0)){a=c[f>>2]|0;e=a+224|0;g=4}else a=2;else g=4;if((g|0)==4)a=Za(e,a+26|0)|0;return a|0}function wb(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=b+-1|0;d=(f|0)<2?f:2;e=a+136|0;a:do if((b|0)>1){a=0;do{b=c[e>>2]|0;if(!(Za(b+224|0,b+(a+27)|0)|0))break;a=a+1|0}while((a|0)<(d|0));if((a|0)==2)if((f|0)>2){a=2;do{if(!($a((c[e>>2]|0)+224|0)|0))break a;a=a+1|0}while((a|0)<(f|0))}else a=2}else a=0;while(0);return a|0}function xb(a){a=a|0;a=c[a+136>>2]|0;return Za(a+224|0,a+35|0)|0}function yb(a){a=a|0;a=c[a+136>>2]|0;return Za(a+224|0,a+36|0)|0}function zb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Za(a+224|0,a+(42-b)|0)|0}function Ab(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Za(a+224|0,a+(b+42)|0)|0}function Bb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Za(a+224|0,a+((b|0)==0?41:40)|0)|0}function Cb(a,b){a=a|0;b=b|0;var d=0,e=0;d=a+136|0;b=(b<<2)+166|0;a=0;do{e=c[d>>2]|0;if(!(Za(e+224|0,e+(b+a)|0)|0))break;a=a+1|0}while((a|0)<4);return a|0}function Db(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Za(a+224|0,a+(b+174)|0)|0}function Eb(f,g,h,i,j,k){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,za=0,Aa=0,Ba=0,Ca=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0;Sa=l;l=l+96|0;Ga=Sa+24|0;Ha=Sa+8|0;Ia=Sa;Ja=f+136|0;Oa=c[Ja>>2]|0;Qa=c[f+160>>2]|0;Ra=c[Qa+32+(k<<2)>>2]|0;La=f+200|0;z=c[La>>2]|0;Pa=R(h>>c[z+13180+(k<<2)>>2],Ra)|0;Pa=(c[Qa+(k<<2)>>2]|0)+((g>>c[z+13168+(k<<2)>>2]<>2])+Pa)|0;z=(k|0)!=0;Qa=Oa+320|0;Na=z?Oa+11680|0:Qa;g=Ga;h=g+64|0;do{a[g>>0]=0;g=g+1|0}while((g|0)<(h|0));y=1<>2]|0;Ma=y<>0]|0)){m=a[Oa+272>>0]|0;o=f+204|0;Ba=c[o>>2]|0;if((a[Ba+21>>0]|0)!=0?(d[Ba+1629>>0]|0)>=(i|0):0)q=Fb(f,k)|0;else q=0;do if(!Ea){g=c[o>>2]|0;if((k|0)==1){g=(c[f+3060>>2]|0)+(c[g+28>>2]|0)|0;h=Oa+302|0}else{g=(c[f+3064>>2]|0)+(c[g+32>>2]|0)|0;h=Oa+303|0}g=g+m+(a[h>>0]|0)|0;m=c[La>>2]|0;h=c[m+13192>>2]|0;Ba=0-h|0;g=(g|0)<(Ba|0)?Ba:(g|0)<57?g:57;if((c[m+4>>2]|0)!=1){g=(g|0)<51?g:51;break}if((g|0)>=30)if((g|0)>43){g=g+-6|0;break}else{g=c[96+(g+-30<<2)>>2]|0;break}}else{Ba=c[La>>2]|0;g=m;h=c[Ba+13192>>2]|0;m=Ba}while(0);n=h+g|0;h=(c[m+52>>2]|0)+i|0;g=h+-5|0;h=1<>0]|0)>>0]<>0];if((a[m+634>>0]|0)!=0?!((i|0)>2&(q|0)!=0):0){o=c[o>>2]|0;o=(a[o+68>>0]|0)==0?m+635|0:o+69|0;p=((c[Oa+31244>>2]|0)!=1?3:0)+k|0;m=o+((i+-2|0)*384|0)+(p<<6)|0;if((i|0)>3){Aa=g;wa=q;x=a[o+1536+((i+-4|0)*6|0)+p>>0]|0}else{Aa=g;wa=q;x=16}}else{Aa=g;wa=q;m=0;x=16}}else{Aa=0;h=0;n=0;wa=0;m=0;x=0}za=Oa+31244|0;do if((c[za>>2]|0)==0?(c[(c[La>>2]|0)+13108>>2]|0)!=0:0){if((wa|0)==0?(a[Ca>>0]|0)==0:0){ua=0;va=0;break}g=Gb(f,k)|0;if(g){ua=g;va=Hb(f,k)|0}else{ua=0;va=0}}else{ua=0;va=0}while(0);ta=i<<1;s=ta+-1|0;Ba=i+-2|0;p=Ea?(Ba*3|0)+(i+-1>>2)|0:15;r=Ea?i+1>>2:Ba;if((ta|0)>1){o=p+52|0;g=0;while(1){ta=c[Ja>>2]|0;if(!(Za(ta+224|0,ta+(o+(g>>r))|0)|0)){q=g;break}g=g+1|0;if((g|0)>=(s|0)){q=g;break}}o=p+70|0;g=0;while(1){ta=c[Ja>>2]|0;if(!(Za(ta+224|0,ta+(o+(g>>r))|0)|0)){r=g;break}g=g+1|0;if((g|0)>=(s|0)){r=g;break}}if((q|0)>3){p=(q>>>1)+-1|0;g=$a((c[Ja>>2]|0)+224|0)|0;if((p|0)>1){o=1;do{g=$a((c[Ja>>2]|0)+224|0)|0|g<<1;o=o+1|0}while((o|0)!=(p|0))}q=g+((q&1|2)<3){p=(r>>>1)+-1|0;g=$a((c[Ja>>2]|0)+224|0)|0;if((p|0)>1){o=1;do{g=$a((c[Ja>>2]|0)+224|0)|0|g<<1;o=o+1|0}while((o|0)!=(p|0))}v=g+((r&1|2)<>2;g=v>>2;Fa=50}else{w=q>>2;u=v>>2;switch(j|0){case 0:break;case 1:{sa=824;ta=840;o=d[856+(v<<3)+q>>0]|0;p=816;r=820;s=v;g=w;break a}default:{s=v;t=q;g=w;Fa=50;break a}}o=d[(q&3)+(732+((v&3)<<2))>>0]|0;switch(i|0){case 2:{sa=414;ta=430;p=3892;r=3892;s=v;g=w;break a}case 3:{p=820;r=816;g=748+(u<<1)+w|0;break}case 4:{p=414;r=430;g=732+(u<<2)+w|0;break}default:{p=446;r=510;g=752+(u<<3)+w|0}}sa=414;ta=430;o=(d[g>>0]<<4)+o|0;s=v;g=w}while(0);if((Fa|0)==50){sa=840;ta=824;o=d[856+(t<<3)+s>>0]|0;p=820;r=816;q=t}ra=o+1|0;pa=o>>4;if((pa|0)>-1){qa=(1<0;oa=na?90:88;ma=y+-1>>2;ia=z?27:0;ja=(i|0)==2;ka=(i|0)==3;la=ia+3|0;_=(j|0)==0?9:15;Z=Ea?0:27;$=(wa|0)==0;Y=Ea?42:43;X=Ea?40:41;aa=(ua|0)!=0;ba=(wa|0)!=0;ga=(Ka|16|0)==26|aa;ca=f+204|0;da=((n|0)<0)<<31>>31;ea=((h|0)<0)<<31>>31;ha=(i|0)>2&ba;fa=(i|0)<4;U=x&255;V=(Ea&1)<<1;W=V|1;T=ia+(ka?9:12)|0;v=1;S=pa;t=0;o=16;while(1){y=S<<4;j=a[p+S>>0]|0;E=j&255;B=a[r+S>>0]|0;F=B&255;D=(S|0)!=0;if((S|0)<(pa|0)&D){if((E|0)<(qa|0))w=d[Ga+(E+1<<3)+F>>0]|0;else w=0;if((F|0)<(qa|0))x=(d[F+1+(Ga+(E<<3))>>0]|0)+w|0;else x=w;k=c[Ja>>2]|0;w=1;k=(Za(k+224|0,k+(((x|0)<1?x:1)+oa)|0)|0)&255}else{w=0;k=((B|j)<<24>>24==0|(E|0)==(g|0)&(F|0)==(u|0))&1}a[Ga+(E<<3)+F>>0]=k;x=ra-y|0;if((S|0)==(pa|0)){a[Ha>>0]=x+255;A=x+-2|0;x=1}else{A=15;x=0}if((E|0)<(ma|0))y=(a[Ga+(E+1<<3)+F>>0]|0)!=0&1;else y=0;if((F|0)<(ma|0))y=((a[F+1+(Ga+(E<<3))>>0]|0)!=0&1)<<1|y;do if((A|0)>-1&k<<24>>24!=0){if(!(c[(c[La>>2]|0)+13100>>2]|0))if(ja){k=920;j=ia}else Fa=71;else if($){z=(a[Ca>>0]|0)!=0;if(z|ja){k=z?984:920;j=z?X:ia}else Fa=71}else{k=984;j=X}do if((Fa|0)==71){Fa=0;k=920+((y<<4)+16)|0;if(Ea){y=(B|j)<<24>>24==0?ia:la;if(ka){j=y+_|0;break}else{j=y+21|0;break}}else j=T}while(0);if((A|0)>0){z=j+92|0;y=A;while(1){Q=c[Ja>>2]|0;if(Za(Q+224|0,Q+(z+(d[k+((d[ta+y>>0]<<2)+(d[sa+y>>0]|0))>>0]|0))|0)|0){a[Ha+(x&255)>>0]=y;x=x+1<<24>>24;w=0}if((y|0)>1)y=y+-1|0;else break}}if(!w){if(c[(c[La>>2]|0)+13100>>2]|0)if($?(a[Ca>>0]|0)==0:0)Fa=84;else w=Y;else Fa=84;if((Fa|0)==84){Fa=0;w=(S|0)==0?Z:j+2|0}Q=c[Ja>>2]|0;if((Za(Q+224|0,Q+(w+92)|0)|0)!=1)break}a[Ha+(x&255)>>0]=0;x=x+1<<24>>24}while(0);Q=x&255;if(x<<24>>24){w=Ea&D?2:0;if(!(c[(c[La>>2]|0)+13116>>2]|0))D=0;else{if($?(a[Ca>>0]|0)==0:0)t=V;else t=W;D=(d[Oa+199+t>>0]|0)>>>2&255}A=(S|0)!=(pa|0)&(v|0)==0&1|w;B=a[Ha>>0]|0;j=B&255;k=Q>>>0<8?Q:8;if((k|0)>0){z=A<<2;w=-1;y=0;v=1;do{P=v+z|0;O=c[Ja>>2]|0;P=(Za(O+224|0,O+((na?P+16|0:P)+136)|0)|0)&255;a[Ia+y>>0]=P;if(!(P<<24>>24))v=((v+-1|0)>>>0<2&1)+v|0;else{w=(w|0)==-1?y:w;v=0}y=y+1|0}while((y|0)<(k|0));P=w}else{P=-1;v=1}y=Q+-1|0;O=a[Ha+y>>0]|0;w=O&255;b:do if(!(a[Ca>>0]|0)){do if((c[za>>2]|0)==1){if(!(ba&(c[(c[La>>2]|0)+13104>>2]|0)!=0)){Fa=103;break}if(ga){w=0;break b}}else Fa=103;while(0);if((Fa|0)==103?(Fa=0,aa):0){w=0;break}w=(j-w|0)>3&1}else w=0;while(0);if((P|0)!=-1){M=c[Ja>>2]|0;M=Za(M+224|0,M+((na?A|4:A)|160)|0)|0;N=Ia+P|0;a[N>>0]=(d[N>>0]|0)+M}N=(w|0)!=0;k=N&(a[(c[ca>>2]|0)+4>>0]|0)!=0;M=k?y&255:x;k=k?17:16;y=M&255;if(!(M<<24>>24))w=0;else{x=0;w=0;do{w=$a((c[Ja>>2]|0)+224|0)|0|w<<1;x=x+1|0}while((x|0)!=(y|0))}M=E<<2;K=F<<2;L=Oa+199+t|0;F=0;E=0;G=w<>0]|0)+M|0;I=(d[ta+I>>0]|0)+K|0;do if((J|0)<8){B=(d[Ia+J>>0]|0)+1|0;A=(J|0)==(P|0);if((B|0)==((A?3:2)|0)&0==((A?0:0)|0))w=0;else{A=E;z=j;w=B;x=0;break}while(1){if(!($a((c[Ja>>2]|0)+224|0)|0)){Fa=114;break}w=w+1|0;if((w|0)>=31){Fa=117;break}}do if((Fa|0)==114){Fa=0;if((w|0)>=3){Fa=117;break}if((j|0)>0){y=0;x=0}else{x=0;break}do{x=$a((c[Ja>>2]|0)+224|0)|0|x<<1;y=y+1|0}while((y|0)!=(j|0))}while(0);if((Fa|0)==117){Fa=0;k=w+-3|0;y=k+j|0;if((y|0)>0){w=0;x=0;do{w=$a((c[Ja>>2]|0)+224|0)|0|w<<1;x=x+1|0}while((x|0)!=(y|0))}else w=0;x=w;w=(1<>31|0,B|0,0)|0;x=C;B=3<>31;y=c[(c[La>>2]|0)+13116>>2]|0;if((x|0)>(z|0)|(x|0)==(z|0)&w>>>0>B>>>0){z=j+1|0;z=(y|0)==0?((z|0)<4?z:4):z}else z=j;if((E|0)!=0|(y|0)==0){A=E;break}k=a[L>>0]|0;y=(k&255)>>>2&255;if((A|0)<(3<>24==0|(A<<1|0)>=(1<>0]=y+k<<24>>24;A=1}else{w=0;while(1){if(!($a((c[Ja>>2]|0)+224|0)|0)){Fa=128;break}w=w+1|0;if((w|0)>=31){Fa=131;break}}do if((Fa|0)==128){Fa=0;if((w|0)>=3){Fa=131;break}if((j|0)>0){y=0;x=0}else{x=0;break}do{x=$a((c[Ja>>2]|0)+224|0)|0|x<<1;y=y+1|0}while((y|0)!=(j|0))}while(0);if((Fa|0)==131){Fa=0;k=w+-3|0;y=k+j|0;if((y|0)>0){w=0;x=0;do{w=$a((c[Ja>>2]|0)+224|0)|0|w<<1;x=x+1|0}while((x|0)!=(y|0))}else w=0;x=w;w=(1<>31;y=c[(c[La>>2]|0)+13116>>2]|0;if((z|0)>=(3<>0]|0;y=(k&255)>>>2&255;if((z|0)<(3<>24==0|(z<<1|0)>=(1<>0]=y+k<<24>>24;A=1;z=j}while(0);if(N&(a[(c[ca>>2]|0)+4>>0]|0)!=0){j=$g(w|0,x|0,F|0,0)|0;F=(j&1|0)==0?1:D<<24>>24!=O<<24>>24;E=Zg(0,0,w|0,x|0)|0;w=F?w:E;x=F?x:C}else j=F;k=(G&32768|0)==0;y=Zg(0,0,w|0,x|0)|0;y=k?w:y;x=k?x:C;k=G<<1&131070;w=y&65535;do if(!(a[Ca>>0]|0)){do if(!((a[(c[La>>2]|0)+634>>0]|0)==0|ha)){if(!(fa|(I|H|0)!=0)){o=U;break}switch(i|0){case 3:{o=(I<<3)+H|0;break}case 4:{o=(I>>>1<<3)+(H>>>1)|0;break}case 5:{o=(I>>>2<<3)+(H>>>2)|0;break}default:o=(I<<2)+H|0}o=d[m+o>>0]|0}while(0);w=eh(y|0,x|0,n|0,da|0)|0;w=eh(w|0,C|0,o|0,((o|0)<0)<<31>>31|0)|0;w=$g(w|0,C|0,h|0,ea|0)|0;w=Yg(w|0,C|0,Aa|0)|0;x=C;if((x|0)<0){w=(w&-32768|0)==-32768&(x&268435455|0)==268435455?w&65535:-32768;break}else{G=x>>>0<0|(x|0)==0&w>>>0<32767;w=G?w:32767;w=w&65535;break}}while(0);b[Na+((I<>1]=w;w=J+1|0;if((w|0)==(Q|0))break;F=j;E=A;G=k;j=z;J=w;D=a[Ha+w>>0]|0}}if((S|0)>0)S=S+-1|0;else break}}do if(!(a[Ca>>0]|0)){g=(i|0)==2;if(wa|0){if(g&(c[(c[La>>2]|0)+13096>>2]|0)!=0?(c[za>>2]|0)==1:0){g=0;do{Ha=Na+(15-g<<1)|0;Ia=b[Ha>>1]|0;Ja=Na+(g<<1)|0;b[Ha>>1]=b[Ja>>1]|0;b[Ja>>1]=Ia;g=g+1|0}while((g|0)!=8)}h=i&65535;ya[c[f+5872>>2]&15](Na,h);g=(ua|0)!=0;if(!g){if(!(c[(c[La>>2]|0)+13104>>2]|0))break;if(!((Ka|16|0)==26&(c[za>>2]|0)==1))break}Da[c[f+5876>>2]&7](Na,h,g?va:(Ka|0)==26&1);break}if(g&(Ea&(c[za>>2]|0)==1)){xa[c[f+5880>>2]&7](Na);break}h=(q|0)>(s|0)?q:s;if(!h){xa[c[f+5900+(Ba<<2)>>2]&7](Na);break}g=s+4+q|0;do if((h|0)>=4)if((h|0)<8){g=(g|0)<8?g:8;break}else{g=(h|0)<12?((g|0)<24?g:24):g;break}else g=(g|0)<4?g:4;while(0);ya[c[f+5884+(Ba<<2)>>2]&15](Na,g)}else{g=(c[(c[La>>2]|0)+13104>>2]|0)!=0;if((ua|0)==0?!((Ka|16|0)==26&g):0)break;Da[c[f+5876>>2]&7](Na,i&65535,g?(Ka|0)==26&1:va)}while(0);if(a[Oa+304>>0]|0?(Ma|0)>0:0){h=c[Oa+284>>2]|0;g=0;do{Oa=Na+(g<<1)|0;b[Oa>>1]=((R(b[Qa+(g<<1)>>1]|0,h)|0)>>>3)+(e[Oa>>1]|0);g=g+1|0}while((g|0)!=(Ma|0))}Da[c[f+5856+(Ba<<2)>>2]&7](Pa,Na,Ra);l=Sa;return}function Fb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Za(a+224|0,a+(b|0?47:46)|0)|0}function Gb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Za(a+224|0,a+(b|0?49:48)|0)|0}function Hb(a,b){a=a|0;b=b|0;a=c[a+136>>2]|0;return Za(a+224|0,a+(b|0?51:50)|0)|0}function Ib(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;i=a+136|0;j=c[i>>2]|0;a=Za(j+224|0,j+31|0)|0;d=c[i>>2]|0;d=Za(d+224|0,d+31|0)|0;if(!a)a=0;else{h=c[i>>2]|0;a=(Za(h+224|0,h+34|0)|0)+a|0}if(!d)h=0;else{h=c[i>>2]|0;h=(Za(h+224|0,h+34|0)|0)+d|0}switch(a|0){case 2:{a=2;d=1;do{if(!($a((c[i>>2]|0)+224|0)|0))break;a=(1<>2]|0)+224|0;do{d=d+-1|0;a=(($a(e)|0)<>2]|0;e=f+224|0}while((d|0)!=0);d=c[e>>2]<<1;c[e>>2]=d;if(!(d&65534)){Ob(e);d=c[e>>2]|0}k=c[f+228>>2]<<17;f=d-k|0;g=f>>31;c[e>>2]=(g&k)+f;a=(g^0-a)-g&65535;g=16;break}case 1:{d=c[i>>2]|0;e=d+224|0;a=c[e>>2]<<1;c[e>>2]=a;if(!(a&65534)){Ob(e);a=c[e>>2]|0}k=c[d+228>>2]<<17;g=a-k|0;a=g>>31;c[e>>2]=(a&k)+g;a=(a^65535)-a&65535;g=16;break}case 0:{a=0;g=16;break}default:{}}if((g|0)==16)b[j+31272>>1]=a;switch(h|0){case 2:{a=2;d=1;do{if(!($a((c[i>>2]|0)+224|0)|0))break;a=(1<>2]|0)+224|0;do{d=d+-1|0;a=(($a(e)|0)<>2]|0;e=f+224|0}while((d|0)!=0);d=c[e>>2]<<1;c[e>>2]=d;if(!(d&65534)){Ob(e);d=c[e>>2]|0}i=c[f+228>>2]<<17;k=d-i|0;g=k>>31;c[e>>2]=(g&i)+k;a=(g^0-a)-g&65535;g=28;break}case 1:{d=c[i>>2]|0;e=d+224|0;a=c[e>>2]<<1;c[e>>2]=a;if(!(a&65534)){Ob(e);a=c[e>>2]|0}k=c[d+228>>2]<<17;g=a-k|0;a=g>>31;c[e>>2]=(a&k)+g;a=(a^65535)-a&65535;g=28;break}case 0:{a=0;g=28;break}default:{}}if((g|0)==28)b[j+31274>>1]=a;return}function Jb(a){a=a|0;var b=0;b=0-(Kb(a)|0)&7;if(b|0)Ve(a,b);return}function Kb(a){a=a|0;return c[a+8>>2]|0}function Lb(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(Kb(a)|0)|0}function Mb(a){a=a|0;var b=0,d=0;b=c[a+16>>2]|0;d=c[a>>2]|0;b=(d&1|0)==0?b:b+-1|0;b=(d&511|0)==0?b:b+-1|0;d=(c[a+20>>2]|0)-b|0;if((d|0)>=0)Qe(a,b,d);return}function Nb(a){a=a|0;var b=0,d=0,e=0;d=a+4|0;e=c[d>>2]|0;b=(e+-256|0)>>>31;c[d>>2]=e<>2]<>2]=b;if(!(b&65535))Ob(a);return}function Ob(a){a=a|0;var b=0,e=0;b=a+16|0;e=c[b>>2]|0;c[a>>2]=(c[a>>2]|0)+-65535+((d[e+1>>0]|0)<<1|(d[e>>0]|0)<<9);if(e>>>0<(c[a+20>>2]|0)>>>0)c[b>>2]=e+2;return}function Pb(a){a=a|0;var b=0,e=0,f=0;f=c[a>>2]|0;e=a+16|0;b=c[e>>2]|0;c[a>>2]=(((d[b+1>>0]|0)<<1|(d[b>>0]|0)<<9)+-65535<<7-(d[4917+((f+-1^f)>>15)>>0]|0))+f;if(b>>>0<(c[a+20>>2]|0)>>>0)c[e>>2]=b+2;return}function Qb(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0;d=Rb(b,d,e)|0;f=c[b+136>>2]|0;e=c[f+280>>2]|0;if(e){g=c[(c[b+200>>2]|0)+13192>>2]|0;b=d+52+e+(g<<1)|0;d=b+((b|0)>0?0:-52-g+1|0)|0;d=((d|0)%(g+52|0)|0)-g+b-d|0}a[f+272>>0]=d;return}function Rb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=c[b+136>>2]|0;m=c[b+200>>2]|0;j=c[m+13080>>2]|0;i=(1<>2]|0)+24>>2]|0);h=j&d;j=j&e;k=c[m+13140>>2]|0;m=c[m+13064>>2]|0;l=h>>m;m=j>>m;f=g+203|0;if((a[f>>0]|0)!=0|(h|j|0)==0){a[f>>0]=(a[g+300>>0]|0)==0&1;f=a[b+3100>>0]|0}else f=c[g+276>>2]|0;if((i&d|0)!=0&(h&i|0)!=0){g=l+-1+(R(m,k)|0)|0;g=a[(c[b+7568>>2]|0)+g>>0]|0}else g=f;if((i&e|0)!=0&(j&i|0)!=0){f=(R(m+-1|0,k)|0)+l|0;f=a[(c[b+7568>>2]|0)+f>>0]|0}return g+1+f>>1|0}function Sb(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;w=c[b+136>>2]|0;x=b+200|0;j=c[x>>2]|0;F=c[j+13084>>2]|0;y=c[j+13072>>2]|0;D=c[j+13156>>2]|0;z=c[j+13148>>2]|0;A=b+3508|0;k=c[A>>2]|0;E=c[k+16>>2]|0;v=R(D,e>>F)|0;B=d>>F;C=(a[E+((v+B|0)*12|0)+10>>0]|0)==0;i=(e|0)>0&(e&7|0)==0;do if(i){if(((a[b+3050>>0]|0)==0?c[w+31312>>2]&4|0:0)?((e|0)%(1<>2]|0)|0|0)==0:0)break;if((a[(c[b+204>>2]|0)+53>>0]|0)==0?(h=c[w+31312>>2]|0,(h&8|0)!=0):0){if(!((e|0)%(1<>2]|0)|0))break}else{if(!i)break;h=c[w+31312>>2]|0}i=e+-1|0;if(!(h&4))u=c[k+20>>2]|0;else u=Wc(b,k,d,i)|0;r=1<>F)|0;t=b+7596|0;m=R(z,i>>y)|0;n=R(z,e>>y)|0;o=b+7572|0;p=b+5840|0;l=0;do{q=l+d|0;H=q>>F;k=q>>y;G=H+s|0;h=E+(G*12|0)|0;H=H+v|0;i=E+(H*12|0)|0;I=c[t>>2]|0;j=a[I+(k+m)>>0]|0;k=a[I+(k+n)>>0]|0;if((a[E+(H*12|0)+10>>0]|0)!=0?(a[E+(G*12|0)+10>>0]|0)!=0:0)if(!((k|j)<<24>>24))h=Tb(b,i,h,u)|0;else h=1;else h=2;a[(c[o>>2]|0)+((R(c[p>>2]|0,e)|0)+q>>2)>>0]=h;l=l+4|0}while((l|0)<(r|0))}}while(0);h=(d|0)>0&(d&7|0)==0;do if(h){if(((a[b+3050>>0]|0)==0?c[w+31312>>2]&1|0:0)?((d|0)%(1<>2]|0)+13080>>2]|0)|0|0)==0:0)break;if((a[(c[b+204>>2]|0)+53>>0]|0)==0?(g=c[w+31312>>2]|0,(g&2|0)!=0):0){if(!((d|0)%(1<>2]|0)+13080>>2]|0)|0))break}else{if(!h)break;g=c[w+31312>>2]|0}i=d+-1|0;h=c[A>>2]|0;if(!(g&1))t=c[h+20>>2]|0;else t=Wc(b,h,i,e)|0;s=i>>F;l=i>>y;m=d>>y;n=1<>F,D)|0;I=H+s|0;g=E+(I*12|0)|0;H=H+B|0;h=E+(H*12|0)|0;G=c[o>>2]|0;j=R(r>>y,z)|0;i=a[G+(j+l)>>0]|0;j=a[G+(j+m)>>0]|0;if((a[E+(H*12|0)+10>>0]|0)!=0?(a[E+(I*12|0)+10>>0]|0)!=0:0)if(!((j|i)<<24>>24))g=Tb(b,h,g,t)|0;else g=1;else g=2;a[(c[p>>2]|0)+((R(c[q>>2]|0,r)|0)+d>>2)>>0]=g;k=k+4|0}while((k|0)<(n|0))}}while(0);if(!((F|0)>=(f|0)|C)){n=c[(c[A>>2]|0)+20>>2]|0;o=1<8;if(p){i=b+7572|0;j=b+5840|0;g=8;do{k=g+e|0;l=R(k+-1>>F,D)|0;m=R(k>>F,D)|0;h=0;do{I=h+d|0;H=I>>F;H=(Tb(b,E+((H+m|0)*12|0)|0,E+((H+l|0)*12|0)|0,n)|0)&255;a[(c[i>>2]|0)+((R(c[j>>2]|0,k)|0)+I>>2)>>0]=H;h=h+4|0}while((h|0)<(o|0));g=g+8|0}while((g|0)<(o|0))}if((f|0)!=31){i=b+7576|0;j=b+5840|0;g=0;do{k=g+e|0;if(p){l=R(k>>F,D)|0;h=8;do{I=h+d|0;H=(Tb(b,E+(((I>>F)+l|0)*12|0)|0,E+(((I+-1>>F)+l|0)*12|0)|0,n)|0)&255;a[(c[i>>2]|0)+((R(c[j>>2]|0,k)|0)+I>>2)>>0]=H;h=h+8|0}while((h|0)<(o|0))}g=g+4|0}while((g|0)<(o|0))}}return}function Tb(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=a[e+10>>0]|0;m=a[f+10>>0]|0;n=m<<24>>24==3;a:do if(l<<24>>24==3)if(n){d=c[(c[d+3508>>2]|0)+20>>2]|0;j=c[d+64+(a[e+8>>0]<<2)>>2]|0;k=c[g+64+(a[f+8>>0]<<2)>>2]|0;do if((j|0)==(k|0)){i=c[d+260+(a[e+9>>0]<<2)>>2]|0;h=c[g+260+(a[f+9>>0]<<2)>>2]|0;if(!((j|0)==(i|0)&(j|0)==(h|0))){if((h|0)!=(i|0))break;g=(b[f>>1]|0)-(b[e>>1]|0)|0;if((((g|0)>-1?g:0-g|0)|0)>3){h=1;break a}g=(b[f+2>>1]|0)-(b[e+2>>1]|0)|0;if((((g|0)>-1?g:0-g|0)|0)>3){h=1;break a}g=(b[f+4>>1]|0)-(b[e+4>>1]|0)|0;if((((g|0)>-1?g:0-g|0)|0)>3){h=1;break a}f=(b[f+6>>1]|0)-(b[e+6>>1]|0)|0;return (((f|0)>-1?f:0-f|0)|0)>3|0}h=b[f>>1]|0;i=b[e>>1]|0;g=h-i|0;if(!((((((g|0)>-1?g:0-g|0)|0)<=3?(g=(b[f+2>>1]|0)-(b[e+2>>1]|0)|0,(((g|0)>-1?g:0-g|0)|0)<=3):0)?(g=(b[f+4>>1]|0)-(b[e+4>>1]|0)|0,(((g|0)>-1?g:0-g|0)|0)<=3):0)?(g=(b[f+6>>1]|0)-(b[e+6>>1]|0)|0,(((g|0)>-1?g:0-g|0)|0)<=3):0)){g=(b[f+4>>1]|0)-i|0;if((((g|0)>-1?g:0-g|0)|0)>3){h=1;break a}g=(b[f+6>>1]|0)-(b[e+2>>1]|0)|0;if((((g|0)>-1?g:0-g|0)|0)>3){h=1;break a}g=h-(b[e+4>>1]|0)|0;if((((g|0)>-1?g:0-g|0)|0)>3){h=1;break a}f=(b[f+2>>1]|0)-(b[e+6>>1]|0)|0;if((((f|0)>-1?f:0-f|0)|0)>3){h=1;break a}}h=0;break a}else h=c[g+260+(a[f+9>>0]<<2)>>2]|0;while(0);if(((((h|0)==(j|0)?(k|0)==(c[d+260+(a[e+9>>0]<<2)>>2]|0):0)?(g=(b[f+4>>1]|0)-(b[e>>1]|0)|0,(((g|0)>-1?g:0-g|0)|0)<=3):0)?(g=(b[f+6>>1]|0)-(b[e+2>>1]|0)|0,(((g|0)>-1?g:0-g|0)|0)<=3):0)?(g=(b[f>>1]|0)-(b[e+4>>1]|0)|0,(((g|0)>-1?g:0-g|0)|0)<=3):0){h=(b[f+2>>1]|0)-(b[e+6>>1]|0)|0;h=(((h|0)>-1?h:0-h|0)|0)>3}else h=1}else h=1;else if((!n?(j=(l&1^1)&255,i=b[e+(j<<2)+2>>1]|0,k=(m&1^1)&255,h=b[f+(k<<2)+2>>1]|0,(c[(c[(c[d+3508>>2]|0)+20>>2]|0)+(j*196|0)+64+(a[e+8+j>>0]<<2)>>2]|0)==(c[g+(k*196|0)+64+(a[f+8+k>>0]<<2)>>2]|0)):0)?(f=(b[e+(j<<2)>>1]|0)-(b[f+(k<<2)>>1]|0)|0,(((f|0)>-1?f:0-f|0)|0)<=3):0){h=(i<<16>>16)-(h<<16>>16)|0;h=(((h|0)>-1?h:0-h|0)|0)>3}else h=1;while(0);return h&1|0}function Ub(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;g=b+200|0;j=((c[(c[g>>2]|0)+13120>>2]|0)-f|0)<=(d|0);Vb(b,d,e);g=c[g>>2]|0;if(!(a[g+12941>>0]|0)){}else{g=((c[g+13124>>2]|0)-f|0)<=(e|0);h=(e|0)!=0;i=(d|0)!=0;if(i&h)Wb(b,d-f|0,e-f|0);if(i&g)Wb(b,d-f|0,e);h&j?(Wb(b,d,e-f|0),a[b+140>>0]&1):0;j&g?(Wb(b,d,e),a[b+140>>0]&1):0}return}function Vb(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;_=l;l=l+32|0;U=_+8|0;N=_;X=_+18|0;Y=_+16|0;b[X>>1]=0;b[Y>>1]=0;Z=e+200|0;k=c[Z>>2]|0;h=c[k+13080>>2]|0;j=1<>h,c[k+13128>>2]|0)|0)+(f>>h)|0;i=c[e+3496>>2]|0;T=c[i+(h<<3)+4>>2]|0;M=c[i+(h<<3)>>2]|0;if((c[k+68>>2]|0)!=0?(a[k+13056>>0]|0)!=0:0)W=1;else W=(a[(c[e+204>>2]|0)+40>>0]|0)!=0;V=(f|0)!=0;if(V){L=h+-1|0;O=c[i+(L<<3)+4>>2]|0;L=c[i+(L<<3)>>2]|0}else{O=0;L=0}K=j+f|0;Q=c[k+13120>>2]|0;S=(K|0)>(Q|0)?Q:K;P=j+g|0;J=c[k+13124>>2]|0;P=(P|0)>(J|0)?J:P;K=(Q|0)<=(K|0)?S:S+-8|0;Q=(P|0)>(g|0);if(Q){w=V?f:8;x=(w|0)<(S|0);y=V?f+-8|0:0;z=e+7572|0;A=e+5840|0;B=N+4|0;C=e+160|0;D=X+1|0;E=Y+1|0;F=e+7544|0;G=e+7528|0;H=e+7576|0;I=e+7548|0;J=e+7532|0;v=(y|0)>=(K|0);u=g;i=T;h=M;do{if(x){q=u+4|0;r=i+-2&-2;p=w;do{m=c[H>>2]|0;t=c[A>>2]|0;j=a[m+((R(t,u)|0)+p>>2)>>0]|0;k=j&255;t=a[m+((R(t,q)|0)+p>>2)>>0]|0;m=t&255;n=t<<24>>24==0;do if((t|j)<<24>>24){s=p+-1|0;o=ac(e,s,u)|0;o=o+1+(ac(e,p,u)|0)>>1;t=o+h|0;t=d[1597+((t|0)<0?0:(t|0)<51?t:51)>>0]|0;if(!(j<<24>>24))j=0;else{j=r+(k<<1)+o|0;j=d[1649+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[N>>2]=j;if(n)j=0;else{j=r+(m<<1)+o|0;j=d[1649+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[B>>2]=j;o=c[C>>2]|0;j=c[o+32>>2]|0;k=R(j,u)|0;k=(c[o>>2]|0)+((p<>2]|0)+56>>2])+k)|0;if(W){a[X>>0]=bc(e,s,u)|0;a[D>>0]=bc(e,s,q)|0;a[Y>>0]=bc(e,p,u)|0;a[E>>0]=bc(e,p,q)|0;Ga[c[I>>2]&3](k,j,t,N,X,Y);break}else{Ga[c[J>>2]&3](k,j,t,N,X,Y);break}}while(0);p=p+8|0}while((p|0)<(S|0))}if(!((u|0)==0|v)){s=u+-1|0;r=y;do{n=c[z>>2]|0;t=R(c[A>>2]|0,u)|0;j=a[n+(t+r>>2)>>0]|0;m=j&255;q=r+4|0;t=a[n+(t+q>>2)>>0]|0;n=t&255;o=t<<24>>24==0;do if((t|j)<<24>>24){k=ac(e,r,s)|0;k=k+1+(ac(e,r,u)|0)>>1;h=(r|0)>=(f|0);i=h?T:O;h=h?M:L;p=k+h|0;p=d[1597+((p|0)<0?0:(p|0)<51?p:51)>>0]|0;if(!(j<<24>>24))j=0;else{j=(i+-2&-2)+(m<<1)+k|0;j=d[1649+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[N>>2]=j;if(o)j=0;else{j=(i+-2&-2)+(n<<1)+k|0;j=d[1649+((j|0)<0?0:(j|0)<53?j:53)>>0]|0}c[B>>2]=j;t=c[C>>2]|0;j=c[t+32>>2]|0;k=R(j,u)|0;k=(c[t>>2]|0)+((r<>2]|0)+56>>2])+k)|0;if(W){a[X>>0]=bc(e,r,s)|0;a[D>>0]=bc(e,q,s)|0;a[Y>>0]=bc(e,r,u)|0;a[E>>0]=bc(e,q,u)|0;Ga[c[F>>2]&3](k,j,p,N,X,Y);break}else{Ga[c[G>>2]&3](k,j,p,N,X,Y);break}}while(0);r=r+8|0}while((r|0)<(K|0))}u=u+8|0}while((u|0)<(P|0));k=c[Z>>2]|0}else i=T;a:do if(c[k+4>>2]|0){z=V?O:T;A=e+7572|0;B=e+5840|0;C=U+4|0;D=e+160|0;E=X+1|0;F=Y+1|0;G=e+7552|0;H=e+7536|0;I=e+7576|0;J=e+7556|0;K=e+7540|0;h=1;while(1){j=1<>2];k=1<>2];if(Q){u=j<<3;v=V?f:u;w=(v|0)<(S|0);x=k<<3;y=V?f-u|0:0;t=j<<2;s=k<<2;r=g;do{if(w){o=r+s|0;n=v;do{O=c[I>>2]|0;k=c[B>>2]|0;j=a[O+((R(k,r)|0)+n>>2)>>0]|0;j=j<<24>>24==2;k=(a[O+((R(k,o)|0)+n>>2)>>0]|0)==2;do if(j|k){p=n+-1|0;m=ac(e,p,o)|0;m=m+1+(ac(e,n,o)|0)>>1;if(j){j=ac(e,p,r)|0;j=cc(e,j+1+(ac(e,n,r)|0)>>1,h,i)|0}else j=0;c[U>>2]=j;if(k)j=cc(e,m,h,i)|0;else j=0;c[C>>2]=j;N=c[D>>2]|0;O=c[Z>>2]|0;j=c[N+32+(h<<2)>>2]|0;k=R(r>>c[O+13180+(h<<2)>>2],j)|0;k=(c[N+(h<<2)>>2]|0)+((n>>c[O+13168+(h<<2)>>2]<>2])+k)|0;if(W){a[X>>0]=bc(e,p,r)|0;a[E>>0]=bc(e,p,o)|0;a[Y>>0]=bc(e,n,r)|0;a[F>>0]=bc(e,n,o)|0;wa[c[J>>2]&3](k,j,U,X,Y);break}else{wa[c[K>>2]&3](k,j,U,X,Y);break}}while(0);n=n+u|0}while((n|0)<(S|0))}if(r){n=S-((S|0)==(c[(c[Z>>2]|0)+13120>>2]|0)?0:u)|0;if((y|0)<(n|0)){p=r+-1|0;o=y;do{O=c[A>>2]|0;k=R(c[B>>2]|0,r)|0;q=o+t|0;i=(a[O+(k+o>>2)>>0]|0)==2;k=(a[O+(k+q>>2)>>0]|0)==2;do if(i|k){if(i){j=ac(e,o,p)|0;j=j+1+(ac(e,o,r)|0)>>1}else j=0;if(k){m=ac(e,q,p)|0;m=m+1+(ac(e,q,r)|0)>>1}else m=0;if(i)i=cc(e,j,h,z)|0;else i=0;c[U>>2]=i;if(k)i=cc(e,m,h,T)|0;else i=0;c[C>>2]=i;N=c[D>>2]|0;O=c[Z>>2]|0;i=c[N+32+(h<<2)>>2]|0;j=R(r>>c[O+13184>>2],i)|0;j=(c[N+(h<<2)>>2]|0)+((o>>c[O+13172>>2]<>2])+j)|0;if(W){a[X>>0]=bc(e,o,p)|0;a[E>>0]=bc(e,q,p)|0;a[Y>>0]=bc(e,o,r)|0;a[F>>0]=bc(e,q,r)|0;wa[c[G>>2]&3](j,i,U,X,Y);break}else{wa[c[H>>2]&3](j,i,U,X,Y);break}}while(0);o=o+u|0}while((o|0)<(n|0));i=z}else i=z}r=r+x|0}while((r|0)<(P|0))}h=h+1|0;if((h|0)==3)break a;k=c[Z>>2]|0}}while(0);l=_;return}function Wb(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0;ga=l;l=l+48|0;Z=ga+16|0;_=ga+34|0;ba=ga+32|0;da=ga+8|0;ea=ga;fa=d+200|0;x=c[fa>>2]|0;y=c[x+13080>>2]|0;T=e>>y;U=f>>y;s=c[x+13128>>2]|0;i=R(U,s)|0;V=i+T|0;k=c[d+204>>2]|0;m=c[k+1668>>2]|0;n=c[m+(V<<2)>>2]|0;W=d+3492|0;X=c[W>>2]|0;Y=X+(V*148|0)|0;b[_>>1]=0;b[ba>>1]=0;c[da>>2]=0;if(!(a[k+42>>0]|0))o=0;else o=(a[k+53>>0]|0)==0;t=(a[(c[d+7604>>2]|0)+V>>0]|0)==0;w=t|o;u=(T|0)==0;c[Z>>2]=u&1;q=(U|0)==0;$=Z+4|0;c[$>>2]=q&1;r=(T|0)==(s+-1|0);aa=Z+8|0;c[aa>>2]=r&1;v=(U|0)==((c[x+13132>>2]|0)+-1|0);ca=Z+12|0;c[ca>>2]=v&1;if(w){if(u)p=0;else{if(o){g=c[k+1676>>2]|0;g=(c[g+(n<<2)>>2]|0)!=(c[g+(c[m+(V+-1<<2)>>2]<<2)>>2]|0)}else g=0;h=g&1;if(t?(Q=c[d+7580>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+(T+-1+i<<2)>>2]|0)):0)g=1;a[_>>0]=g&1;p=h}if(r)j=0;else{if(o){g=c[k+1676>>2]|0;g=(c[g+(n<<2)>>2]|0)!=(c[g+(c[m+(V+1<<2)>>2]<<2)>>2]|0)}else g=0;h=g&1;if(t?(Q=c[d+7580>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+(T+1+i<<2)>>2]|0)):0)g=1;a[_+1>>0]=g&1;j=h}if(q)h=0;else{if(o){g=c[k+1676>>2]|0;g=(c[g+(n<<2)>>2]|0)!=(c[g+(c[m+(V-s<<2)>>2]<<2)>>2]|0)}else g=0;h=g&1;if(t?(Q=c[d+7580>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+((R(s,U+-1|0)|0)+T<<2)>>2]|0)):0)g=1;a[ba>>0]=g&1}if(v)g=0;else{if(o){i=c[k+1676>>2]|0;i=(c[i+(n<<2)>>2]|0)!=(c[i+(c[m+(s+V<<2)>>2]<<2)>>2]|0)}else i=0;g=i&1;if(t?(Q=c[d+7580>>2]|0,(c[Q+(V<<2)>>2]|0)!=(c[Q+((R(s,U+1|0)|0)+T<<2)>>2]|0)):0)i=1;a[ba+1>>0]=i&1}if(!(q|u)){if(t){Q=c[d+7580>>2]|0;if(p<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+-1+(R(s,U+-1|0)|0)<<2)>>2]|0):0)S=36;else i=1}else if(!(p<<24>>24))S=36;else i=1;if((S|0)==36)i=h;a[da>>0]=i}if(!(r|q)){if(t){Q=c[d+7580>>2]|0;if(j<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+1+(R(s,U+-1|0)|0)<<2)>>2]|0):0)S=42;else h=1}else if(!(j<<24>>24))S=42;else h=1;a[da+1>>0]=h}if(!(v|r)){if(t){Q=c[d+7580>>2]|0;if(j<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+1+(R(s,U+1|0)|0)<<2)>>2]|0):0)S=48;else h=1}else if(!(j<<24>>24))S=48;else h=1;if((S|0)==48)h=g;a[da+2>>0]=h}if(!(v|u)){if(t){Q=c[d+7580>>2]|0;if(p<<24>>24==0?(c[Q+(V<<2)>>2]|0)==(c[Q+(T+-1+(R(s,U+1|0)|0)<<2)>>2]|0):0)S=54;else g=1}else if(!(p<<24>>24))S=54;else g=1;a[da+3>>0]=g}}D=c[x+4>>2]|0?3:1;E=d+160|0;F=d+168|0;G=d+5916|0;M=U<<1;H=M+-1|0;I=ea+4|0;J=U+-1|0;K=T+1|0;L=T+-1|0;M=M+2|0;N=ea+4|0;O=U+1|0;Q=T<<1;P=Q+-1|0;Q=Q+2|0;C=d+5920+((w&1)<<2)|0;g=0;i=x;h=y;while(1){n=c[i+13168+(g<<2)>>2]|0;z=e>>n;q=c[i+13180+(g<<2)>>2]|0;A=f>>q;r=c[E>>2]|0;B=c[r+32+(g<<2)>>2]|0;w=1<>n;t=w>>q;n=c[i+13120>>2]>>n;v=n-z|0;s=(s|0)>(v|0)?v:s;q=c[i+13124>>2]>>q;v=q-A|0;t=(t|0)>(v|0)?v:t;v=R(B,A)|0;u=c[i+56>>2]|0;v=(c[r+(g<<2)>>2]|0)+((z<>2]|0)+w+r|0;y=X+(V*148|0)+142+g|0;switch(a[y>>0]|0){case 1:{Xb(x,v,s<>2]&1](v,x,B,w,Y,Z,s,t,g);Zb(d,v,x,B,w,e,f,s,t,g);S=78;break}case 2:{o=c[Z>>2]|0;p=c[aa>>2]|0;k=c[ca>>2]|0;if(!(c[$>>2]|0)){S=1-o|0;j=0-(S<>2]=v+(0-B)+j;c[I>>2]=(c[d+172+(g<<2)>>2]|0)+((R(n,H)|0)+z-S<>2]|0)+((L+(R(c[i+13128>>2]|0,J)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0,u);j=r;h=c[fa>>2]|0}i=s<>2]|0)+(((R(c[h+13128>>2]|0,J)|0)+T|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+j|0,i|0)|0;if((p|0)!=1){S=j+i|0;_b(m+S|0,(c[ea+(((a[(c[W>>2]|0)+((K+(R(c[(c[fa>>2]|0)+13128>>2]|0,J)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+S|0,u)}}if(!k){S=1-o|0;m=0-(S<>2]=v+(R(t,B)|0)+m;c[N>>2]=(c[d+172+(g<<2)>>2]|0)+((R(n,M)|0)+z-S<>2]|0)+((L+(R(c[(c[fa>>2]|0)+13128>>2]|0,O)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0,u);h=r}i=s<>2]|0)+(((R(c[(c[fa>>2]|0)+13128>>2]|0,O)|0)+T|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+h|0,i|0)|0;if((p|0)!=1){S=h+i|0;_b(j+S|0,(c[ea+(((a[(c[W>>2]|0)+((K+(R(c[(c[fa>>2]|0)+13128>>2]|0,O)|0)|0)*148|0)+142+g>>0]|0)==3&1)<<2)>>2]|0)+S|0,u)}}if(!o)if((a[(c[W>>2]|0)+((L+(R(c[(c[fa>>2]|0)+13128>>2]|0,U)|0)|0)*148|0)+142+g>>0]|0)==3){i=(R(q,P)|0)+A<>2]|0)+i|0,u,t,w,r);i=0}else i=1;else i=0;if(!p)if((a[(c[W>>2]|0)+((K+(R(c[(c[fa>>2]|0)+13128>>2]|0,U)|0)|0)*148|0)+142+g>>0]|0)==3){h=(R(q,Q)|0)+A<>2]|0)+h|0,u,t,w,r);h=0}else h=1;else h=0;S=0-(i<>2]&3](v,x,B,w,Y,Z,s,t,g,_,ba,da);Zb(d,v,x,B,w,e,f,s,t,g);S=78;break}default:{}}if((S|0)==78){S=0;a[y>>0]=3}g=g+1|0;if((g|0)>=(D|0))break;h=c[fa>>2]|0;i=h;h=c[h+13080>>2]|0}l=ga;return}function Xb(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0;if((d|0)>0){g=0;while(1){fh(a|0,b|0,c|0)|0;g=g+1|0;if((g|0)==(d|0))break;else{a=a+e|0;b=b+f|0}}}return}function Yb(a,b,d,e,f,g,h,i,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0;m=c[a+200>>2]|0;l=c[m+56>>2]|0;o=c[m+13120>>2]>>c[m+13168+(i<<2)>>2];m=c[m+13124>>2]>>c[m+13180+(i<<2)>>2];p=a+172+(i<<2)|0;n=k<<1;k=g<>2]|0)+((R(o,n)|0)+e<>2]|0)+((R(o,n|1)|0)+e<>2]|0)+((R(m,j)|0)+f<>2]|0)+((R(m,j|1)|0)+f<>2]|0;if(!(a[(c[b+204>>2]|0)+40>>0]|0)){if(a[m+13056>>0]|0?c[m+68>>2]|0:0)n=4}else n=4;if((n|0)==4?(y=c[m+13084>>2]|0,o=1<>2]|0,v=c[m+13180+(l<<2)>>2]|0,w=h>>y,p=i>>y,x=j+h>>y,y=k+i>>y,z=o>>u<>2],(p|0)<(y|0)):0){s=(w|0)<(x|0);r=b+7600|0;o=o>>v;q=(o|0)>0;n=p;do{if(s){b=n-i|0;l=w;do{m=c[t>>2]|0;if(a[(c[r>>2]|0)+((R(c[m+13156>>2]|0,n)|0)+l)>>0]|0?(B=c[m+13084>>2]|0,A=b<>v,B=l-h<>u<>2],q):0){m=d+(R(A,f)|0)+B|0;j=0;k=e+(R(A,g)|0)+B|0;while(1){fh(m|0,k|0,z|0)|0;j=j+1|0;if((j|0)==(o|0))break;else{m=m+f|0;k=k+g|0}}}l=l+1|0}while((l|0)!=(x|0))}n=n+1|0}while((n|0)!=(y|0))}return}function _b(c,d,e){c=c|0;d=d|0;e=e|0;if(!e)a[c>>0]=a[d>>0]|0;else b[c>>1]=b[d>>1]|0;return}function $b(c,d,e,f,g,h){c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;i=(f|0)>0;if(!e){if(i){e=0;while(1){a[c>>0]=a[d>>0]|0;e=e+1|0;if((e|0)==(f|0))break;else{c=c+g|0;d=d+h|0}}}}else if(i){e=0;while(1){b[c>>1]=b[d>>1]|0;e=e+1|0;if((e|0)==(f|0))break;else{c=c+g|0;d=d+h|0}}}return}function ac(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;g=c[b+200>>2]|0;f=c[g+13064>>2]|0;return a[(c[b+7568>>2]|0)+((R(c[g+13140>>2]|0,e>>f)|0)+(d>>f))>>0]|0}function bc(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;h=c[a+200>>2]|0;i=c[h+13084>>2]|0;if(((e|b|0)>=0?(j=b>>i,f=e>>i,g=c[h+13156>>2]|0,(j|0)<(g|0)):0)?(f|0)<(c[h+13160>>2]|0):0){j=(R(g,f)|0)+j|0;a=d[(c[a+7600>>2]|0)+j>>0]|0}else a=2;return a|0}function cc(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0;g=c[a+204>>2]|0;b=(c[((e|0)==1?g+28|0:g+32|0)>>2]|0)+b|0;b=(b|0)<0?0:(b|0)<57?b:57;do if((c[(c[a+200>>2]|0)+4>>2]|0)==1){if((b|0)>=30)if((b|0)>43){b=b+-6|0;break}else{b=d[1703+(b+-30)>>0]|0;break}}else b=(b|0)<0?0:(b|0)<51?b:51;while(0);g=f+2+b|0;return d[1649+((g|0)<0?0:(g|0)<53?g:53)>>0]|0|0}function dc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=c[a+200>>2]|0;i=((c[f+13120>>2]|0)-e|0)<=(b|0);f=((c[f+13124>>2]|0)-e|0)<=(d|0);g=(d|0)!=0;h=(b|0)!=0;if(h&g)Ub(a,b-e|0,d-e|0,e);if(g&i)Ub(a,b,d-e|0,e);if(h&f)Ub(a,b-e|0,d,e);return}function ec(b){b=b|0;var d=0,e=0,f=0;f=c[b+60>>2]|0;Re();kd();d=Qc(b)|0;if((d|0)>=0){c[f+7620>>2]=0;c[f+7772>>2]=0;e=c[b+808>>2]|0;if(!(e&2))d=1;else d=c[b+800>>2]&255;a[f+141>>0]=d;if((e&1|0)!=0?(c[b+800>>2]|0)>1:0)d=1;else d=2;a[f+140>>0]=d;d=0}return d|0}function fc(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0;h=c[a+60>>2]|0;j=g+28|0;a=c[j>>2]|0;if(!a){a=$c(h,d,1)|0;if((a|0)>=0){c[f>>2]=a;a=0}}else{c[h+3508>>2]=0;i=h+7776|0;b[i>>1]=1;a=jc(h,c[g+24>>2]|0,a)|0;if((a|0)>=0){a=h+5848|0;if(c[a>>2]|0)c[a>>2]=0;a=c[h+164>>2]|0;if(c[a+304>>2]|0){h=a+128|0;c[h>>2]=e[i>>1];c[h+4>>2]=0;Qf(d,a);c[f>>2]=1}a=c[j>>2]|0}}return a|0}function gc(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=c[b+60>>2]|0;ic(g);h=g+7664|0;d=g+7644|0;if((c[h>>2]|0)>0){b=0;do{hf((c[d>>2]|0)+(b<<2)|0);b=b+1|0}while((b|0)<(c[h>>2]|0))}hf(g+7648|0);hf(g+7640|0);hf(d);hf(g+152|0);hf(g+168|0);b=0;do{hf(g+172+(b<<2)|0);hf(g+184+(b<<2)|0);b=b+1|0}while((b|0)!=3);Of(g+164|0);b=0;do{f=g+3512+(b*72|0)|0;Vc(g,f,-1);Of(f);b=b+1|0}while((b|0)!=32);b=0;do{wf(g+208+(b<<2)|0);b=b+1|0}while((b|0)!=16);b=0;do{wf(g+272+(b<<2)|0);b=b+1|0}while((b|0)!=32);b=0;do{wf(g+400+(b<<2)|0);b=b+1|0}while((b|0)!=256);c[g+200>>2]=0;c[g+204>>2]=0;c[g+196>>2]=0;wf(g+1424|0);hf(g+3084|0);hf(g+3088|0);hf(g+3092|0);f=g+141|0;b=a[f>>0]|0;if((b&255)>1){e=1;do{d=g+72+(e<<2)|0;if(c[d>>2]|0){hf(d);hf(g+8+(e<<2)|0);b=a[f>>0]|0}e=e+1|0}while((e|0)<(b&255|0))}b=g+136|0;d=g+72|0;if((c[b>>2]|0)==(c[d>>2]|0))c[b>>2]=0;hf(d);d=g+7656|0;if((c[h>>2]|0)>0){b=0;do{hf((c[d>>2]|0)+(b<<4)|0);b=b+1|0}while((b|0)<(c[h>>2]|0))}hf(d);c[h>>2]=0;return 0}function hc(a){a=a|0;a=c[a+60>>2]|0;Yc(a);c[a+5836>>2]=2147483647;return}function ic(a){a=a|0;hf(a+3492|0);hf(a+3496|0);hf(a+7584|0);hf(a+7588|0);hf(a+7592|0);hf(a+7596|0);hf(a+7600|0);hf(a+7568|0);hf(a+7580|0);hf(a+7604|0);hf(a+7572|0);hf(a+7576|0);hf(a+3084|0);hf(a+3092|0);hf(a+3088|0);Af(a+1428|0);Af(a+1432|0);return}function jc(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;y=b+3508|0;c[y>>2]=0;u=b+5828|0;c[b+5832>>2]=c[u>>2];c[u>>2]=0;x=b+7660|0;c[x>>2]=0;a:do if((f|0)>3){v=b+7722|0;k=b+7664|0;l=b+7648|0;m=b+7636|0;n=b+7644|0;o=b+7632|0;p=b+7656|0;q=b+7628|0;w=b+7640|0;r=b+136|0;s=b+3500|0;t=b+7732|0;while(1){j=(a[v>>0]|0)==0;if(!j){i=c[t>>2]|0;if((i|0)>0){h=0;g=0;do{g=d[e+h>>0]|g<<8;h=h+1|0}while((h|0)<(i|0))}else g=0;f=f-i|0;if((g|0)>(f|0)){e=-1094995529;break a}else{i=e+i|0;h=f}}else{while(1){g=e+1|0;if(((a[e>>0]|0)==0?(a[g>>0]|0)==0:0)?(a[e+2>>0]|0)==1:0)break;if((f|0)<5){e=-1094995529;break a}else{e=g;f=f+-1|0}}g=0;i=e+3|0;h=f+-3|0}g=j?h:g;e=c[k>>2]|0;f=c[x>>2]|0;if((e|0)<=(f|0)){e=e+1|0;f=jf(c[p>>2]|0,e,16)|0;if(!f){e=-12;break a}c[p>>2]=f;j=c[k>>2]|0;ah(f+(j<<4)|0,0,e-j<<4|0)|0;kf(w,e,4)|0;kf(l,e,4)|0;kf(n,e,4)|0;f=c[l>>2]|0;c[f+(c[k>>2]<<2)>>2]=1024;f=of(c[f+(c[k>>2]<<2)>>2]|0,4)|0;c[(c[n>>2]|0)+(c[k>>2]<<2)>>2]=f;c[k>>2]=e;f=c[x>>2]|0}c[m>>2]=c[(c[l>>2]|0)+(f<<2)>>2];c[o>>2]=c[(c[n>>2]|0)+(f<<2)>>2];e=c[p>>2]|0;g=kc(b,i,g,e+(f<<4)|0)|0;c[(c[w>>2]|0)+(c[x>>2]<<2)>>2]=c[q>>2];c[(c[l>>2]|0)+(c[x>>2]<<2)>>2]=c[m>>2];A=c[o>>2]|0;z=c[n>>2]|0;j=c[x>>2]|0;c[x>>2]=j+1;c[z+(j<<2)>>2]=A;if((g|0)<0){e=g;break a}e=lc((c[r>>2]|0)+204|0,c[e+(f<<4)+12>>2]|0,c[e+(f<<4)+8>>2]|0)|0;if((e|0)<0)break a;mc(b)|0;if((c[s>>2]&-2|0)==36)c[u>>2]=1;f=h-g|0;if((f|0)<=3)break;else e=i+g|0}if((c[x>>2]|0)>0){g=b+7628|0;h=b+7644|0;i=b+7632|0;j=b+7656|0;f=0;do{c[g>>2]=c[(c[w>>2]|0)+(f<<2)>>2];c[i>>2]=c[(c[h>>2]|0)+(f<<2)>>2];A=c[j>>2]|0;if((nc(b,c[A+(f<<4)+12>>2]|0,c[A+(f<<4)+8>>2]|0)|0)<0)break a;f=f+1|0}while((f|0)<(c[x>>2]|0))}}else e=0;while(0);return e|0}function kc(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;n=b+7628|0;c[n>>2]=0;a:do if((e|0)>1){g=0;while(1){if(!(a[d+g>>0]|0)){h=g+-1|0;if((g|0)>0)g=(a[d+h>>0]|0)==0?h:g;h=g+2|0;if(((h|0)<(e|0)?(a[d+(g+1)>>0]|0)==0:0)?(i=a[d+h>>0]|0,(i&255)<4):0)break}h=g+2|0;if((g+3|0)<(e|0))g=h;else break a}e=i<<24>>24==3?e:g;h=g}else h=0;while(0);b:do if((h|0)<(e+-1|0)){mf(f,f+4|0,e+32|0);o=c[f>>2]|0;if(!o)e=-12;else{fh(o|0,d|0,h|0)|0;i=h+2|0;c:do if((i|0)<(e|0)){m=b+7636|0;l=b+7632|0;g=h;b=h;while(1){k=d+i|0;j=a[k>>0]|0;h=a[d+b>>0]|0;do if((j&255)<=3)if(!(h<<24>>24))if(!(a[d+(b+1)>>0]|0)){if(j<<24>>24!=3){i=g;e=b;break c}i=g+1|0;a[o+g>>0]=0;g=g+2|0;a[o+i>>0]=0;b=b+3|0;k=c[n>>2]|0;c[n>>2]=k+1;h=c[m>>2]|0;if((h|0)>(k|0)){h=c[l>>2]|0;if(!h)break}else{h=h<<1;c[m>>2]=h;kf(l,h,4)|0;h=c[l>>2]|0;if(!h){e=-12;break b}}c[h+((c[n>>2]|0)+-1<<2)>>2]=i}else{h=0;p=26}else p=26;else{a[o+g>>0]=h;a[o+(g+1)>>0]=a[d+(b+1)>>0]|0;g=g+2|0;b=i;h=a[k>>0]|0;p=26}while(0);if((p|0)==26){p=0;a[o+g>>0]=h;g=g+1|0;b=b+1|0}i=b+2|0;if((i|0)>=(e|0)){p=15;break}}}else{g=h;b=h;p=15}while(0);if((p|0)==15)if((b|0)<(e|0)){i=e+g|0;h=b;while(1){a[o+g>>0]=a[d+h>>0]|0;h=h+1|0;if((h|0)==(e|0))break;else g=g+1|0}i=i-b|0}else{i=g;e=b}g=o+i|0;h=g+32|0;do{a[g>>0]=0;g=g+1|0}while((g|0)<(h|0));c[f+12>>2]=o;c[f+8>>2]=i}}else{c[f+12>>2]=d;c[f+8>>2]=e}while(0);return e|0}function lc(a,b,c){a=a|0;b=b|0;c=c|0;return Gc(a,b,c>>>0>268435455?-8:c<<3)|0}function mc(a){a=a|0;var b=0,d=0;b=(c[a+136>>2]|0)+204|0;if(!(We(b)|0)){c[a+3500>>2]=Te(b,6)|0;d=Te(b,6)|0;b=(Te(b,3)|0)+-1|0;c[a+3504>>2]=b;return ((b|0)<0?-1094995529:(d|0)==0&1)|0}else return -1094995529;return 0}function nc(d,f,g){d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0;f=lc((c[d+136>>2]|0)+204|0,f,g)|0;a:do if((f|0)>=0){f=mc(d)|0;b:do if((f|0)>=0){if(!f){f=0;break a}k=d+3500|0;switch(c[k>>2]|0){case 48:{f=ie(d)|0;if((f|0)<0)break b;else{f=0;break a}}case 34:{f=me(d)|0;if((f|0)<0)break b;else{f=0;break a}}case 40:case 39:{f=se(d)|0;if((f|0)<0)break b;else{f=0;break a}}case 9:case 8:case 7:case 6:case 21:case 20:case 19:case 18:case 17:case 16:case 5:case 4:case 3:case 2:case 0:case 1:{f=oc(d)|0;if((f|0)<0)break a;i=d+5836|0;g=c[i>>2]|0;j=c[k>>2]|0;c:do if((g|0)==2147483647){switch(j|0){case 18:case 16:case 17:case 21:{g=c[d+5816>>2]|0;break}case 20:case 19:{g=-2147483648;break}default:{g=2147483647;break c}}c[i>>2]=g}while(0);h=(j|0)==9;if((j&-2|0)==8){if((c[d+5816>>2]|0)<=(g|0)){c[d+5848>>2]=0;f=0;break a}if(h)c[i>>2]=-2147483648}if(!(a[d+2436>>0]|0))if(!(c[d+3508>>2]|0))break b;else f=j;else{f=pc(d)|0;if((f|0)<0)break a;f=c[k>>2]|0}if((f|0)!=(c[d+7668>>2]|0)){f=-1094995529;break a}if(((a[d+2437>>0]|0)==0?(c[d+2428>>2]|0)!=2:0)?(l=bd(d)|0,(l|0)<0):0){f=l;break b}f=qc(d)|0;l=c[d+200>>2]|0;if((f|0)>=(R(c[l+13132>>2]|0,c[l+13128>>2]|0)|0))c[d+5848>>2]=1;if((f|0)<0)break b;else{f=0;break a}}case 37:case 36:{f=d+7616|0;b[f>>1]=(e[f>>1]|0)+1&255;c[d+5836>>2]=2147483647;f=0;break a}default:{f=0;break a}}}while(0);f=(c[(c[d+4>>2]|0)+688>>2]&8|0)==0?0:f}while(0);return f|0}function oc(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;v=f+136|0;w=(c[v>>2]|0)+204|0;u=(We(w)|0)&255;n=f+2436|0;a[n>>0]=u;q=f+3500|0;g=c[q>>2]|0;if(!(u<<24>>24==0|(g+-16|0)>>>0>4)?(u=f+7616|0,b[u>>1]=(e[u>>1]|0)+1&255,c[f+5836>>2]=2147483647,(g+-19|0)>>>0<2):0){Xc(f);g=c[q>>2]|0}l=f+3034|0;a[l>>0]=0;if((g&-8|0)==16)a[l>>0]=We(w)|0;g=Ye(w)|0;c[f+2416>>2]=g;a:do if(g>>>0<=255?(h=c[f+400+(g<<2)>>2]|0,(h|0)!=0):0){k=a[n>>0]|0;if(!(k<<24>>24)){g=f+204|0;h=c[h+4>>2]|0;if((c[g>>2]|0)!=(h|0)){g=-1094995529;break}u=g}else{u=f+204|0;h=c[h+4>>2]|0}c[u>>2]=h;i=c[q>>2]|0;j=(i|0)==21;if(j?(c[f+5832>>2]|0)==1:0)a[l>>0]=1;t=f+200|0;g=c[t>>2]|0;h=c[(c[f+272+(c[h>>2]<<2)>>2]|0)+4>>2]|0;if((g|0)==(h|0))h=k;else{c[t>>2]=h;do if(g|0?!(j|(i&-8|0)!=16):0){if(((c[h+13120>>2]|0)==(c[g+13120>>2]|0)?(c[h+13124>>2]|0)==(c[g+13124>>2]|0):0)?(c[h+76+(((c[h+72>>2]|0)+-1|0)*12|0)>>2]|0)==(c[g+76+(((c[g+72>>2]|0)+-1|0)*12|0)>>2]|0):0)break;a[l>>0]=0}while(0);Xc(f);g=Jc(f,c[t>>2]|0)|0;if((g|0)<0)break;g=f+7616|0;b[g>>1]=(e[g>>1]|0)+1&255;c[f+5836>>2]=2147483647;g=c[t>>2]|0;h=a[n>>0]|0}i=f+4|0;s=c[i>>2]|0;c[s+832>>2]=d[g+302>>0];c[s+836>>2]=d[g+335>>0];s=f+2437|0;a[s>>0]=0;do if(!(h<<24>>24)){if(a[(c[u>>2]|0)+41>>0]|0){a[s>>0]=We(w)|0;g=c[t>>2]|0}g=(R(c[g+13128>>2]<<1,c[g+13132>>2]|0)|0)+-2|0;o=g>>>0>65535;g=o?g>>>16:g;o=o?16:0;p=(g&65280|0)==0;g=Te(w,(p?o:o|8)+(d[2511+(p?g:g>>>8)>>0]|0)|0)|0;c[f+2420>>2]=g;p=c[t>>2]|0;if(g>>>0>=(R(c[p+13132>>2]|0,c[p+13128>>2]|0)|0)>>>0){g=-1094995529;break a}if(a[s>>0]|0){g=f+156|0;if(!(a[g>>0]|0)){g=-1094995529;break a}else{p=g;break}}else{c[f+2424>>2]=g;p=f+5824|0;c[p>>2]=(c[p>>2]|0)+1;p=f+156|0;r=31;break}}else{c[f+2424>>2]=0;c[f+2420>>2]=0;c[f+5824>>2]=0;p=f+156|0;a[p>>0]=0;r=31}while(0);if((r|0)==31){a[p>>0]=0;if((c[(c[u>>2]|0)+1624>>2]|0)>0){g=0;do{Ve(w,1);g=g+1|0}while((g|0)<(c[(c[u>>2]|0)+1624>>2]|0))}g=Ye(w)|0;o=f+2428|0;c[o>>2]=g;if(g>>>0>=3){g=-1094995529;break}if(!((g|0)==2?1:(c[q>>2]&-8|0)!=16)){g=-1094995529;break}g=f+2438|0;a[g>>0]=1;if(a[(c[u>>2]|0)+39>>0]|0)a[g>>0]=We(w)|0;if(a[(c[t>>2]|0)+8>>0]|0)a[f+2439>>0]=Te(w,2)|0;if(((c[q>>2]|0)+-19|0)>>>0<2){c[f+2608>>2]=0;c[f+5816>>2]=0}else{g=Te(w,c[(c[t>>2]|0)+64>>2]|0)|0;c[f+2432>>2]=g;g=id(f,g)|0;h=f+5816|0;if((a[n>>0]|0)==0?(m=c[h>>2]|0,(g|0)!=(m|0)):0)if(!(c[(c[i>>2]|0)+688>>2]&8))g=m;else{g=-1094995529;break}c[h>>2]=g;if(!(We(w)|0)){h=f+2440|0;g=he(f,h,c[t>>2]|0,1)|0;if((g|0)<0)break;else g=h}else{h=c[t>>2]|0;g=c[h+2184>>2]|0;if(!g){g=-1094995529;break}m=(g<<1)+-2|0;g=m>>>0>65535;m=g?m>>>16:m;g=g?16:0;n=(m&65280|0)==0;g=(d[2511+(n?m:m>>>8)>>0]|0)+(n?g:g|8)|0;if(!g){g=h;h=0}else{h=Te(w,g)|0;g=c[t>>2]|0}g=g+2188+(h*168|0)|0}c[f+2608>>2]=g;if((Kc(f,f+2612|0,w)|0)<0?c[(c[i>>2]|0)+688>>2]&8|0:0){g=-1094995529;break}if(!(a[(c[t>>2]|0)+13060>>0]|0))g=0;else g=(We(w)|0)&255;a[f+3035>>0]=g}b:do if(!(c[f+3504>>2]|0)){switch(c[q>>2]|0){case 9:case 8:case 7:case 6:case 4:case 2:case 0:break b;default:{}}c[f+5820>>2]=c[f+5816>>2]}while(0);do if(a[(c[t>>2]|0)+12941>>0]|0){a[f+3044>>0]=We(w)|0;if(!(c[(c[t>>2]|0)+4>>2]|0)){a[f+3045>>0]=0;a[f+3046>>0]=0;break}else{q=(We(w)|0)&255;a[f+3046>>0]=q;a[f+3045>>0]=q;break}}else{a[f+3044>>0]=0;a[f+3045>>0]=0;a[f+3046>>0]=0}while(0);l=f+3040|0;c[l>>2]=0;k=f+3036|0;c[k>>2]=0;g=c[o>>2]|0;if(g>>>0<2){h=c[u>>2]|0;c[k>>2]=c[h+8>>2];if(!g)c[l>>2]=c[h+12>>2];do if(!(We(w)|0))r=69;else{g=(Ye(w)|0)+1|0;c[k>>2]=g;if(c[o>>2]|0)break;c[l>>2]=(Ye(w)|0)+1;r=69}while(0);if((r|0)==69)g=c[k>>2]|0;if(g>>>0>16){g=-1094995529;break}if((c[l>>2]|0)>>>0>16){g=-1094995529;break}g=f+3032|0;a[g>>0]=0;i=f+3033|0;a[i>>0]=0;j=jd(f)|0;if(!j){g=-1094995529;break}do if((j|0)>1?(a[(c[u>>2]|0)+1617>>0]|0)!=0:0){q=(We(w)|0)&255;a[g>>0]=q;do if(q<<24>>24){if(!(c[k>>2]|0))break;q=(j<<1)+-2|0;h=q>>>0>65535;q=h?q>>>16:q;h=h?16:0;g=(q&65280|0)==0;h=(d[2511+(g?q:q>>>8)>>0]|0)+(g?h:h|8)|0;g=0;do{c[f+2776+(g<<2)>>2]=Te(w,h)|0;g=g+1|0}while(g>>>0<(c[k>>2]|0)>>>0)}while(0);if(c[o>>2]|0)break;r=We(w)|0;a[i>>0]=r;if((r&255|0)!=1){r=83;break}if(!(c[l>>2]|0)){r=83;break}r=(j<<1)+-2|0;h=r>>>0>65535;r=h?r>>>16:r;h=h?16:0;g=(r&65280|0)==0;h=(d[2511+(g?r:r>>>8)>>0]|0)+(g?h:h|8)|0;g=0;do{c[f+2904+(g<<2)>>2]=Te(w,h)|0;g=g+1|0}while(g>>>0<(c[l>>2]|0)>>>0);r=83}else r=83;while(0);do if((r|0)==83){if(c[o>>2]|0)break;a[f+3047>>0]=We(w)|0}while(0);if(!(a[(c[u>>2]|0)+5>>0]|0))g=0;else g=(We(w)|0)&255;a[f+3048>>0]=g;g=f+3052|0;c[g>>2]=0;do if(a[f+3035>>0]|0){h=f+3051|0;a[h>>0]=0;if(!(c[o>>2]|0)){i=(We(w)|0)==0&1;a[h>>0]=i}else i=0;if((c[f+3036+((i&255)<<2)>>2]|0)>>>0<=1)break;r=Ye(w)|0;c[g>>2]=r;if(r>>>0>=(c[f+3036+(d[h>>0]<<2)>>2]|0)>>>0){g=-1094995529;break a}}while(0);g=c[u>>2]|0;if((a[g+37>>0]|0)!=0?(c[o>>2]|0)==1:0)r=96;else r=94;do if((r|0)==94){if(!(a[g+38>>0]|0))break;if(!(c[o>>2]|0))r=96}while(0);if((r|0)==96)Lc(f,w);q=5-(Ye(w)|0)|0;c[f+3080>>2]=q;if((q+-1|0)>>>0>4){g=-1094995529;break}}c[f+3056>>2]=Mc(w)|0;g=c[u>>2]|0;if(!(a[g+36>>0]|0)){c[f+3060>>2]=0;h=0}else{c[f+3060>>2]=Mc(w)|0;h=Mc(w)|0;g=c[u>>2]|0}c[f+3064>>2]=h;if(!(a[g+1631>>0]|0))h=0;else{h=(We(w)|0)&255;g=c[u>>2]|0}a[f+3068>>0]=h;c:do if(!(a[g+55>>0]|0)){a[f+3049>>0]=0;c[f+3072>>2]=0;g=0;r=111}else{do if(a[g+56>>0]|0){if(!(We(w)|0)){g=c[u>>2]|0;break}q=(We(w)|0)&255;a[f+3049>>0]=q;if(q<<24>>24)break c;c[f+3072>>2]=(Mc(w)|0)<<1;g=(Mc(w)|0)<<1;r=111;break c}while(0);a[f+3049>>0]=a[g+57>>0]|0;c[f+3072>>2]=c[g+60>>2];g=c[g+64>>2]|0;r=111}while(0);if((r|0)==111)c[f+3076>>2]=g;g=a[(c[u>>2]|0)+54>>0]|0;d:do if(!(g<<24>>24))g=0;else{do if(!(a[f+3044>>0]|0)){if(a[f+3045>>0]|0)break;if(a[f+3049>>0]|0)break d}while(0);g=(We(w)|0)&255}while(0);a[f+3050>>0]=g}o=f+3096|0;c[o>>2]=0;q=c[u>>2]|0;if(!((a[q+42>>0]|0)==0?!(a[q+43>>0]|0):0))r=121;e:do if((r|0)==121){r=Ye(w)|0;c[o>>2]=r;if((r|0)<=0){c[f+7620>>2]=0;break}k=(Ye(w)|0)+1|0;j=k>>4;k=k&15;l=f+3084|0;hf(l);r=f+3088|0;hf(r);n=f+3092|0;hf(n);c[l>>2]=of(c[o>>2]|0,4)|0;c[r>>2]=of(c[o>>2]|0,4)|0;q=of(c[o>>2]|0,4)|0;c[n>>2]=q;if(c[l>>2]|0?!((q|0)==0|(c[r>>2]|0)==0):0){if((c[o>>2]|0)>0){m=(j|0)>0;n=(k|0)==0;i=0;do{if(m){g=0;h=0;do{g=(Te(w,16)|0)+(g<<16)|0;h=h+1|0}while((h|0)!=(j|0))}else g=0;if(!n)g=(Te(w,k)|0)+(g<>2]|0)+(i<<2)>>2]=g+1;i=i+1|0}while((i|0)<(c[o>>2]|0))}g=f+141|0;do if((d[g>>0]|0)>1){r=c[u>>2]|0;if((c[r+48>>2]|0)<=1?(c[r+44>>2]|0)<=1:0)break;c[f+7620>>2]=0;a[g>>0]=1;break e}while(0);c[f+7620>>2]=0;break}c[o>>2]=0;g=-12;break a}while(0);if(a[(c[u>>2]|0)+1628>>0]|0){h=Ye(w)|0;q=bh(h|0,0,3)|0;n=C;r=Nc(w)|0;o=((r|0)<0)<<31>>31;if((n|0)>(o|0)|(n|0)==(o|0)&q>>>0>r>>>0){g=-1094995529;break}if(h|0){g=0;do{Ve(w,8);g=g+1|0}while((g|0)!=(h|0))}}h=c[u>>2]|0;u=(c[h+16>>2]|0)+26+(c[f+3056>>2]|0)|0;i=u&255;a[f+3100>>0]=i;u=u<<24;if((u|0)<=855638016?(u>>24|0)>=(0-(c[(c[t>>2]|0)+13192>>2]|0)|0):0){u=c[f+2420>>2]|0;c[f+3488>>2]=u;if((u|0)==0?a[s>>0]|0:0){g=-1094995529;break}if((Nc(w)|0)>=0){g=c[v>>2]|0;a[g+203>>0]=(a[s>>0]|0)==0&1;if(!(a[h+22>>0]|0))a[g+272>>0]=i;a[p>>0]=1;a[g+302>>0]=0;a[g+303>>0]=0;g=0}else g=-1094995529}else g=-1094995529}else g=-1094995529;while(0);return g|0}function pc(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=c[b+136>>2]|0;e=b+200|0;i=c[e>>2]|0;g=c[i+13064>>2]|0;f=c[i+13120>>2]>>g;g=(c[i+13124>>2]>>g)+1|0;i=b+5840|0;j=b+5844|0;ah(c[b+7572>>2]|0,0,R(c[j>>2]|0,c[i>>2]|0)|0)|0;ah(c[b+7576>>2]|0,0,R(c[j>>2]|0,c[i>>2]|0)|0)|0;i=c[e>>2]|0;ah(c[b+7596>>2]|0,0,R(c[i+13152>>2]|0,c[i+13148>>2]|0)|0)|0;i=c[e>>2]|0;ah(c[b+7600>>2]|0,0,R((c[i+13160>>2]|0)+1|0,(c[i+13156>>2]|0)+1|0)|0)|0;ah(c[b+7580>>2]|0,-1,R((f<<2)+4|0,g)|0)|0;c[b+5848>>2]=0;g=b+3500|0;c[b+7668>>2]=c[g>>2];f=c[b+204>>2]|0;if(a[f+42>>0]|0)c[d+312>>2]=c[c[f+1648>>2]>>2]<>2]|0)+13080>>2];e=b+160|0;d=Zc(b,e,c[b+5816>>2]|0)|0;if((d|0)>=0){d=dd(b)|0;if((d|0)>=0){j=(c[g>>2]&-8|0)==16;c[(c[c[b+3508>>2]>>2]|0)+80>>2]=j&1;c[(c[e>>2]|0)+84>>2]=3-(c[b+2428>>2]|0);if(!j)ad(b);d=b+164|0;Pf(c[d>>2]|0);d=$c(b,c[d>>2]|0,0)|0;if((d|0)<0)h=9;else d=0}else h=9}else h=9;if((h|0)==9){e=b+3508|0;c[e>>2]=0}return d|0}function qc(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+8|0;b=d;c[e>>2]=0;c[e+4>>2]=1;a=c[a+4>>2]|0;za[c[a+816>>2]&1](a,1,e,b,1,4)|0;l=d;return c[b>>2]|0}function rc(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;r=c[b+60>>2]|0;p=r+200|0;h=c[p>>2]|0;s=1<>2];q=r+204|0;d=c[q>>2]|0;b=c[(c[d+1668>>2]|0)+(c[r+3488>>2]<<2)>>2]|0;e=(a[r+2437>>0]|0)==0;do if((b|0)!=0|e){if(!e?(c[(c[r+7580>>2]|0)+(c[(c[d+1672>>2]|0)+(b+-1<<2)>>2]<<2)>>2]|0)!=(c[r+2424>>2]|0):0){b=-1094995529;break}j=s+-1|0;k=r+3072|0;l=r+3496|0;m=r+3076|0;n=r+3050|0;o=r+7604|0;g=0;f=0;e=h;d=c[h+13120>>2]|0;do{if((b|0)>=(c[e+13136>>2]|0))break;h=c[(c[(c[q>>2]|0)+1672>>2]|0)+(b<<2)>>2]|0;g=c[e+13080>>2]|0;i=j+d>>g;f=((h|0)%(i|0)|0)<>2]|0)+13080>>2]|0;tc(r,f>>i,g>>i);i=c[l>>2]|0;c[i+(h<<3)>>2]=c[k>>2];c[i+(h<<3)+4>>2]=c[m>>2];a[(c[o>>2]|0)+h>>0]=a[n>>0]|0;i=uc(r,f,g,c[(c[p>>2]|0)+13080>>2]|0,0)|0;if((i|0)<0){t=8;break}b=b+1|0;Ra(r,b);dc(r,f,g,s);e=c[p>>2]|0;d=c[e+13120>>2]|0}while((i|0)!=0);if((t|0)==8){c[(c[r+7580>>2]|0)+(h<<2)>>2]=-1;b=i;break}if((f+s|0)>=(d|0)?(g+s|0)>=(c[e+13124>>2]|0):0)Ub(r,f,g,s)}else b=-1094995529;while(0);return b|0}function sc(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;o=c[b+136>>2]|0;k=c[b+200>>2]|0;g=k+13080|0;h=1<>2];l=c[b+204>>2]|0;m=c[(c[l+1672>>2]|0)+(f<<2)>>2]|0;p=c[b+2424>>2]|0;n=m-p|0;i=c[b+7580>>2]|0;j=i+(m<<2)|0;c[j>>2]=p;do if(!(a[l+43>>0]|0)){b=a[l+42>>0]|0;if(!(b<<24>>24)){c[o+312>>2]=c[k+13120>>2];b=0;break}if((f|0)!=0?(p=c[l+1676>>2]|0,(c[p+(f<<2)>>2]|0)!=(c[p+(f+-1<<2)>>2]|0)):0){p=c[g>>2]|0;c[o+312>>2]=(c[(c[l+1648>>2]|0)+(c[(c[l+1664>>2]|0)+(d>>p<<2)>>2]<<2)>>2]<>0]=1}}else{if((d|0)==0?(h+-1&e|0)==0:0)a[o+203>>0]=1;c[o+312>>2]=c[k+13120>>2];b=a[l+42>>0]|0}while(0);h=h+e|0;p=c[k+13124>>2]|0;c[o+316>>2]=(h|0)>(p|0)?p:h;h=o+31312|0;c[h>>2]=0;if(!(b<<24>>24)){if(!n){c[h>>2]=1;b=1}else b=0;if((n|0)<(c[k+13128>>2]|0)){b=b|4;c[h>>2]=b}}else{if((d|0)>0){p=c[l+1676>>2]|0;g=m+-1|0;if((c[p+(f<<2)>>2]|0)==(c[p+(c[(c[l+1668>>2]|0)+(g<<2)>>2]<<2)>>2]|0))b=0;else{c[h>>2]=2;b=2}if((c[j>>2]|0)!=(c[i+(g<<2)>>2]|0)){b=b|1;c[h>>2]=b}}else b=0;if((e|0)>0){p=c[l+1676>>2]|0;g=m-(c[k+13128>>2]|0)|0;if((c[p+(f<<2)>>2]|0)!=(c[p+(c[(c[l+1668>>2]|0)+(g<<2)>>2]<<2)>>2]|0)){b=b|8;c[h>>2]=b}if((c[j>>2]|0)!=(c[i+(g<<2)>>2]|0)){b=b|4;c[h>>2]=b}}}h=(d|0)>0;if(h&(n|0)>0)g=(b>>>1&1^1)&255;else g=0;a[o+308>>0]=g;if((e|0)>0){g=c[k+13128>>2]|0;if((n|0)<(g|0))b=0;else b=(b>>>3&1^1)&255;a[o+309>>0]=b;if((n+1|0)<(g|0))b=0;else{b=c[l+1676>>2]|0;b=(c[b+(f<<2)>>2]|0)==(c[b+(c[(c[l+1668>>2]|0)+(m+1-g<<2)>>2]<<2)>>2]|0)&1}a[o+310>>0]=b;if(h&(n|0)>(g|0)){b=c[l+1676>>2]|0;b=(c[b+(f<<2)>>2]|0)==(c[b+(c[(c[l+1668>>2]|0)+(m+-1-g<<2)>>2]<<2)>>2]|0)&1}else b=0}else{a[o+309>>0]=0;a[o+310>>0]=0;b=0}a[o+311>>0]=b;return}function tc(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;h=c[e+136>>2]|0;B=e+3492|0;C=c[B>>2]|0;D=e+200|0;A=(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)+f|0;if((a[e+3044>>0]|0)==0?(a[e+3045>>0]|0)==0:0){h=0;i=0}else{if((f|0)>0?(a[h+308>>0]|0)!=0:0)i=Ya(e)|0;else i=0;if(!((g|0)<1|(i|0)!=0))if(!(a[h+309>>0]|0)){h=0;i=0}else{h=Ya(e)|0;i=0}else h=0}t=c[(c[D>>2]|0)+4>>2]|0?3:1;u=e+204|0;v=C+(A*148|0)+143|0;w=C+(A*148|0)+144|0;x=C+(A*148|0)+104|0;y=C+(A*148|0)+108|0;z=(h|0)==0;s=(i|h|0)==0;o=(i|0)==0;p=g+-1|0;q=f+-1|0;m=C+(A*148|0)+144|0;l=0;do{r=c[u>>2]|0;r=d[((l|0)==0?r+1644|0:r+1645|0)>>0]|0;if(a[e+3044+l>>0]|0){j=(l|0)==2;do if(j){h=a[v>>0]|0;a[w>>0]=h;c[y>>2]=c[x>>2];n=m}else{if(s){h=(_a(e)|0)&255;n=C+(A*148|0)+142+l|0;a[n>>0]=h;break}if(!o){h=a[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+142+l>>0]|0;n=C+(A*148|0)+142+l|0;a[n>>0]=h;break}if(z)h=0;else h=a[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+142+l>>0]|0;n=C+(A*148|0)+142+l|0;a[n>>0]=h}while(0);if(h<<24>>24){h=0;do{do if(!s){if(!o){i=c[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+(l<<4)+(h<<2)>>2]|0;break}if(z)i=0;else i=c[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+(l<<4)+(h<<2)>>2]|0}else i=bb(e)|0;while(0);c[C+(A*148|0)+(l<<4)+(h<<2)>>2]=i;h=h+1|0}while((h|0)!=4);do if((a[n>>0]|0)!=1){if(!j){if(s){c[C+(A*148|0)+100+(l<<2)>>2]=db(e)|0;break}if(!o){c[C+(A*148|0)+100+(l<<2)>>2]=c[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+100+(l<<2)>>2];break}if(z)h=0;else h=c[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+100+(l<<2)>>2]|0;c[C+(A*148|0)+100+(l<<2)>>2]=h}}else{h=0;do{do if(c[C+(A*148|0)+(l<<4)+(h<<2)>>2]|0){if(s){i=cb(e)|0;break}if(!o){i=c[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+48+(l<<4)+(h<<2)>>2]|0;break}if(!z)i=c[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+48+(l<<4)+(h<<2)>>2]|0;else i=0}else i=0;while(0);c[C+(A*148|0)+48+(l<<4)+(h<<2)>>2]=i;h=h+1|0}while((h|0)!=4);if(s){a[C+(A*148|0)+96+l>>0]=ab(e)|0;break}if(!o){a[C+(A*148|0)+96+l>>0]=a[(c[B>>2]|0)+((q+(R(c[(c[D>>2]|0)+13128>>2]|0,g)|0)|0)*148|0)+96+l>>0]|0;break}if(z)h=0;else h=a[(c[B>>2]|0)+(((R(c[(c[D>>2]|0)+13128>>2]|0,p)|0)+f|0)*148|0)+96+l>>0]|0;a[C+(A*148|0)+96+l>>0]=h}while(0);b[C+(A*148|0)+112+(l*10|0)>>1]=0;j=0;do{h=c[C+(A*148|0)+(l<<4)+(j<<2)>>2]|0;i=j;j=j+1|0;k=C+(A*148|0)+112+(l*10|0)+(j<<1)|0;b[k>>1]=h;if((a[n>>0]|0)==2){if((i|0)>1){h=0-h|0;b[k>>1]=h}}else if(c[C+(A*148|0)+48+(l<<4)+(i<<2)>>2]|0){h=0-h|0;b[k>>1]=h}b[k>>1]=h<<16>>16<>0]=0;l=l+1|0}while((l|0)<(t|0));return}function uc(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;p=c[b+136>>2]|0;s=1<>2]|0;k=b+204|0;i=c[k>>2]|0;o=(1<<(c[j+13080>>2]|0)-(c[i+24>>2]|0))+-1|0;c[p+31232>>2]=h;r=s+e|0;if(((r|0)<=(c[j+13120>>2]|0)?(s+f|0)<=(c[j+13124>>2]|0):0)?(c[j+13064>>2]|0)>>>0>>0:0){j=mb(b,h,e,f)|0;i=c[k>>2]|0}else j=(c[j+13064>>2]|0)>>>0>>0&1;if(a[i+22>>0]|0?((c[(c[q>>2]|0)+13080>>2]|0)-(c[i+24>>2]|0)|0)>>>0<=g>>>0:0){a[p+300>>0]=0;c[p+280>>2]=0}if(a[b+3068>>0]|0?((c[(c[q>>2]|0)+13080>>2]|0)-(d[i+1632>>0]|0)|0)>>>0<=g>>>0:0)a[p+301>>0]=0;a:do if(!j){i=vc(b,e,f,g)|0;if((i|0)>=0){i=c[q>>2]|0;j=1<>2];if((r|0)%(j|0)|0|0?(r|0)<(c[i+13120>>2]|0):0){i=1;break}s=s+f|0;if((s|0)%(j|0)|0|0?(s|0)<(c[i+13124>>2]|0):0){i=1;break}i=(eb(b)|0)==0&1}}else{l=s>>1;m=l+e|0;n=l+f|0;g=g+-1|0;k=h+1|0;i=uc(b,e,f,g,k)|0;if((i|0)>=0){do if(i){j=c[q>>2]|0;if((m|0)<(c[j+13120>>2]|0)){i=uc(b,m,f,g,k)|0;if((i|0)<0)break a;if(!i){i=0;break}j=c[q>>2]|0}if((n|0)<(c[j+13124>>2]|0)){i=uc(b,e,n,g,k)|0;if((i|0)<0)break a;if(!i){i=0;break}j=c[q>>2]|0}if((m|0)<(c[j+13120>>2]|0)?(n|0)<(c[j+13124>>2]|0):0){i=uc(b,m,n,g,k)|0;if((i|0)<0)break a}}else i=0;while(0);if((o&r|0)==0?(o&s+f|0)==0:0)c[p+276>>2]=a[p+272>>0];if(!i)i=0;else{i=c[q>>2]|0;if((m+l|0)<(c[i+13120>>2]|0))i=1;else i=(n+l|0)<(c[i+13124>>2]|0);i=i&1}}}while(0);return i|0}function vc(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;z=c[b+136>>2]|0;C=b+200|0;x=c[C>>2]|0;w=c[x+13064>>2]|0;v=c[x+13140>>2]|0;h=e>>w;i=f>>w;t=b+204|0;x=1<<(c[x+13080>>2]|0)-(c[(c[t>>2]|0)+24>>2]|0);c[z+31236>>2]=e;c[z+31240>>2]=f;o=z+31252|0;a[o>>0]=1;r=z+31244|0;c[r>>2]=1;p=z+31248|0;c[p>>2]=0;s=z+31254|0;a[s>>0]=0;q=z+31253|0;a[q>>0]=0;l=b+7584|0;u=(R(i,v)|0)+h|0;a[(c[l>>2]|0)+u>>0]=0;y=z+31268|0;a[y>>0]=1;a[y+1>>0]=1;a[y+2>>0]=1;a[y+3>>0]=1;y=1<>w;x=x+-1|0;if(a[(c[t>>2]|0)+40>>0]|0){m=(fb(b)|0)&255;a[z+31256>>0]=m;if(m<<24>>24)wc(b,e,f,g)}else a[z+31256>>0]=0;m=b+2428|0;if((c[m>>2]|0)==2){if((w|0)>0){h=0;i=u;while(1){ah((c[l>>2]|0)+i|0,0,w|0)|0;h=h+1|0;if((h|0)==(w|0))break;else i=i+v|0}}}else{j=gb(b,e,f,h,i)|0;k=j&255;if((w|0)>0){h=0;i=u;while(1){ah((c[l>>2]|0)+i|0,k|0,w|0)|0;h=h+1|0;if((h|0)==(w|0))break;else i=i+v|0}}c[r>>2]=j&255|0?2:0}a:do if(!(a[(c[l>>2]|0)+u>>0]|0)){if((c[m>>2]|0)==2)h=c[r>>2]|0;else{h=lb(b)|0;c[r>>2]=h}if((h|0)==1?(c[(c[C>>2]|0)+13064>>2]|0)!=(g|0):0)i=20;else i=19;b:do if((i|0)==19){l=nb(b,g)|0;c[p>>2]=l;m=c[r>>2]|0;a[s>>0]=(l|0)==3&(m|0)==1&1;if((m|0)==1)i=20;else{yc(b,e,f,g);switch(c[p>>2]|0){case 0:{xc(b,e,f,y,y,g,0);break b}case 1:{n=(y|0)/2|0;xc(b,e,f,y,n,g,0);xc(b,e,n+f|0,y,n,g,1);break b}case 2:{n=(y|0)/2|0;xc(b,e,f,n,y,g,0);xc(b,n+e|0,f,n,y,g,1);break b}case 4:{n=(y|0)/4|0;xc(b,e,f,y,n,g,0);xc(b,e,n+f|0,y,(3<>2]|0)==0?(n=c[C>>2]|0,(c[n+68>>2]|0)!=0):0)?(c[n+13048>>2]|0)>>>0<=g>>>0:0)?(c[n+13052>>2]|0)>>>0>=g>>>0:0){h=(ob(b)|0)&255;a[q>>0]=h}else h=a[q>>0]|0;if(!(h<<24>>24)){Ac(b,e,f,g);break}yc(b,e,f,g);h=zc(b,e,f,g)|0;if(a[(c[C>>2]|0)+13056>>0]|0)wc(b,e,f,g);if((h|0)<0)break a}while(0);if(!(a[q>>0]|0)){do if((c[r>>2]|0)==1)i=45;else{if((c[p>>2]|0)==0?a[z+31276>>0]|0:0){i=45;break}h=(yb(b)|0)&255;a[o>>0]=h}while(0);if((i|0)==45)h=a[o>>0]|0;if(!(h<<24>>24)){if(a[b+3049>>0]|0){i=53;break}Sb(b,e,f,g);i=53;break}h=c[C>>2]|0;if((c[r>>2]|0)==1)h=(d[s>>0]|0)+(c[h+13092>>2]|0)|0;else h=c[h+13088>>2]|0;a[z+31255>>0]=h;h=Bc(b,e,f,e,f,e,f,g,g,0,0,2768,2768)|0;if((h|0)>=0)i=53}else i=53}else{xc(b,e,f,y,y,g,0);yc(b,e,f,g);if(!(a[b+3049>>0]|0)){Sb(b,e,f,g);i=53}else i=53}while(0);if((i|0)==53){if(a[(c[t>>2]|0)+22>>0]|0?(a[z+300>>0]|0)==0:0)Qb(b,e,f,g);if((w|0)>0){j=b+7568|0;k=z+272|0;i=0;h=u;while(1){ah((c[j>>2]|0)+h|0,a[k>>0]|0,w|0)|0;i=i+1|0;if((i|0)==(w|0))break;else h=h+v|0}}if((x&y+e|0)==0?(x&y+f|0)==0:0)c[z+276>>2]=a[z+272>>0];h=c[C>>2]|0;i=c[h+13064>>2]|0;k=y>>i;j=e>>i;i=f>>i;if((k|0)>0?(A=b+7588|0,B=c[z+31232>>2]&255,ah((c[A>>2]|0)+((R(c[h+13140>>2]|0,i)|0)+j)|0,B|0,k|0)|0,(k|0)!=1):0){h=1;do{ah((c[A>>2]|0)+((R(c[(c[C>>2]|0)+13140>>2]|0,h+i|0)|0)+j)|0,B|0,k|0)|0;h=h+1|0}while((h|0)!=(k|0));h=0}else h=0}return h|0}function wc(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;k=1<>2]|0;h=c[j+13084>>2]|0;l=c[j+13156>>2]|0;f=k+d|0;g=c[j+13120>>2]|0;k=k+e|0;j=c[j+13124>>2]|0;e=e>>h;k=((k|0)>(j|0)?j:k)>>h;if((e|0)<(k|0)){j=d>>h;h=((f|0)>(g|0)?g:f)>>h;i=(j|0)<(h|0);g=b+7600|0;do{if(i){d=R(e,l)|0;f=j;do{a[(c[g>>2]|0)+(f+d)>>0]=2;f=f+1|0}while((f|0)!=(h|0))}e=e+1|0}while((e|0)!=(k|0))}return}function xc(f,g,h,i,j,k,m){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;B=l;l=l+16|0;A=B;q=c[f+136>>2]|0;c[A>>2]=0;c[A+4>>2]=0;c[A+8>>2]=0;v=f+200|0;o=c[v>>2]|0;r=c[o+13156>>2]|0;u=c[f+3508>>2]|0;s=c[u+16>>2]|0;u=c[u+20>>2]|0;x=f+160|0;n=c[x>>2]|0;w=R(h>>c[o+13180>>2],c[n+32>>2]|0)|0;p=c[o+56>>2]|0;w=(c[n>>2]|0)+((g>>c[o+13168>>2]<>c[o+13184>>2],c[n+36>>2]|0)|0;y=(c[n+4>>2]|0)+((g>>c[o+13172>>2]<>c[o+13188>>2],c[n+40>>2]|0)|0;z=(c[n+8>>2]|0)+((g>>c[o+13176>>2]<>2]|0;a:do if(!(a[(c[f+7584>>2]|0)+((R(h>>p,c[o+13140>>2]|0)|0)+(g>>p))>>0]|0)){p=(ub(f)|0)&255;a[q+31276>>0]=p;if(p<<24>>24){if((c[f+3080>>2]|0)>>>0>1)n=tb(f)|0;else n=0;$d(f,g,h,i,j,k,m,n,A);n=c[(c[v>>2]|0)+13084>>2]|0;k=g>>n;m=h>>n;if((j>>n|0)>0)q=0;else break;while(1){if((i>>n|0)>0){p=(R(q+m|0,r)|0)+k|0;o=0;do{n=s+((p+o|0)*12|0)|0;c[n>>2]=c[A>>2];c[n+4>>2]=c[A+4>>2];c[n+8>>2]=c[A+8>>2];o=o+1|0;n=c[(c[v>>2]|0)+13084>>2]|0}while((o|0)<(i>>n|0))}q=q+1|0;if((q|0)>=(j>>n|0))break a}}_d(f,g,h,i,j);p=A+10|0;a[p>>0]=0;if(!(c[f+2428>>2]|0)){n=vb(f,i,j)|0;if((n|0)==1){n=1;t=22}else t=19}else{n=0;t=19}if((t|0)==19){o=c[f+3036>>2]|0;if(o|0)a[A+8>>0]=wb(f,o)|0;a[p>>0]=1;Ib(f,g,h,0);ee(f,g,h,i,j,k,m,0,A,xb(f)|0,0);b[A>>1]=(e[A>>1]|0)+(e[q+31272>>1]|0);o=A+2|0;b[o>>1]=(e[o>>1]|0)+(e[q+31274>>1]|0);if(n|0)t=22}if((t|0)==22){o=c[f+3040>>2]|0;if(o|0)a[A+9>>0]=wb(f,o)|0;if((n|0)==2&(a[f+3047>>0]|0)==1)c[q+31272>>2]=0;else Ib(f,g,h,1);a[p>>0]=(d[p>>0]|0)+2;ee(f,g,h,i,j,k,m,0,A,xb(f)|0,1);m=A+4|0;b[m>>1]=(e[m>>1]|0)+(e[q+31272>>1]|0);m=A+6|0;b[m>>1]=(e[m>>1]|0)+(e[q+31274>>1]|0)}n=c[(c[v>>2]|0)+13084>>2]|0;k=g>>n;m=h>>n;if((j>>n|0)>0){q=0;do{if((i>>n|0)>0){p=(R(q+m|0,r)|0)+k|0;o=0;do{n=s+((p+o|0)*12|0)|0;c[n>>2]=c[A>>2];c[n+4>>2]=c[A+4>>2];c[n+8>>2]=c[A+8>>2];o=o+1|0;n=c[(c[v>>2]|0)+13084>>2]|0}while((o|0)<(i>>n|0))}q=q+1|0}while((q|0)<(j>>n|0))}}else{if((c[f+3080>>2]|0)>>>0>1)n=tb(f)|0;else n=0;q=1<>2]|0)+13084>>2]|0;k=g>>n;m=h>>n;if((j>>n|0)>0){q=0;do{if((i>>n|0)>0){p=(R(q+m|0,r)|0)+k|0;o=0;do{n=s+((p+o|0)*12|0)|0;c[n>>2]=c[A>>2];c[n+4>>2]=c[A+4>>2];c[n+8>>2]=c[A+8>>2];o=o+1|0;n=c[(c[v>>2]|0)+13084>>2]|0}while((o|0)<(i>>n|0))}q=q+1|0}while((q|0)<(j>>n|0))}}while(0);q=a[A+10>>0]|0;o=q<<24>>24;if(o&1){n=c[u+(a[A+8>>0]<<2)>>2]|0;if(n|0){k=n;t=35}}else{k=0;t=35}b:do if((t|0)==35){if(o&2){n=c[u+196+(a[A+9>>0]<<2)>>2]|0;if(!n)break;else p=n}else p=0;switch(q<<24>>24){case 1:{o=A+8|0;n=a[o>>0]|0;Hc(f,w,c[(c[x>>2]|0)+32>>2]|0,c[k>>2]|0,A,g,h,i,j,b[f+3104+(n<<1)>>1]|0,b[f+3296+(n<<1)>>1]|0);n=c[v>>2]|0;if(!(c[n+4>>2]|0))break b;w=c[n+13172>>2]|0;g=g>>w;v=c[n+13184>>2]|0;h=h>>v;i=i>>w;j=j>>v;v=c[k>>2]|0;w=a[o>>0]|0;Ic(f,y,c[(c[x>>2]|0)+36>>2]|0,c[v+4>>2]|0,c[v+36>>2]|0,0,g,h,i,j,A,b[f+3136+(w<<2)>>1]|0,b[f+3328+(w<<2)>>1]|0);w=c[k>>2]|0;y=a[o>>0]|0;Ic(f,z,c[(c[x>>2]|0)+40>>2]|0,c[w+8>>2]|0,c[w+40>>2]|0,0,g,h,i,j,A,b[f+3136+(y<<2)+2>>1]|0,b[f+3328+(y<<2)+2>>1]|0);break b}case 2:{o=A+9|0;n=a[o>>0]|0;Hc(f,w,c[(c[x>>2]|0)+32>>2]|0,c[p>>2]|0,A+4|0,g,h,i,j,b[f+3264+(n<<1)>>1]|0,b[f+3392+(n<<1)>>1]|0);n=c[v>>2]|0;if(!(c[n+4>>2]|0))break b;w=c[n+13172>>2]|0;g=g>>w;v=c[n+13184>>2]|0;h=h>>v;i=i>>w;j=j>>v;v=c[p>>2]|0;w=a[o>>0]|0;Ic(f,y,c[(c[x>>2]|0)+36>>2]|0,c[v+4>>2]|0,c[v+36>>2]|0,1,g,h,i,j,A,b[f+3200+(w<<2)>>1]|0,b[f+3424+(w<<2)>>1]|0);w=c[p>>2]|0;y=a[o>>0]|0;Ic(f,z,c[(c[x>>2]|0)+40>>2]|0,c[w+8>>2]|0,c[w+40>>2]|0,1,g,h,i,j,A,b[f+3200+(y<<2)+2>>1]|0,b[f+3424+(y<<2)+2>>1]|0);break b}case 3:{ra();break}default:break b}}while(0);l=B;return}function yc(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;i=c[b+136>>2]|0;k=c[b+200>>2]|0;h=c[k+13084>>2]|0;g=1<>h;k=c[k+13156>>2]|0;l=c[(c[b+3508>>2]|0)+16>>2]|0;j=d>>h;h=e>>h;g=(g|0)==0?1:g;e=(g|0)>0;if(e){d=b+7592|0;f=0;do{ah((c[d>>2]|0)+((R(f+h|0,k)|0)+j)|0,1,g|0)|0;f=f+1|0}while((f|0)<(g|0));if((c[i+31244>>2]|0)==1&e){d=0;do{e=(R(d+h|0,k)|0)+j|0;f=0;do{a[l+((e+f|0)*12|0)+10>>0]=0;f=f+1|0}while((f|0)<(g|0));d=d+1|0}while((d|0)<(g|0))}}return}function zc(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;t=l;l=l+32|0;q=t;s=1<>2]|0;j=c[y+32>>2]|0;m=R(j,f)|0;k=b+200|0;i=c[k>>2]|0;h=c[i+56>>2]|0;m=(c[y>>2]|0)+((e<>2]|0;u=c[i+13184>>2]|0;o=R(f>>u,n)|0;v=c[i+13172>>2]|0;o=(c[y+4>>2]|0)+((e>>v<>2]|0;w=c[i+13188>>2]|0;r=R(f>>w,p)|0;x=c[i+13176>>2]|0;r=(c[y+8>>2]|0)+((e>>x<>0]|0,s<>x,s>>w)|0)+(R(s>>v,s>>u)|0)|0;h=(R(u,d[i+13045>>0]|0)|0)+h|0;i=Fc((c[b+136>>2]|0)+224|0,h+7>>3)|0;if(!(a[b+3049>>0]|0))Sb(b,e,f,g);e=Gc(q,i,h)|0;if((e|0)>=0){y=b+5852|0;Ga[c[y>>2]&3](m,j,s,s,q,d[(c[k>>2]|0)+13044>>0]|0);e=c[k>>2]|0;Ga[c[y>>2]&3](o,n,s>>c[e+13172>>2],s>>c[e+13184>>2],q,d[e+13045>>0]|0);e=c[k>>2]|0;Ga[c[y>>2]&3](r,p,s>>c[e+13176>>2],s>>c[e+13188>>2],q,d[e+13045>>0]|0);e=0}l=t;return e|0}function Ac(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+16|0;p=s;r=c[b+136>>2]|0;j=(c[r+31248>>2]|0)==3;h=1<>0]=pb(b)|0;f=f+1|0}while((f|0)<(q|0));g=g+1|0}while((g|0)<(q|0));h=h>>(j&1);i=r+31264|0;j=r+31260|0;f=0;do{k=f<<1;m=(R(f,h)|0)+e|0;g=0;do{n=g+k|0;o=a[p+n>>0]|0;if(!(o<<24>>24))c[i>>2]=rb(b)|0;else c[j>>2]=qb(b)|0;a[r+31268+n>>0]=Ec(b,(R(g,h)|0)+d|0,m,h,o&255)|0;g=g+1|0}while((g|0)<(q|0));f=f+1|0}while((f|0)<(q|0));switch(c[(c[b+200>>2]|0)+4>>2]|0){case 3:{h=0;do{j=h<<1;i=0;do{g=sb(b)|0;k=i+j|0;a[r+31281+k>>0]=g;f=a[r+31268+k>>0]|0;if((g|0)!=4){p=a[1787+g>>0]|0;f=f<<24>>24==p<<24>>24?34:p}a[r+31277+k>>0]=f;i=i+1|0}while((i|0)<(q|0));h=h+1|0}while((h|0)<(q|0));break}case 2:{g=sb(b)|0;a[r+31281>>0]=g;f=a[r+31268>>0]|0;if((g|0)!=4){b=a[1787+g>>0]|0;f=f<<24>>24==b<<24>>24?34:b}a[r+31277>>0]=a[1791+(f&255)>>0]|0;break}case 0:break;default:{g=sb(b)|0;f=a[r+31268>>0]|0;if((g|0)!=4){b=a[1787+g>>0]|0;f=f<<24>>24==b<<24>>24?34:b}a[r+31277>>0]=f}}l=s;return}function Bc(b,e,f,g,h,i,j,k,m,n,o,p,q){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+16|0;B=E+8|0;C=E;A=c[b+136>>2]|0;r=c[p>>2]|0;c[B>>2]=r;s=c[p+4>>2]|0;v=B+4|0;c[v>>2]=s;x=c[q>>2]|0;c[C>>2]=x;q=c[q+4>>2]|0;w=C+4|0;c[w>>2]=q;u=a[A+31254>>0]|0;if(u<<24>>24){if((n|0)==1){c[A+288>>2]=d[A+31268+o>>0];p=(c[(c[b+200>>2]|0)+4>>2]|0)==3?o:0;D=5}}else{c[A+288>>2]=d[A+31268>>0];p=0;D=5}if((D|0)==5){c[A+292>>2]=d[A+31277+p>>0];c[A+296>>2]=d[A+31281+p>>0]}y=b+200|0;p=c[y>>2]|0;t=(c[p+13076>>2]|0)>>>0>>0;if(((!t?(c[p+13072>>2]|0)>>>0>>0:0)?(d[A+31255>>0]|0)>(n|0):0)?!((n|0)==0&u<<24>>24!=0):0)t=(zb(b,m)|0)&255;else{if((c[p+13088>>2]|0)==0?(c[A+31244>>2]|0)==0:0)p=(n|0)==0&(c[A+31248>>2]|0)!=0;else p=0;if(t)p=1;else p=p|(n|0)==0&u<<24>>24!=0;t=p&1}p=c[(c[y>>2]|0)+4>>2]|0;if((m|0)>2)if(!p)p=x;else D=20;else if((p|0)==3)D=20;else p=x;if((D|0)==20){p=(n|0)!=0;if(!(p&(r|0)==0)){r=Ab(b,n)|0;c[B>>2]=r;if((c[(c[y>>2]|0)+4>>2]|0)==2?(m|0)==3|t<<24>>24==0:0){s=Ab(b,n)|0;c[v>>2]=s}}else r=0;if(!(p&(x|0)==0)){p=Ab(b,n)|0;c[C>>2]=p;if((c[(c[y>>2]|0)+4>>2]|0)==2?(m|0)==3|t<<24>>24==0:0){q=Ab(b,n)|0;c[w>>2]=q}}else p=0}if(!(t<<24>>24)){y=c[y>>2]|0;t=c[y+13072>>2]|0;u=1<>2]|0;if(((r|n|p|0)==0?(c[A+31244>>2]|0)!=1:0)?((q|s|0)==0?1:(c[y+4>>2]|0)!=2):0)q=1;else q=Bb(b,n)|0;p=Cc(b,e,f,g,h,i,j,k,m,o,q,B,C)|0;if((p|0)>=0){if(q|0?(z=1<>t,v)|0;p=0;do{a[(c[r>>2]|0)+((p+e>>t)+s)>>0]=1;p=p+u|0}while((p|0)<(z|0));q=q+u|0}while((q|0)<(z|0))}if(((a[b+3049>>0]|0)==0?(Sb(b,e,f,m),(a[(c[b+204>>2]|0)+40>>0]|0)!=0):0)?(a[A+31256>>0]|0)!=0:0){wc(b,e,f,m);D=47}else D=47}}else{r=m+-1|0;t=1<=0){p=Bc(b,s,f,e,f,i,j,k,r,q,1,B,C)|0;if((p|0)>=0){p=Bc(b,e,t,e,f,i,j,k,r,q,2,B,C)|0;if((p|0)>=0){p=Bc(b,s,t,e,f,i,j,k,r,q,3,B,C)|0;if((p|0)>-1)D=47}}}}if((D|0)==47)p=0;l=E;return p|0}function Cc(d,e,f,g,h,i,j,k,l,m,n,o,p){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;B=c[d+136>>2]|0;E=d+200|0;C=l-(c[(c[E>>2]|0)+13172>>2]|0)|0;D=B+31244|0;r=1<>2]|0)==1){_d(d,e,f,r,r);Rc(d,e,f,l,0)}z=(n|0)!=0;n=(c[o>>2]|0)==0;do if(z)if(n)w=10;else{r=1;w=14}else if(n?(c[p>>2]|0)==0:0){q=c[E>>2]|0;n=c[q+4>>2]|0;if((n|0)==2){if(c[o+4>>2]|0){w=10;break}if(c[p+4>>2]|0){w=10;break}}if(!((n|0)==0|(c[D>>2]|0)!=1)){if((l|0)>2|(n|0)==3){r=1<<(c[q+13172>>2]|0)+C;q=1<<(c[q+13184>>2]|0)+C;_d(d,e,f,r,q);Rc(d,e,f,C,1);Rc(d,e,f,C,2);n=(1<>2]|0)+4>>2]|0)!=2){n=0;break}_d(d,e,n,r,q);Rc(d,e,n,C,1);Rc(d,e,n,C,2);n=0;break}if((m|0)==3?(s=1<>2]|0)+l,_d(d,g,h,s,t),Rc(d,g,h,l,1),Rc(d,g,h,l,2),u=r+h|0,(c[(c[E>>2]|0)+4>>2]|0)==2):0){_d(d,g,u,s,t);Rc(d,g,u,l,1);Rc(d,g,u,l,2);n=0}else n=0}else n=0}else{r=1;w=14}while(0);if((w|0)==10)if(!(c[p>>2]|0))if((c[(c[E>>2]|0)+4>>2]|0)==2)if(!(c[o+4>>2]|0)){r=(c[p+4>>2]|0)!=0;w=14}else{r=1;w=14}else{r=0;w=14}else{r=1;w=14}a:do if((w|0)==14){s=d+204|0;if(a[(c[s>>2]|0)+22>>0]|0?(v=B+300|0,(a[v>>0]|0)==0):0){A=hb(d)|0;q=B+280|0;c[q>>2]=A;if(A){A=(ib(d)|0)==1;n=c[q>>2]|0;if(A){n=0-n|0;c[q>>2]=n}}else n=0;a[v>>0]=1;A=(c[(c[E>>2]|0)+13192>>2]|0)/2|0;if((n|0)<(-26-A|0)|(n|0)>(A+25|0)){n=-1094995529;break}Qb(d,i,j,k)}if((r&(a[d+3068>>0]|0)!=0?(a[B+31256>>0]|0)==0:0)?(x=B+301|0,(a[x>>0]|0)==0):0){if(!(jb(d)|0)){a[B+302>>0]=0;n=0}else{n=c[s>>2]|0;if(!(a[n+1633>>0]|0))q=0;else{q=kb(d)|0;n=c[s>>2]|0}a[B+302>>0]=a[n+1634+q>>0]|0;n=a[n+1639+q>>0]|0}a[B+303>>0]=n;a[x>>0]=1}if((l|0)<4&(c[D>>2]|0)==1){n=c[B+288>>2]|0;A=c[B+292>>2]|0;A=(A+-6|0)>>>0<9?2:(A+-22|0)>>>0<9&1;n=(n+-6|0)>>>0<9?2:(n+-22|0)>>>0<9&1}else{A=0;n=0}y=B+304|0;a[y>>0]=0;if(z)Eb(d,e,f,l,n,0);q=c[E>>2]|0;n=c[q+4>>2]|0;if(!n)n=0;else{if(!((l|0)>2|(n|0)==3)){if((m|0)!=3){n=0;break}s=1<>2]|0)+l;n=0;do{q=(n<>2]|0)==1){_d(d,g,q,s,r);Rc(d,g,q,l,1)}if(c[o+(n<<2)>>2]|0)Eb(d,g,q,l,A,1);n=n+1|0}while((n|0)<(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0));n=0;while(1){q=(n<>2]|0)==1){_d(d,g,q,s,r);Rc(d,g,q,l,2)}if(c[p+(n<<2)>>2]|0)Eb(d,g,q,l,A,2);n=n+1|0;if((n|0)>=(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0)){n=0;break a}}}x=1<<(c[q+13172>>2]|0)+C;w=1<<(c[q+13184>>2]|0)+C;do if(z&(a[(c[s>>2]|0)+1630>>0]|0)!=0){if(c[D>>2]|0){l=(c[B+296>>2]|0)==4;a[y>>0]=l&1;if(!l)break}else a[y>>0]=1;Dc(d,0)}else a[y>>0]=0;while(0);t=d+160|0;u=B+320|0;i=B+11680|0;v=1<0;k=d+5856+(C+-2<<2)|0;s=B+284|0;n=0;do{q=(n<>2]|0)==1){_d(d,e,q,x,w);Rc(d,e,q,C,1)}if(!(c[o+(n<<2)>>2]|0)){if(a[y>>0]|0){l=c[t>>2]|0;q=c[l+36>>2]|0;B=c[E>>2]|0;r=R(f>>c[B+13184>>2],q)|0;r=(c[l+4>>2]|0)+((e>>c[B+13172>>2]<>2])+r)|0;if(j){n=0;do{b[i+(n<<1)>>1]=(R(b[u+(n<<1)>>1]|0,c[s>>2]|0)|0)>>>3;n=n+1|0}while((n|0)!=(v|0));n=v}else n=0;Da[c[k>>2]&7](r,i,q)}}else Eb(d,e,q,C,A,1);n=n+1|0}while((n|0)<(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0));if(!(a[y>>0]|0))n=0;else{Dc(d,1);n=0}do{q=(n<>2]|0)==1){_d(d,e,q,x,w);Rc(d,e,q,C,2)}if(!(c[p+(n<<2)>>2]|0)){if(a[y>>0]|0){B=c[t>>2]|0;q=c[B+40>>2]|0;o=c[E>>2]|0;r=R(f>>c[o+13188>>2],q)|0;r=(c[B+8>>2]|0)+((e>>c[o+13176>>2]<>2])+r)|0;if(j){n=0;do{b[i+(n<<1)>>1]=(R(b[u+(n<<1)>>1]|0,c[s>>2]|0)|0)>>>3;n=n+1|0}while((n|0)!=(v|0));n=v}else n=0;Da[c[k>>2]&7](r,i,q)}}else Eb(d,e,q,C,A,2);n=n+1|0}while((n|0)<(((c[(c[E>>2]|0)+4>>2]|0)==2?2:1)|0));n=0}}while(0);return n|0}function Dc(a,b){a=a|0;b=b|0;var d=0,e=0;e=c[a+136>>2]|0;d=Cb(a,b)|0;if(!d)a=0;else a=1-((Db(a,b)|0)<<1)<>2]=a;return}function Ec(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+16|0;o=t;m=c[b+136>>2]|0;i=c[b+200>>2]|0;n=c[i+13084>>2]|0;q=e>>n;r=f>>n;s=c[i+13156>>2]|0;n=g>>n;i=c[i+13080>>2]|0;g=(1<>0]|0)!=0|(g&f|0)!=0){j=(R(r+-1|0,s)|0)+q|0;j=d[(c[b+7592>>2]|0)+j>>0]|0}else j=1;if((g&e|0)!=0|(a[m+308>>0]|0)!=0){e=q+-1+(R(r,s)|0)|0;e=d[(c[b+7592>>2]|0)+e>>0]|0}else e=1;p=c[(c[b+3508>>2]|0)+16>>2]|0;g=(f>>i<>>0<2){c[o>>2]=0;c[o+4>>2]=1;i=26;j=0;g=1;break}else{c[o>>2]=e;g=(e+29&31)+2|0;c[o+4>>2]=g;i=(e+31&31)+2|0;j=e;break}else{c[o>>2]=e;c[o+4>>2]=g;if((g|0)==0|(e|0)==0){i=(e|0)==1?26:(g|0)!=1?1:26;j=e}else{i=0;j=e}}while(0);k=o+8|0;c[k>>2]=i;if(!h){f=o+4|0;if((j|0)>(g|0)){e=g&255;c[f>>2]=j;c[o>>2]=e;g=j}else e=j;if((e|0)>(i|0)){h=i&255;c[k>>2]=e;c[o>>2]=h;i=e;e=h}if((g|0)>(i|0)){c[k>>2]=g;c[f>>2]=i&255}g=c[m+31264>>2]|0;g=((g|0)>=(e|0)&1)+g|0;e=1;do{g=((g|0)>=(c[o+(e<<2)>>2]|0)&1)+g|0;e=e+1|0}while((e|0)!=3)}else g=c[o+(c[m+31260>>2]<<2)>>2]|0;h=(n|0)==0?1:n;if((h|0)>0){k=b+7592|0;j=g&255;i=0;do{ah((c[k>>2]|0)+((R(i+r|0,s)|0)+q)|0,j|0,h|0)|0;f=i+q|0;e=0;do{a[p+((f+(R(e+r|0,s)|0)|0)*12|0)+10>>0]=0;e=e+1|0}while((e|0)<(h|0));i=i+1|0}while((i|0)<(h|0))}l=t;return g|0}function Fc(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+16>>2]|0;e=c[a>>2]|0;d=(e&1|0)==0?d:d+-1|0;d=(e&511|0)==0?d:d+-1|0;e=(c[a+20>>2]|0)-d|0;if((e|0)<(b|0))d=0;else Qe(a,d+b|0,e-b|0);return d|0}function Gc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=(b|0)!=0&d>>>0<2147483640;d=e?d:0;b=e?b:0;c[a>>2]=b;c[a+12>>2]=d;c[a+16>>2]=d+8;c[a+4>>2]=b+(d+7>>3);c[a+8>>2]=0;return (e?0:-1094995529)|0}function Hc(e,f,g,h,i,j,k,l,m,n,o){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;v=c[e+136>>2]|0;s=c[h>>2]|0;h=c[h+32>>2]|0;r=c[e+200>>2]|0;t=c[r+13120>>2]|0;u=c[r+13124>>2]|0;p=b[i>>1]|0;z=p&3;i=b[i+2>>1]|0;w=i&3;switch(c[e+2428>>2]|0){case 1:{y=(a[(c[e+204>>2]|0)+37>>0]|0)!=0;break}case 0:{y=(a[(c[e+204>>2]|0)+38>>0]|0)!=0;break}default:y=0}x=d[1717+l>>0]|0;q=(p>>2)+j|0;p=(i>>2)+k|0;j=R(p,h)|0;i=c[r+56>>2]|0;j=s+((q<>2]&1](v+320|0,j+(0-((h*3|0)+k))|0,s,h,l+7|0,m+7|0,q+-3|0,p+-3|0,t,u);j=(s*3|0)+k+(v+320)|0;h=s}i=(w|0)!=0&1;p=(z|0)!=0&1;if(y)ua[c[e+6248+(x<<4)+(i<<3)+(p<<2)>>2]&7](f,g,j,h,m,d[e+3101>>0]|0,n,o,z,w,l);else Ea[c[e+6088+(x<<4)+(i<<3)+(p<<2)>>2]&7](f,g,j,h,m,z,w,l);return}function Ic(e,f,g,h,i,j,k,l,m,n,o,p,q){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;u=c[e+136>>2]|0;t=c[e+200>>2]|0;r=c[t+13172>>2]|0;v=c[t+13120>>2]>>r;s=c[t+13184>>2]|0;w=c[t+13124>>2]>>s;switch(c[e+2428>>2]|0){case 1:{B=(a[(c[e+204>>2]|0)+37>>0]|0)!=0;break}case 0:{B=(a[(c[e+204>>2]|0)+38>>0]|0)!=0;break}default:B=0}C=d[1717+m>>0]|0;E=b[o+(j<<2)>>1]|0;D=r+2|0;A=E&(1<>1]|0;j=s+2|0;y=o&(1<>D)+k|0;j=(o>>j)+l|0;r=R(j,i)|0;o=c[t+56>>2]|0;r=h+(r+(s<>2]&1](u+320|0,r+(0-(D+i))|0,E,i,m+3|0,n+3|0,s+-1|0,j+-1|0,v,w);r=E+D+(u+320)|0;i=E}j=(A|0)!=0&1;o=(y|0)!=0&1;if(B)ua[c[e+7048+(C<<4)+(o<<3)+(j<<2)>>2]&7](f,g,r,i,n,b[e+3102>>1]|0,p,q,z,x,m);else Ea[c[e+6888+(C<<4)+(o<<3)+(j<<2)>>2]&7](f,g,r,i,n,z,x,m);return}function Jc(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;j=l;l=l+16|0;g=j;ic(b);f=Pc(b,e)|0;if((f|0)<0){ic(b);c[b+200>>2]=0}else{h=b+4|0;i=c[h>>2]|0;c[i+124>>2]=c[e+13120>>2];c[i+128>>2]=c[e+13124>>2];c[i+116>>2]=c[e+12>>2];c[i+120>>2]=c[e+16>>2];c[i+136>>2]=c[e+60>>2];c[i+172>>2]=c[e+76+(((c[e+72>>2]|0)+-1|0)*12|0)+4>>2];i=e+160|0;c[g>>2]=c[i>>2];c[g+4>>2]=c[i+4>>2];if(!(c[e+176>>2]|0))f=1;else f=c[e+184>>2]|0?2:1;i=c[h>>2]|0;c[i+392>>2]=f;if(!(c[e+188>>2]|0)){f=2;g=2;h=2}else{f=d[e+194>>0]|0;g=d[e+193>>0]|0;h=d[e+192>>0]|0}c[i+380>>2]=h;c[i+384>>2]=g;c[i+388>>2]=f;g=e+52|0;ld(b+5852|0,c[g>>2]|0);bf(b+7560|0,c[g>>2]|0);g=b+200|0;if(a[e+12941>>0]|0){f=c[g>>2]|0;h=c[f+4>>2]|0?3:1;i=(1<>2])+2|0;i=R(i,i)|0;c[b+168>>2]=cf(i<>2])|0;f=0;do{i=c[g>>2]|0;k=c[i+13124>>2]>>c[i+13180+(f<<2)>>2];m=R(c[i+13120>>2]>>c[i+13168+(f<<2)>>2]<<1,c[i+13132>>2]|0)|0;c[b+172+(f<<2)>>2]=cf(m<>2])|0;i=c[g>>2]|0;k=R(k<<1,c[i+13128>>2]|0)|0;c[b+184+(f<<2)>>2]=cf(k<>2])|0;f=f+1|0}while((f|0)<(h|0))}c[g>>2]=e;c[b+196>>2]=c[(c[b+208+(c[e>>2]<<2)>>2]|0)+4>>2];f=0}l=j;return f|0}function Kc(b,f,g){b=b|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;n=c[b+200>>2]|0;o=n+64|0;p=c[o>>2]|0;q=f+160|0;a[q>>0]=0;if(a[n+12942>>0]|0){m=n+13040|0;if(!(a[m>>0]|0))l=0;else l=Ye(g)|0;h=Ye(g)|0;k=$g(h|0,0,l|0,0)|0;j=C;if(!(j>>>0>0|(j|0)==0&k>>>0>32)){k=h+l|0;a[q>>0]=k;if(!(k&255))h=0;else{k=b+5816|0;j=b+2432|0;i=0;h=0;do{if(i>>>0>>0){b=a[m>>0]|0;if((b&255)>1){s=((b&255)<<1)+-2|0;b=s>>>0>65535;s=b?s>>>16:s;b=b?16:0;r=(s&65280|0)==0;b=Te(g,(d[2511+(r?s:s>>>8)>>0]|0)+(r?b:b|8)|0)|0}else b=0;b=b&255;c[f+(i<<2)>>2]=e[n+12944+(b<<1)>>1];b=a[n+13008+b>>0]|0}else{c[f+(i<<2)>>2]=Te(g,c[o>>2]|0)|0;b=(We(g)|0)&255}a[f+128+i>>0]=b;if(((We(g)|0)&255)<<24>>24){s=Ye(g)|0;h=s+((i|0)==0|(i|0)==(l|0)?0:h)|0;s=f+(i<<2)|0;c[s>>2]=(c[k>>2]|0)-(h<>2]|0)+(c[s>>2]|0)}i=i+1|0}while((i|0)<(d[q>>0]|0));h=0}}else h=-1094995529}else h=0;return h|0}function Lc(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+32|0;k=p+16|0;n=p;o=e+3101|0;a[o>>0]=Ye(f)|0;i=e+200|0;if(c[(c[i>>2]|0)+4>>2]|0){m=Mc(f)|0;m=(d[o>>0]|0)+m|0;b[e+3102>>1]=(m|0)<0?0:((m|0)<7?m:7)&65535}m=e+3036|0;if(!(c[m>>2]|0))h=0;else{g=0;do{h=(We(f)|0)&255;a[k+g>>0]=h;if(!(h<<24>>24)){b[e+3104+(g<<1)>>1]=1<>0];b[e+3296+(g<<1)>>1]=0}g=g+1|0;h=c[m>>2]|0}while(g>>>0>>0)}g=(h|0)!=0;if(!(c[(c[i>>2]|0)+4>>2]|0)){if(g){ah(n|0,0,h|0)|0;j=12}}else if(g){g=0;do{a[n+g>>0]=We(f)|0;g=g+1|0;h=c[m>>2]|0}while(g>>>0>>0);if(h|0)j=12}if((j|0)==12){i=e+3102|0;h=0;do{if(a[k+h>>0]|0){j=Mc(f)|0;b[e+3104+(h<<1)>>1]=(1<>0])+j;b[e+3296+(h<<1)>>1]=Mc(f)|0}if(!(a[n+h>>0]|0)){j=1<>1]&65535;b[e+3136+(h<<2)>>1]=j;b[e+3328+(h<<2)>>1]=0;b[e+3136+(h<<2)+2>>1]=j;b[e+3328+(h<<2)+2>>1]=0}else{g=0;do{j=Mc(f)|0;q=Mc(f)|0;j=(1<>1])+j|0;b[e+3136+(h<<2)+(g<<1)>>1]=j;j=q-(j<<16>>9>>b[i>>1])+128|0;b[e+3328+(h<<2)+(g<<1)>>1]=(j|0)<-128?-128:((j|0)<127?j:127)&65535;g=g+1|0}while((g|0)!=2)}h=h+1|0}while(h>>>0<(c[m>>2]|0)>>>0)}l=p;return}function Mc(a){a=a|0;return $e(a)|0}function Nc(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(Oc(a)|0)|0}function Oc(a){a=a|0;return c[a+8>>2]|0}function Pc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=c[b+13064>>2]|0;j=c[b+13120>>2]|0;o=c[b+13124>>2]|0;d=R((o>>d)+1|0,(j>>d)+1|0)|0;e=R(c[b+13132>>2]|0,c[b+13128>>2]|0)|0;f=b+13156|0;g=b+13160|0;h=R(c[g>>2]|0,c[f>>2]|0)|0;i=a+5840|0;c[i>>2]=(j>>2)+1;j=a+5844|0;c[j>>2]=(o>>2)+1;o=a+3492|0;c[o>>2]=pf(e,148)|0;p=pf(e,8)|0;c[a+3496>>2]=p;if((((((((!((p|0)==0|(c[o>>2]|0)==0)?(q=b+13144|0,o=b+13140|0,p=a+7584|0,c[p>>2]=cf(R(c[o>>2]|0,c[q>>2]|0)|0)|0,o=of(c[q>>2]|0,c[o>>2]|0)|0,c[a+7588>>2]=o,!((o|0)==0|(c[p>>2]|0)==0)):0)?(k=a+7596|0,c[k>>2]=of(c[b+13148>>2]|0,c[b+13152>>2]|0)|0,q=a+7592|0,c[q>>2]=lf(h)|0,l=cf(R((c[g>>2]|0)+1|0,(c[f>>2]|0)+1|0)|0)|0,c[a+7600>>2]=l,(c[q>>2]|0)!=0):0)?!((l|0)==0|(c[k>>2]|0)==0):0)?(m=a+7604|0,c[m>>2]=cf(e)|0,n=a+7580|0,c[n>>2]=of(d,4)|0,q=of(d,1)|0,c[a+7568>>2]=q,(q|0)!=0):0)?(c[m>>2]|0)!=0:0)?(c[n>>2]|0)!=0:0)?(q=a+7572|0,c[q>>2]=pf(c[i>>2]|0,c[j>>2]|0)|0,p=pf(c[i>>2]|0,c[j>>2]|0)|0,c[a+7576>>2]=p,!((p|0)==0|(c[q>>2]|0)==0)):0)?(q=a+1428|0,c[q>>2]=yf(h*12|0,3)|0,p=yf(e*392|0,3)|0,c[a+1432>>2]=p,!((p|0)==0|(c[q>>2]|0)==0)):0)a=0;else{ic(a);a=-12}return a|0}function Qc(b){b=b|0;var d=0,e=0,f=0,g=0;f=c[b+60>>2]|0;c[f+4>>2]=b;d=lf(31328)|0;c[f+136>>2]=d;a:do if(((d|0)!=0?(c[f+72>>2]=d,c[f+8>>2]=f,e=cf(199)|0,c[f+152>>2]=e,(e|0)!=0):0)?(e=Mf()|0,c[f+164>>2]=e,(e|0)!=0):0){d=0;do{e=Mf()|0;c[f+3512+(d*72|0)>>2]=e;if(!e){g=7;break a}c[f+3512+(d*72|0)+4>>2]=e;d=d+1|0}while(d>>>0<32);c[f+5836>>2]=2147483647;a[f+7721>>0]=1;c[f+5828>>2]=0;d=0}else g=7;while(0);if((g|0)==7){gc(b)|0;d=-12}return d|0}function Rc(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0;sa=l;l=l+272|0;ga=sa+195|0;ia=sa+130|0;ca=sa+65|0;ja=sa;ma=c[b+136>>2]|0;na=c[b+200>>2]|0;X=c[na+13168+(h<<2)>>2]|0;W=c[na+13180+(h<<2)>>2]|0;oa=1<>2]|0;t=oa<>2]|0;n=e>>i&m;o=f>>i&m;s=c[b+204>>2]|0;p=c[s+1684>>2]|0;q=m+2|0;r=c[p+((R(o,q)|0)+n<<2)>>2]|0;qa=c[b+160>>2]|0;pa=c[qa+32+(h<<2)>>2]|0;F=0-pa|0;qa=(c[qa+(h<<2)>>2]|0)+(e>>X)+(R(pa,f>>W)|0)|0;Y=c[na+13156>>2]|0;aa=(h|0)==0;ra=c[(aa?ma+288|0:ma+292|0)>>2]|0;k=ga+1|0;j=ca+1|0;ka=ia+1|0;la=ja+1|0;if(!(c[ma+31288>>2]|0))v=0;else v=(r|0)>(c[p+(n+-1+(R(o+(t>>i)&m,q)|0)<<2)>>2]|0);w=v&1;x=c[ma+31292>>2]|0;z=c[ma+31300>>2]|0;C=c[ma+31296>>2]|0;if(!(c[ma+31304>>2]|0))A=0;else A=(r|0)>(c[p+((R(q,o+-1|0)|0)+(m&n+(u>>i))<<2)>>2]|0);n=A&1;N=(t<<1)+f|0;L=na+13124|0;D=c[L>>2]|0;M=t+f|0;N=((N|0)>(D|0)?D:N)-M>>W;D=(u<<1)+e|0;J=na+13120|0;I=c[J>>2]|0;K=u+e|0;D=((D|0)>(I|0)?I:D)-K>>X;I=s+20|0;if((a[I>>0]|0)==1){B=c[na+13084>>2]|0;t=t>>B;y=u>>B;u=(1<>B;q=M>>B;o=(c[na+13160>>2]|0)-q|0;o=(t|0)>(o|0)?o:t;if((o|0)>0){r=c[(c[b+3508>>2]|0)+16>>2]|0;m=0;i=0;do{i=(a[r+(((R(m+q|0,Y)|0)+p|0)*12|0)+10>>0]|0)==0|i;m=m+2|0}while((m|0)<(o|0));w=i}else w=0}if((x|0)==1&s){q=e+-1>>B;r=f>>B;o=(c[na+13160>>2]|0)-r|0;o=(t|0)>(o|0)?o:t;if((o|0)>0){p=c[(c[b+3508>>2]|0)+16>>2]|0;i=0;m=0;do{i=(a[p+(((R(m+r|0,Y)|0)+q|0)*12|0)+10>>0]|0)==0|i;m=m+2|0}while((m|0)<(o|0));s=i}else s=0}else s=x;if((z|0)==1)r=(a[(c[(c[b+3508>>2]|0)+16>>2]|0)+(((R(f+-1>>B,Y)|0)+(e+-1>>B)|0)*12|0)+10>>0]|0)==0&1;else r=z;if((C|0)==1&u){i=e>>B;p=Y-i|0;p=(y|0)>(p|0)?p:y;if((p|0)>0){q=c[(c[b+3508>>2]|0)+16>>2]|0;o=(R(f+-1>>B,Y)|0)+i|0;i=0;m=0;do{i=(a[q+((o+m|0)*12|0)+10>>0]|0)==0|i;m=m+2|0}while((m|0)<(p|0));q=i}else q=0}else q=C;if(A&u){i=K>>B;o=Y-i|0;o=(y|0)>(o|0)?o:y;if((o|0)>0){p=c[(c[b+3508>>2]|0)+16>>2]|0;n=(R(f+-1>>B,Y)|0)+i|0;i=0;m=0;do{i=(a[p+((n+m|0)*12|0)+10>>0]|0)==0|i;m=m+2|0}while((m|0)<(o|0));n=i}else n=0}i=k;m=i+64|0;do{a[i>>0]=128;i=i+1|0}while((i|0)<(m|0));i=ca;m=i+65|0;do{a[i>>0]=128;i=i+1|0}while((i|0)<(m|0));z=r;x=s;C=q;p=n}else p=n;B=(z|0)!=0;if(B){T=a[qa+~pa>>0]|0;a[ga>>0]=T;a[ca>>0]=T}P=(C|0)!=0;if(P)fh(j|0,qa+F|0,oa|0)|0;T=(p|0)!=0;if(T?(E=j+oa|0,fh(E|0,qa+F+oa|0,oa|0)|0,G=R(d[qa+(oa+-1-pa+D)>>0]|0,16843009)|0,H=oa-D|0,(H|0)>0):0){m=E+D|0;i=0;do{F=m+i|0;a[F>>0]=G;a[F+1>>0]=G>>8;a[F+2>>0]=G>>16;a[F+3>>0]=G>>24;i=i+4|0}while((i|0)<(H|0))}A=(x|0)!=0;if(A&(g|0)!=31){i=0;do{a[k+i>>0]=a[qa+((R(i,pa)|0)+-1)>>0]|0;i=i+1|0}while((i|0)<(oa|0))}y=(w|0)!=0;if(y){m=N+oa|0;if((N|0)>0){i=oa;do{a[k+i>>0]=a[qa+((R(i,pa)|0)+-1)>>0]|0;i=i+1|0}while((i|0)<(m|0))}m=R(d[qa+((R(m+-1|0,pa)|0)+-1)>>0]|0,16843009)|0;n=oa-N|0;if((n|0)>0){o=k+oa+N|0;i=0;do{H=o+i|0;a[H>>0]=m;a[H+1>>0]=m>>8;a[H+2>>0]=m>>16;a[H+3>>0]=m>>24;i=i+4|0}while((i|0)<(n|0))}}if((a[I>>0]|0)==1?(O=w|x,Q=(O|0)!=0,O=O|z,C|p|O|0):0){I=oa<<1;J=c[J>>2]|0;w=J-e>>X;L=c[L>>2]|0;v=L-f>>W;w=T?(((I<0){m=c[(c[b+3508>>2]|0)+16>>2]|0;n=c[na+13084>>2]|0;o=R((-1<>n,Y)|0;i=0;do{if(!(a[m+((o+((i<>n)|0)*12|0)+10>>0]|0))break;i=i+1|0}while((i|0)<(w|0));if((i|0)>0){n=(c[b+3508>>2]|0)+16|0;o=na+13084|0;p=(-1<0)while(1){m=i;i=i+-1|0;V=c[o>>2]|0;if(a[(c[n>>2]|0)+(((R(p>>V,Y)|0)+((i<>V)|0)*12|0)+10>>0]|0)a[j+i>>0]=a[j+m>>0]|0;if((m|0)<=0){V=71;break a}}do{m=i;i=i+-1|0;V=c[o>>2]|0;if(a[(c[n>>2]|0)+(((R(p>>V,Y)|0)+((i<>V)|0)*12|0)+10>>0]|0)a[j+i>>0]=a[j+m>>0]|0}while((m|0)>1);a[ca>>0]=a[j>>0]|0;V=71}else V=71}else V=71;else{q=na+13084|0;o=c[q>>2]|0;r=(c[b+3508>>2]|0)+16|0;n=c[r>>2]|0;p=(-1<>o;i=(y?N:0)+oa|0;do{O=i;i=i+-1|0;m=(a[n+(((R((i<>o,Y)|0)+p|0)*12|0)+10>>0]|0)==0}while(!((O|0)<1|m));if(m){i=a[ca>>0]|0;break}if((w|0)>0){m=R((-1<>o,Y)|0;i=0;do{if(!(a[n+((m+((i<>o)|0)*12|0)+10>>0]|0))break;i=i+1|0}while((i|0)<(w|0));if((i|0)<=-1){V=71;break}}else i=0;p=(-1<>o,Y)|0)+((m<>o)|0)*12|0)+10>>0]|0)a[j+m>>0]=a[j+i>>0]|0;if((i|0)<=0){V=71;break a}i=m;o=c[q>>2]|0;n=c[r>>2]|0}}while(0);if((V|0)==71){i=a[ca>>0]|0;a[ga>>0]=i}a[ga>>0]=i;if(Q&(v|0)>0){i=R(i&255,16843009)|0;n=(c[b+3508>>2]|0)+16|0;o=(-1<>2]|0;if(!(a[(c[n>>2]|0)+(((R((m<>Q,Y)|0)+(o>>Q)|0)*12|0)+10>>0]|0))i=R(d[k+(m|3)>>0]|0,16843009)|0;else{Q=k+m|0;a[Q>>0]=i;a[Q+1>>0]=i>>8;a[Q+2>>0]=i>>16;a[Q+3>>0]=i>>24}m=m+4|0}while((m|0)<(v|0))}if(!A?(S=R(d[ga>>0]|0,16843009)|0,(g|0)!=31):0){i=0;do{Q=k+i|0;a[Q>>0]=S;a[Q+1>>0]=S>>8;a[Q+2>>0]=S>>16;a[Q+3>>0]=S>>24;i=i+4|0}while((i|0)<(oa|0))}if(!y?(U=R(d[k+(oa+-1)>>0]|0,16843009)|0,(g|0)!=31):0){m=k+oa|0;i=0;do{S=m+i|0;a[S>>0]=U;a[S+1>>0]=U>>8;a[S+2>>0]=U>>16;a[S+3>>0]=U>>24;i=i+4|0}while((i|0)<(oa|0))}u=(f|0)!=0;do if((e|0)!=0&u){o=v+-1|0;r=(c[b+3508>>2]|0)+16|0;i=c[r>>2]|0;s=(-1<>2]|0;n=s>>m;if((v|0)>0){q=o;p=R(d[k+o>>0]|0,16843009)|0;while(1){U=q+-3|0;o=k+U|0;if(!(a[i+(((R((U<>m,Y)|0)+n|0)*12|0)+10>>0]|0))o=R(d[o>>0]|0,16843009)|0;else{a[o>>0]=p;a[o+1>>0]=p>>8;a[o+2>>0]=p>>16;a[o+3>>0]=p>>24;o=p;m=c[t>>2]|0;i=c[r>>2]|0}q=q+-4|0;n=s>>m;if((q|0)<=-1)break;else p=o}}if(a[i+(((R((-1<>m,Y)|0)+n|0)*12|0)+10>>0]|0)a[ga>>0]=a[k>>0]|0}else{if(!e){if((v|0)<=0)break;ah(k|0,0,v+3&-4|0)|0;break}i=v+-1|0;if((v|0)>0){U=R(d[k+i>>0]|0,16843009)|0;o=(c[b+3508>>2]|0)+16|0;p=(-1<>2]|0;S=n+-3|0;m=k+S|0;if(!(a[(c[o>>2]|0)+(((R((S<>U,Y)|0)+(p>>U)|0)*12|0)+10>>0]|0))i=R(d[m>>0]|0,16843009)|0;else{a[m>>0]=i;a[m+1>>0]=i>>8;a[m+2>>0]=i>>16;a[m+3>>0]=i>>24}n=n+-4|0}while((n|0)>-1)}}while(0);i=a[ga>>0]|0;a[ca>>0]=i;if(u&(w|0)>0){i=R(i&255,16843009)|0;o=(c[b+3508>>2]|0)+16|0;p=na+13084|0;n=(-1<>2]|0;if(!(a[(c[o>>2]|0)+(((R(n>>f,Y)|0)+((m<>f)|0)*12|0)+10>>0]|0))i=R(d[j+(m|3)>>0]|0,16843009)|0;else{f=j+m|0;a[f>>0]=i;a[f+1>>0]=i>>8;a[f+2>>0]=i>>16;a[f+3>>0]=i>>24}m=m+4|0}while((m|0)<(w|0))}}b:do if(!y){if(A){m=R(d[k+(oa+-1)>>0]|0,16843009)|0;if((g|0)==31){V=132;break}n=k+oa|0;i=0;while(1){Y=n+i|0;a[Y>>0]=m;a[Y+1>>0]=m>>8;a[Y+2>>0]=m>>16;a[Y+3>>0]=m>>24;i=i+4|0;if((i|0)>=(oa|0)){V=129;break b}}}if(B){m=R(d[ga>>0]|0,16843009)|0;n=oa<<1;if((g|0)==31){V=134;break}else i=0;while(1){Z=k+i|0;a[Z>>0]=m;a[Z+1>>0]=m>>8;a[Z+2>>0]=m>>16;a[Z+3>>0]=m>>24;i=i+4|0;if((i|0)>=(n|0)){V=132;break b}}}if(P){m=a[j>>0]|0;a[ga>>0]=m;m=R(m&255,16843009)|0;n=oa<<1;if((g|0)==31){V=137;break}else i=0;while(1){Z=k+i|0;a[Z>>0]=m;a[Z+1>>0]=m>>8;a[Z+2>>0]=m>>16;a[Z+3>>0]=m>>24;i=i+4|0;if((i|0)>=(n|0)){V=134;break b}}}if(!T){a[ga>>0]=-128;m=oa<<1;if((g|0)==31){V=133;break}ah(j|0,-128,((m|0)>4?m:4)+3&-4|0)|0;i=0;while(1){Y=k+i|0;a[Y>>0]=-2139062144;a[Y+1>>0]=-2139062144>>8;a[Y+2>>0]=-2139062144>>16;a[Y+3>>0]=-2139062144>>24;i=i+4|0;if((i|0)>=(m|0)){V=129;break b}}}m=j+oa|0;i=a[m>>0]|0;n=R(i&255,16843009)|0;o=(g|0)==31;if(o){a[ga>>0]=i;break}else i=0;do{_=j+i|0;a[_>>0]=n;a[_+1>>0]=n>>8;a[_+2>>0]=n>>16;a[_+3>>0]=n>>24;i=i+4|0}while((i|0)<(oa|0));m=a[m>>0]|0;a[ga>>0]=m;m=R(m&255,16843009)|0;n=oa<<1;if(o)V=137;else{i=0;do{_=k+i|0;a[_>>0]=m;a[_+1>>0]=m>>8;a[_+2>>0]=m>>16;a[_+3>>0]=m>>24;i=i+4|0}while((i|0)<(n|0));V=137}}else V=129;while(0);if((V|0)==129)if((x|0)==0?(Z=R(d[k+oa>>0]|0,16843009)|0,(g|0)!=31):0){i=0;do{Y=k+i|0;a[Y>>0]=Z;a[Y+1>>0]=Z>>8;a[Y+2>>0]=Z>>16;a[Y+3>>0]=Z>>24;i=i+4|0}while((i|0)<(oa|0));V=132}else V=132;if((V|0)==132)if(!z)V=133;else V=134;if((V|0)==133){a[ga>>0]=a[k>>0]|0;V=134}if((V|0)==134)if((C|0)==0?(_=R(d[ga>>0]|0,16843009)|0,(g|0)!=31):0){i=0;do{Z=j+i|0;a[Z>>0]=_;a[Z+1>>0]=_>>8;a[Z+2>>0]=_>>16;a[Z+3>>0]=_>>24;i=i+4|0}while((i|0)<(oa|0));V=137}else V=137;if(((V|0)==137?!T:0)?($=R(d[j+(oa+-1)>>0]|0,16843009)|0,(g|0)!=31):0){m=j+oa|0;i=0;do{_=m+i|0;a[_>>0]=$;a[_+1>>0]=$>>8;a[_+2>>0]=$>>16;a[_+3>>0]=$>>24;i=i+4|0}while((i|0)<(oa|0))}s=a[ga>>0]|0;a[ca>>0]=s;c:do if(!(c[na+13112>>2]|0)){if(!aa?(c[na+4>>2]|0)!=3:0)break;if((g|0)!=2&(ra|0)!=1?($=ra+-26|0,$=($|0)>-1?$:26-ra|0,_=ra+-10|0,_=(_|0)>-1?_:10-ra|0,((($|0)>(_|0)?_:$)|0)>(c[252+(g+-3<<2)>>2]|0)):0){if(((g|0)==5&(aa&(a[na+13061>>0]|0)!=0)?(da=s&255,ba=a[ca+64>>0]|0,ea=ba&255,ca=ea+da-(d[ca+32>>0]<<1)|0,(((ca|0)>-1?ca:0-ca|0)|0)<8):0)?(ha=ga+64|0,fa=a[ha>>0]|0,ca=(fa&255)+da-(d[ga+32>>0]<<1)|0,(((ca|0)>-1?ca:0-ca|0)|0)<8):0){a[ja>>0]=s;a[ja+64>>0]=ba;i=0;do{ka=i;i=i+1|0;a[la+ka>>0]=((R(i,ea)|0)+32+(R(63-ka|0,da)|0)|0)>>>6}while((i|0)!=63);a[k>>0]=(((s&255)*63|0)+32+(fa&255)|0)>>>6;i=1;while(1){ka=i;i=i+1|0;a[k+ka>>0]=((R(d[ga>>0]|0,63-ka|0)|0)+32+(R(d[ha>>0]|0,i)|0)|0)>>>6;if((i|0)==63){j=la;break c}}}r=oa<<1;q=r+-1|0;i=a[k+q>>0]|0;a[ka+q>>0]=i;m=a[j+q>>0]|0;a[la+q>>0]=m;r=r+-2|0;q=(r|0)>-1;if(q){p=r;n=a[k+r>>0]|0;while(1){ha=p;p=p+-1|0;o=a[k+p>>0]|0;a[ka+ha>>0]=((i&255)+2+((n&255)<<1)+(o&255)|0)>>>2;if((ha|0)<=0)break;else{i=n;n=o}}}ha=((d[k>>0]|0)+2+((s&255)<<1)+(d[j>>0]|0)|0)>>>2&255;a[ia>>0]=ha;a[ja>>0]=ha;if(q){n=r;i=a[j+r>>0]|0;while(1){ja=n;n=n+-1|0;k=a[j+n>>0]|0;a[la+ja>>0]=((m&255)+2+((i&255)<<1)+(k&255)|0)>>>2;if((ja|0)<=0){k=ka;j=la;break}else{m=i;i=k}}}else{k=ka;j=la}}}while(0);switch(ra|0){case 0:{Sc(qa,j,k,pa,g);break}case 1:{Tc(qa,j,k,pa,g,h);break}default:{if(!(c[na+13104>>2]|0))i=0;else i=(a[ma+31256>>0]|0)!=0;Uc(qa,j,k,pa,h,ra,oa,i&1)}}l=sa;return}function Sc(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;m=1<>0]|0,n-h|0)|0;q=h;h=h+1|0;s=R(d[o>>0]|0,h)|0;r=R(d[c+q>>0]|0,k)|0;a[b+(q+l)>>0]=t+m+s+r+(R(d[p>>0]|0,g)|0)>>i}while((h|0)<(m|0))}while((g|0)<(m|0))}return}function Tc(b,c,e,f,g,h){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;n=1<>0]|0)+i+(d[c+j>>0]|0)|0;j=j+1|0}while((j|0)<(n|0));g=i>>g+1;l=R(g,16843009)|0;if(!k){j=0;do{k=R(j,f)|0;i=0;do{o=b+(i+k)|0;a[o>>0]=l;a[o+1>>0]=l>>8;a[o+2>>0]=l>>16;a[o+3>>0]=l>>24;i=i+4|0}while((i|0)<(n|0));j=j+1|0}while((j|0)<(n|0))}}else g=n>>g+1;if((h|0)==0&(n|0)<32?(a[b>>0]=((g<<1)+2+(d[e>>0]|0)+(d[c>>0]|0)|0)>>>2,m=(n|0)>1,m):0){j=(g*3|0)+2|0;i=1;do{a[b+i>>0]=(j+(d[c+i>>0]|0)|0)>>>2;i=i+1|0}while((i|0)!=(n|0));if(m){j=(g*3|0)+2|0;i=1;do{a[b+(R(i,f)|0)>>0]=(j+(d[e+i>>0]|0)|0)>>>2;i=i+1|0}while((i|0)!=(n|0))}}return}function Uc(c,e,f,g,h,i,j,k){c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;v=l;l=l+112|0;u=a[1826+(i+-2)>>0]|0;q=v+j|0;m=(R(u,j)|0)>>5;o=i+-11|0;p=o>>>0<15&(m|0)<-1;if((i|0)>17){n=e+-1|0;if(p){if((j|0)>=0)fh(q|0,n|0,j+4&-4|0)|0;n=b[384+(o<<1)>>1]|0;while(1){a[q+m>>0]=a[f+(((R(n,m)|0)+128>>8)+-1)>>0]|0;if((m|0)<-1)m=m+1|0;else{n=q;break}}}t=(j|0)>0;if(t){s=0;do{m=s;s=s+1|0;q=R(s,u)|0;p=q>>5;q=q&31;if(!q){p=p+1|0;o=R(m,g)|0;m=0;do{q=n+(p+m)|0;q=d[q>>0]|d[q+1>>0]<<8|d[q+2>>0]<<16|d[q+3>>0]<<24;r=c+(m+o)|0;a[r>>0]=q;a[r+1>>0]=q>>8;a[r+2>>0]=q>>16;a[r+3>>0]=q>>24;m=m+4|0}while((m|0)<(j|0))}else{r=32-q|0;o=R(m,g)|0;m=0;do{w=m+p|0;x=R(d[n+(w+1)>>0]|0,r)|0;a[c+(m+o)>>0]=(x+16+(R(d[n+(w+2)>>0]|0,q)|0)|0)>>>5;w=m|1;x=w+p|0;y=R(d[n+(x+1)>>0]|0,r)|0;a[c+(w+o)>>0]=(y+16+(R(d[n+(x+2)>>0]|0,q)|0)|0)>>>5;w=m|2;x=w+p|0;y=R(d[n+(x+1)>>0]|0,r)|0;a[c+(w+o)>>0]=(y+16+(R(d[n+(x+2)>>0]|0,q)|0)|0)>>>5;w=m|3;x=w+p|0;y=R(d[n+(x+1)>>0]|0,r)|0;a[c+(w+o)>>0]=(y+16+(R(d[n+(x+2)>>0]|0,q)|0)|0)>>>5;m=m+4|0}while((m|0)<(j|0))}}while((s|0)!=(j|0))}if((h|0)==0&(i|0)==26&(j|0)<32&(k|0)==0&t){n=f+-1|0;m=0;do{y=((d[f+m>>0]|0)-(d[n>>0]|0)>>1)+(d[e>>0]|0)|0;a[c+(R(m,g)|0)>>0]=y>>>0>255?0-y>>31:y;m=m+1|0}while((m|0)!=(j|0))}}else{n=f+-1|0;if(p){if((j|0)>=0)fh(q|0,n|0,j+4&-4|0)|0;n=b[384+(o<<1)>>1]|0;while(1){a[q+m>>0]=a[e+(((R(n,m)|0)+128>>8)+-1)>>0]|0;if((m|0)<-1)m=m+1|0;else{n=q;break}}}t=(j|0)>0;if(t){r=0;do{s=r;r=r+1|0;p=R(r,u)|0;o=p>>5;p=p&31;if(!p){o=o+1|0;m=0;do{a[c+((R(m,g)|0)+s)>>0]=a[n+(o+m)>>0]|0;m=m+1|0}while((m|0)!=(j|0))}else{q=32-p|0;m=0;do{y=m+o|0;x=R(d[n+(y+1)>>0]|0,q)|0;a[c+((R(m,g)|0)+s)>>0]=(x+16+(R(d[n+(y+2)>>0]|0,p)|0)|0)>>>5;m=m+1|0}while((m|0)!=(j|0))}}while((r|0)!=(j|0))}if((h|0)==0&(i|0)==10&(j|0)<32&(k|0)==0&t){n=e+-1|0;m=0;do{y=((d[e+m>>0]|0)-(d[n>>0]|0)>>1)+(d[f>>0]|0)|0;a[c+m>>0]=y>>>0>255?0-y>>31:y;y=m|1;x=((d[e+y>>0]|0)-(d[n>>0]|0)>>1)+(d[f>>0]|0)|0;a[c+y>>0]=x>>>0>255?0-x>>31:x;y=m|2;x=((d[e+y>>0]|0)-(d[n>>0]|0)>>1)+(d[f>>0]|0)|0;a[c+y>>0]=x>>>0>255?0-x>>31:x;y=m|3;x=((d[e+y>>0]|0)-(d[n>>0]|0)>>1)+(d[f>>0]|0)|0;a[c+y>>0]=x>>>0>255?0-x>>31:x;m=m+4|0}while((m|0)<(j|0))}}l=v;return}function Vc(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0;g=c[e>>2]|0;if((g|0?c[g+304>>2]|0:0)?(h=e+70|0,g=(d[h>>0]|0)&(f^255)&255,a[h>>0]=g,g<<24>>24==0):0){Le(c[b+4>>2]|0,e+4|0);wf(e+56|0);c[e+16>>2]=0;wf(e+64|0);wf(e+60|0);c[e+24>>2]=0;c[e+20>>2]=0;c[e+36>>2]=0}return}function Wc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;g=c[a+200>>2]|0;f=c[g+13080>>2]|0;e=c[(c[(c[a+204>>2]|0)+1668>>2]|0)+((R(e>>f,c[g+13128>>2]|0)|0)+(d>>f)<<2)>>2]|0;return c[(c[b+24>>2]|0)+(e<<2)>>2]|0}function Xc(a){a=a|0;var b=0;b=0;do{Vc(a,a+3512+(b*72|0)|0,6);b=b+1|0}while((b|0)!=32);return}function Yc(a){a=a|0;var b=0;b=0;do{Vc(a,a+3512+(b*72|0)|0,-1);b=b+1|0}while((b|0)!=32);return}function Zc(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;h=d+7616|0;g=0;while(1){if((c[(c[d+3512+(g*72|0)>>2]|0)+304>>2]|0?(b[d+3512+(g*72|0)+68>>1]|0)==(b[h>>1]|0):0)?(c[d+3512+(g*72|0)+32>>2]|0)==(f|0):0){g=-1094995529;break}g=g+1|0;if(g>>>0>=32){i=6;break}}if((i|0)==6){g=_c(d)|0;if(!g)g=-12;else{c[e>>2]=c[g>>2];c[d+3508>>2]=g;a[g+70>>0]=a[d+2438>>0]|0?3:2;c[g+32>>2]=f;b[g+68>>1]=b[h>>1]|0;g=g+40|0;i=(c[d+200>>2]|0)+20|0;c[g>>2]=c[i>>2];c[g+4>>2]=c[i+4>>2];c[g+8>>2]=c[i+8>>2];c[g+12>>2]=c[i+12>>2];g=0}}return g|0}function _c(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;e=0;while(1){b=a+3512+(e*72|0)|0;if(!(c[(c[b>>2]|0)+304>>2]|0)){d=3;break}b=e+1|0;if(b>>>0<32)e=b;else{b=0;break}}do if((d|0)==3)if((Ke(c[a+4>>2]|0,a+3512+(e*72|0)+4|0,1)|0)<0)b=0;else{d=c[a+200>>2]|0;g=a+3512+(e*72|0)+28|0;c[g>>2]=R(c[d+13132>>2]|0,c[d+13128>>2]|0)|0;d=tf((c[a+7660>>2]|0)*392|0)|0;i=a+3512+(e*72|0)+64|0;c[i>>2]=d;if((d|0?(f=Cf(c[a+1428>>2]|0)|0,c[a+3512+(e*72|0)+56>>2]=f,f|0):0)?(c[a+3512+(e*72|0)+16>>2]=c[f+4>>2],h=Cf(c[a+1432>>2]|0)|0,c[a+3512+(e*72|0)+60>>2]=h,h|0):0){d=c[h+4>>2]|0;f=a+3512+(e*72|0)+24|0;c[f>>2]=d;e=c[g>>2]|0;if((e|0)>0?(c[d>>2]=c[(c[i>>2]|0)+4>>2],(e|0)!=1):0){d=1;do{c[(c[f>>2]|0)+(d<<2)>>2]=c[(c[i>>2]|0)+4>>2];d=d+1|0}while((d|0)<(e|0))}i=c[a+7772>>2]|0;a=c[b>>2]|0;c[a+244>>2]=(i|0)==1&1;c[a+240>>2]=(i+-1|0)>>>0<2&1;break}Vc(a,b,-1);b=0}while(0);return b|0}function $c(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;n=d+3034|0;o=d+7618|0;j=(f|0)==0;k=d+7616|0;l=d+200|0;m=d+5816|0;h=0;while(1){if((a[n>>0]|0)==1){f=0;do{g=d+3512+(f*72|0)|0;if(((a[d+3512+(f*72|0)+70>>0]&8)==0?(c[d+3512+(f*72|0)+32>>2]|0)!=(c[m>>2]|0):0)?(b[d+3512+(f*72|0)+68>>1]|0)==(b[o>>1]|0):0)Vc(d,g,1);f=f+1|0}while((f|0)!=32);f=0;g=2147483647;i=0}else{f=0;g=2147483647;i=0}do{if((a[d+3512+(i*72|0)+70>>0]&1)!=0?(b[d+3512+(i*72|0)+68>>1]|0)==(b[o>>1]|0):0){s=c[d+3512+(i*72|0)+32>>2]|0;r=(s|0)<(g|0);f=f+1|0;g=r?s:g;h=r?i:h}i=i+1|0}while((i|0)!=32);if(((j?(b[o>>1]|0)==(b[k>>1]|0):0)?(p=c[l>>2]|0,p|0):0)?(f|0)<=(c[p+76+(((c[p+72>>2]|0)+-1|0)*12|0)+4>>2]|0):0){f=0;break}if(f|0){q=17;break}f=b[o>>1]|0;if(f<<16>>16==(b[k>>1]|0)){f=0;break}b[o>>1]=(f&65535)+1&255}if((q|0)==17){g=d+3512+(h*72|0)|0;f=Rf(e,c[g>>2]|0)|0;if(!(a[d+3512+(h*72|0)+70>>0]&8))Vc(d,g,1);else Vc(d,g,9);f=(f|0)<0?f:1}return f|0}function ad(e){e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=e+7618|0;i=e+5816|0;g=0;f=0;do{if((a[e+3512+(g*72|0)+70>>0]|0)!=0?(b[e+3512+(g*72|0)+68>>1]|0)==(b[j>>1]|0):0)f=((c[e+3512+(g*72|0)+32>>2]|0)!=(c[i>>2]|0)&1)+f|0;g=g+1|0}while((g|0)!=32);h=c[e+200>>2]|0;if(h|0?(f|0)>=(c[h+76+(((c[h+72>>2]|0)+-1|0)*12|0)>>2]|0):0){f=2147483647;h=0;do{g=a[e+3512+(h*72|0)+70>>0]|0;if(g<<24>>24!=0?(b[e+3512+(h*72|0)+68>>1]|0)==(b[j>>1]|0):0){k=c[e+3512+(h*72|0)+32>>2]|0;f=(k|0)<(f|0)&(g<<24>>24==1?(k|0)!=(c[i>>2]|0):0)?k:f}h=h+1|0}while((h|0)!=32);g=0;do{h=e+3512+(g*72|0)+70|0;i=d[h>>0]|0;if((i&1|0?(b[e+3512+(g*72|0)+68>>1]|0)==(b[j>>1]|0):0)?(c[e+3512+(g*72|0)+32>>2]|0)<=(f|0):0)a[h>>0]=i|8;g=g+1|0}while((g|0)!=32)}return}function bd(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;A=l;l=l+208|0;x=A+12|0;y=A;e=(c[b+2428>>2]|0)==0;d=cd(b)|0;a:do if((d|0)>=0)if(((c[b+1824>>2]|0)+(c[b+1628>>2]|0)|0)==(0-(c[b+2216>>2]|0)|0))d=-1094995529;else{n=e?2:1;o=b+3508|0;p=y+4|0;q=y+8|0;r=x+192|0;s=b+3051|0;t=b+3052|0;m=0;v=0;b:while(1){ah(x|0,0,196)|0;u=c[(c[o>>2]|0)+20>>2]|0;j=u+(v*196|0)|0;w=m<<24>>24!=0;c[y>>2]=w&1;c[p>>2]=(w^1)&1;c[q>>2]=3;w=b+3036+(v<<2)|0;k=c[w>>2]|0;if(!k)g=0;else{d=0;do{i=0;do{f=c[y+(i<<2)>>2]|0;g=c[b+1436+(f*196|0)+192>>2]|0;if((g|0)>0&(d|0)<16){h=(i|0)==2&1;e=0;do{c[x+64+(d<<2)>>2]=c[b+1436+(f*196|0)+64+(e<<2)>>2];c[x+(c[r>>2]<<2)>>2]=c[b+1436+(f*196|0)+(e<<2)>>2];c[x+128+(c[r>>2]<<2)>>2]=h;d=(c[r>>2]|0)+1|0;c[r>>2]=d;e=e+1|0}while((e|0)<(g|0)&(d|0)<16)}i=i+1|0}while((i|0)!=3)}while(d>>>0>>0);g=d}if(a[b+3032+v>>0]|0){if(k|0){e=u+(v*196|0)+192|0;d=0;do{f=c[b+2776+(v<<7)+(d<<2)>>2]|0;if((f|0)>=(g|0))break b;c[u+(v*196|0)+64+(d<<2)>>2]=c[x+64+(f<<2)>>2];c[u+(v*196|0)+(d<<2)>>2]=c[x+(f<<2)>>2];c[u+(v*196|0)+128+(d<<2)>>2]=c[x+128+(f<<2)>>2];c[e>>2]=(c[e>>2]|0)+1;d=d+1|0}while(d>>>0<(c[w>>2]|0)>>>0)}}else{fh(j|0,x|0,196)|0;k=u+(v*196|0)+192|0;j=c[k>>2]|0;w=c[w>>2]|0;c[k>>2]=j>>>0>w>>>0?w:j}if((a[s>>0]|0)==m<<24>>24?(z=c[t>>2]|0,z>>>0<(c[u+(v*196|0)+192>>2]|0)>>>0):0)c[(c[o>>2]|0)+36>>2]=c[u+(v*196|0)+(z<<2)>>2];m=m+1<<24>>24;v=m&255;if(v>>>0>=n>>>0){d=0;break a}}d=-1094995529}while(0);l=A;return d|0}function cd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;i=c[a+3508>>2]|0;g=c[i+28>>2]|0;h=c[(c[(c[a+204>>2]|0)+1668>>2]|0)+(c[a+2420>>2]<<2)>>2]|0;d=c[a+5824>>2]|0;e=i+64|0;b=c[e>>2]|0;if(d>>>0<(((c[b+8>>2]|0)>>>0)/392|0)>>>0){f=i+24|0;a=c[f>>2]|0;if((h|0)<(g|0)){c[a+(h<<2)>>2]=(c[b+4>>2]|0)+(d*392|0);b=h+1|0;a=c[f>>2]|0;if((b|0)!=(g|0))do{c[a+(b<<2)>>2]=(c[(c[e>>2]|0)+4>>2]|0)+(d*392|0);b=b+1|0;a=c[f>>2]|0}while((b|0)!=(g|0))}c[i+20>>2]=c[a+(h<<2)>>2];a=0}else a=-1094995529;return a|0}function dd(b){b=b|0;var e=0,f=0,g=0,h=0,i=0;i=c[b+2608>>2]|0;a:do if(!i){c[b+1824>>2]=0;c[b+1628>>2]=0;e=0}else{f=b+3508|0;e=0;do{g=b+3512+(e*72|0)|0;if((g|0)!=(c[f>>2]|0))ed(g,0);e=e+1|0}while((e|0)!=32);e=0;do{c[b+1436+(e*196|0)+192>>2]=0;e=e+1|0}while((e|0)!=5);g=i+4|0;if((c[g>>2]|0)>0){h=b+5816|0;f=0;do{if(!(a[i+136+f>>0]|0))e=2;else e=f>>>0>=(c[i>>2]|0)>>>0&1;e=fd(b,b+1436+(e*196|0)|0,(c[i+8+(f<<2)>>2]|0)+(c[h>>2]|0)|0,2)|0;f=f+1|0;if((e|0)<0)break a}while((f|0)<(c[g>>2]|0))}g=b+2772|0;if(!(a[g>>0]|0))e=0;else{f=0;while(1){e=fd(b,b+1436+((a[b+2740+f>>0]|0?3:4)*196|0)|0,c[b+2612+(f<<2)>>2]|0,4)|0;f=f+1|0;if((e|0)<0)break a;if((f|0)>=(d[g>>0]|0)){e=0;break}}}do{Vc(b,b+3512+(e*72|0)|0,0);e=e+1|0}while((e|0)!=32);e=0}while(0);return e|0}function ed(b,c){b=b|0;c=c|0;b=b+70|0;a[b>>0]=a[b>>0]&-7&255|c;return}function fd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=gd(a,d)|0;do if((f|0)==(c[a+3508>>2]|0))f=-1094995529;else{if(!f){f=hd(a,d)|0;if(!f){f=-12;break}}d=b+192|0;c[b+64+(c[d>>2]<<2)>>2]=c[f+32>>2];c[b+(c[d>>2]<<2)>>2]=f;c[d>>2]=(c[d>>2]|0)+1;ed(f,e);f=0}while(0);return f|0}function gd(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=(1<>2]|0)+64>>2])+-1|0;h=a+7616|0;f=0;while(1){e=a+3512+(f*72|0)|0;if((c[(c[e>>2]|0)+304>>2]|0?(b[a+3512+(f*72|0)+68>>1]|0)==(b[h>>1]|0):0)?(c[a+3512+(f*72|0)+32>>2]&g|0)==(d|0):0)break;f=f+1|0;if(f>>>0>=32){f=0;i=6;break}}a:do if((i|0)==6)while(1){e=a+3512+(f*72|0)|0;if((c[(c[e>>2]|0)+304>>2]|0?(b[a+3512+(f*72|0)+68>>1]|0)==(b[h>>1]|0):0)?(i=c[a+3512+(f*72|0)+32>>2]|0,(i|0)==(d|0)|(i&g|0)==(d|0)):0)break a;f=f+1|0;if(f>>>0>=32){e=0;break}else i=6}while(0);return e|0}function hd(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=_c(d)|0;if(f){k=d+200|0;i=c[k>>2]|0;h=c[f>>2]|0;if(!(c[i+56>>2]|0)){h=c[h+304>>2]|0;if(h|0?(ah(c[h+4>>2]|0,1<<(c[i+52>>2]|0)+-1&255|0,c[h+8>>2]|0)|0,g=c[(c[f>>2]|0)+308>>2]|0,g|0):0){h=1;do{ah(c[g+4>>2]|0,1<<(c[(c[k>>2]|0)+52>>2]|0)+-1&255|0,c[g+8>>2]|0)|0;h=h+1|0;g=c[(c[f>>2]|0)+304+(h<<2)>>2]|0}while((g|0)!=0)}}else if(c[h>>2]|0){j=0;g=i;do{if((c[g+13124>>2]>>c[g+13180+(j<<2)>>2]|0)>0){i=0;do{if((c[g+13120>>2]>>c[g+13168+(j<<2)>>2]|0)>0){h=0;do{l=1<<(c[g+52>>2]|0)+-1&65535;g=c[f>>2]|0;g=(c[g+(j<<2)>>2]|0)+(R(c[g+32+(j<<2)>>2]|0,i)|0)+(h<<1)|0;a[g>>0]=l;a[g+1>>0]=l>>8;h=h+1|0;g=c[k>>2]|0}while((h|0)<(c[g+13120>>2]>>c[g+13168+(j<<2)>>2]|0))}i=i+1|0}while((i|0)<(c[g+13124>>2]>>c[g+13180+(j<<2)>>2]|0));h=c[f>>2]|0}j=j+1|0}while((c[h+(j<<2)>>2]|0)!=0)}c[f+32>>2]=e;b[f+68>>1]=b[d+7616>>1]|0;a[f+70>>0]=0}else f=0;return f|0}function id(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=1<>2]|0)+64>>2];d=c[a+5820>>2]|0;f=(d|0)%(e|0)|0;d=d-f|0;if((f|0)>(b|0)?(f-b|0)>=((e|0)/2|0|0):0)d=d+e|0;else if((f|0)<(b|0))d=d-((b-f|0)>((e|0)/2|0|0)?e:0)|0;return (((c[a+3500>>2]|0)+-16|0)>>>0<3?0:d)+b|0}function jd(b){b=b|0;var d=0,e=0,f=0,g=0;g=c[b+2608>>2]|0;if(g){f=c[g>>2]|0;if(!f){d=0;e=0}else{e=0;d=0;do{d=((a[g+136+e>>0]|0)!=0&1)+d|0;e=e+1|0}while(e>>>0>>0)}f=c[g+4>>2]|0;if((e|0)<(f|0))do{d=((a[g+136+e>>0]|0)!=0&1)+d|0;e=e+1|0}while((e|0)<(f|0))}else d=0;e=a[b+2772>>0]|0;if(e<<24>>24){f=e&255;e=0;do{d=((a[b+2740+e>>0]|0)!=0&1)+d|0;e=e+1|0}while((e|0)<(f|0))}return d|0}function kd(){var b=0,c=0,d=0,e=0,f=0;if(!(a[3893]|0)){c=0;do{b=0;do{f=(R(b<<1|1,c)|0)&127;d=f>>>0>63;f=d?f+-64|0:f;d=d?-1:1;e=(f|0)>31;a[3893+(c<<5)+b>>0]=R(a[1859+(e?64-f|0:f)>>0]|0,e?0-d|0:d)|0;b=b+1|0}while((b|0)!=32);c=c+1|0}while((c|0)!=32)}return}function ld(a,b){a=a|0;b=b|0;c[a>>2]=1;c[a+4>>2]=1;c[a+8>>2]=2;c[a+12>>2]=3;c[a+16>>2]=4;c[a+20>>2]=1;c[a+24>>2]=5;c[a+28>>2]=2;c[a+32>>2]=2;c[a+36>>2]=3;c[a+40>>2]=4;c[a+44>>2]=5;c[a+48>>2]=3;c[a+52>>2]=4;c[a+56>>2]=5;c[a+60>>2]=6;b=0;do{c[a+236+(b<<4)>>2]=1;b=b+1|0}while((b|0)!=10);b=0;do{c[a+236+(b<<4)+4>>2]=2;b=b+1|0}while((b|0)!=10);b=0;do{c[a+236+(b<<4)+8>>2]=3;b=b+1|0}while((b|0)!=10);b=0;do{c[a+236+(b<<4)+12>>2]=4;b=b+1|0}while((b|0)!=10);b=0;do{c[a+396+(b<<4)>>2]=1;b=b+1|0}while((b|0)!=10);b=0;do{c[a+396+(b<<4)+4>>2]=2;b=b+1|0}while((b|0)!=10);b=0;do{c[a+396+(b<<4)+8>>2]=3;b=b+1|0}while((b|0)!=10);b=0;do{c[a+396+(b<<4)+12>>2]=4;b=b+1|0}while((b|0)!=10);b=0;do{c[a+1036+(b<<4)>>2]=1;b=b+1|0}while((b|0)!=10);b=0;do{c[a+1036+(b<<4)+4>>2]=5;b=b+1|0}while((b|0)!=10);b=0;do{c[a+1036+(b<<4)+8>>2]=6;b=b+1|0}while((b|0)!=10);b=0;do{c[a+1036+(b<<4)+12>>2]=7;b=b+1|0}while((b|0)!=10);b=0;do{c[a+1196+(b<<4)>>2]=1;b=b+1|0}while((b|0)!=10);b=0;do{c[a+1196+(b<<4)+4>>2]=5;b=b+1|0}while((b|0)!=10);b=0;do{c[a+1196+(b<<4)+8>>2]=6;b=b+1|0}while((b|0)!=10);b=0;do{c[a+1196+(b<<4)+12>>2]=7;b=b+1|0}while((b|0)!=10);c[a+64>>2]=1;c[a+68>>2]=1;c[a+72>>2]=2;c[a+1676>>2]=2;c[a+1680>>2]=3;c[a+1684>>2]=1;c[a+1688>>2]=2;c[a+1692>>2]=2;c[a+1696>>2]=3;c[a+1700>>2]=1;c[a+1704>>2]=2;return}function md(b,c,d,e,f,g){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;if((e|0)>0){j=(d|0)>0;k=8-g|0;i=0;while(1){if(j){h=0;do{a[b+h>>0]=(Te(f,g)|0)<>1]|0)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?0-k>>31:k;g=g+1|0;if((g|0)==4)break;else h=h+2|0}i=i+1|0;if((i|0)==4)break;else{e=e+8|0;c=c+f|0}}return}function od(c,e,f){c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;i=0;while(1){g=0;h=e;while(1){j=c+g|0;k=(b[h>>1]|0)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?0-k>>31:k;g=g+1|0;if((g|0)==8)break;else h=h+2|0}i=i+1|0;if((i|0)==8)break;else{e=e+16|0;c=c+f|0}}return}function pd(c,e,f){c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;i=0;while(1){g=0;h=e;while(1){j=c+g|0;k=(b[h>>1]|0)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?0-k>>31:k;g=g+1|0;if((g|0)==16)break;else h=h+2|0}i=i+1|0;if((i|0)==16)break;else{e=e+32|0;c=c+f|0}}return}function qd(c,e,f){c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;i=0;while(1){g=0;h=e;while(1){j=c+g|0;k=(b[h>>1]|0)+(d[j>>0]|0)|0;a[j>>0]=k>>>0>255?0-k>>31:k;g=g+1|0;if((g|0)==32)break;else h=h+2|0}i=i+1|0;if((i|0)==32)break;else{e=e+64|0;c=c+f|0}}return}function rd(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0;g=c<<16>>16;e=7-g|0;g=1<0){f=1<>16!=31){c=0;do{d=0;do{b[a>>1]=(b[a>>1]|0)+f>>e;a=a+2|0;d=d+1|0}while((d|0)<(g|0));c=c+1|0}while((c|0)<(g|0))}}else if(c<<16>>16!=31){e=0-e|0;d=0;do{c=0;do{b[a>>1]=b[a>>1]<>16);if(!d){if(c<<16>>16!=31){h=(i|0)>1;g=0;d=a;while(1){if(h){c=1;f=b[d>>1]|0;do{a=d+(c<<1)|0;f=(e[a>>1]|0)+(f&65535)&65535;b[a>>1]=f;c=c+1|0}while((c|0)!=(i|0))}g=g+1|0;if((g|0)>=(i|0))break;else d=d+(i<<1)|0}}}else{g=i+-1|0;if((i|0)>1){f=0;d=a;do{d=d+(i<<1)|0;c=0;do{a=d+(c<<1)|0;b[a>>1]=(e[a>>1]|0)+(e[d+(c-i<<1)>>1]|0);c=c+1|0}while((c|0)!=(i|0));f=f+1|0}while((f|0)!=(g|0))}}return}function td(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=0;d=a;while(1){n=b[d>>1]|0;l=d+16|0;j=b[l>>1]|0;h=j+n|0;e=d+24|0;m=b[e>>1]|0;k=m+j|0;f=n-m|0;i=d+8|0;g=(b[i>>1]|0)*74|0;m=((n-j+m|0)*74|0)+64|0;j=m>>7;b[l>>1]=(j+32768|0)>>>0>65535?m>>31^32767:j;l=(h*29|0)+64+(k*55|0)+g|0;j=l>>7;b[d>>1]=(j+32768|0)>>>0>65535?l>>31^32767:j;k=(R(k,-29)|0)+64+(f*55|0)+g|0;j=k>>7;b[i>>1]=(j+32768|0)>>>0>65535?k>>31^32767:j;g=(h*55|0)+64+(f*29|0)-g|0;f=g>>7;b[e>>1]=(f+32768|0)>>>0>65535?g>>31^32767:f;c=c+1|0;if((c|0)==4){c=0;break}else d=d+2|0}while(1){e=b[a>>1]|0;g=a+4|0;i=b[g>>1]|0;k=i+e|0;n=a+6|0;f=b[n>>1]|0;h=f+i|0;m=e-f|0;j=a+2|0;l=(b[j>>1]|0)*74|0;f=((e-i+f|0)*74|0)+2048|0;i=f>>12;b[g>>1]=(i+32768|0)>>>0>65535?f>>31^32767:i;g=(k*29|0)+2048+(h*55|0)+l|0;i=g>>12;b[a>>1]=(i+32768|0)>>>0>65535?g>>31^32767:i;h=(R(h,-29)|0)+2048+(m*55|0)+l|0;i=h>>12;b[j>>1]=(i+32768|0)>>>0>65535?h>>31^32767:i;l=(k*55|0)+2048+(m*29|0)-l|0;m=l>>12;b[n>>1]=(m+32768|0)>>>0>65535?l>>31^32767:m;c=c+1|0;if((c|0)==4)break;else a=a+8|0}return}function ud(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=0;d=a;while(1){k=b[d>>1]<<6;h=d+16|0;i=b[h>>1]<<6;f=i+k|0;i=k-i|0;k=d+8|0;j=b[k>>1]|0;e=d+24|0;l=b[e>>1]|0;g=(l*36|0)+(j*83|0)|0;j=(R(l,-83)|0)+(j*36|0)|0;l=f+64+g|0;m=l>>7;b[d>>1]=(m+32768|0)>>>0>65535?l>>31^32767:m;m=i+64+j|0;l=m>>7;b[k>>1]=(l+32768|0)>>>0>65535?m>>31^32767:l;j=i-j+64|0;i=j>>7;b[h>>1]=(i+32768|0)>>>0>65535?j>>31^32767:i;g=f-g+64|0;f=g>>7;b[e>>1]=(f+32768|0)>>>0>65535?g>>31^32767:f;c=c+1|0;if((c|0)==4){c=0;break}else d=d+2|0}while(1){g=b[a>>1]<<6;j=a+4|0;i=b[j>>1]<<6;l=i+g|0;i=g-i|0;g=a+2|0;h=b[g>>1]|0;m=a+6|0;f=b[m>>1]|0;k=(f*36|0)+(h*83|0)|0;h=(R(f,-83)|0)+(h*36|0)|0;f=l+2048+k|0;e=f>>12;b[a>>1]=(e+32768|0)>>>0>65535?f>>31^32767:e;e=i+2048+h|0;f=e>>12;b[g>>1]=(f+32768|0)>>>0>65535?e>>31^32767:f;h=i-h+2048|0;i=h>>12;b[j>>1]=(i+32768|0)>>>0>65535?h>>31^32767:i;k=l-k+2048|0;l=k>>12;b[m>>1]=(l+32768|0)>>>0>65535?k>>31^32767:l;c=c+1|0;if((c|0)==4)break;else a=a+8|0}return} +function vd(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+32|0;s=u+16|0;t=u;p=(e|0)<8;n=e+4|0;q=s+4|0;r=s+8|0;o=s+12|0;k=0;m=d;n=(n|0)<8?n:8;while(1){c[t>>2]=0;c[t+4>>2]=0;c[t+8>>2]=0;c[t+12>>2]=0;h=(n|0)>1;f=0;do{if(h){i=t+(f<<2)|0;g=1;j=c[i>>2]|0;do{j=(R(b[m+(g<<3<<1)>>1]|0,a[3893+(g<<2<<5)+f>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<(n|0));c[i>>2]=j}f=f+1|0}while((f|0)!=4);i=b[m>>1]<<6;h=b[m+64>>1]<<6;j=h+i|0;h=i-h|0;i=b[m+32>>1]|0;f=b[m+96>>1]|0;g=(f*36|0)+(i*83|0)|0;i=(R(f,-83)|0)+(i*36|0)|0;f=g+j|0;c[s>>2]=f;c[q>>2]=i+h;c[r>>2]=h-i;c[o>>2]=j-g;g=0;while(1){j=c[t+(g<<2)>>2]|0;h=f+64+j|0;i=h>>7;b[m+(g<<3<<1)>>1]=(i+32768|0)>>>0>65535?h>>31^32767:i;j=f-j+64|0;f=j>>7;b[m+(7-g<<3<<1)>>1]=(f+32768|0)>>>0>65535?j>>31^32767:f;f=g+1|0;if((f|0)==4)break;g=f;f=c[s+(f<<2)>>2]|0}n=(n|0)<8&((k|0)!=0&(k&3|0)==0)?n+-4|0:n;k=k+1|0;if((k|0)==8)break;else m=m+2|0}k=p?e:8;m=(k|0)>1;n=s+4|0;e=s+8|0;o=s+12|0;j=0;while(1){c[t>>2]=0;c[t+4>>2]=0;c[t+8>>2]=0;c[t+12>>2]=0;g=0;do{if(m){h=t+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[d+(f<<1)>>1]|0,a[3893+(f<<2<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<(k|0));c[h>>2]=i}g=g+1|0}while((g|0)!=4);q=b[d>>1]<<6;p=b[d+8>>1]<<6;r=p+q|0;p=q-p|0;q=b[d+4>>1]|0;f=b[d+12>>1]|0;g=(f*36|0)+(q*83|0)|0;q=(R(f,-83)|0)+(q*36|0)|0;f=g+r|0;c[s>>2]=f;c[n>>2]=q+p;c[e>>2]=p-q;c[o>>2]=r-g;g=0;while(1){r=c[t+(g<<2)>>2]|0;p=f+2048+r|0;q=p>>12;b[d+(g<<1)>>1]=(q+32768|0)>>>0>65535?p>>31^32767:q;r=f-r+2048|0;f=r>>12;b[d+(7-g<<1)>>1]=(f+32768|0)>>>0>65535?r>>31^32767:f;f=g+1|0;if((f|0)==4)break;g=f;f=c[s+(f<<2)>>2]|0}j=j+1|0;if((j|0)==8)break;else d=d+16|0}l=u;return}function wd(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+96|0;t=x+64|0;u=x+32|0;v=x+16|0;w=x;s=(e|0)<16;n=e+4|0;o=v+4|0;p=v+8|0;q=v+12|0;r=t+28|0;k=0;m=d;n=(n|0)<16?n:16;while(1){c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;c[u+12>>2]=0;c[u+16>>2]=0;c[u+20>>2]=0;c[u+24>>2]=0;c[u+28>>2]=0;h=(n|0)>1;f=0;do{if(h){i=u+(f<<2)|0;g=1;j=c[i>>2]|0;do{j=(R(b[m+(g<<4<<1)>>1]|0,a[3893+(g<<1<<5)+f>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<(n|0));c[i>>2]=j}f=f+1|0}while((f|0)!=8);c[w>>2]=0;c[w+4>>2]=0;c[w+8>>2]=0;c[w+12>>2]=0;g=0;do{h=w+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[m+(f<<5<<1)>>1]|0,a[3893+(f<<2<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<8);c[h>>2]=i;g=g+1|0}while((g|0)!=4);h=b[m>>1]<<6;g=b[m+256>>1]<<6;i=g+h|0;g=h-g|0;h=b[m+128>>1]|0;j=b[m+384>>1]|0;f=(j*36|0)+(h*83|0)|0;h=(R(j,-83)|0)+(h*36|0)|0;j=f+i|0;c[v>>2]=j;c[o>>2]=h+g;c[p>>2]=g-h;c[q>>2]=i-f;f=c[w>>2]|0;c[t>>2]=f+j;c[r>>2]=j-f;f=1;do{i=c[v+(f<<2)>>2]|0;j=c[w+(f<<2)>>2]|0;c[t+(f<<2)>>2]=j+i;c[t+(7-f<<2)>>2]=i-j;f=f+1|0}while((f|0)!=4);f=0;do{j=c[t+(f<<2)>>2]|0;i=c[u+(f<<2)>>2]|0;g=j+64+i|0;h=g>>7;b[m+(f<<4<<1)>>1]=(h+32768|0)>>>0>65535?g>>31^32767:h;i=j-i+64|0;j=i>>7;b[m+(15-f<<4<<1)>>1]=(j+32768|0)>>>0>65535?i>>31^32767:j;f=f+1|0}while((f|0)!=8);n=(n|0)<16&((k|0)!=0&(k&3|0)==0)?n+-4|0:n;k=k+1|0;if((k|0)==16)break;else m=m+2|0}m=s?e:16;n=(m|0)>1;e=v+4|0;o=v+8|0;p=v+12|0;q=t+28|0;j=d;k=0;while(1){c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;c[u+12>>2]=0;c[u+16>>2]=0;c[u+20>>2]=0;c[u+24>>2]=0;c[u+28>>2]=0;g=0;do{if(n){h=u+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[j+(f<<1)>>1]|0,a[3893+(f<<1<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<(m|0));c[h>>2]=i}g=g+1|0}while((g|0)!=8);c[w>>2]=0;c[w+4>>2]=0;c[w+8>>2]=0;c[w+12>>2]=0;g=0;do{h=w+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[j+(f<<1<<1)>>1]|0,a[3893+(f<<2<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<8);c[h>>2]=i;g=g+1|0}while((g|0)!=4);r=b[j>>1]<<6;i=b[j+16>>1]<<6;s=i+r|0;i=r-i|0;r=b[j+8>>1]|0;d=b[j+24>>1]|0;f=(d*36|0)+(r*83|0)|0;r=(R(d,-83)|0)+(r*36|0)|0;d=f+s|0;c[v>>2]=d;c[e>>2]=r+i;c[o>>2]=i-r;c[p>>2]=s-f;f=c[w>>2]|0;c[t>>2]=f+d;c[q>>2]=d-f;f=1;do{s=c[v+(f<<2)>>2]|0;d=c[w+(f<<2)>>2]|0;c[t+(f<<2)>>2]=d+s;c[t+(7-f<<2)>>2]=s-d;f=f+1|0}while((f|0)!=4);f=0;do{d=c[t+(f<<2)>>2]|0;s=c[u+(f<<2)>>2]|0;i=d+2048+s|0;r=i>>12;b[j+(f<<1)>>1]=(r+32768|0)>>>0>65535?i>>31^32767:r;s=d-s+2048|0;d=s>>12;b[j+(15-f<<1)>>1]=(d+32768|0)>>>0>65535?s>>31^32767:d;f=f+1|0}while((f|0)!=8);k=k+1|0;if((k|0)==16)break;else j=j+32|0}l=x;return}function xd(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;A=l;l=l+224|0;u=A+160|0;v=A+96|0;w=A+64|0;x=A+32|0;y=A+16|0;z=A;t=(e|0)<32;o=e+4|0;p=y+4|0;q=y+8|0;r=y+12|0;s=w+28|0;m=0;n=d;o=(o|0)<32?o:32;while(1){f=v;g=f+64|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));h=(o|0)>1;f=0;do{if(h){i=v+(f<<2)|0;g=1;j=c[i>>2]|0;do{j=(R(b[n+(g<<5<<1)>>1]|0,a[3893+(g<<5)+f>>0]|0)|0)+j|0;g=g+2|0}while((g|0)<(o|0));c[i>>2]=j}f=f+1|0}while((f|0)!=16);c[x>>2]=0;c[x+4>>2]=0;c[x+8>>2]=0;c[x+12>>2]=0;c[x+16>>2]=0;c[x+20>>2]=0;c[x+24>>2]=0;c[x+28>>2]=0;h=(o|0)/2|0;i=(o|0)>3;g=0;do{if(i){j=x+(g<<2)|0;f=1;k=c[j>>2]|0;do{k=(R(b[n+(f<<6<<1)>>1]|0,a[3893+(f<<1<<5)+g>>0]|0)|0)+k|0;f=f+2|0}while((f|0)<(h|0));c[j>>2]=k}g=g+1|0}while((g|0)!=8);c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;c[z+12>>2]=0;g=0;do{h=z+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[n+(f<<7<<1)>>1]|0,a[3893+(f<<2<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<8);c[h>>2]=i;g=g+1|0}while((g|0)!=4);i=b[n>>1]<<6;h=b[n+1024>>1]<<6;j=h+i|0;h=i-h|0;i=b[n+512>>1]|0;k=b[n+1536>>1]|0;f=(k*36|0)+(i*83|0)|0;i=(R(k,-83)|0)+(i*36|0)|0;k=f+j|0;c[y>>2]=k;c[p>>2]=i+h;c[q>>2]=h-i;c[r>>2]=j-f;f=c[z>>2]|0;c[w>>2]=f+k;c[s>>2]=k-f;f=1;do{j=c[y+(f<<2)>>2]|0;k=c[z+(f<<2)>>2]|0;c[w+(f<<2)>>2]=k+j;c[w+(7-f<<2)>>2]=j-k;f=f+1|0}while((f|0)!=4);f=0;do{j=c[w+(f<<2)>>2]|0;k=c[x+(f<<2)>>2]|0;c[u+(f<<2)>>2]=k+j;c[u+(15-f<<2)>>2]=j-k;f=f+1|0}while((f|0)!=8);f=0;do{k=c[u+(f<<2)>>2]|0;j=c[v+(f<<2)>>2]|0;h=k+64+j|0;i=h>>7;b[n+(f<<5<<1)>>1]=(i+32768|0)>>>0>65535?h>>31^32767:i;j=k-j+64|0;k=j>>7;b[n+(31-f<<5<<1)>>1]=(k+32768|0)>>>0>65535?j>>31^32767:k;f=f+1|0}while((f|0)!=16);o=(o|0)<32&((m|0)!=0&(m&3|0)==0)?o+-4|0:o;m=m+1|0;if((m|0)==32)break;else n=n+2|0}m=t?e:32;n=(m|0)>1;o=(m|0)/2|0;e=(m|0)>3;p=y+4|0;q=y+8|0;r=y+12|0;s=w+28|0;j=d;k=0;while(1){f=v;g=f+64|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));g=0;do{if(n){h=v+(g<<2)|0;f=1;i=c[h>>2]|0;do{i=(R(b[j+(f<<1)>>1]|0,a[3893+(f<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<(m|0));c[h>>2]=i}g=g+1|0}while((g|0)!=16);c[x>>2]=0;c[x+4>>2]=0;c[x+8>>2]=0;c[x+12>>2]=0;c[x+16>>2]=0;c[x+20>>2]=0;c[x+24>>2]=0;c[x+28>>2]=0;g=0;do{if(e){h=x+(g<<2)|0;f=1;i=c[h>>2]|0;do{d=f<<1;i=(R(b[j+(d<<1)>>1]|0,a[3893+(d<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<(o|0));c[h>>2]=i}g=g+1|0}while((g|0)!=8);c[z>>2]=0;c[z+4>>2]=0;c[z+8>>2]=0;c[z+12>>2]=0;g=0;do{h=z+(g<<2)|0;f=1;i=c[h>>2]|0;do{d=f<<2;i=(R(b[j+(d<<1)>>1]|0,a[3893+(d<<5)+g>>0]|0)|0)+i|0;f=f+2|0}while((f|0)<8);c[h>>2]=i;g=g+1|0}while((g|0)!=4);i=b[j>>1]<<6;h=b[j+32>>1]<<6;t=h+i|0;h=i-h|0;i=b[j+16>>1]|0;d=b[j+48>>1]|0;f=(d*36|0)+(i*83|0)|0;i=(R(d,-83)|0)+(i*36|0)|0;d=f+t|0;c[y>>2]=d;c[p>>2]=i+h;c[q>>2]=h-i;c[r>>2]=t-f;f=c[z>>2]|0;c[w>>2]=f+d;c[s>>2]=d-f;f=1;do{t=c[y+(f<<2)>>2]|0;d=c[z+(f<<2)>>2]|0;c[w+(f<<2)>>2]=d+t;c[w+(7-f<<2)>>2]=t-d;f=f+1|0}while((f|0)!=4);f=0;do{t=c[w+(f<<2)>>2]|0;d=c[x+(f<<2)>>2]|0;c[u+(f<<2)>>2]=d+t;c[u+(15-f<<2)>>2]=t-d;f=f+1|0}while((f|0)!=8);f=0;do{d=c[u+(f<<2)>>2]|0;t=c[v+(f<<2)>>2]|0;h=d+2048+t|0;i=h>>12;b[j+(f<<1)>>1]=(i+32768|0)>>>0>65535?h>>31^32767:i;t=d-t+2048|0;d=t>>12;b[j+(31-f<<1)>>1]=(d+32768|0)>>>0>65535?t>>31^32767:d;f=f+1|0}while((f|0)!=16);k=k+1|0;if((k|0)==32)break;else j=j+64|0}l=A;return}function yd(a){a=a|0;var c=0,d=0,e=0,f=0;e=((((b[a>>1]|0)+1|0)>>>1)+32|0)>>>6&65535;c=0;do{f=c<<2;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=4);c=c+1|0}while((c|0)!=4);return}function zd(a){a=a|0;var c=0,d=0,e=0,f=0;e=((((b[a>>1]|0)+1|0)>>>1)+32|0)>>>6&65535;c=0;do{f=c<<3;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=8);c=c+1|0}while((c|0)!=8);return}function Ad(a){a=a|0;var c=0,d=0,e=0,f=0;e=((((b[a>>1]|0)+1|0)>>>1)+32|0)>>>6&65535;c=0;do{f=c<<4;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=16);c=c+1|0}while((c|0)!=16);return}function Bd(a){a=a|0;var c=0,d=0,e=0,f=0;e=((((b[a>>1]|0)+1|0)>>>1)+32|0)>>>6&65535;c=0;do{f=c<<5;d=0;do{b[a+(d+f<<1)>>1]=e;d=d+1|0}while((d|0)!=32);c=c+1|0}while((c|0)!=32);return}function Cd(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;if((e|0)>0){f=0;while(1){fh(a|0,c|0,h|0)|0;f=f+1|0;if((f|0)==(e|0))break;else{a=a+b|0;c=c+d|0}}}return}function Dd(b,c,e,f,g,h,i,j){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;h=h+-1|0;A=48+(h<<4)|0;if((g|0)>0){t=(j|0)>0;u=48+(h<<4)+1|0;v=48+(h<<4)+2|0;w=48+(h<<4)+3|0;x=48+(h<<4)+4|0;y=48+(h<<4)+5|0;z=48+(h<<4)+6|0;s=48+(h<<4)+7|0;r=0;while(1){if(t){i=a[A>>0]|0;k=a[u>>0]|0;l=a[v>>0]|0;m=a[w>>0]|0;n=a[x>>0]|0;o=a[y>>0]|0;p=a[z>>0]|0;q=a[s>>0]|0;h=0;do{I=R(d[e+(h+-3)>>0]|0,i)|0;H=R(d[e+(h+-2)>>0]|0,k)|0;G=R(d[e+(h+-1)>>0]|0,l)|0;F=R(d[e+h>>0]|0,m)|0;B=h;h=h+1|0;E=R(d[e+h>>0]|0,n)|0;D=R(d[e+(B+2)>>0]|0,o)|0;C=R(d[e+(B+3)>>0]|0,p)|0;C=I+32+H+G+F+E+D+C+(R(d[e+(B+4)>>0]|0,q)|0)>>6;a[b+B>>0]=C>>>0>255?0-C>>31:C}while((h|0)!=(j|0))}r=r+1|0;if((r|0)==(g|0))break;else{e=e+f|0;b=b+c|0}}}return}function Ed(b,c,e,f,g,h,i,j){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;h=i+-1|0;D=48+(h<<4)|0;if((g|0)>0){u=(j|0)>0;v=f*3|0;w=48+(h<<4)+1|0;x=f<<1;y=48+(h<<4)+2|0;z=48+(h<<4)+3|0;A=48+(h<<4)+4|0;B=48+(h<<4)+5|0;C=48+(h<<4)+6|0;s=48+(h<<4)+7|0;t=f<<2;r=0;while(1){if(u){i=a[D>>0]|0;k=a[w>>0]|0;l=a[y>>0]|0;m=a[z>>0]|0;n=a[A>>0]|0;o=a[B>>0]|0;p=a[C>>0]|0;q=a[s>>0]|0;h=0;do{K=R(d[e+(h-v)>>0]|0,i)|0;J=R(d[e+(h-x)>>0]|0,k)|0;I=R(d[e+(h-f)>>0]|0,l)|0;H=R(d[e+h>>0]|0,m)|0;G=R(d[e+(h+f)>>0]|0,n)|0;F=R(d[e+(h+x)>>0]|0,o)|0;E=R(d[e+(h+v)>>0]|0,p)|0;E=K+32+J+I+H+G+F+E+(R(d[e+(h+t)>>0]|0,q)|0)>>6;a[b+h>>0]=E>>>0>255?0-E>>31:E;h=h+1|0}while((h|0)!=(j|0))}r=r+1|0;if((r|0)==(g|0))break;else{e=e+f|0;b=b+c|0}}}return}function Fd(c,d,e,f,g,h,i,j){c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0;N=l;l=l+9088|0;M=N;h=h+-1|0;E=48+(h<<4)|0;if((g|0)>-7){F=(j|0)>0;G=48+(h<<4)+1|0;H=48+(h<<4)+2|0;I=48+(h<<4)+3|0;J=48+(h<<4)+4|0;K=48+(h<<4)+5|0;L=48+(h<<4)+6|0;C=48+(h<<4)+7|0;D=g+6|0;B=M;e=e+(R(f,-3)|0)|0;m=0;while(1){if(F){n=a[E>>0]|0;o=a[G>>0]|0;p=a[H>>0]|0;q=a[I>>0]|0;r=a[J>>0]|0;s=a[K>>0]|0;t=a[L>>0]|0;u=a[C>>0]|0;k=0;h=a[e+-3>>0]|0;v=a[e+-2>>0]|0;w=a[e+-1>>0]|0;x=a[e>>0]|0;y=a[e+1>>0]|0;z=a[e+2>>0]|0;A=a[e+3>>0]|0;while(1){O=(R(v&255,o)|0)+(R(h&255,n)|0)+(R(w&255,p)|0)+(R(x&255,q)|0)+(R(y&255,r)|0)+(R(z&255,s)|0)+(R(A&255,t)|0)|0;h=a[e+(k+4)>>0]|0;b[B+(k<<1)>>1]=O+(R(h&255,u)|0);k=k+1|0;if((k|0)==(j|0))break;else{U=A;T=z;S=y;Q=x;P=w;O=v;A=h;z=U;y=T;x=S;w=Q;v=P;h=O}}}if((m|0)<(D|0)){B=B+128|0;e=e+f|0;m=m+1|0}else break}h=i+-1|0;v=48+(h<<4)|0;if((g|0)>0){w=(j|0)>0;x=48+(h<<4)+1|0;y=48+(h<<4)+2|0;z=48+(h<<4)+3|0;A=48+(h<<4)+4|0;B=48+(h<<4)+5|0;C=48+(h<<4)+6|0;u=48+(h<<4)+7|0;t=0;h=M+384|0;while(1){if(w){p=a[v>>0]|0;q=a[x>>0]|0;r=a[y>>0]|0;s=a[z>>0]|0;k=a[A>>0]|0;m=a[B>>0]|0;n=a[C>>0]|0;o=a[u>>0]|0;e=0;do{U=R(b[h+(e+-192<<1)>>1]|0,p)|0;U=(R(b[h+(e+-128<<1)>>1]|0,q)|0)+U|0;U=U+(R(b[h+(e+-64<<1)>>1]|0,r)|0)|0;U=U+(R(b[h+(e<<1)>>1]|0,s)|0)|0;U=U+(R(b[h+(e+64<<1)>>1]|0,k)|0)|0;U=U+(R(b[h+(e+128<<1)>>1]|0,m)|0)|0;U=U+(R(b[h+(e+192<<1)>>1]|0,n)|0)|0;U=(U+(R(b[h+(e+256<<1)>>1]|0,o)|0)>>6)+32>>6;a[c+e>>0]=U>>>0>255?0-U>>31:U;e=e+1|0}while((e|0)!=(j|0))}t=t+1|0;if((t|0)==(g|0))break;else{c=c+d|0;h=h+128|0}}}}l=N;return}function Gd(b,c,e,f,g,h,i,j,k,l,m){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0;o=h+6|0;p=1<>1;if((g|0)>0){q=(m|0)>0;n=i<<6;i=0;l=b;h=e;while(1){if(q){k=0;do{e=((R(n,d[h+k>>0]|0)|0)+p>>o)+j|0;a[l+k>>0]=e>>>0>255?0-e>>31:e;k=k+1|0}while((k|0)!=(m|0))}i=i+1|0;if((i|0)==(g|0))break;else{l=l+c|0;h=h+f|0}}}return}function Hd(b,c,e,f,g,h,i,j,k,l,m){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;k=k+-1|0;E=48+(k<<4)|0;v=h+6|0;w=1<>1;if((g|0)>0){x=(m|0)>0;y=48+(k<<4)+1|0;z=48+(k<<4)+2|0;A=48+(k<<4)+3|0;B=48+(k<<4)+4|0;C=48+(k<<4)+5|0;D=48+(k<<4)+6|0;u=48+(k<<4)+7|0;t=0;while(1){if(x){l=a[E>>0]|0;h=a[y>>0]|0;n=a[z>>0]|0;o=a[A>>0]|0;p=a[B>>0]|0;q=a[C>>0]|0;r=a[D>>0]|0;s=a[u>>0]|0;k=0;do{G=R(d[e+(k+-3)>>0]|0,l)|0;G=(R(d[e+(k+-2)>>0]|0,h)|0)+G|0;G=G+(R(d[e+(k+-1)>>0]|0,n)|0)|0;G=G+(R(d[e+k>>0]|0,o)|0)|0;F=k;k=k+1|0;G=G+(R(d[e+k>>0]|0,p)|0)|0;G=G+(R(d[e+(F+2)>>0]|0,q)|0)|0;G=G+(R(d[e+(F+3)>>0]|0,r)|0)|0;G=((R(G+(R(d[e+(F+4)>>0]|0,s)|0)|0,i)|0)+w>>v)+j|0;a[b+F>>0]=G>>>0>255?0-G>>31:G}while((k|0)!=(m|0))}t=t+1|0;if((t|0)==(g|0))break;else{e=e+f|0;b=b+c|0}}}return}function Id(b,c,e,f,g,h,i,j,k,l,m){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;k=l+-1|0;H=48+(k<<4)|0;w=h+6|0;x=1<>1;if((g|0)>0){y=(m|0)>0;z=f*3|0;A=48+(k<<4)+1|0;B=f<<1;C=48+(k<<4)+2|0;D=48+(k<<4)+3|0;E=48+(k<<4)+4|0;F=48+(k<<4)+5|0;G=48+(k<<4)+6|0;u=48+(k<<4)+7|0;v=f<<2;t=0;while(1){if(y){l=a[H>>0]|0;h=a[A>>0]|0;n=a[C>>0]|0;o=a[D>>0]|0;p=a[E>>0]|0;q=a[F>>0]|0;r=a[G>>0]|0;s=a[u>>0]|0;k=0;do{I=R(d[e+(k-z)>>0]|0,l)|0;I=(R(d[e+(k-B)>>0]|0,h)|0)+I|0;I=I+(R(d[e+(k-f)>>0]|0,n)|0)|0;I=I+(R(d[e+k>>0]|0,o)|0)|0;I=I+(R(d[e+(k+f)>>0]|0,p)|0)|0;I=I+(R(d[e+(k+B)>>0]|0,q)|0)|0;I=I+(R(d[e+(k+z)>>0]|0,r)|0)|0;I=((R(I+(R(d[e+(k+v)>>0]|0,s)|0)|0,i)|0)+x>>w)+j|0;a[b+k>>0]=I>>>0>255?0-I>>31:I;k=k+1|0}while((k|0)!=(m|0))}t=t+1|0;if((t|0)==(g|0))break;else{e=e+f|0;b=b+c|0}}}return}function Jd(c,d,e,f,g,h,i,j,k,m,n){c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;S=l;l=l+9088|0;O=S;P=h+6|0;Q=1<

>1;h=k+-1|0;G=48+(h<<4)|0;if((g|0)>-7){H=(n|0)>0;I=48+(h<<4)+1|0;J=48+(h<<4)+2|0;K=48+(h<<4)+3|0;L=48+(h<<4)+4|0;M=48+(h<<4)+5|0;N=48+(h<<4)+6|0;E=48+(h<<4)+7|0;F=g+6|0;C=O;D=0;k=e+(R(f,-3)|0)|0;while(1){if(H){o=a[G>>0]|0;p=a[I>>0]|0;q=a[J>>0]|0;r=a[K>>0]|0;s=a[L>>0]|0;t=a[M>>0]|0;u=a[N>>0]|0;v=a[E>>0]|0;e=0;h=a[k+-3>>0]|0;w=a[k+-2>>0]|0;x=a[k+-1>>0]|0;y=a[k>>0]|0;z=a[k+1>>0]|0;A=a[k+2>>0]|0;B=a[k+3>>0]|0;while(1){T=(R(w&255,p)|0)+(R(h&255,o)|0)+(R(x&255,q)|0)+(R(y&255,r)|0)+(R(z&255,s)|0)+(R(A&255,t)|0)+(R(B&255,u)|0)|0;h=a[k+(e+4)>>0]|0;b[C+(e<<1)>>1]=T+(R(h&255,v)|0);e=e+1|0;if((e|0)==(n|0))break;else{Y=B;X=A;W=z;V=y;U=x;T=w;B=h;A=Y;z=X;y=W;x=V;w=U;h=T}}}if((D|0)<(F|0)){C=C+128|0;D=D+1|0;k=k+f|0}else break}h=m+-1|0;x=48+(h<<4)|0;if((g|0)>0){y=(n|0)>0;z=48+(h<<4)+1|0;A=48+(h<<4)+2|0;B=48+(h<<4)+3|0;C=48+(h<<4)+4|0;D=48+(h<<4)+5|0;E=48+(h<<4)+6|0;w=48+(h<<4)+7|0;h=O+384|0;k=0;while(1){if(y){v=a[x>>0]|0;o=a[z>>0]|0;p=a[A>>0]|0;q=a[B>>0]|0;r=a[C>>0]|0;s=a[D>>0]|0;t=a[E>>0]|0;u=a[w>>0]|0;e=0;do{Y=R(b[h+(e+-192<<1)>>1]|0,v)|0;Y=(R(b[h+(e+-128<<1)>>1]|0,o)|0)+Y|0;Y=Y+(R(b[h+(e+-64<<1)>>1]|0,p)|0)|0;Y=Y+(R(b[h+(e<<1)>>1]|0,q)|0)|0;Y=Y+(R(b[h+(e+64<<1)>>1]|0,r)|0)|0;Y=Y+(R(b[h+(e+128<<1)>>1]|0,s)|0)|0;Y=Y+(R(b[h+(e+192<<1)>>1]|0,t)|0)|0;Y=((R(Y+(R(b[h+(e+256<<1)>>1]|0,u)|0)>>6,i)|0)+Q>>P)+j|0;a[c+e>>0]=Y>>>0>255?0-Y>>31:Y;e=e+1|0}while((e|0)!=(n|0))}k=k+1|0;if((k|0)==(g|0))break;else{c=c+d|0;h=h+128|0}}}}l=S;return}function Kd(b,c,e,f,g,h,i,j){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;h=h+-1|0;s=16+(h<<2)|0;if((g|0)>0){p=(j|0)>0;q=16+(h<<2)+1|0;r=16+(h<<2)+2|0;o=16+(h<<2)+3|0;n=0;while(1){if(p){i=a[s>>0]|0;k=a[q>>0]|0;l=a[r>>0]|0;m=a[o>>0]|0;h=0;do{w=R(d[e+(h+-1)>>0]|0,i)|0;v=R(d[e+h>>0]|0,k)|0;t=h;h=h+1|0;u=R(d[e+h>>0]|0,l)|0;u=w+32+v+u+(R(d[e+(t+2)>>0]|0,m)|0)>>6;a[b+t>>0]=u>>>0>255?0-u>>31:u}while((h|0)!=(j|0))}n=n+1|0;if((n|0)==(g|0))break;else{e=e+f|0;b=b+c|0}}}return}function Ld(b,c,e,f,g,h,i,j){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;h=i+-1|0;t=16+(h<<2)|0;if((g|0)>0){q=(j|0)>0;r=16+(h<<2)+1|0;s=16+(h<<2)+2|0;o=16+(h<<2)+3|0;p=f<<1;n=0;while(1){if(q){i=a[t>>0]|0;k=a[r>>0]|0;l=a[s>>0]|0;m=a[o>>0]|0;h=0;do{w=R(d[e+(h-f)>>0]|0,i)|0;v=R(d[e+h>>0]|0,k)|0;u=R(d[e+(h+f)>>0]|0,l)|0;u=w+32+v+u+(R(d[e+(h+p)>>0]|0,m)|0)>>6;a[b+h>>0]=u>>>0>255?0-u>>31:u;h=h+1|0}while((h|0)!=(j|0))}n=n+1|0;if((n|0)==(g|0))break;else{e=e+f|0;b=b+c|0}}}return}function Md(c,d,e,f,g,h,i,j){c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;B=l;l=l+8576|0;A=B;h=h+-1|0;w=16+(h<<2)|0;if((g|0)>-3){x=(j|0)>0;y=16+(h<<2)+1|0;z=16+(h<<2)+2|0;u=16+(h<<2)+3|0;v=g+2|0;s=0;t=A;e=e+(0-f)|0;while(1){if(x){m=a[w>>0]|0;n=a[y>>0]|0;o=a[z>>0]|0;p=a[u>>0]|0;k=0;h=a[e+-1>>0]|0;q=a[e>>0]|0;r=a[e+1>>0]|0;while(1){C=(R(q&255,n)|0)+(R(h&255,m)|0)+(R(r&255,o)|0)|0;h=a[e+(k+2)>>0]|0;b[t+(k<<1)>>1]=C+(R(h&255,p)|0);k=k+1|0;if((k|0)==(j|0))break;else{D=r;C=q;r=h;q=D;h=C}}}if((s|0)<(v|0)){s=s+1|0;t=t+128|0;e=e+f|0}else break}h=i+-1|0;r=16+(h<<2)|0;if((g|0)>0){s=(j|0)>0;t=16+(h<<2)+1|0;u=16+(h<<2)+2|0;q=16+(h<<2)+3|0;p=0;h=A+128|0;while(1){if(s){k=a[r>>0]|0;m=a[t>>0]|0;n=a[u>>0]|0;o=a[q>>0]|0;e=0;do{D=R(b[h+(e+-64<<1)>>1]|0,k)|0;D=(R(b[h+(e<<1)>>1]|0,m)|0)+D|0;D=D+(R(b[h+(e+64<<1)>>1]|0,n)|0)|0;D=(D+(R(b[h+(e+128<<1)>>1]|0,o)|0)>>6)+32>>6;a[c+e>>0]=D>>>0>255?0-D>>31:D;e=e+1|0}while((e|0)!=(j|0))}p=p+1|0;if((p|0)==(g|0))break;else{c=c+d|0;h=h+128|0}}}}l=B;return}function Nd(b,c,e,f,g,h,i,j,k,l,m){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;k=k+-1|0;w=16+(k<<2)|0;r=h+6|0;s=1<>1;if((g|0)>0){t=(m|0)>0;u=16+(k<<2)+1|0;v=16+(k<<2)+2|0;q=16+(k<<2)+3|0;p=0;k=b;while(1){if(t){h=a[w>>0]|0;b=a[u>>0]|0;n=a[v>>0]|0;o=a[q>>0]|0;l=0;do{y=R(d[e+(l+-1)>>0]|0,h)|0;y=(R(d[e+l>>0]|0,b)|0)+y|0;x=l;l=l+1|0;y=y+(R(d[e+l>>0]|0,n)|0)|0;y=((R(y+(R(d[e+(x+2)>>0]|0,o)|0)|0,i)|0)+s>>r)+j|0;a[k+x>>0]=y>>>0>255?0-y>>31:y}while((l|0)!=(m|0))}p=p+1|0;if((p|0)==(g|0))break;else{e=e+f|0;k=k+c|0}}}return}function Od(b,c,e,f,g,h,i,j,k,l,m){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;k=l+-1|0;x=16+(k<<2)|0;s=h+6|0;t=1<>1;if((g|0)>0){u=(m|0)>0;v=16+(k<<2)+1|0;w=16+(k<<2)+2|0;q=16+(k<<2)+3|0;r=f<<1;p=0;k=b;while(1){if(u){h=a[x>>0]|0;b=a[v>>0]|0;n=a[w>>0]|0;o=a[q>>0]|0;l=0;do{y=R(d[e+(l-f)>>0]|0,h)|0;y=(R(d[e+l>>0]|0,b)|0)+y|0;y=y+(R(d[e+(l+f)>>0]|0,n)|0)|0;y=((R(y+(R(d[e+(l+r)>>0]|0,o)|0)|0,i)|0)+t>>s)+j|0;a[k+l>>0]=y>>>0>255?0-y>>31:y;l=l+1|0}while((l|0)!=(m|0))}p=p+1|0;if((p|0)==(g|0))break;else{e=e+f|0;k=k+c|0}}}return}function Pd(c,d,e,f,g,h,i,j,k,m,n){c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;F=l;l=l+8576|0;C=F;k=k+-1|0;B=16+(k<<2)|0;D=h+6|0;E=1<>1;if((g|0)>-3){y=(n|0)>0;z=16+(k<<2)+1|0;A=16+(k<<2)+2|0;w=16+(k<<2)+3|0;x=g+2|0;u=C;v=0;h=e+(0-f)|0;while(1){if(y){o=a[B>>0]|0;p=a[z>>0]|0;q=a[A>>0]|0;r=a[w>>0]|0;e=0;k=a[h+-1>>0]|0;s=a[h>>0]|0;t=a[h+1>>0]|0;while(1){G=(R(s&255,p)|0)+(R(k&255,o)|0)+(R(t&255,q)|0)|0;k=a[h+(e+2)>>0]|0;b[u+(e<<1)>>1]=G+(R(k&255,r)|0);e=e+1|0;if((e|0)==(n|0))break;else{H=t;G=s;t=k;s=H;k=G}}}if((v|0)<(x|0)){u=u+128|0;v=v+1|0;h=h+f|0}else break}k=m+-1|0;t=16+(k<<2)|0;if((g|0)>0){u=(n|0)>0;v=16+(k<<2)+1|0;w=16+(k<<2)+2|0;s=16+(k<<2)+3|0;k=C+128|0;h=0;while(1){if(u){o=a[t>>0]|0;p=a[v>>0]|0;q=a[w>>0]|0;r=a[s>>0]|0;e=0;do{H=R(b[k+(e+-64<<1)>>1]|0,o)|0;H=(R(b[k+(e<<1)>>1]|0,p)|0)+H|0;H=H+(R(b[k+(e+64<<1)>>1]|0,q)|0)|0;H=((R(H+(R(b[k+(e+128<<1)>>1]|0,r)|0)>>6,i)|0)+E>>D)+j|0;a[c+e>>0]=H>>>0>255?0-H>>31:H;e=e+1|0}while((e|0)!=(n|0))}h=h+1|0;if((h|0)==(g|0))break;else{c=c+d|0;k=k+128|0}}}}l=F;return}function Qd(e,f,g,h,i,j,k,m,n){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0;q=l;l=l+128|0;p=q;j=p;o=j+128|0;do{c[j>>2]=0;j=j+4|0}while((j|0)<(o|0));o=d[i+96+n>>0]|0;j=0;do{r=j;j=j+1|0;c[p+((r+o&31)<<2)>>2]=b[i+112+(n*10|0)+(j<<1)>>1]}while((j|0)!=4);if((m|0)>0){i=(k|0)>0;o=0;while(1){if(i){j=0;do{r=d[f+j>>0]|0;r=r+(c[p+(r>>>3<<2)>>2]|0)|0;a[e+j>>0]=r>>>0>255?0-r>>31:r;j=j+1|0}while((j|0)!=(k|0))}o=o+1|0;if((o|0)==(m|0))break;else{f=f+h|0;e=e+g|0}}}l=q;return}function Rd(e,f,g,h,i,j,k,l,m,n,o,p){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0;r=i+112+(m*10|0)|0;q=c[i+100+(m<<2)>>2]|0;if((q|0)!=1){if(c[j>>2]|0){p=b[r>>1]|0;if((l|0)>0){o=0;do{s=(d[f+(R(o,h)|0)>>0]|0)+p|0;a[e+(R(o,g)|0)>>0]=s>>>0>255?0-s>>31:s;o=o+1|0}while((o|0)!=(l|0));o=1}else o=1}else o=0;if(c[j+8>>2]|0){n=b[r>>1]|0;k=k+-1|0;if((l|0)>0){p=0;do{s=(d[f+((R(p,h)|0)+k)>>0]|0)+n|0;a[e+((R(p,g)|0)+k)>>0]=s>>>0>255?0-s>>31:s;p=p+1|0}while((p|0)!=(l|0))}}if(!q){n=k;p=l;k=0}else{s=k;t=9}}else{s=k;o=0;t=9}if((t|0)==9){if(c[j+4>>2]|0){p=b[r>>1]|0;if((o|0)<(s|0)){k=o;do{t=(d[f+k>>0]|0)+p|0;a[e+k>>0]=t>>>0>255?0-t>>31:t;k=k+1|0}while((k|0)!=(s|0));k=1}else k=1}else k=0;if(c[j+12>>2]|0){j=b[r>>1]|0;p=l+-1|0;q=R(p,g)|0;r=R(p,h)|0;if((o|0)<(s|0)){n=o;do{l=(d[f+(n+r)>>0]|0)+j|0;a[e+(n+q)>>0]=l>>>0>255?0-l>>31:l;n=n+1|0}while((n|0)!=(s|0));n=s}else n=s}else{n=s;p=l}}Zd(e,f,g,h,i,n,p,m,o,k);return}function Sd(e,f,g,h,i,j,k,l,m,n,o,p){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;v=i+112+(m*10|0)|0;z=c[i+100+(m<<2)>>2]|0;G=(z|0)!=1;if(G){if(c[j>>2]|0){t=b[v>>1]|0;if((l|0)>0){s=0;do{D=(d[f+(R(s,h)|0)>>0]|0)+t|0;a[e+(R(s,g)|0)>>0]=D>>>0>255?0-D>>31:D;s=s+1|0}while((s|0)!=(l|0));u=1}else u=1}else u=0;if(c[j+8>>2]|0){t=b[v>>1]|0;k=k+-1|0;if((l|0)>0){s=0;do{D=(d[f+((R(s,h)|0)+k)>>0]|0)+t|0;a[e+((R(s,g)|0)+k)>>0]=D>>>0>255?0-D>>31:D;s=s+1|0}while((s|0)!=(l|0))}}if(!z){D=k;w=0;B=0}else{x=u;y=9}}else{x=0;y=9}if((y|0)==9){if(c[j+4>>2]|0){t=b[v>>1]|0;if((x|0)<(k|0)){s=x;do{D=(d[f+s>>0]|0)+t|0;a[e+s>>0]=D>>>0>255?0-D>>31:D;s=s+1|0}while((s|0)!=(k|0));w=1}else w=1}else w=0;if(c[j+12>>2]|0){v=b[v>>1]|0;l=l+-1|0;t=R(l,g)|0;u=R(l,h)|0;if((x|0)<(k|0)){s=x;do{D=(d[f+(s+u)>>0]|0)+v|0;a[e+(s+t)>>0]=D>>>0>255?0-D>>31:D;s=s+1|0}while((s|0)!=(k|0));D=k;u=x;B=1}else{D=k;u=x;B=1}}else{D=k;u=x;B=1}}Zd(e,f,g,h,i,D,l,m,u,w);C=(z|0)==2;if(!(C&(a[p>>0]|0)==0)){s=p+1|0;k=(z|0)==3;if(k&(a[s>>0]|0)==0)if(!(c[j+4>>2]|0)){t=(c[j+8>>2]|0)==0;A=1;y=0;z=s}else{t=0;A=1;y=0;z=s}else{t=0;A=k;y=0;z=s}}else{if(!(c[j>>2]|0))k=(c[j+4>>2]|0)==0;else k=0;t=0;A=0;y=k&1;z=p+1|0}v=t&1;m=p+2|0;if(C&(a[m>>0]|0)==0?(c[j+8>>2]|0)==0:0)k=(c[j+12>>2]|0)==0;else k=0;x=k&1;i=p+3|0;if(A&(a[i>>0]|0)==0?(c[j>>2]|0)==0:0)k=(c[j+12>>2]|0)==0;else k=0;t=k&1;if(G&(a[n>>0]|0)!=0?(E=y+w|0,F=l-t|0,(E|0)<(F|0)):0){k=E;do{a[e+(R(k,g)|0)>>0]=a[f+(R(k,h)|0)>>0]|0;k=k+1|0}while((k|0)!=(F|0))}if(G&(a[n+1>>0]|0)!=0?(H=v+w|0,I=l-x|0,(H|0)<(I|0)):0){s=D+-1|0;k=H;do{a[e+(s+(R(k,g)|0))>>0]=a[f+(s+(R(k,h)|0))>>0]|0;k=k+1|0}while((k|0)!=(I|0))}if(B&(a[o>>0]|0)!=0?(r=y+u|0,J=D-v|0,(r|0)<(J|0)):0)do{a[e+r>>0]=a[f+r>>0]|0;r=r+1|0}while((r|0)!=(J|0));if(B&(a[o+1>>0]|0)!=0?(q=t+u|0,K=D-x|0,(q|0)<(K|0)):0){k=l+-1|0;r=R(k,h)|0;k=R(k,g)|0;do{a[e+(q+k)>>0]=a[f+(q+r)>>0]|0;q=q+1|0}while((q|0)!=(K|0))}if(C&(a[p>>0]|0)!=0)a[e>>0]=a[f>>0]|0;r=D+-1|0;if(A&(a[z>>0]|0)!=0)a[e+r>>0]=a[f+r>>0]|0;q=l+-1|0;if(C&(a[m>>0]|0)!=0){K=e+(r+(R(q,g)|0))|0;a[K>>0]=a[f+(r+(R(q,h)|0))>>0]|0}if(A&(a[i>>0]|0)!=0){g=e+(R(q,g)|0)|0;a[g>>0]=a[f+(R(q,h)|0)>>0]|0}return}function Td(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Yd(a,b,1,c,d,e,f);return}function Ud(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Yd(a,1,b,c,d,e,f);return}function Vd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Xd(a,b,1,c,d,e);return}function Wd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Xd(a,1,b,c,d,e);return}function Xd(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;u=f<<2;v=R(e,-2)|0;w=0-e|0;t=0;while(1){p=c[g+(t<<2)>>2]|0;if((p|0)>=1){q=0-p|0;r=(a[h+t>>0]|0)==0;s=(a[i+t>>0]|0)==0;n=0;o=b;while(1){k=o+w|0;m=d[k>>0]|0;l=d[o>>0]|0;j=(d[o+v>>0]|0)+4-(d[o+e>>0]|0)+(l-m<<2)>>3;j=(j|0)<(q|0)?q:(j|0)>(p|0)?p:j;m=j+m|0;if(r)a[k>>0]=m>>>0>255?0-m>>31:m;j=l-j|0;if(s)a[o>>0]=j>>>0>255?0-j>>31:j;n=n+1|0;if((n|0)==4)break;else o=o+f|0}}t=t+1|0;if((t|0)==2)break;else b=b+u|0}return}function Yd(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;aa=R(e,-3)|0;ba=R(e,-2)|0;ca=0-e|0;M=e<<1;N=f*3|0;O=N+aa|0;P=N+ba|0;Q=N-e|0;S=N+M|0;T=N+e|0;U=g>>3;V=g>>2;W=R(e,-4)|0;X=e*3|0;Y=N+W|0;Z=N+X|0;_=(g>>1)+g>>3;$=f<<2;L=0;while(1){m=a[b+aa>>0]|0;n=a[b+ba>>0]|0;o=a[b+ca>>0]|0;k=o&255;z=(m&255)-((n&255)<<1)+k|0;z=(z|0)>-1?z:0-z|0;u=a[b+M>>0]|0;t=a[b+e>>0]|0;s=a[b>>0]|0;l=s&255;B=(u&255)-((t&255)<<1)+l|0;B=(B|0)>-1?B:0-B|0;p=d[b+Q>>0]|0;A=(d[b+O>>0]|0)-((d[b+P>>0]|0)<<1)+p|0;A=(A|0)>-1?A:0-A|0;q=d[b+N>>0]|0;C=(d[b+S>>0]|0)-((d[b+T>>0]|0)<<1)+q|0;C=(C|0)>-1?C:0-C|0;v=B+z|0;w=C+A|0;K=c[h+(L<<2)>>2]|0;y=a[i+L>>0]|0;D=a[j+L>>0]|0;a:do if((w+v|0)<(g|0)){x=(K*5|0)+1>>1;J=(d[b+W>>0]|0)-k|0;r=a[b+X>>0]|0;I=(r&255)-l|0;if((((((I|0)>-1?I:0-I|0)+((J|0)>-1?J:0-J|0)|0)<(U|0)?(J=k-l|0,(((J|0)>-1?J:0-J|0)|0)<(x|0)):0)?(J=(d[b+Y>>0]|0)-p|0,I=(d[b+Z>>0]|0)-q|0,(((I|0)>-1?I:0-I|0)+((J|0)>-1?J:0-J|0)|0)<(U|0)):0)?(J=p-q|0,((v<<1|0)<(V|0)?(((J|0)>-1?J:0-J|0)|0)<(x|0):0)&(w<<1|0)<(V|0)):0){z=K<<1;x=y<<24>>24==0;y=0-z|0;w=D<<24>>24==0;k=0;v=b;while(1){q=m&255;p=n&255;o=o&255;n=s&255;m=t&255;l=u&255;if(x){K=d[v+W>>0]|0;J=((q+4+m+(o+p+n<<1)|0)>>>3)-o|0;a[v+ca>>0]=((J|0)<(y|0)?y:(J|0)>(z|0)?z:J)+o;J=((q+2+p+o+n|0)>>>2)-p|0;a[v+ba>>0]=((J|0)<(y|0)?y:(J|0)>(z|0)?z:J)+p;K=((q*3|0)+4+p+o+n+(K<<1)>>3)-q|0;a[v+aa>>0]=((K|0)<(y|0)?y:(K|0)>(z|0)?z:K)+q}if(w){K=((p+4+l+(n+o+m<<1)|0)>>>3)-n|0;a[v>>0]=((K|0)<(y|0)?y:(K|0)>(z|0)?z:K)+n;K=((o+2+n+m+l|0)>>>2)-m|0;a[v+e>>0]=((K|0)<(y|0)?y:(K|0)>(z|0)?z:K)+m;K=((o+4+n+m+(l*3|0)+((r&255)<<1)|0)>>>3)-l|0;a[v+M>>0]=((K|0)<(y|0)?y:(K|0)>(z|0)?z:K)+l}l=v+f|0;k=k+1|0;if((k|0)==4)break a;v=l;m=a[l+aa>>0]|0;n=a[l+ba>>0]|0;o=a[l+ca>>0]|0;s=a[l>>0]|0;t=a[l+e>>0]|0;u=a[l+M>>0]|0;r=a[l+X>>0]|0}}H=K>>1;I=K*10|0;J=0-K|0;G=y<<24>>24==0;F=D<<24>>24==0;E=G&(A+z|0)<(_|0);D=0-H|0;A=F&(C+B|0)<(_|0);k=0;z=b;while(1){x=m&255;y=z+ba|0;w=n&255;r=z+ca|0;v=o&255;p=s&255;q=z+e|0;o=t&255;n=u&255;l=((p-v|0)*9|0)+8+(R(o-w|0,-3)|0)>>4;if((((l|0)>-1?l:0-l|0)|0)<(I|0)){m=(l|0)<(J|0)?J:(l|0)>(K|0)?K:l;l=m+v|0;if(G)a[r>>0]=l>>>0>255?0-l>>31:l;l=p-m|0;if(F)a[z>>0]=l>>>0>255?0-l>>31:l;if(E){C=((x+1+v|0)>>>1)-w+m>>1;C=((C|0)<(D|0)?D:(C|0)>(H|0)?H:C)+w|0;a[y>>0]=C>>>0>255?0-C>>31:C}if(A){C=((p+1+n|0)>>>1)-o-m>>1;C=((C|0)<(D|0)?D:(C|0)>(H|0)?H:C)+o|0;a[q>>0]=C>>>0>255?0-C>>31:C}}l=z+f|0;k=k+1|0;if((k|0)==4)break a;z=l;m=a[l+aa>>0]|0;n=a[l+ba>>0]|0;o=a[l+ca>>0]|0;s=a[l>>0]|0;t=a[l+e>>0]|0;u=a[l+M>>0]|0}}while(0);L=L+1|0;if((L|0)==2)break;else b=b+$|0}return}function Zd(e,f,g,h,i,j,k,l,m,n){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;o=c[i+100+(l<<2)>>2]|0;v=a[1891+(o<<2)>>0]|0;w=a[1891+(o<<2)+2>>0]|0;if((n|0)<(k|0)){u=R((a[1891+(o<<2)+3>>0]|0)+n|0,h)|0;x=(m|0)<(j|0);t=R(n,g)|0;r=R((a[1891+(o<<2)+1>>0]|0)+n|0,h)|0;s=n;n=R(n,h)|0;while(1){if(x){p=r+v|0;q=u+w|0;o=m;do{y=a[f+(o+n)>>0]|0;A=a[f+(p+o)>>0]|0;z=a[f+(q+o)>>0]|0;y=(b[i+112+(l*10|0)+(d[1907+(((y&255)>(A&255)?3:((y<<24>>24!=A<<24>>24)<<31>>31)+2|0)+((y&255)>(z&255)?1:(y<<24>>24!=z<<24>>24)<<31>>31))>>0]<<1)>>1]|0)+(y&255)|0;a[e+(o+t)>>0]=y>>>0>255?0-y>>31:y;o=o+1|0}while((o|0)!=(j|0))}s=s+1|0;if((s|0)==(k|0))break;else{t=t+g|0;u=u+h|0;r=r+h|0;n=n+h|0}}}return}function _d(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;n=c[b+136>>2]|0;j=1<>2]|0)+13080>>2];o=j+-1|0;k=o&e;l=(o&f|0)!=0;i=(a[n+309>>0]|0)!=0|l;b=i&1;c[n+31296>>2]=b;m=(a[n+308>>0]|0)!=0|(k|0)!=0;c[n+31292>>2]=m&1;if(!(o&(f|e)))i=d[n+311>>0]|0;else i=m&i&1;c[n+31300>>2]=i;if((k+g|0)==(j|0))b=(a[n+310>>0]|0)!=0&(l^1)&1;c[n+31308>>2]=b;if(!b)b=0;else b=(g+e|0)<(c[n+312>>2]|0);c[n+31304>>2]=b&1;c[n+31288>>2]=(h+f|0)<(c[n+316>>2]|0)&m&1;return}function $d(b,d,e,f,g,h,i,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0;q=l;l=l+64|0;m=1<>2]|0)+1620>>2]|0)>2:0){n=c[b+136>>2]|0;d=c[n+31236>>2]|0;n=c[n+31240>>2]|0;o=m;h=0;e=1}else{n=e;o=f;m=g;h=i;e=0}_d(b,d,n,o,m);ae(b,d,n,o,m,e,h,j,p);h=p+(j*12|0)|0;d=p+(j*12|0)+10|0;if((g+f|0)==12&(a[d>>0]|0)==3)a[d>>0]=1;c[k>>2]=c[h>>2];c[k+4>>2]=c[h+4>>2];c[k+8>>2]=c[h+8>>2];l=q;return}function ae(e,f,g,h,i,j,k,m,n){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0;Fa=l;l=l+16|0;Ba=Fa+4|0;Aa=Fa;r=c[e+136>>2]|0;ya=c[e+3508>>2]|0;Ca=c[ya+20>>2]|0;ya=c[ya+16>>2]|0;na=e+200|0;p=c[na>>2]|0;oa=c[p+13156>>2]|0;T=c[r+31288>>2]|0;q=c[r+31292>>2]|0;qa=c[r+31300>>2]|0;s=c[r+31296>>2]|0;D=c[r+31308>>2]|0;ra=f+-1|0;U=i+g|0;sa=U+-1|0;E=h+f|0;wa=E+-1|0;ta=g+-1|0;Ea=e+2428|0;o=c[e+3036>>2]|0;if((c[Ea>>2]|0)==1)Da=o;else Da=c[e+3036+((o>>>0>(c[e+3040>>2]|0)>>>0&1)<<2)>>2]|0;k=(j|0)==0&(k|0)==1;if(k){j=c[r+31248>>2]|0;switch(j|0){case 7:case 6:case 2:{o=0;p=0;t=10;break}default:t=5}}else t=5;do if((t|0)==5){j=e+204|0;o=c[(c[j>>2]|0)+1620>>2]&255;if(!((q|0)==0|((ra>>o|0)==(f>>o|0)?(sa>>o|0)==(g>>o|0):0))){o=c[p+13084>>2]|0;o=(R(sa>>o,oa)|0)+(ra>>o)|0;q=(a[ya+(o*12|0)+10>>0]|0)!=0;p=q&1;if(q){q=ya+(o*12|0)|0;c[n>>2]=c[q>>2];c[n+4>>2]=c[q+4>>2];c[n+8>>2]=c[q+8>>2];if(!m)break;else o=1}else o=0}else{o=0;p=0}if(k){j=c[r+31248>>2]|0;t=10}else t=12}while(0);a:do if((t|0)==10){switch(j|0){case 5:case 4:case 1:{q=0;t=24;break a}default:{}}j=e+204|0;t=12}while(0);b:do if((t|0)==12){r=c[(c[j>>2]|0)+1620>>2]&255;if(!((s|0)==0|((wa>>r|0)==(f>>r|0)?(ta>>r|0)==(g>>r|0):0))){j=c[(c[na>>2]|0)+13084>>2]|0;k=(R(ta>>j,oa)|0)+(wa>>j)|0;r=a[ya+(k*12|0)+10>>0]|0;s=r<<24>>24!=0;q=s&1;if(s){s=ya+(k*12|0)|0;c:do if(p|0?(j=(R(sa>>j,oa)|0)+(ra>>j)|0,v=ya+(j*12|0)|0,v=d[v>>0]|d[v+1>>0]<<8|d[v+2>>0]<<16|d[v+3>>0]<<24,x=ya+(j*12|0)+4|0,x=d[x>>0]|d[x+1>>0]<<8|d[x+2>>0]<<16|d[x+3>>0]<<24,z=a[ya+(j*12|0)+8>>0]|0,B=a[ya+(j*12|0)+9>>0]|0,u=d[s>>0]|d[s+1>>0]<<8|d[s+2>>0]<<16|d[s+3>>0]<<24,w=ya+(k*12|0)+4|0,w=d[w>>0]|d[w+1>>0]<<8|d[w+2>>0]<<16|d[w+3>>0]<<24,y=a[ya+(k*12|0)+8>>0]|0,A=a[ya+(k*12|0)+9>>0]|0,r<<24>>24==(a[ya+(j*12|0)+10>>0]|0)):0){switch(r<<24>>24){case 3:{if(!((u|0)==(v|0)?y<<24>>24==z<<24>>24:0))break c;if(A<<24>>24==B<<24>>24)j=(w|0)==(x|0);else break c;break}case 1:{if(y<<24>>24==z<<24>>24)j=(u|0)==(v|0);else break c;break}case 2:{if(A<<24>>24==B<<24>>24)j=(w|0)==(x|0);else break c;break}default:break c}if(j){t=24;break b}}while(0);B=n+(o*12|0)|0;c[B>>2]=c[s>>2];c[B+4>>2]=c[s+4>>2];c[B+8>>2]=c[s+8>>2];if((o|0)!=(m|0)){o=o+1|0;t=24}}else t=24}else{q=0;t=24}}while(0);d:do if((t|0)==24){e:do if(((D|0)!=0?(C=c[na>>2]|0,N=c[C+13084>>2]|0,O=R(ta>>N,oa)|0,P=O+(E>>N)|0,Q=a[ya+(P*12|0)+10>>0]|0,Q<<24>>24!=0):0)?(E|0)<(c[C+13120>>2]|0):0){D=c[C+13080>>2]|0;if(((ta>>D|0)>=(g>>D|0)?(E>>D|0)>=(f>>D|0):0)?(z=c[(c[e+204>>2]|0)+1684>>2]|0,B=c[C+13072>>2]|0,C=c[C+13164>>2]|0,A=C+2|0,D=c[z+((R(g>>B&C,A)|0)+(f>>B&C)<<2)>>2]|0,(c[z+((R(ta>>B&C,A)|0)+(E>>B&C)<<2)>>2]|0)>(D|0)):0)break;D=c[(c[e+204>>2]|0)+1620>>2]&255;if(!((E>>D|0)==(f>>D|0)?(ta>>D|0)==(g>>D|0):0)){k=ya+(P*12|0)|0;f:do if(q|0?(O=O+(wa>>N)|0,G=ya+(O*12|0)|0,G=d[G>>0]|d[G+1>>0]<<8|d[G+2>>0]<<16|d[G+3>>0]<<24,I=ya+(O*12|0)+4|0,I=d[I>>0]|d[I+1>>0]<<8|d[I+2>>0]<<16|d[I+3>>0]<<24,K=a[ya+(O*12|0)+8>>0]|0,M=a[ya+(O*12|0)+9>>0]|0,F=d[k>>0]|d[k+1>>0]<<8|d[k+2>>0]<<16|d[k+3>>0]<<24,H=ya+(P*12|0)+4|0,H=d[H>>0]|d[H+1>>0]<<8|d[H+2>>0]<<16|d[H+3>>0]<<24,J=a[ya+(P*12|0)+8>>0]|0,L=a[ya+(P*12|0)+9>>0]|0,Q<<24>>24==(a[ya+(O*12|0)+10>>0]|0)):0){switch(Q<<24>>24){case 3:{if(!((F|0)==(G|0)?J<<24>>24==K<<24>>24:0))break f;if(L<<24>>24==M<<24>>24)j=(H|0)==(I|0);else break f;break}case 1:{if(J<<24>>24==K<<24>>24)j=(F|0)==(G|0);else break f;break}case 2:{if(L<<24>>24==M<<24>>24)j=(H|0)==(I|0);else break f;break}default:break f}if(j)break e}while(0);Q=n+(o*12|0)|0;c[Q>>2]=c[k>>2];c[Q+4>>2]=c[k+4>>2];c[Q+8>>2]=c[k+8>>2];if((o|0)==(m|0))break d;o=o+1|0}}while(0);g:do if(((T|0)!=0?(S=c[na>>2]|0,ba=c[S+13084>>2]|0,ca=ra>>ba,da=(R(U>>ba,oa)|0)+ca|0,ea=a[ya+(da*12|0)+10>>0]|0,ea<<24>>24!=0):0)?(U|0)<(c[S+13124>>2]|0):0){T=c[S+13080>>2]|0;if(((U>>T|0)>=(g>>T|0)?(ra>>T|0)>=(f>>T|0):0)?(O=c[(c[e+204>>2]|0)+1684>>2]|0,Q=c[S+13072>>2]|0,S=c[S+13164>>2]|0,P=S+2|0,T=c[O+((R(g>>Q&S,P)|0)+(f>>Q&S)<<2)>>2]|0,(c[O+((R(U>>Q&S,P)|0)+(ra>>Q&S)<<2)>>2]|0)>(T|0)):0)break;T=c[(c[e+204>>2]|0)+1620>>2]&255;if(!((ra>>T|0)==(f>>T|0)?(U>>T|0)==(g>>T|0):0)){k=ya+(da*12|0)|0;h:do if(p|0?(ca=(R(sa>>ba,oa)|0)+ca|0,W=ya+(ca*12|0)|0,W=d[W>>0]|d[W+1>>0]<<8|d[W+2>>0]<<16|d[W+3>>0]<<24,Y=ya+(ca*12|0)+4|0,Y=d[Y>>0]|d[Y+1>>0]<<8|d[Y+2>>0]<<16|d[Y+3>>0]<<24,_=a[ya+(ca*12|0)+8>>0]|0,aa=a[ya+(ca*12|0)+9>>0]|0,V=d[k>>0]|d[k+1>>0]<<8|d[k+2>>0]<<16|d[k+3>>0]<<24,X=ya+(da*12|0)+4|0,X=d[X>>0]|d[X+1>>0]<<8|d[X+2>>0]<<16|d[X+3>>0]<<24,Z=a[ya+(da*12|0)+8>>0]|0,$=a[ya+(da*12|0)+9>>0]|0,ea<<24>>24==(a[ya+(ca*12|0)+10>>0]|0)):0){switch(ea<<24>>24){case 3:{if(!((V|0)==(W|0)?Z<<24>>24==_<<24>>24:0))break h;if($<<24>>24==aa<<24>>24)j=(X|0)==(Y|0);else break h;break}case 1:{if(Z<<24>>24==_<<24>>24)j=(V|0)==(W|0);else break h;break}case 2:{if($<<24>>24==aa<<24>>24)j=(X|0)==(Y|0);else break h;break}default:break h}if(j)break g}while(0);ea=n+(o*12|0)|0;c[ea>>2]=c[k>>2];c[ea+4>>2]=c[k+4>>2];c[ea+8>>2]=c[k+8>>2];if((o|0)==(m|0))break d;o=o+1|0}}while(0);i:do if(((qa|0)!=0?(ua=c[(c[na>>2]|0)+13084>>2]|0,va=R(ta>>ua,oa)|0,pa=ra>>ua,xa=va+pa|0,za=a[ya+(xa*12|0)+10>>0]|0,za<<24>>24!=0):0)?(qa=c[(c[e+204>>2]|0)+1620>>2]&255,!((ra>>qa|0)==(f>>qa|0)?(ta>>qa|0)==(g>>qa|0):0)):0){j:do if(p|0?(ga=ya+(xa*12|0)|0,ta=(R(sa>>ua,oa)|0)+pa|0,fa=ya+(ta*12|0)|0,fa=d[fa>>0]|d[fa+1>>0]<<8|d[fa+2>>0]<<16|d[fa+3>>0]<<24,ha=ya+(ta*12|0)+4|0,ha=d[ha>>0]|d[ha+1>>0]<<8|d[ha+2>>0]<<16|d[ha+3>>0]<<24,ja=a[ya+(ta*12|0)+8>>0]|0,la=a[ya+(ta*12|0)+9>>0]|0,ga=d[ga>>0]|d[ga+1>>0]<<8|d[ga+2>>0]<<16|d[ga+3>>0]<<24,ia=ya+(xa*12|0)+4|0,ia=d[ia>>0]|d[ia+1>>0]<<8|d[ia+2>>0]<<16|d[ia+3>>0]<<24,ka=a[ya+(xa*12|0)+8>>0]|0,ma=a[ya+(xa*12|0)+9>>0]|0,za<<24>>24==(a[ya+(ta*12|0)+10>>0]|0)):0){switch(za<<24>>24){case 3:{if(!((ga|0)==(fa|0)?ka<<24>>24==ja<<24>>24:0))break j;if(ma<<24>>24==la<<24>>24)j=(ia|0)==(ha|0);else break j;break}case 1:{if(ka<<24>>24==ja<<24>>24)j=(ga|0)==(fa|0);else break j;break}case 2:{if(ma<<24>>24==la<<24>>24)j=(ia|0)==(ha|0);else break j;break}default:break j}if(j)break i}while(0);if(q){j=ya+(xa*12|0)|0;wa=va+(wa>>ua)|0;q=ya+(wa*12|0)|0;q=d[q>>0]|d[q+1>>0]<<8|d[q+2>>0]<<16|d[q+3>>0]<<24;s=ya+(wa*12|0)+4|0;s=d[s>>0]|d[s+1>>0]<<8|d[s+2>>0]<<16|d[s+3>>0]<<24;u=a[ya+(wa*12|0)+8>>0]|0;v=a[ya+(wa*12|0)+9>>0]|0;p=d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24;r=ya+(xa*12|0)+4|0;r=d[r>>0]|d[r+1>>0]<<8|d[r+2>>0]<<16|d[r+3>>0]<<24;t=a[ya+(xa*12|0)+8>>0]|0;k=a[ya+(xa*12|0)+9>>0]|0;k:do if(za<<24>>24==(a[ya+(wa*12|0)+10>>0]|0))switch(za<<24>>24){case 3:{if(!((p|0)==(q|0)?t<<24>>24==u<<24>>24:0)){k=0;break k}k=(r|0)==(s|0)?k<<24>>24==v<<24>>24:0;break k}case 1:{k=(p|0)==(q|0)?t<<24>>24==u<<24>>24:0;break k}case 2:{k=(r|0)==(s|0)?k<<24>>24==v<<24>>24:0;break k}default:{k=0;break k}}else k=0;while(0);if(!((o|0)!=4&(k^1)))break}else{if((o|0)==4){o=4;break}j=ya+(xa*12|0)|0}za=n+(o*12|0)|0;c[za>>2]=c[j>>2];c[za+4>>2]=c[j+4>>2];c[za+8>>2]=c[j+8>>2];if((o|0)==(m|0))break d;o=o+1|0}while(0);do if((a[e+3035>>0]|0)!=0?o>>>0<(c[e+3080>>2]|0)>>>0:0){c[Ba>>2]=0;c[Aa>>2]=0;k=be(e,f,g,h,i,0,Ba,0)|0;if(!(c[Ea>>2]|0))j=be(e,f,g,h,i,0,Aa,1)|0;else j=0;if(j|k){a[n+(o*12|0)+10>>0]=(j<<1)+k;b[n+(o*12|0)+8>>1]=0;j=n+(o*12|0)|0;Ba=c[Ba>>2]|0;b[j>>1]=Ba;b[j+2>>1]=Ba>>>16;j=n+(o*12|0)+4|0;Ba=c[Aa>>2]|0;b[j>>1]=Ba;b[j+2>>1]=Ba>>>16;j=(o|0)==(m|0);if(j)break d;else{o=((j^1)&1)+o|0;break}}else break}while(0);u=e+3080|0;j=c[u>>2]|0;l:do if((o|0)>1&(c[Ea>>2]|0)==0&o>>>0>>0){t=R(o+-1|0,o)|0;s=0;while(1){if((s|0)>=(t|0))break l;Ba=d[1912+(s<<1)>>0]|0;e=d[1912+(s<<1)+1>>0]|0;k=c[n+(Ba*12|0)>>2]|0;r=a[n+(Ba*12|0)+8>>0]|0;p=c[n+(e*12|0)+4>>2]|0;q=a[n+(e*12|0)+9>>0]|0;if(((a[n+(Ba*12|0)+10>>0]&1)!=0?(a[n+(e*12|0)+10>>0]&2)!=0:0)?!((k|0)==(p|0)?(c[Ca+64+(r<<24>>24<<2)>>2]|0)==(c[Ca+260+(q<<24>>24<<2)>>2]|0):0):0){a[n+(o*12|0)+8>>0]=r;a[n+(o*12|0)+9>>0]=q;a[n+(o*12|0)+10>>0]=3;c[n+(o*12|0)>>2]=k;c[n+(o*12|0)+4>>2]=p;if((o|0)==(m|0))break d;o=o+1|0;j=c[u>>2]|0}if(o>>>0>>0)s=s+1|0;else break}}while(0);if(o>>>0>>0){j=0;while(1){a[n+(o*12|0)+10>>0]=((c[Ea>>2]|0)==0&1)<<1|1;c[n+(o*12|0)>>2]=0;c[n+(o*12|0)+4>>2]=0;Ca=(j|0)<(Da|0)?j&255:0;a[n+(o*12|0)+8>>0]=Ca;a[n+(o*12|0)+9>>0]=Ca;if((o|0)==(m|0))break d;o=o+1|0;if(o>>>0>=(c[u>>2]|0)>>>0)break;else j=j+1|0}}}while(0);l=Fa;return}function be(d,e,f,g,h,i,j,k){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+32|0;q=x+12|0;v=x;w=d+200|0;o=c[w>>2]|0;r=c[o+13156>>2]|0;s=c[(c[d+3508>>2]|0)+36>>2]|0;do if(s){t=c[s+16>>2]|0;u=c[s+32>>2]|0;m=g+e|0;n=h+f|0;if(!t)m=0;else{p=c[o+13080>>2]|0;if(((f>>p|0)==(n>>p|0)?(n|0)<(c[o+13124>>2]|0):0)?(m|0)<(c[o+13120>>2]|0):0){p=m&-16;n=n&-16;if((a[d+140>>0]|0)==1)m=c[w>>2]|0;else m=o;m=c[m+13084>>2]|0;m=t+(((R(n>>m,r)|0)+(p>>m)|0)*12|0)|0;c[v>>2]=c[m>>2];c[v+4>>2]=c[m+4>>2];c[v+8>>2]=c[m+8>>2];m=Wc(d,s,p,n)|0;c[q>>2]=c[v>>2];c[q+4>>2]=c[v+4>>2];c[q+8>>2]=c[v+8>>2];m=ce(d,q,i,j,k,u,m)|0;if(m|0)break}n=(g>>1)+e&-16;m=(h>>1)+f&-16;w=c[(c[w>>2]|0)+13084>>2]|0;w=t+(((R(m>>w,r)|0)+(n>>w)|0)*12|0)|0;c[v>>2]=c[w>>2];c[v+4>>2]=c[w+4>>2];c[v+8>>2]=c[w+8>>2];m=Wc(d,s,n,m)|0;c[q>>2]=c[v>>2];c[q+4>>2]=c[v+4>>2];c[q+8>>2]=c[v+8>>2];m=ce(d,q,i,j,k,u,m)|0}}else{b[j>>1]=0;b[j+2>>1]=0>>>16;m=0}while(0);l=x;return m|0}function ce(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0;p=c[(c[b+3508>>2]|0)+20>>2]|0;j=a[d+10>>0]|0;a:do if(j<<24>>24){if(!(j&1)){j=de(f,d+4|0,h,c[b+5816>>2]|0,p,g,e,i,1,a[d+9>>0]|0)|0;break}switch(j<<24>>24){case 1:{j=de(f,d,h,c[b+5816>>2]|0,p,g,e,i,0,a[d+8>>0]|0)|0;break a}case 3:break;default:{j=0;break a}}o=b+5816|0;k=0;n=0;do{l=c[p+(n*196|0)+192>>2]|0;b:do if((l|0)>0){m=c[o>>2]|0;j=0;while(1){if((c[p+(n*196|0)+64+(j<<2)>>2]|0)>(m|0))break;j=j+1|0;if((j|0)>=(l|0))break b}k=k+1|0}while(0);n=n+1|0}while((n|0)!=2);j=c[o>>2]|0;if(!k)if(!g){j=de(f,d,h,j,p,0,e,i,0,a[d+8>>0]|0)|0;break}else{j=de(f,d+4|0,h,j,p,g,e,i,1,a[d+9>>0]|0)|0;break}else if((a[b+3051>>0]|0)==1){j=de(f,d,h,j,p,g,e,i,0,a[d+8>>0]|0)|0;break}else{j=de(f,d+4|0,h,j,p,g,e,i,1,a[d+9>>0]|0)|0;break}}else j=0;while(0);return j|0}function de(a,d,e,f,g,h,i,j,k,l){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0;m=c[g+(h*196|0)+128+(i<<2)>>2]|0;do if((m|0)==(c[j+(k*196|0)+128+(l<<2)>>2]|0)){j=e-(c[j+(k*196|0)+64+(l<<2)>>2]|0)|0;e=f-(c[g+(h*196|0)+64+(i<<2)>>2]|0)|0;if((m|0)==0?(j|0)!=0&(j|0)!=(e|0):0){i=(j+128|0)>>>0>255?j>>31^127:j;m=i<<24>>24;j=(m|0)/2|0;e=(R((((i&255)<<24>>24>-2?j:0-j|0)+16384|0)/(m|0)|0,((e+128|0)>>>0>255?e>>31^127:e)<<24>>24)|0)+32>>6;e=(e|0)<-4096?-4096:(e|0)<4095?e:4095;m=R(e,b[d>>1]|0)|0;m=m+127+(m>>>31)|0;j=m>>8;b[a>>1]=(j+32768|0)>>>0>65535?m>>31^32767:j;d=R(e,b[d+2>>1]|0)|0;d=d+127+(d>>>31)|0;e=d>>8;j=1;e=((e+32768|0)>>>0>65535?d>>31^32767:e)&65535;break}b[a>>1]=b[d>>1]|0;j=1;e=b[d+2>>1]|0}else{b[a>>1]=0;j=0;e=0}while(0);b[a+2>>1]=e;return j|0}function ee(d,e,f,g,h,i,j,k,m,n,o){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;J=l;l=l+32|0;E=J;F=J+16|0;G=J+12|0;H=J+8|0;A=c[d+136>>2]|0;w=c[(c[d+3508>>2]|0)+16>>2]|0;B=d+200|0;q=c[B>>2]|0;x=c[q+13156>>2]|0;j=E;c[j>>2]=0;c[j+4>>2]=0;j=c[A+31292>>2]|0;y=c[A+31300>>2]|0;v=c[A+31296>>2]|0;s=c[A+31308>>2]|0;I=a[m+8+o>>0]|0;C=(o|0)==0&1;D=e+-1|0;r=h+f|0;if(((c[A+31288>>2]|0)!=0?(A=c[q+13084>>2]|0,(a[w+(((R(r>>A,x)|0)+(D>>A)|0)*12|0)+10>>0]|0)!=0):0)?(r|0)<(c[q+13124>>2]|0):0){A=c[q+13080>>2]|0;if((r>>A|0)>=(f>>A|0)?(D>>A|0)>=(e>>A|0):0){p=c[(c[d+204>>2]|0)+1684>>2]|0;z=c[q+13072>>2]|0;A=c[q+13164>>2]|0;t=A+2|0;i=c[p+((R(f>>z&A,t)|0)+(e>>z&A)<<2)>>2]|0;i=(c[p+((R(r>>z&A,t)|0)+(D>>z&A)<<2)>>2]|0)<=(i|0)&1}else i=1;k=(i|0)!=0}else k=0;p=r+-1|0;if(!j)i=0;else{i=c[q+13084>>2]|0;i=(a[w+(((R(p>>i,x)|0)+(D>>i)|0)*12|0)+10>>0]|0)!=0}z=k|i;if(k){A=c[q+13084>>2]|0;if((fe(d,D>>A,r>>A,o,F,o,I)|0)==0?(A=c[(c[B>>2]|0)+13084>>2]|0,(fe(d,D>>A,r>>A,C,F,o,I)|0)==0):0)L=13;else i=1}else L=13;do if((L|0)==13){if(i){A=c[(c[B>>2]|0)+13084>>2]|0;if(fe(d,D>>A,p>>A,o,F,o,I)|0){i=1;break}A=c[(c[B>>2]|0)+13084>>2]|0;if(fe(d,D>>A,p>>A,C,F,o,I)|0){i=1;break}}if(k){A=c[(c[B>>2]|0)+13084>>2]|0;if(ge(d,D>>A,r>>A,o,F,o,I)|0){i=1;break}A=c[(c[B>>2]|0)+13084>>2]|0;if(ge(d,D>>A,r>>A,C,F,o,I)|0){i=1;break}}if(i){A=c[(c[B>>2]|0)+13084>>2]|0;if(ge(d,D>>A,p>>A,o,F,o,I)|0){i=1;break}A=c[(c[B>>2]|0)+13084>>2]|0;if(ge(d,D>>A,p>>A,C,F,o,I)|0){i=1;break}}i=0}while(0);t=g+e|0;A=f+-1|0;if(((s|0)!=0?(u=c[B>>2]|0,s=c[u+13084>>2]|0,(a[w+(((R(A>>s,x)|0)+(t>>s)|0)*12|0)+10>>0]|0)!=0):0)?(t|0)<(c[u+13120>>2]|0):0){s=c[u+13080>>2]|0;if((A>>s|0)>=(f>>s|0)?(t>>s|0)>=(e>>s|0):0){q=c[(c[d+204>>2]|0)+1684>>2]|0;s=c[u+13072>>2]|0;u=c[u+13164>>2]|0;r=u+2|0;j=c[q+((R(f>>s&u,r)|0)+(e>>s&u)<<2)>>2]|0;j=(c[q+((R(A>>s&u,r)|0)+(t>>s&u)<<2)>>2]|0)<=(j|0)&1}else j=1;p=(j|0)!=0}else p=0;r=t+-1|0;if(!v)q=0;else{q=c[(c[B>>2]|0)+13084>>2]|0;q=(a[w+(((R(A>>q,x)|0)+(r>>q)|0)*12|0)+10>>0]|0)!=0}if(!y)j=0;else{j=c[(c[B>>2]|0)+13084>>2]|0;j=(a[w+(((R(A>>j,x)|0)+(D>>j)|0)*12|0)+10>>0]|0)!=0}if(p){y=c[(c[B>>2]|0)+13084>>2]|0;if((fe(d,t>>y,A>>y,o,G,o,I)|0)==0?(y=c[(c[B>>2]|0)+13084>>2]|0,(fe(d,t>>y,A>>y,C,G,o,I)|0)==0):0)L=37;else k=1}else L=37;do if((L|0)==37){if(q){y=c[(c[B>>2]|0)+13084>>2]|0;if(fe(d,r>>y,A>>y,o,G,o,I)|0){k=1;break}y=c[(c[B>>2]|0)+13084>>2]|0;if(fe(d,r>>y,A>>y,C,G,o,I)|0){k=1;break}}if(j){y=c[(c[B>>2]|0)+13084>>2]|0;if(fe(d,D>>y,A>>y,o,G,o,I)|0){k=1;break}y=c[(c[B>>2]|0)+13084>>2]|0;if(fe(d,D>>y,A>>y,C,G,o,I)|0){k=1;break}}k=0}while(0);do if(!z){if(k){c[F>>2]=c[G>>2];i=1}if(p){k=c[(c[B>>2]|0)+13084>>2]|0;k=ge(d,t>>k,A>>k,o,G,o,I)|0;if(k|0)break;k=c[(c[B>>2]|0)+13084>>2]|0;k=ge(d,t>>k,A>>k,C,G,o,I)|0}else k=0;if(!((k|0)!=0|q^1)){k=c[(c[B>>2]|0)+13084>>2]|0;k=ge(d,r>>k,A>>k,o,G,o,I)|0;if(k|0)break;k=c[(c[B>>2]|0)+13084>>2]|0;k=ge(d,r>>k,A>>k,C,G,o,I)|0}if(!((k|0)!=0|j^1)){k=c[(c[B>>2]|0)+13084>>2]|0;k=ge(d,D>>k,A>>k,o,G,o,I)|0;if(!k){k=c[(c[B>>2]|0)+13084>>2]|0;k=ge(d,D>>k,A>>k,C,G,o,I)|0}}}while(0);j=(i|0)!=0;if(j){c[E>>2]=c[F>>2];i=1}else i=0;do if(k){if((j?(b[F>>1]|0)==(b[G>>1]|0):0)?(b[F+2>>1]|0)==(b[G+2>>1]|0):0){K=i;L=63;break}c[E+(i<<2)>>2]=c[G>>2];if((i+1|0)>>>0<2){K=1;L=63}}else{K=i;L=63}while(0);if(((L|0)==63?(K|0)==(n|0)&(a[d+3035>>0]|0)!=0:0)?be(d,e,f,g,h,I,H,o)|0:0)c[E+(n<<2)>>2]=c[H>>2];L=m+(o<<2)|0;n=c[E+(n<<2)>>2]|0;b[L>>1]=n;b[L+2>>1]=n>>>16;l=J;return}function fe(d,f,g,h,i,j,k){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0;m=c[d+3508>>2]|0;l=c[m+16>>2]|0;m=c[m+20>>2]|0;d=(R(c[(c[d+200>>2]|0)+13156>>2]|0,g)|0)+f|0;if((a[l+(d*12|0)+10>>0]&1<>0]<<2)>>2]|0)==(c[m+(j*196|0)+64+(k<<2)>>2]|0):0){d=l+(d*12|0)+(h<<2)|0;d=e[d>>1]|e[d+2>>1]<<16;b[i>>1]=d;b[i+2>>1]=d>>>16;d=1}else d=0;return d|0}function ge(d,f,g,h,i,j,k){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0;q=d+3508|0;m=c[q>>2]|0;l=c[m+16>>2]|0;m=c[m+20>>2]|0;g=(R(c[(c[d+200>>2]|0)+13156>>2]|0,g)|0)+f|0;if((a[l+(g*12|0)+10>>0]&1<>2]|0,(c[m+(h*196|0)+128+(a[l+(g*12|0)+8+h>>0]<<2)>>2]|0)==(n|0)):0){f=l+(g*12|0)+(h<<2)|0;f=e[f>>1]|e[f+2>>1]<<16;b[i>>1]=f;b[i+2>>1]=f>>>16;if((n|0)==0?(o=c[q>>2]|0,p=c[o+20>>2]|0,o=c[p+(h*196|0)+64+(a[(c[o+16>>2]|0)+(g*12|0)+8+h>>0]<<2)>>2]|0,p=c[p+(j*196|0)+64+(k<<2)>>2]|0,(o|0)!=(p|0)):0){q=c[d+5816>>2]|0;k=q-o|0;k=k|0?k:1;p=q-p|0;k=(k+128|0)>>>0>255?k>>31^127:k;q=k<<24>>24;j=(q|0)/2|0;q=(R(((p+128|0)>>>0>255?p>>31^127:p)<<24>>24,(((k&255)<<24>>24>-2?j:0-j|0)+16384|0)/(q|0)|0)|0)+32>>6;q=(q|0)<-4096?-4096:(q|0)<4095?q:4095;j=R(q,f<<16>>16)|0;j=j+127+(j>>>31)|0;k=j>>8;b[i>>1]=(k+32768|0)>>>0>65535?j>>31^32767:k;q=R(q,f>>16)|0;q=q+127+(q>>>31)|0;f=q>>8;b[i+2>>1]=(f+32768|0)>>>0>65535?q>>31^32767:f;f=1}else f=1}else f=0;return f|0}function he(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;l=(c[b+136>>2]|0)+204|0;b=e+2188|0;do if(((b|0)!=(d|0)?(g=e+2184|0,(c[g>>2]|0)!=0):0)?((We(l)|0)&255)<<24>>24!=0:0){if(f){f=(Ye(l)|0)+1|0;b=c[g>>2]|0;if(b>>>0>>0){b=-1094995529;break}else k=b-f|0}else k=((d-b|0)/168|0)+-1|0;b=We(l)|0;f=Ye(l)|0;if(f>>>0<=32767){i=R(1-(b<<1&510)|0,f+1|0)|0;j=e+2188+(k*168|0)+4|0;if((c[j>>2]|0)<0){c[d+4>>2]=0;c[d>>2]=0;b=0;break}else{b=0;f=0;h=0}while(1){g=We(l)|0;a[d+136+f>>0]=g;if(!((g&255|0)==0?((We(l)|0)&255)<<24>>24==0:0)){if((h|0)<(c[j>>2]|0))g=(c[e+2188+(k*168|0)+8+(h<<2)>>2]|0)+i|0;else g=i;c[d+8+(f<<2)>>2]=g;f=f+1|0;b=(g>>>31)+b|0}if((h|0)<(c[j>>2]|0))h=h+1|0;else break}e=d+4|0;c[e>>2]=f;c[d>>2]=b;if((f|0)>1){b=1;do{h=c[d+8+(b<<2)>>2]|0;i=a[d+136+b>>0]|0;f=b;do{g=f;f=f+-1|0;j=d+8+(f<<2)|0;k=c[j>>2]|0;if((h|0)<(k|0)){c[d+8+(g<<2)>>2]=k;l=d+136+f|0;a[d+136+g>>0]=a[l>>0]|0;c[j>>2]=h;a[l>>0]=i}}while((g|0)>1);b=b+1|0}while((b|0)<(c[e>>2]|0));b=c[d>>2]|0}if(b>>>0>1){f=0;do{b=b+-1|0;l=d+8+(f<<2)|0;j=c[l>>2]|0;i=d+136+f|0;e=a[i>>0]|0;k=d+8+(b<<2)|0;c[l>>2]=c[k>>2];l=d+136+b|0;a[i>>0]=a[l>>0]|0;c[k>>2]=j;a[l>>0]=e;f=f+1|0}while(f>>>0<(c[d>>2]|0)>>>1>>>0);b=0}else b=0}else b=-1094995529}else m=25;while(0);if((m|0)==25){c[d>>2]=Ye(l)|0;g=Ye(l)|0;b=c[d>>2]|0;if((b|g)>>>0<=15){m=b+g|0;c[d+4>>2]=m;if(m){if(b|0){b=0;f=0;do{b=b+-1-(Ye(l)|0)|0;c[d+8+(f<<2)>>2]=b;a[d+136+f>>0]=We(l)|0;f=f+1|0}while(f>>>0<(c[d>>2]|0)>>>0)}if(g){b=0;f=0;do{b=b+1+(Ye(l)|0)|0;c[d+8+((c[d>>2]|0)+f<<2)>>2]=b;m=(We(l)|0)&255;a[(c[d>>2]|0)+f+(d+136)>>0]=m;f=f+1|0}while((f|0)!=(g|0));b=0}else b=0}else b=0}else b=-1094995529}return b|0}function ie(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;v=l;l=l+16|0;t=v;p=(c[b+136>>2]|0)+204|0;r=tf(13196)|0;c[t>>2]=r;u=r;a:do if(r){s=r+4|0;q=c[s>>2]|0;e=je(b)|0;if((e|0)>=0){c[q>>2]=0;g=q+72|0;c[g>>2]=1;o=Te(p,8)|0;f=q+4|0;c[f>>2]=o;do if((o|0)<=3){a[q+8>>0]=0;m=q+13120|0;c[m>>2]=Xe(p,32)|0;e=Xe(p,32)|0;n=q+13124|0;c[n>>2]=e;e=Ge(c[m>>2]|0,e,0,c[b+4>>2]|0)|0;if((e|0)>=0){k=Te(p,8)|0;o=q+52|0;c[o>>2]=k+8;if(!k){switch(c[f>>2]|0){case 0:{f=8;break}case 1:{f=0;break}case 2:{f=4;break}default:f=5}c[q+60>>2]=f;c[q+56>>2]=0;f=Sf(f)|0;if(f){c[q+13180>>2]=0;c[q+13168>>2]=0;k=d[f+5>>0]|0;c[q+13172>>2]=k;c[q+13176>>2]=k;k=d[f+6>>0]|0;c[q+13184>>2]=k;c[q+13188>>2]=k;c[q+64>>2]=8;if((c[g>>2]|0)>0){f=0;do{c[q+76+(f*12|0)>>2]=1;c[q+76+(f*12|0)+4>>2]=0;c[q+76+(f*12|0)+8>>2]=-1;f=f+1|0}while((f|0)<(c[g>>2]|0))}g=(Ye(p)|0)+3|0;f=q+13064|0;c[f>>2]=g;g=1<>2]=h+(c[m>>2]|0)&g;c[n>>2]=(c[n>>2]|0)+h&g;g=q+13068|0;c[g>>2]=Ye(p)|0;h=q+13072|0;c[h>>2]=(Ye(p)|0)+2;j=Ye(p)|0;k=c[h>>2]|0;i=q+13076|0;c[i>>2]=k+j;if(k>>>0<(c[f>>2]|0)>>>0){w=Ye(p)|0;j=q+13092|0;c[j>>2]=w;k=q+13088|0;c[k>>2]=w;a[q+12940>>0]=1;a[q+12941>>0]=We(p)|0;w=We(p)|0;c[q+68>>2]=w;if(w|0){w=q+13044|0;a[w>>0]=(Te(p,4)|0)+1;a[q+13045>>0]=(Te(p,4)|0)+1;x=(Ye(p)|0)+3|0;c[q+13048>>2]=x;c[q+13052>>2]=(Ye(p)|0)+x;if((d[w>>0]|0|0)>(c[o>>2]|0)){e=-1094995529;break}a[q+13056>>0]=We(p)|0}c[q+2184>>2]=0;a[q+12942>>0]=0;a[q+13060>>0]=1;a[q+13061>>0]=We(p)|0;c[q+160>>2]=0;c[q+164>>2]=1;if(We(p)|0?(x=We(p)|0,Ve(p,7),x|0):0){c[q+13096>>2]=We(p)|0;c[q+13100>>2]=We(p)|0;c[q+13104>>2]=We(p)|0;c[q+13108>>2]=We(p)|0;We(p)|0;c[q+13112>>2]=We(p)|0;We(p)|0;c[q+13116>>2]=We(p)|0;We(p)|0}m=c[m>>2]|0;c[q+12>>2]=m;n=c[n>>2]|0;c[q+16>>2]=n;f=c[f>>2]|0;x=(c[g>>2]|0)+f|0;c[q+13080>>2]=x;g=f+-1|0;c[q+13084>>2]=g;w=1<>x;c[q+13128>>2]=y;w=n+-1+w>>x;c[q+13132>>2]=w;c[q+13136>>2]=R(y,w)|0;c[q+13140>>2]=m>>f;c[q+13144>>2]=n>>f;w=c[h>>2]|0;c[q+13148>>2]=m>>w;c[q+13152>>2]=n>>w;c[q+13156>>2]=m>>g;c[q+13160>>2]=n>>g;w=x-w|0;c[q+13164>>2]=(1<>2]=((c[o>>2]|0)*6|0)+-48;if((((!(x>>>0>6?1:((1<>2]|0)>>>0<=w>>>0:0)?(c[j>>2]|0)>>>0<=w>>>0:0)?(c[i>>2]|0)>>>0<=(x>>>0<5?x:5)>>>0:0)?(ke(p)|0)>=0:0){h=b+272|0;e=c[h>>2]|0;if((e|0)!=0?(Sg(c[e+4>>2]|0,c[s>>2]|0,c[r+8>>2]|0)|0)==0:0){wf(t);e=0;break a}else e=0;do{f=b+400+(e<<2)|0;g=c[f>>2]|0;do if(g|0){if(c[c[g+4>>2]>>2]|0)break;wf(f)}while(0);e=e+1|0}while((e|0)!=256);e=c[h>>2]|0;do if(e|0){f=b+200|0;if((c[f>>2]|0)!=(c[e+4>>2]|0))break;x=b+1424|0;wf(x);y=uf(c[h>>2]|0)|0;c[x>>2]=y;if(y|0)break;c[f>>2]=0}while(0);wf(h);c[h>>2]=u;e=0;break a}}else e=-1094995529}else e=-22}else e=-1094995529}}else e=-1094995529;while(0);wf(t)}}else e=-12;while(0);l=v;return e|0}function je(b){b=b|0;var d=0,e=0,f=0,g=0;e=tf(468)|0;if(!e)d=-12;else{f=c[e+4>>2]|0;c[f+4>>2]=1;g=f+8|0;c[g>>2]=1;a[f>>0]=0;c[f+348>>2]=1;d=0;do{c[f+352+(d<<2)>>2]=1;c[f+380+(d<<2)>>2]=0;c[f+408+(d<<2)>>2]=-1;d=d+1|0}while((d|0)<(c[g>>2]|0));c[f+436>>2]=0;c[f+440>>2]=1;a[f+444>>0]=0;d=b+208|0;wf(d);c[d>>2]=e;d=0}return d|0}function ke(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(le(a)|0)|0}function le(a){a=a|0;return c[a+8>>2]|0}function me(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;M=l;l=l+16|0;L=M+4|0;H=M;K=(c[b+136>>2]|0)+204|0;i=lf(1692)|0;c[H>>2]=i;a:do if(!i)d=-12;else{J=qf(i,1692,6,0,0)|0;c[L>>2]=J;I=J;if(!J){hf(H);d=-12;break}a[i+53>>0]=1;f=i+44|0;c[f>>2]=1;g=i+48|0;c[g>>2]=1;h=i+52|0;a[h>>0]=1;a[i+57>>0]=0;c[i+60>>2]=0;c[i+64>>2]=0;a[i+1629>>0]=2;J=Ye(K)|0;b:do if((J>>>0<=255?(d=Ye(K)|0,c[i>>2]=d,d>>>0<=31):0)?(e=c[b+272+(d<<2)>>2]|0,(e|0)!=0):0){G=c[e+4>>2]|0;a[i+41>>0]=We(K)|0;a[i+39>>0]=We(K)|0;c[i+1624>>2]=Te(K,3)|0;a[i+4>>0]=We(K)|0;a[i+5>>0]=We(K)|0;c[i+8>>2]=(Ye(K)|0)+1;c[i+12>>2]=(Ye(K)|0)+1;c[i+16>>2]=oe(K)|0;a[i+20>>0]=We(K)|0;a[i+21>>0]=We(K)|0;F=(We(K)|0)&255;a[i+22>>0]=F;d=i+24|0;c[d>>2]=0;if(F<<24>>24)c[d>>2]=Ye(K)|0;F=oe(K)|0;c[i+28>>2]=F;if((F+12|0)>>>0<=24?(F=oe(K)|0,c[i+32>>2]=F,(F+12|0)>>>0<=24):0){a[i+36>>0]=We(K)|0;a[i+37>>0]=We(K)|0;a[i+38>>0]=We(K)|0;a[i+40>>0]=We(K)|0;F=i+42|0;a[F>>0]=We(K)|0;a[i+43>>0]=We(K)|0;if(!(a[F>>0]|0))o=c[H>>2]|0;else{c[f>>2]=(Ye(K)|0)+1;d=(Ye(K)|0)+1|0;c[g>>2]=d;e=c[f>>2]|0;if(!e){d=-1094995529;break}if((d|0)==0?1:(e|0)>=(c[G+13120>>2]|0)){d=-1094995529;break}if((d|0)>=(c[G+13124>>2]|0)){d=-1094995529;break}E=i+1648|0;c[E>>2]=of(e,4)|0;F=of(c[g>>2]|0,4)|0;c[i+1652>>2]=F;if((c[E>>2]|0)==0|(F|0)==0){d=-12;break}F=(We(K)|0)&255;a[h>>0]=F;if(!(F<<24>>24)){F=c[f>>2]|0;d=F+-1|0;if((F|0)>1){i=c[H>>2]|0;f=i+1648|0;j=i+44|0;e=0;g=0;d=0;while(1){h=(Ye(K)|0)+1|0;c[(c[f>>2]|0)+(e<<2)>>2]=h;g=$g(h|0,0,g|0,d|0)|0;h=C;e=e+1|0;d=(c[j>>2]|0)+-1|0;if((e|0)>=(d|0))break;else d=h}}else{h=0;g=0}e=c[G+13128>>2]|0;f=((e|0)<0)<<31>>31;if(!(f>>>0>h>>>0|(f|0)==(h|0)&e>>>0>g>>>0)){d=-1094995529;break}j=Zg(e|0,f|0,g|0,h|0)|0;c[(c[i+1648>>2]|0)+(d<<2)>>2]=j;j=c[H>>2]|0;i=j+48|0;F=c[i>>2]|0;d=F+-1|0;if((F|0)>1){f=j+1652|0;e=0;g=0;d=0;while(1){h=(Ye(K)|0)+1|0;c[(c[f>>2]|0)+(e<<2)>>2]=h;g=$g(h|0,0,g|0,d|0)|0;h=C;e=e+1|0;d=(c[i>>2]|0)+-1|0;if((e|0)>=(d|0))break;else d=h}}else{h=0;g=0}e=c[G+13132>>2]|0;f=((e|0)<0)<<31>>31;if(!(f>>>0>h>>>0|(f|0)==(h|0)&e>>>0>g>>>0)){d=-1094995529;break}F=Zg(e|0,f|0,g|0,h|0)|0;c[(c[j+1652>>2]|0)+(d<<2)>>2]=F}F=(We(K)|0)&255;o=c[H>>2]|0;a[o+53>>0]=F}a[o+54>>0]=We(K)|0;F=(We(K)|0)&255;a[o+55>>0]=F;if((F<<24>>24?(a[o+56>>0]=We(K)|0,F=(We(K)|0)&255,a[o+57>>0]=F,F<<24>>24==0):0)?(F=o+60|0,c[F>>2]=(oe(K)|0)<<1,E=(oe(K)|0)<<1,c[o+64>>2]=E,(E+13|0)>>>0>26?1:((c[F>>2]|0)+13|0)>>>0>26):0){d=-1094995529;break}F=(We(K)|0)&255;a[o+68>>0]=F;if(F<<24>>24){d=o+69|0;pe(d);d=qe(b,d,G)|0;if((d|0)<0)break}else d=0;a[o+1617>>0]=We(K)|0;F=(Ye(K)|0)+2|0;c[o+1620>>2]=F;E=G+13080|0;if(F>>>0<=(c[E>>2]|0)>>>0){a[o+1628>>0]=We(K)|0;if(We(K)|0?(F=We(K)|0,Te(K,7)|0,F|0):0)re(b,o);j=o+44|0;i=o+1656|0;c[i>>2]=of((c[j>>2]|0)+1|0,4)|0;m=o+48|0;k=o+1660|0;c[k>>2]=of((c[m>>2]|0)+1|0,4)|0;F=G+13128|0;D=of(c[F>>2]|0,4)|0;n=o+1664|0;c[n>>2]=D;if((c[i>>2]|0)!=0?!((c[k>>2]|0)==0|(D|0)==0):0){do if(a[o+52>>0]|0){f=o+1648|0;e=c[f>>2]|0;if(!e){c[f>>2]=of(c[j>>2]|0,4)|0;c[o+1652>>2]=of(c[m>>2]|0,4)|0;e=c[f>>2]|0;if(!e){d=-12;break b}}h=c[o+1652>>2]|0;if(!h){d=-12;break b}f=c[j>>2]|0;if((f|0)>0){g=0;do{D=g;g=g+1|0;B=c[F>>2]|0;c[e+(D<<2)>>2]=((R(B,g)|0)/(f|0)|0)-((R(B,D)|0)/(f|0)|0);f=c[j>>2]|0}while((g|0)<(f|0))}e=c[m>>2]|0;if((e|0)<=0)break;g=G+13132|0;f=0;do{D=f;f=f+1|0;B=c[g>>2]|0;c[h+(D<<2)>>2]=((R(B,f)|0)/(e|0)|0)-((R(B,D)|0)/(e|0)|0);e=c[m>>2]|0}while((f|0)<(e|0))}while(0);i=c[i>>2]|0;c[i>>2]=0;if((c[j>>2]|0)>0){f=c[o+1648>>2]|0;e=0;g=0;do{g=(c[f+(e<<2)>>2]|0)+g|0;e=e+1|0;c[i+(e<<2)>>2]=g}while((e|0)<(c[j>>2]|0))}g=c[k>>2]|0;c[g>>2]=0;if((c[m>>2]|0)>0){f=c[o+1652>>2]|0;e=0;h=0;do{h=(c[f+(e<<2)>>2]|0)+h|0;e=e+1|0;c[g+(e<<2)>>2]=h}while((e|0)<(c[m>>2]|0))}e=c[F>>2]|0;if((e|0)>0){h=c[n>>2]|0;f=0;g=0;do{f=(g>>>0>(c[i+(f<<2)>>2]|0)>>>0&1)+f|0;c[h+(g<<2)>>2]=f;g=g+1|0;e=c[F>>2]|0}while((g|0)<(e|0))}B=R(c[G+13132>>2]|0,e)|0;A=o+1668|0;c[A>>2]=of(B,4)|0;e=o+1672|0;c[e>>2]=of(B,4)|0;f=o+1676|0;c[f>>2]=of(B,4)|0;D=G+13164|0;g=(c[D>>2]|0)+2|0;g=of(R(g,g)|0,4)|0;c[o+1688>>2]=g;if(!(c[A>>2]|0)){d=-12;break}if(!(c[e>>2]|0)){d=-12;break}if((c[f>>2]|0)==0|(g|0)==0){d=-12;break}if((B|0)>0){y=c[H>>2]|0;n=y+44|0;o=y+1656|0;p=y+48|0;q=y+1660|0;r=y+1652|0;s=c[q>>2]|0;t=c[y+1648>>2]|0;u=c[o>>2]|0;v=c[y+1668>>2]|0;w=c[y+1672>>2]|0;x=y+1652|0;y=y+1648|0;m=0;do{k=c[F>>2]|0;z=(m|0)%(k|0)|0;A=(m|0)/(k|0)|0;f=c[n>>2]|0;e=0;while(1){if((e|0)>=(f|0)){j=0;break}g=e+1|0;if(z>>>0<(c[(c[o>>2]|0)+(g<<2)>>2]|0)>>>0){j=e;break}else e=g}f=c[p>>2]|0;e=0;while(1){if((e|0)>=(f|0)){i=0;break}g=e+1|0;if(A>>>0<(c[(c[q>>2]|0)+(g<<2)>>2]|0)>>>0){i=e;break}else e=g}if((j|0)>0){g=c[(c[x>>2]|0)+(i<<2)>>2]|0;h=c[y>>2]|0;e=0;f=0;do{e=(R(c[h+(f<<2)>>2]|0,g)|0)+e|0;f=f+1|0}while((f|0)!=(j|0))}else e=0;if((i|0)>0){g=c[r>>2]|0;f=0;do{e=(R(c[g+(f<<2)>>2]|0,k)|0)+e|0;f=f+1|0}while((f|0)!=(i|0))}A=R(c[t+(j<<2)>>2]|0,A-(c[s+(i<<2)>>2]|0)|0)|0;A=e+z+A-(c[u+(j<<2)>>2]|0)|0;c[v+(m<<2)>>2]=A;c[w+(A<<2)>>2]=m;m=m+1|0}while((m|0)!=(B|0))}f=c[H>>2]|0;u=f+48|0;g=c[u>>2]|0;if((g|0)>0){v=f+44|0;w=f+1660|0;t=f+1656|0;x=f+1676|0;s=f+1668|0;e=0;h=0;f=c[v>>2]|0;do if((f|0)>0){p=c[w>>2]|0;r=h+1|0;q=p+(r<<2)|0;p=p+(h<<2)|0;o=0;g=c[q>>2]|0;do{i=c[p>>2]|0;h=o;o=o+1|0;if(i>>>0>>0){m=c[t>>2]|0;n=m+(o<<2)|0;m=m+(h<<2)|0;f=c[n>>2]|0;do{h=c[m>>2]|0;if(h>>>0>>0){j=c[x>>2]|0;k=c[s>>2]|0;g=h;do{c[j+(c[k+((R(c[F>>2]|0,i)|0)+g<<2)>>2]<<2)>>2]=e;g=g+1|0;f=c[n>>2]|0}while(g>>>0>>0);g=c[q>>2]|0}i=i+1|0}while(i>>>0>>0);f=c[v>>2]|0}e=e+1|0}while((o|0)<(f|0));h=r;g=c[u>>2]|0}else h=h+1|0;while((h|0)<(g|0));f=c[H>>2]|0}else e=0;m=of(e,4)|0;c[f+1680>>2]=m;if(!m){d=-12;break}n=f+48|0;e=c[n>>2]|0;if((e|0)>0){k=f+44|0;o=f+1660|0;p=f+1656|0;j=0;g=c[k>>2]|0;do{if((g|0)>0){h=(c[o>>2]|0)+(j<<2)|0;i=c[p>>2]|0;e=0;do{B=R(c[F>>2]|0,c[h>>2]|0)|0;c[m+((R(g,j)|0)+e<<2)>>2]=(c[i+(e<<2)>>2]|0)+B;e=e+1|0;g=c[k>>2]|0}while((e|0)<(g|0));e=c[n>>2]|0}j=j+1|0}while((j|0)<(e|0))}r=(c[E>>2]|0)-(c[G+13072>>2]|0)|0;g=c[f+1688>>2]|0;e=c[D>>2]|0;c[f+1684>>2]=g+(e+3<<2);do if((e|0)>-2){f=0;e=e+2|0;do{c[g+((R(e,f)|0)<<2)>>2]=-1;c[g+(f<<2)>>2]=-1;f=f+1|0;h=c[D>>2]|0;e=h+2|0}while((f|0)<(e|0));if((h|0)<0)break;q=c[H>>2]|0;n=q+1668|0;o=r<<1;p=(r|0)>0;q=q+1684|0;m=0;e=h;while(1){if((e|0)>=0){i=m>>r;j=c[n>>2]|0;k=c[q>>2]|0;h=0;while(1){f=c[j+((R(c[F>>2]|0,i)|0)+(h>>r)<<2)>>2]<>2]=f;e=c[D>>2]|0;if((h|0)<(e|0))h=h+1|0;else break}}if((m|0)<(e|0))m=m+1|0;else break}}while(0);if((ke(K)|0)<0)break;d=b+400+(J<<2)|0;wf(d);c[d>>2]=I;d=0;break a}else d=-12}else d=-1094995529}else d=-1094995529}else d=-1094995529;while(0);wf(L)}while(0);l=M;return d|0}function ne(a,b){a=a|0;b=b|0;var d=0;a=l;l=l+16|0;d=a;c[d>>2]=b;hf(b+1648|0);hf(b+1652|0);hf(b+1656|0);hf(b+1660|0);hf(b+1664|0);hf(b+1668|0);hf(b+1672|0);hf(b+1680|0);hf(b+1676|0);hf(b+1688|0);hf(d);l=a;return}function oe(a){a=a|0;return $e(a)|0}function pe(b){b=b|0;var c=0,d=0,e=0;c=0;do{d=b+(c<<6)|0;e=d+16|0;do{a[d>>0]=16;d=d+1|0}while((d|0)<(e|0));a[b+1536+c>>0]=16;a[b+1542+c>>0]=16;c=c+1|0}while((c|0)!=6);d=b+384|0;c=1936;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+448|0;c=1936;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+512|0;c=1936;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+576|0;c=2e3;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+640|0;c=2e3;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+704|0;c=2e3;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+768|0;c=1936;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+832|0;c=1936;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+896|0;c=1936;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+960|0;c=2e3;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1024|0;c=2e3;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1088|0;c=2e3;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1152|0;c=1936;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1216|0;c=1936;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1280|0;c=1936;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1344|0;c=2e3;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1408|0;c=2e3;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));d=b+1472|0;c=2e3;e=d+64|0;do{a[d>>0]=a[c>>0]|0;d=d+1|0;c=c+1|0}while((d|0)<(e|0));return}function qe(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;o=(c[b+136>>2]|0)+204|0;l=0;a:while(1){p=(l|0)>0?64:16;q=(l|0)>1;r=l+-2|0;m=(l|0)==3?3:1;j=1<<(l<<1)+4;j=(j|0)<64?j:64;n=(l|0)==0;k=0;do{if(!(((We(o)|0)&255)<<24>>24)){b=Ye(o)|0;if(b|0){if(k>>>0>>0){b=-1094995529;break a}b=k-b|0;fh(e+(l*384|0)+(k<<6)|0,e+(l*384|0)+(b<<6)|0,p|0)|0;if(q)a[e+1536+(r*6|0)+k>>0]=a[e+1536+(r*6|0)+b>>0]|0}}else{if(q){g=(oe(o)|0)+8|0;a[e+1536+(r*6|0)+k>>0]=g;b=0}else{b=0;g=8}do{if(n){h=(d[430+b>>0]|0)<<2;i=414+b|0}else{h=(d[510+b>>0]|0)<<3;i=446+b|0}i=(d[i>>0]|0)+h|0;g=(g+256+(oe(o)|0)|0)%256|0;a[e+(l*384|0)+(k<<6)+i>>0]=g;b=b+1|0}while((b|0)<(j|0))}k=k+m|0}while((k|0)<6);l=l+1|0;if((l|0)>=4){s=16;break}}if((s|0)==16)if((c[f+4>>2]|0)==3){b=0;do{a[e+1216+b>>0]=a[e+832+b>>0]|0;a[e+1280+b>>0]=a[e+896+b>>0]|0;a[e+1408+b>>0]=a[e+1024+b>>0]|0;a[e+1472+b>>0]=a[e+1088+b>>0]|0;b=b+1|0}while((b|0)!=64);a[e+1543>>0]=a[e+1537>>0]|0;a[e+1544>>0]=a[e+1538>>0]|0;a[e+1546>>0]=a[e+1540>>0]|0;a[e+1547>>0]=a[e+1541>>0]|0;b=0}else b=0;return b|0}function re(b,e){b=b|0;e=e|0;var f=0,g=0,h=0;g=(c[b+136>>2]|0)+204|0;if(a[e+21>>0]|0)a[e+1629>>0]=(Ye(g)|0)+2;a[e+1630>>0]=We(g)|0;f=(We(g)|0)&255;a[e+1631>>0]=f;if(f<<24>>24){a[e+1632>>0]=Ye(g)|0;b=Ye(g)|0;f=e+1633|0;a[f>>0]=b;if((b&255)>>>0<5){b=0;while(1){a[e+1634+b>>0]=$e(g)|0;a[e+1639+b>>0]=$e(g)|0;if((b|0)<(d[f>>0]|0))b=b+1|0;else{h=6;break}}}}else h=6;if((h|0)==6){a[e+1644>>0]=Ye(g)|0;a[e+1645>>0]=Ye(g)|0}return}function se(a){a=a|0;var b=0;b=a+136|0;do te(a);while((ue((c[b>>2]|0)+204|0)|0)!=0);return 1}function te(a){a=a|0;var d=0,e=0,f=0,g=0;f=(c[a+136>>2]|0)+204|0;e=0;do{d=Te(f,8)|0;e=d+e|0}while((d|0)==255);d=0;do{g=Te(f,8)|0;d=g+d|0}while((g|0)==255);a:do if((c[a+3500>>2]|0)!=39)if((e|0)==132){xe(a);break}else{Ve(f,d<<3);break}else switch(e|0){case 256:{xe(a);break a}case 257:{b[a+7776>>1]=Te(f,16)|0;break a}default:{Ve(f,d<<3);break a}}while(0);return}function ue(a){a=a|0;if((ve(a)|0)>0)a=(Ue(a,8)|0)!=128;else a=0;return a&1|0}function ve(a){a=a|0;var b=0;b=c[a+12>>2]|0;return b-(we(a)|0)|0}function we(a){a=a|0;return c[a+8>>2]|0}function xe(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;f=(c[b+136>>2]|0)+204|0;h=(Te(f,8)|0)&255;g=b+7720|0;e=0;do{switch(h<<24>>24){case 0:{a[g>>0]=1;d=0;do{a[b+7672+(e<<4)+d>>0]=Te(f,8)|0;d=d+1|0}while((d|0)!=16);break}case 1:{Ve(f,16);break}case 2:{Ve(f,32);break}default:{}}e=e+1|0}while((e|0)!=3);return}function ye(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;d=c[b+52>>2]|0;f=a+60|0;if((d|0)>0)if((c[f>>2]|0)==0?(d=lf(d)|0,c[f>>2]=d,(d|0)==0):0)d=-12;else e=5;else{c[f>>2]=0;e=5}if((e|0)==5){e=a+12|0;c[e>>2]=b;c[a+424>>2]=0;c[a+800>>2]=1;d=a+912|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[d+12>>2]=0;d=a+936|0;c[d>>2]=0;c[d+4>>2]=-2147483648;d=a+928|0;c[d>>2]=0;c[d+4>>2]=-2147483648;d=Ca[c[b+76>>2]&7](a)|0;if((d|0)<0){hf(f);c[e>>2]=0}else d=0}return d|0}function ze(a){a=a|0;var b=0,d=0,e=0;if(a|0){b=a+12|0;d=c[b>>2]|0;if(d|0?(e=c[d+92>>2]|0,e|0):0)Ca[e&7](a)|0;c[a+796>>2]=0;hf(a+60|0);c[b>>2]=0;c[a+808>>2]=0}return 0}function Ae(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;if((f|0)>0){j=(e|0)==0;h=0;do{i=d+(R(h,g)|0)|0;i=Ha[b&1](a,i)|0;if(!j)c[e+(h<<2)>>2]=i;h=h+1|0}while((h|0)!=(f|0))}return 0}function Be(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((f|0)>0){h=(e|0)==0;g=0;do{i=Fa[b&1](a,d,g,0)|0;if(!h)c[e+(g<<2)>>2]=i;g=g+1|0}while((g|0)!=(f|0))}return 0}function Ce(b,f,g){b=b|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=Sf(c[f+76>>2]|0)|0;m=l+4|0;a:do if(!(a[m>>0]|0))b=0;else{n=f+64|0;i=l+5|0;j=f+68|0;k=l+6|0;h=0;while(1){b=(R((((e[l+8+(h<<1)>>1]|0)>>>11&15)+8&65535)>>>3,c[n>>2]|0)|0)+31&-32;if((h+-1|0)>>>0<2){b=0-(0-b>>d[i>>0])|0;c[f+32+(h<<2)>>2]=b;g=0-(0-((c[j>>2]|0)+31&-32)>>d[k>>0])|0}else{c[f+32+(h<<2)>>2]=b;g=(c[j>>2]|0)+31&-32}b=sf((R(b,g)|0)+32|0)|0;c[f+304+(h<<2)>>2]=b;if(!b){b=-1;break a}c[f+(h<<2)>>2]=c[b+4>>2];h=h+1|0;if((h|0)>=(d[m>>0]|0)){b=0;break}}}while(0);return b|0}function De(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;ah(a|0,0,976)|0;e=(b|0)!=0;if(e){d=c[b+8>>2]|0;c[a+48>>2]=c[b+12>>2]}else d=-1;c[a+8>>2]=d;c[a+100>>2]=0;c[a+104>>2]=1;c[a+888>>2]=0;c[a+892>>2]=1;c[a+896>>2]=0;c[a+900>>2]=1;c[a+476>>2]=1;c[a+816>>2]=1;c[a+820>>2]=1;c[a+220>>2]=0;c[a+224>>2]=1;c[a+136>>2]=-1;c[a+416>>2]=-1;d=a+696|0;c[d>>2]=0;c[d+4>>2]=-2147483648;if((e?(f=c[b+52>>2]|0,(f|0)!=0):0)?(f=lf(f)|0,c[a+60>>2]=f,(f|0)==0):0)d=-12;else d=0;return d|0}function Ee(a){a=a|0;var b=0;b=cf(976)|0;if(b){if((De(b,a)|0)<0){gf(b);b=0}}else b=0;return b|0}function Fe(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+80|0;i=j;f=i;g=e;h=f+80|0;do{c[f>>2]=c[g>>2];f=f+4|0;g=g+4|0}while((f|0)<(h|0));h=a+12|0;g=c[h>>2]|0;do if((g|0)!=0?(c[g+8>>2]|0)==0:0){c[d>>2]=0;f=c[a+124>>2]|0;g=c[a+128>>2]|0;if(g|f|0?Ge(f,g,0,0)|0:0){f=-22;break}Pf(b);f=c[h>>2]|0;if(((c[f+16>>2]&32|0)==0?(c[e+28>>2]|0)==0:0)?(c[a+808>>2]&1|0)==0:0){f=0;break}f=Fa[c[f+88>>2]&1](a,b,d,i)|0;if(!(c[d>>2]|0)){Pf(b);break}else{d=a+424|0;c[d>>2]=(c[d>>2]|0)+1;break}}else f=-22;while(0);l=j;return f|0}function Ge(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((a|0)>0&(b|0)>0?(a+128|0)>>>0<(268435455/((b+128|0)>>>0)|0)>>>0:0)a=0;else a=-22;return a|0}function He(a,b){a=a|0;b=b|0;return 0}function Ie(a,b,c){a=a|0;b=b|0;c=c|0;return Je(a,b,c)|0}function Je(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;k=a+8|0;if(!(c[k>>2]|0)){g=c[a+116>>2]|0;h=c[a+120>>2]|0;if((Ge(g,h,0,0)|0)>=0?(j=c[a+136>>2]|0,(j|0)>=0):0){f=b+64|0;e=b+68|0;if((c[f>>2]|0)>=1?(c[e>>2]|0)>=1:0)e=1;else{i=c[a+792>>2]|0;l=0-(0-(c[a+124>>2]|0)>>i)|0;c[f>>2]=(g|0)>(l|0)?g:l;i=0-(0-(c[a+128>>2]|0)>>i)|0;c[e>>2]=(h|0)>(i|0)?h:i;e=0}c[b+76>>2]=j;f=e;i=8}else e=-22}else{f=1;i=8}if((i|0)==8){e=ta[c[a+476>>2]&1](a,b,d)|0;if(!(c[k>>2]|f)){c[b+64>>2]=c[a+116>>2];c[b+68>>2]=c[a+120>>2]}}return e|0}function Ke(a,b,d){a=a|0;b=b|0;d=d|0;c[b+4>>2]=a;return Ie(a,c[b>>2]|0,d)|0}function Le(a,b){a=a|0;b=b|0;a=c[b>>2]|0;if(a|0)Pf(a);return}function Me(a){a=a|0;return}function Ne(a,b,c){a=a|0;b=b|0;c=c|0;return}function Oe(a,b,c){a=a|0;b=b|0;c=c|0;return}function Pe(a){a=a|0;var b=0;b=a+8|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+16|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+64|0;c[b>>2]=-1;c[b+4>>2]=-1;b=a+72|0;c[b>>2]=0;c[b+4>>2]=0;b=a+32|0;c[a>>2]=0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;return}function Qe(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0;g=a+16|0;c[a+12>>2]=b;c[a+20>>2]=b+e;h=b+1|0;c[g>>2]=h;e=(d[b>>0]|0)<<18;c[a>>2]=e;f=b+2|0;c[g>>2]=f;e=(d[h>>0]|0)<<10|e;c[a>>2]=e;c[g>>2]=b+3;c[a>>2]=(d[f>>0]|0)<<2|e|2;c[a+4>>2]=510;return}function Re(){if(!(c[694]|0)){Se();c[694]=1}return}function Se(){var b=0,c=0,e=0,f=0,g=0;b=0;while(1)if(b){f=(b&65280|0)==0;a[4917+b>>0]=(f?8:0)-(d[2511+(f?b:b>>>8)>>0]|0);b=b+1|0;if((b|0)==512){f=0;break}else continue}else{a[4917+b>>0]=9;b=1;continue}do{c=f<<1;b=0;do{g=a[2064+(f<<2)+b>>0]|0;e=(b<<7)+c|0;a[5429+(e|1)>>0]=g;a[5429+e>>0]=g;b=b+1|0}while((b|0)!=4);e=(d[2320+f>>0]|0)<<1;a[5941+(c+128)>>0]=e;a[5941+(c+129)>>0]=e|1;e=128-c|0;if(!f){b=0;c=1}else{c=(d[2384+f>>0]|0)<<1;b=(c|1)&255;c=c&255}a[5941+(e+-1)>>0]=c;a[5941+(e+-2)>>0]=b;f=f+1|0}while((f|0)!=64);b=6197;c=2448;e=b+63|0;do{a[b>>0]=a[c>>0]|0;b=b+1|0;c=c+1|0}while((b|0)<(e|0));return}function Te(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;e=a+8|0;g=c[e>>2]|0;f=c[a+16>>2]|0;a=(c[a>>2]|0)+(g>>>3)|0;a=(ch(d[a>>0]|d[a+1>>0]<<8|d[a+2>>0]<<16|d[a+3>>0]<<24|0)|0)<<(g&7)>>>(32-b|0);b=g+b|0;c[e>>2]=f>>>0>b>>>0?b:f;return a|0}function Ue(a,b){a=a|0;b=b|0;var e=0;e=c[a+8>>2]|0;a=(c[a>>2]|0)+(e>>>3)|0;return (ch(d[a>>0]|d[a+1>>0]<<8|d[a+2>>0]<<16|d[a+3>>0]<<24|0)|0)<<(e&7)>>>(32-b|0)|0}function Ve(a,b){a=a|0;b=b|0;var d=0;d=a+8|0;a=c[a+16>>2]|0;b=(c[d>>2]|0)+b|0;c[d>>2]=a>>>0>b>>>0?b:a;return}function We(a){a=a|0;var b=0,e=0,f=0;e=a+8|0;f=c[e>>2]|0;b=(d[(c[a>>2]|0)+(f>>>3)>>0]|0)<<(f&7)>>>7&1;c[e>>2]=((f|0)<(c[a+16>>2]|0)&1)+f;return b|0}function Xe(a,b){a=a|0;b=b|0;var c=0;do if(b)if((b|0)<26){a=Te(a,b)|0;break}else{b=b+-16|0;c=(Te(a,16)|0)<>>0>65535;e=b?e>>>16:e;b=b?16:0;c=(e&65280|0)==0;b=31-(d[2511+(c?e:e>>>8)>>0]|0)-(c?b:b|8)|0;_e(a,b);return (Xe(a,b+1|0)|0)+-1|0}function Ze(a){a=a|0;var b=0,d=0;b=l;l=l+32|0;d=b;c[d>>2]=c[a>>2];c[d+4>>2]=c[a+4>>2];c[d+8>>2]=c[a+8>>2];c[d+12>>2]=c[a+12>>2];c[d+16>>2]=c[a+16>>2];a=Xe(d,32)|0;l=b;return a|0}function _e(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=a+8|0;e=c[d>>2]|0;f=0-e|0;a=(c[a+16>>2]|0)-e|0;c[d>>2]=((b|0)<(f|0)?f:(a|0)<(b|0)?a:b)+e;return}function $e(a){a=a|0;a=Ye(a)|0;return ((a&1|0)==0?0-(a>>>1)|0:(a+1|0)>>>1)|0}function af(b,c,d,e,f,g,h,i,j,k){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;if((j|0)!=0&(k|0)!=0){if((i|0)<(k|0)){s=(i|0)>(0-g|0);m=1-g|0;r=c+(R(0-e|0,i)|0)+(R(m,e)|0)|0;c=s?c:r;m=s?i:m}else{m=k+-1|0;c=c+(R(0-e|0,i)|0)+(R(m,e)|0)|0}if((h|0)<(j|0)){r=(h|0)>(0-f|0);s=1-f|0;i=r?h:s;c=r?c:c+(s-h)|0}else{s=j+-1|0;i=s;c=c+(s-h)|0}t=(m|0)<0;l=t?0-m|0:0;r=(i|0)<0;s=r?0-i|0:0;h=k-m|0;h=(h|0)<(g|0)?h:g;p=j-i|0;q=(p|0)<(f|0);o=q?p:f;n=o-s|0;i=c+(s+(R(l,e)|0))|0;c=b+s|0;if(t){j=0;do{fh(c|0,i|0,n|0)|0;c=c+d|0;j=j+1|0}while((j|0)<(l|0))}else j=0;if((j|0)<(h|0)){b=m+-1-k|0;l=~g;l=R(~j-((b|0)>(l|0)?b:l)|0,d)|0;b=c;while(1){fh(b|0,i|0,n|0)|0;i=i+e|0;j=j+1|0;if((j|0)>=(h|0))break;else b=b+d|0}c=c+l|0}else h=j;j=i+(0-e)|0;if((h|0)<(g|0)){b=R(g-h|0,d)|0;i=h;h=c;while(1){fh(h|0,j|0,n|0)|0;i=i+1|0;if((i|0)==(g|0))break;else h=h+d|0}c=c+b|0}if(g|0){j=o+-1|0;h=c+(0-((R(g,d)|0)+s))|0;while(1){g=g+-1|0;if(r){i=h+s|0;c=0;do{a[h+c>>0]=a[i>>0]|0;c=c+1|0}while((c|0)<(s|0))}if(q){i=h+j|0;c=p;do{a[h+c>>0]=a[i>>0]|0;c=c+1|0}while((c|0)<(f|0))}if(!g)break;else h=h+d|0}}}return}function bf(a,b){a=a|0;b=b|0;c[a>>2]=1;return}function cf(a){a=a|0;var b=0,d=0;d=(c[66]|0)+-32|0;b=a;while(1){if(d>>>0>>0){a=0;break}a=Ig(b)|0;if((b|0)!=0|(a|0)!=0)break;else b=1}return a|0}function df(a,b){a=a|0;b=b|0;if(((c[66]|0)+-32|0)>>>0>>0)a=0;else a=Qg(a,((b|0)==0&1)+b|0)|0;return a|0}function ef(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;f=g;if(!((ff(d,b,f)|0)==0?(f=c[f>>2]|0,e=df(a,f)|0,!((f|0)!=0&(e|0)==0)):0)){gf(a);e=0}l=g;return e|0}function ff(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=R(b,a)|0;if((a|0)!=0&(b|a)>>>0>65535?((e>>>0)/(a>>>0)|0|0)!=(b|0):0)a=-22;else{c[d>>2]=e;a=0}return a|0}function gf(a){a=a|0;Og(a);return}function hf(a){a=a|0;gf(c[a>>2]|0);c[a>>2]=0;return}function jf(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)!=0?(2147483647/(c>>>0)|0)>>>0>b>>>0:0)a=df(a,R(c,b)|0)|0;else a=0;return a|0}function kf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=ef(c[a>>2]|0,b,d)|0;c[a>>2]=e;return ((d|0)!=0&((b|0)!=0&(e|0)==0)?-12:0)|0}function lf(a){a=a|0;var b=0;b=cf(a)|0;if(b|0)ah(b|0,0,a|0)|0;return b|0}function mf(a,b,c){a=a|0;b=b|0;c=c|0;nf(a,b,c);return}function nf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;if((c[b>>2]|0)>>>0<=d>>>0){e=((d*17|0)>>>4)+32|0;d=e>>>0>d>>>0?e:d;gf(c[a>>2]|0);e=cf(d)|0;c[a>>2]=e;c[b>>2]=(e|0)==0?0:d}return}function of(a,b){a=a|0;b=b|0;if((b|0)!=0?(2147483647/(b>>>0)|0)>>>0>a>>>0:0)a=cf(R(b,a)|0)|0;else a=0;return a|0}function pf(a,b){a=a|0;b=b|0;if((b|0)!=0?(2147483647/(b>>>0)|0)>>>0>a>>>0:0)a=lf(R(b,a)|0)|0;else a=0;return a|0}function qf(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;j=l;l=l+16|0;h=j;g=lf(24)|0;c[h>>2]=g;i=g;do if(g){c[g>>2]=a;c[g+4>>2]=b;c[g+12>>2]=d|0?d:7;c[g+16>>2]=e;c[g+8>>2]=1;if(f&1|0){g=g+20|0;c[g>>2]=c[g>>2]|1}d=lf(12)|0;if(!d){hf(h);d=0;break}else{c[d>>2]=i;c[d+4>>2]=a;c[d+8>>2]=b;break}}else d=0;while(0);l=j;return d|0}function rf(a,b){a=a|0;b=b|0;gf(b);return}function sf(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;d=e;b=cf(a)|0;c[d>>2]=b;if(b){a=qf(b,a,7,0,0)|0;if(!a){hf(d);a=0}}else a=0;l=e;return a|0}function tf(a){a=a|0;var b=0;b=sf(a)|0;if(!b)b=0;else ah(c[b+4>>2]|0,0,a|0)|0;return b|0}function uf(a){a=a|0;var b=0;b=lf(12)|0;if(!b)b=0;else{c[b>>2]=c[a>>2];c[b+4>>2]=c[a+4>>2];c[b+8>>2]=c[a+8>>2];vf((c[a>>2]|0)+8|0,1)|0}return b|0}function vf(a,b){a=a|0;b=b|0;var d=0;d=c[a>>2]|0;c[a>>2]=d+b;return d+b|0}function wf(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;d=f;if((a|0?(e=c[a>>2]|0,e|0):0)?(b=c[e>>2]|0,c[d>>2]=b,hf(a),b,(vf(b+8|0,-1)|0)==0):0){ya[c[b+12>>2]&15](c[b+16>>2]|0,c[b>>2]|0);hf(d)}l=f;return}function xf(a){a=a|0;return c[a>>2]|0}function yf(a,b){a=a|0;b=b|0;var d=0;d=lf(20)|0;if(!d)d=0;else{c[d+12>>2]=a;c[d+16>>2]=b|0?b:4;zf(d+4|0)}return d|0}function zf(a){a=a|0;c[a>>2]=1;return}function Af(a){a=a|0;var b=0;if((a|0?(b=c[a>>2]|0,b|0):0)?(c[a>>2]=0,(vf(b+4|0,-1)|0)==0):0)Bf(b);return}function Bf(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;b=e;d=e+4|0;c[b>>2]=a;if(c[a>>2]|0)do{f=c[a>>2]|0;c[d>>2]=f;c[a>>2]=c[f+16>>2];f=c[d>>2]|0;ya[c[f+8>>2]&15](c[f+4>>2]|0,c[f>>2]|0);hf(d);a=c[b>>2]|0}while((c[a>>2]|0)!=0);hf(b);l=e;return}function Cf(a){a=a|0;var b=0,d=0,e=0,f=0;b=Df(a)|0;a:do if(!b){b=a+4|0;e=a+8|0;b:do if((c[b>>2]|0)<=(c[e>>2]|0))while(1){d=xf(b)|0;if((d|0)>(xf(e)|0))break b;d=Df(a)|0;if(d|0){f=6;break a}}while(0);b=Ef(a)|0}else{d=b;f=6}while(0);do if((f|0)==6){b=d+16|0;Ff(c[b>>2]|0);c[b>>2]=0;b=qf(c[d>>2]|0,c[a+12>>2]|0,8,d,0)|0;if(!b){Ff(d);b=0;break}else{vf(a+4|0,1)|0;break}}while(0);return b|0}function Df(a){a=a|0;var b=0,d=0,e=0;b=0;d=c[a>>2]|0;while(1){if((d|0)==(b|0))break;b=Hf(a,d,0)|0;if(!b){b=0;break}else{e=d;d=b;b=e}}return b|0}function Ef(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f;b=Ca[c[a+16>>2]&7](c[a+12>>2]|0)|0;c[d>>2]=b;do if(b){e=lf(20)|0;if(!e){wf(d);b=0;break}else{d=c[b>>2]|0;c[e>>2]=c[d>>2];g=d+16|0;c[e+4>>2]=c[g>>2];d=d+12|0;c[e+8>>2]=c[d>>2];c[e+12>>2]=a;c[g>>2]=e;c[d>>2]=8;vf(a+4|0,1)|0;vf(a+8|0,1)|0;break}}else b=0;while(0);l=f;return b|0}function Ff(a){a=a|0;var b=0,d=0,e=0;if(a|0){e=c[a+12>>2]|0;b=a+16|0;if(!(c[b>>2]|0))b=a;else{d=b;do{b=c[d>>2]|0;d=b+16|0}while((c[d>>2]|0)!=0)}if(Hf(e,0,a)|0)do{d=b+16|0;c[d>>2]=Df(e)|0;if(c[d>>2]|0)do{b=c[d>>2]|0;d=b+16|0}while((c[d>>2]|0)!=0)}while((Hf(e,0,a)|0)!=0)}return}function Gf(a,b){a=a|0;b=b|0;b=c[a+12>>2]|0;Ff(a);if(!(vf(b+4|0,-1)|0))Bf(b);return}function Hf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=c[a>>2]|0;if((e|0)==(b|0))c[a>>2]=d;return e|0}function If(a,b,d){a=a|0;b=b|0;d=d|0;a=a+360|0;c[a>>2]=b;c[a+4>>2]=d;return}function Jf(a,b,d){a=a|0;b=b|0;d=d|0;a=a+376|0;c[a>>2]=b;c[a+4>>2]=d;return}function Kf(a,b,d){a=a|0;b=b|0;d=d|0;a=a+368|0;c[a>>2]=b;c[a+4>>2]=d;return}function Lf(a,b){a=a|0;b=b|0;c[a+392>>2]=b;return}function Mf(){var a=0;a=lf(400)|0;if(!a)a=0;else Nf(a);return a|0}function Nf(a){a=a|0;var b=0;ah(a|0,0,400)|0;b=a+136|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+144|0;c[b>>2]=0;c[b+4>>2]=-2147483648;b=a+128|0;c[b>>2]=0;c[b+4>>2]=-2147483648;If(a,0,-2147483648);Jf(a,0,0);Kf(a,-1,-1);Lf(a,-1);c[a+80>>2]=1;c[a+120>>2]=0;c[a+124>>2]=1;c[a+76>>2]=-1;c[a+344>>2]=2;c[a+348>>2]=2;c[a+352>>2]=2;c[a+340>>2]=0;c[a+356>>2]=0;return}function Of(a){a=a|0;var b=0;if(a|0?(b=c[a>>2]|0,b|0):0){Pf(b);hf(a)}return}function Pf(a){a=a|0;var b=0;b=0;do{wf(a+304+(b<<2)|0);b=b+1|0}while((b|0)!=8);Nf(a);return}function Qf(a,b){a=a|0;b=b|0;fh(a|0,b|0,400)|0;ah(b|0,0,400)|0;Nf(b);return}function Rf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;c[a+76>>2]=c[b+76>>2];c[a+64>>2]=c[b+64>>2];c[a+68>>2]=c[b+68>>2];c[a+388>>2]=c[b+388>>2];h=b+296|0;g=c[h+4>>2]|0;d=a+296|0;c[d>>2]=c[h>>2];c[d+4>>2]=g;c[a+72>>2]=c[b+72>>2];d=c[b+304>>2]|0;if(!d)ra();else{f=0;e=d}while(1){if(e|0?(h=uf(e)|0,c[a+304+(f<<2)>>2]=h,(h|0)==0):0){e=5;break}d=f+1|0;if(d>>>0>=8){e=8;break}f=d;e=c[b+304+(d<<2)>>2]|0}if((e|0)==5){Pf(a);d=-12}else if((e|0)==8){c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];c[a+16>>2]=c[b+16>>2];c[a+20>>2]=c[b+20>>2];c[a+24>>2]=c[b+24>>2];c[a+28>>2]=c[b+28>>2];d=a+32|0;h=b+32|0;c[d>>2]=c[h>>2];c[d+4>>2]=c[h+4>>2];c[d+8>>2]=c[h+8>>2];c[d+12>>2]=c[h+12>>2];c[d+16>>2]=c[h+16>>2];c[d+20>>2]=c[h+20>>2];c[d+24>>2]=c[h+24>>2];c[d+28>>2]=c[h+28>>2];d=0}return d|0}function Sf(a){a=a|0;var b=0,d=0;b=0;while(1){if((c[268+(b*24|0)>>2]|0)==(a|0)){d=3;break}b=b+1|0;if(b>>>0>=4){b=0;break}}if((d|0)==3)b=268+(b*24|0)+4|0;return b|0}function Tf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=(c[b+24>>2]|0)==0?1:3;do if((f|0)<=(e|0))if((f|0)==(e|0)&(a[b+29>>0]|0)!=0){f=c[b+12>>2]|0;c[d>>2]=c[f+32>>2];f=c[f>>2]|0;break}else{c[d>>2]=0;f=0;break}else{f=c[b+8>>2]|0;c[d>>2]=c[f+32+(e<<2)>>2];f=c[f+(e<<2)>>2]|0}while(0);return f|0}function Uf(d,e){d=d|0;e=e|0;var f=0;if(!(c[d+8>>2]|0))d=-1;else{c[e>>2]=c[d+16>>2];c[e+4>>2]=c[d+20>>2];a[e+8>>0]=c[d+24>>2];f=a[d+31>>0]|0;a[e+9>>0]=(a[d+29>>0]|0)!=0&f<<24>>24==0&1;a[e+12>>0]=a[d+33>>0]|0;a[e+13>>0]=f;a[e+14>>0]=a[d+32>>0]|0;a[e+10>>0]=c[d+36>>2];a[e+11>>0]=a[d+30>>0]|0;a[e+15>>0]=a[d+34>>0]|0;b[e+16>>1]=b[d+48>>1]|0;d=0}return d|0}function Vf(b,d){b=b|0;d=d|0;var e=0,f=0;do if(!(c[b+8>>2]|0))e=-1;else{f=b+68|0;if(!(a[f>>0]|0)){e=Wf(b,d)|0;if(e|0)break;a[f>>0]=1;c[b+72>>2]=d}else{if(!(a[b+34>>0]|0)){e=-1;break}if(!(a[b+41>>0]|0)){e=-1;break}if((c[b+72>>2]|0)!=(d|0)){e=-1;break}f=b+60|0;e=c[f>>2]|0;d=c[b+64>>2]|0;if((d|0)<=(e|0)){e=-1;break}e=Xf(b,(c[b+56>>2]|0)+e|0,d-e|0)|0;if((e|0)<0){e=-1;break}c[f>>2]=(c[f>>2]|0)+e}c[b+92>>2]=Tf(b,b+108|0,0)|0;if(!(c[b+24>>2]|0))e=1;else{c[b+96>>2]=Tf(b,b+112|0,1)|0;c[b+100>>2]=Tf(b,b+116|0,2)|0;e=3}if(!(a[b+29>>0]|0))e=0;else e=Tf(b,b+120|0,e)|0;c[b+104>>2]=e;c[b+80>>2]=0;e=0}while(0);return e|0}function Wf(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;if(e>>>0>1)e=-1;else{a[b+76>>0]=(e|0)==1&1;g=b+77|0;a[g>>0]=0;a[b+78>>0]=0;h=b+24|0;if(((c[h>>2]|0)+-1|0)>>>0<2?(e=b+16|0,i=c[e>>2]|0,f=b+84|0,c[f>>2]=(i+1|0)/2|0,c[b+88>>2]=((c[b+20>>2]|0)+1|0)/2|0,c[b+124>>2]=cf(i)|0,c[b+128>>2]=cf(c[e>>2]|0)|0,c[b+196>>2]=cf((c[f>>2]<<1)+14|0)|0,(c[h>>2]|0)==1):0){e=0;do{c[b+132+(e<<2)>>2]=cf(c[f>>2]|0)|0;c[b+164+(e<<2)>>2]=cf(c[f>>2]|0)|0;e=e+1|0}while((e|0)!=8)}e=b+36|0;bg(b+200|0,d[b+30>>0]|0,a[g>>0]|0?16:8,c[e>>2]|0,d[b+32>>0]|0);if(!(c[h>>2]|0))e=4;else e=c[364+(c[e>>2]<<2)>>2]|0;c[b+248>>2]=e;e=0}return e|0}function Xf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+32|0;g=e+12|0;f=e;Yf(g);Yf(f);d=Zf(a,g,f,b,d,0)|0;gf(c[g>>2]|0);gf(c[f>>2]|0);l=e;return d|0}function Yf(a){a=a|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;return}function Zf(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+16|0;u=y;x=b+4|0;j=c[x>>2]|0;v=(j|0)!=0;c[u>>2]=0;c[u+4>>2]=0;a:do if((h|0)>0){s=u+((v&1)<<2)|0;m=(i|0)!=0;j=h;while(1){if((j|0)<((m?5:2)|0)){j=-1;break a}if(m)k=0;else k=(a[g+2>>0]|0)==0?4:3;if((j|0)<(k+3|0)){j=-1;break a}q=g+k|0;r=d[q>>0]|0;n=r<<5&32|(d[g+(k+1)>>0]|0)>>>3;r=r>>>1;i=r&63;if(i>>>0>40|((r&60|0)==32|(i|0)==39)){if(c[u>>2]|0?c[s>>2]|0:0)break}else if((i>>>0<10|(i+-16|0)>>>0<6?(t=k+2|0,(t|0)<(j|0)):0)?(a[g+t>>0]|0)<0:0){if(c[u>>2]|0?c[s>>2]|0:0)break;c[u+((v&(n|0)==1&1)<<2)>>2]=1}r=_f(g,j,(m^1)&1)|0;if((r|0)<0){j=-1;break a}o=r-k|0;p=o+3|0;m=v&(n|0)==1;i=m?e:f;k=i+8|0;if(($f(i,(c[k>>2]|0)+p|0)|0)<0){j=-1;break a}i=(c[i>>2]|0)+(c[k>>2]|0)|0;a[i>>0]=0;a[i+1>>0]=0;a[i+2>>0]=1;fh(i+3|0,q|0,o|0)|0;if(m){q=i+4|0;a[q>>0]=a[q>>0]&7}c[k>>2]=(c[k>>2]|0)+p;j=j-r|0;if((j|0)>0){m=0;g=g+r|0}else break}i=j;j=c[x>>2]|0;w=22}else{i=h;w=22}while(0);do if((w|0)==22){if(j|0){j=e+8|0;if(($f(e,(c[j>>2]|0)+32|0)|0)<0){j=-1;break}if((ag(c[x>>2]|0,c[b+12>>2]|0,c[e>>2]|0,c[j>>2]|0)|0)<0){j=-1;break}}j=f+8|0;if(($f(f,(c[j>>2]|0)+32|0)|0)<0)j=-1;else{j=(ag(c[b>>2]|0,c[b+8>>2]|0,c[f>>2]|0,c[j>>2]|0)|0)<0;j=j?-1:h-i|0}}while(0);l=y;return j|0}function _f(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;do if(d){if((c|0)>3){if(a[b>>0]|0){d=-1;break}if(((a[b+1>>0]|0)==0?(a[b+2>>0]|0)==0:0)?(a[b+3>>0]|0)==1:0){d=4;e=11;break}}else{if((c|0)!=3){d=-1;break}if(a[b>>0]|0){d=-1;break}}if((a[b+1>>0]|0)==0?(a[b+2>>0]|0)==1:0){d=3;e=11}else d=-1}else{d=0;e=11}while(0);a:do if((e|0)==11){e=d+2|0;if((e|0)<=(c|0))if((e|0)<(c|0)){h=d;while(1){d=h;h=h+1|0;if(!(a[b+d>>0]|0)){f=(a[b+h>>0]|0)==0;if(f?(a[b+e>>0]|0)==1:0)break a;g=d+3|0;if((!((g|0)>=(c|0)|f^1)?(a[b+e>>0]|0)==0:0)?(a[b+g>>0]|0)==1:0)break a;else d=g}else d=d+3|0;if((d|0)>=(c|0)){d=c;break}else e=d}}else d=c;else d=-1}while(0);return d|0}function $f(a,b){a=a|0;b=b|0;var d=0,e=0;e=a+4|0;d=c[e>>2]|0;if((d|0)<(b|0)){d=(d*3|0)/2|0;b=(d|0)<(b|0)?b:d;d=df(c[a>>2]|0,b)|0;if(!d)b=-1;else{c[a>>2]=d;c[e>>2]=b;b=0}}else b=0;return b|0}function ag(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;i=l;l=l+96|0;g=i;h=i+80|0;Pe(g);c[g+24>>2]=e;c[g+28>>2]=f;e=e+f|0;f=e+32|0;do{a[e>>0]=0;e=e+1|0}while((e|0)<(f|0));g=Fe(b,d,h,g)|0;l=i;return ((g|0)<0|(c[h>>2]|0)==0)<<31>>31|0}function bg(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0;n=30-d|0;g=+((1<>2]=Vg(i*(q*2.0))|0;o=1.0-g;p=o-h;c[a+24>>2]=Vg(i*(g*2.0*o/p))|0;c[a+28>>2]=Vg(i*(h*2.0*q/p))|0;c[a+32>>2]=Vg(i*(o*2.0))|0}d=Vg(j)|0;c[a+8>>2]=d;c[a>>2]=n;e=1<>2]=e;c[a+36>>2]=1<>2]=d;c[a+16>>2]=e;c[a+40>>2]=b;c[a+44>>2]=f;return}function cg(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0;if((c[b+40>>2]|0)==8?(c[b+44>>2]|0)==0:0){if((i|0)>0){g=0;h=e;while(1){o=a[f+g>>0]|0;a[h>>0]=o;a[h+1>>0]=o;a[h+2>>0]=o;g=g+1|0;if((g|0)==(i|0))break;else h=h+j|0}}}else k=5;if((k|0)==5?(l=c[b+12>>2]|0,m=c[b+16>>2]|0,n=c[b>>2]|0,(i|0)>0):0){g=0;while(1){o=(dg((R(d[f+g>>0]|0,l)|0)+m>>n)|0)&255;a[e>>0]=o;a[e+1>>0]=o;a[e+2>>0]=o;g=g+1|0;if((g|0)==(i|0))break;else e=e+j|0}}return}function dg(a){a=a|0;return ((a|0)<0?0:(a|0)<255?a:255)|0}function eg(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;s=c[b+20>>2]|0;m=c[b+24>>2]|0;n=c[b+28>>2]|0;o=c[b+32>>2]|0;p=c[b+12>>2]|0;q=c[b+16>>2]|0;r=c[b>>2]|0;l=c[b+36>>2]|0;if((i|0)>0){k=0;b=e;while(1){t=R(d[f+k>>0]|0,p)|0;e=(d[g+k>>0]|0)-l|0;u=(d[h+k>>0]|0)-l|0;t=t+q|0;a[b>>0]=dg(t+(R(u,s)|0)>>r)|0;a[b+1>>0]=dg(t-((R(u,n)|0)+(R(e,m)|0))>>r)|0;a[b+2>>0]=dg(t+(R(e,o)|0)>>r)|0;k=k+1|0;if((k|0)==(i|0))break;else b=b+j|0}}return}function fg(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0;if((c[b+40>>2]|0)==8?(c[b+44>>2]|0)==0:0){if((i|0)>0){k=0;l=e;while(1){a[l>>0]=a[h+k>>0]|0;a[l+1>>0]=a[f+k>>0]|0;a[l+2>>0]=a[g+k>>0]|0;k=k+1|0;if((k|0)==(i|0))break;else l=l+j|0}}}else m=5;if((m|0)==5?(n=c[b+12>>2]|0,o=c[b+16>>2]|0,p=c[b>>2]|0,(i|0)>0):0){k=0;while(1){a[e>>0]=dg((R(d[h+k>>0]|0,n)|0)+o>>p)|0;a[e+1>>0]=dg((R(d[f+k>>0]|0,n)|0)+o>>p)|0;a[e+2>>0]=dg((R(d[g+k>>0]|0,n)|0)+o>>p)|0;k=k+1|0;if((k|0)==(i|0))break;else e=e+j|0}}return}function gg(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;o=c[b+12>>2]|0;m=c[b+16>>2]|0;n=c[b>>2]|0;l=c[b+36>>2]|0;if((i|0)>0){k=0;b=e;while(1){q=d[f+k>>0]|0;r=(d[g+k>>0]|0)-l|0;e=(d[h+k>>0]|0)-l|0;p=q-r|0;a[b>>0]=dg((R(p+e|0,o)|0)+m>>n)|0;a[b+1>>0]=dg((R(r+q|0,o)|0)+m>>n)|0;a[b+2>>0]=dg((R(p-e|0,o)|0)+m>>n)|0;k=k+1|0;if((k|0)==(i|0))break;else b=b+j|0}}return}function hg(b,d,f){b=b|0;d=d|0;f=f|0;var g=0;g=c[b+8>>2]|0;if((g|0)!=0?(a[b+34>>0]|0)!=0:0){g=g+128|0;g=eh(e[b+50>>1]|0,0,c[g>>2]|0,c[g+4>>2]|0)|0;c[d>>2]=g;b=e[b+52>>1]|0}else{c[d>>2]=0;b=1}c[f>>2]=b;return}function ig(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;p=b+80|0;r=c[p>>2]|0;a:do if(r>>>0<(c[b+20>>2]|0)>>>0){s=c[b+16>>2]|0;n=(c[b+92>>2]|0)+(R(c[b+108>>2]|0,r)|0)|0;o=b+76|0;if(!(a[o>>0]|0))q=a[b+78>>0]|0?4:3;else q=4;switch(c[b+24>>2]|0){case 0:{Ja[c[b+248>>2]&7](b+200|0,e,n,0,0,s,q);break}case 1:{if(!r){h=b+96|0;i=b+112|0;j=b+100|0;k=b+116|0;l=b+84|0;m=b+88|0;g=0;do{f=(g|0)>4?g+-8|0:g;if((f|0)<0)f=0;else{t=c[m>>2]|0;f=(f|0)<(t|0)?f:t+-1|0}u=(c[h>>2]|0)+(R(c[i>>2]|0,f)|0)|0;t=(c[j>>2]|0)+(R(c[k>>2]|0,f)|0)|0;fh(c[b+132+(g<<2)>>2]|0,u|0,c[l>>2]|0)|0;fh(c[b+164+(g<<2)>>2]|0,t|0,c[l>>2]|0)|0;g=g+1|0}while((g|0)!=8)}f=r>>1;g=(f|0)%8|0;u=r&1;h=b+124|0;l=b+196|0;m=b+30|0;t=b+28|0;jg(c[h>>2]|0,b+132|0,s,g,c[l>>2]|0,d[m>>0]|0,u,d[t>>0]|0);i=b+128|0;jg(c[i>>2]|0,b+164|0,s,g,c[l>>2]|0,d[m>>0]|0,u,d[t>>0]|0);if(u|0){m=(g+5|0)%8|0;l=f+5|0;t=c[b+88>>2]|0;t=(l|0)<(t|0)?l:t+-1|0;l=(c[b+96>>2]|0)+(R(t,c[b+112>>2]|0)|0)|0;t=(c[b+100>>2]|0)+(R(c[b+116>>2]|0,t)|0)|0;u=b+84|0;fh(c[b+132+(m<<2)>>2]|0,l|0,c[u>>2]|0)|0;fh(c[b+164+(m<<2)>>2]|0,t|0,c[u>>2]|0)|0}Ja[c[b+248>>2]&7](b+200|0,e,n,c[h>>2]|0,c[i>>2]|0,s,q);break}case 2:{u=(c[b+96>>2]|0)+(R(c[b+112>>2]|0,r)|0)|0;j=(c[b+100>>2]|0)+(R(c[b+116>>2]|0,r)|0)|0;t=b+124|0;k=b+30|0;l=b+28|0;m=b+196|0;kg(c[t>>2]|0,u,s,d[k>>0]|0,d[l>>0]|0,c[m>>2]|0);u=b+128|0;kg(c[u>>2]|0,j,s,d[k>>0]|0,d[l>>0]|0,c[m>>2]|0);Ja[c[b+248>>2]&7](b+200|0,e,n,c[t>>2]|0,c[u>>2]|0,s,q);break}case 3:{t=(c[b+96>>2]|0)+(R(c[b+112>>2]|0,r)|0)|0;u=(c[b+100>>2]|0)+(R(c[b+116>>2]|0,r)|0)|0;Ja[c[b+248>>2]&7](b+200|0,e,n,t,u,s,q);break}default:{f=-1;break a}}do if(!(a[b+31>>0]|0)){if(a[o>>0]|0){if(!(a[b+29>>0]|0)){mg(e+3|0,s);break}ng(b+200|0,e+3|0,(c[b+104>>2]|0)+(R(c[b+120>>2]|0,r)|0)|0,s);if(a[b+33>>0]|0)og(e,s)}}else{lg(b+200|0,e,(c[b+104>>2]|0)+(R(c[b+120>>2]|0,r)|0)|0,s,q);if(a[o>>0]|0)mg(e+3|0,s)}while(0);c[p>>2]=(c[p>>2]|0)+1;f=0}else f=-1;while(0);return f|0}function jg(a,e,f,g,h,i,j,k){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;n=c[e+((g+5&7)<<2)>>2]|0;o=c[e+((g+6&7)<<2)>>2]|0;p=c[e+((g+7&7)<<2)>>2]|0;q=c[e+((g&7)<<2)>>2]|0;r=c[e+((g+1&7)<<2)>>2]|0;s=c[e+((g+2&7)<<2)>>2]|0;g=c[e+((g+3&7)<<2)>>2]|0;l=i+-8|0;m=1<>1;t=(f+1|0)/2|0;e=(f|0)>0;if(!j){if(e){e=0;do{u=R(d[o+e>>0]|0,-6)|0;j=R(d[r+e>>0]|0,-10)|0;b[h+(e+3<<1)>>1]=((d[n+e>>0]|0)<<1)+m+u+((d[p+e>>0]|0)*18|0)+((d[q+e>>0]|0)*57|0)+j+((d[s+e>>0]|0)<<2)-(d[g+e>>0]|0)>>l;e=e+1|0}while((e|0)<(t|0))}}else if(e){e=0;do{j=R(d[p+e>>0]|0,-10)|0;u=R(d[s+e>>0]|0,-6)|0;b[h+(e+3<<1)>>1]=m-(d[n+e>>0]|0)+((d[o+e>>0]|0)<<2)+j+((d[q+e>>0]|0)*57|0)+((d[r+e>>0]|0)*18|0)+u+((d[g+e>>0]|0)<<1)>>l;e=e+1|0}while((e|0)<(t|0))}m=h+6|0;g=b[m>>1]|0;e=0;do{b[h+(e<<1)>>1]=g;e=e+1|0}while((e|0)!=3);l=t+3|0;g=b[h+(t+2<<1)>>1]|0;e=0;do{b[h+(l+e<<1)>>1]=g;e=e+1|0}while((e|0)!=4);if(!k)ug(a,m,f,i);else vg(a,m,f,i);return}function kg(b,c,d,e,f,g){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0;i=(d+1|0)/2|0;h=g+3|0;fh(h|0,c|0,i|0)|0;ah(g|0,a[c>>0]|0,3)|0;ah(g+(i+3)|0,a[c+(i+-1)>>0]|0,4)|0;if(!f)rg(b,h,d,e);else sg(b,h,d,e);return}function lg(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0;j=c[b+40>>2]|0;k=1<0){i=0;b=e;while(1){l=d[f+i>>0]|0;a[b>>0]=(R(d[b>>0]|0,l)|0)+k>>j;e=b+1|0;a[e>>0]=(R(d[e>>0]|0,l)|0)+k>>j;e=b+2|0;a[e>>0]=(R(d[e>>0]|0,l)|0)+k>>j;i=i+1|0;if((i|0)==(g|0))break;else b=b+h|0}}return}function mg(b,c){b=b|0;c=c|0;var d=0;if((c|0)>0){d=0;while(1){a[b>>0]=-1;d=d+1|0;if((d|0)==(c|0))break;else b=b+4|0}}return}function ng(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;if((c[b+40>>2]|0)==8){if((g|0)>0){b=0;while(1){a[e>>0]=a[f+b>>0]|0;b=b+1|0;if((b|0)==(g|0))break;else e=e+4|0}}}else{i=c[b+8>>2]|0;j=c[b+4>>2]|0;h=c[b>>2]|0;if((g|0)>0){b=0;while(1){a[e>>0]=(R(d[f+b>>0]|0,i)|0)+j>>h;b=b+1|0;if((b|0)==(g|0))break;else e=e+4|0}}}return}function og(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if(!(c[695]|0)){c[695]=1;pg()}if((e|0)>0){h=0;while(1){g=a[b+3>>0]|0;f=g&255;if(!(g<<24>>24)){a[b>>0]=-1;a[b+1>>0]=-1;g=b+2|0;f=-1}else{i=c[2784+(f<<2)>>2]|0;a[b>>0]=qg(d[b>>0]|0,f,i)|0;j=b+1|0;a[j>>0]=qg(d[j>>0]|0,f,i)|0;j=b+2|0;g=j;f=(qg(d[j>>0]|0,f,i)|0)&255}a[g>>0]=f;h=h+1|0;if((h|0)==(e|0))break;else b=b+4|0}}return}function pg(){var a=0;a=1;do{c[2784+(a<<2)>>2]=(((a|0)/2|0)+16711808|0)/(a|0)|0;a=a+1|0}while((a|0)!=256);return}function qg(a,b,c){a=a|0;b=b|0;c=c|0;c=((R(c,a)|0)+32768|0)>>>16;return (a>>>0>>0?c:255)|0}function rg(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;i=(1<1){l=e+-2|0;k=l>>>1;j=k+1|0;k=k<<1;h=k+2|0;g=c;f=b;while(1){a[f>>0]=a[g>>0]|0;n=R((d[g+2>>0]|0)+(d[g+-1>>0]|0)|0,-11)|0;m=g;g=g+1|0;a[f+1>>0]=tg(32-(d[m+-3>>0]|0)-(d[m+4>>0]|0)+((d[m+3>>0]|0)+(d[m+-2>>0]|0)<<2)+n+(((d[g>>0]|0)+(d[m>>0]|0)|0)*40|0)>>6,i)|0;e=e+-2|0;if((e|0)<=1)break;else f=f+2|0}b=b+h|0;f=c+j|0;e=l-k|0}else f=c;if(e|0)a[b>>0]=a[f>>0]|0;return}function sg(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=(1<>0]|0;g=d[c+-2>>0]|0;j=d[c+-1>>0]|0;h=d[c>>0]|0;f=d[c+1>>0]|0;i=d[c+2>>0]|0;if((e|0)>1){q=e+-2|0;p=q>>>1;r=p<<1;o=r+2|0;p=p+1|0;n=h;l=b;m=c;while(1){h=d[m+3>>0]|0;t=n*57|0;a[l>>0]=tg((k<<1)+32+(R(g,-6)|0)+(j*18|0)+t+(R(f,-10)|0)+(i<<2)-h>>6,s)|0;a[l+1>>0]=tg(32-k+(g<<2)+(R(j,-10)|0)+t+(f*18|0)+(R(i,-6)|0)+(h<<1)>>6,s)|0;e=e+-2|0;if((e|0)<=1)break;else{t=i;l=l+2|0;m=m+1|0;i=h;k=g;g=j;j=n;n=f;f=t}}m=h;h=f;l=n;b=b+o|0;c=c+p|0;f=q-r|0}else{m=i;i=f;l=j;j=g;g=k;f=e}if(f|0)a[b>>0]=tg((g<<1)+32+(R(j,-6)|0)+(l*18|0)+(h*57|0)+(R(i,-10)|0)+(m<<2)-(d[c+3>>0]|0)>>6,s)|0;return}function tg(a,b){a=a|0;b=b|0;return ((a|0)<0?0:(a|0)>(b|0)?b:a)|0}function ug(c,d,e,f){c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;n=(1<>1;j=20-f|0;h=1<1){l=e+-2|0;m=l>>>1;k=m+1|0;m=m<<1;i=m+2|0;g=d;f=c;while(1){a[f>>0]=tg((b[g>>1]|0)+p>>o,n)|0;r=R((b[g+4>>1]|0)+(b[g+-2>>1]|0)|0,-11)|0;q=g;g=g+2|0;a[f+1>>0]=tg(h-(b[q+-6>>1]|0)-(b[q+8>>1]|0)+((b[q+6>>1]|0)+(b[q+-4>>1]|0)<<2)+r+(((b[g>>1]|0)+(b[q>>1]|0)|0)*40|0)>>j,n)|0;e=e+-2|0;if((e|0)<=1)break;else f=f+2|0}c=c+i|0;f=d+(k<<1)|0;e=l-m|0}else f=d;if(e|0)a[c>>0]=tg((b[f>>1]|0)+p>>o,n)|0;return}function vg(c,d,e,f){c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=(1<>1]|0;g=b[d+-4>>1]|0;j=b[d+-2>>1]|0;h=b[d>>1]|0;f=b[d+2>>1]|0;i=b[d+4>>1]|0;if((e|0)>1){q=e+-2|0;p=q>>>1;r=p<<1;o=r+2|0;p=p+1|0;n=h;l=c;m=d;while(1){h=b[m+6>>1]|0;v=n*57|0;a[l>>0]=tg((k<<1)+t+(R(g,-6)|0)+(j*18|0)+v+(R(f,-10)|0)+(i<<2)-h>>s,u)|0;a[l+1>>0]=tg(t-k+(g<<2)+(R(j,-10)|0)+v+(f*18|0)+(R(i,-6)|0)+(h<<1)>>s,u)|0;e=e+-2|0;if((e|0)<=1)break;else{v=i;l=l+2|0;m=m+2|0;i=h;k=g;g=j;j=n;n=f;f=v}}m=h;h=f;l=n;c=c+o|0;d=d+(p<<1)|0;f=q-r|0}else{m=i;i=f;l=j;j=g;g=k;f=e}if(f|0)a[c>>0]=tg((g<<1)+t+(R(j,-6)|0)+(l*18|0)+(h*57|0)+(R(i,-10)|0)+(m<<2)-(b[d+6>>1]|0)>>s,u)|0;return}function wg(){return lf(252)|0}function xg(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+48|0;t=y;h=yg(t,f,g,d[e+40>>0]|0)|0;a:do if((h|0)>=0){v=c[t>>2]|0;q=c[t+4>>2]|0;k=a[t+12>>0]|0;r=k&255;n=c[t+24>>2]|0;o=a[t+13>>0]|0;s=o&255;w=e+16|0;c[w>>2]=v;x=e+20|0;c[x>>2]=q;i=c[t+8>>2]|0;j=e+24|0;c[j>>2]=i;switch(i|0){case 5:{i=2;p=4;break}case 4:{i=1;p=4;break}default:{j=1;m=i}}if((p|0)==4){c[j>>2]=i;j=0;m=i}a[e+28>>0]=j;a[e+29>>0]=k;a[e+33>>0]=a[t+15>>0]|0;a[e+31>>0]=a[t+14>>0]|0;a[e+32>>0]=a[t+16>>0]|0;c[e+36>>2]=n;a[e+30>>0]=o;i=e+34|0;a[i>>0]=a[t+17>>0]|0;b[e+48>>1]=b[t+18>>1]|0;b[e+50>>1]=b[t+20>>1]|0;b[e+52>>1]=b[t+22>>1]|0;k=e+44|0;c[k>>2]=c[t+32>>2];do if(((c[t+28>>2]|0)+h|0)>>>0<=g>>>0?(u=zg(e,f+h|0,g-h|0,v,q,m,s,r)|0,(u|0)>=0):0){j=u+h|0;a[e+41>>0]=1;if(!(a[i>>0]|0))Ag(e);else{h=g-j|0;i=cf(h)|0;c[e+56>>2]=i;if(!i)break;fh(i|0,f+j|0,h|0)|0;c[e+64>>2]=h;c[e+60>>2]=0}f=c[e+8>>2]|0;if((c[f+64>>2]|0)>=(c[w>>2]|0)?(c[f+68>>2]|0)>=(c[x>>2]|0):0){c[e+80>>2]=-1;h=0;break a}}while(0);Of(e+8|0);Of(e+12|0);c[k>>2]=0;h=-1}while(0);l=y;return h|0}function yg(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=l;l=l+32|0;x=J+20|0;A=J+16|0;C=J+8|0;D=J+12|0;E=J+4|0;F=J;a:do if(((((((f|0)>=6?(a[e>>0]|0)==66:0)?(a[e+1>>0]|0)==80:0)?(a[e+2>>0]|0)==71:0)?(a[e+3>>0]|0)==-5:0)?(H=a[e+4>>0]|0,h=H&255,n=h>>>5,c[d+8>>2]=n,(H&255)<=191):0)?(H=(h&15)+8|0,a[d+13>>0]=H,H>>>0<=14):0){o=a[e+5>>0]|0;z=o&255;p=z>>>4;c[d+24>>2]=p;w=z&8;i=z>>>2&1;a[d+16>>0]=z>>>1&1;G=d+17|0;a[G>>0]=z&1;z=d+18|0;b[z>>1]=0;H=d+20|0;b[H>>1]=0;B=d+22|0;b[B>>1]=0;j=d+12|0;a[j>>0]=0;k=d+14|0;a[k>>0]=0;m=d+15|0;a[m>>0]=0;if(!(h&16))if(!i)h=0;else{a[j>>0]=1;a[k>>0]=1;h=1}else{a[j>>0]=1;a[m>>0]=i;h=0}if(((((((o&255)<=79?(p|0)==0&h<<24>>24==0|(n|0)!=0:0)?(q=Eg(d,e+6|0,f+-6|0)|0,(q|0)>=0):0)?(r=q+6|0,s=d+4|0,t=Eg(s,e+r|0,f-r|0)|0,(t|0)>=0):0)?(u=t+r|0,(c[d>>2]|0)!=0):0)?(c[s>>2]|0)!=0:0)?(I=d+28|0,v=Eg(I,e+u|0,f-u|0)|0,(v|0)>=0):0){h=v+u|0;c[x>>2]=0;b:do if(!w){c[d+32>>2]=0;y=43}else{i=Eg(x,e+h|0,f-h|0)|0;if((i|0)<0){h=-1;break a}h=i+h|0;i=d+32|0;c[i>>2]=0;r=(c[x>>2]|0)+h|0;if((r|0)>(f|0)){h=-1;break a}q=(g|0)!=0;if(!q?(a[G>>0]|0)==0:0){h=r;break}if((r|0)<=(h|0)){y=43;break}while(1){j=Fg(A,e+h|0,r-h|0)|0;if((j|0)<0){h=-1;break a}h=j+h|0;j=Eg(C,e+h|0,r-h|0)|0;if((j|0)<0){h=-1;break a}n=j+h|0;o=c[C>>2]|0;h=o+n|0;if(h>>>0>r>>>0){h=-1;break a}p=c[A>>2]|0;if((a[G>>0]|0)!=0&(p|0)==5){j=Eg(D,e+n|0,r-n|0)|0;if((j|0)<0)break;j=j+n|0;k=Eg(E,e+j|0,r-j|0)|0;if((k|0)<0)break;y=k+j|0;if((Eg(F,e+y|0,r-y|0)|0)<0)break;j=c[E>>2]|0;k=c[F>>2]|0;if((j|0)==0|(k|0)==0)break;if((j&65535|0)!=(j|0))break;if((k&65535|0)!=(k|0))break;m=c[D>>2]|0;if((m&65535|0)!=(m|0))break;b[z>>1]=m;b[H>>1]=j;b[B>>1]=k}if(q){x=cf(16)|0;c[x>>2]=p;g=x+4|0;c[g>>2]=o;y=x+12|0;c[y>>2]=0;c[i>>2]=x;i=cf(o)|0;c[x+8>>2]=i;fh(i|0,e+n|0,c[g>>2]|0)|0;i=y}if((r|0)<=(h|0)){y=43;break b}}h=-1;break a}while(0);if((y|0)==43)if((a[G>>0]|0)!=0?(b[H>>1]|0)==0:0){h=-1;break}if(!(c[I>>2]|0))c[I>>2]=f-h}else h=-1}else h=-1;while(0);l=J;return h|0}function zg(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;k=o+12|0;m=o;Yf(k);Yf(m);if(i){i=Bg(k,a+12|0,a+4|0,b,d,e,f,0,h)|0;if((i|0)<0)i=-1;else{j=b+i|0;b=d-i|0;n=4}}else{j=b;b=d;n=4}if((n|0)==4){i=Bg(m,a+8|0,a,j,b,e,f,g,h)|0;if((i|0)<0)i=-1;else{n=b-i|0;i=Zf(a,k,m,j+i|0,n,1)|0;gf(c[k>>2]|0);gf(c[m>>2]|0);i=(i|0)<0?-1:d-n+i|0}}l=o;return i|0}function Ag(a){a=a|0;var b=0,d=0;b=a+4|0;d=c[b>>2]|0;if(d|0){ze(d)|0;gf(c[b>>2]|0);c[b>>2]=0}b=c[a>>2]|0;if(b|0){ze(b)|0;gf(c[a>>2]|0);c[a>>2]=0}return}function Bg(a,b,d,e,f,g,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+16|0;p=q+8|0;k=q+4|0;m=q;e=Cg(k,m,e,f,g,h,i,j)|0;do if((((e|0)>=0?(k=c[k>>2]|0,m=Dg(a,k,c[m>>2]|0)|0,gf(k),(m|0)>=0):0)?(n=Ee(152)|0,(n|0)!=0):0)?(m=Mf()|0,c[p>>2]=m,o=m,(m|0)!=0):0){m=n+688|0;c[m>>2]=c[m>>2]|1;if((ye(n,152,0)|0)<0){Of(p);e=-1;break}else{c[d>>2]=n;c[b>>2]=o;break}}else e=-1;while(0);l=q;return e|0}function Cg(b,d,e,f,g,h,i,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+16|0;k=q;c[b>>2]=0;p=Eg(k,e,f)|0;if((p|0)>=0?(o=c[k>>2]|0,o>>>0<=(f-p|0)>>>0):0){m=o+10|0;n=cf(m)|0;i=i&255;a[n>>0]=i;a[n+1>>0]=g>>>24;a[n+2>>0]=g>>>16;a[n+3>>0]=g>>>8;a[n+4>>0]=g;a[n+5>>0]=h>>>24;a[n+6>>0]=h>>>16;a[n+7>>0]=h>>>8;a[n+8>>0]=h;a[n+9>>0]=j+248;fh(n+10|0,e+p|0,o|0)|0;g=cf((m<<1)+6|0)|0;a[g>>0]=0;a[g+1>>0]=0;a[g+2>>0]=0;a[g+3>>0]=1;a[g+4>>0]=96;a[g+5>>0]=1;if((m|0)>0){e=0;f=6;while(1){k=e+1|0;if((k|0)<(m|0)&i<<24>>24==0?(a[n+k>>0]|0)==0:0){a[g+f>>0]=0;a[g+(f+1)>>0]=0;a[g+(f+2)>>0]=3;k=e+2|0;f=f+3|0}else{a[g+f>>0]=i;f=f+1|0}if((k|0)>=(m|0))break;e=k;i=a[n+k>>0]|0}if(!f){f=0;k=12}else k=11}else{f=6;k=11}if((k|0)==11)if(!(a[g+(f+-1)>>0]|0))k=12;if((k|0)==12){a[g+f>>0]=-128;f=f+1|0}gf(n);c[d>>2]=f;c[b>>2]=g;f=p+o|0}else f=-1;l=q;return f|0}function Dg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=a+8|0;if(($f(a,(c[e>>2]|0)+d|0)|0)<0)a=-1;else{fh((c[a>>2]|0)+(c[e>>2]|0)|0,b|0,d|0)|0;c[e>>2]=(c[e>>2]|0)+d;a=0}return a|0}function Eg(a,b,d){a=a|0;b=b|0;d=d|0;b=Fg(a,b,d)|0;if((b|0)>=0)b=(c[a>>2]|0)>>>0>1073741823?-1:b;return b|0}function Fg(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0;a:do if((f|0)>=1){g=a[e>>0]|0;h=g&255;if(g<<24>>24>-1){c[b>>2]=h;f=1;break}if(g<<24>>24!=-128){g=h&127;h=e+1|0;while(1){if((f|0)<2){f=-1;break a}i=h;h=h+1|0;i=d[i>>0]|0;g=i&127|g<<7;if(!(i&128))break;else f=f+-1|0}c[b>>2]=g;f=h-e|0}else f=-1}else f=-1;while(0);return f|0}function Gg(a){a=a|0;Hg(a);gf(c[a+56>>2]|0);Ag(a);Of(a+8|0);Of(a+12|0);gf(a);return}function Hg(a){a=a|0;var b=0;gf(c[a+124>>2]|0);gf(c[a+128>>2]|0);b=0;do{gf(c[a+132+(b<<2)>>2]|0);gf(c[a+164+(b<<2)>>2]|0);b=b+1|0}while((b|0)!=8);gf(c[a+196>>2]|0);return}function Ig(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:do if((a+-1|0)>>>0>2147483582)b=0;else{b=c[953]|0;if(!b){b=_g(64)|0;if((b|0)==(-1|0)){b=0;break}c[954]=_g(0)|0;c[953]=3808;c[952]=3808;c[956]=3820;c[955]=3820;i=b+16|0;Jg(i,170);Kg(i,3820);Kg(b+24|0,3808);b=c[953]|0}i=Lg(a)|0;g=b+-8|0;a=Mg(g)|0;b:do if(i>>>0>>0){e=g;d=g;a=g;j=10}else{h=c[952]|0;e=a;a=g;f=g;d=g;while(1){if((b|0)==(h|0))break;if((i|0)==(e|0)){j=13;break}b=c[b+4>>2]|0;g=b+-8|0;a=Mg(g)|0;if(i>>>0>>0){e=g;d=g;a=g;j=10;break b}else{e=a;a=g;f=g;d=g}}if((j|0)==13){Ng(b);break}if((_g(i+32-e|0)|0)==(-1|0)){b=0;break a}c[954]=_g(0)|0;b=h;e=f;j=10}while(0);if((j|0)==10){j=e+i|0;Kg(j,d);Kg(j+8|0,b);Jg(j,170);Ng(b)}Jg(a,85)}while(0);return b|0}function Jg(b,c){b=b|0;c=c|0;a[b+-1>>0]=c;return}function Kg(a,b){a=a|0;b=b|0;var d=0,e=0;e=b+4|0;d=c[e>>2]|0;c[e>>2]=a;c[a>>2]=b;c[a+4>>2]=d;c[d>>2]=a;return}function Lg(a){a=a|0;return a+40&-32|0}function Mg(a){a=a|0;var b=0;b=c[a+4>>2]|0;return ((b|0)==3820?c[954]|0:b)-a|0}function Ng(a){a=a|0;var b=0;b=c[a>>2]|0;a=c[a+4>>2]|0;c[b+4>>2]=a;c[a>>2]=b;return}function Og(a){a=a|0;var b=0,d=0;if(a|0){b=a+-8|0;Kg(a,3808);Jg(b,170);d=c[b>>2]|0;if((d|0)!=3820?(Pg(d)|0)==170:0){Ng(b);Ng(a);b=d}a=c[b+4>>2]|0;if((a|0)!=3820?(Pg(a)|0)==170:0){Ng(a);b=b+8|0;Ng(b);d=a+8|0;Kg(b,d);Ng(d)}}return}function Pg(a){a=a|0;return d[a+-1>>0]|0|0}function Qg(a,b){a=a|0;b=b|0;var d=0,e=0;do if(a){if(!b){Og(a);d=0;break}d=Ig(b)|0;if(!d)d=0;else{e=(c[a+-4>>2]|0)-a+-1|0;fh(d|0,a|0,(e>>>0>b>>>0?b:e)|0)|0;Og(a)}}else d=Ig(b)|0;while(0);return d|0}function Rg(){return 3828}function Sg(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;a:do if(!d)b=0;else{while(1){e=a[b>>0]|0;f=a[c>>0]|0;if(e<<24>>24!=f<<24>>24)break;d=d+-1|0;if(!d){b=0;break a}else{b=b+1|0;c=c+1|0}}b=(e&255)-(f&255)|0}while(0);return b|0}function Tg(a){a=a|0;return 0}function Ug(a){a=a|0;return 0}function Vg(a){a=+a;var b=0;b=Ug(32)|0;a=+Wg(a);return ~~a|0}function Wg(a){a=+a;var b=0,d=0;h[j>>3]=a;b=c[j+4>>2]|0;d=b&2146435072;if(!(d>>>0>1126170624|(d|0)==1126170624&0>0)){b=(b|0)<0;a=(b?4503599627370496.0:-4503599627370496.0)+((b?-4503599627370496.0:4503599627370496.0)+a);if(a==0.0)a=b?-0.0:0.0}return +a}function Xg(){}function Yg(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b>>c;return a>>>c|(b&(1<>c-32|0}function Zg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return (C=d,a-c>>>0|0)|0}function _g(a){a=a|0;var b=0,d=0;d=a+15&-16|0;b=c[i>>2]|0;a=b+d|0;if((d|0)>0&(a|0)<(b|0)|(a|0)<0){Z()|0;pa(12);return -1}c[i>>2]=a;if((a|0)>(Y()|0)?(X()|0)==0:0){pa(12);c[i>>2]=b;return -1}return b|0}function $g(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return (C=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function ah(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=b+e|0;d=d&255;if((e|0)>=67){while(b&3){a[b>>0]=d;b=b+1|0}f=h&-4|0;g=f-64|0;i=d|d<<8|d<<16|d<<24;while((b|0)<=(g|0)){c[b>>2]=i;c[b+4>>2]=i;c[b+8>>2]=i;c[b+12>>2]=i;c[b+16>>2]=i;c[b+20>>2]=i;c[b+24>>2]=i;c[b+28>>2]=i;c[b+32>>2]=i;c[b+36>>2]=i;c[b+40>>2]=i;c[b+44>>2]=i;c[b+48>>2]=i;c[b+52>>2]=i;c[b+56>>2]=i;c[b+60>>2]=i;b=b+64|0}while((b|0)<(f|0)){c[b>>2]=i;b=b+4|0}}while((b|0)<(h|0)){a[b>>0]=d;b=b+1|0}return h-e|0}function bh(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b<>>32-c;return a<>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function dh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=R(e,f)|0;d=a>>>16;a=(c>>>16)+(R(e,d)|0)|0;e=b>>>16;b=R(e,f)|0;return (C=(a>>>16)+(R(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function eh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=dh(e,f)|0;a=C;return (C=(R(b,f)|0)+(R(d,e)|0)+a|a&0,c|0|0)|0}function fh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192)return qa(b|0,d|0,e|0)|0;h=b|0;g=b+e|0;if((b&3)==(d&3)){while(b&3){if(!e)return h|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}e=g&-4|0;f=e-64|0;while((b|0)<=(f|0)){c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];c[b+12>>2]=c[d+12>>2];c[b+16>>2]=c[d+16>>2];c[b+20>>2]=c[d+20>>2];c[b+24>>2]=c[d+24>>2];c[b+28>>2]=c[d+28>>2];c[b+32>>2]=c[d+32>>2];c[b+36>>2]=c[d+36>>2];c[b+40>>2]=c[d+40>>2];c[b+44>>2]=c[d+44>>2];c[b+48>>2]=c[d+48>>2];c[b+52>>2]=c[d+52>>2];c[b+56>>2]=c[d+56>>2];c[b+60>>2]=c[d+60>>2];b=b+64|0;d=d+64|0}while((b|0)<(e|0)){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}}else{e=g-4|0;while((b|0)<(e|0)){a[b>>0]=a[d>>0]|0;a[b+1>>0]=a[d+1>>0]|0;a[b+2>>0]=a[d+2>>0]|0;a[b+3>>0]=a[d+3>>0]|0;b=b+4|0;d=d+4|0}}while((b|0)<(g|0)){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}return h|0}function gh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ta[a&1](b|0,c|0,d|0)|0}function hh(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;ua[a&7](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)}function ih(a,b,c,d,e,f,g,h,i,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;va[a&1](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)}function jh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;wa[a&3](b|0,c|0,d|0,e|0,f|0)}function kh(a,b){a=a|0;b=b|0;xa[a&7](b|0)}function lh(a,b,c){a=a|0;b=b|0;c=c|0;ya[a&15](b|0,c|0)}function mh(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return za[a&1](b|0,c|0,d|0,e|0,f|0,g|0)|0}function nh(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;Aa[a&1](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function oh(a,b,c,d,e,f,g,h,i,j,k,l,m){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;Ba[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0,m|0)}function ph(a,b){a=a|0;b=b|0;return Ca[a&7](b|0)|0}function qh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Da[a&7](b|0,c|0,d|0)}function rh(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;Ea[a&7](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function sh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Fa[a&1](b|0,c|0,d|0,e|0)|0}function th(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;Ga[a&3](b|0,c|0,d|0,e|0,f|0,g|0)}function uh(a,b,c){a=a|0;b=b|0;c=c|0;return Ha[a&1](b|0,c|0)|0}function vh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Ia[a&1](b|0,c|0,d|0,e|0,f|0)|0}function wh(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;Ja[a&7](b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function xh(a,b,c){a=a|0;b=b|0;c=c|0;V(0);return 0}function yh(a,b,c,d,e,f,g,h,i,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;V(1)}function zh(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;V(2)}function Ah(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;V(3)}function Bh(a){a=a|0;V(4)}function Ch(a,b){a=a|0;b=b|0;V(5)}function Dh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;V(6);return 0}function Eh(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;V(7)}function Fh(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;V(8)}function Gh(a){a=a|0;V(9);return 0}function Hh(a,b,c){a=a|0;b=b|0;c=c|0;V(10)}function Ih(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;V(11)}function Jh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;V(12);return 0}function Kh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;V(13)}function Lh(a,b){a=a|0;b=b|0;V(14);return 0}function Mh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;V(15);return 0}function Nh(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;V(16)} + +// EMSCRIPTEN_END_FUNCS +var ta=[xh,Ce];var ua=[yh,Gd,Hd,Id,Jd,Nd,Od,Pd];var va=[zh,af];var wa=[Ah,Vd,Wd,Ah];var xa=[Bh,hc,td,yd,zd,Ad,Bd,Bh];var ya=[Ch,rd,ud,vd,wd,xd,ne,rf,Gf,Ch,Ch,Ch,Ch,Ch,Ch,Ch];var za=[Dh,Ae];var Aa=[Eh,Qd];var Ba=[Fh,Rd,Sd,Fh];var Ca=[Gh,ec,gc,tf,sf,Gh,Gh,Gh];var Da=[Hh,nd,od,pd,qd,sd,Hh,Hh];var Ea=[Ih,Cd,Dd,Ed,Fd,Kd,Ld,Md];var Fa=[Jh,fc];var Ga=[Kh,md,Td,Ud];var Ha=[Lh,rc];var Ia=[Mh,Be];var Ja=[Nh,eg,fg,gg,cg,Nh,Nh,Nh];return{___muldsi3:dh,_sbrk:_g,_i64Subtract:Zg,_free:Og,_bpg_decoder_decode:xg,_bpg_decoder_start:Vf,_i64Add:$g,_bpg_decoder_open:wg,_bitshift64Ashr:Yg,_memset:ah,_bpg_decoder_get_info:Uf,_malloc:Ig,_emscripten_get_global_libc:Rg,_memcpy:fh,_bpg_decoder_get_line:ig,_bpg_decoder_close:Gg,_bpg_decoder_get_frame_duration:hg,___muldi3:eh,_llvm_bswap_i32:ch,_bitshift64Shl:bh,runPostSets:Xg,stackAlloc:Ka,stackSave:La,stackRestore:Ma,establishStackSpace:Na,setTempRet0:Pa,getTempRet0:Qa,setThrew:Oa,stackAlloc:Ka,stackSave:La,stackRestore:Ma,establishStackSpace:Na,setThrew:Oa,setTempRet0:Pa,getTempRet0:Qa,dynCall_iiii:gh,dynCall_viiiiiiiiiii:hh,dynCall_viiiiiiiiii:ih,dynCall_viiiii:jh,dynCall_vi:kh,dynCall_vii:lh,dynCall_iiiiiii:mh,dynCall_viiiiiiiii:nh,dynCall_viiiiiiiiiiii:oh,dynCall_ii:ph,dynCall_viii:qh,dynCall_viiiiiiii:rh,dynCall_iiiii:sh,dynCall_viiiiii:th,dynCall_iii:uh,dynCall_iiiiii:vh,dynCall_viiiiiii:wh}}) + + +// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var _bpg_decoder_decode=Module["_bpg_decoder_decode"]=asm["_bpg_decoder_decode"];var _bpg_decoder_start=Module["_bpg_decoder_start"]=asm["_bpg_decoder_start"];var stackSave=Module["stackSave"]=asm["stackSave"];var getTempRet0=Module["getTempRet0"]=asm["getTempRet0"];var setThrew=Module["setThrew"]=asm["setThrew"];var _bpg_decoder_get_line=Module["_bpg_decoder_get_line"]=asm["_bpg_decoder_get_line"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _bitshift64Ashr=Module["_bitshift64Ashr"]=asm["_bitshift64Ashr"];var _memset=Module["_memset"]=asm["_memset"];var _bpg_decoder_get_info=Module["_bpg_decoder_get_info"]=asm["_bpg_decoder_get_info"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var setTempRet0=Module["setTempRet0"]=asm["setTempRet0"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _emscripten_get_global_libc=Module["_emscripten_get_global_libc"]=asm["_emscripten_get_global_libc"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var ___muldsi3=Module["___muldsi3"]=asm["___muldsi3"];var _free=Module["_free"]=asm["_free"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var _bpg_decoder_open=Module["_bpg_decoder_open"]=asm["_bpg_decoder_open"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var _bpg_decoder_close=Module["_bpg_decoder_close"]=asm["_bpg_decoder_close"];var _malloc=Module["_malloc"]=asm["_malloc"];var _bpg_decoder_get_frame_duration=Module["_bpg_decoder_get_frame_duration"]=asm["_bpg_decoder_get_frame_duration"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_viiiiiiiiiii=Module["dynCall_viiiiiiiiiii"]=asm["dynCall_viiiiiiiiiii"];var dynCall_viiiiiiiiii=Module["dynCall_viiiiiiiiii"]=asm["dynCall_viiiiiiiiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_viiiiiiiii=Module["dynCall_viiiiiiiii"]=asm["dynCall_viiiiiiiii"];var dynCall_viiiiiiiiiiii=Module["dynCall_viiiiiiiiiiii"]=asm["dynCall_viiiiiiiiiiii"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_viiiiiiii=Module["dynCall_viiiiiiii"]=asm["dynCall_viiiiiiii"];var dynCall_iiiii=Module["dynCall_iiiii"]=asm["dynCall_iiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiiiii=Module["dynCall_iiiiii"]=asm["dynCall_iiiiii"];var dynCall_viiiiiii=Module["dynCall_viiiiiii"]=asm["dynCall_viiiiiii"];Runtime.stackAlloc=Module["stackAlloc"];Runtime.stackSave=Module["stackSave"];Runtime.stackRestore=Module["stackRestore"];Runtime.establishStackSpace=Module["establishStackSpace"];Runtime.setTempRet0=Module["setTempRet0"];Runtime.getTempRet0=Module["getTempRet0"];Module["asm"]=asm;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=Module.callMain=function callMain(args){args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<4-1;i++){argv.push(0)}}var argv=[allocate(intArrayFromString(Module["thisProgram"]),"i8",ALLOC_NORMAL)];pad();for(var i=0;i0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["exit"](status)}Module["quit"](status,new ExitStatus(status))}Module["exit"]=Module.exit=exit;var abortDecorators=[];function abort(what){if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output="abort("+what+") at "+stackTrace()+extra;if(abortDecorators){abortDecorators.forEach((function(decorator){output=decorator(output,what)}))}throw output}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}run();window["BPGDecoder"]=(function(ctx){this.ctx=ctx;this["imageData"]=null;this["onload"]=null;this["frames"]=null;this["loop_count"]=0});window["BPGDecoder"].prototype={malloc:Module["cwrap"]("malloc","number",["number"]),free:Module["cwrap"]("free","void",["number"]),bpg_decoder_open:Module["cwrap"]("bpg_decoder_open","number",[]),bpg_decoder_decode:Module["cwrap"]("bpg_decoder_decode","number",["number","array","number"]),bpg_decoder_get_info:Module["cwrap"]("bpg_decoder_get_info","number",["number","number"]),bpg_decoder_start:Module["cwrap"]("bpg_decoder_start","number",["number","number"]),bpg_decoder_get_frame_duration:Module["cwrap"]("bpg_decoder_get_frame_duration","void",["number","number","number"]),bpg_decoder_get_line:Module["cwrap"]("bpg_decoder_get_line","number",["number","number"]),bpg_decoder_close:Module["cwrap"]("bpg_decoder_close","void",["number"]),load:(function(url){var request=new XMLHttpRequest;var this1=this;request.open("get",url,true);request.responseType="arraybuffer";request.onload=(function(event){this1._onload(request,event)});request.send()}),_onload:(function(request,event){var data=request.response;var array=new Uint8Array(data);var img,w,h,img_info_buf,cimg,p0,rgba_line,w4,frame_count;var heap8,heap16,heap32,dst,i,y,duration,frames,loop_count;img=this.bpg_decoder_open();if(this.bpg_decoder_decode(img,array,array.length)<0){console.log("could not decode image");return}img_info_buf=this.malloc(5*4);this.bpg_decoder_get_info(img,img_info_buf);heap8=Module["HEAPU8"];heap16=Module["HEAPU16"];heap32=Module["HEAPU32"];w=heap32[img_info_buf>>2];h=heap32[img_info_buf+4>>2];loop_count=heap16[img_info_buf+16>>1];w4=w*4;rgba_line=this.malloc(w4);frame_count=0;frames=[];for(;;){if(this.bpg_decoder_start(img,1)<0)break;this.bpg_decoder_get_frame_duration(img,img_info_buf,img_info_buf+4);duration=heap32[img_info_buf>>2]*1e3/heap32[img_info_buf+4>>2];cimg=this.ctx.createImageData(w,h);dst=cimg.data;p0=0;for(y=0;y=frames.length){if(dec["loop_count"]==0||dec.loop_counter=0){dec.frame_index=frame_index;ctx.putImageData(frames[frame_index]["img"],0,0);setTimeout(next_frame,frames[frame_index]["duration"])}}canvas.width=imageData.width;canvas.height=imageData.height;ctx.putImageData(imageData,0,0);if(frames.length>1){dec.frame_index=0;dec.loop_counter=0;setTimeout(next_frame,frames[0]["duration"])}}).bind(dec,canvas,ctx);dec.load(url)}})}))() + + + + diff --git a/themes/fractal-forest/static/js/bpgdec8a.js.sha384 b/themes/fractal-forest/static/js/bpgdec8a.js.sha384 new file mode 100644 index 0000000..57ce5bf --- /dev/null +++ b/themes/fractal-forest/static/js/bpgdec8a.js.sha384 @@ -0,0 +1 @@ +8PG0go3BW8hLm63KbTxk/hNcehaoSbrAhKzsmy2Jhs/KY8QdiKKkjhdeyHY/Q/0I