diff --git a/design/Solarized-light.tmTheme b/design/Solarized-light.tmTheme deleted file mode 100644 index f7f635f..0000000 --- a/design/Solarized-light.tmTheme +++ /dev/null @@ -1,434 +0,0 @@ - - - - - name - Solarized (light) - settings - - - settings - - background - #FDF6E3 - caret - #000000 - foreground - #586E75 - invisibles - #93A1A180 - lineHighlight - #EEE8D5 - selection - #073642 - - - - name - Comment - scope - comment - settings - - fontStyle - italic - foreground - #93A1A1 - - - - name - String - scope - string - settings - - foreground - #2AA198 - - - - name - Regexp - scope - string.regexp - settings - - foreground - #D30102 - - - - name - Number - scope - constant.numeric - settings - - foreground - #D33682 - - - - name - Variable - scope - variable.language, variable.other - settings - - foreground - #268BD2 - - - - name - Keyword - scope - keyword - settings - - foreground - #859900 - - - - name - Storage - scope - storage - settings - - fontStyle - bold - foreground - #073642 - - - - name - Class name - scope - entity.name.class, entity.name.type - settings - - foreground - #268BD2 - - - - name - Function name - scope - entity.name.function - settings - - foreground - #268BD2 - - - - name - Variable start - scope - punctuation.definition.variable - settings - - foreground - #859900 - - - - name - Embedded code markers - scope - punctuation.section.embedded.begin, punctuation.section.embedded.end - settings - - foreground - #D30102 - - - - name - Built-in constant - scope - constant.language, meta.preprocessor - settings - - foreground - #B58900 - - - - name - Support.construct - scope - support.function.construct, keyword.other.new - settings - - foreground - #D30102 - - - - name - User-defined constant - scope - constant.character, constant.other - settings - - foreground - #CB4B16 - - - - name - Inherited class - scope - entity.other.inherited-class - settings - - - - name - Function argument - scope - variable.parameter - settings - - - - name - Tag name - scope - entity.name.tag - settings - - foreground - #268BD2 - - - - name - Tag start/end - scope - punctuation.definition.tag.begin, punctuation.definition.tag.end - settings - - foreground - #93A1A1 - - - - name - Tag attribute - scope - entity.other.attribute-name - settings - - foreground - #93A1A1 - - - - name - Library function - scope - support.function - settings - - foreground - #268BD2 - - - - name - Continuation - scope - punctuation.separator.continuation - settings - - foreground - #D30102 - - - - name - Library constant - scope - support.constant - settings - - - - name - Library class/type - scope - support.type, support.class - settings - - foreground - #859900 - - - - name - Library Exception - scope - support.type.exception - settings - - foreground - #CB4B16 - - - - name - Library variable - scope - support.other.variable - settings - - - - name - Invalid - scope - invalid - settings - - - - name - diff: header - scope - meta.diff, meta.diff.header - settings - - background - #b58900 - fontStyle - italic - foreground - #E0EDDD - - - - name - diff: deleted - scope - markup.deleted - settings - - background - #eee8d5 - fontStyle - - foreground - #dc322f - - - - name - diff: changed - scope - markup.changed - settings - - background - #eee8d5 - fontStyle - - foreground - #cb4b16 - - - - name - diff: inserted - scope - markup.inserted - settings - - background - #eee8d5 - foreground - #219186 - - - - name - Markup Quote - scope - markup.quote - settings - - foreground - #859900 - - - - name - Markup Lists - scope - markup.list - settings - - foreground - #B58900 - - - - name - Markup Styling - scope - markup.bold, markup.italic - settings - - foreground - #D33682 - - - - name - Markup Inline - scope - markup.inline.raw - settings - - fontStyle - - foreground - #2AA198 - - - - name - Markup Headings - scope - markup.heading - settings - - foreground - #268BD2 - - - - name - Markup Setext Header - scope - markup.heading.setext - settings - - fontStyle - - foreground - #268BD2 - - - - - uuid - 38E819D9-AE02-452F-9231-ECC3B204AFD7 - - diff --git a/design/html/demo1.svg b/design/html/demo1.svg deleted file mode 100644 index 5df424e..0000000 --- a/design/html/demo1.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - Hello World New line - - - - - Hello World New line - - diff --git a/design/html/index1.html b/design/html/index1.html deleted file mode 100644 index c37c745..0000000 --- a/design/html/index1.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - Hello - World - New line - - - - - - - - Hello - World - New line - - - - - - Example InitialCoords - SVG's initial coordinate system - - - - - - - - - - - - (0,0) - (300,0) - (0,100) - - - - - diff --git a/sources/electron/app.js b/sources/electron/app.js deleted file mode 100644 index fed990c..0000000 --- a/sources/electron/app.js +++ /dev/null @@ -1,63 +0,0 @@ -// -// Plan to move it into nim in some future. - -const electron = require('electron') - // const electron = require('electron') - // Module to control application life. -const app = electron.app - // Module to create native browser window. - // const BrowserWindow = electron.BrowserWindow - -const path = require('path') -const url = require('url') - -// Keep a global reference of the window object, if you don't, the window will -// be closed automatically when the JavaScript object is garbage collected. -var mainWindow = null - -function createWindow() { - // Create the browser window. - mainWindow = new electron.BrowserWindow({ - width: 1200, - height: 800, - frame: true, - webPreferences: { experimentalFeatures: true } - }) - - // and load the index.html of the app. - mainWindow.loadURL(url.format({ - pathname: path.join(__dirname, 'index.html'), - protocol: 'file:', - slashes: true - })) - - - // Open the DevTools. - // mainWindow.webContents.openDevTools() - - // Emitted when the window is closed. - mainWindow.on('closed', function() { - // Dereference the window object, usually you would store windows - // in an array if your app supports multi windows, this is the time - // when you should delete the corresponding element. - app.quit() - }) - // mainWindow.maximize() - mainWindow.openDevTools() -} - -// This method will be called when Electron has finished -// initialization and is ready to create browser windows. -// Some APIs can only be used after this event occurs. -app.on('ready', createWindow) - -app.on('activate', function() { - // On OS X it's common to re-create a window in the app when the - // dock icon is clicked and there are no other windows open. - if (mainWindow === null) { - createWindow() - } -}) - -// In this file you can include the rest of your app's specific main process -// code. You can also put them in separate files and require them here. \ No newline at end of file diff --git a/sources/electron/config.nims b/sources/electron/config.nims deleted file mode 100644 index 7b8b99e..0000000 --- a/sources/electron/config.nims +++ /dev/null @@ -1,6 +0,0 @@ -import strutils, ospaths - -mode = ScriptMode.Verbose - -task build, "Build browser part": - exec "nim js -o=index.js index.nim" diff --git a/sources/electron/index.html b/sources/electron/index.html deleted file mode 100644 index 16640c1..0000000 --- a/sources/electron/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Hello React! - - - - -
- - - - - - - - - diff --git a/sources/electron/index.js b/sources/electron/index.js deleted file mode 100644 index cb35027..0000000 --- a/sources/electron/index.js +++ /dev/null @@ -1,1670 +0,0 @@ -/* Generated by the Nim Compiler v0.17.1 */ -/* (c) 2017 Andreas Rumpf */ - -var framePtr = null; -var excHandler = 0; -var lastJSError = null; -if (typeof Int8Array === 'undefined') Int8Array = Array; -if (typeof Int16Array === 'undefined') Int16Array = Array; -if (typeof Int32Array === 'undefined') Int32Array = Array; -if (typeof Uint8Array === 'undefined') Uint8Array = Array; -if (typeof Uint16Array === 'undefined') Uint16Array = Array; -if (typeof Uint32Array === 'undefined') Uint32Array = Array; -if (typeof Float32Array === 'undefined') Float32Array = Array; -if (typeof Float64Array === 'undefined') Float64Array = Array; -var NTI84242 = {size: 0,kind: 16,base: null,node: null,finalizer: null}; -var NTI53258 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; -var NTI75260 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; -var NTI53246 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; -var NTI102458 = {size: 0,kind: 16,base: null,node: null,finalizer: null}; -var NTI53254 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; -var NTI102452 = {size: 0,kind: 16,base: null,node: null,finalizer: null}; -var NTI53240 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; -var NTI50004 = {size: 0,kind: 31,base: null,node: null,finalizer: null}; -var NTI63009 = {size: 0, kind: 18, base: null, node: null, finalizer: null}; -var NTI53208 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; -var NTI50038 = {size: 0,kind: 28,base: null,node: null,finalizer: null}; -var NTI50040 = {size: 0,kind: 29,base: null,node: null,finalizer: null}; -var NTI53287 = {size: 0,kind: 22,base: null,node: null,finalizer: null}; -var NTI53224 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; -var NTI53238 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; -var NTI53242 = {size: 0, kind: 17, base: null, node: null, finalizer: null}; -var NNI53242 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; -NTI53242.node = NNI53242; -var NNI53238 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; -NTI53238.node = NNI53238; -NTI53287.base = NTI53224; -var NNI53224 = {kind: 2, len: 4, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI53287, name: "parent", sons: null}, -{kind: 1, offset: "name", len: 0, typ: NTI50040, name: "name", sons: null}, -{kind: 1, offset: "message", len: 0, typ: NTI50038, name: "msg", sons: null}, -{kind: 1, offset: "trace", len: 0, typ: NTI50038, name: "trace", sons: null}]}; -NTI53224.node = NNI53224; -var NNI53208 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; -NTI53208.node = NNI53208; -NTI53224.base = NTI53208; -NTI53238.base = NTI53224; -NTI53242.base = NTI53238; -var NNI63009 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI50040, name: "Field0", sons: null}, -{kind: 1, offset: "Field1", len: 0, typ: NTI50004, name: "Field1", sons: null}]}; -NTI63009.node = NNI63009; -var NNI53240 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; -NTI53240.node = NNI53240; -NTI53240.base = NTI53238; -NTI102452.base = NTI50040; -var NNI53254 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; -NTI53254.node = NNI53254; -NTI53254.base = NTI53224; -NTI102458.base = NTI50040; -var NNI53246 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; -NTI53246.node = NNI53246; -NTI53246.base = NTI53224; -var NNI75260 = {kind: 2, len: 89, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "background", len: 0, typ: NTI50040, name: "background", sons: null}, -{kind: 1, offset: "backgroundAttachment", len: 0, typ: NTI50040, name: "backgroundAttachment", sons: null}, -{kind: 1, offset: "backgroundColor", len: 0, typ: NTI50040, name: "backgroundColor", sons: null}, -{kind: 1, offset: "backgroundImage", len: 0, typ: NTI50040, name: "backgroundImage", sons: null}, -{kind: 1, offset: "backgroundPosition", len: 0, typ: NTI50040, name: "backgroundPosition", sons: null}, -{kind: 1, offset: "backgroundRepeat", len: 0, typ: NTI50040, name: "backgroundRepeat", sons: null}, -{kind: 1, offset: "border", len: 0, typ: NTI50040, name: "border", sons: null}, -{kind: 1, offset: "borderBottom", len: 0, typ: NTI50040, name: "borderBottom", sons: null}, -{kind: 1, offset: "borderBottomColor", len: 0, typ: NTI50040, name: "borderBottomColor", sons: null}, -{kind: 1, offset: "borderBottomStyle", len: 0, typ: NTI50040, name: "borderBottomStyle", sons: null}, -{kind: 1, offset: "borderBottomWidth", len: 0, typ: NTI50040, name: "borderBottomWidth", sons: null}, -{kind: 1, offset: "borderColor", len: 0, typ: NTI50040, name: "borderColor", sons: null}, -{kind: 1, offset: "borderLeft", len: 0, typ: NTI50040, name: "borderLeft", sons: null}, -{kind: 1, offset: "borderLeftColor", len: 0, typ: NTI50040, name: "borderLeftColor", sons: null}, -{kind: 1, offset: "borderLeftStyle", len: 0, typ: NTI50040, name: "borderLeftStyle", sons: null}, -{kind: 1, offset: "borderLeftWidth", len: 0, typ: NTI50040, name: "borderLeftWidth", sons: null}, -{kind: 1, offset: "borderRight", len: 0, typ: NTI50040, name: "borderRight", sons: null}, -{kind: 1, offset: "borderRightColor", len: 0, typ: NTI50040, name: "borderRightColor", sons: null}, -{kind: 1, offset: "borderRightStyle", len: 0, typ: NTI50040, name: "borderRightStyle", sons: null}, -{kind: 1, offset: "borderRightWidth", len: 0, typ: NTI50040, name: "borderRightWidth", sons: null}, -{kind: 1, offset: "borderStyle", len: 0, typ: NTI50040, name: "borderStyle", sons: null}, -{kind: 1, offset: "borderTop", len: 0, typ: NTI50040, name: "borderTop", sons: null}, -{kind: 1, offset: "borderTopColor", len: 0, typ: NTI50040, name: "borderTopColor", sons: null}, -{kind: 1, offset: "borderTopStyle", len: 0, typ: NTI50040, name: "borderTopStyle", sons: null}, -{kind: 1, offset: "borderTopWidth", len: 0, typ: NTI50040, name: "borderTopWidth", sons: null}, -{kind: 1, offset: "borderWidth", len: 0, typ: NTI50040, name: "borderWidth", sons: null}, -{kind: 1, offset: "bottom", len: 0, typ: NTI50040, name: "bottom", sons: null}, -{kind: 1, offset: "captionSide", len: 0, typ: NTI50040, name: "captionSide", sons: null}, -{kind: 1, offset: "clear", len: 0, typ: NTI50040, name: "clear", sons: null}, -{kind: 1, offset: "clip", len: 0, typ: NTI50040, name: "clip", sons: null}, -{kind: 1, offset: "color", len: 0, typ: NTI50040, name: "color", sons: null}, -{kind: 1, offset: "cursor", len: 0, typ: NTI50040, name: "cursor", sons: null}, -{kind: 1, offset: "direction", len: 0, typ: NTI50040, name: "direction", sons: null}, -{kind: 1, offset: "display", len: 0, typ: NTI50040, name: "display", sons: null}, -{kind: 1, offset: "emptyCells", len: 0, typ: NTI50040, name: "emptyCells", sons: null}, -{kind: 1, offset: "cssFloat", len: 0, typ: NTI50040, name: "cssFloat", sons: null}, -{kind: 1, offset: "font", len: 0, typ: NTI50040, name: "font", sons: null}, -{kind: 1, offset: "fontFamily", len: 0, typ: NTI50040, name: "fontFamily", sons: null}, -{kind: 1, offset: "fontSize", len: 0, typ: NTI50040, name: "fontSize", sons: null}, -{kind: 1, offset: "fontStretch", len: 0, typ: NTI50040, name: "fontStretch", sons: null}, -{kind: 1, offset: "fontStyle", len: 0, typ: NTI50040, name: "fontStyle", sons: null}, -{kind: 1, offset: "fontVariant", len: 0, typ: NTI50040, name: "fontVariant", sons: null}, -{kind: 1, offset: "fontWeight", len: 0, typ: NTI50040, name: "fontWeight", sons: null}, -{kind: 1, offset: "height", len: 0, typ: NTI50040, name: "height", sons: null}, -{kind: 1, offset: "left", len: 0, typ: NTI50040, name: "left", sons: null}, -{kind: 1, offset: "letterSpacing", len: 0, typ: NTI50040, name: "letterSpacing", sons: null}, -{kind: 1, offset: "lineHeight", len: 0, typ: NTI50040, name: "lineHeight", sons: null}, -{kind: 1, offset: "listStyle", len: 0, typ: NTI50040, name: "listStyle", sons: null}, -{kind: 1, offset: "listStyleImage", len: 0, typ: NTI50040, name: "listStyleImage", sons: null}, -{kind: 1, offset: "listStylePosition", len: 0, typ: NTI50040, name: "listStylePosition", sons: null}, -{kind: 1, offset: "listStyleType", len: 0, typ: NTI50040, name: "listStyleType", sons: null}, -{kind: 1, offset: "margin", len: 0, typ: NTI50040, name: "margin", sons: null}, -{kind: 1, offset: "marginBottom", len: 0, typ: NTI50040, name: "marginBottom", sons: null}, -{kind: 1, offset: "marginLeft", len: 0, typ: NTI50040, name: "marginLeft", sons: null}, -{kind: 1, offset: "marginRight", len: 0, typ: NTI50040, name: "marginRight", sons: null}, -{kind: 1, offset: "marginTop", len: 0, typ: NTI50040, name: "marginTop", sons: null}, -{kind: 1, offset: "maxHeight", len: 0, typ: NTI50040, name: "maxHeight", sons: null}, -{kind: 1, offset: "maxWidth", len: 0, typ: NTI50040, name: "maxWidth", sons: null}, -{kind: 1, offset: "minHeight", len: 0, typ: NTI50040, name: "minHeight", sons: null}, -{kind: 1, offset: "minWidth", len: 0, typ: NTI50040, name: "minWidth", sons: null}, -{kind: 1, offset: "overflow", len: 0, typ: NTI50040, name: "overflow", sons: null}, -{kind: 1, offset: "padding", len: 0, typ: NTI50040, name: "padding", sons: null}, -{kind: 1, offset: "paddingBottom", len: 0, typ: NTI50040, name: "paddingBottom", sons: null}, -{kind: 1, offset: "paddingLeft", len: 0, typ: NTI50040, name: "paddingLeft", sons: null}, -{kind: 1, offset: "paddingRight", len: 0, typ: NTI50040, name: "paddingRight", sons: null}, -{kind: 1, offset: "paddingTop", len: 0, typ: NTI50040, name: "paddingTop", sons: null}, -{kind: 1, offset: "pageBreakAfter", len: 0, typ: NTI50040, name: "pageBreakAfter", sons: null}, -{kind: 1, offset: "pageBreakBefore", len: 0, typ: NTI50040, name: "pageBreakBefore", sons: null}, -{kind: 1, offset: "position", len: 0, typ: NTI50040, name: "position", sons: null}, -{kind: 1, offset: "right", len: 0, typ: NTI50040, name: "right", sons: null}, -{kind: 1, offset: "scrollbar3dLightColor", len: 0, typ: NTI50040, name: "scrollbar3dLightColor", sons: null}, -{kind: 1, offset: "scrollbarArrowColor", len: 0, typ: NTI50040, name: "scrollbarArrowColor", sons: null}, -{kind: 1, offset: "scrollbarBaseColor", len: 0, typ: NTI50040, name: "scrollbarBaseColor", sons: null}, -{kind: 1, offset: "scrollbarDarkshadowColor", len: 0, typ: NTI50040, name: "scrollbarDarkshadowColor", sons: null}, -{kind: 1, offset: "scrollbarFaceColor", len: 0, typ: NTI50040, name: "scrollbarFaceColor", sons: null}, -{kind: 1, offset: "scrollbarHighlightColor", len: 0, typ: NTI50040, name: "scrollbarHighlightColor", sons: null}, -{kind: 1, offset: "scrollbarShadowColor", len: 0, typ: NTI50040, name: "scrollbarShadowColor", sons: null}, -{kind: 1, offset: "scrollbarTrackColor", len: 0, typ: NTI50040, name: "scrollbarTrackColor", sons: null}, -{kind: 1, offset: "tableLayout", len: 0, typ: NTI50040, name: "tableLayout", sons: null}, -{kind: 1, offset: "textAlign", len: 0, typ: NTI50040, name: "textAlign", sons: null}, -{kind: 1, offset: "textDecoration", len: 0, typ: NTI50040, name: "textDecoration", sons: null}, -{kind: 1, offset: "textIndent", len: 0, typ: NTI50040, name: "textIndent", sons: null}, -{kind: 1, offset: "textTransform", len: 0, typ: NTI50040, name: "textTransform", sons: null}, -{kind: 1, offset: "top", len: 0, typ: NTI50040, name: "top", sons: null}, -{kind: 1, offset: "verticalAlign", len: 0, typ: NTI50040, name: "verticalAlign", sons: null}, -{kind: 1, offset: "visibility", len: 0, typ: NTI50040, name: "visibility", sons: null}, -{kind: 1, offset: "width", len: 0, typ: NTI50040, name: "width", sons: null}, -{kind: 1, offset: "wordSpacing", len: 0, typ: NTI50040, name: "wordSpacing", sons: null}, -{kind: 1, offset: "zIndex", len: 0, typ: NTI50004, name: "zIndex", sons: null}]}; -NTI75260.node = NNI75260; -NTI75260.base = NTI53208; -var NNI53258 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []}; -NTI53258.node = NNI53258; -NTI53258.base = NTI53224; -NTI84242.base = NTI50040; -function makeNimstrLit(c_64003) { - - var ln = c_64003.length; - var result = new Array(ln + 1); - var i = 0; - for (; i < ln; ++i) { - result[i] = c_64003.charCodeAt(i); - } - result[i] = 0; // terminating zero - return result; - } -function setConstr() { - - var result = {}; - for (var i = 0; i < arguments.length; ++i) { - var x = arguments[i]; - if (typeof(x) == "object") { - for (var j = x[0]; j <= x[1]; ++j) { - result[j] = true; - } - } else { - result[x] = true; - } - } - return result; - } -var ConstSet1 = setConstr(17, 16, 4, 18, 27, 19, 23, 22, 21); -function nimCopy(dest_69217, src_69218, ti_69219) { - -var result_69629 = null; -switch (ti_69219.kind) { -case 21: case 22: case 23: case 5: if (!(isFatPointer_69201(ti_69219))) { -result_69629 = src_69218; -} -else { -result_69629 = [src_69218[0], src_69218[1]];} - - -break; -case 19: if (dest_69217 === null || dest_69217 === undefined) { - dest_69217 = {}; - } - else { - for (var key in dest_69217) { delete dest_69217[key]; } - } - for (var key in src_69218) { dest_69217[key] = src_69218[key]; } - result_69629 = dest_69217; - -break; -case 18: case 17: if (!((ti_69219.base == null))) { -result_69629 = nimCopy(dest_69217, src_69218, ti_69219.base); -} -else { -if ((ti_69219.kind == 17)) { -result_69629 = (dest_69217 === null || dest_69217 === undefined) ? {m_type: ti_69219} : dest_69217;} -else { -result_69629 = (dest_69217 === null || dest_69217 === undefined) ? {} : dest_69217;} -} -nimCopyAux(result_69629, src_69218, ti_69219.node); - -break; -case 24: case 4: case 27: case 16: if (src_69218 === null) { - result_69629 = null; - } - else { - if (dest_69217 === null || dest_69217 === undefined) { - dest_69217 = new Array(src_69218.length); - } - else { - dest_69217.length = src_69218.length; - } - result_69629 = dest_69217; - for (var i = 0; i < src_69218.length; ++i) { - result_69629[i] = nimCopy(result_69629[i], src_69218[i], ti_69219.base); - } - } - -break; -case 28: if (src_69218 !== null) { - result_69629 = src_69218.slice(0); - } - -break; -default: -result_69629 = src_69218; -break; -} -return result_69629; -} -function eqStrings(a_66603, b_66604) { - - if (a_66603 == b_66604) return true; - if ((!a_66603) || (!b_66604)) return false; - var alen = a_66603.length; - if (alen != b_66604.length) return false; - for (var i = 0; i < alen; ++i) - if (a_66603[i] != b_66604[i]) return false; - return true; - } -function arrayConstr(len_69664, value_69665, typ_69666) { - - var result = new Array(len_69664); - for (var i = 0; i < len_69664; ++i) result[i] = nimCopy(null, value_69665, typ_69666); - return result; - } -function cstrToNimstr(c_64203) { - - var ln = c_64203.length; - var result = new Array(ln); - var r = 0; - for (var i = 0; i < ln; ++i) { - var ch = c_64203.charCodeAt(i); - - if (ch < 128) { - result[r] = ch; - } - else if((ch > 127) && (ch < 2048)) { - result[r] = (ch >> 6) | 192; - ++r; - result[r] = (ch & 63) | 128; - } - else { - result[r] = (ch >> 12) | 224; - ++r; - result[r] = ((ch >> 6) & 63) | 128; - ++r; - result[r] = (ch & 63) | 128; - } - ++r; - } - result[r] = 0; // terminating zero - return result; - } -function toJSStr(s_64403) { - - var len = s_64403.length-1; - var asciiPart = new Array(len); - var fcc = String.fromCharCode; - var nonAsciiPart = null; - var nonAsciiOffset = 0; - for (var i = 0; i < len; ++i) { - if (nonAsciiPart !== null) { - var offset = (i - nonAsciiOffset) * 2; - var code = s_64403[i].toString(16); - if (code.length == 1) { - code = "0"+code; - } - nonAsciiPart[offset] = "%"; - nonAsciiPart[offset + 1] = code; - } - else if (s_64403[i] < 128) - asciiPart[i] = fcc(s_64403[i]); - else { - asciiPart.length = i; - nonAsciiOffset = i; - nonAsciiPart = new Array((len - i) * 2); - --i; - } - } - asciiPart = asciiPart.join(""); - return (nonAsciiPart === null) ? - asciiPart : asciiPart + decodeURIComponent(nonAsciiPart.join("")); - } -function raiseException(e_63406, ename_63407) { - -e_63406.name = ename_63407; -if ((excHandler == 0)) { -unhandledException(e_63406); -} - -e_63406.trace = nimCopy(null, rawWriteStackTrace_63228(), NTI50038); -throw e_63406;} -var toTag_102449 = nimCopy(null, ["#text", "#int", "#bool", "#vthunk", "#dthunk", "HTML", "HEAD", "TITLE", "BASE", "LINK", "META", "STYLE", "SCRIPT", "NOSCRIPT", "BODY", "SECTION", "NAV", "ARTICLE", "ASIDE", "H1", "H2", "H3", "H4", "H5", "H6", "HEADER", "FOOTER", "ADDRESS", "MAIN", "P", "HR", "PRE", "BLOCKQUOTE", "OL", "UL", "LI", "DL", "DT", "DD", "FIGURE", "FIGCAPTION", "DIV", "A", "EM", "STRONG", "SMALL", "S", "CITE", "QUOTE", "DFN", "ABBR", "DATA", "TIME", "CODE", "VAR", "SAMP", "KDB", "SUB", "SUP", "I", "B", "U", "MARK", "RUBY", "RT", "RP", "BDI", "DBO", "SPAN", "BR", "WBR", "INS", "DEL", "IMG", "IFRAME", "EMBED", "OBJECT", "PARAM", "VIDEO", "AUDIO", "SOURCE", "TRACK", "CANVAS", "MAP", "AREA", "SVG", "MATH", "TABLE", "CAPTION", "COLGROUP", "COL", "TBODY", "THEAD", "TFOOT", "TR", "TD", "TH", "FORM", "FIELDSET", "LEGEND", "LABEL", "INPUT", "BUTTON", "SELECT", "DATALIST", "OPTGROUP", "OPTION", "TEXTAREA", "KEYGEN", "OUTPUT", "PROGRESS", "METER", "DETAILS", "SUMMARY", "COMMAND", "MENU"], NTI102452); -function chckIndx(i_69803, a_69804, b_69805) { - -var Tmp1; -var result_69806 = 0; -BeforeRet: do { -if (!(a_69804 <= i_69803)) Tmp1 = false; else {Tmp1 = (i_69803 <= b_69805); }if (Tmp1) { -result_69806 = i_69803; -break BeforeRet; -} -else { -raiseIndexError(); -} - -} while (false); -return result_69806; -} -function addInt(a_66803, b_66804) { - - var result = a_66803 + b_66804; - if (result > 2147483647 || result < -2147483648) raiseOverflow(); - return result; - } -function subInt(a_67003, b_67004) { - - var result = a_67003 - b_67004; - if (result > 2147483647 || result < -2147483648) raiseOverflow(); - return result; - } -var toEventName_102455 = nimCopy(null, ["click", "contextmenu", "dblclick", "keyup", "keydown", "keypressed", "blur", "change", "scroll", "mousedown", "mouseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "drag", "dragend", "dragenter", "dragleave", "dragover", "dragstart", "drop", "keyupenter", "keyuplater"], NTI102458); -function chckRange(i_69809, a_69810, b_69811) { - -var Tmp1; -var result_69812 = 0; -BeforeRet: do { -if (!(a_69810 <= i_69809)) Tmp1 = false; else {Tmp1 = (i_69809 <= b_69811); }if (Tmp1) { -result_69812 = i_69809; -break BeforeRet; -} -else { -raiseRangeError(); -} - -} while (false); -return result_69812; -} -var toStyleAttrName_84239 = nimCopy(null, ["background", "backgroundAttachment", "backgroundColor", "backgroundImage", "backgroundPosition", "backgroundRepeat", "border", "borderBottom", "borderBottomColor", "borderBottomStyle", "borderBottomWidth", "borderColor", "borderLeft", "borderLeftColor", "borderLeftStyle", "borderLeftWidth", "borderRight", "borderRightColor", "borderRightStyle", "borderRightWidth", "borderStyle", "borderTop", "borderTopColor", "borderTopStyle", "borderTopWidth", "borderWidth", "bottom", "captionSide", "clear", "clip", "color", "cursor", "direction", "display", "emptyCells", "cssFloat", "font", "fontFamily", "fontSize", "fontStretch", "fontStyle", "fontVariant", "fontWeight", "height", "left", "letterSpacing", "lineHeight", "listStyle", "listStyleImage", "listStylePosition", "listStyleType", "margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "maxHeight", "maxWidth", "minHeight", "minWidth", "overflow", "padding", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "pageBreakAfter", "pageBreakBefore", "position", "right", "scrollbar3dLightColor", "scrollbarArrowColor", "scrollbarBaseColor", "scrollbarDarkshadowColor", "scrollbarFaceColor", "scrollbarHighlightColor", "scrollbarShadowColor", "scrollbarTrackColor", "tableLayout", "textAlign", "textDecoration", "textIndent", "textTransform", "top", "verticalAlign", "visibility", "width", "wordSpacing", "zIndex"], NTI84242); -function SetEq(a_65403, b_65404) { - - for (var elem in a_65403) { if (!b_65404[elem]) return false; } - for (var elem in b_65404) { if (!a_65403[elem]) return false; } - return true; - } -function nimMin(a_68839, b_68840) { - -var Tmp1; -var result_68841 = 0; -BeforeRet: do { -if ((a_68839 <= b_68840)) { -Tmp1 = a_68839; -} -else { -Tmp1 = b_68840; -} - -result_68841 = Tmp1; -break BeforeRet; -} while (false); -return result_68841; -} -var nimvm_55687 = false; -var nim_program_result = 0; -var globalRaiseHook_61005 = [null]; -var localRaiseHook_61010 = [null]; -var outOfMemHook_61013 = [null]; -function isFatPointer_69201(ti_69203) { - -var result_69204 = false; -BeforeRet: do { -result_69204 = !((ConstSet1[ti_69203.base.kind] != undefined)); -break BeforeRet; -} while (false); -return result_69204; -} -function nimCopyAux(dest_69222, src_69223, n_69225) { - -switch (n_69225.kind) { -case 0: -break; -case 1: dest_69222[n_69225.offset] = nimCopy(dest_69222[n_69225.offset], src_69223[n_69225.offset], n_69225.typ); - -break; -case 2: L1: do { -var i_69615 = 0; -var colontmp__69617 = 0; -colontmp__69617 = (n_69225.len - 1); -var res_69620 = 0; -L2: do { -L3: while (true) { -if (!(res_69620 <= colontmp__69617)) break L3; -i_69615 = res_69620; -nimCopyAux(dest_69222, src_69223, n_69225.sons[i_69615]); -res_69620 += 1; -} -} while(false); -} while(false); - -break; -case 3: dest_69222[n_69225.offset] = nimCopy(dest_69222[n_69225.offset], src_69223[n_69225.offset], n_69225.typ); - for (var i = 0; i < n_69225.sons.length; ++i) { - nimCopyAux(dest_69222, src_69223, n_69225.sons[i][1]); - } - -break; -} -} -function add_61029(x_61032, x_61032_Idx, y_61033) { - - var len = x_61032[0].length-1; - for (var i = 0; i < y_61033.length; ++i) { - x_61032[0][len] = y_61033.charCodeAt(i); - ++len; - } - x_61032[0][len] = 0 - } -function auxWriteStackTrace_63004(f_63006) { - -var Tmp3; -var result_63007 = [null]; -var it_63015 = f_63006; -var i_63016 = 0; -var total_63017 = 0; -var tempFrames_63021 = arrayConstr(64, {Field0: null, Field1: 0}, NTI63009); -L1: do { -L2: while (true) { -if (!!((it_63015 == null))) Tmp3 = false; else {Tmp3 = (i_63016 <= 63); }if (!Tmp3) break L2; -tempFrames_63021[i_63016].Field0 = it_63015.procname; -tempFrames_63021[i_63016].Field1 = it_63015.line; -i_63016 += 1; -total_63017 += 1; -it_63015 = it_63015.prev; -} -} while(false); -L4: do { -L5: while (true) { -if (!!((it_63015 == null))) break L5; -total_63017 += 1; -it_63015 = it_63015.prev; -} -} while(false); -result_63007[0] = nimCopy(null, makeNimstrLit(""), NTI50038); -if (!((total_63017 == i_63016))) { -if (result_63007[0] != null) { result_63007[0] = (result_63007[0].slice(0, -1)).concat(makeNimstrLit("(")); } else { result_63007[0] = makeNimstrLit("(");}; -if (result_63007[0] != null) { result_63007[0] = (result_63007[0].slice(0, -1)).concat(cstrToNimstr(((total_63017 - i_63016))+"")); } else { result_63007[0] = cstrToNimstr(((total_63017 - i_63016))+"");}; -if (result_63007[0] != null) { result_63007[0] = (result_63007[0].slice(0, -1)).concat(makeNimstrLit(" calls omitted) ...\x0A")); } else { result_63007[0] = makeNimstrLit(" calls omitted) ...\x0A");}; -} - -L6: do { -var j_63215 = 0; -var colontmp__63221 = 0; -colontmp__63221 = (i_63016 - 1); -var res_63224 = colontmp__63221; -L7: do { -L8: while (true) { -if (!(0 <= res_63224)) break L8; -j_63215 = res_63224; -add_61029(result_63007, 0, tempFrames_63021[j_63215].Field0); -if ((0 < tempFrames_63021[j_63215].Field1)) { -if (result_63007[0] != null) { result_63007[0] = (result_63007[0].slice(0, -1)).concat(makeNimstrLit(", line: ")); } else { result_63007[0] = makeNimstrLit(", line: ");}; -if (result_63007[0] != null) { result_63007[0] = (result_63007[0].slice(0, -1)).concat(cstrToNimstr((tempFrames_63021[j_63215].Field1)+"")); } else { result_63007[0] = cstrToNimstr((tempFrames_63021[j_63215].Field1)+"");}; -} - -if (result_63007[0] != null) { result_63007[0] = (result_63007[0].slice(0, -1)).concat(makeNimstrLit("\x0A")); } else { result_63007[0] = makeNimstrLit("\x0A");}; -res_63224 -= 1; -} -} while(false); -} while(false); -return result_63007[0]; -} -function rawWriteStackTrace_63228() { - -var result_63230 = null; -if (!((framePtr == null))) { -result_63230 = nimCopy(null, (makeNimstrLit("Traceback (most recent call last)\x0A").slice(0,-1)).concat(auxWriteStackTrace_63004(framePtr)), NTI50038); -} -else { -result_63230 = nimCopy(null, makeNimstrLit("No stack traceback available\x0A"), NTI50038); -} - -return result_63230; -} -function unhandledException(e_63253) { - -var Tmp1; -var buf_63254 = /**/[makeNimstrLit("")]; -if (!!(eqStrings(e_63253.message, null))) Tmp1 = false; else {Tmp1 = !((e_63253.message[0] == 0)); }if (Tmp1) { -if (buf_63254[0] != null) { buf_63254[0] = (buf_63254[0].slice(0, -1)).concat(makeNimstrLit("Error: unhandled exception: ")); } else { buf_63254[0] = makeNimstrLit("Error: unhandled exception: ");}; -if (buf_63254[0] != null) { buf_63254[0] = (buf_63254[0].slice(0, -1)).concat(e_63253.message); } else { buf_63254[0] = e_63253.message;}; -} -else { -if (buf_63254[0] != null) { buf_63254[0] = (buf_63254[0].slice(0, -1)).concat(makeNimstrLit("Error: unhandled exception")); } else { buf_63254[0] = makeNimstrLit("Error: unhandled exception");}; -} - -if (buf_63254[0] != null) { buf_63254[0] = (buf_63254[0].slice(0, -1)).concat(makeNimstrLit(" [")); } else { buf_63254[0] = makeNimstrLit(" [");}; -add_61029(buf_63254, 0, e_63253.name); -if (buf_63254[0] != null) { buf_63254[0] = (buf_63254[0].slice(0, -1)).concat(makeNimstrLit("]\x0A")); } else { buf_63254[0] = makeNimstrLit("]\x0A");}; -if (buf_63254[0] != null) { buf_63254[0] = (buf_63254[0].slice(0, -1)).concat(rawWriteStackTrace_63228()); } else { buf_63254[0] = rawWriteStackTrace_63228();}; -var cbuf_63401 = toJSStr(buf_63254[0]); -framePtr = null; - if (typeof(Error) !== "undefined") { - throw new Error(cbuf_63401); - } - else { - throw cbuf_63401; - } - } -function raiseOverflow() { - -var e_63840 = null; -e_63840 = {m_type: NTI53242, parent: null, name: null, message: null, trace: null}; -e_63840.message = nimCopy(null, makeNimstrLit("over- or underflow"), NTI50038); -e_63840.parent = null; -raiseException(e_63840, "OverflowError"); -} -function raiseDivByZero() { - -var e_63858 = null; -e_63858 = {m_type: NTI53240, parent: null, name: null, message: null, trace: null}; -e_63858.message = nimCopy(null, makeNimstrLit("division by zero"), NTI50038); -e_63858.parent = null; -raiseException(e_63858, "DivByZeroError"); -} -var objectID_106232 = /**/[0]; -var dirty_113054 = /**/[{}]; -var someDirty_113055 = [false]; -var vcomponents_113410 = /**/[{}]; -var dcomponents_113422 = /**/[{}]; -var toFocus_125021 = [null]; -var toFocusV_125022 = [null]; -var dorender_125487 = [null]; -var currentTree_125488 = [null]; -function key_125013(e_125015) { - -var result_125016 = 0; -var F={procname:"karax.key",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -if ((e_125015.hasOwnProperty("karaxKey"))) { -F.line = 13; -result_125016 = e_125015.karaxKey; -} -else { -F.line = 14; -result_125016 = -1; -} - -framePtr = F.prev; -return result_125016; -} -function raiseIndexError() { - -var e_63894 = null; -e_63894 = {m_type: NTI53254, parent: null, name: null, message: null, trace: null}; -e_63894.message = nimCopy(null, makeNimstrLit("index out of bounds"), NTI50038); -e_63894.parent = null; -raiseException(e_63894, "IndexError"); -} -function valueeq__102514(n_102516, v_102517) { - -var F={procname:"vdom.value=",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vdom.nim",line:0}; -framePtr = F; -F.line = 119; -n_102516.text = v_102517; -framePtr = F.prev; -} -function value_102510(n_102512) { - -var result_102513 = null; -var F={procname:"vdom.value",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vdom.nim",line:0}; -framePtr = F; -F.line = 118; -result_102513 = n_102512.text; -framePtr = F.prev; -return result_102513; -} -function wrapEvent_125047(d_125049, n_125050, k_125051, action_125052) { - -function laterWrapper_125078() { - -function colonanonymous__125087(ev_125089) { - -function wrapper_125090() { - -var F={procname:":anonymous.wrapper",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -F.line = 30; -valueeq__102514(n_125085, ev_125089.target.value); -F.line = 31; -action_125084(ev_125089, n_125085); -F.line = 54; -ev_125089.target.value = value_102510(n_125085); -framePtr = F.prev; -} -var F={procname:"laterWrapper.:anonymous",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -if (!((timer_125086 == null))) { -F.line = 55; -clearTimeout(timer_125086); -} - -F.line = 56; -timer_125086 = setTimeout(wrapper_125090, 400); -framePtr = F.prev; -} -var result_125083 = null; -var F={procname:"wrapEvent.laterWrapper",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -F.line = 50; -var action_125084 = action_125052; -F.line = 51; -var n_125085 = n_125050; -F.line = 52; -var timer_125086 = null; -F.line = 53; -result_125083 = colonanonymous__125087; -framePtr = F.prev; -return result_125083; -} -function enterWrapper_125064() { - -function colonanonymous__125072(ev_125074) { - -var F={procname:"enterWrapper.:anonymous",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -if ((ev_125074.keyCode == 13)) { -F.line = 30; -valueeq__102514(n_125071, ev_125074.target.value); -F.line = 31; -action_125070(ev_125074, n_125071); -F.line = 47; -ev_125074.target.value = value_102510(n_125071); -} - -framePtr = F.prev; -} -var result_125069 = null; -var F={procname:"wrapEvent.enterWrapper",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -F.line = 44; -var action_125070 = action_125052; -F.line = 45; -var n_125071 = n_125050; -F.line = 46; -result_125069 = colonanonymous__125072; -framePtr = F.prev; -return result_125069; -} -function stdWrapper_125053() { - -function colonanonymous__125061(ev_125063) { - -var F={procname:"stdWrapper.:anonymous",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -F.line = 41; -action_125059(ev_125063, n_125060); -framePtr = F.prev; -} -var result_125058 = null; -var F={procname:"wrapEvent.stdWrapper",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -F.line = 38; -var action_125059 = action_125052; -F.line = 39; -var n_125060 = n_125050; -F.line = 40; -result_125058 = colonanonymous__125061; -framePtr = F.prev; -return result_125058; -} -var F={procname:"karax.wrapEvent",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -F.line = 58; -switch (k_125051) { -case 24: F.line = 60; -d_125049.addEventListener("keyup", laterWrapper_125078(), false); - -break; -case 23: F.line = 62; -d_125049.addEventListener("keyup", enterWrapper_125064(), false); - -break; -default: -F.line = 64; -d_125049.addEventListener(toEventName_102455[chckIndx(k_125051, 0, toEventName_102455.length)-0], stdWrapper_125053(), false); -break; -} -framePtr = F.prev; -} -function sysFatal_71821(message_71827) { - -var F={procname:"sysFatal.sysFatal",prev:framePtr,filename:"lib/system.nim",line:0}; -framePtr = F; -F.line = 2661; -var e_71829 = null; -F.line = 2662; -e_71829 = {m_type: NTI53246, parent: null, name: null, message: null, trace: null}; -F.line = 2663; -e_71829.message = nimCopy(null, message_71827, NTI50038); -F.line = 2664; -raiseException(e_71829, "AssertionError"); -framePtr = F.prev; -} -function raiseAssert_71816(msg_71818) { - -var F={procname:"system.raiseAssert",prev:framePtr,filename:"lib/system.nim",line:0}; -framePtr = F; -F.line = 3554; -sysFatal_71821(msg_71818); -framePtr = F.prev; -} -function failedAssertImpl_71839(msg_71841) { - -var F={procname:"system.failedAssertImpl",prev:framePtr,filename:"lib/system.nim",line:0}; -framePtr = F; -F.line = 3562; -raiseAssert_71816(msg_71841); -framePtr = F.prev; -} -function raiseRangeError() { - -var e_63876 = null; -e_63876 = {m_type: NTI53258, parent: null, name: null, message: null, trace: null}; -e_63876.message = nimCopy(null, makeNimstrLit("value out of range"), NTI50038); -e_63876.parent = null; -raiseException(e_63876, "RangeError"); -} -function applyStyle_84504(n_84506, s_84507) { - -var F={procname:"vstyles.applyStyle",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vstyles.nim",line:0}; -framePtr = F; -F.line = 152; -n_84506.style = {m_type: NTI75260, background: null, backgroundAttachment: null, backgroundColor: null, backgroundImage: null, backgroundPosition: null, backgroundRepeat: null, border: null, borderBottom: null, borderBottomColor: null, borderBottomStyle: null, borderBottomWidth: null, borderColor: null, borderLeft: null, borderLeftColor: null, borderLeftStyle: null, borderLeftWidth: null, borderRight: null, borderRightColor: null, borderRightStyle: null, borderRightWidth: null, borderStyle: null, borderTop: null, borderTopColor: null, borderTopStyle: null, borderTopWidth: null, borderWidth: null, bottom: null, captionSide: null, clear: null, clip: null, color: null, cursor: null, direction: null, display: null, emptyCells: null, cssFloat: null, font: null, fontFamily: null, fontSize: null, fontStretch: null, fontStyle: null, fontVariant: null, fontWeight: null, height: null, left: null, letterSpacing: null, lineHeight: null, listStyle: null, listStyleImage: null, listStylePosition: null, listStyleType: null, margin: null, marginBottom: null, marginLeft: null, marginRight: null, marginTop: null, maxHeight: null, maxWidth: null, minHeight: null, minWidth: null, overflow: null, padding: null, paddingBottom: null, paddingLeft: null, paddingRight: null, paddingTop: null, pageBreakAfter: null, pageBreakBefore: null, position: null, right: null, scrollbar3dLightColor: null, scrollbarArrowColor: null, scrollbarBaseColor: null, scrollbarDarkshadowColor: null, scrollbarFaceColor: null, scrollbarHighlightColor: null, scrollbarShadowColor: null, scrollbarTrackColor: null, tableLayout: null, textAlign: null, textDecoration: null, textIndent: null, textTransform: null, top: null, verticalAlign: null, visibility: null, width: null, wordSpacing: null, zIndex: 0}; -L1: do { -F.line = 153; -var x_84515 = 0; -F.line = 2090; -var colontmp__84518 = {}; -F.line = 153; -colontmp__84518 = s_84507.mask; -F.line = 2094; -var i_84521 = 0; -L2: do { -F.line = 2095; -L3: while (true) { -if (!(i_84521 <= 88)) break L3; -if ((colontmp__84518[chckRange(i_84521, 0, 88)] != undefined)) { -F.line = 2096; -x_84515 = chckRange(i_84521, 0, 88); -F.line = 154; -n_84506.style[toStyleAttrName_84239[chckIndx(x_84515, 0, toStyleAttrName_84239.length)-0]] = s_84507.attrs[chckIndx(x_84515, 0, s_84507.attrs.length)-0]; -} - -F.line = 2097; -i_84521 = addInt(i_84521, 1); -} -} while(false); -} while(false); -framePtr = F.prev; -} -function vnodeToDom_125120(n_125122) { - -var result_125123 = null; -var F={procname:"karax.vnodeToDom",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -BeforeRet: do { -if ((n_125122.kind == 0)) { -F.line = 73; -result_125123 = document.createTextNode(n_125122.text); -F.line = 74; -n_125122.dom = result_125123; -} -else { -if ((n_125122.kind == 3)) { -F.line = 76; -var x_125163 = vcomponents_113410[0][n_125122.text](n_125122.kids); -F.line = 77; -result_125123 = vnodeToDom_125120(x_125163); -F.line = 78; -n_125122.key = key_125013(result_125123); -F.line = 79; -n_125122.dom = result_125123; -F.line = 80; -break BeforeRet; -} -else { -if ((n_125122.kind == 4)) { -F.line = 82; -result_125123 = dcomponents_113422[0][n_125122.text](n_125122.kids); -F.line = 83; -n_125122.key = key_125013(result_125123); -F.line = 84; -n_125122.dom = result_125123; -F.line = 85; -break BeforeRet; -} -else { -F.line = 87; -result_125123 = document.createElement(toTag_102449[chckIndx(n_125122.kind, 0, toTag_102449.length)-0]); -F.line = 88; -n_125122.dom = result_125123; -L1: do { -F.line = 89; -var k_125194 = null; -L2: do { -F.line = 185; -var i_125432 = 0; -F.line = 3779; -var colontmp__125434 = 0; -F.line = 185; -colontmp__125434 = (n_125122.kids != null ? n_125122.kids.length : 0); -F.line = 3780; -var i_125436 = 0; -L3: do { -F.line = 3781; -L4: while (true) { -if (!(i_125436 < colontmp__125434)) break L4; -F.line = 3782; -i_125432 = i_125436; -F.line = 185; -k_125194 = n_125122.kids[chckIndx(i_125432, 0, n_125122.kids.length)-0]; -F.line = 90; -result_125123.appendChild(vnodeToDom_125120(k_125194)); -F.line = 3783; -i_125436 = addInt(i_125436, 1); -} -} while(false); -} while(false); -} while(false); -if (!((n_125122.text == null))) { -F.line = 93; -result_125123.value = n_125122.text; -} - -} -}} -if (!((n_125122.id == null))) { -F.line = 95; -result_125123.id = n_125122.id; -} - -if (!((n_125122.class == null))) { -F.line = 97; -result_125123.className = n_125122.class; -} - -if ((0 <= n_125122.key)) { -F.line = 99; -result_125123.karaxKey = n_125122.key; -} - -L5: do { -F.line = 100; -var k_125195 = null; -F.line = 100; -var v_125196 = null; -L6: do { -F.line = 188; -var i_125441 = 0; -F.line = 1965; -var colontmp__125443 = 0; -F.line = 188; -colontmp__125443 = subInt((n_125122.attrs != null ? n_125122.attrs.length : 0), 2); -F.line = 1955; -var res_125445 = 0; -L7: do { -F.line = 1956; -L8: while (true) { -if (!(res_125445 <= colontmp__125443)) break L8; -F.line = 1957; -i_125441 = res_125445; -F.line = 189; -k_125195 = n_125122.attrs[chckIndx(i_125441, 0, n_125122.attrs.length)-0]; -F.line = 189; -v_125196 = n_125122.attrs[chckIndx(addInt(i_125441, 1), 0, n_125122.attrs.length)-0]; -if (!((v_125196 == null))) { -F.line = 102; -result_125123.setAttribute(k_125195, v_125196); -} - -F.line = 1971; -res_125445 = addInt(res_125445, 2); -} -} while(false); -} while(false); -} while(false); -L9: do { -F.line = 103; -var e_125402 = 0; -F.line = 103; -var h_125403 = null; -F.line = 3586; -var colontmp__125449 = null; -F.line = 103; -colontmp__125449 = n_125122.events; -F.line = 3588; -var i_125452 = 0; -F.line = 3589; -var L_125454 = (colontmp__125449 != null ? colontmp__125449.length : 0); -L10: do { -F.line = 3590; -L11: while (true) { -if (!(i_125452 < L_125454)) break L11; -F.line = 3591; -e_125402 = colontmp__125449[chckIndx(i_125452, 0, colontmp__125449.length)-0]["Field0"]; -F.line = 3591; -h_125403 = colontmp__125449[chckIndx(i_125452, 0, colontmp__125449.length)-0]["Field1"]; -F.line = 104; -wrapEvent_125047(result_125123, n_125122, e_125402, h_125403); -F.line = 3592; -i_125452 = addInt(i_125452, 1); -if (!(((colontmp__125449 != null ? colontmp__125449.length : 0) == L_125454))) { -F.line = 3593; -failedAssertImpl_71839(makeNimstrLit("len(a) == L seq modified while iterating over it")); -} - -} -} while(false); -} while(false); -if (((n_125122 == toFocusV_125022[0]) && (toFocus_125021[0] === null))) { -F.line = 106; -toFocus_125021[0] = result_125123; -} - -if (!((n_125122.style === null))) { -F.line = 107; -applyStyle_84504(result_125123, n_125122.style); -} - -} while (false); -framePtr = F.prev; -return result_125123; -} -function replaceById_125491(id_125493, newTree_125494) { - -var F={procname:"karax.replaceById",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -F.line = 122; -var x_125495 = document.getElementById(id_125493); -F.line = 123; -x_125495.parentNode.replaceChild(newTree_125494, x_125495); -framePtr = F.prev; -} -function len_102823(x_102825) { - -var result_102826 = 0; -var F={procname:"vdom.len",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vdom.nim",line:0}; -framePtr = F; -F.line = 167; -result_102826 = (x_102825.kids != null ? x_102825.kids.length : 0); -framePtr = F.prev; -return result_102826; -} -function X5BX5D__102834(x_102836, idx_102837) { - -var result_102838 = null; -var F={procname:"vdom.[]",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vdom.nim",line:0}; -framePtr = F; -F.line = 168; -result_102838 = x_102836.kids[chckIndx(idx_102837, 0, x_102836.kids.length)-0]; -framePtr = F.prev; -return result_102838; -} -function sameAttrs_103001(a_103003, b_103004) { - -var result_103005 = false; -var F={procname:"vdom.sameAttrs",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vdom.nim",line:0}; -framePtr = F; -BeforeRet: do { -if (((a_103003.attrs != null ? a_103003.attrs.length : 0) == (b_103004.attrs != null ? b_103004.attrs.length : 0))) { -F.line = 193; -result_103005 = true; -L1: do { -F.line = 194; -var i_103036 = 0; -F.line = 3779; -var colontmp__103038 = 0; -F.line = 194; -colontmp__103038 = (a_103003.attrs != null ? a_103003.attrs.length : 0); -F.line = 3780; -var i_103041 = 0; -L2: do { -F.line = 3781; -L3: while (true) { -if (!(i_103041 < colontmp__103038)) break L3; -F.line = 3782; -i_103036 = i_103041; -if (!((a_103003.attrs[chckIndx(i_103036, 0, a_103003.attrs.length)-0] == b_103004.attrs[chckIndx(i_103036, 0, b_103004.attrs.length)-0]))) { -F.line = 195; -result_103005 = false; -break BeforeRet; -} - -F.line = 3783; -i_103041 = addInt(i_103041, 1); -} -} while(false); -} while(false); -} - -} while (false); -framePtr = F.prev; -return result_103005; -} -function eqeq__84263(a_84265, b_84266) { - -var result_84267 = false; -var F={procname:"vstyles.==",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vstyles.nim",line:0}; -framePtr = F; -BeforeRet: do { -if ((a_84265 === null)) { -if ((b_84266 === null)) { -F.line = 114; -result_84267 = true; -break BeforeRet; -} -else { -F.line = 115; -result_84267 = false; -break BeforeRet; -} - -} -else { -if ((b_84266 === null)) { -F.line = 116; -result_84267 = false; -break BeforeRet; -} -} -if (!(SetEq(a_84265.mask, b_84266.mask))) { -F.line = 117; -result_84267 = false; -break BeforeRet; -} - -L1: do { -F.line = 118; -var x_84334 = 0; -F.line = 2090; -var colontmp__84336 = {}; -F.line = 118; -colontmp__84336 = a_84265.mask; -F.line = 2094; -var i_84339 = 0; -L2: do { -F.line = 2095; -L3: while (true) { -if (!(i_84339 <= 88)) break L3; -if ((colontmp__84336[chckRange(i_84339, 0, 88)] != undefined)) { -F.line = 2096; -x_84334 = chckRange(i_84339, 0, 88); -if (!((a_84265.attrs[chckIndx(x_84334, 0, a_84265.attrs.length)-0] == b_84266.attrs[chckIndx(x_84334, 0, b_84266.attrs.length)-0]))) { -F.line = 119; -result_84267 = false; -break BeforeRet; -} - -} - -F.line = 2097; -i_84339 = addInt(i_84339, 1); -} -} while(false); -} while(false); -F.line = 120; -result_84267 = true; -break BeforeRet; -} while (false); -framePtr = F.prev; -return result_84267; -} -function equalsShallow_125496(a_125498, b_125499) { - -var Tmp1; -var result_125500 = false; -var F={procname:"karax.equalsShallow",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -BeforeRet: do { -if (!((a_125498.kind == b_125499.kind))) { -F.line = 127; -result_125500 = false; -break BeforeRet; -} - -if (!((a_125498.id == b_125499.id))) { -F.line = 128; -result_125500 = false; -break BeforeRet; -} - -if (!((a_125498.key == b_125499.key))) { -F.line = 129; -result_125500 = false; -break BeforeRet; -} - -if ((a_125498.kind == 0)) { -if (!((a_125498.text == b_125499.text))) { -F.line = 131; -result_125500 = false; -break BeforeRet; -} - -} -else { -if ((a_125498.kind == 3)) Tmp1 = true; else {Tmp1 = (a_125498.kind == 4); }if (Tmp1) { -if (!((a_125498.text == b_125499.text))) { -F.line = 133; -result_125500 = false; -break BeforeRet; -} - -if (!((len_102823(a_125498) == len_102823(b_125499)))) { -F.line = 134; -result_125500 = false; -break BeforeRet; -} - -L2: do { -F.line = 135; -var i_125545 = 0; -F.line = 3779; -var colontmp__125547 = 0; -F.line = 135; -colontmp__125547 = len_102823(a_125498); -F.line = 3780; -var i_125550 = 0; -L3: do { -F.line = 3781; -L4: while (true) { -if (!(i_125550 < colontmp__125547)) break L4; -F.line = 3782; -i_125545 = i_125550; -if (!(equalsShallow_125496(X5BX5D__102834(a_125498, i_125545), X5BX5D__102834(b_125499, i_125545)))) { -F.line = 136; -result_125500 = false; -break BeforeRet; -} - -F.line = 3783; -i_125550 = addInt(i_125550, 1); -} -} while(false); -} while(false); -} -} -if (!(sameAttrs_103001(a_125498, b_125499))) { -F.line = 137; -result_125500 = false; -break BeforeRet; -} - -if (!((a_125498.class == b_125499.class))) { -F.line = 138; -result_125500 = false; -break BeforeRet; -} - -if (!(eqeq__84263(a_125498.style, b_125499.style))) { -F.line = 139; -result_125500 = false; -break BeforeRet; -} - -F.line = 141; -result_125500 = true; -break BeforeRet; -} while (false); -framePtr = F.prev; -return result_125500; -} -function eq_102624(a_102626, b_102627) { - -var result_102628 = false; -var F={procname:"vdom.eq",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vdom.nim",line:0}; -framePtr = F; -BeforeRet: do { -if (!((a_102626.kind == b_102627.kind))) { -F.line = 137; -result_102628 = false; -break BeforeRet; -} - -if (!((a_102626.id == b_102627.id))) { -F.line = 138; -result_102628 = false; -break BeforeRet; -} - -if (!((a_102626.class == b_102627.class))) { -F.line = 139; -result_102628 = false; -break BeforeRet; -} - -if (!((a_102626.key == b_102627.key))) { -F.line = 140; -result_102628 = false; -break BeforeRet; -} - -if (!((a_102626.kind == 0))) { -if (!(((a_102626.kids != null ? a_102626.kids.length : 0) == (b_102627.kids != null ? b_102627.kids.length : 0)))) { -F.line = 142; -result_102628 = false; -break BeforeRet; -} - -L1: do { -F.line = 143; -var i_102676 = 0; -F.line = 3779; -var colontmp__102709 = 0; -F.line = 143; -colontmp__102709 = (a_102626.kids != null ? a_102626.kids.length : 0); -F.line = 3780; -var i_102712 = 0; -L2: do { -F.line = 3781; -L3: while (true) { -if (!(i_102712 < colontmp__102709)) break L3; -F.line = 3782; -i_102676 = i_102712; -if (!(eq_102624(a_102626.kids[chckIndx(i_102676, 0, a_102626.kids.length)-0], b_102627.kids[chckIndx(i_102676, 0, b_102627.kids.length)-0]))) { -F.line = 144; -result_102628 = false; -break BeforeRet; -} - -F.line = 3783; -i_102712 = addInt(i_102712, 1); -} -} while(false); -} while(false); -} - -if (!((a_102626.text == b_102627.text))) { -F.line = 145; -result_102628 = false; -break BeforeRet; -} - -if (!(((a_102626.attrs != null ? a_102626.attrs.length : 0) == (b_102627.attrs != null ? b_102627.attrs.length : 0)))) { -F.line = 146; -result_102628 = false; -break BeforeRet; -} - -L4: do { -F.line = 147; -var i_102707 = 0; -F.line = 3779; -var colontmp__102715 = 0; -F.line = 147; -colontmp__102715 = (a_102626.attrs != null ? a_102626.attrs.length : 0); -F.line = 3780; -var i_102718 = 0; -L5: do { -F.line = 3781; -L6: while (true) { -if (!(i_102718 < colontmp__102715)) break L6; -F.line = 3782; -i_102707 = i_102718; -if (!((a_102626.attrs[chckIndx(i_102707, 0, a_102626.attrs.length)-0] == b_102627.attrs[chckIndx(i_102707, 0, b_102627.attrs.length)-0]))) { -F.line = 148; -result_102628 = false; -break BeforeRet; -} - -F.line = 3783; -i_102718 = addInt(i_102718, 1); -} -} while(false); -} while(false); -if (!(eqeq__84263(a_102626.style, b_102627.style))) { -F.line = 149; -result_102628 = false; -break BeforeRet; -} - -F.line = 150; -result_102628 = true; -} while (false); -framePtr = F.prev; -return result_102628; -} -function equalsTree_125552(a_125554, b_125555) { - -var result_125556 = false; -var F={procname:"karax.equalsTree",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -F.line = 152; -result_125556 = eq_102624(a_125554, b_125555); -framePtr = F.prev; -return result_125556; -} -function updateElement_125663(parent_125665, current_125666, newNode_125667, oldNode_125668) { - -var Tmp5; -var Tmp6; -var F={procname:"karax.updateElement",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -if (!(equalsShallow_125496(newNode_125667, oldNode_125668))) { -F.line = 171; -oldNode_125668.dom = null; -F.line = 172; -var n_125669 = vnodeToDom_125120(newNode_125667); -if ((parent_125665 == null)) { -F.line = 174; -replaceById_125491("ROOT", n_125669); -} -else { -F.line = 176; -parent_125665.replaceChild(n_125669, current_125666); -} - -} -else { -if (!((newNode_125667.kind == 0))) { -F.line = 178; -var newLength_125690 = len_102823(newNode_125667); -F.line = 179; -var oldLength_125691 = len_102823(oldNode_125668); -F.line = 180; -var minLength_125692 = nimMin(newLength_125690, oldLength_125691); -if (!((oldNode_125668.kind == newNode_125667.kind))) { -F.line = 181; -failedAssertImpl_71839(makeNimstrLit("oldNode.kind == newNode.kind ")); -} - -F.line = 193; -var commonPrefix_126001 = 0; -L1: do { -F.line = 194; -L2: while (true) { -if (!((commonPrefix_126001 < minLength_125692) && equalsTree_125552(X5BX5D__102834(newNode_125667, commonPrefix_126001), X5BX5D__102834(oldNode_125668, commonPrefix_126001)))) break L2; -F.line = 196; -commonPrefix_126001 = addInt(commonPrefix_126001, 1); -} -} while(false); -F.line = 198; -var oldPos_126011 = subInt(oldLength_125691, 1); -F.line = 199; -var newPos_126012 = subInt(newLength_125690, 1); -L3: do { -F.line = 200; -L4: while (true) { -if (!(commonPrefix_126001 <= oldPos_126011)) Tmp6 = false; else {Tmp6 = (commonPrefix_126001 <= newPos_126012); }if (!Tmp6) Tmp5 = false; else {Tmp5 = equalsTree_125552(X5BX5D__102834(newNode_125667, newPos_126012), X5BX5D__102834(oldNode_125668, oldPos_126011)); }if (!Tmp5) break L4; -F.line = 202; -oldPos_126011 = subInt(oldPos_126011, 1); -F.line = 203; -newPos_126012 = subInt(newPos_126012, 1); -} -} while(false); -F.line = 205; -var pos_126031 = addInt(nimMin(oldPos_126011, newPos_126012), 1); -L7: do { -F.line = 206; -var i_126041 = 0; -F.line = 1973; -var colontmp__126083 = 0; -F.line = 206; -colontmp__126083 = subInt(pos_126031, 1); -F.line = 1955; -var res_126086 = commonPrefix_126001; -L8: do { -F.line = 1956; -L9: while (true) { -if (!(res_126086 <= colontmp__126083)) break L9; -F.line = 1957; -i_126041 = res_126086; -F.line = 207; -updateElement_125663(current_125666, current_125666.childNodes[chckIndx(i_126041, 0, current_125666.childNodes.length)-0], X5BX5D__102834(newNode_125667, i_126041), X5BX5D__102834(oldNode_125668, i_126041)); -F.line = 1976; -res_126086 = addInt(res_126086, 1); -} -} while(false); -} while(false); -F.line = 209; -var nextChildPos_126042 = addInt(oldPos_126011, 1); -L10: do { -F.line = 210; -L11: while (true) { -if (!(pos_126031 <= newPos_126012)) break L11; -if ((nextChildPos_126042 == oldLength_125691)) { -F.line = 212; -current_125666.appendChild(vnodeToDom_125120(X5BX5D__102834(newNode_125667, pos_126031))); -} -else { -F.line = 214; -current_125666.insertBefore(vnodeToDom_125120(X5BX5D__102834(newNode_125667, pos_126031)), current_125666.childNodes[chckIndx(nextChildPos_126042, 0, current_125666.childNodes.length)-0]); -} - -F.line = 216; -oldLength_125691 = addInt(oldLength_125691, 1); -F.line = 217; -pos_126031 = addInt(pos_126031, 1); -F.line = 218; -nextChildPos_126042 = addInt(nextChildPos_126042, 1); -} -} while(false); -L12: do { -F.line = 220; -var i_126079 = 0; -F.line = 1955; -var res_126094 = pos_126031; -L13: do { -F.line = 1956; -L14: while (true) { -if (!(res_126094 <= oldPos_126011)) break L14; -F.line = 1957; -i_126079 = res_126094; -F.line = 221; -X5BX5D__102834(oldNode_125668, i_126079).dom = null; -F.line = 222; -current_125666.removeChild(current_125666.childNodes[chckIndx(pos_126031, 0, current_125666.childNodes.length)-0]); -F.line = 1976; -res_126094 = addInt(res_126094, 1); -} -} while(false); -} while(false); -} -} -framePtr = F.prev; -} -function isDirty_113203(key_113205) { - -var result_113206 = false; -var F={procname:"components.isDirty",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/components.nim",line:0}; -framePtr = F; -F.line = 26; -result_113206 = dirty_113054[0].hasOwnProperty(key_113205); -framePtr = F.prev; -return result_113206; -} -function unmarkDirty_113078(key_113080) { - -var F={procname:"components.unmarkDirty",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/components.nim",line:0}; -framePtr = F; -F.line = 25; -delete dirty_113054[0][key_113080]; -framePtr = F.prev; -} -function updateDirtyElements_125601(parent_125603, current_125604, newNode_125605) { - -var Tmp1; -var Tmp2; -var Tmp3; -var F={procname:"karax.updateDirtyElements",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -if (!(0 <= newNode_125605.key)) Tmp1 = false; else {Tmp1 = isDirty_113203(newNode_125605.key); }if (Tmp1) { -F.line = 156; -unmarkDirty_113078(newNode_125605.key); -F.line = 157; -var n_125606 = vnodeToDom_125120(newNode_125605); -if ((parent_125603 == null)) { -F.line = 159; -replaceById_125491("ROOT", n_125606); -} -else { -F.line = 161; -parent_125603.replaceChild(n_125606, current_125604); -} - -} -else { -if (!!((newNode_125605.kind == 0))) Tmp3 = false; else {Tmp3 = !((newNode_125605.kind == 3)); }if (!Tmp3) Tmp2 = false; else {Tmp2 = !((newNode_125605.kind == 4)); }if (Tmp2) { -L4: do { -F.line = 164; -var i_125654 = 0; -F.line = 1973; -var colontmp__125656 = 0; -F.line = 164; -colontmp__125656 = subInt(len_102823(newNode_125605), 1); -F.line = 1955; -var res_125659 = 0; -L5: do { -F.line = 1956; -L6: while (true) { -if (!(res_125659 <= colontmp__125656)) break L6; -F.line = 1957; -i_125654 = res_125659; -F.line = 165; -updateDirtyElements_125601(current_125604, current_125604.childNodes[i_125654], X5BX5D__102834(newNode_125605, i_125654)); -F.line = 1976; -res_125659 = addInt(res_125659, 1); -} -} while(false); -} while(false); -} -} -framePtr = F.prev; -} -function dodraw_126201() { - -var F={procname:"karax.dodraw",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -BeforeRet: do { -if ((dorender_125487[0] === null)) { -F.line = 228; -break BeforeRet; -} - -F.line = 229; -var newtree_126209 = dorender_125487[0](); -F.line = 230; -newtree_126209.id = "ROOT"; -F.line = 231; -toFocus_125021[0] = null; -if ((currentTree_125488[0] == null)) { -F.line = 233; -currentTree_125488[0] = newtree_126209; -F.line = 234; -var asdom_126221 = vnodeToDom_125120(currentTree_125488[0]); -F.line = 235; -replaceById_125491("ROOT", asdom_126221); -} -else { -F.line = 237; -var olddom_126222 = document.getElementById("ROOT"); -F.line = 238; -updateElement_125663(null, olddom_126222, newtree_126209, currentTree_125488[0]); -if (someDirty_113055[0]) { -F.line = 241; -updateDirtyElements_125601(null, olddom_126222, newtree_126209); -F.line = 242; -someDirty_113055[0] = false; -} - -F.line = 243; -currentTree_125488[0] = newtree_126209; -} - -if (!((toFocus_125021[0] == null))) { -F.line = 246; -toFocus_125021[0].focus(); -} - -} while (false); -framePtr = F.prev; -} -function init_126401(ev_126403) { - -var F={procname:"karax.init",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -F.line = 262; -window.requestAnimationFrame(dodraw_126201); -framePtr = F.prev; -} -function setRenderer_126404(renderer_126408) { - -var F={procname:"karax.setRenderer",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/karax.nim",line:0}; -framePtr = F; -F.line = 265; -dorender_125487[0] = renderer_126408; -F.line = 266; -window.onload = init_126401; -framePtr = F.prev; -} -function newVNode_102853(kind_102855) { - -var result_102856 = null; -var F={procname:"vdom.newVNode",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vdom.nim",line:0}; -framePtr = F; -F.line = 170; -result_102856 = {kind: kind_102855, key: -1, id: null, class: null, text: null, kids: null, attrs: null, events: null, hash: 0, validHash: false, style: null, dom: null}; -framePtr = F.prev; -return result_102856; -} -function add_102839(parent_102841, kid_102842) { - -var F={procname:"vdom.add",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vdom.nim",line:0}; -framePtr = F; -F.line = 169; -if (parent_102841.kids != null) { parent_102841.kids.push(kid_102842); } else { parent_102841.kids = [kid_102842]; }; -framePtr = F.prev; -} -function tree_102858(kind_102860, kids_102862) { - -var result_102863 = null; -var F={procname:"vdom.tree",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vdom.nim",line:0}; -framePtr = F; -F.line = 173; -result_102863 = newVNode_102853(kind_102860); -L1: do { -F.line = 174; -var k_102888 = null; -F.line = 2060; -var i_102892 = 0; -L2: do { -F.line = 2061; -L3: while (true) { -if (!(i_102892 < (kids_102862 != null ? kids_102862.length : 0))) break L3; -F.line = 2062; -k_102888 = kids_102862[chckIndx(i_102892, 0, kids_102862.length)-0]; -F.line = 174; -add_102839(result_102863, k_102888); -F.line = 2063; -i_102892 = addInt(i_102892, 1); -} -} while(false); -} while(false); -framePtr = F.prev; -return result_102863; -} -function text_102931(s_102933) { - -var result_102934 = null; -var F={procname:"vdom.text",prev:framePtr,filename:"/Users/haiodo/.nimble/pkgs/karax-0.1.0/vdom.nim",line:0}; -framePtr = F; -F.line = 181; -result_102934 = {kind: 0, text: toJSStr(s_102933), key: -1, id: null, class: null, kids: null, attrs: null, events: null, hash: 0, validHash: false, style: null, dom: null}; -framePtr = F.prev; -return result_102934; -} -function createDom_129001() { - -var result_129003 = null; -var F={procname:"index.createDom",prev:framePtr,filename:"index.nim",line:0}; -framePtr = F; -F.line = 6; -F.line = 6; -var tmp_129011 = tree_102858(41, []); -F.line = 7; -var tmp_129017 = tree_102858(41, []); -F.line = 8; -add_102839(tmp_129017, text_102931(makeNimstrLit("Hello world"))); -F.line = 8; -add_102839(tmp_129011, tmp_129017); -result_129003 = tmp_129011; -framePtr = F.prev; -return result_129003; -} -setRenderer_126404(createDom_129001); diff --git a/sources/electron/index.nim b/sources/electron/index.nim deleted file mode 100644 index 003f899..0000000 --- a/sources/electron/index.nim +++ /dev/null @@ -1,30 +0,0 @@ -# A entry point for my application. - -import karax, karaxdsl, vdom, kdom, components - -import vstyles - -converter toCStr*(str: string): cstring = - str.cstring - -let sMainLayout = style( - (StyleAttr.display, "grid"), - (StyleAttr.height, "100%"), - (StyleAttr.margin, "0 0 0 0"), - (StyleAttr.padding, "0 0 0 0"), - (StyleAttr.gridTemplateColumns, "220px auto"), - (StyleAttr.gridTemplateRows, "40px auto 180px 20px"), - (StyleAttr.gridTemplateAreas, """title title - nav main - nav props - footer footer""") -) - - -proc createDom(): VNode = - result = buildHtml(tdiv): - tdiv: - text "Hello world" - - -setRenderer createDom diff --git a/sources/macos/.DS_Store b/sources/macos/.DS_Store index 14a4228..ee8b2cc 100644 Binary files a/sources/macos/.DS_Store and b/sources/macos/.DS_Store differ diff --git a/sources/macos/Tenniarb/Tenniarb.xcodeproj/project.xcworkspace/xcuserdata/haiodo.xcuserdatad/UserInterfaceState.xcuserstate b/sources/macos/Tenniarb/Tenniarb.xcodeproj/project.xcworkspace/xcuserdata/haiodo.xcuserdatad/UserInterfaceState.xcuserstate index 5d6b2e5..f5f1b5c 100644 Binary files a/sources/macos/Tenniarb/Tenniarb.xcodeproj/project.xcworkspace/xcuserdata/haiodo.xcuserdatad/UserInterfaceState.xcuserstate and b/sources/macos/Tenniarb/Tenniarb.xcodeproj/project.xcworkspace/xcuserdata/haiodo.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/sources/macos/diagraming/Diagraming.playground/Contents.swift b/sources/macos/diagraming/Diagraming.playground/Contents.swift deleted file mode 100644 index eb68e49..0000000 --- a/sources/macos/diagraming/Diagraming.playground/Contents.swift +++ /dev/null @@ -1,129 +0,0 @@ -// -// SceneDrawView.swift -// Tenniarb -// -// Created by Andrey Sobolev on 26/05/2017. -// Copyright © 2017 Andrey Sobolev. All rights reserved. -// - -import Cocoa -import CoreText - -import PlaygroundSupport - - -class SceneDrawView: NSView { - let background = CGColor(red: 253/255, green: 246/255, blue: 227/255, alpha:1) - - var x: Int = 0 - var y: Int = 0 - - var trackingArea: NSTrackingArea? = nil - - var mouseDownState = false - - override var mouseDownCanMoveWindow: Bool { - get { - return false - } - } - - override func draw(_ dirtyRect: NSRect) { - - let context = NSGraphicsContext.current()?.cgContext - - context?.setFillColor(background) - context?.fill(bounds) - - - - for i in 0..<10 { - drawRoundedRect(rect: CGRect(x:50+i*20, y:50+i*20, width:175, height:45), - inContext: context, - radius: CGFloat(9+i), - borderColor: CGColor.black, - fillColor: CGColor.white, - text: "Hello", - active: true) - } - - } - func drawRoundedRect(rect: CGRect, inContext context: CGContext?, - radius: CGFloat, - borderColor: CGColor, - fillColor: CGColor, - text: String, - active: Bool = false) { - - context?.saveGState() - // 1 - let path = CGMutablePath() - - // 2 - path.move( to: CGPoint(x: rect.midX, y:rect.minY )) - path.addArc( tangent1End: CGPoint(x: rect.maxX, y: rect.minY ), - tangent2End: CGPoint(x: rect.maxX, y: rect.maxY), radius: radius) - path.addArc( tangent1End: CGPoint(x: rect.maxX, y: rect.maxY ), - tangent2End: CGPoint(x: rect.minX, y: rect.maxY), radius: radius) - path.addArc( tangent1End: CGPoint(x: rect.minX, y: rect.maxY ), - tangent2End: CGPoint(x: rect.minX, y: rect.minY), radius: radius) - path.addArc( tangent1End: CGPoint(x: rect.minX, y: rect.minY ), - tangent2End: CGPoint(x: rect.maxX, y: rect.minY), radius: radius) - path.closeSubpath() - - context?.setShadow(offset: CGSize(width: 2, height:-2), blur: 4, color: CGColor(red:0,green:0,blue:0,alpha: 0.5)) - - - // 3 - context?.setLineWidth( 0 ) - context?.setStrokeColor(borderColor) - context?.setFillColor(fillColor) - - - // 4 - context?.addPath(path) - context?.drawPath(using: .fillStroke) - - - context?.setShadow(offset: CGSize(width:0, height:0), blur: CGFloat(0)) - - - if ( active ) { - context?.setLineWidth( 0.75 ) - context?.setStrokeColor(borderColor) - context?.setFillColor(fillColor) - - context?.addPath(path) - context?.drawPath(using: .stroke) - } - - let q: NSString = text as NSString - - - let font = NSFont.systemFont(ofSize: 24) - - let textStyle = NSMutableParagraphStyle.default().mutableCopy() as! NSMutableParagraphStyle - textStyle.alignment = NSTextAlignment.center - let textColor = NSColor(calibratedRed: 0.147, green: 0.222, blue: 0.162, alpha: 1.0) - - let textFontAttributes: [String:Any] = [ - NSForegroundColorAttributeName: textColor, - NSParagraphStyleAttributeName: textStyle, - NSFontAttributeName: font - ] - - - q.draw(in: rect, withAttributes: textFontAttributes) - - - context?.restoreGState() - - } - -} - -let sceneView = SceneDrawView(frame: CGRect(x: 0.0, y: 0.0, width: 1024.0, height: 768.0)) -PlaygroundPage.current.liveView = sceneView - - - diff --git a/sources/macos/diagraming/Diagraming.playground/contents.xcplayground b/sources/macos/diagraming/Diagraming.playground/contents.xcplayground deleted file mode 100644 index 63b6dd8..0000000 --- a/sources/macos/diagraming/Diagraming.playground/contents.xcplayground +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/sources/macos/diagraming/Diagraming.playground/playground.xcworkspace/contents.xcworkspacedata b/sources/macos/diagraming/Diagraming.playground/playground.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/sources/macos/diagraming/Diagraming.playground/playground.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/sources/macos/diagraming/Diagraming.playground/playground.xcworkspace/xcuserdata/haiodo.xcuserdatad/UserInterfaceState.xcuserstate b/sources/macos/diagraming/Diagraming.playground/playground.xcworkspace/xcuserdata/haiodo.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 5da30cf..0000000 Binary files a/sources/macos/diagraming/Diagraming.playground/playground.xcworkspace/xcuserdata/haiodo.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/sources/macos/diagraming/Diagraming.playground/timeline.xctimeline b/sources/macos/diagraming/Diagraming.playground/timeline.xctimeline deleted file mode 100644 index bf468af..0000000 --- a/sources/macos/diagraming/Diagraming.playground/timeline.xctimeline +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/sources/react/.gitignore b/sources/react/.gitignore deleted file mode 100644 index f06235c..0000000 --- a/sources/react/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -dist diff --git a/sources/react/index.html b/sources/react/index.html deleted file mode 100644 index 1a2328d..0000000 --- a/sources/react/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Hello React! - - - - -
- - - - - - - - - \ No newline at end of file diff --git a/sources/react/package.json b/sources/react/package.json deleted file mode 100644 index c9eadd1..0000000 --- a/sources/react/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "tenniarb", - "version": "0.1.0", - "description": "Tenniarb - Net Brain Mapper", - "main": "dist/index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "start": "electron ./src/main.js" - }, - "author": "Andrey Sobolev ", - "license": "UNLICENSED", - "dependencies": { - "prop-types": "^15.5.9", - "react": "^15.5.4", - "react-desktop": "^0.3.0", - "react-dom": "^15.5.4", - "react-draggable": "^2.2.6", - "react-transition-group": "^1.1.3", - "react-virtualized": "^9.7.5", - "styled-components": "^1.4.6" - }, - "devDependencies": { - "@types/electron": "^1.4.37", - "@types/electron-window-state": "^2.0.28", - "@types/node": "^6.0.31", - "@types/react": "^15.0.24", - "@types/react-dom": "^15.5.0", - "@types/react-transition-group": "^1.1.0", - "@types/react-virtualized": "^9.5.1", - "awesome-typescript-loader": "^3.1.3", - "babel-core": "^6.24.1", - "babel-webpack-plugin": "^0.1.1", - "clean-webpack-plugin": "^0.1.16", - "electron": "1.6.7", - "electron-debug": "^1.1.0", - "electron-devtools-installer": "^2.1.0", - "electron-mocha": "3.3.0", - "electron-packager": "8.6.0", - "electron-react-devtools": "^0.4.0", - "electron-winstaller": "2.5.2", - "react-addons-perf": "^15.4.2", - "react-addons-test-utils": "^15.4.2", - "source-map-loader": "^0.2.1", - "typescript": "^2.3.2", - "webpack": "^2.4.1", - "webpack-dev-middleware": "^1.10.1", - "webpack-dev-server": "^2.4.5", - "webpack-hot-middleware": "^2.18.0", - "webpack-merge": "^4.1.0" - } -} diff --git a/sources/react/src/components/Hello.tsx b/sources/react/src/components/Hello.tsx deleted file mode 100644 index 5ee1e0c..0000000 --- a/sources/react/src/components/Hello.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from "react"; - -export interface HelloProps { compiler: string; framework: string; } - -// 'HelloProps' describes the shape of props. -// State is never set so we use the 'undefined' type. -export class Hello extends React.Component { - render() { - return

Hello from {this.props.compiler} and {this.props.framework}!

; - } -} diff --git a/sources/react/src/index.tsx b/sources/react/src/index.tsx deleted file mode 100644 index ae99c7d..0000000 --- a/sources/react/src/index.tsx +++ /dev/null @@ -1,145 +0,0 @@ -import * as React from "react"; -import * as ReactDOM from "react-dom"; - -// import { Hello } from "./components/Hello"; - -import styled from 'styled-components'; - -const MainLayout = styled.div` - display: grid; - height: 100%; - margin: 0 0 0 0; - padding: 0 0 0 0; - grid-template-columns: 220px auto; - grid-template-rows: 40px auto 180px 20px; - grid-template-areas: - 'title title' - 'nav main' - 'nav props' - 'footer footer' -` - -const TitlePane = styled.div` - grid-area: title; -` - -const NavPanel = styled.div` - background: #FFFFFF; - border: 1px solid #93A1A1; - grid-area: nav; -` - -const ScenePanel = styled.div` - grid-area: main; - background: #FDF6E3; - border: 1px solid #93A1A1; - position: relative; - left: 0px; - top: 0px; -` -const PropsPanel = styled.div` - background: #FFFFFF; - border: 1px solid #93A1A1; - grid-area: props; -` - -const StatusPanel = styled.div` - background: #FFFFFF; - border: 1px solid #93A1A1; - grid-area: footer; -` - -const SceneItem = styled.div` - background: #FFFFFF; - padding: -1px -1px; - border: ${props => props.theme.selected ? '2px solid #073642' : ''}; - box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.50); - border-radius: 9px; - position: absolute; - height: 50px; - line-height: 48px; - width: 131px; - vertical-align: middle; - user-select: none; - cursor: pointer; - left: ${props => props.theme.x + 'px'}; - top: ${props => props.theme.y + 'px'}; -` - -const SceneText = styled.div` - font-family: ArialMT; - font-size: 24px; - color: #268BD2; - text-align: center; -` - -interface ISceneItemPane { - x?: number; - y?: number; - text: string; -} -interface ISceneItemState { - inMove?: boolean; - x: number; - y: number; -} -class SceneItemPane extends React.Component { - state: ISceneItemState = { inMove: false, x: 0, y: 0 } - constructor(props: ISceneItemPane) { - super(props); - this.state.x = props.x; - this.state.y = props.y; - } - render() { - return ( - { this.setState({ inMove: true }) } - } onMouseUp={ - () => { this.setState({ inMove: false }) } - } onMouseMove={(e) => { - let item = ReactDOM.findDOMNode(this.refs["item"]) as HTMLElement; - let rect = (item.parentElement as HTMLElement).getBoundingClientRect() - if (this.state.inMove) this.setState({ x: e.pageX - rect.left - 75, y: e.pageY - rect.top - 25 }); - }} onMouseOut={() => { this.setState({ inMove: false }) }}> - {this.props.text} - - ) - } -} - - -export class MainPlain extends React.Component { - render() { - return ( - - {/* - - - - */} - - Nav - - - props - - - Status - - - - - - - - - - ); - } -} - -ReactDOM.render( - , - document.getElementById("example") -); - diff --git a/sources/react/src/main.js b/sources/react/src/main.js deleted file mode 100644 index fbf9e6d..0000000 --- a/sources/react/src/main.js +++ /dev/null @@ -1,65 +0,0 @@ -const electron = require('electron') - // const electron = require('electron') - // Module to control application life. -const app = electron.app - // Module to create native browser window. - // const BrowserWindow = electron.BrowserWindow - -const path = require('path') -const url = require('url') - -// Keep a global reference of the window object, if you don't, the window will -// be closed automatically when the JavaScript object is garbage collected. -var mainWindow = null - -function createWindow() { - // Create the browser window. - mainWindow = new electron.BrowserWindow({ - width: 1200, - height: 800, - frame: true, - webPreferences: { experimentalFeatures: true } - }) - - // and load the index.html of the app. - // mainWindow.loadURL(url.format({ - // pathname: path.join(__dirname, '../index.html'), - // protocol: 'file:', - // slashes: true - // })) - - mainWindow.loadURL(url.format({ - pathname: "localhost:3000", - protocol: 'http:', - slashes: true - })) - - // Open the DevTools. - // mainWindow.webContents.openDevTools() - - // Emitted when the window is closed. - mainWindow.on('closed', function() { - // Dereference the window object, usually you would store windows - // in an array if your app supports multi windows, this is the time - // when you should delete the corresponding element. - app.quit() - }) - // mainWindow.maximize() - mainWindow.openDevTools() -} - -// This method will be called when Electron has finished -// initialization and is ready to create browser windows. -// Some APIs can only be used after this event occurs. -app.on('ready', createWindow) - -app.on('activate', function() { - // On OS X it's common to re-create a window in the app when the - // dock icon is clicked and there are no other windows open. - if (mainWindow === null) { - createWindow() - } -}) - -// In this file you can include the rest of your app's specific main process -// code. You can also put them in separate files and require them here. \ No newline at end of file diff --git a/sources/react/tsconfig.json b/sources/react/tsconfig.json deleted file mode 100644 index ad7e0e5..0000000 --- a/sources/react/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "outDir": "./out", - "sourceMap": true, - "noImplicitAny": true, - "module": "commonjs", - "moduleResolution": "node", - "target": "es6", - "jsx": "react", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "stripInternal": true, - "declaration": false, - "noEmit": true, - "noUnusedLocals": false - }, - "include": [ - "./src/**/*" - ], - "exclude": [ - "node_modules", - "dist", - "out" - ] -} \ No newline at end of file diff --git a/sources/react/webpack.config.js b/sources/react/webpack.config.js deleted file mode 100644 index 9782f4d..0000000 --- a/sources/react/webpack.config.js +++ /dev/null @@ -1,49 +0,0 @@ -const webpack = require('webpack'); - -module.exports = { - entry: [ - 'webpack-dev-server/client?http://localhost:3000', - 'webpack/hot/only-dev-server', - "./src/index.tsx" - ], - output: { - filename: "bundle.js", - path: __dirname + "/dist" - }, - - // Enable sourcemaps for debugging webpack's output. - devtool: "source-map", - - resolve: { - // Add '.ts' and '.tsx' as resolvable extensions. - extensions: [".ts", ".tsx", ".js", ".json"] - }, - - module: { - rules: [ - // All files with a '.ts' or '.tsx' extension will be handled by 'awesome-typescript-loader'. - { - test: /\.tsx?$/, - loader: "awesome-typescript-loader", - options: { - useBabel: true, - useCache: true, - }, - exclude: /node_modules/ - }, - - // All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'. - { enforce: "pre", test: /\.js$/, loader: "source-map-loader" } - ] - }, - externals: { - "electron": "Electron" - }, - devServer: { - port: 3000, - hot: true - }, - plugins: [ - new webpack.HotModuleReplacementPlugin(), - ] -}; \ No newline at end of file