├── tests ├── config.nims ├── test_terminate.nim ├── test_version.nim ├── test_nim_api.nim ├── test_go_test.nim └── test_sync_bind.nim ├── examples ├── nim.cfg ├── example_application │ ├── windows │ │ ├── nim.cfg │ │ ├── README │ │ ├── icons │ │ │ ├── window.ico │ │ │ └── application.ico │ │ ├── resources.rc │ │ ├── compile.bat │ │ └── main.nim │ └── macos │ │ └── README ├── basic.nim └── bind.nim ├── .gitmodules ├── nimdoc.cfg ├── .gitignore ├── .gitattributes ├── webview.nimble ├── LICENSE ├── libs └── webview2 │ ├── EventToken.h │ └── WebView2EnvironmentOptions.h ├── README.md ├── docs ├── webview.idx ├── nimdoc.out.css └── dochack.js └── webview.nim /tests/config.nims: -------------------------------------------------------------------------------- 1 | switch("path", "$projectDir") -------------------------------------------------------------------------------- /examples/nim.cfg: -------------------------------------------------------------------------------- 1 | --path:".." 2 | --mm:orc 3 | 4 | -d:release -------------------------------------------------------------------------------- /examples/example_application/windows/nim.cfg: -------------------------------------------------------------------------------- 1 | --outDir:build 2 | --app:gui 3 | --mm:orc 4 | 5 | -d:release -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libs/webview"] 2 | path = libs/webview 3 | url = https://github.com/webview/webview.git 4 | -------------------------------------------------------------------------------- /examples/example_application/windows/README: -------------------------------------------------------------------------------- 1 | Example application for Windows 2 | 3 | See https://github.com/webview/webview#windows-apps -------------------------------------------------------------------------------- /examples/example_application/macos/README: -------------------------------------------------------------------------------- 1 | MacOS example application 2 | 3 | TODO 4 | 5 | See https://github.com/webview/webview#macos-application-bundle -------------------------------------------------------------------------------- /examples/example_application/windows/icons/window.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neroist/webview/HEAD/examples/example_application/windows/icons/window.ico -------------------------------------------------------------------------------- /examples/example_application/windows/icons/application.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neroist/webview/HEAD/examples/example_application/windows/icons/application.ico -------------------------------------------------------------------------------- /examples/example_application/windows/resources.rc: -------------------------------------------------------------------------------- 1 | 100 ICON "icons\\application.ico" // Set executable file icon 2 | 32512 ICON "icons\\window.ico" // Set window icon -------------------------------------------------------------------------------- /nimdoc.cfg: -------------------------------------------------------------------------------- 1 | --out:"index.html" 2 | --docCmd:skip 3 | --outDir:docs 4 | --index 5 | 6 | --git.url:"https://github.com/neroist/webview" 7 | --git.devel:main 8 | --git.commit:main -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # execuable files/dlls 2 | *.exe 3 | *.dll 4 | *.lib 5 | 6 | # files generated by clang 7 | *.ilk 8 | *.pdb 9 | 10 | # vscode generated directory 11 | .vscode -------------------------------------------------------------------------------- /examples/basic.nim: -------------------------------------------------------------------------------- 1 | import webview 2 | 3 | let w = newWebview() # or you can use create() 4 | 5 | w.title = "Basic Example" 6 | w.size = (480, 320) 7 | w.html = "Thanks for using webview!" 8 | 9 | w.run() 10 | w.destroy() 11 | -------------------------------------------------------------------------------- /tests/test_terminate.nim: -------------------------------------------------------------------------------- 1 | import std/unittest 2 | 3 | import webview 4 | 5 | test "start app loop and terminate it.": 6 | let w = newWebview() 7 | 8 | w.dispatch() do (web: Webview; _: pointer) {.cdecl.}: 9 | web.terminate() 10 | 11 | w.run() 12 | w.destroy() -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.nimble linguist-detectable=true 2 | *.nims linguist-detectable=true 3 | *.nim linguist-detectable=true 4 | 5 | *.cpp linguist-detectable=false 6 | *.hpp linguist-detectable=false 7 | *.c linguist-detectable=false 8 | *.h linguist-detectable=false 9 | *.m linguist-detectable=false 10 | -------------------------------------------------------------------------------- /examples/example_application/windows/compile.bat: -------------------------------------------------------------------------------- 1 | mkdir build 2 | 3 | :: If below doesn't work for you 4 | :: NOTE: `rc.exe` may be found at "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\rc.exe" if not in PATH 5 | :: rc /r /fo build\resources.res resources.rc 6 | :: nim c -d:useRC --cc:vcc main.nim 7 | 8 | windres -o build/resources.res -i resources.rc 9 | nim c main.nim -------------------------------------------------------------------------------- /examples/example_application/windows/main.nim: -------------------------------------------------------------------------------- 1 | import webview 2 | 3 | when defined(useRC): 4 | {.link: "build/resources.res".} 5 | else: 6 | {.link: "build/resources.o".} 7 | 8 | proc main = 9 | let w = newWebview() 10 | 11 | w.title = "Youtube" 12 | w.size = (800, 800) 13 | 14 | w.navigate("https://www.youtube.com") 15 | 16 | w.run() 17 | w.destroy() 18 | 19 | main() 20 | -------------------------------------------------------------------------------- /tests/test_version.nim: -------------------------------------------------------------------------------- 1 | import std/unittest 2 | import std/strutils 3 | 4 | import webview 5 | 6 | test "webviewVersion()": 7 | let ver = webviewVersion() 8 | 9 | check ver.version.major == WEBVIEW_VERSION_MAJOR 10 | check ver.version.minor == WEBVIEW_VERSION_MINOR 11 | check ver.version.patch == WEBVIEW_VERSION_PATCH 12 | check ver.versionNumber.join().replace("\0", "") == WEBVIEW_VERSION_NUMBER 13 | check ver.preRelease.join().replace("\0", "") == WEBVIEW_VERSION_PRE_RELEASE 14 | check ver.buildMetadata.join().replace("\0", "") == WEBVIEW_VERSION_BUILD_METADATA -------------------------------------------------------------------------------- /tests/test_nim_api.nim: -------------------------------------------------------------------------------- 1 | import std/unittest 2 | 3 | import webview 4 | 5 | test "create a window, run app and terminate it.": 6 | proc cbAssertArg(w: Webview, arg: pointer) {.cdecl.} = 7 | check w != nil 8 | check cast[cstring](arg) == "arg" 9 | 10 | proc cbTerminate(w: Webview, arg: pointer) {.cdecl.} = 11 | check arg == nil 12 | w.terminate() 13 | 14 | let w = newWebview() 15 | 16 | w.setSize(280, 320, WebviewHintNone) 17 | w.setTitle("Test") 18 | 19 | w.navigate("https://github.com/zserge/webview") 20 | w.dispatch(cbAssertArg, cast[pointer](cstring "arg")) 21 | w.dispatch(cbTerminate, nil) 22 | 23 | w.run() 24 | w.destroy() 25 | -------------------------------------------------------------------------------- /webview.nimble: -------------------------------------------------------------------------------- 1 | # Package 2 | 3 | version = "0.4.0" 4 | author = "neroist" 5 | description = "Webview bindings for Nim" 6 | license = "MIT" 7 | installFiles = @["webview.nim"] 8 | installDirs = @["libs"] 9 | 10 | 11 | # Tasks 12 | 13 | after install: 14 | when defined(linux) or defined(bsd): 15 | echo "" 16 | echo "This package requires some external dependencies." 17 | echo "" 18 | echo "If you're on a Debian-based system, install" 19 | echo " libgtk-3-dev" 20 | echo " libwebkit2gtk-4.0-dev" 21 | echo "If you're on a Fedora-based system, install" 22 | echo " gtk3-devel" 23 | echo " webkit2gtk4.0-devel" 24 | echo "If you're using a BSD system, install" 25 | echo " webkit2-gtk3" 26 | 27 | # Dependencies 28 | 29 | requires "nim >= 1.0.0" 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2023 neroist 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the “Software”), to deal in the 5 | Software without restriction, including without limitation the rights to use, copy, 6 | modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 7 | and to permit persons to whom the Software is furnished to do so, subject to the 8 | following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 14 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 15 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 16 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 17 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /tests/test_go_test.nim: -------------------------------------------------------------------------------- 1 | # See https://github.com/webview/webview/blob/master/webview_test.go 2 | 3 | import std/unittest 4 | import std/json 5 | 6 | import webview 7 | 8 | proc example() = 9 | let w = newWebview(true) 10 | 11 | w.setTitle("Hello") 12 | 13 | w.bind("noop") do (seq: string, req: JsonNode) -> string: 14 | echo "hello" 15 | return "\"hello\"" # need quotes so JS thinks its a string, not an identifier 16 | 17 | w.bind("add") do (seq: string, req: JsonNode) -> string: 18 | return $(req[0].getInt() + req[1].getInt()) 19 | 20 | w.bind("quit") do (seq: string, req: JsonNode) -> string: 21 | discard w.terminate() 22 | 23 | w.setHtml(): 24 | cstring """ 25 | 26 | 27 | hello 28 | 29 | 44 | 45 | """ 46 | 47 | w.run() 48 | w.destroy() 49 | 50 | test "Golang webview test": 51 | example() 52 | -------------------------------------------------------------------------------- /libs/webview2/EventToken.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* this ALWAYS GENERATED file contains the definitions for the interfaces */ 4 | 5 | 6 | /* File created by MIDL compiler version 8.01.0622 */ 7 | /* @@MIDL_FILE_HEADING( ) */ 8 | 9 | 10 | 11 | /* verify that the version is high enough to compile this file*/ 12 | #ifndef __REQUIRED_RPCNDR_H_VERSION__ 13 | #define __REQUIRED_RPCNDR_H_VERSION__ 500 14 | #endif 15 | 16 | /* verify that the version is high enough to compile this file*/ 17 | #ifndef __REQUIRED_RPCSAL_H_VERSION__ 18 | #define __REQUIRED_RPCSAL_H_VERSION__ 100 19 | #endif 20 | 21 | #include "rpc.h" 22 | #include "rpcndr.h" 23 | 24 | #ifndef __RPCNDR_H_VERSION__ 25 | #error this stub requires an updated version of 26 | #endif /* __RPCNDR_H_VERSION__ */ 27 | 28 | 29 | #ifndef __eventtoken_h__ 30 | #define __eventtoken_h__ 31 | 32 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) 33 | #pragma once 34 | #endif 35 | 36 | /* Forward Declarations */ 37 | 38 | #ifdef __cplusplus 39 | extern "C"{ 40 | #endif 41 | 42 | 43 | /* interface __MIDL_itf_eventtoken_0000_0000 */ 44 | /* [local] */ 45 | 46 | // Microsoft Windows 47 | // Copyright (c) Microsoft Corporation. All rights reserved. 48 | #pragma once 49 | typedef struct EventRegistrationToken 50 | { 51 | __int64 value; 52 | } EventRegistrationToken; 53 | 54 | 55 | 56 | extern RPC_IF_HANDLE __MIDL_itf_eventtoken_0000_0000_v0_0_c_ifspec; 57 | extern RPC_IF_HANDLE __MIDL_itf_eventtoken_0000_0000_v0_0_s_ifspec; 58 | 59 | /* Additional Prototypes for ALL interfaces */ 60 | 61 | /* end of Additional Prototypes */ 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | #endif 68 | 69 | 70 | -------------------------------------------------------------------------------- /examples/bind.nim: -------------------------------------------------------------------------------- 1 | import std/strutils 2 | import std/json 3 | import std/os 4 | 5 | import webview 6 | 7 | const html = """ 8 | 9 | 11 | 12 |
13 | 14 | 15 | Counter: 0 16 |
17 |
18 |
19 | 20 | Result: (not started) 21 |
22 | 42 | 43 | 44 | """ 45 | 46 | proc threadFunc(res: var string) {.thread.} = 47 | sleep 1000 48 | res = "42" 49 | 50 | proc main = 51 | let w = newWebview() 52 | var count: int 53 | 54 | if w == nil: 55 | echo "Failed to create webview." 56 | quit 1 57 | 58 | w.title = "Bind Example" 59 | w.size = (480, 320) 60 | 61 | w.bind("count") do (_: string; req: JsonNode) -> string: 62 | let dir = req[0].getInt() 63 | inc count, dir 64 | 65 | return $count 66 | 67 | w.bind("compute") do (_: string; req: JsonNode) -> string: 68 | # TODO 69 | result = "42" 70 | 71 | w.html = html 72 | 73 | w.run() 74 | w.destroy() 75 | 76 | main() 77 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Webview 2 | 3 | Webview is a wrapper for [Webview](https://github.com/webview/webview), a tiny 4 | cross-platform webview library for C/C++ to build modern cross-platform GUIs. 5 | Webview (the wrapper) supports two-way JavaScript bindings, to call JavaScript from 6 | Nim and to call Nim from JavaScript. 7 | 8 | Webview is also an updated wrapper for [Webview](https://github.com/webview/webview) 9 | for Nim than [oskca's bindings](https://github.com/oskca/webview), which were last 10 | updated 5 years ago and are severely out of date. 11 | 12 | ## Binding Features 13 | 14 | Similar to [`uing`](https://github.com/neroist/uing), you can also choose to 15 | whether or not compile with a DLL, static library, or to statically compile Webview 16 | sources into your executable. 17 | 18 | To compile with a DLL, pass `-d:useWebviewDll` to the Nim compiler. You can also 19 | choose the name/path of the DLL with `-d:webviewDll:`. 20 | 21 | To compile with a static library, compile with `-d:useWebviewStaticLib` or 22 | `-d:useWebviewStaticLibrary`. Similarly, you can also 23 | choose the name/path of the static library with `-d:webviewStaticLibrary:`. 24 | 25 | ## Documentation 26 | 27 | Documentation is available at 28 | 29 | ### Examples 30 | 31 | Examples can be found at [`examples/`](examples/). Currently, it contains two 32 | examples, `basic.nim`, a basic example of Webview, and `bind.nim`, an example of 33 | calling Nim from Javascript with Webview. In addition, it also has an [example 34 | application](examples/example_application) in the structure described 35 | [here](https://github.com/webview/webview#app-distribution). 36 | 37 | Here's [`basic.nim`](examples/basic.nim) for you: 38 | 39 | ```nim 40 | import webview 41 | 42 | let w = newWebview() # or you can use create() 43 | 44 | w.title = "Basic Example" # or use setTitle() 45 | w.size = (480, 320) # or setSize() 46 | w.html = "Thanks for using webview!" # or setHtml() 47 | 48 | w.run() 49 | w.destroy() 50 | ``` 51 | 52 | ## Installation 53 | 54 | Install via Nimble: 55 | 56 | ```shell 57 | nimble install https://github.com/neroist/webview 58 | ``` 59 | 60 | This package isn't in Nimble's package list, so you have to install via GitHub link. 61 | 62 | ## Requirements 63 | 64 | On Windows, Webview requires that developers and end-users must have the 65 | [WebView2 runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) 66 | installed on their system for any version of Windows before Windows 11. The 67 | WebView2 SDK is installed for you, so no need to worry about that. 68 | 69 | On Linux and BSD, Only [GTK3](https://docs.gtk.org/gtk3/) and 70 | [WebKitGTK](https://webkitgtk.org/) are required for both development and distribution. 71 | See [here](https://github.com/webview/webview#linux-and-bsd). 72 | 73 | ## Distribution 74 | 75 | See [here](https://github.com/webview/webview#app-distribution) in Webview's README. 76 | -------------------------------------------------------------------------------- /tests/test_sync_bind.nim: -------------------------------------------------------------------------------- 1 | import std/unittest 2 | import std/json 3 | 4 | import webview 5 | 6 | test "test synchronous binding and unbinding. (low-level)": 7 | var number: int 8 | 9 | let w = newWebview() 10 | 11 | proc test(seq: cstring, req: cstring, arg: pointer) {.cdecl.} = 12 | proc increment(_: cstring, _: cstring, _: pointer) {.cdecl.} = 13 | inc number 14 | 15 | # Bind and increment number. 16 | if req == "[0]": 17 | check number == 0 18 | w.webviewBind("increment", increment) 19 | 20 | w.eval "(() => {try{window.increment()}catch{}window.test(1)})()" 21 | 22 | # Unbind and make sure that we cannot increment even if we try. 23 | if req == "[1]": 24 | check number == 1 25 | w.unbind("increment") 26 | 27 | w.eval "(() => {try{window.increment()}catch{}window.test(2)})()" 28 | 29 | # Number should not have changed but we can bind again and change the number. 30 | if req == "[2]": 31 | check number == 1 32 | w.webviewBind("increment", increment) 33 | 34 | w.eval "(() => {try{window.increment()}catch{}window.test(3)})()" 35 | 36 | # finish test 37 | if req == "[3]": 38 | check number == 2 39 | 40 | w.terminate() 41 | 42 | const html = """ 43 | 46 | """ 47 | 48 | # Attempting to remove non-existing binding is OK 49 | w.unbind("test") 50 | w.webviewBind("test", test) 51 | 52 | # Attempting to bind multiple times only binds once 53 | w.webviewBind("test", test) 54 | 55 | w.setHtml(html) 56 | 57 | w.run() 58 | w.destroy() 59 | 60 | test "test synchronous binding and unbinding. (high-level)": 61 | var number: int 62 | 63 | let w = newWebview() 64 | 65 | proc test(_: string, req: JsonNode): string = 66 | proc increment(_: string, _: JsonNode): string = 67 | inc number 68 | 69 | let arg = req[0].getInt() 70 | 71 | case arg 72 | of 0: 73 | # Bind and increment number. 74 | check number == 0 75 | w.bind("increment", increment) 76 | 77 | w.eval "(() => {try{window.increment()}catch{}window.test(1)})()" 78 | of 1: 79 | # Unbind and make sure that we cannot increment even if we try. 80 | check number == 1 81 | w.unbind("increment") 82 | 83 | w.eval "(() => {try{window.increment()}catch{}window.test(2)})()" 84 | of 2: 85 | # Number should not have changed but we can bind again and change the number. 86 | check number == 1 87 | w.bind("increment", increment) 88 | 89 | w.eval "(() => {try{window.increment()}catch{}window.test(3)})()" 90 | else: # will be 3 91 | # finish test 92 | check number == 2 93 | w.terminate() 94 | 95 | return 96 | 97 | const html = """ 98 | 101 | """ 102 | 103 | # Attempting to remove non-existing binding is OK 104 | w.unbind("test") 105 | w.bind("test", test) 106 | 107 | # Attempting to bind multiple times only binds once 108 | w.bind("test", test) 109 | 110 | w.html = html 111 | 112 | w.run() 113 | w.destroy() 114 | -------------------------------------------------------------------------------- /docs/webview.idx: -------------------------------------------------------------------------------- 1 | nimTitle webview index.html module webview 0 2 | nim WEBVIEW_VERSION_MAJOR index.html#WEBVIEW_VERSION_MAJOR const WEBVIEW_VERSION_MAJOR 89 3 | nim WEBVIEW_VERSION_MINOR index.html#WEBVIEW_VERSION_MINOR const WEBVIEW_VERSION_MINOR 90 4 | nim WEBVIEW_VERSION_PATCH index.html#WEBVIEW_VERSION_PATCH const WEBVIEW_VERSION_PATCH 91 5 | nim WEBVIEW_VERSION_PRE_RELEASE index.html#WEBVIEW_VERSION_PRE_RELEASE const WEBVIEW_VERSION_PRE_RELEASE 92 6 | nim WEBVIEW_VERSION_BUILD_METADATA index.html#WEBVIEW_VERSION_BUILD_METADATA const WEBVIEW_VERSION_BUILD_METADATA 93 7 | nim WEBVIEW_VERSION_NUMBER index.html#WEBVIEW_VERSION_NUMBER const WEBVIEW_VERSION_NUMBER 94 8 | nim WebviewVersion index.html#WebviewVersion object WebviewVersion 100 9 | nim WebviewVersionInfo index.html#WebviewVersionInfo object WebviewVersionInfo 105 10 | nim Webview index.html#Webview type Webview 121 11 | nim WebviewNativeHandleKindUiWindow index.html#WebviewNativeHandleKindUiWindow WebviewNativeHandleKind.WebviewNativeHandleKindUiWindow 124 12 | nim WebviewNativeHandleKindUiWidget index.html#WebviewNativeHandleKindUiWidget WebviewNativeHandleKind.WebviewNativeHandleKindUiWidget 124 13 | nim WebviewNativeHandleKindBrowserController index.html#WebviewNativeHandleKindBrowserController WebviewNativeHandleKind.WebviewNativeHandleKindBrowserController 124 14 | nim WebviewNativeHandleKind index.html#WebviewNativeHandleKind enum WebviewNativeHandleKind 124 15 | nim WebviewHintNone index.html#WebviewHintNone WebviewHint.WebviewHintNone 140 16 | nim WebviewHintMin index.html#WebviewHintMin WebviewHint.WebviewHintMin 140 17 | nim WebviewHintMax index.html#WebviewHintMax WebviewHint.WebviewHintMax 140 18 | nim WebviewHintFixed index.html#WebviewHintFixed WebviewHint.WebviewHintFixed 140 19 | nim WebviewHint index.html#WebviewHint enum WebviewHint 140 20 | nim WebviewErrorMissingDependency index.html#WebviewErrorMissingDependency WebviewError.WebviewErrorMissingDependency 155 21 | nim WebviewErrorCanceled index.html#WebviewErrorCanceled WebviewError.WebviewErrorCanceled 155 22 | nim WebviewErrorInvalidState index.html#WebviewErrorInvalidState WebviewError.WebviewErrorInvalidState 155 23 | nim WebviewErrorInvalidArgument index.html#WebviewErrorInvalidArgument WebviewError.WebviewErrorInvalidArgument 155 24 | nim WebviewErrorUnspecified index.html#WebviewErrorUnspecified WebviewError.WebviewErrorUnspecified 155 25 | nim WebviewErrorOk index.html#WebviewErrorOk WebviewError.WebviewErrorOk 155 26 | nim WebviewErrorDuplicate index.html#WebviewErrorDuplicate WebviewError.WebviewErrorDuplicate 155 27 | nim WebviewErrorNotFound index.html#WebviewErrorNotFound WebviewError.WebviewErrorNotFound 155 28 | nim WebviewError index.html#WebviewError enum WebviewError 155 29 | nim wnhkUiWindow index.html#wnhkUiWindow const wnhkUiWindow 194 30 | nim wnhkUiWidget index.html#wnhkUiWidget const wnhkUiWidget 195 31 | nim wnhkController index.html#wnhkController const wnhkController 196 32 | nim whNone index.html#whNone const whNone 198 33 | nim whMin index.html#whMin const whMin 199 34 | nim whMax index.html#whMax const whMax 200 35 | nim whFixed index.html#whFixed const whFixed 201 36 | nim weMissingDependency index.html#weMissingDependency const weMissingDependency 203 37 | nim weCanceled index.html#weCanceled const weCanceled 204 38 | nim weInvalidState index.html#weInvalidState const weInvalidState 205 39 | nim weInvalidArgument index.html#weInvalidArgument const weInvalidArgument 206 40 | nim weUnspecified index.html#weUnspecified const weUnspecified 207 41 | nim weOk index.html#weOk const weOk 208 42 | nim weDuplicate index.html#weDuplicate const weDuplicate 209 43 | nim weNotFound index.html#weNotFound const weNotFound 210 44 | nim create index.html#create,cint,pointer proc create(debug: cint = cint isDebug; window: pointer = nil): Webview 212 45 | nim destroy index.html#destroy,Webview proc destroy(w: Webview): WebviewError 239 46 | nim run index.html#run,Webview proc run(w: Webview): WebviewError 244 47 | nim terminate index.html#terminate,Webview proc terminate(w: Webview): WebviewError 249 48 | nim dispatch index.html#dispatch,Webview,proc(Webview,pointer),pointer proc dispatch(w: Webview; fn: proc (w: Webview; arg: pointer) {.cdecl.};\n arg: pointer = nil): WebviewError 255 49 | nim getWindow index.html#getWindow,Webview proc getWindow(w: Webview): pointer 265 50 | nim getNativeHandle index.html#getNativeHandle,Webview,WebviewNativeHandleKind proc getNativeHandle(w: Webview; kind: WebviewNativeHandleKind): pointer 274 51 | nim setTitle index.html#setTitle,Webview,cstring proc setTitle(w: Webview; title: cstring): WebviewError 282 52 | nim setSize index.html#setSize,Webview,cint,cint,WebviewHint proc setSize(w: Webview; width: cint; height: cint;\n hints: WebviewHint = WEBVIEW_HINT_NONE): WebviewError 289 53 | nim navigate index.html#navigate,Webview,cstring proc navigate(w: Webview; url: cstring): WebviewError 299 54 | nim setHtml index.html#setHtml,Webview,cstring proc setHtml(w: Webview; html: cstring): WebviewError 313 55 | nim init index.html#init,Webview,cstring proc init(w: Webview; js: cstring): WebviewError 325 56 | nim eval index.html#eval,Webview,cstring proc eval(w: Webview; js: cstring): WebviewError 332 57 | nim webviewBind index.html#webviewBind,Webview,cstring,proc(cstring,cstring,pointer),pointer proc webviewBind(w: Webview; name: cstring;\n fn: proc (id: cstring; req: cstring; arg: pointer) {.cdecl.};\n arg: pointer = nil): WebviewError 340 58 | nim unbind index.html#unbind,Webview,cstring proc unbind(w: Webview; name: cstring): WebviewError 357 59 | nim webviewReturn index.html#webviewReturn,Webview,cstring,cint,cstring proc webviewReturn(w: Webview; seq: cstring; status: cint; result: cstring): WebviewError 366 60 | nim webviewVersion index.html#webviewVersion_2 proc webviewVersion(): ptr WebviewVersionInfo 379 61 | nim version index.html#version proc version(): WebviewVersionInfo 390 62 | nim bindCallback index.html#bindCallback,Webview,string,proc(string,JsonNode) proc bindCallback(w: Webview; name: string;\n fn: proc (id: string; req: JsonNode): string): WebviewError 408 63 | nim `bind` index.html#bind,Webview,string,proc(string,JsonNode) proc `bind`(w: Webview; name: string; fn: proc (id: string; req: JsonNode): string): WebviewError 419 64 | nim setSize index.html#setSize,Webview,int,int,WebviewHint proc setSize(w: Webview; width: int; height: int;\n hints: WebviewHint = WebviewHintNone): WebviewError 426 65 | nim html= index.html#html=,Webview,string proc html=(w: Webview; html: string): WebviewError 432 66 | nim size= index.html#size=,Webview,tuple[int,int] proc size=(w: Webview; size: tuple[width: int, height: int]): WebviewError 442 67 | nim title= index.html#title=,Webview,string proc title=(w: Webview; title: string): WebviewError 447 68 | nim newWebview index.html#newWebview,bool,pointer proc newWebview(debug: bool = isDebug; window: pointer = nil): Webview 452 69 | nimgrp setsize index.html#setSize-procs-all proc 289 70 | -------------------------------------------------------------------------------- /webview.nim: -------------------------------------------------------------------------------- 1 | ## Wrapper for `Webview `_. 2 | 3 | import std/json 4 | import std/os 5 | 6 | const 7 | libs = currentSourcePath().parentDir() / "libs" 8 | # webview = libs / "webview" 9 | webview2Include {.used.} = libs / "webview2" 10 | isDebug = not (defined(release) or defined(danger)) 11 | 12 | when defined(useWebviewDll): 13 | const webviewDll* {.strdefine.} = 14 | when defined(windows): 15 | "webview.dll" 16 | elif defined(macos): 17 | "libwebview.dynlib" 18 | else: 19 | "libwebview.so" 20 | 21 | {.pragma: webview, dynlib: webviewDll, discardable.} 22 | 23 | elif defined(useWebviewStaticLib) or defined(useWebviewStaticLibrary): 24 | const webviewStaticLibrary* {.strdefine.} = 25 | when defined(windows): #? vcc 26 | "webview.lib" 27 | else: 28 | "libwebview.a" 29 | 30 | {.passL: webviewStaticLibrary.} 31 | {.pragma: webview, discardable.} 32 | 33 | else: 34 | {.passC: "-DWEBVIEW_STATIC".} 35 | 36 | when defined(windows) or defined(webviewEdge): 37 | {.passC: "-DWEBVIEW_EDGE".} 38 | 39 | when defined(vcc): 40 | {.passC: "/std:c++17".} 41 | {.passC: "/wd4005".} # disable warning C4005: 'WIN32_LEAN_AND_MEAN': macro redefinition 42 | {.passC: "/EHsc".} 43 | 44 | {.link: "advapi32.lib".} 45 | {.link: "ole32.lib".} 46 | {.link: "shell32.lib".} 47 | {.link: "shlwapi.lib".} 48 | {.link: "user32.lib".} 49 | {.link: "version.lib".} 50 | 51 | {.passC: "/I " & webview2Include.} 52 | 53 | elif defined(windows): 54 | {.passC: "-I" & webview2Include.} 55 | {.passL: "-mwindows".} 56 | 57 | when defined(gcc): 58 | {.passC: "-std=c++17".} 59 | 60 | when not defined(clang): # gives warning on clang 61 | {.passL: "-lstdc++".} 62 | 63 | {.passL: "-ladvapi32".} 64 | {.passL: "-lole32".} 65 | {.passL: "-lshell32".} 66 | {.passL: "-lshlwapi".} 67 | {.passL: "-luser32".} 68 | {.passL: "-lversion".} 69 | {.passL: "-static".} 70 | else: 71 | when defined(cpp): 72 | {.passC: "-std=c++11".} 73 | 74 | when defined(macosx) or defined(macos) or defined(webviewCocoa): 75 | {.passC: "-DWEBVIEW_COCOA".} 76 | 77 | {.passL: "-framework WebKit".} 78 | 79 | when defined(linux) or defined(bsd) or defined(webviewGtk): 80 | {.passC: "-DWEBVIEW_GTK".} 81 | 82 | {.passL: staticExec"pkg-config --libs gtk+-3.0 webkit2gtk-4.0".} 83 | {.passC: staticExec"pkg-config --cflags gtk+-3.0 webkit2gtk-4.0".} 84 | 85 | {.compile: libs / "webview" / "webview.cc".} 86 | {.pragma: webview, discardable.} 87 | 88 | const 89 | WEBVIEW_VERSION_MAJOR* = 0 ## The current library major version. 90 | WEBVIEW_VERSION_MINOR* = 11 ## The current library minor version. 91 | WEBVIEW_VERSION_PATCH* = 0 ## The current library patch version. 92 | WEBVIEW_VERSION_PRE_RELEASE* = "" ## SemVer 2.0.0 pre-release labels prefixed with "-". 93 | WEBVIEW_VERSION_BUILD_METADATA* = "" ## SemVer 2.0.0 build metadata prefixed with "+". 94 | WEBVIEW_VERSION_NUMBER* = $WEBVIEW_VERSION_MAJOR & 95 | '.' & $WEBVIEW_VERSION_MINOR & 96 | '.' & $WEBVIEW_VERSION_PATCH ## \ 97 | ## SemVer 2.0.0 version number in MAJOR.MINOR.PATCH format. 98 | 99 | type 100 | WebviewVersion* {.bycopy.} = object 101 | ## Holds the elements of a MAJOR.MINOR.PATCH version number. 102 | 103 | major*, minor*, patch*: cuint 104 | 105 | WebviewVersionInfo* {.bycopy.} = object 106 | ## Holds the library's version information. 107 | 108 | version*: WebviewVersion 109 | ## The elements of the version number. 110 | 111 | versionNumber*: array[32, char] 112 | ## SemVer 2.0.0 version number in `MAJOR.MINOR.PATCH` format. 113 | 114 | preRelease*: array[48, char] 115 | ## SemVer 2.0.0 pre-release labels prefixed with "-" if specified, otherwise 116 | ## an empty string. 117 | 118 | buildMetadata*: array[48, char] 119 | ## SemVer 2.0.0 build metadata prefixed with "+", otherwise an empty string. 120 | 121 | Webview* = pointer 122 | ## Pointer to a webview instance. 123 | 124 | WebviewNativeHandleKind* = enum 125 | ## Native handle kind. The actual type depends on the backend. 126 | 127 | WebviewNativeHandleKindUiWindow 128 | ## Top-level window. `GtkWindow` pointer (GTK), `NSWindow` pointer (Cocoa) 129 | ## or `HWND` (Win32). 130 | 131 | WebviewNativeHandleKindUiWidget 132 | ## Browser widget. `GtkWidget` pointer (GTK), `NSView` pointer (Cocoa) or 133 | ## `HWND` (Win32). 134 | 135 | WebviewNativeHandleKindBrowserController 136 | ## Browser controller. `WebKitWebView` pointer (WebKitGTK), `WKWebView` 137 | ## pointer (Cocoa/WebKit) or `ICoreWebView2Controller` pointer 138 | ## (Win32/WebView2). 139 | 140 | WebviewHint* = enum 141 | ## Window size hints 142 | 143 | WebviewHintNone 144 | ## Width and height are default size. 145 | 146 | WebviewHintMin 147 | ## Width and height are minimum bounds. 148 | 149 | WebviewHintMax 150 | ## Width and height are maximum bounds. 151 | 152 | WebviewHintFixed 153 | ## Window size can not be changed by a user. 154 | 155 | WebviewError* = enum 156 | ## Error codes returned to callers of the API. 157 | ## 158 | ## The following codes are commonly used in the library: 159 | ## - `WebviewErrorOk` 160 | ## - `WebviewErrorUnspecified` 161 | ## - `WebviewErrorInvalidArgument` 162 | ## - `WebviewErrorInvalidState` 163 | ## 164 | ## With the exception of `WebviewErrorOk` which is normally expected, 165 | ## the other common codes do not normally need to be handled specifically. 166 | ## Refer to specific functions regarding handling of other codes. 167 | 168 | WebviewErrorMissingDependency = -5 169 | ## Missing dependency. 170 | 171 | WebviewErrorCanceled = -4 172 | ## Operation canceled. 173 | 174 | WebviewErrorInvalidState = -3 175 | ## Invalid state detected. 176 | 177 | WebviewErrorInvalidArgument = -2 178 | ## One or more invalid arguments have been specified e.g. in a function call. 179 | 180 | WebviewErrorUnspecified = -1 181 | ## An unspecified error occurred. A more specific error code may be needed. 182 | 183 | WebviewErrorOk = 0 184 | ## OK/Success. Functions that return error codes will typically return this 185 | ## to signify successful operations. 186 | 187 | WebviewErrorDuplicate = 1 188 | ## Signifies that something already exists. 189 | 190 | WebviewErrorNotFound = 2 191 | ## Signifies that something does not exist. 192 | 193 | const 194 | wnhkUiWindow* = WebviewNativeHandleKindUiWindow 195 | wnhkUiWidget* = WebviewNativeHandleKindUiWidget 196 | wnhkController* = WebviewNativeHandleKindBrowserController 197 | 198 | whNone* = WebviewHintNone 199 | whMin* = WebviewHintMin 200 | whMax* = WebviewHintMax 201 | whFixed* = WebviewHintFixed 202 | 203 | weMissingDependency* = WebviewErrorMissingDependency 204 | weCanceled* = WebviewErrorCanceled 205 | weInvalidState* = WebviewErrorInvalidState 206 | weInvalidArgument* = WebviewErrorInvalidArgument 207 | weUnspecified* = WebviewErrorUnspecified 208 | weOk* = WebviewErrorOk 209 | weDuplicate* = WebviewErrorDuplicate 210 | weNotFound* = WebviewErrorNotFound 211 | 212 | proc create*(debug: cint = cint isDebug; 213 | window: pointer = nil): Webview {.cdecl, importc: "webview_create", webview.} 214 | ## Creates a new webview instance. 215 | ## 216 | ## :debug: Enable developer tools if supported by the backend. 217 | ## :window: Optional native window handle, i.e. `GtkWindow` pointer 218 | ## `NSWindow` pointer (Cocoa) or `HWND` (Win32). If non-nil, 219 | ## the webview widget is embedded into the given window, and the 220 | ## caller is expected to assume responsibility for the window as 221 | ## well as application lifecycle. If the window handle is nil, 222 | ## a new window is created and both the window and application 223 | ## lifecycle are managed by the webview instance. 224 | ## 225 | ## .. note:: Win32: The function also accepts a pointer to `HWND` (Win32) in the 226 | ## window parameter for backward compatibility. 227 | ## 228 | ## .. note:: Win32/WebView2: `CoInitializeEx` should be called with 229 | ## `COINIT_APARTMENTTHREADED` before attempting to call this function 230 | ## with an existing window. Omitting this step may cause WebView2 231 | ## initialization to fail. 232 | ## 233 | ## :return: `nil` on failure. Creation can fail for various reasons such 234 | ## as when required runtime dependencies are missing or when window 235 | ## creation fails. 236 | ## :retval: `WEBVIEW_ERROR_MISSING_DEPENDENCY` 237 | ## May be returned if WebView2 is unavailable on Windows. 238 | 239 | proc destroy*(w: Webview): WebviewError {.cdecl, importc: "webview_destroy", webview.} 240 | ## Destroys a webview and closes the native window. 241 | ## 242 | ## :w: The webview instance. 243 | 244 | proc run*(w: Webview): WebviewError {.cdecl, importc: "webview_run", webview.} 245 | ## Runs the main loop until it's terminated. 246 | ## 247 | ## :w: The webview instance. 248 | 249 | proc terminate*(w: Webview): WebviewError {.cdecl, importc: "webview_terminate", webview.} 250 | ## Stops the main loop. It is safe to call this function from another other 251 | ## background thread. 252 | ## 253 | ## :w: The webview instance. 254 | 255 | proc dispatch*(w: Webview; fn: proc (w: Webview; arg: pointer) {.cdecl.}; 256 | arg: pointer = nil): WebviewError {.cdecl, importc: "webview_dispatch", 257 | webview.} 258 | ## Schedules a function to be invoked on the thread with the run/event loop. 259 | ## Use this function e.g. to interact with the library or native handles. 260 | ## 261 | ## :w: The webview instance. 262 | ## :fn: The function to be invoked. 263 | ## :arg: An optional argument passed along to the callback function. 264 | 265 | proc getWindow*(w: Webview): pointer {.cdecl, importc: "webview_get_window", 266 | webview.} 267 | ## Returns the native handle of the window associated with the webview instance. 268 | ## The handle can be a `GtkWindow` pointer (GTK), `NSWindow` pointer (Cocoa) 269 | ## or `HWND` (Win32). 270 | ## 271 | ## :w: The webview instance. 272 | ## :return: The handle of the native window. 273 | 274 | proc getNativeHandle*(w: Webview, kind: WebviewNativeHandleKind): pointer {.cdecl, importc: "webview_get_native_handle", 275 | webview.} 276 | ## Get a native handle of choice. 277 | ## 278 | ## :w: The webview instance. 279 | ## :kind: The kind of handle to retrieve. 280 | ## :return: The native handle or `nil`. 281 | 282 | proc setTitle*(w: Webview; title: cstring): WebviewError {.cdecl, 283 | importc: "webview_set_title", webview.} 284 | ## Updates the title of the native window. 285 | ## 286 | ## :w: The webview instance. 287 | ## :title: The new title. 288 | 289 | proc setSize*(w: Webview; width: cint; height: cint; 290 | hints: WebviewHint = WEBVIEW_HINT_NONE): WebviewError {.cdecl, 291 | importc: "webview_set_size", webview.} 292 | ## Updates the size of the native window. 293 | ## 294 | ## :w: The webview instance. 295 | ## :width: New width. 296 | ## :height: New height. 297 | ## :hints: Size hints. 298 | 299 | proc navigate*(w: Webview; url: cstring): WebviewError {.cdecl, 300 | importc: "webview_navigate", webview.} = 301 | ## Navigates webview to the given URL. URL may be a properly encoded data URI. 302 | ## 303 | ## :w: The webview instance. 304 | ## :url: URL. 305 | 306 | runnableExamples: 307 | let w = newWebview() 308 | 309 | w.navigate("https://github.com/webview/webview") 310 | w.navigate("data:text/html,%3Ch1%3EHello%3C%2Fh1%3E") 311 | w.navigate("data:text/html;base64,PGgxPkhlbGxvPC9oMT4=") 312 | 313 | proc setHtml*(w: Webview; html: cstring): WebviewError {.cdecl, 314 | importc: "webview_set_html", webview.} = 315 | ## Load HTML content into the webview. 316 | ## 317 | ## :w: The webview instance. 318 | ## :html: HTML content. 319 | 320 | runnableExamples: 321 | let w = newWebview() 322 | 323 | w.setHtml("

Hello

") 324 | 325 | proc init*(w: Webview; js: cstring): WebviewError {.cdecl, importc: "webview_init", webview.} 326 | ## Injects JavaScript code to be executed immediately upon loading a page. 327 | ## The code will be executed before `window.onload`. 328 | ## 329 | ## :w: The webview instance. 330 | ## :js: JS content. 331 | 332 | proc eval*(w: Webview; js: cstring): WebviewError {.cdecl, importc: "webview_eval", webview.} 333 | ## Evaluates arbitrary JavaScript code. 334 | ## 335 | ## Use bindings if you need to communicate the result of the evaluation. 336 | ## 337 | ## :w: The webview instance. 338 | ## :js: JS content. 339 | 340 | proc webviewBind*(w: Webview; name: cstring; 341 | fn: proc (id: cstring; req: cstring; arg: pointer) {.cdecl.}; 342 | arg: pointer = nil): WebviewError {.cdecl, importc: "webview_bind", webview.} 343 | ## Binds a function pointer to a new global JavaScript function. 344 | ## 345 | ## Internally, JS glue code is injected to create the JS function by the 346 | ## given name. The callback function is passed a request identifier, 347 | ## a request string and a user-provided argument. The request string is 348 | ## a JSON array of the arguments passed to the JS function. 349 | ## 350 | ## :w: The webview instance. 351 | ## :name: Name of the JS function. 352 | ## :fn: Callback function. 353 | ## :arg: User argument. 354 | ## :retval: `WEBVIEW_ERROR_DUPLICATE` 355 | ## A binding already exists with the specified name. 356 | 357 | proc unbind*(w: Webview; name: cstring): WebviewError {.cdecl, 358 | importc: "webview_unbind", webview.} 359 | ## Removes a binding created with webview_bind(). 360 | ## 361 | ## :w: The webview instance. 362 | ## :name: Name of the binding. 363 | ## :retval: `WEBVIEW_ERROR_NOT_FOUND` 364 | ## No binding exists with the specified name. 365 | 366 | proc webviewReturn*(w: Webview; seq: cstring; status: cint; 367 | result: cstring): WebviewError {.cdecl, importc: "webview_return", webview.} 368 | ## Responds to a binding call from the JS side. 369 | ## 370 | ## :w: The webview instance. 371 | ## :id: The identifier of the binding call. Pass along the value received 372 | ## in the binding handler (see `webviewBind()`_). 373 | ## :status: A status of zero tells the JS side that the binding call was 374 | ## succesful; any other value indicates an error. 375 | ## :result: The result of the binding call to be returned to the JS side. 376 | ## This must either be a valid JSON value or an empty string for 377 | ## the primitive JS value `undefined`. 378 | 379 | proc webviewVersion*(): ptr WebviewVersionInfo {.cdecl, 380 | importc: "webview_version", webview.} 381 | ## Get the library's version information. 382 | 383 | # ------------------- 384 | 385 | type 386 | CallBackContext = ref object 387 | w: Webview 388 | fn: proc (id: string; req: JsonNode): string 389 | 390 | proc version*(): WebviewVersionInfo {.inline, deprecated: "Useless. use `webviewVersion()`_ instead".} = webviewVersion()[] 391 | ## Dereferenced version of `webviewVersion() <#webviewVersion>`_. 392 | ## 393 | ## Same as `webviewVersion()[]`. 394 | 395 | proc closure(id: cstring; req: cstring; arg: pointer) {.cdecl.} = 396 | var err: cint 397 | let ctx = cast[CallBackContext](arg) 398 | 399 | let res = 400 | try: 401 | ctx.fn($id, parseJson($req)) 402 | except CatchableError: 403 | err = -1 404 | $ %* getCurrentExceptionMsg() 405 | 406 | webviewReturn(ctx.w, id, err, cstring res) 407 | 408 | proc bindCallback*(w: Webview; name: string; 409 | fn: proc (id: string; req: JsonNode): string): WebviewError {.discardable.} = 410 | ## Essentially a high-level version of 411 | ## `webviewBind <#webviewBind,Webview,cstring,proc(cstring,cstring,pointer),pointer>`_ 412 | 413 | # using global seems to work... 414 | # TODO is there a better solution? 415 | let arg {.global.} = CallBackContext(w: w, fn: fn) 416 | 417 | result = w.webviewBind(name, closure, cast[pointer](arg)) 418 | 419 | proc `bind`*(w: Webview; name: string; 420 | fn: proc (id: string; req: JsonNode): string): WebviewError {.inline, discardable.} = 421 | ## Alias of 422 | ## `bindCallback() <#bindCallback,Webview,string,proc(string,JsonNode)>`_ 423 | 424 | w.bindCallback(name, fn) 425 | 426 | proc setSize*(w: Webview; width: int; height: int; 427 | hints: WebviewHint = WebviewHintNone): WebviewError {.inline, discardable.} = 428 | ## Alias of `setSize()`_ with `int` instead of `cint` 429 | 430 | w.setSize(cint width, cint height, hints) 431 | 432 | proc `html=`*(w: Webview; html: string): WebviewError {.inline, discardable.} = 433 | ## Setter alias for `setHtml()`_. 434 | 435 | runnableExamples: 436 | let w = newWebview() 437 | 438 | w.html = "

Hello

" 439 | 440 | w.setHtml(cstring html) 441 | 442 | proc `size=`*(w: Webview; size: tuple[width: int; height: int]): WebviewError {.inline, discardable.} = 443 | ## Setter alias for `setSize()`. `hints` default to `WEBVIEW_HINT_NONE`. 444 | 445 | w.setSize(cint size.width, cint size.height, WEBVIEW_HINT_NONE) 446 | 447 | proc `title=`*(w: Webview; title: string): WebviewError {.inline, discardable.} = 448 | ## Setter alias for `setTitle()`. 449 | 450 | w.setTitle(title) 451 | 452 | proc newWebview*(debug: bool = isDebug; window: pointer = nil): Webview {.inline.} = 453 | ## Alias of `create()` 454 | 455 | create(cint debug, window) 456 | 457 | export JsonNode 458 | -------------------------------------------------------------------------------- /libs/webview2/WebView2EnvironmentOptions.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) Microsoft Corporation. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef __core_webview2_environment_options_h__ 6 | #define __core_webview2_environment_options_h__ 7 | 8 | #include 9 | #include 10 | 11 | #include "webview2.h" 12 | #define CORE_WEBVIEW_TARGET_PRODUCT_VERSION L"125.0.2535.41" 13 | 14 | #define COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(p) \ 15 | public: \ 16 | HRESULT STDMETHODCALLTYPE get_##p(LPWSTR* value) override { \ 17 | if (!value) \ 18 | return E_POINTER; \ 19 | *value = m_##p.Copy(); \ 20 | if ((*value == nullptr) && (m_##p.Get() != nullptr)) \ 21 | return HRESULT_FROM_WIN32(GetLastError()); \ 22 | return S_OK; \ 23 | } \ 24 | HRESULT STDMETHODCALLTYPE put_##p(LPCWSTR value) override { \ 25 | LPCWSTR result = m_##p.Set(value); \ 26 | if ((result == nullptr) && (value != nullptr)) \ 27 | return HRESULT_FROM_WIN32(GetLastError()); \ 28 | return S_OK; \ 29 | } \ 30 | \ 31 | protected: \ 32 | AutoCoMemString m_##p; 33 | 34 | #define COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(p, defPVal) \ 35 | public: \ 36 | HRESULT STDMETHODCALLTYPE get_##p(BOOL* value) override { \ 37 | if (!value) \ 38 | return E_POINTER; \ 39 | *value = m_##p; \ 40 | return S_OK; \ 41 | } \ 42 | HRESULT STDMETHODCALLTYPE put_##p(BOOL value) override { \ 43 | m_##p = value; \ 44 | return S_OK; \ 45 | } \ 46 | \ 47 | protected: \ 48 | BOOL m_##p = defPVal ? TRUE : FALSE; 49 | 50 | #define DEFINE_AUTO_COMEM_STRING() \ 51 | protected: \ 52 | class AutoCoMemString { \ 53 | public: \ 54 | AutoCoMemString() {} \ 55 | ~AutoCoMemString() { Release(); } \ 56 | void Release() { \ 57 | if (m_string) { \ 58 | deallocate_fn(m_string); \ 59 | m_string = nullptr; \ 60 | } \ 61 | } \ 62 | \ 63 | LPCWSTR Set(LPCWSTR str) { \ 64 | Release(); \ 65 | if (str) { \ 66 | m_string = MakeCoMemString(str); \ 67 | } \ 68 | return m_string; \ 69 | } \ 70 | LPCWSTR Get() { return m_string; } \ 71 | LPWSTR Copy() { \ 72 | if (m_string) \ 73 | return MakeCoMemString(m_string); \ 74 | return nullptr; \ 75 | } \ 76 | \ 77 | protected: \ 78 | LPWSTR MakeCoMemString(LPCWSTR source) { \ 79 | const size_t length = wcslen(source); \ 80 | const size_t bytes = (length + 1) * sizeof(*source); \ 81 | \ 82 | if (bytes <= length) { \ 83 | return nullptr; \ 84 | } \ 85 | \ 86 | wchar_t* result = reinterpret_cast(allocate_fn(bytes)); \ 87 | \ 88 | if (result) \ 89 | memcpy(result, source, bytes); \ 90 | return result; \ 91 | } \ 92 | LPWSTR m_string = nullptr; \ 93 | }; 94 | 95 | template 99 | class CoreWebView2CustomSchemeRegistrationBase 100 | : public Microsoft::WRL::RuntimeClass< 101 | Microsoft::WRL::RuntimeClassFlags, 102 | ICoreWebView2CustomSchemeRegistration> { 103 | public: 104 | CoreWebView2CustomSchemeRegistrationBase(LPCWSTR schemeName) { 105 | m_schemeName.Set(schemeName); 106 | } 107 | 108 | CoreWebView2CustomSchemeRegistrationBase( 109 | CoreWebView2CustomSchemeRegistrationBase&&) = default; 110 | ~CoreWebView2CustomSchemeRegistrationBase() { ReleaseAllowedOrigins(); } 111 | 112 | HRESULT STDMETHODCALLTYPE get_SchemeName(LPWSTR* schemeName) override { 113 | if (!schemeName) 114 | return E_POINTER; 115 | *schemeName = m_schemeName.Copy(); 116 | if ((*schemeName == nullptr) && (m_schemeName.Get() != nullptr)) 117 | return HRESULT_FROM_WIN32(GetLastError()); 118 | return S_OK; 119 | } 120 | 121 | HRESULT STDMETHODCALLTYPE 122 | GetAllowedOrigins(UINT32* allowedOriginsCount, 123 | LPWSTR** allowedOrigins) override { 124 | if (!allowedOrigins || !allowedOriginsCount) { 125 | return E_POINTER; 126 | } 127 | *allowedOriginsCount = 0; 128 | if (m_allowedOriginsCount == 0) { 129 | *allowedOrigins = nullptr; 130 | return S_OK; 131 | } else { 132 | *allowedOrigins = reinterpret_cast( 133 | allocate_fn(m_allowedOriginsCount * sizeof(LPWSTR))); 134 | if (!(*allowedOrigins)) { 135 | return HRESULT_FROM_WIN32(GetLastError()); 136 | } 137 | ZeroMemory(*allowedOrigins, m_allowedOriginsCount * sizeof(LPWSTR)); 138 | for (UINT32 i = 0; i < m_allowedOriginsCount; i++) { 139 | (*allowedOrigins)[i] = m_allowedOrigins[i].Copy(); 140 | if (!(*allowedOrigins)[i]) { 141 | HRESULT hr = HRESULT_FROM_WIN32(GetLastError()); 142 | for (UINT32 j = 0; j < i; j++) { 143 | deallocate_fn((*allowedOrigins)[j]); 144 | } 145 | deallocate_fn(*allowedOrigins); 146 | return hr; 147 | } 148 | } 149 | *allowedOriginsCount = m_allowedOriginsCount; 150 | return S_OK; 151 | } 152 | } 153 | 154 | HRESULT STDMETHODCALLTYPE 155 | SetAllowedOrigins(UINT32 allowedOriginsCount, 156 | LPCWSTR* allowedOrigins) override { 157 | ReleaseAllowedOrigins(); 158 | if (allowedOriginsCount == 0) { 159 | return S_OK; 160 | } else { 161 | m_allowedOrigins = new AutoCoMemString[allowedOriginsCount]; 162 | if (!m_allowedOrigins) { 163 | return HRESULT_FROM_WIN32(GetLastError()); 164 | } 165 | for (UINT32 i = 0; i < allowedOriginsCount; i++) { 166 | m_allowedOrigins[i].Set(allowedOrigins[i]); 167 | if (!m_allowedOrigins[i].Get()) { 168 | HRESULT hr = HRESULT_FROM_WIN32(GetLastError()); 169 | for (UINT32 j = 0; j < i; j++) { 170 | m_allowedOrigins[j].Release(); 171 | } 172 | m_allowedOriginsCount = 0; 173 | delete[] (m_allowedOrigins); 174 | return hr; 175 | } 176 | } 177 | m_allowedOriginsCount = allowedOriginsCount; 178 | return S_OK; 179 | } 180 | } 181 | 182 | protected: 183 | DEFINE_AUTO_COMEM_STRING(); 184 | 185 | void ReleaseAllowedOrigins() { 186 | if (m_allowedOrigins) { 187 | delete[] (m_allowedOrigins); 188 | m_allowedOrigins = nullptr; 189 | } 190 | } 191 | 192 | AutoCoMemString m_schemeName; 193 | COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(TreatAsSecure, false); 194 | COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(HasAuthorityComponent, false); 195 | AutoCoMemString* m_allowedOrigins = nullptr; 196 | unsigned int m_allowedOriginsCount = 0; 197 | }; 198 | 199 | // This is a base COM class that implements ICoreWebView2EnvironmentOptions. 200 | template 204 | class CoreWebView2EnvironmentOptionsBase 205 | : public Microsoft::WRL::Implements< 206 | Microsoft::WRL::RuntimeClassFlags, 207 | ICoreWebView2EnvironmentOptions, 208 | ICoreWebView2EnvironmentOptions2, 209 | ICoreWebView2EnvironmentOptions3, 210 | ICoreWebView2EnvironmentOptions4, 211 | ICoreWebView2EnvironmentOptions5, 212 | ICoreWebView2EnvironmentOptions6, 213 | ICoreWebView2EnvironmentOptions7, 214 | ICoreWebView2EnvironmentOptions8> { 215 | public: 216 | static const COREWEBVIEW2_RELEASE_CHANNELS kInternalChannel = 217 | static_cast(1 << 4); 218 | static const COREWEBVIEW2_RELEASE_CHANNELS kAllChannels = 219 | COREWEBVIEW2_RELEASE_CHANNELS_STABLE | 220 | COREWEBVIEW2_RELEASE_CHANNELS_BETA | COREWEBVIEW2_RELEASE_CHANNELS_DEV | 221 | COREWEBVIEW2_RELEASE_CHANNELS_CANARY | kInternalChannel; 222 | 223 | CoreWebView2EnvironmentOptionsBase() { 224 | // Initialize the target compatible browser version value to the version 225 | // of the browser binaries corresponding to this version of the SDK. 226 | m_TargetCompatibleBrowserVersion.Set(CORE_WEBVIEW_TARGET_PRODUCT_VERSION); 227 | } 228 | 229 | // ICoreWebView2EnvironmentOptions7 230 | HRESULT STDMETHODCALLTYPE 231 | get_ReleaseChannels(COREWEBVIEW2_RELEASE_CHANNELS* channels) override { 232 | if (!channels) { 233 | return E_POINTER; 234 | } 235 | *channels = m_releaseChannels; 236 | return S_OK; 237 | } 238 | 239 | HRESULT STDMETHODCALLTYPE 240 | put_ReleaseChannels(COREWEBVIEW2_RELEASE_CHANNELS channels) override { 241 | m_releaseChannels = channels; 242 | return S_OK; 243 | } 244 | 245 | HRESULT STDMETHODCALLTYPE 246 | get_ChannelSearchKind(COREWEBVIEW2_CHANNEL_SEARCH_KIND* value) override { 247 | if (!value) { 248 | return E_POINTER; 249 | } 250 | *value = m_channelSearchKind; 251 | return S_OK; 252 | } 253 | 254 | HRESULT STDMETHODCALLTYPE 255 | put_ChannelSearchKind(COREWEBVIEW2_CHANNEL_SEARCH_KIND value) override { 256 | m_channelSearchKind = value; 257 | return S_OK; 258 | } 259 | 260 | // ICoreWebView2EnvironmentOptions8 261 | HRESULT STDMETHODCALLTYPE 262 | get_ScrollBarStyle(COREWEBVIEW2_SCROLLBAR_STYLE* style) override { 263 | if (!style) { 264 | return E_POINTER; 265 | } 266 | *style = m_scrollbarStyle; 267 | return S_OK; 268 | } 269 | 270 | HRESULT STDMETHODCALLTYPE 271 | put_ScrollBarStyle(COREWEBVIEW2_SCROLLBAR_STYLE style) override { 272 | m_scrollbarStyle = style; 273 | return S_OK; 274 | } 275 | 276 | protected: 277 | ~CoreWebView2EnvironmentOptionsBase() { ReleaseCustomSchemeRegistrations(); }; 278 | 279 | void ReleaseCustomSchemeRegistrations() { 280 | if (m_customSchemeRegistrations) { 281 | for (UINT32 i = 0; i < m_customSchemeRegistrationsCount; i++) { 282 | m_customSchemeRegistrations[i]->Release(); 283 | } 284 | deallocate_fn(m_customSchemeRegistrations); 285 | m_customSchemeRegistrations = nullptr; 286 | m_customSchemeRegistrationsCount = 0; 287 | } 288 | } 289 | 290 | private: 291 | ICoreWebView2CustomSchemeRegistration** m_customSchemeRegistrations = nullptr; 292 | unsigned int m_customSchemeRegistrationsCount = 0; 293 | 294 | COREWEBVIEW2_RELEASE_CHANNELS m_releaseChannels = kAllChannels; 295 | COREWEBVIEW2_CHANNEL_SEARCH_KIND m_channelSearchKind = 296 | COREWEBVIEW2_CHANNEL_SEARCH_KIND_MOST_STABLE; 297 | 298 | // ICoreWebView2EnvironmentOptions8 299 | COREWEBVIEW2_SCROLLBAR_STYLE m_scrollbarStyle = 300 | COREWEBVIEW2_SCROLLBAR_STYLE_DEFAULT; 301 | 302 | DEFINE_AUTO_COMEM_STRING(); 303 | 304 | public: 305 | // ICoreWebView2EnvironmentOptions 306 | COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(AdditionalBrowserArguments) 307 | COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(Language) 308 | COREWEBVIEW2ENVIRONMENTOPTIONS_STRING_PROPERTY(TargetCompatibleBrowserVersion) 309 | COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY( 310 | AllowSingleSignOnUsingOSPrimaryAccount, 311 | false) 312 | 313 | // ICoreWebView2EnvironmentOptions2 314 | COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(ExclusiveUserDataFolderAccess, 315 | false) 316 | 317 | // ICoreWebView2EnvironmentOptions3 318 | COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(IsCustomCrashReportingEnabled, 319 | false) 320 | 321 | // ICoreWebView2EnvironmentOptions4 322 | public: 323 | HRESULT STDMETHODCALLTYPE GetCustomSchemeRegistrations( 324 | UINT32* count, 325 | ICoreWebView2CustomSchemeRegistration*** schemeRegistrations) override { 326 | if (!count || !schemeRegistrations) { 327 | return E_POINTER; 328 | } 329 | *count = 0; 330 | if (m_customSchemeRegistrationsCount == 0) { 331 | *schemeRegistrations = nullptr; 332 | return S_OK; 333 | } else { 334 | *schemeRegistrations = 335 | reinterpret_cast( 336 | allocate_fn(sizeof(ICoreWebView2CustomSchemeRegistration*) * 337 | m_customSchemeRegistrationsCount)); 338 | if (!*schemeRegistrations) { 339 | return HRESULT_FROM_WIN32(GetLastError()); 340 | } 341 | for (UINT32 i = 0; i < m_customSchemeRegistrationsCount; i++) { 342 | (*schemeRegistrations)[i] = m_customSchemeRegistrations[i]; 343 | (*schemeRegistrations)[i]->AddRef(); 344 | } 345 | *count = m_customSchemeRegistrationsCount; 346 | return S_OK; 347 | } 348 | } 349 | 350 | HRESULT STDMETHODCALLTYPE SetCustomSchemeRegistrations( 351 | UINT32 count, 352 | ICoreWebView2CustomSchemeRegistration** schemeRegistrations) override { 353 | ReleaseCustomSchemeRegistrations(); 354 | m_customSchemeRegistrations = 355 | reinterpret_cast(allocate_fn( 356 | sizeof(ICoreWebView2CustomSchemeRegistration*) * count)); 357 | if (!m_customSchemeRegistrations) { 358 | return GetLastError(); 359 | } 360 | for (UINT32 i = 0; i < count; i++) { 361 | m_customSchemeRegistrations[i] = schemeRegistrations[i]; 362 | m_customSchemeRegistrations[i]->AddRef(); 363 | } 364 | m_customSchemeRegistrationsCount = count; 365 | return S_OK; 366 | } 367 | 368 | // ICoreWebView2EnvironmentOptions5 369 | COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(EnableTrackingPrevention, true) 370 | 371 | // ICoreWebView2EnvironmentOptions6 372 | COREWEBVIEW2ENVIRONMENTOPTIONS_BOOL_PROPERTY(AreBrowserExtensionsEnabled, 373 | false) 374 | }; 375 | 376 | template 380 | class CoreWebView2EnvironmentOptionsBaseClass 381 | : public Microsoft::WRL::RuntimeClass< 382 | Microsoft::WRL::RuntimeClassFlags, 383 | CoreWebView2EnvironmentOptionsBase> { 387 | public: 388 | CoreWebView2EnvironmentOptionsBaseClass() {} 389 | 390 | protected: 391 | ~CoreWebView2EnvironmentOptionsBaseClass() override {} 392 | }; 393 | 394 | typedef CoreWebView2CustomSchemeRegistrationBase 398 | CoreWebView2CustomSchemeRegistration; 399 | 400 | typedef CoreWebView2EnvironmentOptionsBaseClass 404 | CoreWebView2EnvironmentOptions; 405 | 406 | #endif // __core_webview2_environment_options_h__ 407 | -------------------------------------------------------------------------------- /docs/nimdoc.out.css: -------------------------------------------------------------------------------- 1 | /* 2 | Stylesheet for use with Docutils/rst2html. 3 | 4 | See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to 5 | customize this style sheet. 6 | 7 | Modified from Chad Skeeters' rst2html-style 8 | https://bitbucket.org/cskeeters/rst2html-style/ 9 | 10 | Modified by Boyd Greenfield and narimiran 11 | */ 12 | 13 | :root { 14 | --primary-background: #fff; 15 | --secondary-background: ghostwhite; 16 | --third-background: #e8e8e8; 17 | --info-background: #50c050; 18 | --warning-background: #c0a000; 19 | --error-background: #e04040; 20 | --border: #dde; 21 | --text: #222; 22 | --anchor: #07b; 23 | --anchor-focus: #607c9f; 24 | --input-focus: #1fa0eb; 25 | --strong: #3c3c3c; 26 | --hint: #9A9A9A; 27 | --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN4AAAA9CAYAAADCt9ebAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE5LTEyLTAzVDAxOjAzOjQ4KzAxOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOS0xMi0wM1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 | --keyword: #5e8f60; 30 | --identifier: #222; 31 | --comment: #484a86; 32 | --operator: #155da4; 33 | --punctuation: black; 34 | --other: black; 35 | --escapeSequence: #c4891b; 36 | --number: #252dbe; 37 | --literal: #a4255b; 38 | --program: #6060c0; 39 | --option: #508000; 40 | --raw-data: #a4255b; 41 | 42 | --clipboard-image-normal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: black' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E %3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2' /%3E %3C/svg%3E"); 43 | --clipboard-image-selected: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: black' viewBox='0 0 20 20' fill='currentColor'%3E %3Cpath d='M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z' /%3E %3Cpath d='M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z' /%3E %3C/svg%3E"); 44 | --clipboard-image: var(--clipboard-image-normal) 45 | } 46 | 47 | [data-theme="dark"] { 48 | --primary-background: #171921; 49 | --secondary-background: #1e202a; 50 | --third-background: #2b2e3b; 51 | --info-background: #008000; 52 | --warning-background: #807000; 53 | --error-background: #c03000; 54 | --border: #0e1014; 55 | --text: #fff; 56 | --anchor: #8be9fd; 57 | --anchor-focus: #8be9fd; 58 | --input-focus: #8be9fd; 59 | --strong: #bd93f9; 60 | --hint: #7A7C85; 61 | --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAABMCAYAAABOBlMuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnht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7aPIyCWAxWABjUbPif9HCMbjURtKiaQBfvr5zH9evlJ0uLQ4r/nJMXNiZTIRrMAlJAcHB18HBweWo6Mjy8rKajeJRAJLS0uwtLQECwsLoFAogMfjAYvFgpmZ2XNXMyqVCoaHh2FoaAiGh4cfvwYGBqCvrw+6u7vfvnfvXlNvb29rT09Pq0QsUM7S6c4rNqS/lrZ5U+YPRBKR9M7u9xwqBUUvtNAudH766XSLE8PR49ixE78/8tVnX403Zk7fUR46NUUAIPIPCMdTKJTdNjY2QKPRgE6nA51OB1tbWyCRSIDD4YBAIAAejwcCgfDYUajVakGlUoFarQadTvfY79HX1wf9/f0gl8tBLpfDvXv3HvXw+dxQPYYXMj+d+P7Mmzv+5OHr6/OJWq1GBHeB09TcUiKuq/coKS3/eqIx/wPkiIXC3w6YjAAAAABJRU5ErkJggg=="); 62 | 63 | --keyword: #ff79c6; 64 | --identifier: #f8f8f2; 65 | --comment: #6272a4; 66 | --operator: #ff79c6; 67 | --punctuation: #f8f8f2; 68 | --other: #f8f8f2; 69 | --escapeSequence: #bd93f9; 70 | --number: #bd93f9; 71 | --literal: #f1fa8c; 72 | --program: #9090c0; 73 | --option: #90b010; 74 | --raw-data: #8be9fd; 75 | 76 | --clipboard-image-normal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E %3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2' /%3E %3C/svg%3E"); 77 | --clipboard-image-selected: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' viewBox='0 0 20 20' fill='currentColor'%3E %3Cpath d='M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z' /%3E %3Cpath d='M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z' /%3E %3C/svg%3E"); 78 | --clipboard-image: var(--clipboard-image-normal); 79 | } 80 | 81 | @media (prefers-color-scheme: dark) { 82 | [data-theme="auto"] { 83 | --primary-background: #171921; 84 | --secondary-background: #1e202a; 85 | --third-background: #2b2e3b; 86 | --info-background: #008000; 87 | --warning-background: #807000; 88 | --error-background: #c03000; 89 | --border: #0e1014; 90 | --text: #fff; 91 | --anchor: #8be9fd; 92 | --anchor-focus: #8be9fd; 93 | --input-focus: #8be9fd; 94 | --strong: #bd93f9; 95 | --hint: #7A7C85; 96 | --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAABMCAYAAABOBlMuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cD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Cujq6oKGhoaCioqKo9XV1WeM3YDMVPDik1gpyas+XrVyeaKXl8czjyANjbcgI/MNmkg49Q4ECPOH3NyC4RUr+M8IcHt7B1y9WlKRl3/5kElKnD1sfXEoJCzueEBAQGJYWFgGk8nk2djYAIFAgLm4pTw6Ogqjo6Mgl8vhxo0b50tLS4/U19fnLvS2FIWXfxEDQNLmLW9ueW1TxtchHDaQyWRTm4VgYkZHR6G+vhF+/NfP+y5e+vVjiVgwZpKVydOwF0dZW1lZOTGZTD6bzU4LCAiIptPp8HTDL1MwOjoKLS0tUFdXd1IsFudIpdKKgYGB7tloJTrX4MUnsVJTEj9etzY10dHRAQAAGm81wcsZW5CVyQInL69gNCGBjwcAGBx8ANnncypOnTr3H9nn/reD55wovvrQpyIHAHFUzIocGo3mQaPRfBwdHVlubm7bXF1dgcFgABqNNvruglwuh7t374JMJoOOjo7P79y5I+ru7m7q7e1tXQi7MzOh8PIv4pCw2DdaWtte37Au7aPIyCWAxWABjUbPif9HCMbjURtKiaQBfvr5zH9evlJ0uLQ4r/nJMXNiZTIRrMAlJAcHB18HBweWo6Mjy8rKajeJRAJLS0uwtLQECwsLoFAogMfjAYvFgpmZ2XNXMyqVCoaHh2FoaAiGh4cfvwYGBqCvrw+6u7vfvnfvXlNvb29rT09Pq0QsUM7S6c4rNqS/lrZ5U+YPRBKR9M7u9xwqBUUvtNAudH766XSLE8PR49ixE78/8tVnX403Zk7fUR46NUUAIPIPCMdTKJTdNjY2QKPRgE6nA51OB1tbWyCRSIDD4YBAIAAejwcCgfDYUajVakGlUoFarQadTvfY79HX1wf9/f0gl8tBLpfDvXv3HvXw+dxQPYYXMj+d+P7Mmzv+5OHr6/OJWq1GBHeB09TcUiKuq/coKS3/eqIx/wPkiIXC3w6YjAAAAABJRU5ErkJggg=="); 97 | 98 | --keyword: #ff79c6; 99 | --identifier: #f8f8f2; 100 | --comment: #6272a4; 101 | --operator: #ff79c6; 102 | --punctuation: #f8f8f2; 103 | --other: #f8f8f2; 104 | --escapeSequence: #bd93f9; 105 | --number: #bd93f9; 106 | --literal: #f1fa8c; 107 | --program: #9090c0; 108 | --option: #90b010; 109 | --raw-data: #8be9fd; 110 | 111 | --clipboard-image-normal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E %3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2' /%3E %3C/svg%3E"); 112 | --clipboard-image-selected: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: lightgray' viewBox='0 0 20 20' fill='currentColor'%3E %3Cpath d='M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z' /%3E %3Cpath d='M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z' /%3E %3C/svg%3E"); 113 | --clipboard-image: var(--clipboard-image-normal); 114 | } 115 | } 116 | 117 | .theme-select-wrapper { 118 | display: flex; 119 | align-items: center; 120 | } 121 | 122 | html { 123 | font-size: 100%; 124 | -webkit-text-size-adjust: 100%; 125 | -ms-text-size-adjust: 100%; } 126 | 127 | body { 128 | font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; 129 | font-weight: 400; 130 | font-size: 1.125em; 131 | line-height: 1.5; 132 | color: var(--text); 133 | background-color: var(--primary-background); } 134 | 135 | /* Skeleton grid */ 136 | .container { 137 | position: relative; 138 | width: 100%; 139 | max-width: 1050px; 140 | margin: 0 auto; 141 | padding: 0; 142 | box-sizing: border-box; } 143 | 144 | .column, .columns { 145 | width: 100%; 146 | float: left; 147 | box-sizing: border-box; 148 | margin-left: 1%; } 149 | 150 | @media print { 151 | #global-links, .link-seesrc, .theme-switch-wrapper, #searchInputDiv, .search-groupby { 152 | display:none; 153 | } 154 | .columns { 155 | width:100% !important; 156 | } 157 | } 158 | 159 | .column:first-child, .columns:first-child { 160 | margin-left: 0; } 161 | 162 | .container .row { 163 | display: flex; } 164 | 165 | .three.columns { 166 | width: 25.0%; 167 | height: 100vh; 168 | position: sticky; 169 | top: 0px; 170 | overflow-y: auto; 171 | padding: 2px; 172 | } 173 | 174 | .nine.columns { 175 | width: 75.0%; 176 | padding-left: 1.5em; } 177 | 178 | .twelve.columns { 179 | width: 100%; 180 | margin-left: 0; } 181 | 182 | @media screen and (max-width: 860px) { 183 | .three.columns { 184 | display: none; 185 | } 186 | .nine.columns { 187 | width: 98.0%; 188 | } 189 | body { 190 | font-size: 1em; 191 | line-height: 1.35; 192 | } 193 | } 194 | 195 | cite { 196 | font-style: italic !important; } 197 | 198 | 199 | /* Nim search input */ 200 | div#searchInputDiv { 201 | margin-bottom: 1em; 202 | } 203 | input#searchInput { 204 | width: 80%; 205 | } 206 | 207 | /* 208 | * Some custom formatting for input forms. 209 | * This also fixes input form colors on Firefox with a dark system theme on Linux. 210 | */ 211 | input { 212 | -moz-appearance: none; 213 | background-color: var(--secondary-background); 214 | color: var(--text); 215 | border: 1px solid var(--border); 216 | font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; 217 | font-size: 0.9em; 218 | padding: 6px; 219 | } 220 | 221 | input:focus { 222 | border: 1px solid var(--input-focus); 223 | box-shadow: 0 0 3px var(--input-focus); 224 | } 225 | 226 | select { 227 | -moz-appearance: none; 228 | background-color: var(--secondary-background); 229 | color: var(--text); 230 | border: 1px solid var(--border); 231 | font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; 232 | font-size: 0.9em; 233 | padding: 6px; 234 | } 235 | 236 | select:focus { 237 | border: 1px solid var(--input-focus); 238 | box-shadow: 0 0 3px var(--input-focus); 239 | } 240 | 241 | /* Docgen styles */ 242 | 243 | :target { 244 | border: 2px solid #B5651D; 245 | border-style: dotted; 246 | } 247 | 248 | /* Links */ 249 | a { 250 | color: var(--anchor); 251 | text-decoration: none; 252 | } 253 | 254 | a span.Identifier { 255 | text-decoration: underline; 256 | text-decoration-color: #aab; 257 | } 258 | 259 | a.reference-toplevel { 260 | font-weight: bold; 261 | } 262 | 263 | a.nimdoc { 264 | word-spacing: 0.3em; 265 | } 266 | 267 | a.toc-backref { 268 | text-decoration: none; 269 | color: var(--text); 270 | } 271 | 272 | a.link-seesrc { 273 | color: #607c9f; 274 | font-size: 0.9em; 275 | font-style: italic; 276 | } 277 | 278 | a:hover, a:focus { 279 | color: var(--anchor-focus); 280 | text-decoration: underline; 281 | } 282 | 283 | a:hover span.Identifier { 284 | color: var(--anchor); 285 | } 286 | 287 | 288 | sub, sup { 289 | position: relative; 290 | font-size: 75%; 291 | line-height: 0; 292 | vertical-align: baseline; } 293 | 294 | sup { 295 | top: -0.5em; } 296 | 297 | sub { 298 | bottom: -0.25em; } 299 | 300 | img { 301 | width: auto; 302 | height: auto; 303 | max-width: 100%; 304 | vertical-align: middle; 305 | border: 0; 306 | -ms-interpolation-mode: bicubic; } 307 | 308 | @media print { 309 | * { 310 | color: black !important; 311 | text-shadow: none !important; 312 | background: transparent !important; 313 | box-shadow: none !important; } 314 | 315 | a, a:visited { 316 | text-decoration: underline; } 317 | 318 | a[href]:after { 319 | content: " (" attr(href) ")"; } 320 | 321 | abbr[title]:after { 322 | content: " (" attr(title) ")"; } 323 | 324 | .ir a:after, 325 | a[href^="javascript:"]:after, 326 | a[href^="#"]:after { 327 | content: ""; } 328 | 329 | pre, blockquote { 330 | border: 1px solid #999; 331 | page-break-inside: avoid; } 332 | 333 | thead { 334 | display: table-header-group; } 335 | 336 | tr, img { 337 | page-break-inside: avoid; } 338 | 339 | img { 340 | max-width: 100% !important; } 341 | 342 | @page { 343 | margin: 0.5cm; } 344 | 345 | h1 { 346 | page-break-before: always; } 347 | 348 | h1.title { 349 | page-break-before: avoid; } 350 | 351 | p, h2, h3 { 352 | orphans: 3; 353 | widows: 3; } 354 | 355 | h2, h3 { 356 | page-break-after: avoid; } 357 | } 358 | 359 | 360 | p { 361 | margin-top: 0.5em; 362 | margin-bottom: 0.5em; } 363 | 364 | small { 365 | font-size: 85%; } 366 | 367 | strong { 368 | font-weight: 600; 369 | font-size: 0.95em; 370 | color: var(--strong); } 371 | 372 | em { 373 | font-style: italic; } 374 | 375 | h1 { 376 | font-size: 1.8em; 377 | font-weight: 400; 378 | padding-bottom: .25em; 379 | border-bottom: 6px solid var(--third-background); 380 | margin-top: 2.5em; 381 | margin-bottom: 1em; 382 | line-height: 1.2em; } 383 | 384 | h1.title { 385 | padding-bottom: 1em; 386 | border-bottom: 0px; 387 | font-size: 2.5em; 388 | text-align: center; 389 | font-weight: 900; 390 | margin-top: 0.75em; 391 | margin-bottom: 0em; } 392 | 393 | h2 { 394 | font-size: 1.3em; 395 | margin-top: 2em; } 396 | 397 | h2.subtitle { 398 | margin-top: 0em; 399 | text-align: center; } 400 | 401 | h3 { 402 | font-size: 1.125em; 403 | font-style: italic; 404 | margin-top: 1.5em; } 405 | 406 | h4 { 407 | font-size: 1.125em; 408 | margin-top: 1em; } 409 | 410 | h5 { 411 | font-size: 1.125em; 412 | margin-top: 0.75em; } 413 | 414 | h6 { 415 | font-size: 1.1em; } 416 | 417 | 418 | ul, ol { 419 | padding: 0; 420 | margin-top: 0.5em; 421 | margin-left: 0.75em; } 422 | 423 | ul ul, ul ol, ol ol, ol ul { 424 | margin-bottom: 0; 425 | margin-left: 1.25em; } 426 | 427 | ul.simple > li { 428 | list-style-type: circle; } 429 | 430 | ul.simple-boot li { 431 | list-style-type: none; 432 | margin-left: 0em; 433 | margin-bottom: 0.5em; } 434 | 435 | ol.simple > li, ul.simple > li { 436 | margin-bottom: 0.2em; 437 | margin-left: 0.4em } 438 | 439 | ul.simple.simple-toc > li { 440 | margin-top: 1em; } 441 | 442 | ul.simple-toc { 443 | list-style: none; 444 | font-size: 0.9em; 445 | margin-left: -0.3em; 446 | margin-top: 1em; } 447 | 448 | ul.simple-toc > li { 449 | list-style-type: none; } 450 | 451 | ul.simple-toc-section { 452 | list-style-type: circle; 453 | margin-left: 0.8em; 454 | color: #6c9aae; } 455 | 456 | ul.nested-toc-section { 457 | list-style-type: circle; 458 | margin-left: -0.75em; 459 | color: var(--text); } 460 | 461 | ul.nested-toc-section > li { 462 | margin-left: 1.25em; } 463 | 464 | 465 | ol.arabic { 466 | list-style: decimal; } 467 | 468 | ol.loweralpha { 469 | list-style: lower-alpha; } 470 | 471 | ol.upperalpha { 472 | list-style: upper-alpha; } 473 | 474 | ol.lowerroman { 475 | list-style: lower-roman; } 476 | 477 | ol.upperroman { 478 | list-style: upper-roman; } 479 | 480 | ul.auto-toc { 481 | list-style-type: none; } 482 | 483 | 484 | dl { 485 | margin-bottom: 1.5em; } 486 | 487 | dt { 488 | margin-bottom: -0.5em; 489 | margin-left: 0.0em; } 490 | 491 | dd { 492 | margin-left: 2.0em; 493 | margin-bottom: 3.0em; 494 | margin-top: 0.5em; } 495 | 496 | 497 | hr { 498 | margin: 2em 0; 499 | border: 0; 500 | border-top: 1px solid #aaa; } 501 | 502 | hr.footnote { 503 | width: 25%; 504 | border-top: 0.15em solid #999; 505 | margin-bottom: 0.15em; 506 | margin-top: 0.15em; 507 | } 508 | div.footnote-group { 509 | margin-left: 1em; 510 | } 511 | div.footnote-label { 512 | display: inline-block; 513 | min-width: 1.7em; 514 | } 515 | 516 | div.option-list { 517 | border: 0.1em solid var(--border); 518 | } 519 | div.option-list-item { 520 | padding-left: 12em; 521 | padding-right: 0; 522 | padding-bottom: 0.3em; 523 | padding-top: 0.3em; 524 | } 525 | div.odd { 526 | background-color: var(--secondary-background); 527 | } 528 | div.option-list-label { 529 | margin-left: -11.5em; 530 | margin-right: 0em; 531 | min-width: 11.5em; 532 | display: inline-block; 533 | vertical-align: top; 534 | } 535 | div.option-list-description { 536 | width: calc(100% - 1em); 537 | padding-left: 1em; 538 | padding-right: 0; 539 | display: inline-block; 540 | } 541 | 542 | blockquote { 543 | font-size: 0.9em; 544 | font-style: italic; 545 | padding-left: 0.5em; 546 | margin-left: 0; 547 | border-left: 5px solid #bbc; 548 | } 549 | 550 | blockquote.markdown-quote { 551 | font-size: 0.9rem; /* use rem to avoid recursion */ 552 | font-style: normal; 553 | } 554 | 555 | .pre, span.tok { 556 | font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; 557 | font-weight: 500; 558 | font-size: 0.85em; 559 | color: var(--text); 560 | background-color: var(--third-background); 561 | padding-left: 3px; 562 | padding-right: 3px; 563 | border-radius: 4px; 564 | } 565 | 566 | span.tok { 567 | border: 1px solid #808080; 568 | padding-bottom: 0.1em; 569 | margin-right: 0.2em; 570 | } 571 | 572 | .copyToClipBoard { 573 | position: relative; 574 | } 575 | 576 | pre { 577 | font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; 578 | color: var(--text); 579 | font-weight: 500; 580 | display: inline-block; 581 | box-sizing: border-box; 582 | min-width: 100%; 583 | padding: 0.5em; 584 | margin-top: 0.5em; 585 | margin-bottom: 0.5em; 586 | font-size: 0.85em; 587 | white-space: pre !important; 588 | overflow-y: hidden; 589 | overflow-x: visible; 590 | background-color: var(--secondary-background); 591 | border: 1px solid var(--border); 592 | -webkit-border-radius: 6px; 593 | -moz-border-radius: 6px; 594 | border-radius: 6px; 595 | } 596 | 597 | .copyToClipBoardBtn { 598 | visibility: hidden; 599 | position: absolute; 600 | width: 24px; 601 | border-radius: 4px; 602 | background-image: var(--clipboard-image); 603 | right: 5px; 604 | top: 13px; 605 | background-color: var(--secondary-background); 606 | padding: 11px; 607 | border: 0; 608 | } 609 | 610 | .copyToClipBoard:hover .copyToClipBoardBtn { 611 | visibility: visible; 612 | } 613 | 614 | .pre-scrollable { 615 | max-height: 340px; 616 | overflow-y: scroll; } 617 | 618 | 619 | /* Nim line-numbered tables */ 620 | .line-nums-table { 621 | width: 100%; 622 | table-layout: fixed; } 623 | 624 | table.line-nums-table { 625 | border-radius: 4px; 626 | border: 1px solid #cccccc; 627 | background-color: ghostwhite; 628 | border-collapse: separate; 629 | margin-top: 15px; 630 | margin-bottom: 25px; } 631 | 632 | .line-nums-table tbody { 633 | border: none; } 634 | 635 | .line-nums-table td pre { 636 | border: none; 637 | background-color: transparent; } 638 | 639 | .line-nums-table td.blob-line-nums { 640 | width: 28px; } 641 | 642 | .line-nums-table td.blob-line-nums pre { 643 | color: #b0b0b0; 644 | -webkit-filter: opacity(75%); 645 | filter: opacity(75%); 646 | text-align: right; 647 | border-color: transparent; 648 | background-color: transparent; 649 | padding-left: 0px; 650 | margin-left: 0px; 651 | padding-right: 0px; 652 | margin-right: 0px; } 653 | 654 | 655 | table { 656 | max-width: 100%; 657 | background-color: transparent; 658 | margin-top: 0.5em; 659 | margin-bottom: 1.5em; 660 | border-collapse: collapse; 661 | border-color: var(--third-background); 662 | border-spacing: 0; 663 | font-size: 0.9em; 664 | } 665 | 666 | table th, table td { 667 | padding: 0px 0.5em 0px; 668 | border-color: var(--third-background); 669 | } 670 | 671 | table th { 672 | background-color: var(--third-background); 673 | border-color: var(--third-background); 674 | font-weight: bold; } 675 | 676 | table th.docinfo-name { 677 | background-color: transparent; 678 | text-align: right; 679 | } 680 | 681 | table tr:hover { 682 | background-color: var(--third-background); } 683 | 684 | 685 | /* rst2html default used to remove borders from tables and images */ 686 | .borderless, table.borderless td, table.borderless th { 687 | border: 0; } 688 | 689 | table.borderless td, table.borderless th { 690 | /* Override padding for "table.docutils td" with "! important". 691 | The right padding separates the table cells. */ 692 | padding: 0 0.5em 0 0 !important; } 693 | 694 | .admonition { 695 | padding: 0.3em; 696 | background-color: var(--secondary-background); 697 | border-left: 0.4em solid #7f7f84; 698 | margin-bottom: 0.5em; 699 | -webkit-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); 700 | -moz-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); 701 | box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); 702 | } 703 | .admonition-info { 704 | border-color: var(--info-background); 705 | } 706 | .admonition-info-text { 707 | color: var(--info-background); 708 | } 709 | .admonition-warning { 710 | border-color: var(--warning-background); 711 | } 712 | .admonition-warning-text { 713 | color: var(--warning-background); 714 | } 715 | .admonition-error { 716 | border-color: var(--error-background); 717 | } 718 | .admonition-error-text { 719 | color: var(--error-background); 720 | } 721 | 722 | .first { 723 | /* Override more specific margin styles with "! important". */ 724 | margin-top: 0 !important; } 725 | 726 | .last, .with-subtitle { 727 | margin-bottom: 0 !important; } 728 | 729 | .hidden { 730 | display: none; } 731 | 732 | blockquote.epigraph { 733 | margin: 2em 5em; } 734 | 735 | dl.docutils dd { 736 | margin-bottom: 0.5em; } 737 | 738 | object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { 739 | overflow: hidden; } 740 | 741 | 742 | div.figure { 743 | margin-left: 2em; 744 | margin-right: 2em; } 745 | 746 | div.footer, div.header { 747 | clear: both; 748 | text-align: center; 749 | color: #666; 750 | font-size: smaller; } 751 | 752 | div.footer { 753 | padding-top: 5em; } 754 | 755 | div.line-block { 756 | display: block; 757 | margin-top: 1em; 758 | margin-bottom: 1em; } 759 | 760 | div.line-block div.line-block { 761 | margin-top: 0; 762 | margin-bottom: 0; 763 | margin-left: 1.5em; } 764 | 765 | div.topic { 766 | margin: 2em; } 767 | 768 | div.search_results { 769 | background-color: var(--third-background); 770 | margin: 3em; 771 | padding: 1em; 772 | border: 1px solid #4d4d4d; } 773 | 774 | div#global-links ul { 775 | margin-left: 0; 776 | list-style-type: none; } 777 | 778 | div#global-links > simple-boot { 779 | margin-left: 3em; } 780 | 781 | hr.docutils { 782 | width: 75%; } 783 | 784 | img.align-left, .figure.align-left, object.align-left { 785 | clear: left; 786 | float: left; 787 | margin-right: 1em; } 788 | 789 | img.align-right, .figure.align-right, object.align-right { 790 | clear: right; 791 | float: right; 792 | margin-left: 1em; } 793 | 794 | img.align-center, .figure.align-center, object.align-center { 795 | display: block; 796 | margin-left: auto; 797 | margin-right: auto; } 798 | 799 | .align-left { 800 | text-align: left; } 801 | 802 | .align-center { 803 | clear: both; 804 | text-align: center; } 805 | 806 | .align-right { 807 | text-align: right; } 808 | 809 | /* reset inner alignment in figures */ 810 | div.align-right { 811 | text-align: inherit; } 812 | 813 | p.attribution { 814 | text-align: right; 815 | margin-left: 50%; } 816 | 817 | p.caption { 818 | font-style: italic; } 819 | 820 | p.credits { 821 | font-style: italic; 822 | font-size: smaller; } 823 | 824 | p.label { 825 | white-space: nowrap; } 826 | 827 | p.rubric { 828 | font-weight: bold; 829 | font-size: larger; 830 | color: maroon; 831 | text-align: center; } 832 | 833 | p.topic-title { 834 | font-weight: bold; } 835 | 836 | pre.address { 837 | margin-bottom: 0; 838 | margin-top: 0; 839 | font: inherit; } 840 | 841 | pre.literal-block, pre.doctest-block, pre.math, pre.code { 842 | margin-left: 2em; 843 | margin-right: 2em; } 844 | 845 | pre.code .ln { 846 | color: grey; } 847 | 848 | /* line numbers */ 849 | pre.code, code { 850 | background-color: #eeeeee; } 851 | 852 | pre.code .comment, code .comment { 853 | color: #5c6576; } 854 | 855 | pre.code .keyword, code .keyword { 856 | color: #3B0D06; 857 | font-weight: bold; } 858 | 859 | pre.code .literal.string, code .literal.string { 860 | color: #0c5404; } 861 | 862 | pre.code .name.builtin, code .name.builtin { 863 | color: #352b84; } 864 | 865 | pre.code .deleted, code .deleted { 866 | background-color: #DEB0A1; } 867 | 868 | pre.code .inserted, code .inserted { 869 | background-color: #A3D289; } 870 | 871 | span.classifier { 872 | font-style: oblique; } 873 | 874 | span.classifier-delimiter { 875 | font-weight: bold; } 876 | 877 | span.problematic { 878 | color: #b30000; } 879 | 880 | span.section-subtitle { 881 | /* font-size relative to parent (h1..h6 element) */ 882 | font-size: 80%; } 883 | 884 | span.DecNumber { 885 | color: var(--number); } 886 | 887 | span.BinNumber { 888 | color: var(--number); } 889 | 890 | span.HexNumber { 891 | color: var(--number); } 892 | 893 | span.OctNumber { 894 | color: var(--number); } 895 | 896 | span.FloatNumber { 897 | color: var(--number); } 898 | 899 | span.Identifier { 900 | color: var(--identifier); } 901 | 902 | span.Keyword { 903 | font-weight: 600; 904 | color: var(--keyword); } 905 | 906 | span.StringLit { 907 | color: var(--literal); } 908 | 909 | span.LongStringLit { 910 | color: var(--literal); } 911 | 912 | span.CharLit { 913 | color: var(--literal); } 914 | 915 | span.EscapeSequence { 916 | color: var(--escapeSequence); } 917 | 918 | span.Operator { 919 | color: var(--operator); } 920 | 921 | span.Punctuation { 922 | color: var(--punctuation); } 923 | 924 | span.Comment, span.LongComment { 925 | font-style: italic; 926 | font-weight: 400; 927 | color: var(--comment); } 928 | 929 | span.RegularExpression { 930 | color: darkviolet; } 931 | 932 | span.TagStart { 933 | color: darkviolet; } 934 | 935 | span.TagEnd { 936 | color: darkviolet; } 937 | 938 | span.Key { 939 | color: #252dbe; } 940 | 941 | span.Value { 942 | color: #252dbe; } 943 | 944 | span.RawData { 945 | color: var(--raw-data); } 946 | 947 | span.Assembler { 948 | color: #252dbe; } 949 | 950 | span.Preprocessor { 951 | color: #252dbe; } 952 | 953 | span.Directive { 954 | color: #252dbe; } 955 | 956 | span.option { 957 | font-weight: bold; 958 | font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; 959 | color: var(--option); } 960 | 961 | span.Prompt { 962 | font-weight: bold; 963 | color: red; } 964 | 965 | span.ProgramOutput { 966 | font-weight: bold; 967 | color: #808080; } 968 | 969 | span.program { 970 | font-weight: bold; 971 | color: var(--program); 972 | text-decoration: underline; 973 | text-decoration-color: var(--hint); 974 | text-decoration-thickness: 0.05em; 975 | text-underline-offset: 0.15em; } 976 | 977 | span.Command, span.Rule, span.Hyperlink, 978 | span.Label, span.Reference, span.Other { 979 | color: var(--other); } 980 | 981 | /* Pop type, const, proc, and iterator defs in nim def blocks */ 982 | dt pre > span.Identifier, dt pre > span.Operator { 983 | color: var(--identifier); 984 | font-weight: 700; } 985 | 986 | dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier, 987 | dt pre > span.Operator ~ span.Identifier, dt pre > span.Other ~ span.Identifier { 988 | color: var(--identifier); 989 | font-weight: inherit; } 990 | 991 | /* Nim sprite for the footer (taken from main page favicon) */ 992 | .nim-sprite { 993 | display: inline-block; 994 | width: 51px; 995 | height: 14px; 996 | background-position: 0 0; 997 | background-size: 51px 14px; 998 | -webkit-filter: opacity(50%); 999 | filter: opacity(50%); 1000 | background-repeat: no-repeat; 1001 | background-image: var(--nim-sprite-base64); 1002 | margin-bottom: 5px; } 1003 | 1004 | span.pragmadots { 1005 | /* Position: relative frees us up to make the dots 1006 | look really nice without fucking up the layout and 1007 | causing bulging in the parent container */ 1008 | position: relative; 1009 | /* 1px down looks slightly nicer */ 1010 | top: 1px; 1011 | padding: 2px; 1012 | background-color: var(--third-background); 1013 | border-radius: 4px; 1014 | margin: 0 2px; 1015 | cursor: pointer; 1016 | font-size: 0.8em; } 1017 | 1018 | span.pragmadots:hover { 1019 | background-color: var(--hint); } 1020 | 1021 | span.pragmawrap { 1022 | display: none; } 1023 | 1024 | span.attachedType { 1025 | display: none; 1026 | visibility: hidden; } 1027 | -------------------------------------------------------------------------------- /docs/dochack.js: -------------------------------------------------------------------------------- 1 | /* Generated by the Nim Compiler v2.0.4 */ 2 | var framePtr = null; 3 | var excHandler = 0; 4 | var lastJSError = null; 5 | var NTI33554466 = {size: 0,kind: 1,base: null,node: null,finalizer: null}; 6 | var NTI721420302 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; 7 | var NTI33554435 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; 8 | var NTI973078607 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; 9 | var NTI973078613 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; 10 | var NTI134217745 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; 11 | var NTI134217749 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; 12 | var NTI134217751 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; 13 | var NTI33555173 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; 14 | var NTI33555181 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; 15 | var NTI33554449 = {size: 0,kind: 28,base: null,node: null,finalizer: null}; 16 | var NTI33554450 = {size: 0,kind: 29,base: null,node: null,finalizer: null}; 17 | var NTI33555180 = {size: 0, kind: 22, base: null, node: null, finalizer: null}; 18 | var NTI33555177 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; 19 | var NTI33555178 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; 20 | var NTI134217741 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; 21 | var NTI134217743 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; 22 | var NNI134217743 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; 23 | NTI134217743.node = NNI134217743; 24 | var NNI134217741 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; 25 | NTI134217741.node = NNI134217741; 26 | var NNI33555178 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; 27 | NTI33555178.node = NNI33555178; 28 | NTI33555180.base = NTI33555177; 29 | NTI33555181.base = NTI33555177; 30 | var NNI33555177 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI33555180, name: "parent", sons: null}, 31 | {kind: 1, offset: "name", len: 0, typ: NTI33554450, name: "name", sons: null}, 32 | {kind: 1, offset: "message", len: 0, typ: NTI33554449, name: "msg", sons: null}, 33 | {kind: 1, offset: "trace", len: 0, typ: NTI33554449, name: "trace", sons: null}, 34 | {kind: 1, offset: "up", len: 0, typ: NTI33555181, name: "up", sons: null}]}; 35 | NTI33555177.node = NNI33555177; 36 | var NNI33555173 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; 37 | NTI33555173.node = NNI33555173; 38 | NTI33555177.base = NTI33555173; 39 | NTI33555178.base = NTI33555177; 40 | NTI134217741.base = NTI33555178; 41 | NTI134217743.base = NTI134217741; 42 | var NNI134217751 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; 43 | NTI134217751.node = NNI134217751; 44 | NTI134217751.base = NTI33555178; 45 | var NNI134217749 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; 46 | NTI134217749.node = NNI134217749; 47 | NTI134217749.base = NTI33555178; 48 | var NNI134217745 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; 49 | NTI134217745.node = NNI134217745; 50 | NTI134217745.base = NTI33555178; 51 | var NNI973078613 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI973078607, name: "a", sons: null}, 52 | {kind: 1, offset: "b", len: 0, typ: NTI33554435, name: "b", sons: null}]}; 53 | NTI973078613.node = NNI973078613; 54 | var NNI721420302 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554435, name: "Field0", sons: null}, 55 | {kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]}; 56 | NTI721420302.node = NNI721420302; 57 | 58 | function mnewString(len_33557003) { 59 | var result = new Array(len_33557003); 60 | for (var i = 0; i < len_33557003; i++) {result[i] = 0;} 61 | return result; 62 | 63 | 64 | 65 | } 66 | 67 | function toJSStr(s_33556901) { 68 | var result_33556902 = null; 69 | 70 | var res_33556943 = newSeq_33556919((s_33556901).length); 71 | var i_33556944 = 0; 72 | var j_33556945 = 0; 73 | Label1: { 74 | Label2: while (true) { 75 | if (!(i_33556944 < (s_33556901).length)) break Label2; 76 | var c_33556946 = s_33556901[i_33556944]; 77 | if ((c_33556946 < 128)) { 78 | res_33556943[j_33556945] = String.fromCharCode(c_33556946); 79 | i_33556944 += 1; 80 | } 81 | else { 82 | var helper_33556959 = newSeq_33556919(0); 83 | Label3: { 84 | Label4: while (true) { 85 | if (!true) break Label4; 86 | var code_33556960 = c_33556946.toString(16); 87 | if ((((code_33556960) == null ? 0 : (code_33556960).length) == 1)) { 88 | helper_33556959.push("%0");; 89 | } 90 | else { 91 | helper_33556959.push("%");; 92 | } 93 | 94 | helper_33556959.push(code_33556960);; 95 | i_33556944 += 1; 96 | if ((((s_33556901).length <= i_33556944) || (s_33556901[i_33556944] < 128))) { 97 | break Label3; 98 | } 99 | 100 | c_33556946 = s_33556901[i_33556944]; 101 | } 102 | }; 103 | ++excHandler; 104 | try { 105 | res_33556943[j_33556945] = decodeURIComponent(helper_33556959.join("")); 106 | --excHandler; 107 | } catch (EXCEPTION) { 108 | var prevJSError = lastJSError; 109 | lastJSError = EXCEPTION; 110 | --excHandler; 111 | res_33556943[j_33556945] = helper_33556959.join(""); 112 | lastJSError = prevJSError; 113 | } finally { 114 | } 115 | } 116 | 117 | j_33556945 += 1; 118 | } 119 | }; 120 | if (res_33556943.length < j_33556945) { for (var i = res_33556943.length ; i < j_33556945 ; ++i) res_33556943.push(null); } 121 | else { res_33556943.length = j_33556945; }; 122 | result_33556902 = res_33556943.join(""); 123 | 124 | return result_33556902; 125 | 126 | } 127 | 128 | function raiseException(e_33556653, ename_33556654) { 129 | e_33556653.name = ename_33556654; 130 | if ((excHandler == 0)) { 131 | unhandledException(e_33556653); 132 | } 133 | 134 | throw e_33556653; 135 | 136 | 137 | } 138 | 139 | function addInt(a_33557050, b_33557051) { 140 | var result = a_33557050 + b_33557051; 141 | checkOverflowInt(result); 142 | return result; 143 | 144 | 145 | 146 | } 147 | 148 | function chckRange(i_33557324, a_33557325, b_33557326) { 149 | var result_33557327 = 0; 150 | 151 | BeforeRet: { 152 | if (((a_33557325 <= i_33557324) && (i_33557324 <= b_33557326))) { 153 | result_33557327 = i_33557324; 154 | break BeforeRet; 155 | } 156 | else { 157 | raiseRangeError(); 158 | } 159 | 160 | }; 161 | 162 | return result_33557327; 163 | 164 | } 165 | 166 | function setConstr() { 167 | var result = {}; 168 | for (var i = 0; i < arguments.length; ++i) { 169 | var x = arguments[i]; 170 | if (typeof(x) == "object") { 171 | for (var j = x[0]; j <= x[1]; ++j) { 172 | result[j] = true; 173 | } 174 | } else { 175 | result[x] = true; 176 | } 177 | } 178 | return result; 179 | 180 | 181 | 182 | } 183 | var ConstSet1 = setConstr(17, 16, 4, 18, 27, 19, 23, 22, 21); 184 | 185 | function nimCopy(dest_33557268, src_33557269, ti_33557270) { 186 | var result_33557279 = null; 187 | 188 | switch (ti_33557270.kind) { 189 | case 21: 190 | case 22: 191 | case 23: 192 | case 5: 193 | if (!(isFatPointer_33557259(ti_33557270))) { 194 | result_33557279 = src_33557269; 195 | } 196 | else { 197 | result_33557279 = [src_33557269[0], src_33557269[1]]; 198 | } 199 | 200 | break; 201 | case 19: 202 | if (dest_33557268 === null || dest_33557268 === undefined) { 203 | dest_33557268 = {}; 204 | } 205 | else { 206 | for (var key in dest_33557268) { delete dest_33557268[key]; } 207 | } 208 | for (var key in src_33557269) { dest_33557268[key] = src_33557269[key]; } 209 | result_33557279 = dest_33557268; 210 | 211 | break; 212 | case 18: 213 | case 17: 214 | if (!((ti_33557270.base == null))) { 215 | result_33557279 = nimCopy(dest_33557268, src_33557269, ti_33557270.base); 216 | } 217 | else { 218 | if ((ti_33557270.kind == 17)) { 219 | result_33557279 = (dest_33557268 === null || dest_33557268 === undefined) ? {m_type: ti_33557270} : dest_33557268; 220 | } 221 | else { 222 | result_33557279 = (dest_33557268 === null || dest_33557268 === undefined) ? {} : dest_33557268; 223 | } 224 | } 225 | nimCopyAux(result_33557279, src_33557269, ti_33557270.node); 226 | break; 227 | case 4: 228 | case 16: 229 | if(ArrayBuffer.isView(src_33557269)) { 230 | if(dest_33557268 === null || dest_33557268 === undefined || dest_33557268.length != src_33557269.length) { 231 | dest_33557268 = new src_33557269.constructor(src_33557269); 232 | } else { 233 | dest_33557268.set(src_33557269, 0); 234 | } 235 | result_33557279 = dest_33557268; 236 | } else { 237 | if (src_33557269 === null) { 238 | result_33557279 = null; 239 | } 240 | else { 241 | if (dest_33557268 === null || dest_33557268 === undefined || dest_33557268.length != src_33557269.length) { 242 | dest_33557268 = new Array(src_33557269.length); 243 | } 244 | result_33557279 = dest_33557268; 245 | for (var i = 0; i < src_33557269.length; ++i) { 246 | result_33557279[i] = nimCopy(result_33557279[i], src_33557269[i], ti_33557270.base); 247 | } 248 | } 249 | } 250 | 251 | break; 252 | case 24: 253 | case 27: 254 | if (src_33557269 === null) { 255 | result_33557279 = null; 256 | } 257 | else { 258 | if (dest_33557268 === null || dest_33557268 === undefined || dest_33557268.length != src_33557269.length) { 259 | dest_33557268 = new Array(src_33557269.length); 260 | } 261 | result_33557279 = dest_33557268; 262 | for (var i = 0; i < src_33557269.length; ++i) { 263 | result_33557279[i] = nimCopy(result_33557279[i], src_33557269[i], ti_33557270.base); 264 | } 265 | } 266 | 267 | break; 268 | case 28: 269 | if (src_33557269 !== null) { 270 | result_33557279 = src_33557269.slice(0); 271 | } 272 | 273 | break; 274 | default: 275 | result_33557279 = src_33557269; 276 | break; 277 | } 278 | 279 | return result_33557279; 280 | 281 | } 282 | 283 | function chckIndx(i_33557319, a_33557320, b_33557321) { 284 | var result_33557322 = 0; 285 | 286 | BeforeRet: { 287 | if (((a_33557320 <= i_33557319) && (i_33557319 <= b_33557321))) { 288 | result_33557322 = i_33557319; 289 | break BeforeRet; 290 | } 291 | else { 292 | raiseIndexError(i_33557319, a_33557320, b_33557321); 293 | } 294 | 295 | }; 296 | 297 | return result_33557322; 298 | 299 | } 300 | 301 | function makeNimstrLit(c_33556895) { 302 | var result = []; 303 | for (var i = 0; i < c_33556895.length; ++i) { 304 | result[i] = c_33556895.charCodeAt(i); 305 | } 306 | return result; 307 | 308 | 309 | 310 | } 311 | 312 | function subInt(a_33557054, b_33557055) { 313 | var result = a_33557054 - b_33557055; 314 | checkOverflowInt(result); 315 | return result; 316 | 317 | 318 | 319 | } 320 | 321 | function cstrToNimstr(c_33556898) { 322 | var ln = c_33556898.length; 323 | var result = new Array(ln); 324 | var r = 0; 325 | for (var i = 0; i < ln; ++i) { 326 | var ch = c_33556898.charCodeAt(i); 327 | 328 | if (ch < 128) { 329 | result[r] = ch; 330 | } 331 | else { 332 | if (ch < 2048) { 333 | result[r] = (ch >> 6) | 192; 334 | } 335 | else { 336 | if (ch < 55296 || ch >= 57344) { 337 | result[r] = (ch >> 12) | 224; 338 | } 339 | else { 340 | ++i; 341 | ch = 65536 + (((ch & 1023) << 10) | (c_33556898.charCodeAt(i) & 1023)); 342 | result[r] = (ch >> 18) | 240; 343 | ++r; 344 | result[r] = ((ch >> 12) & 63) | 128; 345 | } 346 | ++r; 347 | result[r] = ((ch >> 6) & 63) | 128; 348 | } 349 | ++r; 350 | result[r] = (ch & 63) | 128; 351 | } 352 | ++r; 353 | } 354 | return result; 355 | 356 | 357 | 358 | } 359 | var ConstSet2 = setConstr([65, 90]); 360 | var ConstSet3 = setConstr(95, 32, 46); 361 | var ConstSet4 = setConstr(95, 32, 46); 362 | 363 | function mulInt(a_33557058, b_33557059) { 364 | var result = a_33557058 * b_33557059; 365 | checkOverflowInt(result); 366 | return result; 367 | 368 | 369 | 370 | } 371 | var ConstSet5 = setConstr([97, 122]); 372 | var ConstSet6 = setConstr([65, 90], [97, 122]); 373 | var ConstSet7 = setConstr([97, 122]); 374 | var ConstSet8 = setConstr([65, 90]); 375 | var ConstSet9 = setConstr([65, 90], [97, 122]); 376 | 377 | function nimMax(a_33557108, b_33557109) { 378 | var Temporary1; 379 | 380 | var result_33557110 = 0; 381 | 382 | BeforeRet: { 383 | if ((b_33557109 <= a_33557108)) { 384 | Temporary1 = a_33557108; 385 | } 386 | else { 387 | Temporary1 = b_33557109; 388 | } 389 | 390 | result_33557110 = Temporary1; 391 | break BeforeRet; 392 | }; 393 | 394 | return result_33557110; 395 | 396 | } 397 | 398 | function nimMin(a_33557104, b_33557105) { 399 | var Temporary1; 400 | 401 | var result_33557106 = 0; 402 | 403 | BeforeRet: { 404 | if ((a_33557104 <= b_33557105)) { 405 | Temporary1 = a_33557104; 406 | } 407 | else { 408 | Temporary1 = b_33557105; 409 | } 410 | 411 | result_33557106 = Temporary1; 412 | break BeforeRet; 413 | }; 414 | 415 | return result_33557106; 416 | 417 | } 418 | 419 | function addChar(x_33557415, c_33557416) { 420 | x_33557415.push(c_33557416); 421 | 422 | 423 | } 424 | var objectID_1207959729 = [0]; 425 | 426 | function setTheme(theme_570425350) { 427 | document.documentElement.setAttribute("data-theme", theme_570425350); 428 | window.localStorage.setItem("theme", theme_570425350); 429 | 430 | 431 | } 432 | 433 | function add_33556373(x_33556374, x_33556374_Idx, y_33556375) { 434 | if (x_33556374[x_33556374_Idx] === null) { x_33556374[x_33556374_Idx] = []; } 435 | var off = x_33556374[x_33556374_Idx].length; 436 | x_33556374[x_33556374_Idx].length += y_33556375.length; 437 | for (var i = 0; i < y_33556375.length; ++i) { 438 | x_33556374[x_33556374_Idx][off+i] = y_33556375.charCodeAt(i); 439 | } 440 | 441 | 442 | 443 | } 444 | 445 | function newSeq_33556919(len_33556921) { 446 | var result_33556922 = []; 447 | 448 | result_33556922 = new Array(len_33556921); for (var i = 0 ; i < len_33556921 ; ++i) { result_33556922[i] = null; } 449 | return result_33556922; 450 | 451 | } 452 | 453 | function unhandledException(e_33556649) { 454 | var buf_33556650 = [[]]; 455 | if (!(((e_33556649.message).length == 0))) { 456 | buf_33556650[0].push.apply(buf_33556650[0], [69,114,114,111,114,58,32,117,110,104,97,110,100,108,101,100,32,101,120,99,101,112,116,105,111,110,58,32]);; 457 | buf_33556650[0].push.apply(buf_33556650[0], e_33556649.message);; 458 | } 459 | else { 460 | buf_33556650[0].push.apply(buf_33556650[0], [69,114,114,111,114,58,32,117,110,104,97,110,100,108,101,100,32,101,120,99,101,112,116,105,111,110]);; 461 | } 462 | 463 | buf_33556650[0].push.apply(buf_33556650[0], [32,91]);; 464 | add_33556373(buf_33556650, 0, e_33556649.name); 465 | buf_33556650[0].push.apply(buf_33556650[0], [93,10]);; 466 | var cbuf_33556651 = toJSStr(buf_33556650[0]); 467 | if (typeof(Error) !== "undefined") { 468 | throw new Error(cbuf_33556651); 469 | } 470 | else { 471 | throw cbuf_33556651; 472 | } 473 | 474 | 475 | 476 | } 477 | 478 | function raiseOverflow() { 479 | raiseException({message: [111,118,101,114,45,32,111,114,32,117,110,100,101,114,102,108,111,119], parent: null, m_type: NTI134217743, name: null, trace: [], up: null}, "OverflowDefect"); 480 | 481 | 482 | } 483 | 484 | function checkOverflowInt(a_33557048) { 485 | if (a_33557048 > 2147483647 || a_33557048 < -2147483648) raiseOverflow(); 486 | 487 | 488 | 489 | } 490 | 491 | function raiseRangeError() { 492 | raiseException({message: [118,97,108,117,101,32,111,117,116,32,111,102,32,114,97,110,103,101], parent: null, m_type: NTI134217751, name: null, trace: [], up: null}, "RangeDefect"); 493 | 494 | 495 | } 496 | 497 | function addChars_301990090(result_301990092, result_301990092_Idx, x_301990093, start_301990094, n_301990095) { 498 | var Temporary1; 499 | 500 | var old_301990096 = (result_301990092[result_301990092_Idx]).length; 501 | if (result_301990092[result_301990092_Idx].length < (Temporary1 = chckRange(addInt(old_301990096, n_301990095), 0, 2147483647), Temporary1)) { for (var i = result_301990092[result_301990092_Idx].length; i < Temporary1; ++i) result_301990092[result_301990092_Idx].push(0); } 502 | else {result_301990092[result_301990092_Idx].length = Temporary1; }; 503 | Label2: { 504 | var iHEX60gensym4_301990110 = 0; 505 | var i_570426543 = 0; 506 | Label3: { 507 | Label4: while (true) { 508 | if (!(i_570426543 < n_301990095)) break Label4; 509 | iHEX60gensym4_301990110 = i_570426543; 510 | result_301990092[result_301990092_Idx][chckIndx(addInt(old_301990096, iHEX60gensym4_301990110), 0, (result_301990092[result_301990092_Idx]).length - 1)] = x_301990093.charCodeAt(chckIndx(addInt(start_301990094, iHEX60gensym4_301990110), 0, (x_301990093).length - 1)); 511 | i_570426543 = addInt(i_570426543, 1); 512 | } 513 | }; 514 | }; 515 | 516 | 517 | } 518 | 519 | function addChars_301990086(result_301990088, result_301990088_Idx, x_301990089) { 520 | addChars_301990090(result_301990088, result_301990088_Idx, x_301990089, 0, ((x_301990089) == null ? 0 : (x_301990089).length)); 521 | 522 | 523 | } 524 | 525 | function addInt_301990111(result_301990112, result_301990112_Idx, x_301990113) { 526 | addChars_301990086(result_301990112, result_301990112_Idx, ((x_301990113) + "")); 527 | 528 | 529 | } 530 | 531 | function addInt_301990129(result_301990130, result_301990130_Idx, x_301990131) { 532 | addInt_301990111(result_301990130, result_301990130_Idx, BigInt(x_301990131)); 533 | 534 | 535 | } 536 | 537 | function HEX24_385875976(x_385875977) { 538 | var result_385875978 = [[]]; 539 | 540 | addInt_301990129(result_385875978, 0, x_385875977); 541 | 542 | return result_385875978[0]; 543 | 544 | } 545 | 546 | function isFatPointer_33557259(ti_33557260) { 547 | var result_33557261 = false; 548 | 549 | BeforeRet: { 550 | result_33557261 = !((ConstSet1[ti_33557260.base.kind] != undefined)); 551 | break BeforeRet; 552 | }; 553 | 554 | return result_33557261; 555 | 556 | } 557 | 558 | function nimCopyAux(dest_33557272, src_33557273, n_33557274) { 559 | switch (n_33557274.kind) { 560 | case 0: 561 | break; 562 | case 1: 563 | dest_33557272[n_33557274.offset] = nimCopy(dest_33557272[n_33557274.offset], src_33557273[n_33557274.offset], n_33557274.typ); 564 | 565 | break; 566 | case 2: 567 | for (var i = 0; i < n_33557274.sons.length; i++) { 568 | nimCopyAux(dest_33557272, src_33557273, n_33557274.sons[i]); 569 | } 570 | 571 | break; 572 | case 3: 573 | dest_33557272[n_33557274.offset] = nimCopy(dest_33557272[n_33557274.offset], src_33557273[n_33557274.offset], n_33557274.typ); 574 | for (var i = 0; i < n_33557274.sons.length; ++i) { 575 | nimCopyAux(dest_33557272, src_33557273, n_33557274.sons[i][1]); 576 | } 577 | 578 | break; 579 | } 580 | 581 | 582 | } 583 | 584 | function raiseIndexError(i_33556812, a_33556813, b_33556814) { 585 | var Temporary1; 586 | 587 | if ((b_33556814 < a_33556813)) { 588 | Temporary1 = [105,110,100,101,120,32,111,117,116,32,111,102,32,98,111,117,110,100,115,44,32,116,104,101,32,99,111,110,116,97,105,110,101,114,32,105,115,32,101,109,112,116,121]; 589 | } 590 | else { 591 | Temporary1 = ([105,110,100,101,120,32] || []).concat(HEX24_385875976(i_33556812) || [],[32,110,111,116,32,105,110,32] || [],HEX24_385875976(a_33556813) || [],[32,46,46,32] || [],HEX24_385875976(b_33556814) || []); 592 | } 593 | 594 | raiseException({message: nimCopy(null, Temporary1, NTI33554449), parent: null, m_type: NTI134217749, name: null, trace: [], up: null}, "IndexDefect"); 595 | 596 | 597 | } 598 | 599 | function sysFatal_268435501(message_268435504) { 600 | raiseException({message: nimCopy(null, message_268435504, NTI33554449), m_type: NTI134217745, parent: null, name: null, trace: [], up: null}, "AssertionDefect"); 601 | 602 | 603 | } 604 | 605 | function raiseAssert_268435499(msg_268435500) { 606 | sysFatal_268435501(msg_268435500); 607 | 608 | 609 | } 610 | 611 | function failedAssertImpl_268435541(msg_268435542) { 612 | raiseAssert_268435499(msg_268435542); 613 | 614 | 615 | } 616 | 617 | function onDOMLoaded(e_570425385) { 618 | 619 | function HEX3Aanonymous_570425409(event_570425410) { 620 | event_570425410.target.parentNode.style.display = "none"; 621 | event_570425410.target.parentNode.nextSibling.style.display = "inline"; 622 | 623 | 624 | } 625 | 626 | document.getElementById("theme-select").value = window.localStorage.getItem("theme"); 627 | Label1: { 628 | var pragmaDots_570425408 = null; 629 | var colontmp__570426534 = []; 630 | colontmp__570426534 = document.getElementsByClassName("pragmadots"); 631 | var i_570426536 = 0; 632 | var L_570426537 = (colontmp__570426534).length; 633 | Label2: { 634 | Label3: while (true) { 635 | if (!(i_570426536 < L_570426537)) break Label3; 636 | pragmaDots_570425408 = colontmp__570426534[chckIndx(i_570426536, 0, (colontmp__570426534).length - 1)]; 637 | pragmaDots_570425408.onclick = HEX3Aanonymous_570425409; 638 | i_570426536 = addInt(i_570426536, 1); 639 | if (!(((colontmp__570426534).length == L_570426537))) { 640 | failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it")); 641 | } 642 | 643 | } 644 | }; 645 | }; 646 | 647 | 648 | } 649 | 650 | function isWhitespace_570425752(x_570425753) { 651 | var result_570425754 = false; 652 | 653 | result_570425754 = (((x_570425753.nodeName == "#text") && !/\S/.test(x_570425753.textContent)) || (x_570425753.nodeName == "#comment")); 654 | 655 | return result_570425754; 656 | 657 | } 658 | 659 | function toToc_570425755(x_570425756, father_570425757) { 660 | var Temporary5; 661 | var Temporary6; 662 | var Temporary7; 663 | var Temporary8; 664 | var Temporary15; 665 | 666 | if ((x_570425756.nodeName == "UL")) { 667 | var f_570425765 = {heading: null, kids: [], sortId: (father_570425757.kids).length, doSort: false}; 668 | var i_570425766 = 0; 669 | Label1: { 670 | Label2: while (true) { 671 | if (!(i_570425766 < x_570425756.childNodes.length)) break Label2; 672 | var nxt_570425767 = addInt(i_570425766, 1); 673 | Label3: { 674 | Label4: while (true) { 675 | if (!(nxt_570425767 < x_570425756.childNodes.length)) Temporary5 = false; else { Temporary5 = isWhitespace_570425752(x_570425756.childNodes[nxt_570425767]); } if (!Temporary5) break Label4; 676 | nxt_570425767 = addInt(nxt_570425767, 1); 677 | } 678 | }; 679 | if (!(nxt_570425767 < x_570425756.childNodes.length)) Temporary8 = false; else { Temporary8 = (x_570425756.childNodes[i_570425766].nodeName == "LI"); } if (!Temporary8) Temporary7 = false; else { Temporary7 = (x_570425756.childNodes[i_570425766].childNodes.length == 1); } if (!Temporary7) Temporary6 = false; else { Temporary6 = (x_570425756.childNodes[nxt_570425767].nodeName == "UL"); } if (Temporary6) { 680 | var e_570425780 = {heading: x_570425756.childNodes[i_570425766].childNodes[0], kids: [], sortId: (f_570425765.kids).length, doSort: false}; 681 | var it_570425781 = x_570425756.childNodes[nxt_570425767]; 682 | Label9: { 683 | var j_570425786 = 0; 684 | var colontmp__570426550 = 0; 685 | colontmp__570426550 = it_570425781.childNodes.length; 686 | var i_570426551 = 0; 687 | Label10: { 688 | Label11: while (true) { 689 | if (!(i_570426551 < colontmp__570426550)) break Label11; 690 | j_570425786 = i_570426551; 691 | toToc_570425755(it_570425781.childNodes[j_570425786], e_570425780); 692 | i_570426551 = addInt(i_570426551, 1); 693 | } 694 | }; 695 | }; 696 | f_570425765.kids.push(e_570425780);; 697 | i_570425766 = addInt(nxt_570425767, 1); 698 | } 699 | else { 700 | toToc_570425755(x_570425756.childNodes[i_570425766], f_570425765); 701 | i_570425766 = addInt(i_570425766, 1); 702 | } 703 | 704 | } 705 | }; 706 | father_570425757.kids.push(f_570425765);; 707 | } 708 | else { 709 | if (isWhitespace_570425752(x_570425756)) { 710 | } 711 | else { 712 | if ((x_570425756.nodeName == "LI")) { 713 | var idx_570425804 = []; 714 | Label12: { 715 | var i_570425809 = 0; 716 | var colontmp__570426554 = 0; 717 | colontmp__570426554 = x_570425756.childNodes.length; 718 | var i_570426555 = 0; 719 | Label13: { 720 | Label14: while (true) { 721 | if (!(i_570426555 < colontmp__570426554)) break Label14; 722 | i_570425809 = i_570426555; 723 | if (!(isWhitespace_570425752(x_570425756.childNodes[i_570425809]))) { 724 | idx_570425804.push(i_570425809);; 725 | } 726 | 727 | i_570426555 = addInt(i_570426555, 1); 728 | } 729 | }; 730 | }; 731 | if (!((idx_570425804).length == 2)) Temporary15 = false; else { Temporary15 = (x_570425756.childNodes[idx_570425804[chckIndx(1, 0, (idx_570425804).length - 1)]].nodeName == "UL"); } if (Temporary15) { 732 | var e_570425825 = {heading: x_570425756.childNodes[idx_570425804[chckIndx(0, 0, (idx_570425804).length - 1)]], kids: [], sortId: (father_570425757.kids).length, doSort: false}; 733 | var it_570425826 = x_570425756.childNodes[idx_570425804[chckIndx(1, 0, (idx_570425804).length - 1)]]; 734 | Label16: { 735 | var j_570425831 = 0; 736 | var colontmp__570426558 = 0; 737 | colontmp__570426558 = it_570425826.childNodes.length; 738 | var i_570426559 = 0; 739 | Label17: { 740 | Label18: while (true) { 741 | if (!(i_570426559 < colontmp__570426558)) break Label18; 742 | j_570425831 = i_570426559; 743 | toToc_570425755(it_570425826.childNodes[j_570425831], e_570425825); 744 | i_570426559 = addInt(i_570426559, 1); 745 | } 746 | }; 747 | }; 748 | father_570425757.kids.push(e_570425825);; 749 | } 750 | else { 751 | Label19: { 752 | var i_570425840 = 0; 753 | var colontmp__570426562 = 0; 754 | colontmp__570426562 = x_570425756.childNodes.length; 755 | var i_570426563 = 0; 756 | Label20: { 757 | Label21: while (true) { 758 | if (!(i_570426563 < colontmp__570426562)) break Label21; 759 | i_570425840 = i_570426563; 760 | toToc_570425755(x_570425756.childNodes[i_570425840], father_570425757); 761 | i_570426563 = addInt(i_570426563, 1); 762 | } 763 | }; 764 | }; 765 | } 766 | 767 | } 768 | else { 769 | father_570425757.kids.push({heading: x_570425756, kids: [], sortId: (father_570425757.kids).length, doSort: false});; 770 | } 771 | }} 772 | 773 | 774 | } 775 | 776 | function extractItems_570425543(x_570425544, heading_570425545, items_570425546, items_570425546_Idx) { 777 | BeforeRet: { 778 | if ((x_570425544 == null)) { 779 | break BeforeRet; 780 | } 781 | 782 | if ((!((x_570425544.heading == null)) && (x_570425544.heading.textContent == heading_570425545))) { 783 | Label1: { 784 | var i_570425563 = 0; 785 | var colontmp__570426566 = 0; 786 | colontmp__570426566 = (x_570425544.kids).length; 787 | var i_570426567 = 0; 788 | Label2: { 789 | Label3: while (true) { 790 | if (!(i_570426567 < colontmp__570426566)) break Label3; 791 | i_570425563 = i_570426567; 792 | items_570425546[items_570425546_Idx].push(x_570425544.kids[chckIndx(i_570425563, 0, (x_570425544.kids).length - 1)].heading);; 793 | i_570426567 = addInt(i_570426567, 1); 794 | } 795 | }; 796 | }; 797 | } 798 | else { 799 | Label4: { 800 | var k_570425589 = null; 801 | var i_570426571 = 0; 802 | var L_570426572 = (x_570425544.kids).length; 803 | Label5: { 804 | Label6: while (true) { 805 | if (!(i_570426571 < L_570426572)) break Label6; 806 | k_570425589 = x_570425544.kids[chckIndx(i_570426571, 0, (x_570425544.kids).length - 1)]; 807 | extractItems_570425543(k_570425589, heading_570425545, items_570425546, items_570425546_Idx); 808 | i_570426571 = addInt(i_570426571, 1); 809 | if (!(((x_570425544.kids).length == L_570426572))) { 810 | failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it")); 811 | } 812 | 813 | } 814 | }; 815 | }; 816 | } 817 | 818 | }; 819 | 820 | 821 | } 822 | 823 | function tree_570425474(tag_570425475, kids_570425476) { 824 | var result_570425477 = null; 825 | 826 | result_570425477 = document.createElement(tag_570425475); 827 | Label1: { 828 | var k_570425491 = null; 829 | var i_570426584 = 0; 830 | Label2: { 831 | Label3: while (true) { 832 | if (!(i_570426584 < (kids_570425476).length)) break Label3; 833 | k_570425491 = kids_570425476[chckIndx(i_570426584, 0, (kids_570425476).length - 1)]; 834 | result_570425477.appendChild(k_570425491); 835 | i_570426584 = addInt(i_570426584, 1); 836 | } 837 | }; 838 | }; 839 | 840 | return result_570425477; 841 | 842 | } 843 | 844 | function text_570425499(s_570425500) { 845 | var result_570425501 = null; 846 | 847 | result_570425501 = document.createTextNode(s_570425500); 848 | 849 | return result_570425501; 850 | 851 | } 852 | 853 | function uncovered_570425944(x_570425945) { 854 | var Temporary1; 855 | 856 | var result_570425946 = null; 857 | 858 | BeforeRet: { 859 | if ((((x_570425945.kids).length == 0) && !((x_570425945.heading == null)))) { 860 | if (!(x_570425945.heading.hasOwnProperty('__karaxMarker__'))) { 861 | Temporary1 = x_570425945; 862 | } 863 | else { 864 | Temporary1 = null; 865 | } 866 | 867 | result_570425946 = Temporary1; 868 | break BeforeRet; 869 | } 870 | 871 | result_570425946 = {heading: x_570425945.heading, kids: [], sortId: x_570425945.sortId, doSort: x_570425945.doSort}; 872 | Label2: { 873 | var k_570425961 = null; 874 | var i_570426591 = 0; 875 | var L_570426592 = (x_570425945.kids).length; 876 | Label3: { 877 | Label4: while (true) { 878 | if (!(i_570426591 < L_570426592)) break Label4; 879 | k_570425961 = x_570425945.kids[chckIndx(i_570426591, 0, (x_570425945.kids).length - 1)]; 880 | var y_570425962 = uncovered_570425944(k_570425961); 881 | if (!((y_570425962 == null))) { 882 | result_570425946.kids.push(y_570425962);; 883 | } 884 | 885 | i_570426591 = addInt(i_570426591, 1); 886 | if (!(((x_570425945.kids).length == L_570426592))) { 887 | failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it")); 888 | } 889 | 890 | } 891 | }; 892 | }; 893 | if (((result_570425946.kids).length == 0)) { 894 | result_570425946 = null; 895 | } 896 | 897 | }; 898 | 899 | return result_570425946; 900 | 901 | } 902 | 903 | function mergeTocs_570425974(orig_570425975, news_570425976) { 904 | var result_570425977 = null; 905 | 906 | result_570425977 = uncovered_570425944(orig_570425975); 907 | if ((result_570425977 == null)) { 908 | result_570425977 = news_570425976; 909 | } 910 | else { 911 | Label1: { 912 | var i_570425989 = 0; 913 | var colontmp__570426587 = 0; 914 | colontmp__570426587 = (news_570425976.kids).length; 915 | var i_570426588 = 0; 916 | Label2: { 917 | Label3: while (true) { 918 | if (!(i_570426588 < colontmp__570426587)) break Label3; 919 | i_570425989 = i_570426588; 920 | result_570425977.kids.push(news_570425976.kids[chckIndx(i_570425989, 0, (news_570425976.kids).length - 1)]);; 921 | i_570426588 = addInt(i_570426588, 1); 922 | } 923 | }; 924 | }; 925 | } 926 | 927 | 928 | return result_570425977; 929 | 930 | } 931 | 932 | function buildToc_570425994(orig_570425995, types_570425996, procs_570425997) { 933 | var result_570425998 = null; 934 | 935 | var newStuff_570426003 = {heading: null, kids: [], doSort: true, sortId: 0}; 936 | Label1: { 937 | var t_570426007 = null; 938 | var i_570426579 = 0; 939 | var L_570426580 = (types_570425996).length; 940 | Label2: { 941 | Label3: while (true) { 942 | if (!(i_570426579 < L_570426580)) break Label3; 943 | t_570426007 = types_570425996[chckIndx(i_570426579, 0, (types_570425996).length - 1)]; 944 | var c_570426012 = {heading: t_570426007.cloneNode(true), kids: [], doSort: true, sortId: 0}; 945 | t_570426007.__karaxMarker__ = true; 946 | Label4: { 947 | var p_570426016 = null; 948 | var i_570426576 = 0; 949 | var L_570426577 = (procs_570425997).length; 950 | Label5: { 951 | Label6: while (true) { 952 | if (!(i_570426576 < L_570426577)) break Label6; 953 | p_570426016 = procs_570425997[chckIndx(i_570426576, 0, (procs_570425997).length - 1)]; 954 | if (!(p_570426016.hasOwnProperty('__karaxMarker__'))) { 955 | var xx_570426017 = p_570426016.parentNode.getElementsByClassName("attachedType"); 956 | if ((((xx_570426017).length == 1) && (xx_570426017[chckIndx(0, 0, (xx_570426017).length - 1)].textContent == t_570426007.textContent))) { 957 | var q_570426022 = tree_570425474("A", [text_570425499(p_570426016.title)]); 958 | q_570426022.setAttribute("href", p_570426016.getAttribute("href")); 959 | c_570426012.kids.push({heading: q_570426022, kids: [], sortId: 0, doSort: false});; 960 | p_570426016.__karaxMarker__ = true; 961 | } 962 | 963 | } 964 | 965 | i_570426576 = addInt(i_570426576, 1); 966 | if (!(((procs_570425997).length == L_570426577))) { 967 | failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it")); 968 | } 969 | 970 | } 971 | }; 972 | }; 973 | newStuff_570426003.kids.push(c_570426012);; 974 | i_570426579 = addInt(i_570426579, 1); 975 | if (!(((types_570425996).length == L_570426580))) { 976 | failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it")); 977 | } 978 | 979 | } 980 | }; 981 | }; 982 | result_570425998 = mergeTocs_570425974(orig_570425995, newStuff_570426003); 983 | 984 | return result_570425998; 985 | 986 | } 987 | 988 | function add_570425492(parent_570425493, kid_570425494) { 989 | if (((parent_570425493.nodeName == "TR") && ((kid_570425494.nodeName == "TD") || (kid_570425494.nodeName == "TH")))) { 990 | var k_570425495 = document.createElement("TD"); 991 | k_570425495.appendChild(kid_570425494); 992 | parent_570425493.appendChild(k_570425495); 993 | } 994 | else { 995 | parent_570425493.appendChild(kid_570425494); 996 | } 997 | 998 | 999 | 1000 | } 1001 | 1002 | function setClass_570425496(e_570425497, value_570425498) { 1003 | e_570425497.setAttribute("class", value_570425498); 1004 | 1005 | 1006 | } 1007 | 1008 | function toHtml_570425622(x_570425623, isRoot_570425624) { 1009 | 1010 | function HEX3Aanonymous_570425642(a_570425643, b_570425644) { 1011 | var result_570425645 = 0; 1012 | 1013 | BeforeRet: { 1014 | if ((!((a_570425643.heading == null)) && !((b_570425644.heading == null)))) { 1015 | var x_570425654 = a_570425643.heading.textContent; 1016 | var y_570425655 = b_570425644.heading.textContent; 1017 | if ((x_570425654 < y_570425655)) { 1018 | result_570425645 = (-1); 1019 | break BeforeRet; 1020 | } 1021 | 1022 | if ((y_570425655 < x_570425654)) { 1023 | result_570425645 = 1; 1024 | break BeforeRet; 1025 | } 1026 | 1027 | result_570425645 = 0; 1028 | break BeforeRet; 1029 | } 1030 | else { 1031 | result_570425645 = subInt(a_570425643.sortId, b_570425644.sortId); 1032 | break BeforeRet; 1033 | } 1034 | 1035 | }; 1036 | 1037 | return result_570425645; 1038 | 1039 | } 1040 | 1041 | var result_570425625 = null; 1042 | 1043 | BeforeRet: { 1044 | if ((x_570425623 == null)) { 1045 | result_570425625 = null; 1046 | break BeforeRet; 1047 | } 1048 | 1049 | if (((x_570425623.kids).length == 0)) { 1050 | if ((x_570425623.heading == null)) { 1051 | result_570425625 = null; 1052 | break BeforeRet; 1053 | } 1054 | 1055 | result_570425625 = x_570425623.heading.cloneNode(true); 1056 | break BeforeRet; 1057 | } 1058 | 1059 | result_570425625 = tree_570425474("DIV", []); 1060 | if ((!((x_570425623.heading == null)) && !(x_570425623.heading.hasOwnProperty('__karaxMarker__')))) { 1061 | add_570425492(result_570425625, x_570425623.heading.cloneNode(true)); 1062 | } 1063 | 1064 | var ul_570425641 = tree_570425474("UL", []); 1065 | if (isRoot_570425624) { 1066 | setClass_570425496(ul_570425641, "simple simple-toc"); 1067 | } 1068 | else { 1069 | setClass_570425496(ul_570425641, "simple"); 1070 | } 1071 | 1072 | if (x_570425623.doSort) { 1073 | x_570425623.kids.sort(HEX3Aanonymous_570425642); 1074 | } 1075 | 1076 | Label1: { 1077 | var k_570425667 = null; 1078 | var i_570426595 = 0; 1079 | var L_570426596 = (x_570425623.kids).length; 1080 | Label2: { 1081 | Label3: while (true) { 1082 | if (!(i_570426595 < L_570426596)) break Label3; 1083 | k_570425667 = x_570425623.kids[chckIndx(i_570426595, 0, (x_570425623.kids).length - 1)]; 1084 | var y_570425668 = toHtml_570425622(k_570425667, false); 1085 | if (!((y_570425668 == null))) { 1086 | add_570425492(ul_570425641, tree_570425474("LI", [y_570425668])); 1087 | } 1088 | 1089 | i_570426595 = addInt(i_570426595, 1); 1090 | if (!(((x_570425623.kids).length == L_570426596))) { 1091 | failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it")); 1092 | } 1093 | 1094 | } 1095 | }; 1096 | }; 1097 | if (!((ul_570425641.childNodes.length == 0))) { 1098 | add_570425492(result_570425625, ul_570425641); 1099 | } 1100 | 1101 | if ((result_570425625.childNodes.length == 0)) { 1102 | result_570425625 = null; 1103 | } 1104 | 1105 | }; 1106 | 1107 | return result_570425625; 1108 | 1109 | } 1110 | 1111 | function replaceById_570425502(id_570425503, newTree_570425504) { 1112 | var x_570425505 = document.getElementById(id_570425503); 1113 | x_570425505.parentNode.replaceChild(newTree_570425504, x_570425505); 1114 | newTree_570425504.id = id_570425503; 1115 | 1116 | 1117 | } 1118 | 1119 | function togglevis_570426052(d_570426053) { 1120 | if ((d_570426053.style.display == "none")) { 1121 | d_570426053.style.display = "inline"; 1122 | } 1123 | else { 1124 | d_570426053.style.display = "none"; 1125 | } 1126 | 1127 | 1128 | 1129 | } 1130 | 1131 | function groupBy(value_570426055) { 1132 | var toc_570426056 = document.getElementById("toc-list"); 1133 | if ((alternative_570426051[0] == null)) { 1134 | var tt_570426064 = {heading: null, kids: [], sortId: 0, doSort: false}; 1135 | toToc_570425755(toc_570426056, tt_570426064); 1136 | tt_570426064 = tt_570426064.kids[chckIndx(0, 0, (tt_570426064.kids).length - 1)]; 1137 | var types_570426069 = [[]]; 1138 | var procs_570426074 = [[]]; 1139 | extractItems_570425543(tt_570426064, "Types", types_570426069, 0); 1140 | extractItems_570425543(tt_570426064, "Procs", procs_570426074, 0); 1141 | extractItems_570425543(tt_570426064, "Converters", procs_570426074, 0); 1142 | extractItems_570425543(tt_570426064, "Methods", procs_570426074, 0); 1143 | extractItems_570425543(tt_570426064, "Templates", procs_570426074, 0); 1144 | extractItems_570425543(tt_570426064, "Macros", procs_570426074, 0); 1145 | extractItems_570425543(tt_570426064, "Iterators", procs_570426074, 0); 1146 | var ntoc_570426075 = buildToc_570425994(tt_570426064, types_570426069[0], procs_570426074[0]); 1147 | var x_570426076 = toHtml_570425622(ntoc_570426075, true); 1148 | alternative_570426051[0] = tree_570425474("DIV", [x_570426076]); 1149 | } 1150 | 1151 | if ((value_570426055 == "type")) { 1152 | replaceById_570425502("tocRoot", alternative_570426051[0]); 1153 | } 1154 | else { 1155 | replaceById_570425502("tocRoot", tree_570425474("DIV", [])); 1156 | } 1157 | 1158 | togglevis_570426052(document.getElementById("toc-list")); 1159 | 1160 | 1161 | } 1162 | 1163 | function HEX5BHEX5D_738198811(s_738198814, x_738198815) { 1164 | var result_738198816 = []; 1165 | 1166 | var a_738198818 = x_738198815.a; 1167 | var L_738198820 = addInt(subInt(subInt((s_738198814).length, x_738198815.b), a_738198818), 1); 1168 | result_738198816 = nimCopy(null, mnewString(chckRange(L_738198820, 0, 2147483647)), NTI33554449); 1169 | Label1: { 1170 | var i_738198825 = 0; 1171 | var i_570426605 = 0; 1172 | Label2: { 1173 | Label3: while (true) { 1174 | if (!(i_570426605 < L_738198820)) break Label3; 1175 | i_738198825 = i_570426605; 1176 | result_738198816[chckIndx(i_738198825, 0, (result_738198816).length - 1)] = s_738198814[chckIndx(addInt(i_738198825, a_738198818), 0, (s_738198814).length - 1)]; 1177 | i_570426605 = addInt(i_570426605, 1); 1178 | } 1179 | }; 1180 | }; 1181 | 1182 | return result_738198816; 1183 | 1184 | } 1185 | 1186 | function HEX2EHEX2E_973078632(a_973078635, b_973078636) { 1187 | var result_973078639 = ({a: 0, b: 0}); 1188 | 1189 | result_973078639 = nimCopy(result_973078639, {a: a_973078635, b: b_973078636}, NTI973078613); 1190 | 1191 | return result_973078639; 1192 | 1193 | } 1194 | async function loadIndex_570426270() { 1195 | var result_570426272 = null; 1196 | 1197 | BeforeRet: { 1198 | var indexURL_570426278 = document.getElementById("indexLink").getAttribute("href"); 1199 | var rootURL_570426304 = HEX5BHEX5D_738198811(cstrToNimstr(indexURL_570426278), HEX2EHEX2E_973078632(0, 14)); 1200 | var resp_570426316 = (await (await fetch(indexURL_570426278)).text()); 1201 | var indexElem_570426317 = document.createElement("div"); 1202 | indexElem_570426317.innerHTML = resp_570426316; 1203 | Label1: { 1204 | var href_570426339 = null; 1205 | var colontmp__570426599 = []; 1206 | colontmp__570426599 = indexElem_570426317.getElementsByClassName("reference"); 1207 | var i_570426601 = 0; 1208 | var L_570426602 = (colontmp__570426599).length; 1209 | Label2: { 1210 | Label3: while (true) { 1211 | if (!(i_570426601 < L_570426602)) break Label3; 1212 | href_570426339 = colontmp__570426599[chckIndx(i_570426601, 0, (colontmp__570426599).length - 1)]; 1213 | href_570426339.setAttribute("href", toJSStr((rootURL_570426304 || []).concat(cstrToNimstr(href_570426339.getAttribute("href")) || []))); 1214 | db_570426093[0].push(href_570426339);; 1215 | contents_570426094[0].push(href_570426339.getAttribute("data-doc-search-tag"));; 1216 | i_570426601 = addInt(i_570426601, 1); 1217 | if (!(((colontmp__570426599).length == L_570426602))) { 1218 | failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it")); 1219 | } 1220 | 1221 | } 1222 | }; 1223 | }; 1224 | result_570426272 = undefined; 1225 | break BeforeRet; 1226 | }; 1227 | 1228 | return result_570426272; 1229 | 1230 | } 1231 | 1232 | function then_570426448(future_570426451, onSuccess_570426452, onReject_570426453) { 1233 | var result_570426454 = null; 1234 | 1235 | BeforeRet: { 1236 | var ret_570426464 = null; 1237 | ret_570426464 = future_570426451.then(onSuccess_570426452, onReject_570426453) 1238 | result_570426454 = ret_570426464; 1239 | break BeforeRet; 1240 | }; 1241 | 1242 | return result_570426454; 1243 | 1244 | } 1245 | 1246 | function nsuToLowerAsciiChar(c_738197589) { 1247 | var result_738197590 = 0; 1248 | 1249 | if ((ConstSet2[c_738197589] != undefined)) { 1250 | result_738197590 = (c_738197589 ^ 32); 1251 | } 1252 | else { 1253 | result_738197590 = c_738197589; 1254 | } 1255 | 1256 | 1257 | return result_738197590; 1258 | 1259 | } 1260 | 1261 | function fuzzyMatch_721420304(pattern_721420305, str_721420306) { 1262 | var Temporary4; 1263 | var Temporary5; 1264 | var Temporary6; 1265 | var Temporary7; 1266 | var Temporary8; 1267 | 1268 | var result_721420309 = {Field0: 0, Field1: false}; 1269 | 1270 | var scoreState_721420310 = (-100); 1271 | var headerMatched_721420311 = false; 1272 | var unmatchedLeadingCharCount_721420312 = 0; 1273 | var consecutiveMatchCount_721420313 = 0; 1274 | var strIndex_721420314 = 0; 1275 | var patIndex_721420315 = 0; 1276 | var score_721420316 = 0; 1277 | Label1: { 1278 | Label2: while (true) { 1279 | if (!((strIndex_721420314 < ((str_721420306) == null ? 0 : (str_721420306).length)) && (patIndex_721420315 < ((pattern_721420305) == null ? 0 : (pattern_721420305).length)))) break Label2; 1280 | Label3: { 1281 | var patternChar_721420319 = nsuToLowerAsciiChar(pattern_721420305.charCodeAt(chckIndx(patIndex_721420315, 0, (pattern_721420305).length - 1))); 1282 | var strChar_721420320 = nsuToLowerAsciiChar(str_721420306.charCodeAt(chckIndx(strIndex_721420314, 0, (str_721420306).length - 1))); 1283 | if ((ConstSet3[patternChar_721420319] != undefined)) { 1284 | patIndex_721420315 = addInt(patIndex_721420315, 1); 1285 | break Label3; 1286 | } 1287 | 1288 | if ((ConstSet4[strChar_721420320] != undefined)) { 1289 | strIndex_721420314 = addInt(strIndex_721420314, 1); 1290 | break Label3; 1291 | } 1292 | 1293 | if ((!(headerMatched_721420311) && (strChar_721420320 == 58))) { 1294 | headerMatched_721420311 = true; 1295 | scoreState_721420310 = (-100); 1296 | score_721420316 = ((Math.floor((0.5 * score_721420316))) | 0); 1297 | patIndex_721420315 = 0; 1298 | strIndex_721420314 = addInt(strIndex_721420314, 1); 1299 | break Label3; 1300 | } 1301 | 1302 | if ((strChar_721420320 == patternChar_721420319)) { 1303 | switch (scoreState_721420310) { 1304 | case (-100): 1305 | case 20: 1306 | scoreState_721420310 = 10; 1307 | break; 1308 | case 0: 1309 | scoreState_721420310 = 5; 1310 | score_721420316 = addInt(score_721420316, scoreState_721420310); 1311 | break; 1312 | case 10: 1313 | case 5: 1314 | consecutiveMatchCount_721420313 = addInt(consecutiveMatchCount_721420313, 1); 1315 | scoreState_721420310 = 5; 1316 | score_721420316 = addInt(score_721420316, mulInt(5, consecutiveMatchCount_721420313)); 1317 | if ((scoreState_721420310 == 10)) { 1318 | score_721420316 = addInt(score_721420316, 10); 1319 | } 1320 | 1321 | var onBoundary_721420372 = (patIndex_721420315 == ((pattern_721420305) == null ? -1 : (pattern_721420305).length - 1)); 1322 | if ((!(onBoundary_721420372) && (strIndex_721420314 < ((str_721420306) == null ? -1 : (str_721420306).length - 1)))) { 1323 | var nextPatternChar_721420373 = nsuToLowerAsciiChar(pattern_721420305.charCodeAt(chckIndx(addInt(patIndex_721420315, 1), 0, (pattern_721420305).length - 1))); 1324 | var nextStrChar_721420374 = nsuToLowerAsciiChar(str_721420306.charCodeAt(chckIndx(addInt(strIndex_721420314, 1), 0, (str_721420306).length - 1))); 1325 | if (!!((ConstSet5[nextStrChar_721420374] != undefined))) Temporary4 = false; else { Temporary4 = !((nextStrChar_721420374 == nextPatternChar_721420373)); } onBoundary_721420372 = Temporary4; 1326 | } 1327 | 1328 | if (onBoundary_721420372) { 1329 | scoreState_721420310 = 20; 1330 | score_721420316 = addInt(score_721420316, scoreState_721420310); 1331 | } 1332 | 1333 | break; 1334 | case (-1): 1335 | case (-3): 1336 | if (!((ConstSet6[str_721420306.charCodeAt(chckIndx(subInt(strIndex_721420314, 1), 0, (str_721420306).length - 1))] != undefined))) Temporary5 = true; else { if (!(ConstSet7[str_721420306.charCodeAt(chckIndx(subInt(strIndex_721420314, 1), 0, (str_721420306).length - 1))] != undefined)) Temporary6 = false; else { Temporary6 = (ConstSet8[str_721420306.charCodeAt(chckIndx(strIndex_721420314, 0, (str_721420306).length - 1))] != undefined); } Temporary5 = Temporary6; } var isLeadingChar_721420398 = Temporary5; 1337 | if (isLeadingChar_721420398) { 1338 | scoreState_721420310 = 10; 1339 | } 1340 | else { 1341 | scoreState_721420310 = 0; 1342 | score_721420316 = addInt(score_721420316, scoreState_721420310); 1343 | } 1344 | 1345 | break; 1346 | } 1347 | patIndex_721420315 = addInt(patIndex_721420315, 1); 1348 | } 1349 | else { 1350 | switch (scoreState_721420310) { 1351 | case (-100): 1352 | scoreState_721420310 = (-3); 1353 | score_721420316 = addInt(score_721420316, scoreState_721420310); 1354 | break; 1355 | case 5: 1356 | scoreState_721420310 = (-1); 1357 | score_721420316 = addInt(score_721420316, scoreState_721420310); 1358 | consecutiveMatchCount_721420313 = 0; 1359 | break; 1360 | case (-3): 1361 | if ((unmatchedLeadingCharCount_721420312 < 3)) { 1362 | scoreState_721420310 = (-3); 1363 | score_721420316 = addInt(score_721420316, scoreState_721420310); 1364 | } 1365 | 1366 | unmatchedLeadingCharCount_721420312 = addInt(unmatchedLeadingCharCount_721420312, 1); 1367 | break; 1368 | default: 1369 | scoreState_721420310 = (-1); 1370 | score_721420316 = addInt(score_721420316, scoreState_721420310); 1371 | break; 1372 | } 1373 | } 1374 | 1375 | strIndex_721420314 = addInt(strIndex_721420314, 1); 1376 | }; 1377 | } 1378 | }; 1379 | if (!(patIndex_721420315 == ((pattern_721420305) == null ? 0 : (pattern_721420305).length))) Temporary7 = false; else { if ((strIndex_721420314 == ((str_721420306) == null ? 0 : (str_721420306).length))) Temporary8 = true; else { Temporary8 = !((ConstSet9[str_721420306.charCodeAt(chckIndx(strIndex_721420314, 0, (str_721420306).length - 1))] != undefined)); } Temporary7 = Temporary8; } if (Temporary7) { 1380 | score_721420316 = addInt(score_721420316, 10); 1381 | } 1382 | 1383 | var colontmp__570426618 = nimMax(0, score_721420316); 1384 | var colontmp__570426619 = (0 < score_721420316); 1385 | result_721420309 = nimCopy(result_721420309, {Field0: colontmp__570426618, Field1: colontmp__570426619}, NTI721420302); 1386 | 1387 | return result_721420309; 1388 | 1389 | } 1390 | 1391 | function escapeCString_570426095(x_570426096, x_570426096_Idx) { 1392 | var s_570426097 = []; 1393 | Label1: { 1394 | var c_570426098 = 0; 1395 | var iHEX60gensym6_570426622 = 0; 1396 | var nHEX60gensym6_570426623 = ((x_570426096[x_570426096_Idx]) == null ? 0 : (x_570426096[x_570426096_Idx]).length); 1397 | Label2: { 1398 | Label3: while (true) { 1399 | if (!(iHEX60gensym6_570426622 < nHEX60gensym6_570426623)) break Label3; 1400 | c_570426098 = x_570426096[x_570426096_Idx].charCodeAt(chckIndx(iHEX60gensym6_570426622, 0, (x_570426096[x_570426096_Idx]).length - 1)); 1401 | switch (c_570426098) { 1402 | case 60: 1403 | s_570426097.push.apply(s_570426097, [38,108,116,59]);; 1404 | break; 1405 | case 62: 1406 | s_570426097.push.apply(s_570426097, [38,103,116,59]);; 1407 | break; 1408 | default: 1409 | addChar(s_570426097, c_570426098);; 1410 | break; 1411 | } 1412 | iHEX60gensym6_570426622 = addInt(iHEX60gensym6_570426622, 1); 1413 | } 1414 | }; 1415 | }; 1416 | x_570426096[x_570426096_Idx] = toJSStr(s_570426097); 1417 | 1418 | 1419 | } 1420 | 1421 | function dosearch_570426099(value_570426100) { 1422 | 1423 | function HEX3Aanonymous_570426127(a_570426132, b_570426133) { 1424 | var result_570426138 = 0; 1425 | 1426 | result_570426138 = subInt(b_570426133["Field1"], a_570426132["Field1"]); 1427 | 1428 | return result_570426138; 1429 | 1430 | } 1431 | 1432 | var result_570426101 = null; 1433 | 1434 | BeforeRet: { 1435 | if (((db_570426093[0]).length == 0)) { 1436 | break BeforeRet; 1437 | } 1438 | 1439 | var ul_570426105 = tree_570425474("UL", []); 1440 | result_570426101 = tree_570425474("DIV", []); 1441 | setClass_570425496(result_570426101, "search_results"); 1442 | var matches_570426110 = []; 1443 | Label1: { 1444 | var i_570426118 = 0; 1445 | var colontmp__570426609 = 0; 1446 | colontmp__570426609 = (db_570426093[0]).length; 1447 | var i_570426610 = 0; 1448 | Label2: { 1449 | Label3: while (true) { 1450 | if (!(i_570426610 < colontmp__570426609)) break Label3; 1451 | i_570426118 = i_570426610; 1452 | Label4: { 1453 | var c_570426119 = contents_570426094[0][chckIndx(i_570426118, 0, (contents_570426094[0]).length - 1)]; 1454 | if (((c_570426119 == "Examples") || (c_570426119 == "PEG construction"))) { 1455 | break Label4; 1456 | } 1457 | 1458 | var tmpTuple_570426120 = fuzzyMatch_721420304(value_570426100, c_570426119); 1459 | var score_570426121 = tmpTuple_570426120["Field0"]; 1460 | var matched_570426122 = tmpTuple_570426120["Field1"]; 1461 | if (matched_570426122) { 1462 | matches_570426110.push({Field0: db_570426093[0][chckIndx(i_570426118, 0, (db_570426093[0]).length - 1)], Field1: score_570426121});; 1463 | } 1464 | 1465 | }; 1466 | i_570426610 = addInt(i_570426610, 1); 1467 | } 1468 | }; 1469 | }; 1470 | matches_570426110.sort(HEX3Aanonymous_570426127); 1471 | Label5: { 1472 | var i_570426155 = 0; 1473 | var colontmp__570426613 = 0; 1474 | colontmp__570426613 = nimMin((matches_570426110).length, 29); 1475 | var i_570426614 = 0; 1476 | Label6: { 1477 | Label7: while (true) { 1478 | if (!(i_570426614 < colontmp__570426613)) break Label7; 1479 | i_570426155 = i_570426614; 1480 | matches_570426110[chckIndx(i_570426155, 0, (matches_570426110).length - 1)]["Field0"].innerHTML = matches_570426110[chckIndx(i_570426155, 0, (matches_570426110).length - 1)]["Field0"].getAttribute("data-doc-search-tag"); 1481 | escapeCString_570426095(matches_570426110[chckIndx(i_570426155, 0, (matches_570426110).length - 1)]["Field0"], "innerHTML"); 1482 | add_570425492(ul_570426105, tree_570425474("LI", [matches_570426110[chckIndx(i_570426155, 0, (matches_570426110).length - 1)]["Field0"]])); 1483 | i_570426614 = addInt(i_570426614, 1); 1484 | } 1485 | }; 1486 | }; 1487 | if ((ul_570426105.childNodes.length == 0)) { 1488 | add_570425492(result_570426101, tree_570425474("B", [text_570425499("no search results")])); 1489 | } 1490 | else { 1491 | add_570425492(result_570426101, tree_570425474("B", [text_570425499("search results")])); 1492 | add_570425492(result_570426101, ul_570426105); 1493 | } 1494 | 1495 | }; 1496 | 1497 | return result_570426101; 1498 | 1499 | } 1500 | 1501 | function search() { 1502 | 1503 | function wrapper_570426433() { 1504 | var elem_570426434 = document.getElementById("searchInput"); 1505 | var value_570426435 = elem_570426434.value; 1506 | if (!((((value_570426435) == null ? 0 : (value_570426435).length) == 0))) { 1507 | if ((oldtoc_570426428[0] == null)) { 1508 | oldtoc_570426428[0] = document.getElementById("tocRoot"); 1509 | } 1510 | 1511 | var results_570426439 = dosearch_570426099(value_570426435); 1512 | replaceById_570425502("tocRoot", results_570426439); 1513 | } 1514 | else { 1515 | if (!((oldtoc_570426428[0] == null))) { 1516 | replaceById_570425502("tocRoot", oldtoc_570426428[0]); 1517 | } 1518 | } 1519 | 1520 | 1521 | } 1522 | 1523 | if ((loadIndexFut_570426431[0] == null)) { 1524 | loadIndexFut_570426431[0] = loadIndex_570426270(); 1525 | var _ = then_570426448(loadIndexFut_570426431[0], wrapper_570426433, null); 1526 | } 1527 | 1528 | if (!((timer_570426429[0] == null))) { 1529 | clearTimeout(timer_570426429[0]); 1530 | } 1531 | 1532 | timer_570426429[0] = setTimeout(wrapper_570426433, 400); 1533 | 1534 | 1535 | } 1536 | 1537 | function copyToClipboard() { 1538 | 1539 | function updatePreTags() { 1540 | 1541 | const allPreTags = document.querySelectorAll("pre") 1542 | 1543 | allPreTags.forEach((e) => { 1544 | 1545 | const div = document.createElement("div") 1546 | div.classList.add("copyToClipBoard") 1547 | 1548 | const preTag = document.createElement("pre") 1549 | preTag.innerHTML = e.innerHTML 1550 | 1551 | const button = document.createElement("button") 1552 | button.value = e.textContent.replace('...', '') 1553 | button.classList.add("copyToClipBoardBtn") 1554 | button.style.cursor = "pointer" 1555 | 1556 | div.appendChild(preTag) 1557 | div.appendChild(button) 1558 | 1559 | e.outerHTML = div.outerHTML 1560 | 1561 | }) 1562 | } 1563 | 1564 | 1565 | function copyTextToClipboard(e) { 1566 | const clipBoardContent = e.target.value 1567 | navigator.clipboard.writeText(clipBoardContent).then(function() { 1568 | e.target.style.setProperty("--clipboard-image", "var(--clipboard-image-selected)") 1569 | }, function(err) { 1570 | console.error("Could not copy text: ", err); 1571 | }); 1572 | } 1573 | 1574 | window.addEventListener("click", (e) => { 1575 | if (e.target.classList.contains("copyToClipBoardBtn")) { 1576 | copyTextToClipboard(e) 1577 | } 1578 | }) 1579 | 1580 | window.addEventListener("mouseover", (e) => { 1581 | if (e.target.nodeName === "PRE") { 1582 | e.target.nextElementSibling.style.setProperty("--clipboard-image", "var(--clipboard-image-normal)") 1583 | } 1584 | }) 1585 | 1586 | window.addEventListener("DOMContentLoaded", updatePreTags) 1587 | 1588 | 1589 | 1590 | 1591 | } 1592 | var Temporary1; 1593 | var t_570425383 = window.localStorage.getItem("theme"); 1594 | if ((t_570425383 == null)) { 1595 | Temporary1 = "auto"; 1596 | } 1597 | else { 1598 | Temporary1 = t_570425383; 1599 | } 1600 | 1601 | setTheme(Temporary1); 1602 | var alternative_570426051 = [null]; 1603 | var db_570426093 = [[]]; 1604 | var contents_570426094 = [[]]; 1605 | var oldtoc_570426428 = [null]; 1606 | var timer_570426429 = [null]; 1607 | var loadIndexFut_570426431 = [null]; 1608 | copyToClipboard(); 1609 | window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1610 | --------------------------------------------------------------------------------