diff --git a/.gitignore b/.gitignore index 4d34353..3527fed 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ bower_components npm-debug.log tmp /cassowary.js +/.idea +.DS_Store +/dist diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 00f419b..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,80 +0,0 @@ -/*global module:false*/ -module.exports = function(grunt) { - - // Project configuration. - grunt.initConfig({ - peg: { - parser: { - src: 'src/parser/parser.peg', - dest: 'src/parser/parser.js', - options: { - wrapper: function(src, parser) { - return 'export default ' + parser + ';'; - } - } - }, - parserExt: { - src: 'src/parser/parserExt.peg', - dest: 'src/parser/parserExt.js', - options: { - wrapper: function(src, parser) { - return 'export default ' + parser + ';'; - } - } - } - }, - eslint: { - target: ['src/*.js', 'test/*.js'], - options: { - config: '.eslintrc' - } - }, - jscs: { - src: ['src/*.js', 'test/*.js'], - options: { - config: '.jscsrc' - } - }, - concat: { - jsdoc2md: { - src: ['src/View.js', 'src/SubView.js', 'src/VisualFormat.js', 'src/Attribute.js', 'src/Relation.js', 'src/Priority.js'], - dest: 'tmp/concat.js' - } - }, - jsdoc2md: { - output: { - options: { - 'global-index-format': 'none', - 'module-index-format': 'none' - }, - src: 'tmp/concat.js', - dest: 'docs/AutoLayout.md' - } - }, - exec: { - 'bundle-es6': 'node ./build/bundle-es6', - 'dist': 'node ./build/dist', - 'dist-fast': 'node ./build/dist --fast', - test: 'mocha', - bench: 'node bench/main.js' - } - }); - - // These plugins provide necessary tasks. - grunt.loadNpmTasks('grunt-eslint'); - grunt.loadNpmTasks('grunt-jscs'); - grunt.loadNpmTasks('grunt-jsdoc-to-markdown'); - grunt.loadNpmTasks('grunt-peg'); - grunt.loadNpmTasks('grunt-exec'); - grunt.loadNpmTasks('grunt-contrib-concat'); - - // Tasks - grunt.registerTask('lint', ['eslint', 'jscs']); - grunt.registerTask('doc', ['concat', 'jsdoc2md']); - grunt.registerTask('parser', ['peg']); - grunt.registerTask('test', ['exec:test']); - grunt.registerTask('bench', ['exec:bench']); - grunt.registerTask('dist', ['parser', 'exec:bundle-es6', 'exec:dist']); - grunt.registerTask('default', ['lint', 'doc', 'dist', 'test']); - grunt.registerTask('fast', ['lint', 'parser', 'exec:bundle-es6', 'exec:dist-fast', 'test']); -}; diff --git a/bower.json b/bower.json deleted file mode 100644 index bdda2c2..0000000 --- a/bower.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "autolayout.js", - "version": "0.6.0", - "homepage": "https://github.com/IjzerenHein/autolayout.js", - "repository": { - "type": "git", - "url": "git://github.com/IjzerenHein/autolayout.js.git" - }, - "authors": [ - "Hein Rutjes " - ], - "description": "Apple's Auto Layout and Visual Format Language for javascript (using cassowary constraints)s", - "main": "dist/autolayout.js", - "keywords": [ - "autolayout", - "autolayoutjs", - "autolayout.js", - "auto-layout", - "cassowary", - "cassowaryjs", - "cassowary.js", - "vfl", - "evfl", - "visualformatlanguage" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "logo", - "docs", - "bench", - "examples", - "Gruntfile.js", - "bundle-es6.js", - "logo.png", - "example.png", - "CONTRIBUTING.md", - ".editorconfig", - ".eslintrc", - ".jscsrc" - ] -} diff --git a/build/bundle-es6.js b/build/bundle-es6.js deleted file mode 100644 index 8f59f7d..0000000 --- a/build/bundle-es6.js +++ /dev/null @@ -1,15 +0,0 @@ -var fs = require('fs'); -var esperanto = require('esperanto'); - -esperanto.bundle({ - entry: 'src/AutoLayout.js', // the '.js' is optional - skip: [ - 'kiwi.js', - 'cassowary/bin/c' - ] -}).then(function(bundle) { - var cjs = bundle.toCjs(); - fs.writeFile('tmp/autolayout.es6', cjs.code); -}, function(err) { - console.log(err); -}); diff --git a/build/dist.js b/build/dist.js deleted file mode 100644 index 0957d7d..0000000 --- a/build/dist.js +++ /dev/null @@ -1,86 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -var browserify = require('browserify'); -var babelify = require('babelify'); -var envify = require('envify/custom'); -var CombinedStream = require('combined-stream'); -var argv = require('minimist')(process.argv.slice(2)); - -var packageJSON = JSON.parse(fs.readFileSync('./package.json')); - -var banner = '' + -'/**\n' + -'* AutoLayout.js is licensed under the MIT license. If a copy of the\n' + -'* MIT-license was not distributed with this file, You can obtain one at:\n' + -'* http://opensource.org/licenses/mit-license.html.\n' + -'*\n' + -'* @author: Hein Rutjes (IjzerenHein)\n' + -'* @license MIT\n' + -'* @copyright Gloey Apps, 2017\n' + -'*\n' + -'* @library autolayout.js\n' + -'* @version ' + packageJSON.version + '\n' + -'*/\n'; -var cassowaryBanner = '' + -'/**\n' + -'* Parts Copyright (C) 2011-2012, Alex Russell (slightlyoff@chromium.org)\n' + -'* Parts Copyright (C) Copyright (C) 1998-2000 Greg J. Badros\n' + -'*\n' + -'* Use of this source code is governed by the LGPL, which can be found in the\n' + -'* COPYING.LGPL file.\n' + -'*/\n'; -var kiwiBanner = '' + -'/*-----------------------------------------------------------------------------\n' + -'| Kiwi (TypeScript version)\n' + -'|\n' + -'| Copyright (c) 2014, Nucleic Development Team & H. Rutjes.\n' + -'|\n' + -'| Distributed under the terms of the Modified BSD License.\n' + -'|\n' + -'| The full license is in the file COPYING.txt, distributed with this software.\n' + -'|----------------------------------------------------------------------------*/\n'; - -function dist(kiwi, minify) { - var input = CombinedStream.create(); - input.append(!kiwi ? 'var c = require(\'cassowary/bin/c\')\n' : 'var kiwi = require(\'kiwi.js\')\n'); - input.append(fs.createReadStream('./tmp/autolayout.es6')); - var output = fs.createWriteStream('dist/autolayout' + (kiwi ? '.kiwi' : '') + (minify ? '.min' : '') + '.js'); - output.write(banner); - output.write(kiwi ? kiwiBanner : cassowaryBanner); - var b = browserify(input, { - debug: minify, - standalone: 'AutoLayout', - banner: banner - }); - b = b.transform(babelify.configure({ - compact: false, - presets: ['es2015'], - ignore: /\/kiwi\// - })); - b = b.transform(envify({ - CASSOWARYJS: !kiwi - })); - if (minify) { - b.plugin('minifyify', { - map: 'autolayout.min.map', - output: 'dist/autolayout.min.map', - compressPath: function(p) { - if (p.indexOf('kiwi') >= 0) { - return path.relative('node_modules/kiwi.js/lib', p); - } - else { - return path.relative('tmp', p); - } - } - }); - } - b.bundle().on('error', function(err) { - console.log('Error : ' + err.message); - }).pipe(output); -} -dist(false, false); -if (!argv.fast) { - dist(false, true); - dist(true, false); -} -//dist(true, true); diff --git a/dist/autolayout.js b/dist/autolayout.js deleted file mode 100644 index 2dc27ce..0000000 --- a/dist/autolayout.js +++ /dev/null @@ -1,5365 +0,0 @@ -/** -* AutoLayout.js is licensed under the MIT license. If a copy of the -* MIT-license was not distributed with this file, You can obtain one at: -* http://opensource.org/licenses/mit-license.html. -* -* @author: Hein Rutjes (IjzerenHein) -* @license MIT -* @copyright Gloey Apps, 2017 -* -* @library autolayout.js -* @version 0.7.0 -*/ -/** -* Parts Copyright (C) 2011-2012, Alex Russell (slightlyoff@chromium.org) -* Parts Copyright (C) Copyright (C) 1998-2000 Greg J. Badros -* -* Use of this source code is governed by the LGPL, which can be found in the -* COPYING.LGPL file. -*/ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoLayout = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1 ? arguments[1] : {}, - peg$FAILED = {}, - peg$startRuleFunctions = { visualFormatString: peg$parsevisualFormatString }, - peg$startRuleFunction = peg$parsevisualFormatString, - peg$c0 = peg$FAILED, - peg$c1 = null, - peg$c2 = ":", - peg$c3 = { type: "literal", value: ":", description: "\":\"" }, - peg$c4 = [], - peg$c5 = function peg$c5(o, superto, view, views, tosuper) { - return { - orientation: o ? o[0] : 'horizontal', - cascade: (superto || []).concat([view], [].concat.apply([], views), tosuper || []) - }; - }, - peg$c6 = "H", - peg$c7 = { type: "literal", value: "H", description: "\"H\"" }, - peg$c8 = "V", - peg$c9 = { type: "literal", value: "V", description: "\"V\"" }, - peg$c10 = function peg$c10(orient) { - return orient == 'H' ? 'horizontal' : 'vertical'; - }, - peg$c11 = "|", - peg$c12 = { type: "literal", value: "|", description: "\"|\"" }, - peg$c13 = function peg$c13() { - return { view: null }; - }, - peg$c14 = "[", - peg$c15 = { type: "literal", value: "[", description: "\"[\"" }, - peg$c16 = "]", - peg$c17 = { type: "literal", value: "]", description: "\"]\"" }, - peg$c18 = function peg$c18(view, predicates) { - return extend(view, predicates ? { constraints: predicates } : {}); - }, - peg$c19 = "-", - peg$c20 = { type: "literal", value: "-", description: "\"-\"" }, - peg$c21 = function peg$c21(predicateList) { - return predicateList; - }, - peg$c22 = function peg$c22() { - return [{ relation: 'equ', constant: 'default', $parserOffset: offset() }]; - }, - peg$c23 = "", - peg$c24 = function peg$c24() { - return [{ relation: 'equ', constant: 0, $parserOffset: offset() }]; - }, - peg$c25 = function peg$c25(n) { - return [{ relation: 'equ', constant: n, $parserOffset: offset() }]; - }, - peg$c26 = "(", - peg$c27 = { type: "literal", value: "(", description: "\"(\"" }, - peg$c28 = ",", - peg$c29 = { type: "literal", value: ",", description: "\",\"" }, - peg$c30 = ")", - peg$c31 = { type: "literal", value: ")", description: "\")\"" }, - peg$c32 = function peg$c32(p, ps) { - return [p].concat(ps.map(function (p) { - return p[1]; - })); - }, - peg$c33 = "@", - peg$c34 = { type: "literal", value: "@", description: "\"@\"" }, - peg$c35 = function peg$c35(r, o, p) { - return extend({ relation: 'equ' }, r || {}, o, p ? p[1] : {}); - }, - peg$c36 = "==", - peg$c37 = { type: "literal", value: "==", description: "\"==\"" }, - peg$c38 = function peg$c38() { - return { relation: 'equ', $parserOffset: offset() }; - }, - peg$c39 = "<=", - peg$c40 = { type: "literal", value: "<=", description: "\"<=\"" }, - peg$c41 = function peg$c41() { - return { relation: 'leq', $parserOffset: offset() }; - }, - peg$c42 = ">=", - peg$c43 = { type: "literal", value: ">=", description: "\">=\"" }, - peg$c44 = function peg$c44() { - return { relation: 'geq', $parserOffset: offset() }; - }, - peg$c45 = /^[0-9]/, - peg$c46 = { type: "class", value: "[0-9]", description: "[0-9]" }, - peg$c47 = function peg$c47(digits) { - return { priority: parseInt(digits.join(""), 10) }; - }, - peg$c48 = function peg$c48(n) { - return { constant: n }; - }, - peg$c49 = /^[a-zA-Z_]/, - peg$c50 = { type: "class", value: "[a-zA-Z_]", description: "[a-zA-Z_]" }, - peg$c51 = /^[a-zA-Z0-9_]/, - peg$c52 = { type: "class", value: "[a-zA-Z0-9_]", description: "[a-zA-Z0-9_]" }, - peg$c53 = function peg$c53(f, v) { - return { view: f + v }; - }, - peg$c54 = ".", - peg$c55 = { type: "literal", value: ".", description: "\".\"" }, - peg$c56 = function peg$c56(digits, decimals) { - return parseFloat(digits.concat(".").concat(decimals).join(""), 10); - }, - peg$c57 = function peg$c57(digits) { - return parseInt(digits.join(""), 10); - }, - peg$currPos = 0, - peg$reportedPos = 0, - peg$cachedPos = 0, - peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, - peg$maxFailPos = 0, - peg$maxFailExpected = [], - peg$silentFails = 0, - peg$result; - - if ("startRule" in options) { - if (!(options.startRule in peg$startRuleFunctions)) { - throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); - } - - peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; - } - - function text() { - return input.substring(peg$reportedPos, peg$currPos); - } - - function offset() { - return peg$reportedPos; - } - - function line() { - return peg$computePosDetails(peg$reportedPos).line; - } - - function column() { - return peg$computePosDetails(peg$reportedPos).column; - } - - function expected(description) { - throw peg$buildException(null, [{ type: "other", description: description }], peg$reportedPos); - } - - function error(message) { - throw peg$buildException(message, null, peg$reportedPos); - } - - function peg$computePosDetails(pos) { - function advance(details, startPos, endPos) { - var p, ch; - - for (p = startPos; p < endPos; p++) { - ch = input.charAt(p); - if (ch === "\n") { - if (!details.seenCR) { - details.line++; - } - details.column = 1; - details.seenCR = false; - } else if (ch === "\r" || ch === '\u2028' || ch === '\u2029') { - details.line++; - details.column = 1; - details.seenCR = true; - } else { - details.column++; - details.seenCR = false; - } - } - } - - if (peg$cachedPos !== pos) { - if (peg$cachedPos > pos) { - peg$cachedPos = 0; - peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; - } - advance(peg$cachedPosDetails, peg$cachedPos, pos); - peg$cachedPos = pos; - } - - return peg$cachedPosDetails; - } - - function peg$fail(expected) { - if (peg$currPos < peg$maxFailPos) { - return; - } - - if (peg$currPos > peg$maxFailPos) { - peg$maxFailPos = peg$currPos; - peg$maxFailExpected = []; - } - - peg$maxFailExpected.push(expected); - } - - function peg$buildException(message, expected, pos) { - function cleanupExpected(expected) { - var i = 1; - - expected.sort(function (a, b) { - if (a.description < b.description) { - return -1; - } else if (a.description > b.description) { - return 1; - } else { - return 0; - } - }); - - while (i < expected.length) { - if (expected[i - 1] === expected[i]) { - expected.splice(i, 1); - } else { - i++; - } - } - } - - function buildMessage(expected, found) { - function stringEscape(s) { - function hex(ch) { - return ch.charCodeAt(0).toString(16).toUpperCase(); - } - - return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\x08/g, '\\b').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\f/g, '\\f').replace(/\r/g, '\\r').replace(/[\x00-\x07\x0B\x0E\x0F]/g, function (ch) { - return '\\x0' + hex(ch); - }).replace(/[\x10-\x1F\x80-\xFF]/g, function (ch) { - return '\\x' + hex(ch); - }).replace(/[\u0180-\u0FFF]/g, function (ch) { - return '\\u0' + hex(ch); - }).replace(/[\u1080-\uFFFF]/g, function (ch) { - return '\\u' + hex(ch); - }); - } - - var expectedDescs = new Array(expected.length), - expectedDesc, - foundDesc, - i; - - for (i = 0; i < expected.length; i++) { - expectedDescs[i] = expected[i].description; - } - - expectedDesc = expected.length > 1 ? expectedDescs.slice(0, -1).join(", ") + " or " + expectedDescs[expected.length - 1] : expectedDescs[0]; - - foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; - - return "Expected " + expectedDesc + " but " + foundDesc + " found."; - } - - var posDetails = peg$computePosDetails(pos), - found = pos < input.length ? input.charAt(pos) : null; - - if (expected !== null) { - cleanupExpected(expected); - } - - return new SyntaxError(message !== null ? message : buildMessage(expected, found), expected, found, pos, posDetails.line, posDetails.column); - } - - function peg$parsevisualFormatString() { - var s0, s1, s2, s3, s4, s5, s6, s7; - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = peg$parseorientation(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 58) { - s3 = peg$c2; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c3); - } - } - if (s3 !== peg$FAILED) { - s2 = [s2, s3]; - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$c0; - } - } else { - peg$currPos = s1; - s1 = peg$c0; - } - if (s1 === peg$FAILED) { - s1 = peg$c1; - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = peg$parsesuperview(); - if (s3 !== peg$FAILED) { - s4 = peg$parseconnection(); - if (s4 !== peg$FAILED) { - s3 = [s3, s4]; - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$c0; - } - } else { - peg$currPos = s2; - s2 = peg$c0; - } - if (s2 === peg$FAILED) { - s2 = peg$c1; - } - if (s2 !== peg$FAILED) { - s3 = peg$parseview(); - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parseview(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parseview(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } - if (s4 !== peg$FAILED) { - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parsesuperview(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - if (s5 === peg$FAILED) { - s5 = peg$c1; - } - if (s5 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c5(s1, s2, s3, s4, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseorientation() { - var s0, s1; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 72) { - s1 = peg$c6; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c7); - } - } - if (s1 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 86) { - s1 = peg$c8; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c9); - } - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c10(s1); - } - s0 = s1; - - return s0; - } - - function peg$parsesuperview() { - var s0, s1; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 124) { - s1 = peg$c11; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c12); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c13(); - } - s0 = s1; - - return s0; - } - - function peg$parseview() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { - s1 = peg$c14; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c15); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseviewName(); - if (s2 !== peg$FAILED) { - s3 = peg$parsepredicateListWithParens(); - if (s3 === peg$FAILED) { - s3 = peg$c1; - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s4 = peg$c16; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c17); - } - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c18(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseconnection() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c19; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c20); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicateList(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 45) { - s3 = peg$c19; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c20); - } - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c21(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c19; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c20); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c22(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$c23; - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c24(); - } - s0 = s1; - } - } - - return s0; - } - - function peg$parsepredicateList() { - var s0; - - s0 = peg$parsesimplePredicate(); - if (s0 === peg$FAILED) { - s0 = peg$parsepredicateListWithParens(); - } - - return s0; - } - - function peg$parsesimplePredicate() { - var s0, s1; - - s0 = peg$currPos; - s1 = peg$parsenumber(); - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c25(s1); - } - s0 = s1; - - return s0; - } - - function peg$parsepredicateListWithParens() { - var s0, s1, s2, s3, s4, s5, s6; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c26; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c27); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicate(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c28; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c29); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parsepredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c28; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c29); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parsepredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 41) { - s4 = peg$c30; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c31); - } - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c32(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsepredicate() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parserelation(); - if (s1 === peg$FAILED) { - s1 = peg$c1; - } - if (s1 !== peg$FAILED) { - s2 = peg$parseobjectOfPredicate(); - if (s2 !== peg$FAILED) { - s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 64) { - s4 = peg$c33; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c34); - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parsepriority(); - if (s5 !== peg$FAILED) { - s4 = [s4, s5]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } else { - peg$currPos = s3; - s3 = peg$c0; - } - if (s3 === peg$FAILED) { - s3 = peg$c1; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c35(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parserelation() { - var s0, s1; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c36) { - s1 = peg$c36; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c37); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c38(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c39) { - s1 = peg$c39; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c40); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c41(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c42) { - s1 = peg$c42; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c44(); - } - s0 = s1; - } - } - - return s0; - } - - function peg$parseobjectOfPredicate() { - var s0; - - s0 = peg$parseconstant(); - if (s0 === peg$FAILED) { - s0 = peg$parseviewName(); - } - - return s0; - } - - function peg$parsepriority() { - var s0, s1, s2; - - s0 = peg$currPos; - s1 = []; - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c47(s1); - } - s0 = s1; - - return s0; - } - - function peg$parseconstant() { - var s0, s1; - - s0 = peg$currPos; - s1 = peg$parsenumber(); - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c48(s1); - } - s0 = s1; - - return s0; - } - - function peg$parseviewName() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = []; - if (peg$c49.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c50); - } - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c49.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c50); - } - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - s2 = input.substring(s1, peg$currPos); - } - s1 = s2; - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = []; - if (peg$c51.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c52); - } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c51.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c52); - } - } - } - if (s3 !== peg$FAILED) { - s3 = input.substring(s2, peg$currPos); - } - s2 = s3; - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c53(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsenumber() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = []; - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 46) { - s2 = peg$c54; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c55); - } - } - if (s2 !== peg$FAILED) { - s3 = []; - if (peg$c45.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c45.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - } - } else { - s3 = peg$c0; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c56(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = []; - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c57(s1); - } - s0 = s1; - } - - return s0; - } - - function extend(dst) { - for (var i = 1; i < arguments.length; i++) { - for (var k in arguments[i]) { - dst[k] = arguments[i][k]; - } - } - return dst; - } - - peg$result = peg$startRuleFunction(); - - if (peg$result !== peg$FAILED && peg$currPos === input.length) { - return peg$result; - } else { - if (peg$result !== peg$FAILED && peg$currPos < input.length) { - peg$fail({ type: "end", description: "end of input" }); - } - - throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos); - } - } - - return { - SyntaxError: SyntaxError, - parse: parse - }; -}(); - -var parserExt = function () { - /* - * Generated by PEG.js 0.8.0. - * - * http://pegjs.majda.cz/ - */ - - function peg$subclass(child, parent) { - function ctor() { - this.constructor = child; - } - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - } - - function SyntaxError(message, expected, found, offset, line, column) { - this.message = message; - this.expected = expected; - this.found = found; - this.offset = offset; - this.line = line; - this.column = column; - - this.name = "SyntaxError"; - } - - peg$subclass(SyntaxError, Error); - - function parse(input) { - var options = arguments.length > 1 ? arguments[1] : {}, - peg$FAILED = {}, - peg$startRuleFunctions = { visualFormatStringExt: peg$parsevisualFormatStringExt }, - peg$startRuleFunction = peg$parsevisualFormatStringExt, - peg$c0 = peg$FAILED, - peg$c1 = "C:", - peg$c2 = { type: "literal", value: "C:", description: "\"C:\"" }, - peg$c3 = [], - peg$c4 = null, - peg$c5 = function peg$c5(view, attribute, attributes, comments) { - return { - type: 'attribute', - view: view.view, - attributes: [attribute].concat(attributes) - }; - }, - peg$c6 = function peg$c6(attr, predicates) { - return { attr: attr, predicates: predicates }; - }, - peg$c7 = ":", - peg$c8 = { type: "literal", value: ":", description: "\":\"" }, - peg$c9 = function peg$c9(o, superto, view, views, tosuper, comments) { - return { - type: 'vfl', - orientation: o ? o[0] : 'horizontal', - cascade: (superto || []).concat(view, [].concat.apply([], views), tosuper || []) - }; - }, - peg$c10 = "HV", - peg$c11 = { type: "literal", value: "HV", description: "\"HV\"" }, - peg$c12 = function peg$c12() { - return 'horzvert'; - }, - peg$c13 = "H", - peg$c14 = { type: "literal", value: "H", description: "\"H\"" }, - peg$c15 = function peg$c15() { - return 'horizontal'; - }, - peg$c16 = "V", - peg$c17 = { type: "literal", value: "V", description: "\"V\"" }, - peg$c18 = function peg$c18() { - return 'vertical'; - }, - peg$c19 = "Z", - peg$c20 = { type: "literal", value: "Z", description: "\"Z\"" }, - peg$c21 = function peg$c21() { - return 'zIndex'; - }, - peg$c22 = " ", - peg$c23 = { type: "literal", value: " ", description: "\" \"" }, - peg$c24 = "//", - peg$c25 = { type: "literal", value: "//", description: "\"//\"" }, - peg$c26 = { type: "any", description: "any character" }, - peg$c27 = "|", - peg$c28 = { type: "literal", value: "|", description: "\"|\"" }, - peg$c29 = function peg$c29() { - return { view: null }; - }, - peg$c30 = "[", - peg$c31 = { type: "literal", value: "[", description: "\"[\"" }, - peg$c32 = ",", - peg$c33 = { type: "literal", value: ",", description: "\",\"" }, - peg$c34 = "]", - peg$c35 = { type: "literal", value: "]", description: "\"]\"" }, - peg$c36 = function peg$c36(view, views) { - return views.length ? [view].concat([].concat.apply([], views)) : view; - }, - peg$c37 = function peg$c37(view, predicates, cascadedViews) { - return extend(extend(view, predicates ? { constraints: predicates } : {}), cascadedViews ? { - cascade: cascadedViews - } : {}); - }, - peg$c38 = function peg$c38(views, connection) { - return [].concat([].concat.apply([], views), [connection]); - }, - peg$c39 = "->", - peg$c40 = { type: "literal", value: "->", description: "\"->\"" }, - peg$c41 = function peg$c41() { - return [{ relation: 'none' }]; - }, - peg$c42 = "-", - peg$c43 = { type: "literal", value: "-", description: "\"-\"" }, - peg$c44 = function peg$c44(predicateList) { - return predicateList; - }, - peg$c45 = function peg$c45() { - return [{ relation: 'equ', constant: 'default' }]; - }, - peg$c46 = "~", - peg$c47 = { type: "literal", value: "~", description: "\"~\"" }, - peg$c48 = function peg$c48() { - return [{ relation: 'equ', equalSpacing: true }]; - }, - peg$c49 = "", - peg$c50 = function peg$c50() { - return [{ relation: 'equ', constant: 0 }]; - }, - peg$c51 = function peg$c51(p) { - return [{ relation: 'equ', multiplier: p.multiplier }]; - }, - peg$c52 = function peg$c52(n) { - return [{ relation: 'equ', constant: n }]; - }, - peg$c53 = "(", - peg$c54 = { type: "literal", value: "(", description: "\"(\"" }, - peg$c55 = ")", - peg$c56 = { type: "literal", value: ")", description: "\")\"" }, - peg$c57 = function peg$c57(p, ps) { - return [p].concat(ps.map(function (p) { - return p[1]; - })); - }, - peg$c58 = "@", - peg$c59 = { type: "literal", value: "@", description: "\"@\"" }, - peg$c60 = function peg$c60(r, o, p) { - return extend({ relation: 'equ' }, r || {}, o, p ? p[1] : {}); - }, - peg$c61 = function peg$c61(r, o, p) { - return extend({ relation: 'equ', equalSpacing: true }, r || {}, o, p ? p[1] : {}); - }, - peg$c62 = "==", - peg$c63 = { type: "literal", value: "==", description: "\"==\"" }, - peg$c64 = function peg$c64() { - return { relation: 'equ' }; - }, - peg$c65 = "<=", - peg$c66 = { type: "literal", value: "<=", description: "\"<=\"" }, - peg$c67 = function peg$c67() { - return { relation: 'leq' }; - }, - peg$c68 = ">=", - peg$c69 = { type: "literal", value: ">=", description: "\">=\"" }, - peg$c70 = function peg$c70() { - return { relation: 'geq' }; - }, - peg$c71 = /^[0-9]/, - peg$c72 = { type: "class", value: "[0-9]", description: "[0-9]" }, - peg$c73 = function peg$c73(digits) { - return { priority: parseInt(digits.join(""), 10) }; - }, - peg$c74 = function peg$c74(n) { - return { constant: n }; - }, - peg$c75 = function peg$c75(n) { - return { constant: -n }; - }, - peg$c76 = "+", - peg$c77 = { type: "literal", value: "+", description: "\"+\"" }, - peg$c78 = "%", - peg$c79 = { type: "literal", value: "%", description: "\"%\"" }, - peg$c80 = function peg$c80(n) { - return { view: null, multiplier: n / 100 }; - }, - peg$c81 = function peg$c81(n) { - return { view: null, multiplier: n / -100 }; - }, - peg$c82 = function peg$c82(vn, a, m, c) { - return { view: vn.view, attribute: a ? a : undefined, multiplier: m ? m : 1, constant: c ? c : undefined }; - }, - peg$c83 = ".left", - peg$c84 = { type: "literal", value: ".left", description: "\".left\"" }, - peg$c85 = function peg$c85() { - return 'left'; - }, - peg$c86 = ".right", - peg$c87 = { type: "literal", value: ".right", description: "\".right\"" }, - peg$c88 = function peg$c88() { - return 'right'; - }, - peg$c89 = ".top", - peg$c90 = { type: "literal", value: ".top", description: "\".top\"" }, - peg$c91 = function peg$c91() { - return 'top'; - }, - peg$c92 = ".bottom", - peg$c93 = { type: "literal", value: ".bottom", description: "\".bottom\"" }, - peg$c94 = function peg$c94() { - return 'bottom'; - }, - peg$c95 = ".width", - peg$c96 = { type: "literal", value: ".width", description: "\".width\"" }, - peg$c97 = function peg$c97() { - return 'width'; - }, - peg$c98 = ".height", - peg$c99 = { type: "literal", value: ".height", description: "\".height\"" }, - peg$c100 = function peg$c100() { - return 'height'; - }, - peg$c101 = ".centerX", - peg$c102 = { type: "literal", value: ".centerX", description: "\".centerX\"" }, - peg$c103 = function peg$c103() { - return 'centerX'; - }, - peg$c104 = ".centerY", - peg$c105 = { type: "literal", value: ".centerY", description: "\".centerY\"" }, - peg$c106 = function peg$c106() { - return 'centerY'; - }, - peg$c107 = "/", - peg$c108 = { type: "literal", value: "/", description: "\"/\"" }, - peg$c109 = function peg$c109(n) { - return 1 / n; - }, - peg$c110 = "/+", - peg$c111 = { type: "literal", value: "/+", description: "\"/+\"" }, - peg$c112 = "/-", - peg$c113 = { type: "literal", value: "/-", description: "\"/-\"" }, - peg$c114 = function peg$c114(n) { - return -1 / n; - }, - peg$c115 = "*", - peg$c116 = { type: "literal", value: "*", description: "\"*\"" }, - peg$c117 = function peg$c117(n) { - return n; - }, - peg$c118 = "*+", - peg$c119 = { type: "literal", value: "*+", description: "\"*+\"" }, - peg$c120 = "*-", - peg$c121 = { type: "literal", value: "*-", description: "\"*-\"" }, - peg$c122 = function peg$c122(n) { - return -n; - }, - peg$c123 = /^[a-zA-Z_]/, - peg$c124 = { type: "class", value: "[a-zA-Z_]", description: "[a-zA-Z_]" }, - peg$c125 = /^[a-zA-Z0-9_]/, - peg$c126 = { type: "class", value: "[a-zA-Z0-9_]", description: "[a-zA-Z0-9_]" }, - peg$c127 = function peg$c127(f, v, r) { - return { view: f + v, range: r, $parserOffset: offset() }; - }, - peg$c128 = function peg$c128(f, v) { - return { view: f + v, $parserOffset: offset() }; - }, - peg$c129 = "..", - peg$c130 = { type: "literal", value: "..", description: "\"..\"" }, - peg$c131 = function peg$c131(d) { - return parseInt(d); - }, - peg$c132 = ".", - peg$c133 = { type: "literal", value: ".", description: "\".\"" }, - peg$c134 = function peg$c134(digits, decimals) { - return parseFloat(digits.concat(".").concat(decimals).join(""), 10); - }, - peg$c135 = function peg$c135(digits) { - return parseInt(digits.join(""), 10); - }, - peg$currPos = 0, - peg$reportedPos = 0, - peg$cachedPos = 0, - peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, - peg$maxFailPos = 0, - peg$maxFailExpected = [], - peg$silentFails = 0, - peg$result; - - if ("startRule" in options) { - if (!(options.startRule in peg$startRuleFunctions)) { - throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); - } - - peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; - } - - function text() { - return input.substring(peg$reportedPos, peg$currPos); - } - - function offset() { - return peg$reportedPos; - } - - function line() { - return peg$computePosDetails(peg$reportedPos).line; - } - - function column() { - return peg$computePosDetails(peg$reportedPos).column; - } - - function expected(description) { - throw peg$buildException(null, [{ type: "other", description: description }], peg$reportedPos); - } - - function error(message) { - throw peg$buildException(message, null, peg$reportedPos); - } - - function peg$computePosDetails(pos) { - function advance(details, startPos, endPos) { - var p, ch; - - for (p = startPos; p < endPos; p++) { - ch = input.charAt(p); - if (ch === "\n") { - if (!details.seenCR) { - details.line++; - } - details.column = 1; - details.seenCR = false; - } else if (ch === "\r" || ch === '\u2028' || ch === '\u2029') { - details.line++; - details.column = 1; - details.seenCR = true; - } else { - details.column++; - details.seenCR = false; - } - } - } - - if (peg$cachedPos !== pos) { - if (peg$cachedPos > pos) { - peg$cachedPos = 0; - peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; - } - advance(peg$cachedPosDetails, peg$cachedPos, pos); - peg$cachedPos = pos; - } - - return peg$cachedPosDetails; - } - - function peg$fail(expected) { - if (peg$currPos < peg$maxFailPos) { - return; - } - - if (peg$currPos > peg$maxFailPos) { - peg$maxFailPos = peg$currPos; - peg$maxFailExpected = []; - } - - peg$maxFailExpected.push(expected); - } - - function peg$buildException(message, expected, pos) { - function cleanupExpected(expected) { - var i = 1; - - expected.sort(function (a, b) { - if (a.description < b.description) { - return -1; - } else if (a.description > b.description) { - return 1; - } else { - return 0; - } - }); - - while (i < expected.length) { - if (expected[i - 1] === expected[i]) { - expected.splice(i, 1); - } else { - i++; - } - } - } - - function buildMessage(expected, found) { - function stringEscape(s) { - function hex(ch) { - return ch.charCodeAt(0).toString(16).toUpperCase(); - } - - return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\x08/g, '\\b').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\f/g, '\\f').replace(/\r/g, '\\r').replace(/[\x00-\x07\x0B\x0E\x0F]/g, function (ch) { - return '\\x0' + hex(ch); - }).replace(/[\x10-\x1F\x80-\xFF]/g, function (ch) { - return '\\x' + hex(ch); - }).replace(/[\u0180-\u0FFF]/g, function (ch) { - return '\\u0' + hex(ch); - }).replace(/[\u1080-\uFFFF]/g, function (ch) { - return '\\u' + hex(ch); - }); - } - - var expectedDescs = new Array(expected.length), - expectedDesc, - foundDesc, - i; - - for (i = 0; i < expected.length; i++) { - expectedDescs[i] = expected[i].description; - } - - expectedDesc = expected.length > 1 ? expectedDescs.slice(0, -1).join(", ") + " or " + expectedDescs[expected.length - 1] : expectedDescs[0]; - - foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; - - return "Expected " + expectedDesc + " but " + foundDesc + " found."; - } - - var posDetails = peg$computePosDetails(pos), - found = pos < input.length ? input.charAt(pos) : null; - - if (expected !== null) { - cleanupExpected(expected); - } - - return new SyntaxError(message !== null ? message : buildMessage(expected, found), expected, found, pos, posDetails.line, posDetails.column); - } - - function peg$parsevisualFormatStringExt() { - var s0; - - s0 = peg$parsevisualFormatString(); - if (s0 === peg$FAILED) { - s0 = peg$parsevisualFormatStringConstraintExpression(); - } - - return s0; - } - - function peg$parsevisualFormatStringConstraintExpression() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c1) { - s1 = peg$c1; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c2); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseviewName(); - if (s2 !== peg$FAILED) { - s3 = peg$parseattributePredicate(); - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$parseattributePredicate(); - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$parseattributePredicate(); - } - if (s4 !== peg$FAILED) { - s5 = peg$parsecomments(); - if (s5 === peg$FAILED) { - s5 = peg$c4; - } - if (s5 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c5(s2, s3, s4, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseattributePredicate() { - var s0, s1, s2; - - s0 = peg$currPos; - s1 = peg$parseattribute(); - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicateListWithParens(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c6(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsevisualFormatString() { - var s0, s1, s2, s3, s4, s5, s6, s7; - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = peg$parseorientation(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 58) { - s3 = peg$c7; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c8); - } - } - if (s3 !== peg$FAILED) { - s2 = [s2, s3]; - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$c0; - } - } else { - peg$currPos = s1; - s1 = peg$c0; - } - if (s1 === peg$FAILED) { - s1 = peg$c4; - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = peg$parsesuperview(); - if (s3 !== peg$FAILED) { - s4 = peg$parseconnection(); - if (s4 !== peg$FAILED) { - s3 = [s3, s4]; - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$c0; - } - } else { - peg$currPos = s2; - s2 = peg$c0; - } - if (s2 === peg$FAILED) { - s2 = peg$c4; - } - if (s2 !== peg$FAILED) { - s3 = peg$parseviewGroup(); - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parseviewGroup(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parseviewGroup(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } - if (s4 !== peg$FAILED) { - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parsesuperview(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - if (s5 === peg$FAILED) { - s5 = peg$c4; - } - if (s5 !== peg$FAILED) { - s6 = peg$parsecomments(); - if (s6 === peg$FAILED) { - s6 = peg$c4; - } - if (s6 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c9(s1, s2, s3, s4, s5, s6); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseorientation() { - var s0, s1; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c10) { - s1 = peg$c10; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c11); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c12(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 72) { - s1 = peg$c13; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c14); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c15(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 86) { - s1 = peg$c16; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c17); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c18(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 90) { - s1 = peg$c19; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c20); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c21(); - } - s0 = s1; - } - } - } - - return s0; - } - - function peg$parsecomments() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = []; - if (input.charCodeAt(peg$currPos) === 32) { - s2 = peg$c22; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c23); - } - } - while (s2 !== peg$FAILED) { - s1.push(s2); - if (input.charCodeAt(peg$currPos) === 32) { - s2 = peg$c22; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c23); - } - } - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c24) { - s2 = peg$c24; - peg$currPos += 2; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c25); - } - } - if (s2 !== peg$FAILED) { - s3 = []; - if (input.length > peg$currPos) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c26); - } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (input.length > peg$currPos) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c26); - } - } - } - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsesuperview() { - var s0, s1; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 124) { - s1 = peg$c27; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c28); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c29(); - } - s0 = s1; - - return s0; - } - - function peg$parseviewGroup() { - var s0, s1, s2, s3, s4, s5, s6; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { - s1 = peg$c30; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c31); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseview(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parseview(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parseview(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s4 = peg$c34; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c35); - } - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c36(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseview() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - s1 = peg$parseviewNameRange(); - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicateListWithParens(); - if (s2 === peg$FAILED) { - s2 = peg$c4; - } - if (s2 !== peg$FAILED) { - s3 = peg$parsecascadedViews(); - if (s3 === peg$FAILED) { - s3 = peg$c4; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c37(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsecascadedViews() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 58) { - s1 = peg$c7; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c8); - } - } - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$currPos; - s4 = peg$parseconnection(); - if (s4 !== peg$FAILED) { - s5 = peg$parseviewGroup(); - if (s5 !== peg$FAILED) { - s4 = [s4, s5]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } else { - peg$currPos = s3; - s3 = peg$c0; - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$currPos; - s4 = peg$parseconnection(); - if (s4 !== peg$FAILED) { - s5 = peg$parseviewGroup(); - if (s5 !== peg$FAILED) { - s4 = [s4, s5]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - s3 = peg$parseconnection(); - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c38(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseconnection() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c39) { - s1 = peg$c39; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c40); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c41(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c42; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicateList(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 45) { - s3 = peg$c42; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c44(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c42; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c45(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 126) { - s1 = peg$c46; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c47); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseequalSpacingPredicateList(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 126) { - s3 = peg$c46; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c47); - } - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c44(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 126) { - s1 = peg$c46; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c47); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c48(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$c49; - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c50(); - } - s0 = s1; - } - } - } - } - } - - return s0; - } - - function peg$parsepredicateList() { - var s0; - - s0 = peg$parsesimplePredicate(); - if (s0 === peg$FAILED) { - s0 = peg$parsepredicateListWithParens(); - } - - return s0; - } - - function peg$parsesimplePredicate() { - var s0, s1; - - s0 = peg$currPos; - s1 = peg$parsepercentage(); - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c51(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsenumber(); - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c52(s1); - } - s0 = s1; - } - - return s0; - } - - function peg$parsepredicateListWithParens() { - var s0, s1, s2, s3, s4, s5, s6; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c53; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c54); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicate(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parsepredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parsepredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 41) { - s4 = peg$c55; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c56); - } - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c57(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsepredicate() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parserelation(); - if (s1 === peg$FAILED) { - s1 = peg$c4; - } - if (s1 !== peg$FAILED) { - s2 = peg$parseobjectOfPredicate(); - if (s2 !== peg$FAILED) { - s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 64) { - s4 = peg$c58; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c59); - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parsepriority(); - if (s5 !== peg$FAILED) { - s4 = [s4, s5]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } else { - peg$currPos = s3; - s3 = peg$c0; - } - if (s3 === peg$FAILED) { - s3 = peg$c4; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c60(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseequalSpacingPredicateList() { - var s0, s1, s2, s3, s4, s5, s6; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c53; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c54); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseequalSpacingPredicate(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parseequalSpacingPredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parseequalSpacingPredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 41) { - s4 = peg$c55; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c56); - } - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c57(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseequalSpacingPredicate() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parserelation(); - if (s1 === peg$FAILED) { - s1 = peg$c4; - } - if (s1 !== peg$FAILED) { - s2 = peg$parseobjectOfPredicate(); - if (s2 !== peg$FAILED) { - s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 64) { - s4 = peg$c58; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c59); - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parsepriority(); - if (s5 !== peg$FAILED) { - s4 = [s4, s5]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } else { - peg$currPos = s3; - s3 = peg$c0; - } - if (s3 === peg$FAILED) { - s3 = peg$c4; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c61(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parserelation() { - var s0, s1; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c62) { - s1 = peg$c62; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c63); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c64(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c65) { - s1 = peg$c65; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c66); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c67(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c68) { - s1 = peg$c68; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c69); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c70(); - } - s0 = s1; - } - } - - return s0; - } - - function peg$parseobjectOfPredicate() { - var s0; - - s0 = peg$parsepercentage(); - if (s0 === peg$FAILED) { - s0 = peg$parseconstant(); - if (s0 === peg$FAILED) { - s0 = peg$parseviewPredicate(); - } - } - - return s0; - } - - function peg$parsepriority() { - var s0, s1, s2; - - s0 = peg$currPos; - s1 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c73(s1); - } - s0 = s1; - - return s0; - } - - function peg$parseconstant() { - var s0, s1, s2; - - s0 = peg$currPos; - s1 = peg$parsenumber(); - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c74(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c42; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c75(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 43) { - s1 = peg$c76; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c77); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c74(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } - } - - return s0; - } - - function peg$parsepercentage() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - s1 = peg$parsenumber(); - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 37) { - s2 = peg$c78; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c79); - } - } - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c80(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c42; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 37) { - s3 = peg$c78; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c79); - } - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c81(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 43) { - s1 = peg$c76; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c77); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 37) { - s3 = peg$c78; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c79); - } - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c80(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } - } - - return s0; - } - - function peg$parseviewPredicate() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = peg$parseviewName(); - if (s1 !== peg$FAILED) { - s2 = peg$parseattribute(); - if (s2 === peg$FAILED) { - s2 = peg$c4; - } - if (s2 !== peg$FAILED) { - s3 = peg$parsemultiplier(); - if (s3 === peg$FAILED) { - s3 = peg$c4; - } - if (s3 !== peg$FAILED) { - s4 = peg$parseconstantExpr(); - if (s4 === peg$FAILED) { - s4 = peg$c4; - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c82(s1, s2, s3, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseattribute() { - var s0, s1; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c83) { - s1 = peg$c83; - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c84); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c85(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c86) { - s1 = peg$c86; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c87); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c88(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c89) { - s1 = peg$c89; - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c90); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c91(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c92) { - s1 = peg$c92; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c93); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c94(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c95) { - s1 = peg$c95; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c96); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c97(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c98) { - s1 = peg$c98; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c99); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c100(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 8) === peg$c101) { - s1 = peg$c101; - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c102); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c103(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 8) === peg$c104) { - s1 = peg$c104; - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c105); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c106(); - } - s0 = s1; - } - } - } - } - } - } - } - - return s0; - } - - function peg$parsemultiplier() { - var s0, s1, s2; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 47) { - s1 = peg$c107; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c108); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c109(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c110) { - s1 = peg$c110; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c111); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c109(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c112) { - s1 = peg$c112; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c113); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c114(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 42) { - s1 = peg$c115; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c116); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c117(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c118) { - s1 = peg$c118; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c119); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c117(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c120) { - s1 = peg$c120; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c121); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c122(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } - } - } - } - } - - return s0; - } - - function peg$parseconstantExpr() { - var s0, s1, s2; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c42; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c122(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 43) { - s1 = peg$c76; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c77); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c117(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } - - return s0; - } - - function peg$parseviewNameRange() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = []; - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - s2 = input.substring(s1, peg$currPos); - } - s1 = s2; - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = []; - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - } - if (s3 !== peg$FAILED) { - s3 = input.substring(s2, peg$currPos); - } - s2 = s3; - if (s2 !== peg$FAILED) { - s3 = peg$parserange(); - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c127(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$currPos; - s2 = []; - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - s2 = input.substring(s1, peg$currPos); - } - s1 = s2; - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = []; - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - } - if (s3 !== peg$FAILED) { - s3 = input.substring(s2, peg$currPos); - } - s2 = s3; - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c128(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } - - return s0; - } - - function peg$parseviewName() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = []; - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - s2 = input.substring(s1, peg$currPos); - } - s1 = s2; - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = []; - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - } - if (s3 !== peg$FAILED) { - s3 = input.substring(s2, peg$currPos); - } - s2 = s3; - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c128(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parserange() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c129) { - s1 = peg$c129; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c130); - } - } - if (s1 !== peg$FAILED) { - s2 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c71.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c131(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsenumber() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 46) { - s2 = peg$c132; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c133); - } - } - if (s2 !== peg$FAILED) { - s3 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c71.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - } - } else { - s3 = peg$c0; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c134(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c135(s1); - } - s0 = s1; - } - - return s0; - } - - function extend(dst) { - for (var i = 1; i < arguments.length; i++) { - for (var k in arguments[i]) { - dst[k] = arguments[i][k]; - } - } - return dst; - } - - peg$result = peg$startRuleFunction(); - - if (peg$result !== peg$FAILED && peg$currPos === input.length) { - return peg$result; - } else { - if (peg$result !== peg$FAILED && peg$currPos < input.length) { - peg$fail({ type: "end", description: "end of input" }); - } - - throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos); - } - } - - return { - SyntaxError: SyntaxError, - parse: parse - }; -}(); - -var Orientation = { - HORIZONTAL: 1, - VERTICAL: 2, - ZINDEX: 4 -}; - -/** - * Helper function that inserts equal spacers (~). - * @private - */ -function _processEqualSpacer(context, stackView) { - - // Determine unique name for the spacer - context.equalSpacerIndex = context.equalSpacerIndex || 1; - var name = '_~' + context.lineIndex + ':' + context.equalSpacerIndex + '~'; - if (context.equalSpacerIndex > 1) { - - // Ensure that all spacers have the same width/height - context.constraints.push({ - view1: '_~' + context.lineIndex + ':1~', - attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - relation: context.relation.relation || Relation.EQU, - view2: name, - attr2: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - priority: context.relation.priority - }); - } - context.equalSpacerIndex++; - - // Enforce view/proportional width/height - if (context.relation.view || context.relation.multiplier && context.relation.multiplier !== 1) { - context.constraints.push({ - view1: name, - attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - relation: context.relation.relation || Relation.EQU, - view2: context.relation.view, - attr2: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - priority: context.relation.priority, - multiplier: context.relation.multiplier - }); - context.relation.multiplier = undefined; - } else if (context.relation.constant) { - context.constraints.push({ - view1: name, - attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - relation: Relation.EQU, - view2: null, - attr2: Attribute.CONST, - priority: context.relation.priority, - constant: context.relation.constant - }); - context.relation.constant = undefined; - } - - // Add constraint - for (var i = 0; i < context.prevViews.length; i++) { - var prevView = context.prevViews[i]; - switch (context.orientation) { - case Orientation.HORIZONTAL: - context.prevAttr = prevView !== stackView ? Attribute.RIGHT : Attribute.LEFT; - context.curAttr = Attribute.LEFT; - break; - case Orientation.VERTICAL: - context.prevAttr = prevView !== stackView ? Attribute.BOTTOM : Attribute.TOP; - context.curAttr = Attribute.TOP; - break; - case Orientation.ZINDEX: - context.prevAttr = Attribute.ZINDEX; - context.curAttr = Attribute.ZINDEX; - context.relation.constant = prevView !== stackView ? 'default' : 0; - break; - } - context.constraints.push({ - view1: prevView, - attr1: context.prevAttr, - relation: context.relation.relation, - view2: name, - attr2: context.curAttr, - priority: context.relation.priority - }); - } - context.prevViews = [name]; -} - -/** - * Helper function that inserts proportional spacers (-12%-). - * @private - */ -function _processProportionalSpacer(context, stackView) { - context.proportionalSpacerIndex = context.proportionalSpacerIndex || 1; - var name = '_-' + context.lineIndex + ':' + context.proportionalSpacerIndex + '-'; - context.proportionalSpacerIndex++; - context.constraints.push({ - view1: name, - attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - relation: context.relation.relation || Relation.EQU, - view2: context.relation.view, // or relative to the stackView... food for thought - attr2: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - priority: context.relation.priority, - multiplier: context.relation.multiplier - }); - context.relation.multiplier = undefined; - - // Add constraint - for (var i = 0; i < context.prevViews.length; i++) { - var prevView = context.prevViews[i]; - switch (context.orientation) { - case Orientation.HORIZONTAL: - context.prevAttr = prevView !== stackView ? Attribute.RIGHT : Attribute.LEFT; - context.curAttr = Attribute.LEFT; - break; - case Orientation.VERTICAL: - context.prevAttr = prevView !== stackView ? Attribute.BOTTOM : Attribute.TOP; - context.curAttr = Attribute.TOP; - break; - case Orientation.ZINDEX: - context.prevAttr = Attribute.ZINDEX; - context.curAttr = Attribute.ZINDEX; - context.relation.constant = prevView !== stackView ? 'default' : 0; - break; - } - context.constraints.push({ - view1: prevView, - attr1: context.prevAttr, - relation: context.relation.relation, - view2: name, - attr2: context.curAttr, - priority: context.relation.priority - }); - } - context.prevViews = [name]; -} - -/** - * In case of a stack-view, set constraints for opposite orientations - * @private - */ -function _processStackView(context, name, subView) { - var viewName = void 0; - for (var orientation = 1; orientation <= 4; orientation *= 2) { - if (subView.orientations & orientation && subView.stack.orientation !== orientation && !(subView.stack.processedOrientations & orientation)) { - subView.stack.processedOrientations = subView.stack.processedOrientations | orientation; - viewName = viewName || { - name: name, - type: 'stack' - }; - for (var i = 0, j = subView.stack.subViews.length; i < j; i++) { - if (orientation === Orientation.ZINDEX) { - context.constraints.push({ - view1: viewName, - attr1: Attribute.ZINDEX, - relation: Relation.EQU, - view2: subView.stack.subViews[i], - attr2: Attribute.ZINDEX - }); - } else { - context.constraints.push({ - view1: viewName, - attr1: orientation === Orientation.VERTICAL ? Attribute.HEIGHT : Attribute.WIDTH, - relation: Relation.EQU, - view2: subView.stack.subViews[i], - attr2: orientation === Orientation.VERTICAL ? Attribute.HEIGHT : Attribute.WIDTH - }); - context.constraints.push({ - view1: viewName, - attr1: orientation === Orientation.VERTICAL ? Attribute.TOP : Attribute.LEFT, - relation: Relation.EQU, - view2: subView.stack.subViews[i], - attr2: orientation === Orientation.VERTICAL ? Attribute.TOP : Attribute.LEFT - }); - } - } - } - } -} - -/** - * Recursive helper function converts a view-name and a range to a series - * of view-names (e.g. [child1, child2, child3, ...]). - * @private - */ -function _getRange(name, range) { - if (range === true) { - range = name.match(/\.\.\d+$/); - if (range) { - name = name.substring(0, name.length - range[0].length); - range = parseInt(range[0].substring(2)); - } - } - if (!range) { - return [name]; - } - var start = name.match(/\d+$/); - var res = []; - var i; - if (start) { - name = name.substring(0, name.length - start[0].length); - for (i = parseInt(start); i <= range; i++) { - res.push(name + i); - } - } else { - res.push(name); - for (i = 2; i <= range; i++) { - res.push(name + i); - } - } - return res; -} - -/** - * Recursive helper function that processes the cascaded data. - * @private - */ -function _processCascade(context, cascade, parentItem) { - var stackView = parentItem ? parentItem.view : null; - var subViews = []; - var curViews = []; - var subView = void 0; - if (stackView) { - cascade.push({ view: stackView }); - curViews.push(stackView); - } - for (var i = 0; i < cascade.length; i++) { - var item = cascade[i]; - if (!Array.isArray(item) && item.hasOwnProperty('view') || Array.isArray(item) && item[0].view && !item[0].relation) { - var items = Array.isArray(item) ? item : [item]; - for (var z = 0; z < items.length; z++) { - item = items[z]; - var viewRange = item === ',' ? [] : item.view ? _getRange(item.view, item.range) : [null]; - for (var r = 0; r < viewRange.length; r++) { - var curView = viewRange[r]; - curViews.push(curView); - - // - // Add this view to the collection of subViews - // - if (curView !== stackView) { - subViews.push(curView); - subView = context.subViews[curView]; - if (!subView) { - subView = { orientations: 0 }; - context.subViews[curView] = subView; - } - subView.orientations = subView.orientations | context.orientation; - if (subView.stack) { - _processStackView(context, curView, subView); - } - } - - // - // Process the relationship between this and the previous views - // - if (context.prevViews !== undefined && curView !== undefined && context.relation) { - if (context.relation.relation !== 'none') { - for (var p = 0; p < context.prevViews.length; p++) { - var prevView = context.prevViews[p]; - switch (context.orientation) { - case Orientation.HORIZONTAL: - context.prevAttr = prevView !== stackView ? Attribute.RIGHT : Attribute.LEFT; - context.curAttr = curView !== stackView ? Attribute.LEFT : Attribute.RIGHT; - break; - case Orientation.VERTICAL: - context.prevAttr = prevView !== stackView ? Attribute.BOTTOM : Attribute.TOP; - context.curAttr = curView !== stackView ? Attribute.TOP : Attribute.BOTTOM; - break; - case Orientation.ZINDEX: - context.prevAttr = Attribute.ZINDEX; - context.curAttr = Attribute.ZINDEX; - context.relation.constant = !prevView ? 0 : context.relation.constant || 'default'; - break; - } - context.constraints.push({ - view1: prevView, - attr1: context.prevAttr, - relation: context.relation.relation, - view2: curView, - attr2: context.curAttr, - multiplier: context.relation.multiplier, - constant: context.relation.constant === 'default' || !context.relation.constant ? context.relation.constant : -context.relation.constant, - priority: context.relation.priority - }); - } - } - } - - // - // Process view size constraints - // - var constraints = item.constraints; - if (constraints) { - for (var n = 0; n < constraints.length; n++) { - context.prevAttr = context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT; - context.curAttr = constraints[n].view || constraints[n].multiplier ? constraints[n].attribute || context.prevAttr : constraints[n].variable ? Attribute.VARIABLE : Attribute.CONST; - context.constraints.push({ - view1: curView, - attr1: context.prevAttr, - relation: constraints[n].relation, - view2: constraints[n].view, - attr2: context.curAttr, - multiplier: constraints[n].multiplier, - constant: constraints[n].constant, - priority: constraints[n].priority - }); - } - } - - // - // Process cascaded data (child stack-views) - // - if (item.cascade) { - _processCascade(context, item.cascade, item); - } - } - } - } else if (item !== ',') { - context.prevViews = curViews; - curViews = []; - context.relation = item[0]; - if (context.prevViews !== undefined) { - if (context.relation.equalSpacing) { - _processEqualSpacer(context, stackView); - } - if (context.relation.multiplier) { - _processProportionalSpacer(context, stackView); - } - } - } - } - - if (stackView) { - subView = context.subViews[stackView]; - if (!subView) { - subView = { orientations: context.orientation }; - context.subViews[stackView] = subView; - } else if (subView.stack) { - var err = new Error('A stack named "' + stackView + '" has already been created'); - err.column = parentItem.$parserOffset + 1; - throw err; - } - subView.stack = { - orientation: context.orientation, - processedOrientations: context.orientation, - subViews: subViews - }; - _processStackView(context, stackView, subView); - } -} - -var metaInfoCategories = ['viewport', 'spacing', 'colors', 'shapes', 'widths', 'heights']; - -/** - * VisualFormat - * - * @namespace VisualFormat - */ - -var VisualFormat = function () { - function VisualFormat() { - _classCallCheck(this, VisualFormat); - } - - _createClass(VisualFormat, null, [{ - key: 'parseLine', - - - /** - * Parses a single line of vfl into an array of constraint definitions. - * - * When the visual-format could not be succesfully parsed an exception is thrown containing - * additional info about the parse error and column position. - * - * @param {String} visualFormat Visual format string (cannot contain line-endings!). - * @param {Object} [options] Configuration options. - * @param {Boolean} [options.extended] When set to true uses the extended syntax (default: false). - * @param {String} [options.outFormat] Output format (`constraints` or `raw`) (default: `constraints`). - * @param {Number} [options.lineIndex] Line-index used when auto generating equal-spacing constraints. - * @return {Array} Array of constraint definitions. - */ - value: function parseLine(visualFormat, options) { - if (visualFormat.length === 0 || options && options.extended && visualFormat.indexOf('//') === 0) { - return []; - } - var res = options && options.extended ? parserExt.parse(visualFormat) : parser.parse(visualFormat); - if (options && options.outFormat === 'raw') { - return [res]; - } - var context = { - constraints: [], - lineIndex: (options ? options.lineIndex : undefined) || 1, - subViews: (options ? options.subViews : undefined) || {} - }; - if (res.type === 'attribute') { - for (var n = 0; n < res.attributes.length; n++) { - var attr = res.attributes[n]; - for (var m = 0; m < attr.predicates.length; m++) { - var predicate = attr.predicates[m]; - context.constraints.push({ - view1: res.view, - attr1: attr.attr, - relation: predicate.relation, - view2: predicate.view, - attr2: predicate.attribute || attr.attr, - multiplier: predicate.multiplier, - constant: predicate.constant, - priority: predicate.priority - }); - } - } - } else { - switch (res.orientation) { - case 'horizontal': - context.orientation = Orientation.HORIZONTAL; - context.horizontal = true; - _processCascade(context, res.cascade, null); - break; - case 'vertical': - context.orientation = Orientation.VERTICAL; - _processCascade(context, res.cascade, null); - break; - case 'horzvert': - context.orientation = Orientation.HORIZONTAL; - context.horizontal = true; - _processCascade(context, res.cascade, null); - context = { - constraints: context.constraints, - lineIndex: context.lineIndex, - subViews: context.subViews, - orientation: Orientation.VERTICAL - }; - _processCascade(context, res.cascade, null); - break; - case 'zIndex': - context.orientation = Orientation.ZINDEX; - _processCascade(context, res.cascade, null); - break; - } - } - return context.constraints; - } - - /** - * Parses one or more visual format strings into an array of constraint definitions. - * - * When the visual-format could not be succesfully parsed an exception is thrown containing - * additional info about the parse error and column position. - * - * @param {String|Array} visualFormat One or more visual format strings. - * @param {Object} [options] Configuration options. - * @param {Boolean} [options.extended] When set to true uses the extended syntax (default: false). - * @param {Boolean} [options.strict] When set to false trims any leading/trailing spaces and ignores empty lines (default: true). - * @param {String} [options.lineSeparator] String that defines the end of a line (default `\n`). - * @param {String} [options.outFormat] Output format (`constraints` or `raw`) (default: `constraints`). - * @return {Array} Array of constraint definitions. - */ - - }, { - key: 'parse', - value: function parse(visualFormat, options) { - var lineSeparator = options && options.lineSeparator ? options.lineSeparator : '\n'; - if (!Array.isArray(visualFormat) && visualFormat.indexOf(lineSeparator) < 0) { - try { - return this.parseLine(visualFormat, options); - } catch (err) { - err.source = visualFormat; - throw err; - } - } - - // Decompose visual-format into an array of strings, and within those strings - // search for line-endings, and treat each line as a seperate visual-format. - visualFormat = Array.isArray(visualFormat) ? visualFormat : [visualFormat]; - var lines = void 0; - var constraints = []; - var lineIndex = 0; - var line = void 0; - var parseOptions = { - lineIndex: lineIndex, - extended: options && options.extended, - strict: options && options.strict !== undefined ? options.strict : true, - outFormat: options ? options.outFormat : undefined, - subViews: {} - }; - try { - for (var i = 0; i < visualFormat.length; i++) { - lines = visualFormat[i].split(lineSeparator); - for (var j = 0; j < lines.length; j++) { - line = lines[j]; - lineIndex++; - parseOptions.lineIndex = lineIndex; - if (!parseOptions.strict) { - line = line.trim(); - } - if (parseOptions.strict || line.length) { - constraints = constraints.concat(this.parseLine(line, parseOptions)); - } - } - } - } catch (err) { - err.source = line; - err.line = lineIndex; - throw err; - } - return constraints; - } - - /** - * Parses meta information from the comments in the VFL. - * - * Additional meta information can be specified in the comments - * for previewing and rendering purposes. For instance, the view-port - * aspect-ratio, sub-view widths and colors, can be specified. The - * following example renders three colored circles in the visual-format editor: - * - * ```vfl - * //viewport aspect-ratio:3/1 max-height:300 - * //colors red:#FF0000 green:#00FF00 blue:#0000FF - * //shapes red:circle green:circle blue:circle - * H:|-[row:[red(green,blue)]-[green]-[blue]]-| - * V:|[row]| - * ``` - * - * Supported categories and properties: - * - * |Category|Property|Example| - * |--------|--------|-------| - * |`viewport`|`aspect-ratio:{width}/{height}`|`//viewport aspect-ratio:16/9`| - * ||`width:[{number}/intrinsic]`|`//viewport width:10`| - * ||`height:[{number}/intrinsic]`|`//viewport height:intrinsic`| - * ||`min-width:{number}`| - * ||`max-width:{number}`| - * ||`min-height:{number}`| - * ||`max-height:{number}`| - * |`spacing`|`[{number}/array]`|`//spacing:8` or `//spacing:[10, 20, 5]`| - * |`widths`|`{view-name}:[{number}/intrinsic]`|`//widths subview1:100`| - * |`heights`|`{view-name}:[{number}/intrinsic]`|`//heights subview1:intrinsic`| - * |`colors`|`{view-name}:{color}`|`//colors redview:#FF0000 blueview:#00FF00`| - * |`shapes`|`{view-name}:[circle/square]`|`//shapes avatar:circle`| - * - * @param {String|Array} visualFormat One or more visual format strings. - * @param {Object} [options] Configuration options. - * @param {String} [options.lineSeparator] String that defines the end of a line (default `\n`). - * @param {String} [options.prefix] When specified, also processes the categories using that prefix (e.g. "-dev-viewport max-height:10"). - * @return {Object} meta-info - */ - - }, { - key: 'parseMetaInfo', - value: function parseMetaInfo(visualFormat, options) { - var lineSeparator = options && options.lineSeparator ? options.lineSeparator : '\n'; - var prefix = options ? options.prefix : undefined; - visualFormat = Array.isArray(visualFormat) ? visualFormat : [visualFormat]; - var metaInfo = {}; - var key; - for (var k = 0; k < visualFormat.length; k++) { - var lines = visualFormat[k].split(lineSeparator); - for (var i = 0; i < lines.length; i++) { - var line = lines[i]; - for (var c = 0; c < metaInfoCategories.length; c++) { - for (var s = 0; s < (prefix ? 2 : 1); s++) { - var category = metaInfoCategories[c]; - var prefixedCategory = (s === 0 ? '' : prefix) + category; - if (line.indexOf('//' + prefixedCategory + ' ') === 0) { - var items = line.substring(3 + prefixedCategory.length).split(' '); - for (var j = 0; j < items.length; j++) { - metaInfo[category] = metaInfo[category] || {}; - var item = items[j].split(':'); - var names = _getRange(item[0], true); - for (var r = 0; r < names.length; r++) { - metaInfo[category][names[r]] = item.length > 1 ? item[1] : ''; - } - } - } else if (line.indexOf('//' + prefixedCategory + ':') === 0) { - metaInfo[category] = line.substring(3 + prefixedCategory.length); - } - } - } - } - } - if (metaInfo.viewport) { - var viewport = metaInfo.viewport; - var aspectRatio = viewport['aspect-ratio']; - if (aspectRatio) { - aspectRatio = aspectRatio.split('/'); - viewport['aspect-ratio'] = parseInt(aspectRatio[0]) / parseInt(aspectRatio[1]); - } - if (viewport.height !== undefined) { - viewport.height = viewport.height === 'intrinsic' ? true : parseInt(viewport.height); - } - if (viewport.width !== undefined) { - viewport.width = viewport.width === 'intrinsic' ? true : parseInt(viewport.width); - } - if (viewport['max-height'] !== undefined) { - viewport['max-height'] = parseInt(viewport['max-height']); - } - if (viewport['max-width'] !== undefined) { - viewport['max-width'] = parseInt(viewport['max-width']); - } - if (viewport['min-height'] !== undefined) { - viewport['min-height'] = parseInt(viewport['min-height']); - } - if (viewport['min-width'] !== undefined) { - viewport['min-width'] = parseInt(viewport['min-width']); - } - } - if (metaInfo.widths) { - for (key in metaInfo.widths) { - var width = metaInfo.widths[key] === 'intrinsic' ? true : parseInt(metaInfo.widths[key]); - metaInfo.widths[key] = width; - if (width === undefined || isNaN(width)) { - delete metaInfo.widths[key]; - } - } - } - if (metaInfo.heights) { - for (key in metaInfo.heights) { - var height = metaInfo.heights[key] === 'intrinsic' ? true : parseInt(metaInfo.heights[key]); - metaInfo.heights[key] = height; - if (height === undefined || isNaN(height)) { - delete metaInfo.heights[key]; - } - } - } - if (metaInfo.spacing) { - var value = JSON.parse(metaInfo.spacing); - metaInfo.spacing = value; - if (Array.isArray(value)) { - for (var sIdx = 0, len = value.length; sIdx < len; sIdx++) { - if (isNaN(value[sIdx])) { - delete metaInfo.spacing; - break; - } - } - } else if (value === undefined || isNaN(value)) { - delete metaInfo.spacing; - } - } - return metaInfo; - } - }]); - - return VisualFormat; -}(); - -/** - * A SubView is automatically generated when constraints are added to a View. - * - * @namespace SubView - */ - - -var SubView = function () { - function SubView(options) { - _classCallCheck(this, SubView); - - this._name = options.name; - this._type = options.type; - this._solver = options.solver; - this._attr = {}; - if (!options.name) { - if (true) { - this._attr[Attribute.LEFT] = new c.Variable(); - this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.LEFT], c.Strength.required)); - this._attr[Attribute.TOP] = new c.Variable(); - this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.TOP], c.Strength.required)); - this._attr[Attribute.ZINDEX] = new c.Variable(); - this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.ZINDEX], c.Strength.required)); - } else { - this._attr[Attribute.LEFT] = new kiwi.Variable(); - this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.LEFT], kiwi.Operator.Eq, 0)); - this._attr[Attribute.TOP] = new kiwi.Variable(); - this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.TOP], kiwi.Operator.Eq, 0)); - this._attr[Attribute.ZINDEX] = new kiwi.Variable(); - this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.ZINDEX], kiwi.Operator.Eq, 0)); - } - } - } - - _createClass(SubView, [{ - key: 'toJSON', - value: function toJSON() { - return { - name: this.name, - left: this.left, - top: this.top, - width: this.width, - height: this.height - }; - } - }, { - key: 'toString', - value: function toString() { - JSON.stringify(this.toJSON(), undefined, 2); - } - - /** - * Name of the sub-view. - * @readonly - * @type {String} - */ - - }, { - key: 'getValue', - - - /** - * Gets the value of one of the attributes. - * - * @param {String|Attribute} attr Attribute name (e.g. 'right', 'centerY', Attribute.TOP). - * @return {Number} value or `undefined` - */ - value: function getValue(attr) { - return this._attr[attr] ? this._attr[attr].value() : undefined; - } - - /** - * @private - */ - - }, { - key: '_getAttr', - value: function _getAttr(attr) { - if (this._attr[attr]) { - return this._attr[attr]; - } - this._attr[attr] = true ? new c.Variable() : new kiwi.Variable(); - switch (attr) { - case Attribute.RIGHT: - this._getAttr(Attribute.LEFT); - this._getAttr(Attribute.WIDTH); - if (true) { - this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.LEFT], this._attr[Attribute.WIDTH]))); - } else { - this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.LEFT].plus(this._attr[Attribute.WIDTH]))); - } - break; - case Attribute.BOTTOM: - this._getAttr(Attribute.TOP); - this._getAttr(Attribute.HEIGHT); - if (true) { - this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.TOP], this._attr[Attribute.HEIGHT]))); - } else { - this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.TOP].plus(this._attr[Attribute.HEIGHT]))); - } - break; - case Attribute.CENTERX: - this._getAttr(Attribute.LEFT); - this._getAttr(Attribute.WIDTH); - if (true) { - this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.LEFT], c.divide(this._attr[Attribute.WIDTH], 2)))); - } else { - this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.LEFT].plus(this._attr[Attribute.WIDTH].divide(2)))); - } - break; - case Attribute.CENTERY: - this._getAttr(Attribute.TOP); - this._getAttr(Attribute.HEIGHT); - if (true) { - this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.TOP], c.divide(this._attr[Attribute.HEIGHT], 2)))); - } else { - this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.TOP].plus(this._attr[Attribute.HEIGHT].divide(2)))); - } - break; - } - if (!true) { - this._solver.updateVariables(); - } - return this._attr[attr]; - } - - /** - * @private - */ - - }, { - key: '_getAttrValue', - value: function _getAttrValue(attr) { - if (true) { - return this._getAttr(attr).value; - } else { - return this._getAttr(attr).value(); - } - } - }, { - key: 'name', - get: function get() { - return this._name; - } - - /** - * Left value (`Attribute.LEFT`). - * @readonly - * @type {Number} - */ - - }, { - key: 'left', - get: function get() { - return this._getAttrValue(Attribute.LEFT); - } - - /** - * Right value (`Attribute.RIGHT`). - * @readonly - * @type {Number} - */ - - }, { - key: 'right', - get: function get() { - return this._getAttrValue(Attribute.RIGHT); - } - - /** - * Width value (`Attribute.WIDTH`). - * @type {Number} - */ - - }, { - key: 'width', - get: function get() { - return this._getAttrValue(Attribute.WIDTH); - } - - /** - * Height value (`Attribute.HEIGHT`). - * @readonly - * @type {Number} - */ - - }, { - key: 'height', - get: function get() { - return this._getAttrValue(Attribute.HEIGHT); - } - - /** - * Intrinsic width of the sub-view. - * - * Use this property to explicitely set the width of the sub-view, e.g.: - * ```javascript - * var view = new AutoLayout.View(AutoLayout.VisualFormat.parse('|[child1][child2]|'), { - * width: 500 - * }); - * view.subViews.child1.intrinsicWidth = 100; - * console.log('child2 width: ' + view.subViews.child2.width); // 400 - * ``` - * - * @type {Number} - */ - - }, { - key: 'intrinsicWidth', - get: function get() { - return this._intrinsicWidth; - }, - set: function set(value) { - if (value !== undefined && value !== this._intrinsicWidth) { - var attr = this._getAttr(Attribute.WIDTH); - if (this._intrinsicWidth === undefined) { - if (true) { - this._solver.addEditVar(attr, new c.Strength('required', this._name ? 998 : 999, 1000, 1000)); - } else { - this._solver.addEditVariable(attr, kiwi.Strength.create(this._name ? 998 : 999, 1000, 1000)); - } - } - this._intrinsicWidth = value; - this._solver.suggestValue(attr, value); - if (true) { - this._solver.resolve(); - } else { - this._solver.updateVariables(); - } - } - } - - /** - * Intrinsic height of the sub-view. - * - * See `intrinsicWidth`. - * - * @type {Number} - */ - - }, { - key: 'intrinsicHeight', - get: function get() { - return this._intrinsicHeight; - }, - set: function set(value) { - if (value !== undefined && value !== this._intrinsicHeight) { - var attr = this._getAttr(Attribute.HEIGHT); - if (this._intrinsicHeight === undefined) { - if (true) { - this._solver.addEditVar(attr, new c.Strength('required', this._name ? 998 : 999, 1000, 1000)); - } else { - this._solver.addEditVariable(attr, kiwi.Strength.create(this._name ? 998 : 999, 1000, 1000)); - } - } - this._intrinsicHeight = value; - this._solver.suggestValue(attr, value); - if (true) { - this._solver.resolve(); - } else { - this._solver.updateVariables(); - } - } - } - - /** - * Top value (`Attribute.TOP`). - * @readonly - * @type {Number} - */ - - }, { - key: 'top', - get: function get() { - return this._getAttrValue(Attribute.TOP); - } - - /** - * Bottom value (`Attribute.BOTTOM`). - * @readonly - * @type {Number} - */ - - }, { - key: 'bottom', - get: function get() { - return this._getAttrValue(Attribute.BOTTOM); - } - - /** - * Horizontal center (`Attribute.CENTERX`). - * @readonly - * @type {Number} - */ - - }, { - key: 'centerX', - get: function get() { - return this._getAttrValue(Attribute.CENTERX); - } - - /** - * Vertical center (`Attribute.CENTERY`). - * @readonly - * @type {Number} - */ - - }, { - key: 'centerY', - get: function get() { - return this._getAttrValue(Attribute.CENTERY); - } - - /** - * Z-index (`Attribute.ZINDEX`). - * @readonly - * @type {Number} - */ - - }, { - key: 'zIndex', - get: function get() { - return this._getAttrValue(Attribute.ZINDEX); - } - - /** - * Returns the type of the sub-view. - * @readonly - * @type {String} - */ - - }, { - key: 'type', - get: function get() { - return this._type; - } - }]); - - return SubView; -}(); - -var defaultPriorityStrength = true ? new c.Strength('defaultPriority', 0, 1000, 1000) : kiwi.Strength.create(0, 1000, 1000); - -function _getConst(name, value) { - if (true) { - var vr = new c.Variable({ value: value }); - this._solver.addConstraint(new c.StayConstraint(vr, c.Strength.required, 0)); - return vr; - } else { - var _vr = new kiwi.Variable(); - this._solver.addConstraint(new kiwi.Constraint(_vr, kiwi.Operator.Eq, value)); - return _vr; - } -} - -function _getSubView(viewName) { - if (!viewName) { - return this._parentSubView; - } else if (viewName.name) { - this._subViews[viewName.name] = this._subViews[viewName.name] || new SubView({ - name: viewName.name, - solver: this._solver - }); - this._subViews[viewName.name]._type = this._subViews[viewName.name]._type || viewName.type; - return this._subViews[viewName.name]; - } else { - this._subViews[viewName] = this._subViews[viewName] || new SubView({ - name: viewName, - solver: this._solver - }); - return this._subViews[viewName]; - } -} - -function _getSpacing(constraint) { - var index = 4; - if (!constraint.view1 && constraint.attr1 === 'left') { - index = 3; - } else if (!constraint.view1 && constraint.attr1 === 'top') { - index = 0; - } else if (!constraint.view2 && constraint.attr2 === 'right') { - index = 1; - } else if (!constraint.view2 && constraint.attr2 === 'bottom') { - index = 2; - } else { - switch (constraint.attr1) { - case 'left': - case 'right': - case 'centerX': - case 'leading': - case 'trailing': - index = 4; - break; - case 'zIndex': - index = 6; - break; - default: - index = 5; - } - } - this._spacingVars = this._spacingVars || new Array(7); - this._spacingExpr = this._spacingExpr || new Array(7); - if (!this._spacingVars[index]) { - if (true) { - this._spacingVars[index] = new c.Variable(); - this._solver.addEditVar(this._spacingVars[index]); - this._spacingExpr[index] = c.minus(0, this._spacingVars[index]); - } else { - this._spacingVars[index] = new kiwi.Variable(); - this._solver.addEditVariable(this._spacingVars[index], kiwi.Strength.create(999, 1000, 1000)); - this._spacingExpr[index] = this._spacingVars[index].multiply(-1); - } - this._solver.suggestValue(this._spacingVars[index], this._spacing[index]); - } - return this._spacingExpr[index]; -} - -function _addConstraint(constraint) { - //this.constraints.push(constraint); - var relation = void 0; - var multiplier = constraint.multiplier !== undefined ? constraint.multiplier : 1; - var constant = constraint.constant !== undefined ? constraint.constant : 0; - if (constant === 'default') { - constant = _getSpacing.call(this, constraint); - } - var attr1 = _getSubView.call(this, constraint.view1)._getAttr(constraint.attr1); - var attr2 = void 0; - if (true) { - if (constraint.attr2 === Attribute.CONST) { - attr2 = _getConst.call(this, undefined, constraint.constant); - } else { - attr2 = _getSubView.call(this, constraint.view2)._getAttr(constraint.attr2); - if (multiplier !== 1 && constant) { - attr2 = c.plus(c.times(attr2, multiplier), constant); - } else if (constant) { - attr2 = c.plus(attr2, constant); - } else if (multiplier !== 1) { - attr2 = c.times(attr2, multiplier); - } - } - var strength = constraint.priority !== undefined && constraint.priority < 1000 ? new c.Strength('priority', 0, constraint.priority, 1000) : defaultPriorityStrength; - switch (constraint.relation) { - case Relation.EQU: - relation = new c.Equation(attr1, attr2, strength); - break; - case Relation.GEQ: - relation = new c.Inequality(attr1, c.GEQ, attr2, strength); - break; - case Relation.LEQ: - relation = new c.Inequality(attr1, c.LEQ, attr2, strength); - break; - default: - throw 'Invalid relation specified: ' + constraint.relation; - } - } else { - if (constraint.attr2 === Attribute.CONST) { - attr2 = _getConst.call(this, undefined, constraint.constant); - } else { - attr2 = _getSubView.call(this, constraint.view2)._getAttr(constraint.attr2); - if (multiplier !== 1 && constant) { - attr2 = attr2.multiply(multiplier).plus(constant); - } else if (constant) { - attr2 = attr2.plus(constant); - } else if (multiplier !== 1) { - attr2 = attr2.multiply(multiplier); - } - } - var _strength = constraint.priority !== undefined && constraint.priority < 1000 ? kiwi.Strength.create(0, constraint.priority, 1000) : defaultPriorityStrength; - switch (constraint.relation) { - case Relation.EQU: - relation = new kiwi.Constraint(attr1, kiwi.Operator.Eq, attr2, _strength); - break; - case Relation.GEQ: - relation = new kiwi.Constraint(attr1, kiwi.Operator.Ge, attr2, _strength); - break; - case Relation.LEQ: - relation = new kiwi.Constraint(attr1, kiwi.Operator.Le, attr2, _strength); - break; - default: - throw 'Invalid relation specified: ' + constraint.relation; - } - } - this._solver.addConstraint(relation); -} - -function _compareSpacing(old, newz) { - if (old === newz) { - return true; - } - if (!old || !newz) { - return false; - } - for (var i = 0; i < 7; i++) { - if (old[i] !== newz[i]) { - return false; - } - } - return true; -} - -/** - * AutoLayoutJS API reference. - * - * ### Index - * - * |Entity|Type|Description| - * |---|---|---| - * |[AutoLayout](#autolayout)|`namespace`|Top level AutoLayout object.| - * |[VisualFormat](#autolayoutvisualformat--object)|`namespace`|Parses VFL into constraints.| - * |[View](#autolayoutview)|`class`|Main entity for adding & evaluating constraints.| - * |[SubView](#autolayoutsubview--object)|`class`|SubView's are automatically created when constraints are added to views. They give access to the evaluated results.| - * |[Attribute](#autolayoutattribute--enum)|`enum`|Attribute types that are supported when adding constraints.| - * |[Relation](#autolayoutrelation--enum)|`enum`|Relationship types that are supported when adding constraints.| - * |[Priority](#autolayoutpriority--enum)|`enum`|Default priority values for when adding constraints.| - * - * ### AutoLayout - * - * @module AutoLayout - */ - -var View = function () { - - /** - * @class View - * @param {Object} [options] Configuration options. - * @param {Number} [options.width] Initial width of the view. - * @param {Number} [options.height] Initial height of the view. - * @param {Number|Object} [options.spacing] Spacing for the view (default: 8) (see `setSpacing`). - * @param {Array} [options.constraints] One or more constraint definitions (see `addConstraints`). - */ - function View(options) { - _classCallCheck(this, View); - - this._solver = true ? new c.SimplexSolver() : new kiwi.Solver(); - this._subViews = {}; - //this._spacing = undefined; - this._parentSubView = new SubView({ - solver: this._solver - }); - this.setSpacing(options && options.spacing !== undefined ? options.spacing : 8); - //this.constraints = []; - if (options) { - if (options.width !== undefined || options.height !== undefined) { - this.setSize(options.width, options.height); - } - if (options.constraints) { - this.addConstraints(options.constraints); - } - } - } - - /** - * Sets the width and height of the view. - * - * @param {Number} width Width of the view. - * @param {Number} height Height of the view. - * @return {View} this - */ - - - _createClass(View, [{ - key: 'setSize', - value: function setSize(width, height /*, depth*/) { - this._parentSubView.intrinsicWidth = width; - this._parentSubView.intrinsicHeight = height; - return this; - } - - /** - * Width that was set using `setSize`. - * @readonly - * @type {Number} - */ - - }, { - key: 'setSpacing', - - - /** - * Sets the spacing for the view. - * - * The spacing can be set for 7 different variables: - * `top`, `right`, `bottom`, `left`, `width`, `height` and `zIndex`. The `left`-spacing is - * used when a spacer is used between the parent-view and a sub-view (e.g. `|-[subView]`). - * The same is true for the `right`, `top` and `bottom` spacers. The `width` and `height` are - * used for spacers in between sub-views (e.g. `[view1]-[view2]`). - * - * Instead of using the full spacing syntax, it is also possible to use shorthand notations: - * - * |Syntax|Type|Description| - * |---|---|---| - * |`[top, right, bottom, left, width, height, zIndex]`|Array(7)|Full syntax including z-index **(clockwise order)**.| - * |`[top, right, bottom, left, width, height]`|Array(6)|Full horizontal & vertical spacing syntax (no z-index) **(clockwise order)**.| - * |`[horizontal, vertical, zIndex]`|Array(3)|Horizontal = left, right, width, vertical = top, bottom, height.| - * |`[horizontal, vertical]`|Array(2)|Horizontal = left, right, width, vertical = top, bottom, height, z-index = 1.| - * |`spacing`|Number|Horizontal & vertical spacing are all the same, z-index = 1.| - * - * Examples: - * ```javascript - * view.setSpacing(10); // horizontal & vertical spacing 10 - * view.setSpacing([10, 15, 2]); // horizontal spacing 10, vertical spacing 15, z-axis spacing 2 - * view.setSpacing([10, 20, 10, 20, 5, 5]); // top, right, bottom, left, horizontal, vertical - * view.setSpacing([10, 20, 10, 20, 5, 5, 1]); // top, right, bottom, left, horizontal, vertical, z - * ``` - * - * @param {Number|Array} spacing - * @return {View} this - */ - value: function setSpacing(spacing) { - // convert spacing into array: [top, right, bottom, left, horz, vert, z-index] - switch (Array.isArray(spacing) ? spacing.length : -1) { - case -1: - spacing = [spacing, spacing, spacing, spacing, spacing, spacing, 1];break; - case 1: - spacing = [spacing[0], spacing[0], spacing[0], spacing[0], spacing[0], spacing[0], 1];break; - case 2: - spacing = [spacing[1], spacing[0], spacing[1], spacing[0], spacing[0], spacing[1], 1];break; - case 3: - spacing = [spacing[1], spacing[0], spacing[1], spacing[0], spacing[0], spacing[1], spacing[2]];break; - case 6: - spacing = [spacing[0], spacing[1], spacing[2], spacing[3], spacing[4], spacing[5], 1];break; - case 7: - break; - default: - throw 'Invalid spacing syntax'; - } - if (!_compareSpacing(this._spacing, spacing)) { - this._spacing = spacing; - // update spacing variables - if (this._spacingVars) { - for (var i = 0; i < this._spacingVars.length; i++) { - if (this._spacingVars[i]) { - this._solver.suggestValue(this._spacingVars[i], this._spacing[i]); - } - } - if (true) { - this._solver.resolve(); - } else { - this._solver.updateVariables(); - } - } - } - return this; - } - - /** - * Adds a constraint definition. - * - * A constraint definition has the following format: - * - * ```javascript - * constraint: { - * view1: {String}, - * attr1: {AutoLayout.Attribute}, - * relation: {AutoLayout.Relation}, - * view2: {String}, - * attr2: {AutoLayout.Attribute}, - * multiplier: {Number}, - * constant: {Number}, - * priority: {Number}(0..1000) - * } - * ``` - * @param {Object} constraint Constraint definition. - * @return {View} this - */ - - }, { - key: 'addConstraint', - value: function addConstraint(constraint) { - _addConstraint.call(this, constraint); - if (!true) { - this._solver.updateVariables(); - } - return this; - } - - /** - * Adds one or more constraint definitions. - * - * A constraint definition has the following format: - * - * ```javascript - * constraint: { - * view1: {String}, - * attr1: {AutoLayout.Attribute}, - * relation: {AutoLayout.Relation}, - * view2: {String}, - * attr2: {AutoLayout.Attribute}, - * multiplier: {Number}, - * constant: {Number}, - * priority: {Number}(0..1000) - * } - * ``` - * @param {Array} constraints One or more constraint definitions. - * @return {View} this - */ - - }, { - key: 'addConstraints', - value: function addConstraints(constraints) { - for (var j = 0; j < constraints.length; j++) { - _addConstraint.call(this, constraints[j]); - } - if (!true) { - this._solver.updateVariables(); - } - return this; - } - - /** - * Dictionary of `SubView` objects that have been created when adding constraints. - * @readonly - * @type {Object.SubView} - */ - - }, { - key: 'width', - get: function get() { - return this._parentSubView.intrinsicWidth; - } - - /** - * Height that was set using `setSize`. - * @readonly - * @type {Number} - */ - - }, { - key: 'height', - get: function get() { - return this._parentSubView.intrinsicHeight; - } - - /** - * Width that is calculated from the constraints and the `.intrinsicWidth` of - * the sub-views. - * - * When the width has been explicitely set using `setSize`, the fittingWidth - * will **always** be the same as the explicitely set width. To calculate the size - * based on the content, use: - * ```javascript - * var view = new AutoLayout.View({ - * constraints: VisualFormat.parse('|-[view1]-[view2]-'), - * spacing: 20 - * }); - * view.subViews.view1.intrinsicWidth = 100; - * view.subViews.view2.intrinsicWidth = 100; - * console.log('fittingWidth: ' + view.fittingWidth); // 260 - * ``` - * - * @readonly - * @type {Number} - */ - - }, { - key: 'fittingWidth', - get: function get() { - return this._parentSubView.width; - } - - /** - * Height that is calculated from the constraints and the `.intrinsicHeight` of - * the sub-views. - * - * See `.fittingWidth`. - * - * @readonly - * @type {Number} - */ - - }, { - key: 'fittingHeight', - get: function get() { - return this._parentSubView.height; - } - }, { - key: 'subViews', - get: function get() { - return this._subViews; - } - - /** - * Checks whether the constraints incompletely specify the location - * of the subViews. - * @private - */ - //get hasAmbiguousLayout() { - // Todo - //} - - }]); - - return View; -}(); - -//import DOM from './DOM'; - -/** - * AutoLayout. - * - * @namespace AutoLayout - * @property {Attribute} Attribute - * @property {Relation} Relation - * @property {Priority} Priority - * @property {VisualFormat} VisualFormat - * @property {View} View - * @property {SubView} SubView - */ - - -var AutoLayout = { - Attribute: Attribute, - Relation: Relation, - Priority: Priority, - VisualFormat: VisualFormat, - View: View, - SubView: SubView - //DOM: DOM -}; - -module.exports = AutoLayout; - -},{"cassowary/bin/c":2}],2:[function(require,module,exports){ -/** - * Parts Copyright (C) 2011-2012, Alex Russell (slightlyoff@chromium.org) - * Parts Copyright (C) Copyright (C) 1998-2000 Greg J. Badros - * - * Use of this source code is governed by the LGPL, which can be found in the - * COPYING.LGPL file. - * - * This is a compiled version of Cassowary/JS. For source versions or to - * contribute, see the github project: - * - * https://github.com/slightlyoff/cassowary-js-refactor - * - */ - -(function() { -(function(a){"use strict";try{(function(){}).bind(a)}catch(b){Object.defineProperty(Function.prototype,"bind",{value:function(a){var b=this;return function(){return b.apply(a,arguments)}},enumerable:!1,configurable:!0,writable:!0})}var c=a.HTMLElement!==void 0,d=function(a){for(var b=null;a&&a!=Object.prototype;){if(a.tagName){b=a.tagName;break}a=a.prototype}return b||"div"},e=1e-8,f={},g=function(a,b){if(a&&b){if("function"==typeof a[b])return a[b];var c=a.prototype;if(c&&"function"==typeof c[b])return c[b];if(c!==Object.prototype&&c!==Function.prototype)return"function"==typeof a.__super__?g(a.__super__,b):void 0}},h=a.c={debug:!1,trace:!1,verbose:!1,traceAdded:!1,GC:!1,GEQ:1,LEQ:2,inherit:function(b){var e=null,g=null;b["extends"]&&(g=b["extends"],delete b["extends"]),b.initialize&&(e=b.initialize,delete b.initialize);var h=e||function(){};Object.defineProperty(h,"__super__",{value:g?g:Object,enumerable:!1,configurable:!0,writable:!1}),b._t&&(f[b._t]=h);var i=h.prototype=Object.create(g?g.prototype:Object.prototype);if(this.extend(i,b),c&&g&&g.prototype instanceof a.HTMLElement){var j=h,k=d(i),l=function(a){return a.__proto__=i,j.apply(a,arguments),i.created&&a.created(),i.decorate&&a.decorate(),a};this.extend(i,{upgrade:l}),h=function(){return l(a.document.createElement(k))},h.prototype=i,this.extend(h,{ctor:j})}return h},extend:function(a,b){return this.own(b,function(c){var d=Object.getOwnPropertyDescriptor(b,c);try{"function"==typeof d.get||"function"==typeof d.set?Object.defineProperty(a,c,d):"function"==typeof d.value||"_"===c.charAt(0)?(d.writable=!0,d.configurable=!0,d.enumerable=!1,Object.defineProperty(a,c,d)):a[c]=b[c]}catch(e){}}),a},own:function(b,c,d){return Object.getOwnPropertyNames(b).forEach(c,d||a),b},traceprint:function(a){h.verbose&&console.log(a)},fnenterprint:function(a){console.log("* "+a)},fnexitprint:function(a){console.log("- "+a)},assert:function(a,b){if(!a)throw new h.InternalError("Assertion failed: "+b)},plus:function(a,b){return a instanceof h.Expression||(a=new h.Expression(a)),b instanceof h.Expression||(b=new h.Expression(b)),a.plus(b)},minus:function(a,b){return a instanceof h.Expression||(a=new h.Expression(a)),b instanceof h.Expression||(b=new h.Expression(b)),a.minus(b)},times:function(a,b){return("number"==typeof a||a instanceof h.Variable)&&(a=new h.Expression(a)),("number"==typeof b||b instanceof h.Variable)&&(b=new h.Expression(b)),a.times(b)},divide:function(a,b){return("number"==typeof a||a instanceof h.Variable)&&(a=new h.Expression(a)),("number"==typeof b||b instanceof h.Variable)&&(b=new h.Expression(b)),a.divide(b)},approx:function(a,b){if(a===b)return!0;var c,d;return c=a instanceof h.Variable?a.value:a,d=b instanceof h.Variable?b.value:b,0==c?e>Math.abs(d):0==d?e>Math.abs(c):Math.abs(c-d)64||this._deleted>this._compactThreshold&&(this._compact(),this._deleted=0)},"delete":function(a){a=b(a),this._store.hasOwnProperty(a)&&(this._deleted++,delete this._store[a],this.size>0&&this.size--)},each:function(a,b){if(this.size){this._perhapsCompact();var c=this._store,d=this._keyStrMap;Object.keys(this._store).forEach(function(e){a.call(b||null,d[e],c[e])},this)}},escapingEach:function(a,b){if(this.size){this._perhapsCompact();for(var c=this,e=this._store,f=this._keyStrMap,g=d,h=Object.keys(e),i=0;h.length>i;i++)if(function(d){c._store.hasOwnProperty(d)&&(g=a.call(b||null,f[d],e[d]))}(h[i]),g){if(void 0!==g.retval)return g;if(g.brk)break}}},clone:function(){var b=new a.HashTable;return this.size&&(b.size=this.size,c(this._store,b._store),c(this._keyStrMap,b._keyStrMap)),b},equals:function(b){if(b===this)return!0;if(!(b instanceof a.HashTable)||b._size!==this._size)return!1;for(var c=Object.keys(this._store),d=0;c.length>d;d++){var e=c[d];if(this._keyStrMap[e]!==b._keyStrMap[e]||this._store[e]!==b._store[e])return!1}return!0},toString:function(){var b="";return this.each(function(a,c){b+=a+" => "+c+"\n"}),b}})}(this.c||module.parent.exports||{}),function(a){"use strict";a.HashSet=a.inherit({_t:"c.HashSet",initialize:function(){this.storage=[],this.size=0},add:function(a){var b=this.storage;b.indexOf(a),-1==b.indexOf(a)&&b.push(a),this.size=this.storage.length},values:function(){return this.storage},has:function(a){var b=this.storage;return-1!=b.indexOf(a)},"delete":function(a){var b=this.storage.indexOf(a);return-1==b?null:(this.storage.splice(b,1)[0],this.size=this.storage.length,void 0)},clear:function(){this.storage.length=0},each:function(a,b){this.size&&this.storage.forEach(a,b)},escapingEach:function(a,b){this.size&&this.storage.forEach(a,b)},toString:function(){var a=this.size+" {",b=!0;return this.each(function(c){b?b=!1:a+=", ",a+=c}),a+="}\n"},toJSON:function(){var a=[];return this.each(function(b){a.push(b.toJSON())}),{_t:"c.HashSet",data:a}},fromJSON:function(b){var c=new a.HashSet;return b.data&&(c.size=b.data.length,c.storage=b.data),c}})}(this.c||module.parent.exports||{}),function(a){"use strict";a.Error=a.inherit({initialize:function(a){a&&(this._description=a)},_name:"c.Error",_description:"An error has occured in Cassowary",set description(a){this._description=a},get description(){return"("+this._name+") "+this._description},get message(){return this.description},toString:function(){return this.description}});var b=function(b,c){return a.inherit({"extends":a.Error,initialize:function(){a.Error.apply(this,arguments)},_name:b||"",_description:c||""})};a.ConstraintNotFound=b("c.ConstraintNotFound","Tried to remove a constraint never added to the tableu"),a.InternalError=b("c.InternalError"),a.NonExpression=b("c.NonExpression","The resulting expression would be non"),a.NotEnoughStays=b("c.NotEnoughStays","There are not enough stays to give specific values to every variable"),a.RequiredFailure=b("c.RequiredFailure","A required constraint cannot be satisfied"),a.TooDifficult=b("c.TooDifficult","The constraints are too difficult to solve")}(this.c||module.parent.exports||{}),function(a){"use strict";var b=1e3;a.SymbolicWeight=a.inherit({_t:"c.SymbolicWeight",initialize:function(){this.value=0;for(var a=1,c=arguments.length-1;c>=0;--c)this.value+=arguments[c]*a,a*=b},toJSON:function(){return{_t:this._t,value:this.value}}})}(this.c||module.parent.exports||{}),function(a){a.Strength=a.inherit({initialize:function(b,c,d,e){this.name=b,this.symbolicWeight=c instanceof a.SymbolicWeight?c:new a.SymbolicWeight(c,d,e)},get required(){return this===a.Strength.required},toString:function(){return this.name+(this.isRequired?"":":"+this.symbolicWeight)}}),a.Strength.required=new a.Strength("",1e3,1e3,1e3),a.Strength.strong=new a.Strength("strong",1,0,0),a.Strength.medium=new a.Strength("medium",0,1,0),a.Strength.weak=new a.Strength("weak",0,0,1)}(this.c||("undefined"!=typeof module?module.parent.exports.c:{})),function(a){"use strict";a.AbstractVariable=a.inherit({isDummy:!1,isExternal:!1,isPivotable:!1,isRestricted:!1,_init:function(b,c){this.hashCode=a._inc(),this.name=(c||"")+this.hashCode,b&&(b.name!==void 0&&(this.name=b.name),b.value!==void 0&&(this.value=b.value),b.prefix!==void 0&&(this._prefix=b.prefix))},_prefix:"",name:"",value:0,toJSON:function(){var a={};return this._t&&(a._t=this._t),this.name&&(a.name=this.name),this.value!==void 0&&(a.value=this.value),this._prefix&&(a._prefix=this._prefix),this._t&&(a._t=this._t),a},fromJSON:function(b,c){var d=new c;return a.extend(d,b),d},toString:function(){return this._prefix+"["+this.name+":"+this.value+"]"}}),a.Variable=a.inherit({_t:"c.Variable","extends":a.AbstractVariable,initialize:function(b){this._init(b,"v");var c=a.Variable._map;c&&(c[this.name]=this)},isExternal:!0}),a.DummyVariable=a.inherit({_t:"c.DummyVariable","extends":a.AbstractVariable,initialize:function(a){this._init(a,"d")},isDummy:!0,isRestricted:!0,value:"dummy"}),a.ObjectiveVariable=a.inherit({_t:"c.ObjectiveVariable","extends":a.AbstractVariable,initialize:function(a){this._init(a,"o")},value:"obj"}),a.SlackVariable=a.inherit({_t:"c.SlackVariable","extends":a.AbstractVariable,initialize:function(a){this._init(a,"s")},isPivotable:!0,isRestricted:!0,value:"slack"})}(this.c||module.parent.exports||{}),function(a){"use strict";a.Point=a.inherit({initialize:function(b,c,d){if(b instanceof a.Variable)this._x=b;else{var e={value:b};d&&(e.name="x"+d),this._x=new a.Variable(e)}if(c instanceof a.Variable)this._y=c;else{var f={value:c};d&&(f.name="y"+d),this._y=new a.Variable(f)}},get x(){return this._x},set x(b){b instanceof a.Variable?this._x=b:this._x.value=b},get y(){return this._y},set y(b){b instanceof a.Variable?this._y=b:this._y.value=b},toString:function(){return"("+this.x+", "+this.y+")"}})}(this.c||module.parent.exports||{}),function(a){"use strict";a.Expression=a.inherit({initialize:function(b,c,d){a.GC&&console.log("new c.Expression"),this.constant="number"!=typeof d||isNaN(d)?0:d,this.terms=new a.HashTable,b instanceof a.AbstractVariable?this.setVariable(b,"number"==typeof c?c:1):"number"==typeof b&&(isNaN(b)?console.trace():this.constant=b)},initializeFromHash:function(b,c){return a.verbose&&(console.log("*******************************"),console.log("clone c.initializeFromHash"),console.log("*******************************")),a.GC&&console.log("clone c.Expression"),this.constant=b,this.terms=c.clone(),this},multiplyMe:function(a){this.constant*=a;var b=this.terms;return b.each(function(c,d){b.set(c,d*a)}),this},clone:function(){a.verbose&&(console.log("*******************************"),console.log("clone c.Expression"),console.log("*******************************"));var b=new a.Expression;return b.initializeFromHash(this.constant,this.terms),b},times:function(b){if("number"==typeof b)return this.clone().multiplyMe(b);if(this.isConstant)return b.times(this.constant);if(b.isConstant)return this.times(b.constant);throw new a.NonExpression},plus:function(b){return b instanceof a.Expression?this.clone().addExpression(b,1):b instanceof a.Variable?this.clone().addVariable(b,1):void 0},minus:function(b){return b instanceof a.Expression?this.clone().addExpression(b,-1):b instanceof a.Variable?this.clone().addVariable(b,-1):void 0},divide:function(b){if("number"==typeof b){if(a.approx(b,0))throw new a.NonExpression;return this.times(1/b)}if(b instanceof a.Expression){if(!b.isConstant)throw new a.NonExpression;return this.times(1/b.constant)}},addExpression:function(b,c,d,e){return b instanceof a.AbstractVariable&&(b=new a.Expression(b),a.trace&&console.log("addExpression: Had to cast a var to an expression")),c=c||1,this.constant+=c*b.constant,b.terms.each(function(a,b){this.addVariable(a,b*c,d,e)},this),this},addVariable:function(b,c,d,e){null==c&&(c=1),a.trace&&console.log("c.Expression::addVariable():",b,c);var f=this.terms.get(b);if(f){var g=f+c;0==g||a.approx(g,0)?(e&&e.noteRemovedVariable(b,d),this.terms.delete(b)):this.setVariable(b,g)}else a.approx(c,0)||(this.setVariable(b,c),e&&e.noteAddedVariable(b,d));return this},setVariable:function(a,b){return this.terms.set(a,b),this},anyPivotableVariable:function(){if(this.isConstant)throw new a.InternalError("anyPivotableVariable called on a constant");var b=this.terms.escapingEach(function(a){return a.isPivotable?{retval:a}:void 0});return b&&void 0!==b.retval?b.retval:null},substituteOut:function(b,c,d,e){a.trace&&(a.fnenterprint("CLE:substituteOut: "+b+", "+c+", "+d+", ..."),a.traceprint("this = "+this));var f=this.setVariable.bind(this),g=this.terms,h=g.get(b);g.delete(b),this.constant+=h*c.constant,c.terms.each(function(b,c){var i=g.get(b);if(i){var j=i+h*c;a.approx(j,0)?(e.noteRemovedVariable(b,d),g.delete(b)):f(b,j)}else f(b,h*c),e&&e.noteAddedVariable(b,d)}),a.trace&&a.traceprint("Now this is "+this)},changeSubject:function(a,b){this.setVariable(a,this.newSubject(b))},newSubject:function(b){a.trace&&a.fnenterprint("newSubject:"+b);var c=1/this.terms.get(b);return this.terms.delete(b),this.multiplyMe(-c),c},coefficientFor:function(a){return this.terms.get(a)||0},get isConstant(){return 0==this.terms.size},toString:function(){var b="",c=!1;if(!a.approx(this.constant,0)||this.isConstant){if(b+=this.constant,this.isConstant)return b;c=!0}return this.terms.each(function(a,d){c&&(b+=" + "),b+=d+"*"+a,c=!0}),b},equals:function(b){return b===this?!0:b instanceof a.Expression&&b.constant===this.constant&&b.terms.equals(this.terms)},Plus:function(a,b){return a.plus(b)},Minus:function(a,b){return a.minus(b)},Times:function(a,b){return a.times(b)},Divide:function(a,b){return a.divide(b)}})}(this.c||module.parent.exports||{}),function(a){"use strict";a.AbstractConstraint=a.inherit({initialize:function(b,c){this.hashCode=a._inc(),this.strength=b||a.Strength.required,this.weight=c||1},isEditConstraint:!1,isInequality:!1,isStayConstraint:!1,get required(){return this.strength===a.Strength.required},toString:function(){return this.strength+" {"+this.weight+"} ("+this.expression+")"}});var b=a.AbstractConstraint.prototype.toString,c=function(b,c,d){a.AbstractConstraint.call(this,c||a.Strength.strong,d),this.variable=b,this.expression=new a.Expression(b,-1,b.value)};a.EditConstraint=a.inherit({"extends":a.AbstractConstraint,initialize:function(){c.apply(this,arguments)},isEditConstraint:!0,toString:function(){return"edit:"+b.call(this)}}),a.StayConstraint=a.inherit({"extends":a.AbstractConstraint,initialize:function(){c.apply(this,arguments)},isStayConstraint:!0,toString:function(){return"stay:"+b.call(this)}});var d=a.Constraint=a.inherit({"extends":a.AbstractConstraint,initialize:function(b,c,d){a.AbstractConstraint.call(this,c,d),this.expression=b}});a.Inequality=a.inherit({"extends":a.Constraint,_cloneOrNewCle:function(b){return b.clone?b.clone():new a.Expression(b)},initialize:function(b,c,e,f,g){var h=b instanceof a.Expression,i=e instanceof a.Expression,j=b instanceof a.AbstractVariable,k=e instanceof a.AbstractVariable,l="number"==typeof b,m="number"==typeof e;if((h||l)&&k){var n=b,o=c,p=e,q=f,r=g;if(d.call(this,this._cloneOrNewCle(n),q,r),o==a.LEQ)this.expression.multiplyMe(-1),this.expression.addVariable(p);else{if(o!=a.GEQ)throw new a.InternalError("Invalid operator in c.Inequality constructor");this.expression.addVariable(p,-1)}}else if(j&&(i||m)){var n=e,o=c,p=b,q=f,r=g;if(d.call(this,this._cloneOrNewCle(n),q,r),o==a.GEQ)this.expression.multiplyMe(-1),this.expression.addVariable(p);else{if(o!=a.LEQ)throw new a.InternalError("Invalid operator in c.Inequality constructor");this.expression.addVariable(p,-1)}}else{if(h&&m){var s=b,o=c,t=e,q=f,r=g;if(d.call(this,this._cloneOrNewCle(s),q,r),o==a.LEQ)this.expression.multiplyMe(-1),this.expression.addExpression(this._cloneOrNewCle(t));else{if(o!=a.GEQ)throw new a.InternalError("Invalid operator in c.Inequality constructor");this.expression.addExpression(this._cloneOrNewCle(t),-1)}return this}if(l&&i){var s=e,o=c,t=b,q=f,r=g;if(d.call(this,this._cloneOrNewCle(s),q,r),o==a.GEQ)this.expression.multiplyMe(-1),this.expression.addExpression(this._cloneOrNewCle(t));else{if(o!=a.LEQ)throw new a.InternalError("Invalid operator in c.Inequality constructor");this.expression.addExpression(this._cloneOrNewCle(t),-1)}return this}if(h&&i){var s=b,o=c,t=e,q=f,r=g;if(d.call(this,this._cloneOrNewCle(t),q,r),o==a.GEQ)this.expression.multiplyMe(-1),this.expression.addExpression(this._cloneOrNewCle(s));else{if(o!=a.LEQ)throw new a.InternalError("Invalid operator in c.Inequality constructor");this.expression.addExpression(this._cloneOrNewCle(s),-1)}}else{if(h)return d.call(this,b,c,e);if(c==a.GEQ)d.call(this,new a.Expression(e),f,g),this.expression.multiplyMe(-1),this.expression.addVariable(b);else{if(c!=a.LEQ)throw new a.InternalError("Invalid operator in c.Inequality constructor");d.call(this,new a.Expression(e),f,g),this.expression.addVariable(b,-1)}}}},isInequality:!0,toString:function(){return d.prototype.toString.call(this)+" >= 0) id: "+this.hashCode}}),a.Equation=a.inherit({"extends":a.Constraint,initialize:function(b,c,e,f){if(b instanceof a.Expression&&!c||c instanceof a.Strength)d.call(this,b,c,e);else if(b instanceof a.AbstractVariable&&c instanceof a.Expression){var g=b,h=c,i=e,j=f;d.call(this,h.clone(),i,j),this.expression.addVariable(g,-1)}else if(b instanceof a.AbstractVariable&&"number"==typeof c){var g=b,k=c,i=e,j=f;d.call(this,new a.Expression(k),i,j),this.expression.addVariable(g,-1)}else if(b instanceof a.Expression&&c instanceof a.AbstractVariable){var h=b,g=c,i=e,j=f;d.call(this,h.clone(),i,j),this.expression.addVariable(g,-1)}else{if(!(b instanceof a.Expression||b instanceof a.AbstractVariable||"number"==typeof b)||!(c instanceof a.Expression||c instanceof a.AbstractVariable||"number"==typeof c))throw"Bad initializer to c.Equation";b=b instanceof a.Expression?b.clone():new a.Expression(b),c=c instanceof a.Expression?c.clone():new a.Expression(c),d.call(this,b,e,f),this.expression.addExpression(c,-1)}a.assert(this.strength instanceof a.Strength,"_strength not set")},toString:function(){return d.prototype.toString.call(this)+" = 0)"}})}(this.c||module.parent.exports||{}),function(a){"use strict";a.EditInfo=a.inherit({initialize:function(a,b,c,d,e){this.constraint=a,this.editPlus=b,this.editMinus=c,this.prevEditConstant=d,this.index=e},toString:function(){return""}})}(this.c||module.parent.exports||{}),function(a){"use strict";a.Tableau=a.inherit({initialize:function(){this.columns=new a.HashTable,this.rows=new a.HashTable,this._infeasibleRows=new a.HashSet,this._externalRows=new a.HashSet,this._externalParametricVars=new a.HashSet},noteRemovedVariable:function(b,c){a.trace&&console.log("c.Tableau::noteRemovedVariable: ",b,c);var d=this.columns.get(b);c&&d&&d.delete(c)},noteAddedVariable:function(a,b){b&&this.insertColVar(a,b)},getInternalInfo:function(){var a="Tableau Information:\n";return a+="Rows: "+this.rows.size,a+=" (= "+(this.rows.size-1)+" constraints)",a+="\nColumns: "+this.columns.size,a+="\nInfeasible Rows: "+this._infeasibleRows.size,a+="\nExternal basic variables: "+this._externalRows.size,a+="\nExternal parametric variables: ",a+=this._externalParametricVars.size,a+="\n"},toString:function(){var a="Tableau:\n";return this.rows.each(function(b,c){a+=b,a+=" <==> ",a+=c,a+="\n"}),a+="\nColumns:\n",a+=this.columns,a+="\nInfeasible rows: ",a+=this._infeasibleRows,a+="External basic variables: ",a+=this._externalRows,a+="External parametric variables: ",a+=this._externalParametricVars},insertColVar:function(b,c){var d=this.columns.get(b);d||(d=new a.HashSet,this.columns.set(b,d)),d.add(c)},addRow:function(b,c){a.trace&&a.fnenterprint("addRow: "+b+", "+c),this.rows.set(b,c),c.terms.each(function(a){this.insertColVar(a,b),a.isExternal&&this._externalParametricVars.add(a)},this),b.isExternal&&this._externalRows.add(b),a.trace&&a.traceprint(""+this)},removeColumn:function(b){a.trace&&a.fnenterprint("removeColumn:"+b);var c=this.columns.get(b);c?(this.columns.delete(b),c.each(function(a){var c=this.rows.get(a);c.terms.delete(b)},this)):a.trace&&console.log("Could not find var",b,"in columns"),b.isExternal&&(this._externalRows.delete(b),this._externalParametricVars.delete(b))},removeRow:function(b){a.trace&&a.fnenterprint("removeRow:"+b);var c=this.rows.get(b);return a.assert(null!=c),c.terms.each(function(c){var e=this.columns.get(c);null!=e&&(a.trace&&console.log("removing from varset:",b),e.delete(b))},this),this._infeasibleRows.delete(b),b.isExternal&&this._externalRows.delete(b),this.rows.delete(b),a.trace&&a.fnexitprint("returning "+c),c},substituteOut:function(b,c){a.trace&&a.fnenterprint("substituteOut:"+b+", "+c),a.trace&&a.traceprint(""+this);var d=this.columns.get(b);d.each(function(a){var d=this.rows.get(a);d.substituteOut(b,c,a,this),a.isRestricted&&0>d.constant&&this._infeasibleRows.add(a)},this),b.isExternal&&(this._externalRows.add(b),this._externalParametricVars.delete(b)),this.columns.delete(b)},columnsHasKey:function(a){return!!this.columns.get(a)}})}(this.c||module.parent.exports||{}),function(a){var b=a.Tableau,c=b.prototype,d=1e-8,e=a.Strength.weak;a.SimplexSolver=a.inherit({"extends":a.Tableau,initialize:function(){a.Tableau.call(this),this._stayMinusErrorVars=[],this._stayPlusErrorVars=[],this._errorVars=new a.HashTable,this._markerVars=new a.HashTable,this._objective=new a.ObjectiveVariable({name:"Z"}),this._editVarMap=new a.HashTable,this._editVarList=[],this._slackCounter=0,this._artificialCounter=0,this._dummyCounter=0,this.autoSolve=!0,this._fNeedsSolving=!1,this._optimizeCount=0,this.rows.set(this._objective,new a.Expression),this._stkCedcns=[0],a.trace&&a.traceprint("objective expr == "+this.rows.get(this._objective))},addLowerBound:function(b,c){var d=new a.Inequality(b,a.GEQ,new a.Expression(c));return this.addConstraint(d)},addUpperBound:function(b,c){var d=new a.Inequality(b,a.LEQ,new a.Expression(c));return this.addConstraint(d)},addBounds:function(a,b,c){return this.addLowerBound(a,b),this.addUpperBound(a,c),this},add:function(){for(var a=0;arguments.length>a;a++)this.addConstraint(arguments[a]);return this},addConstraint:function(b){a.trace&&a.fnenterprint("addConstraint: "+b);var c=Array(2),d=Array(1),e=this.newExpression(b,c,d);if(d=d[0],this.tryAddingDirectly(e)||this.addWithArtificialVariable(e),this._fNeedsSolving=!0,b.isEditConstraint){var f=this._editVarMap.size,g=c[0],h=c[1];!g instanceof a.SlackVariable&&console.warn("cvEplus not a slack variable =",g),!h instanceof a.SlackVariable&&console.warn("cvEminus not a slack variable =",h),a.debug&&console.log("new c.EditInfo("+b+", "+g+", "+h+", "+d+", "+f+")");var i=new a.EditInfo(b,g,h,d,f);this._editVarMap.set(b.variable,i),this._editVarList[f]={v:b.variable,info:i}}return this.autoSolve&&(this.optimize(this._objective),this._setExternalVariables()),this},addConstraintNoException:function(b){a.trace&&a.fnenterprint("addConstraintNoException: "+b);try{return this.addConstraint(b),!0}catch(c){return!1}},addEditVar:function(b,c){return a.trace&&a.fnenterprint("addEditVar: "+b+" @ "+c),this.addConstraint(new a.EditConstraint(b,c||a.Strength.strong))},beginEdit:function(){return a.assert(this._editVarMap.size>0,"_editVarMap.size > 0"),this._infeasibleRows.clear(),this._resetStayConstants(),this._stkCedcns.push(this._editVarMap.size),this},endEdit:function(){return a.assert(this._editVarMap.size>0,"_editVarMap.size > 0"),this.resolve(),this._stkCedcns.pop(),this.removeEditVarsTo(this._stkCedcns[this._stkCedcns.length-1]),this},removeAllEditVars:function(){return this.removeEditVarsTo(0)},removeEditVarsTo:function(b){try{for(var c=this._editVarList.length,d=b;c>d;d++)this._editVarList[d]&&this.removeConstraint(this._editVarMap.get(this._editVarList[d].v).constraint);return this._editVarList.length=b,a.assert(this._editVarMap.size==b,"_editVarMap.size == n"),this}catch(e){throw new a.InternalError("Constraint not found in removeEditVarsTo")}},addPointStays:function(b){return a.trace&&console.log("addPointStays",b),b.forEach(function(a,b){this.addStay(a.x,e,Math.pow(2,b)),this.addStay(a.y,e,Math.pow(2,b))},this),this},addStay:function(b,c,d){var f=new a.StayConstraint(b,c||e,d||1);return this.addConstraint(f)},removeConstraint:function(a){return this.removeConstraintInternal(a),this},removeConstraintInternal:function(b){a.trace&&a.fnenterprint("removeConstraintInternal: "+b),a.trace&&a.traceprint(""+this),this._fNeedsSolving=!0,this._resetStayConstants();var c=this.rows.get(this._objective),d=this._errorVars.get(b);a.trace&&a.traceprint("eVars == "+d),null!=d&&d.each(function(e){var f=this.rows.get(e);null==f?c.addVariable(e,-b.weight*b.strength.symbolicWeight.value,this._objective,this):c.addExpression(f,-b.weight*b.strength.symbolicWeight.value,this._objective,this),a.trace&&a.traceprint("now eVars == "+d)},this);var e=this._markerVars.get(b);if(this._markerVars.delete(b),null==e)throw new a.InternalError("Constraint not found in removeConstraintInternal");if(a.trace&&a.traceprint("Looking to remove var "+e),null==this.rows.get(e)){var f=this.columns.get(e);a.trace&&a.traceprint("Must pivot -- columns are "+f);var g=null,h=0;f.each(function(b){if(b.isRestricted){var c=this.rows.get(b),d=c.coefficientFor(e);if(a.trace&&a.traceprint("Marker "+e+"'s coefficient in "+c+" is "+d),0>d){var f=-c.constant/d;(null==g||h>f||a.approx(f,h)&&b.hashCoded)&&(h=d,g=a)}},this)),null==g&&(0==f.size?this.removeColumn(e):f.escapingEach(function(a){return a!=this._objective?(g=a,{brk:!0}):void 0},this)),null!=g&&this.pivot(e,g)}if(null!=this.rows.get(e)&&this.removeRow(e),null!=d&&d.each(function(a){a!=e&&this.removeColumn(a)},this),b.isStayConstraint){if(null!=d)for(var j=0;this._stayPlusErrorVars.length>j;j++)d.delete(this._stayPlusErrorVars[j]),d.delete(this._stayMinusErrorVars[j])}else if(b.isEditConstraint){a.assert(null!=d,"eVars != null");var k=this._editVarMap.get(b.variable);this.removeColumn(k.editMinus),this._editVarMap.delete(b.variable)}return null!=d&&this._errorVars.delete(d),this.autoSolve&&(this.optimize(this._objective),this._setExternalVariables()),this},reset:function(){throw a.trace&&a.fnenterprint("reset"),new a.InternalError("reset not implemented")},resolveArray:function(b){a.trace&&a.fnenterprint("resolveArray"+b);var c=b.length;this._editVarMap.each(function(a,d){var e=d.index;c>e&&this.suggestValue(a,b[e])},this),this.resolve()},resolvePair:function(a,b){this.suggestValue(this._editVarList[0].v,a),this.suggestValue(this._editVarList[1].v,b),this.resolve()},resolve:function(){a.trace&&a.fnenterprint("resolve()"),this.dualOptimize(),this._setExternalVariables(),this._infeasibleRows.clear(),this._resetStayConstants()},suggestValue:function(b,c){a.trace&&console.log("suggestValue("+b+", "+c+")");var d=this._editVarMap.get(b);if(!d)throw new a.Error("suggestValue for variable "+b+", but var is not an edit variable");var e=c-d.prevEditConstant;return d.prevEditConstant=c,this.deltaEditConstant(e,d.editPlus,d.editMinus),this},solve:function(){return this._fNeedsSolving&&(this.optimize(this._objective),this._setExternalVariables()),this},setEditedValue:function(b,c){if(!this.columnsHasKey(b)&&null==this.rows.get(b))return b.value=c,this;if(!a.approx(c,b.value)){this.addEditVar(b),this.beginEdit();try{this.suggestValue(b,c)}catch(d){throw new a.InternalError("Error in setEditedValue")}this.endEdit()}return this},addVar:function(b){if(!this.columnsHasKey(b)&&null==this.rows.get(b)){try{this.addStay(b)}catch(c){throw new a.InternalError("Error in addVar -- required failure is impossible")}a.trace&&a.traceprint("added initial stay on "+b)}return this},getInternalInfo:function(){var a=c.getInternalInfo.call(this);return a+="\nSolver info:\n",a+="Stay Error Variables: ",a+=this._stayPlusErrorVars.length+this._stayMinusErrorVars.length,a+=" ("+this._stayPlusErrorVars.length+" +, ",a+=this._stayMinusErrorVars.length+" -)\n",a+="Edit Variables: "+this._editVarMap.size,a+="\n"},getDebugInfo:function(){return""+this+this.getInternalInfo()+"\n"},toString:function(){var a=c.getInternalInfo.call(this);return a+="\n_stayPlusErrorVars: ",a+="["+this._stayPlusErrorVars+"]",a+="\n_stayMinusErrorVars: ",a+="["+this._stayMinusErrorVars+"]",a+="\n",a+="_editVarMap:\n"+this._editVarMap,a+="\n"},getConstraintMap:function(){return this._markerVars},addWithArtificialVariable:function(b){a.trace&&a.fnenterprint("addWithArtificialVariable: "+b);var c=new a.SlackVariable({value:++this._artificialCounter,prefix:"a"}),d=new a.ObjectiveVariable({name:"az"}),e=b.clone();a.trace&&a.traceprint("before addRows:\n"+this),this.addRow(d,e),this.addRow(c,b),a.trace&&a.traceprint("after addRows:\n"+this),this.optimize(d);var f=this.rows.get(d);if(a.trace&&a.traceprint("azTableauRow.constant == "+f.constant),!a.approx(f.constant,0))throw this.removeRow(d),this.removeColumn(c),new a.RequiredFailure;var g=this.rows.get(c);if(null!=g){if(g.isConstant)return this.removeRow(c),this.removeRow(d),void 0;var h=g.anyPivotableVariable();this.pivot(h,c)}a.assert(null==this.rows.get(c),"rowExpression(av) == null"),this.removeColumn(c),this.removeRow(d)},tryAddingDirectly:function(b){a.trace&&a.fnenterprint("tryAddingDirectly: "+b);var c=this.chooseSubject(b);return null==c?(a.trace&&a.fnexitprint("returning false"),!1):(b.newSubject(c),this.columnsHasKey(c)&&this.substituteOut(c,b),this.addRow(c,b),a.trace&&a.fnexitprint("returning true"),!0)},chooseSubject:function(b){a.trace&&a.fnenterprint("chooseSubject: "+b);var c=null,d=!1,e=!1,f=b.terms,g=f.escapingEach(function(a,b){if(d){if(!a.isRestricted&&!this.columnsHasKey(a))return{retval:a}}else if(a.isRestricted){if(!e&&!a.isDummy&&0>b){var f=this.columns.get(a);(null==f||1==f.size&&this.columnsHasKey(this._objective))&&(c=a,e=!0)}}else c=a,d=!0},this);if(g&&void 0!==g.retval)return g.retval;if(null!=c)return c;var h=0,g=f.escapingEach(function(a,b){return a.isDummy?(this.columnsHasKey(a)||(c=a,h=b),void 0):{retval:null}},this);if(g&&void 0!==g.retval)return g.retval;if(!a.approx(b.constant,0))throw new a.RequiredFailure;return h>0&&b.multiplyMe(-1),c},deltaEditConstant:function(b,c,d){a.trace&&a.fnenterprint("deltaEditConstant :"+b+", "+c+", "+d);var e=this.rows.get(c);if(null!=e)return e.constant+=b,0>e.constant&&this._infeasibleRows.add(c),void 0;var f=this.rows.get(d);if(null!=f)return f.constant+=-b,0>f.constant&&this._infeasibleRows.add(d),void 0;var g=this.columns.get(d);g||console.log("columnVars is null -- tableau is:\n"+this),g.each(function(a){var c=this.rows.get(a),e=c.coefficientFor(d);c.constant+=e*b,a.isRestricted&&0>c.constant&&this._infeasibleRows.add(a)},this)},dualOptimize:function(){a.trace&&a.fnenterprint("dualOptimize:");for(var b=this.rows.get(this._objective);this._infeasibleRows.size;){var c=this._infeasibleRows.values()[0];this._infeasibleRows.delete(c);var d=null,e=this.rows.get(c);if(e&&0>e.constant){var g,f=Number.MAX_VALUE,h=e.terms;if(h.each(function(c,e){if(e>0&&c.isPivotable){var h=b.coefficientFor(c);g=h/e,(f>g||a.approx(g,f)&&c.hashCodef.constant&&f.multiplyMe(-1),a.trace&&a.fnexitprint("returning "+f),f},optimize:function(b){a.trace&&a.fnenterprint("optimize: "+b),a.trace&&a.traceprint(""+this),this._optimizeCount++;var c=this.rows.get(b);a.assert(null!=c,"zRow != null");for(var g,h,e=null,f=null;;){if(g=0,h=c.terms,h.escapingEach(function(a,b){return a.isPivotable&&g>b?(g=b,e=a,{brk:1}):void 0},this),g>=-d)return;a.trace&&console.log("entryVar:",e,"objectiveCoeff:",g);var i=Number.MAX_VALUE,j=this.columns.get(e),k=0;if(j.each(function(b){if(a.trace&&a.traceprint("Checking "+b),b.isPivotable){var c=this.rows.get(b),d=c.coefficientFor(e);a.trace&&a.traceprint("pivotable, coeff = "+d),0>d&&(k=-c.constant/d,(i>k||a.approx(k,i)&&b.hashCodeb;b++){var c=this.rows.get(this._stayPlusErrorVars[b]);null==c&&(c=this.rows.get(this._stayMinusErrorVars[b])),null!=c&&(c.constant=0)}},_setExternalVariables:function(){a.trace&&a.fnenterprint("_setExternalVariables:"),a.trace&&a.traceprint(""+this),this._externalParametricVars.each(function(b){null!=this.rows.get(b)?a.trace&&console.log("Error: variable"+b+" in _externalParametricVars is basic"):b.value=0},this),this._externalRows.each(function(a){var b=this.rows.get(a);a.value!=b.constant&&(a.value=b.constant)},this),this._fNeedsSolving=!1,this.onsolved()},onsolved:function(){},insertErrorVar:function(b,c){a.trace&&a.fnenterprint("insertErrorVar:"+b+", "+c);var d=this._errorVars.get(c);d||(d=new a.HashSet,this._errorVars.set(b,d)),d.add(c)}})}(this.c||module.parent.exports||{}),function(a){"use strict";a.Timer=a.inherit({initialize:function(){this.isRunning=!1,this._elapsedMs=0},start:function(){return this.isRunning=!0,this._startReading=new Date,this},stop:function(){return this.isRunning=!1,this._elapsedMs+=new Date-this._startReading,this},reset:function(){return this.isRunning=!1,this._elapsedMs=0,this},elapsedTime:function(){return this.isRunning?(this._elapsedMs+(new Date-this._startReading))/1e3:this._elapsedMs/1e3}})}(this.c||module.parent.exports||{}),__cassowary_parser=function(){function a(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var b={parse:function(b,c){function k(a){g>e||(e>g&&(g=e,h=[]),h.push(a))}function l(){var a,b,c,d,f;if(d=e,f=e,a=z(),null!==a){if(c=m(),null!==c)for(b=[];null!==c;)b.push(c),c=m();else b=null;null!==b?(c=z(),null!==c?a=[a,b,c]:(a=null,e=f)):(a=null,e=f)}else a=null,e=f;return null!==a&&(a=function(a,b){return b}(d,a[1])),null===a&&(e=d),a}function m(){var a,b,c,d;return c=e,d=e,a=P(),null!==a?(b=s(),null!==b?a=[a,b]:(a=null,e=d)):(a=null,e=d),null!==a&&(a=function(a,b){return b}(c,a[0])),null===a&&(e=c),a}function n(){var a;return b.length>e?(a=b.charAt(e),e++):(a=null,0===f&&k("any character")),a}function o(){var a;return/^[a-zA-Z]/.test(b.charAt(e))?(a=b.charAt(e),e++):(a=null,0===f&&k("[a-zA-Z]")),null===a&&(36===b.charCodeAt(e)?(a="$",e++):(a=null,0===f&&k('"$"')),null===a&&(95===b.charCodeAt(e)?(a="_",e++):(a=null,0===f&&k('"_"')))),a}function p(){var a;return f++,/^[\t\x0B\f \xA0\uFEFF]/.test(b.charAt(e))?(a=b.charAt(e),e++):(a=null,0===f&&k("[\\t\\x0B\\f \\xA0\\uFEFF]")),f--,0===f&&null===a&&k("whitespace"),a}function q(){var a;return/^[\n\r\u2028\u2029]/.test(b.charAt(e))?(a=b.charAt(e),e++):(a=null,0===f&&k("[\\n\\r\\u2028\\u2029]")),a}function r(){var a;return f++,10===b.charCodeAt(e)?(a="\n",e++):(a=null,0===f&&k('"\\n"')),null===a&&("\r\n"===b.substr(e,2)?(a="\r\n",e+=2):(a=null,0===f&&k('"\\r\\n"')),null===a&&(13===b.charCodeAt(e)?(a="\r",e++):(a=null,0===f&&k('"\\r"')),null===a&&(8232===b.charCodeAt(e)?(a="\u2028",e++):(a=null,0===f&&k('"\\u2028"')),null===a&&(8233===b.charCodeAt(e)?(a="\u2029",e++):(a=null,0===f&&k('"\\u2029"')))))),f--,0===f&&null===a&&k("end of line"),a}function s(){var a,c,d;return d=e,a=z(),null!==a?(59===b.charCodeAt(e)?(c=";",e++):(c=null,0===f&&k('";"')),null!==c?a=[a,c]:(a=null,e=d)):(a=null,e=d),null===a&&(d=e,a=y(),null!==a?(c=r(),null!==c?a=[a,c]:(a=null,e=d)):(a=null,e=d),null===a&&(d=e,a=z(),null!==a?(c=t(),null!==c?a=[a,c]:(a=null,e=d)):(a=null,e=d))),a}function t(){var a,c;return c=e,f++,b.length>e?(a=b.charAt(e),e++):(a=null,0===f&&k("any character")),f--,null===a?a="":(a=null,e=c),a}function u(){var a;return f++,a=v(),null===a&&(a=x()),f--,0===f&&null===a&&k("comment"),a}function v(){var a,c,d,g,h,i,j;if(h=e,"/*"===b.substr(e,2)?(a="/*",e+=2):(a=null,0===f&&k('"/*"')),null!==a){for(c=[],i=e,j=e,f++,"*/"===b.substr(e,2)?(d="*/",e+=2):(d=null,0===f&&k('"*/"')),f--,null===d?d="":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==d;)c.push(d),i=e,j=e,f++,"*/"===b.substr(e,2)?(d="*/",e+=2):(d=null,0===f&&k('"*/"')),f--,null===d?d="":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==c?("*/"===b.substr(e,2)?(d="*/",e+=2):(d=null,0===f&&k('"*/"')),null!==d?a=[a,c,d]:(a=null,e=h)):(a=null,e=h)}else a=null,e=h;return a}function w(){var a,c,d,g,h,i,j;if(h=e,"/*"===b.substr(e,2)?(a="/*",e+=2):(a=null,0===f&&k('"/*"')),null!==a){for(c=[],i=e,j=e,f++,"*/"===b.substr(e,2)?(d="*/",e+=2):(d=null,0===f&&k('"*/"')),null===d&&(d=q()),f--,null===d?d="":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==d;)c.push(d),i=e,j=e,f++,"*/"===b.substr(e,2)?(d="*/",e+=2):(d=null,0===f&&k('"*/"')),null===d&&(d=q()),f--,null===d?d="":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==c?("*/"===b.substr(e,2)?(d="*/",e+=2):(d=null,0===f&&k('"*/"')),null!==d?a=[a,c,d]:(a=null,e=h)):(a=null,e=h)}else a=null,e=h;return a}function x(){var a,c,d,g,h,i,j;if(h=e,"//"===b.substr(e,2)?(a="//",e+=2):(a=null,0===f&&k('"//"')),null!==a){for(c=[],i=e,j=e,f++,d=q(),f--,null===d?d="":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==d;)c.push(d),i=e,j=e,f++,d=q(),f--,null===d?d="":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==c?a=[a,c]:(a=null,e=h)}else a=null,e=h;return a}function y(){var a,b;for(a=[],b=p(),null===b&&(b=w(),null===b&&(b=x()));null!==b;)a.push(b),b=p(),null===b&&(b=w(),null===b&&(b=x()));return a}function z(){var a,b;for(a=[],b=p(),null===b&&(b=r(),null===b&&(b=u()));null!==b;)a.push(b),b=p(),null===b&&(b=r(),null===b&&(b=u()));return a}function A(){var a,b;return b=e,a=C(),null===a&&(a=B()),null!==a&&(a=function(a,b){return{type:"NumericLiteral",value:b}}(b,a)),null===a&&(e=b),a}function B(){var a,c,d;if(d=e,/^[0-9]/.test(b.charAt(e))?(c=b.charAt(e),e++):(c=null,0===f&&k("[0-9]")),null!==c)for(a=[];null!==c;)a.push(c),/^[0-9]/.test(b.charAt(e))?(c=b.charAt(e),e++):(c=null,0===f&&k("[0-9]"));else a=null;return null!==a&&(a=function(a,b){return parseInt(b.join(""))}(d,a)),null===a&&(e=d),a}function C(){var a,c,d,g,h;return g=e,h=e,a=B(),null!==a?(46===b.charCodeAt(e)?(c=".",e++):(c=null,0===f&&k('"."')),null!==c?(d=B(),null!==d?a=[a,c,d]:(a=null,e=h)):(a=null,e=h)):(a=null,e=h),null!==a&&(a=function(a,b){return parseFloat(b.join(""))}(g,a)),null===a&&(e=g),a}function D(){var a,c,d,g;if(g=e,/^[\-+]/.test(b.charAt(e))?(a=b.charAt(e),e++):(a=null,0===f&&k("[\\-+]")),a=null!==a?a:"",null!==a){if(/^[0-9]/.test(b.charAt(e))?(d=b.charAt(e),e++):(d=null,0===f&&k("[0-9]")),null!==d)for(c=[];null!==d;)c.push(d),/^[0-9]/.test(b.charAt(e))?(d=b.charAt(e),e++):(d=null,0===f&&k("[0-9]"));else c=null;null!==c?a=[a,c]:(a=null,e=g)}else a=null,e=g;return a}function E(){var a,b;return f++,b=e,a=F(),null!==a&&(a=function(a,b){return b}(b,a)),null===a&&(e=b),f--,0===f&&null===a&&k("identifier"),a}function F(){var a,b,c,d,g;if(f++,d=e,g=e,a=o(),null!==a){for(b=[],c=o();null!==c;)b.push(c),c=o();null!==b?a=[a,b]:(a=null,e=g)}else a=null,e=g;return null!==a&&(a=function(a,b,c){return b+c.join("")}(d,a[0],a[1])),null===a&&(e=d),f--,0===f&&null===a&&k("identifier"),a}function G(){var a,c,d,g,h,i,j;return i=e,a=E(),null!==a&&(a=function(a,b){return{type:"Variable",name:b}}(i,a)),null===a&&(e=i),null===a&&(a=A(),null===a&&(i=e,j=e,40===b.charCodeAt(e)?(a="(",e++):(a=null,0===f&&k('"("')),null!==a?(c=z(),null!==c?(d=P(),null!==d?(g=z(),null!==g?(41===b.charCodeAt(e)?(h=")",e++):(h=null,0===f&&k('")"')),null!==h?a=[a,c,d,g,h]:(a=null,e=j)):(a=null,e=j)):(a=null,e=j)):(a=null,e=j)):(a=null,e=j),null!==a&&(a=function(a,b){return b}(i,a[2])),null===a&&(e=i))),a}function H(){var a,b,c,d,f;return a=G(),null===a&&(d=e,f=e,a=I(),null!==a?(b=z(),null!==b?(c=H(),null!==c?a=[a,b,c]:(a=null,e=f)):(a=null,e=f)):(a=null,e=f),null!==a&&(a=function(a,b,c){return{type:"UnaryExpression",operator:b,expression:c}}(d,a[0],a[2])),null===a&&(e=d)),a}function I(){var a;return 43===b.charCodeAt(e)?(a="+",e++):(a=null,0===f&&k('"+"')),null===a&&(45===b.charCodeAt(e)?(a="-",e++):(a=null,0===f&&k('"-"')),null===a&&(33===b.charCodeAt(e)?(a="!",e++):(a=null,0===f&&k('"!"')))),a}function J(){var a,b,c,d,f,g,h,i,j;if(h=e,i=e,a=H(),null!==a){for(b=[],j=e,c=z(),null!==c?(d=K(),null!==d?(f=z(),null!==f?(g=H(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==c;)b.push(c),j=e,c=z(),null!==c?(d=K(),null!==d?(f=z(),null!==f?(g=H(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==b?a=[a,b]:(a=null,e=i)}else a=null,e=i;return null!==a&&(a=function(a,b,c){for(var d=b,e=0;c.length>e;e++)d={type:"MultiplicativeExpression",operator:c[e][1],left:d,right:c[e][3]};return d}(h,a[0],a[1])),null===a&&(e=h),a}function K(){var a;return 42===b.charCodeAt(e)?(a="*",e++):(a=null,0===f&&k('"*"')),null===a&&(47===b.charCodeAt(e)?(a="/",e++):(a=null,0===f&&k('"/"'))),a}function L(){var a,b,c,d,f,g,h,i,j;if(h=e,i=e,a=J(),null!==a){for(b=[],j=e,c=z(),null!==c?(d=M(),null!==d?(f=z(),null!==f?(g=J(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==c;)b.push(c),j=e,c=z(),null!==c?(d=M(),null!==d?(f=z(),null!==f?(g=J(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==b?a=[a,b]:(a=null,e=i)}else a=null,e=i;return null!==a&&(a=function(a,b,c){for(var d=b,e=0;c.length>e;e++)d={type:"AdditiveExpression",operator:c[e][1],left:d,right:c[e][3]};return d}(h,a[0],a[1])),null===a&&(e=h),a}function M(){var a;return 43===b.charCodeAt(e)?(a="+",e++):(a=null,0===f&&k('"+"')),null===a&&(45===b.charCodeAt(e)?(a="-",e++):(a=null,0===f&&k('"-"'))),a}function N(){var a,b,c,d,f,g,h,i,j;if(h=e,i=e,a=L(),null!==a){for(b=[],j=e,c=z(),null!==c?(d=O(),null!==d?(f=z(),null!==f?(g=L(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==c;)b.push(c),j=e,c=z(),null!==c?(d=O(),null!==d?(f=z(),null!==f?(g=L(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==b?a=[a,b]:(a=null,e=i)}else a=null,e=i;return null!==a&&(a=function(a,b,c){for(var d=b,e=0;c.length>e;e++)d={type:"Inequality",operator:c[e][1],left:d,right:c[e][3]};return d}(h,a[0],a[1])),null===a&&(e=h),a}function O(){var a;return"<="===b.substr(e,2)?(a="<=",e+=2):(a=null,0===f&&k('"<="')),null===a&&(">="===b.substr(e,2)?(a=">=",e+=2):(a=null,0===f&&k('">="')),null===a&&(60===b.charCodeAt(e)?(a="<",e++):(a=null,0===f&&k('"<"')),null===a&&(62===b.charCodeAt(e)?(a=">",e++):(a=null,0===f&&k('">"'))))),a}function P(){var a,c,d,g,h,i,j,l,m;if(j=e,l=e,a=N(),null!==a){for(c=[],m=e,d=z(),null!==d?("=="===b.substr(e,2)?(g="==",e+=2):(g=null,0===f&&k('"=="')),null!==g?(h=z(),null!==h?(i=N(),null!==i?d=[d,g,h,i]:(d=null,e=m)):(d=null,e=m)):(d=null,e=m)):(d=null,e=m);null!==d;)c.push(d),m=e,d=z(),null!==d?("=="===b.substr(e,2)?(g="==",e+=2):(g=null,0===f&&k('"=="')),null!==g?(h=z(),null!==h?(i=N(),null!==i?d=[d,g,h,i]:(d=null,e=m)):(d=null,e=m)):(d=null,e=m)):(d=null,e=m);null!==c?a=[a,c]:(a=null,e=l)}else a=null,e=l;return null!==a&&(a=function(a,b,c){for(var d=b,e=0;c.length>e;e++)d={type:"Equality",operator:c[e][1],left:d,right:c[e][3]};return d}(j,a[0],a[1])),null===a&&(e=j),a}function Q(a){a.sort();for(var b=null,c=[],d=0;a.length>d;d++)a[d]!==b&&(c.push(a[d]),b=a[d]);return c}function R(){for(var a=1,c=1,d=!1,f=0;Math.max(e,g)>f;f++){var h=b.charAt(f);"\n"===h?(d||a++,c=1,d=!1):"\r"===h||"\u2028"===h||"\u2029"===h?(a++,c=1,d=!0):(c++,d=!1)}return{line:a,column:c}}var d={start:l,Statement:m,SourceCharacter:n,IdentifierStart:o,WhiteSpace:p,LineTerminator:q,LineTerminatorSequence:r,EOS:s,EOF:t,Comment:u,MultiLineComment:v,MultiLineCommentNoLineTerminator:w,SingleLineComment:x,_:y,__:z,Literal:A,Integer:B,Real:C,SignedInteger:D,Identifier:E,IdentifierName:F,PrimaryExpression:G,UnaryExpression:H,UnaryOperator:I,MultiplicativeExpression:J,MultiplicativeOperator:K,AdditiveExpression:L,AdditiveOperator:M,InequalityExpression:N,InequalityOperator:O,LinearExpression:P};if(void 0!==c){if(void 0===d[c])throw Error("Invalid rule name: "+a(c)+".")}else c="start";var e=0,f=0,g=0,h=[],S=d[c]();if(null===S||e!==b.length){var T=Math.max(e,g),U=b.length>T?b.charAt(T):null,V=R();throw new this.SyntaxError(Q(h),U,T,V.line,V.column)}return S},toSource:function(){return this._source}};return b.SyntaxError=function(b,c,d,e,f){function g(b,c){var d,e;switch(b.length){case 0:d="end of input";break;case 1:d=b[0];break;default:d=b.slice(0,b.length-1).join(", ")+" or "+b[b.length-1]}return e=c?a(c):"end of input","Expected "+d+" but "+e+" found."}this.name="SyntaxError",this.expected=b,this.found=c,this.message=g(b,c),this.offset=d,this.line=e,this.column=f},b.SyntaxError.prototype=Error.prototype,b}(); -}).call( - (typeof module != "undefined") ? - (module.compiled = true && module) : this -); - -},{}]},{},[1])(1) -}); \ No newline at end of file diff --git a/dist/autolayout.kiwi.js b/dist/autolayout.kiwi.js deleted file mode 100644 index 0cbc2a2..0000000 --- a/dist/autolayout.kiwi.js +++ /dev/null @@ -1,7416 +0,0 @@ -/** -* AutoLayout.js is licensed under the MIT license. If a copy of the -* MIT-license was not distributed with this file, You can obtain one at: -* http://opensource.org/licenses/mit-license.html. -* -* @author: Hein Rutjes (IjzerenHein) -* @license MIT -* @copyright Gloey Apps, 2017 -* -* @library autolayout.js -* @version 0.7.0 -*/ -/*----------------------------------------------------------------------------- -| Kiwi (TypeScript version) -| -| Copyright (c) 2014, Nucleic Development Team & H. Rutjes. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoLayout = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1 ? arguments[1] : {}, - peg$FAILED = {}, - peg$startRuleFunctions = { visualFormatString: peg$parsevisualFormatString }, - peg$startRuleFunction = peg$parsevisualFormatString, - peg$c0 = peg$FAILED, - peg$c1 = null, - peg$c2 = ":", - peg$c3 = { type: "literal", value: ":", description: "\":\"" }, - peg$c4 = [], - peg$c5 = function peg$c5(o, superto, view, views, tosuper) { - return { - orientation: o ? o[0] : 'horizontal', - cascade: (superto || []).concat([view], [].concat.apply([], views), tosuper || []) - }; - }, - peg$c6 = "H", - peg$c7 = { type: "literal", value: "H", description: "\"H\"" }, - peg$c8 = "V", - peg$c9 = { type: "literal", value: "V", description: "\"V\"" }, - peg$c10 = function peg$c10(orient) { - return orient == 'H' ? 'horizontal' : 'vertical'; - }, - peg$c11 = "|", - peg$c12 = { type: "literal", value: "|", description: "\"|\"" }, - peg$c13 = function peg$c13() { - return { view: null }; - }, - peg$c14 = "[", - peg$c15 = { type: "literal", value: "[", description: "\"[\"" }, - peg$c16 = "]", - peg$c17 = { type: "literal", value: "]", description: "\"]\"" }, - peg$c18 = function peg$c18(view, predicates) { - return extend(view, predicates ? { constraints: predicates } : {}); - }, - peg$c19 = "-", - peg$c20 = { type: "literal", value: "-", description: "\"-\"" }, - peg$c21 = function peg$c21(predicateList) { - return predicateList; - }, - peg$c22 = function peg$c22() { - return [{ relation: 'equ', constant: 'default', $parserOffset: offset() }]; - }, - peg$c23 = "", - peg$c24 = function peg$c24() { - return [{ relation: 'equ', constant: 0, $parserOffset: offset() }]; - }, - peg$c25 = function peg$c25(n) { - return [{ relation: 'equ', constant: n, $parserOffset: offset() }]; - }, - peg$c26 = "(", - peg$c27 = { type: "literal", value: "(", description: "\"(\"" }, - peg$c28 = ",", - peg$c29 = { type: "literal", value: ",", description: "\",\"" }, - peg$c30 = ")", - peg$c31 = { type: "literal", value: ")", description: "\")\"" }, - peg$c32 = function peg$c32(p, ps) { - return [p].concat(ps.map(function (p) { - return p[1]; - })); - }, - peg$c33 = "@", - peg$c34 = { type: "literal", value: "@", description: "\"@\"" }, - peg$c35 = function peg$c35(r, o, p) { - return extend({ relation: 'equ' }, r || {}, o, p ? p[1] : {}); - }, - peg$c36 = "==", - peg$c37 = { type: "literal", value: "==", description: "\"==\"" }, - peg$c38 = function peg$c38() { - return { relation: 'equ', $parserOffset: offset() }; - }, - peg$c39 = "<=", - peg$c40 = { type: "literal", value: "<=", description: "\"<=\"" }, - peg$c41 = function peg$c41() { - return { relation: 'leq', $parserOffset: offset() }; - }, - peg$c42 = ">=", - peg$c43 = { type: "literal", value: ">=", description: "\">=\"" }, - peg$c44 = function peg$c44() { - return { relation: 'geq', $parserOffset: offset() }; - }, - peg$c45 = /^[0-9]/, - peg$c46 = { type: "class", value: "[0-9]", description: "[0-9]" }, - peg$c47 = function peg$c47(digits) { - return { priority: parseInt(digits.join(""), 10) }; - }, - peg$c48 = function peg$c48(n) { - return { constant: n }; - }, - peg$c49 = /^[a-zA-Z_]/, - peg$c50 = { type: "class", value: "[a-zA-Z_]", description: "[a-zA-Z_]" }, - peg$c51 = /^[a-zA-Z0-9_]/, - peg$c52 = { type: "class", value: "[a-zA-Z0-9_]", description: "[a-zA-Z0-9_]" }, - peg$c53 = function peg$c53(f, v) { - return { view: f + v }; - }, - peg$c54 = ".", - peg$c55 = { type: "literal", value: ".", description: "\".\"" }, - peg$c56 = function peg$c56(digits, decimals) { - return parseFloat(digits.concat(".").concat(decimals).join(""), 10); - }, - peg$c57 = function peg$c57(digits) { - return parseInt(digits.join(""), 10); - }, - peg$currPos = 0, - peg$reportedPos = 0, - peg$cachedPos = 0, - peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, - peg$maxFailPos = 0, - peg$maxFailExpected = [], - peg$silentFails = 0, - peg$result; - - if ("startRule" in options) { - if (!(options.startRule in peg$startRuleFunctions)) { - throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); - } - - peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; - } - - function text() { - return input.substring(peg$reportedPos, peg$currPos); - } - - function offset() { - return peg$reportedPos; - } - - function line() { - return peg$computePosDetails(peg$reportedPos).line; - } - - function column() { - return peg$computePosDetails(peg$reportedPos).column; - } - - function expected(description) { - throw peg$buildException(null, [{ type: "other", description: description }], peg$reportedPos); - } - - function error(message) { - throw peg$buildException(message, null, peg$reportedPos); - } - - function peg$computePosDetails(pos) { - function advance(details, startPos, endPos) { - var p, ch; - - for (p = startPos; p < endPos; p++) { - ch = input.charAt(p); - if (ch === "\n") { - if (!details.seenCR) { - details.line++; - } - details.column = 1; - details.seenCR = false; - } else if (ch === "\r" || ch === '\u2028' || ch === '\u2029') { - details.line++; - details.column = 1; - details.seenCR = true; - } else { - details.column++; - details.seenCR = false; - } - } - } - - if (peg$cachedPos !== pos) { - if (peg$cachedPos > pos) { - peg$cachedPos = 0; - peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; - } - advance(peg$cachedPosDetails, peg$cachedPos, pos); - peg$cachedPos = pos; - } - - return peg$cachedPosDetails; - } - - function peg$fail(expected) { - if (peg$currPos < peg$maxFailPos) { - return; - } - - if (peg$currPos > peg$maxFailPos) { - peg$maxFailPos = peg$currPos; - peg$maxFailExpected = []; - } - - peg$maxFailExpected.push(expected); - } - - function peg$buildException(message, expected, pos) { - function cleanupExpected(expected) { - var i = 1; - - expected.sort(function (a, b) { - if (a.description < b.description) { - return -1; - } else if (a.description > b.description) { - return 1; - } else { - return 0; - } - }); - - while (i < expected.length) { - if (expected[i - 1] === expected[i]) { - expected.splice(i, 1); - } else { - i++; - } - } - } - - function buildMessage(expected, found) { - function stringEscape(s) { - function hex(ch) { - return ch.charCodeAt(0).toString(16).toUpperCase(); - } - - return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\x08/g, '\\b').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\f/g, '\\f').replace(/\r/g, '\\r').replace(/[\x00-\x07\x0B\x0E\x0F]/g, function (ch) { - return '\\x0' + hex(ch); - }).replace(/[\x10-\x1F\x80-\xFF]/g, function (ch) { - return '\\x' + hex(ch); - }).replace(/[\u0180-\u0FFF]/g, function (ch) { - return '\\u0' + hex(ch); - }).replace(/[\u1080-\uFFFF]/g, function (ch) { - return '\\u' + hex(ch); - }); - } - - var expectedDescs = new Array(expected.length), - expectedDesc, - foundDesc, - i; - - for (i = 0; i < expected.length; i++) { - expectedDescs[i] = expected[i].description; - } - - expectedDesc = expected.length > 1 ? expectedDescs.slice(0, -1).join(", ") + " or " + expectedDescs[expected.length - 1] : expectedDescs[0]; - - foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; - - return "Expected " + expectedDesc + " but " + foundDesc + " found."; - } - - var posDetails = peg$computePosDetails(pos), - found = pos < input.length ? input.charAt(pos) : null; - - if (expected !== null) { - cleanupExpected(expected); - } - - return new SyntaxError(message !== null ? message : buildMessage(expected, found), expected, found, pos, posDetails.line, posDetails.column); - } - - function peg$parsevisualFormatString() { - var s0, s1, s2, s3, s4, s5, s6, s7; - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = peg$parseorientation(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 58) { - s3 = peg$c2; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c3); - } - } - if (s3 !== peg$FAILED) { - s2 = [s2, s3]; - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$c0; - } - } else { - peg$currPos = s1; - s1 = peg$c0; - } - if (s1 === peg$FAILED) { - s1 = peg$c1; - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = peg$parsesuperview(); - if (s3 !== peg$FAILED) { - s4 = peg$parseconnection(); - if (s4 !== peg$FAILED) { - s3 = [s3, s4]; - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$c0; - } - } else { - peg$currPos = s2; - s2 = peg$c0; - } - if (s2 === peg$FAILED) { - s2 = peg$c1; - } - if (s2 !== peg$FAILED) { - s3 = peg$parseview(); - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parseview(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parseview(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } - if (s4 !== peg$FAILED) { - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parsesuperview(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - if (s5 === peg$FAILED) { - s5 = peg$c1; - } - if (s5 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c5(s1, s2, s3, s4, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseorientation() { - var s0, s1; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 72) { - s1 = peg$c6; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c7); - } - } - if (s1 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 86) { - s1 = peg$c8; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c9); - } - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c10(s1); - } - s0 = s1; - - return s0; - } - - function peg$parsesuperview() { - var s0, s1; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 124) { - s1 = peg$c11; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c12); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c13(); - } - s0 = s1; - - return s0; - } - - function peg$parseview() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { - s1 = peg$c14; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c15); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseviewName(); - if (s2 !== peg$FAILED) { - s3 = peg$parsepredicateListWithParens(); - if (s3 === peg$FAILED) { - s3 = peg$c1; - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s4 = peg$c16; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c17); - } - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c18(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseconnection() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c19; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c20); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicateList(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 45) { - s3 = peg$c19; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c20); - } - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c21(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c19; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c20); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c22(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$c23; - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c24(); - } - s0 = s1; - } - } - - return s0; - } - - function peg$parsepredicateList() { - var s0; - - s0 = peg$parsesimplePredicate(); - if (s0 === peg$FAILED) { - s0 = peg$parsepredicateListWithParens(); - } - - return s0; - } - - function peg$parsesimplePredicate() { - var s0, s1; - - s0 = peg$currPos; - s1 = peg$parsenumber(); - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c25(s1); - } - s0 = s1; - - return s0; - } - - function peg$parsepredicateListWithParens() { - var s0, s1, s2, s3, s4, s5, s6; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c26; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c27); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicate(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c28; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c29); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parsepredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c28; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c29); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parsepredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 41) { - s4 = peg$c30; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c31); - } - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c32(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsepredicate() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parserelation(); - if (s1 === peg$FAILED) { - s1 = peg$c1; - } - if (s1 !== peg$FAILED) { - s2 = peg$parseobjectOfPredicate(); - if (s2 !== peg$FAILED) { - s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 64) { - s4 = peg$c33; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c34); - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parsepriority(); - if (s5 !== peg$FAILED) { - s4 = [s4, s5]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } else { - peg$currPos = s3; - s3 = peg$c0; - } - if (s3 === peg$FAILED) { - s3 = peg$c1; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c35(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parserelation() { - var s0, s1; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c36) { - s1 = peg$c36; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c37); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c38(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c39) { - s1 = peg$c39; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c40); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c41(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c42) { - s1 = peg$c42; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c44(); - } - s0 = s1; - } - } - - return s0; - } - - function peg$parseobjectOfPredicate() { - var s0; - - s0 = peg$parseconstant(); - if (s0 === peg$FAILED) { - s0 = peg$parseviewName(); - } - - return s0; - } - - function peg$parsepriority() { - var s0, s1, s2; - - s0 = peg$currPos; - s1 = []; - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c47(s1); - } - s0 = s1; - - return s0; - } - - function peg$parseconstant() { - var s0, s1; - - s0 = peg$currPos; - s1 = peg$parsenumber(); - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c48(s1); - } - s0 = s1; - - return s0; - } - - function peg$parseviewName() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = []; - if (peg$c49.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c50); - } - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c49.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c50); - } - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - s2 = input.substring(s1, peg$currPos); - } - s1 = s2; - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = []; - if (peg$c51.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c52); - } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c51.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c52); - } - } - } - if (s3 !== peg$FAILED) { - s3 = input.substring(s2, peg$currPos); - } - s2 = s3; - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c53(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsenumber() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = []; - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 46) { - s2 = peg$c54; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c55); - } - } - if (s2 !== peg$FAILED) { - s3 = []; - if (peg$c45.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c45.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - } - } else { - s3 = peg$c0; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c56(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = []; - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c45.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c46); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c57(s1); - } - s0 = s1; - } - - return s0; - } - - function extend(dst) { - for (var i = 1; i < arguments.length; i++) { - for (var k in arguments[i]) { - dst[k] = arguments[i][k]; - } - } - return dst; - } - - peg$result = peg$startRuleFunction(); - - if (peg$result !== peg$FAILED && peg$currPos === input.length) { - return peg$result; - } else { - if (peg$result !== peg$FAILED && peg$currPos < input.length) { - peg$fail({ type: "end", description: "end of input" }); - } - - throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos); - } - } - - return { - SyntaxError: SyntaxError, - parse: parse - }; -}(); - -var parserExt = function () { - /* - * Generated by PEG.js 0.8.0. - * - * http://pegjs.majda.cz/ - */ - - function peg$subclass(child, parent) { - function ctor() { - this.constructor = child; - } - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - } - - function SyntaxError(message, expected, found, offset, line, column) { - this.message = message; - this.expected = expected; - this.found = found; - this.offset = offset; - this.line = line; - this.column = column; - - this.name = "SyntaxError"; - } - - peg$subclass(SyntaxError, Error); - - function parse(input) { - var options = arguments.length > 1 ? arguments[1] : {}, - peg$FAILED = {}, - peg$startRuleFunctions = { visualFormatStringExt: peg$parsevisualFormatStringExt }, - peg$startRuleFunction = peg$parsevisualFormatStringExt, - peg$c0 = peg$FAILED, - peg$c1 = "C:", - peg$c2 = { type: "literal", value: "C:", description: "\"C:\"" }, - peg$c3 = [], - peg$c4 = null, - peg$c5 = function peg$c5(view, attribute, attributes, comments) { - return { - type: 'attribute', - view: view.view, - attributes: [attribute].concat(attributes) - }; - }, - peg$c6 = function peg$c6(attr, predicates) { - return { attr: attr, predicates: predicates }; - }, - peg$c7 = ":", - peg$c8 = { type: "literal", value: ":", description: "\":\"" }, - peg$c9 = function peg$c9(o, superto, view, views, tosuper, comments) { - return { - type: 'vfl', - orientation: o ? o[0] : 'horizontal', - cascade: (superto || []).concat(view, [].concat.apply([], views), tosuper || []) - }; - }, - peg$c10 = "HV", - peg$c11 = { type: "literal", value: "HV", description: "\"HV\"" }, - peg$c12 = function peg$c12() { - return 'horzvert'; - }, - peg$c13 = "H", - peg$c14 = { type: "literal", value: "H", description: "\"H\"" }, - peg$c15 = function peg$c15() { - return 'horizontal'; - }, - peg$c16 = "V", - peg$c17 = { type: "literal", value: "V", description: "\"V\"" }, - peg$c18 = function peg$c18() { - return 'vertical'; - }, - peg$c19 = "Z", - peg$c20 = { type: "literal", value: "Z", description: "\"Z\"" }, - peg$c21 = function peg$c21() { - return 'zIndex'; - }, - peg$c22 = " ", - peg$c23 = { type: "literal", value: " ", description: "\" \"" }, - peg$c24 = "//", - peg$c25 = { type: "literal", value: "//", description: "\"//\"" }, - peg$c26 = { type: "any", description: "any character" }, - peg$c27 = "|", - peg$c28 = { type: "literal", value: "|", description: "\"|\"" }, - peg$c29 = function peg$c29() { - return { view: null }; - }, - peg$c30 = "[", - peg$c31 = { type: "literal", value: "[", description: "\"[\"" }, - peg$c32 = ",", - peg$c33 = { type: "literal", value: ",", description: "\",\"" }, - peg$c34 = "]", - peg$c35 = { type: "literal", value: "]", description: "\"]\"" }, - peg$c36 = function peg$c36(view, views) { - return views.length ? [view].concat([].concat.apply([], views)) : view; - }, - peg$c37 = function peg$c37(view, predicates, cascadedViews) { - return extend(extend(view, predicates ? { constraints: predicates } : {}), cascadedViews ? { - cascade: cascadedViews - } : {}); - }, - peg$c38 = function peg$c38(views, connection) { - return [].concat([].concat.apply([], views), [connection]); - }, - peg$c39 = "->", - peg$c40 = { type: "literal", value: "->", description: "\"->\"" }, - peg$c41 = function peg$c41() { - return [{ relation: 'none' }]; - }, - peg$c42 = "-", - peg$c43 = { type: "literal", value: "-", description: "\"-\"" }, - peg$c44 = function peg$c44(predicateList) { - return predicateList; - }, - peg$c45 = function peg$c45() { - return [{ relation: 'equ', constant: 'default' }]; - }, - peg$c46 = "~", - peg$c47 = { type: "literal", value: "~", description: "\"~\"" }, - peg$c48 = function peg$c48() { - return [{ relation: 'equ', equalSpacing: true }]; - }, - peg$c49 = "", - peg$c50 = function peg$c50() { - return [{ relation: 'equ', constant: 0 }]; - }, - peg$c51 = function peg$c51(p) { - return [{ relation: 'equ', multiplier: p.multiplier }]; - }, - peg$c52 = function peg$c52(n) { - return [{ relation: 'equ', constant: n }]; - }, - peg$c53 = "(", - peg$c54 = { type: "literal", value: "(", description: "\"(\"" }, - peg$c55 = ")", - peg$c56 = { type: "literal", value: ")", description: "\")\"" }, - peg$c57 = function peg$c57(p, ps) { - return [p].concat(ps.map(function (p) { - return p[1]; - })); - }, - peg$c58 = "@", - peg$c59 = { type: "literal", value: "@", description: "\"@\"" }, - peg$c60 = function peg$c60(r, o, p) { - return extend({ relation: 'equ' }, r || {}, o, p ? p[1] : {}); - }, - peg$c61 = function peg$c61(r, o, p) { - return extend({ relation: 'equ', equalSpacing: true }, r || {}, o, p ? p[1] : {}); - }, - peg$c62 = "==", - peg$c63 = { type: "literal", value: "==", description: "\"==\"" }, - peg$c64 = function peg$c64() { - return { relation: 'equ' }; - }, - peg$c65 = "<=", - peg$c66 = { type: "literal", value: "<=", description: "\"<=\"" }, - peg$c67 = function peg$c67() { - return { relation: 'leq' }; - }, - peg$c68 = ">=", - peg$c69 = { type: "literal", value: ">=", description: "\">=\"" }, - peg$c70 = function peg$c70() { - return { relation: 'geq' }; - }, - peg$c71 = /^[0-9]/, - peg$c72 = { type: "class", value: "[0-9]", description: "[0-9]" }, - peg$c73 = function peg$c73(digits) { - return { priority: parseInt(digits.join(""), 10) }; - }, - peg$c74 = function peg$c74(n) { - return { constant: n }; - }, - peg$c75 = function peg$c75(n) { - return { constant: -n }; - }, - peg$c76 = "+", - peg$c77 = { type: "literal", value: "+", description: "\"+\"" }, - peg$c78 = "%", - peg$c79 = { type: "literal", value: "%", description: "\"%\"" }, - peg$c80 = function peg$c80(n) { - return { view: null, multiplier: n / 100 }; - }, - peg$c81 = function peg$c81(n) { - return { view: null, multiplier: n / -100 }; - }, - peg$c82 = function peg$c82(vn, a, m, c) { - return { view: vn.view, attribute: a ? a : undefined, multiplier: m ? m : 1, constant: c ? c : undefined }; - }, - peg$c83 = ".left", - peg$c84 = { type: "literal", value: ".left", description: "\".left\"" }, - peg$c85 = function peg$c85() { - return 'left'; - }, - peg$c86 = ".right", - peg$c87 = { type: "literal", value: ".right", description: "\".right\"" }, - peg$c88 = function peg$c88() { - return 'right'; - }, - peg$c89 = ".top", - peg$c90 = { type: "literal", value: ".top", description: "\".top\"" }, - peg$c91 = function peg$c91() { - return 'top'; - }, - peg$c92 = ".bottom", - peg$c93 = { type: "literal", value: ".bottom", description: "\".bottom\"" }, - peg$c94 = function peg$c94() { - return 'bottom'; - }, - peg$c95 = ".width", - peg$c96 = { type: "literal", value: ".width", description: "\".width\"" }, - peg$c97 = function peg$c97() { - return 'width'; - }, - peg$c98 = ".height", - peg$c99 = { type: "literal", value: ".height", description: "\".height\"" }, - peg$c100 = function peg$c100() { - return 'height'; - }, - peg$c101 = ".centerX", - peg$c102 = { type: "literal", value: ".centerX", description: "\".centerX\"" }, - peg$c103 = function peg$c103() { - return 'centerX'; - }, - peg$c104 = ".centerY", - peg$c105 = { type: "literal", value: ".centerY", description: "\".centerY\"" }, - peg$c106 = function peg$c106() { - return 'centerY'; - }, - peg$c107 = "/", - peg$c108 = { type: "literal", value: "/", description: "\"/\"" }, - peg$c109 = function peg$c109(n) { - return 1 / n; - }, - peg$c110 = "/+", - peg$c111 = { type: "literal", value: "/+", description: "\"/+\"" }, - peg$c112 = "/-", - peg$c113 = { type: "literal", value: "/-", description: "\"/-\"" }, - peg$c114 = function peg$c114(n) { - return -1 / n; - }, - peg$c115 = "*", - peg$c116 = { type: "literal", value: "*", description: "\"*\"" }, - peg$c117 = function peg$c117(n) { - return n; - }, - peg$c118 = "*+", - peg$c119 = { type: "literal", value: "*+", description: "\"*+\"" }, - peg$c120 = "*-", - peg$c121 = { type: "literal", value: "*-", description: "\"*-\"" }, - peg$c122 = function peg$c122(n) { - return -n; - }, - peg$c123 = /^[a-zA-Z_]/, - peg$c124 = { type: "class", value: "[a-zA-Z_]", description: "[a-zA-Z_]" }, - peg$c125 = /^[a-zA-Z0-9_]/, - peg$c126 = { type: "class", value: "[a-zA-Z0-9_]", description: "[a-zA-Z0-9_]" }, - peg$c127 = function peg$c127(f, v, r) { - return { view: f + v, range: r, $parserOffset: offset() }; - }, - peg$c128 = function peg$c128(f, v) { - return { view: f + v, $parserOffset: offset() }; - }, - peg$c129 = "..", - peg$c130 = { type: "literal", value: "..", description: "\"..\"" }, - peg$c131 = function peg$c131(d) { - return parseInt(d); - }, - peg$c132 = ".", - peg$c133 = { type: "literal", value: ".", description: "\".\"" }, - peg$c134 = function peg$c134(digits, decimals) { - return parseFloat(digits.concat(".").concat(decimals).join(""), 10); - }, - peg$c135 = function peg$c135(digits) { - return parseInt(digits.join(""), 10); - }, - peg$currPos = 0, - peg$reportedPos = 0, - peg$cachedPos = 0, - peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, - peg$maxFailPos = 0, - peg$maxFailExpected = [], - peg$silentFails = 0, - peg$result; - - if ("startRule" in options) { - if (!(options.startRule in peg$startRuleFunctions)) { - throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); - } - - peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; - } - - function text() { - return input.substring(peg$reportedPos, peg$currPos); - } - - function offset() { - return peg$reportedPos; - } - - function line() { - return peg$computePosDetails(peg$reportedPos).line; - } - - function column() { - return peg$computePosDetails(peg$reportedPos).column; - } - - function expected(description) { - throw peg$buildException(null, [{ type: "other", description: description }], peg$reportedPos); - } - - function error(message) { - throw peg$buildException(message, null, peg$reportedPos); - } - - function peg$computePosDetails(pos) { - function advance(details, startPos, endPos) { - var p, ch; - - for (p = startPos; p < endPos; p++) { - ch = input.charAt(p); - if (ch === "\n") { - if (!details.seenCR) { - details.line++; - } - details.column = 1; - details.seenCR = false; - } else if (ch === "\r" || ch === '\u2028' || ch === '\u2029') { - details.line++; - details.column = 1; - details.seenCR = true; - } else { - details.column++; - details.seenCR = false; - } - } - } - - if (peg$cachedPos !== pos) { - if (peg$cachedPos > pos) { - peg$cachedPos = 0; - peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; - } - advance(peg$cachedPosDetails, peg$cachedPos, pos); - peg$cachedPos = pos; - } - - return peg$cachedPosDetails; - } - - function peg$fail(expected) { - if (peg$currPos < peg$maxFailPos) { - return; - } - - if (peg$currPos > peg$maxFailPos) { - peg$maxFailPos = peg$currPos; - peg$maxFailExpected = []; - } - - peg$maxFailExpected.push(expected); - } - - function peg$buildException(message, expected, pos) { - function cleanupExpected(expected) { - var i = 1; - - expected.sort(function (a, b) { - if (a.description < b.description) { - return -1; - } else if (a.description > b.description) { - return 1; - } else { - return 0; - } - }); - - while (i < expected.length) { - if (expected[i - 1] === expected[i]) { - expected.splice(i, 1); - } else { - i++; - } - } - } - - function buildMessage(expected, found) { - function stringEscape(s) { - function hex(ch) { - return ch.charCodeAt(0).toString(16).toUpperCase(); - } - - return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\x08/g, '\\b').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\f/g, '\\f').replace(/\r/g, '\\r').replace(/[\x00-\x07\x0B\x0E\x0F]/g, function (ch) { - return '\\x0' + hex(ch); - }).replace(/[\x10-\x1F\x80-\xFF]/g, function (ch) { - return '\\x' + hex(ch); - }).replace(/[\u0180-\u0FFF]/g, function (ch) { - return '\\u0' + hex(ch); - }).replace(/[\u1080-\uFFFF]/g, function (ch) { - return '\\u' + hex(ch); - }); - } - - var expectedDescs = new Array(expected.length), - expectedDesc, - foundDesc, - i; - - for (i = 0; i < expected.length; i++) { - expectedDescs[i] = expected[i].description; - } - - expectedDesc = expected.length > 1 ? expectedDescs.slice(0, -1).join(", ") + " or " + expectedDescs[expected.length - 1] : expectedDescs[0]; - - foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; - - return "Expected " + expectedDesc + " but " + foundDesc + " found."; - } - - var posDetails = peg$computePosDetails(pos), - found = pos < input.length ? input.charAt(pos) : null; - - if (expected !== null) { - cleanupExpected(expected); - } - - return new SyntaxError(message !== null ? message : buildMessage(expected, found), expected, found, pos, posDetails.line, posDetails.column); - } - - function peg$parsevisualFormatStringExt() { - var s0; - - s0 = peg$parsevisualFormatString(); - if (s0 === peg$FAILED) { - s0 = peg$parsevisualFormatStringConstraintExpression(); - } - - return s0; - } - - function peg$parsevisualFormatStringConstraintExpression() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c1) { - s1 = peg$c1; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c2); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseviewName(); - if (s2 !== peg$FAILED) { - s3 = peg$parseattributePredicate(); - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$parseattributePredicate(); - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$parseattributePredicate(); - } - if (s4 !== peg$FAILED) { - s5 = peg$parsecomments(); - if (s5 === peg$FAILED) { - s5 = peg$c4; - } - if (s5 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c5(s2, s3, s4, s5); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseattributePredicate() { - var s0, s1, s2; - - s0 = peg$currPos; - s1 = peg$parseattribute(); - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicateListWithParens(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c6(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsevisualFormatString() { - var s0, s1, s2, s3, s4, s5, s6, s7; - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = peg$parseorientation(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 58) { - s3 = peg$c7; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c8); - } - } - if (s3 !== peg$FAILED) { - s2 = [s2, s3]; - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$c0; - } - } else { - peg$currPos = s1; - s1 = peg$c0; - } - if (s1 === peg$FAILED) { - s1 = peg$c4; - } - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = peg$parsesuperview(); - if (s3 !== peg$FAILED) { - s4 = peg$parseconnection(); - if (s4 !== peg$FAILED) { - s3 = [s3, s4]; - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$c0; - } - } else { - peg$currPos = s2; - s2 = peg$c0; - } - if (s2 === peg$FAILED) { - s2 = peg$c4; - } - if (s2 !== peg$FAILED) { - s3 = peg$parseviewGroup(); - if (s3 !== peg$FAILED) { - s4 = []; - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parseviewGroup(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - while (s5 !== peg$FAILED) { - s4.push(s5); - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parseviewGroup(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } - if (s4 !== peg$FAILED) { - s5 = peg$currPos; - s6 = peg$parseconnection(); - if (s6 !== peg$FAILED) { - s7 = peg$parsesuperview(); - if (s7 !== peg$FAILED) { - s6 = [s6, s7]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$c0; - } - } else { - peg$currPos = s5; - s5 = peg$c0; - } - if (s5 === peg$FAILED) { - s5 = peg$c4; - } - if (s5 !== peg$FAILED) { - s6 = peg$parsecomments(); - if (s6 === peg$FAILED) { - s6 = peg$c4; - } - if (s6 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c9(s1, s2, s3, s4, s5, s6); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseorientation() { - var s0, s1; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c10) { - s1 = peg$c10; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c11); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c12(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 72) { - s1 = peg$c13; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c14); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c15(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 86) { - s1 = peg$c16; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c17); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c18(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 90) { - s1 = peg$c19; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c20); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c21(); - } - s0 = s1; - } - } - } - - return s0; - } - - function peg$parsecomments() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = []; - if (input.charCodeAt(peg$currPos) === 32) { - s2 = peg$c22; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c23); - } - } - while (s2 !== peg$FAILED) { - s1.push(s2); - if (input.charCodeAt(peg$currPos) === 32) { - s2 = peg$c22; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c23); - } - } - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c24) { - s2 = peg$c24; - peg$currPos += 2; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c25); - } - } - if (s2 !== peg$FAILED) { - s3 = []; - if (input.length > peg$currPos) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c26); - } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (input.length > peg$currPos) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c26); - } - } - } - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsesuperview() { - var s0, s1; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 124) { - s1 = peg$c27; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c28); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c29(); - } - s0 = s1; - - return s0; - } - - function peg$parseviewGroup() { - var s0, s1, s2, s3, s4, s5, s6; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 91) { - s1 = peg$c30; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c31); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseview(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parseview(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parseview(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s4 = peg$c34; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c35); - } - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c36(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseview() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - s1 = peg$parseviewNameRange(); - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicateListWithParens(); - if (s2 === peg$FAILED) { - s2 = peg$c4; - } - if (s2 !== peg$FAILED) { - s3 = peg$parsecascadedViews(); - if (s3 === peg$FAILED) { - s3 = peg$c4; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c37(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsecascadedViews() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 58) { - s1 = peg$c7; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c8); - } - } - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$currPos; - s4 = peg$parseconnection(); - if (s4 !== peg$FAILED) { - s5 = peg$parseviewGroup(); - if (s5 !== peg$FAILED) { - s4 = [s4, s5]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } else { - peg$currPos = s3; - s3 = peg$c0; - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$currPos; - s4 = peg$parseconnection(); - if (s4 !== peg$FAILED) { - s5 = peg$parseviewGroup(); - if (s5 !== peg$FAILED) { - s4 = [s4, s5]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - s3 = peg$parseconnection(); - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c38(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseconnection() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c39) { - s1 = peg$c39; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c40); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c41(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c42; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicateList(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 45) { - s3 = peg$c42; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c44(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c42; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c45(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 126) { - s1 = peg$c46; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c47); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseequalSpacingPredicateList(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 126) { - s3 = peg$c46; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c47); - } - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c44(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 126) { - s1 = peg$c46; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c47); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c48(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$c49; - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c50(); - } - s0 = s1; - } - } - } - } - } - - return s0; - } - - function peg$parsepredicateList() { - var s0; - - s0 = peg$parsesimplePredicate(); - if (s0 === peg$FAILED) { - s0 = peg$parsepredicateListWithParens(); - } - - return s0; - } - - function peg$parsesimplePredicate() { - var s0, s1; - - s0 = peg$currPos; - s1 = peg$parsepercentage(); - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c51(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsenumber(); - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c52(s1); - } - s0 = s1; - } - - return s0; - } - - function peg$parsepredicateListWithParens() { - var s0, s1, s2, s3, s4, s5, s6; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c53; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c54); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsepredicate(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parsepredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parsepredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 41) { - s4 = peg$c55; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c56); - } - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c57(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsepredicate() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parserelation(); - if (s1 === peg$FAILED) { - s1 = peg$c4; - } - if (s1 !== peg$FAILED) { - s2 = peg$parseobjectOfPredicate(); - if (s2 !== peg$FAILED) { - s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 64) { - s4 = peg$c58; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c59); - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parsepriority(); - if (s5 !== peg$FAILED) { - s4 = [s4, s5]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } else { - peg$currPos = s3; - s3 = peg$c0; - } - if (s3 === peg$FAILED) { - s3 = peg$c4; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c60(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseequalSpacingPredicateList() { - var s0, s1, s2, s3, s4, s5, s6; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 40) { - s1 = peg$c53; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c54); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseequalSpacingPredicate(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parseequalSpacingPredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 44) { - s5 = peg$c32; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c33); - } - } - if (s5 !== peg$FAILED) { - s6 = peg$parseequalSpacingPredicate(); - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } else { - peg$currPos = s4; - s4 = peg$c0; - } - } - if (s3 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 41) { - s4 = peg$c55; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c56); - } - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c57(s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseequalSpacingPredicate() { - var s0, s1, s2, s3, s4, s5; - - s0 = peg$currPos; - s1 = peg$parserelation(); - if (s1 === peg$FAILED) { - s1 = peg$c4; - } - if (s1 !== peg$FAILED) { - s2 = peg$parseobjectOfPredicate(); - if (s2 !== peg$FAILED) { - s3 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 64) { - s4 = peg$c58; - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c59); - } - } - if (s4 !== peg$FAILED) { - s5 = peg$parsepriority(); - if (s5 !== peg$FAILED) { - s4 = [s4, s5]; - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$c0; - } - } else { - peg$currPos = s3; - s3 = peg$c0; - } - if (s3 === peg$FAILED) { - s3 = peg$c4; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c61(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parserelation() { - var s0, s1; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c62) { - s1 = peg$c62; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c63); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c64(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c65) { - s1 = peg$c65; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c66); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c67(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c68) { - s1 = peg$c68; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c69); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c70(); - } - s0 = s1; - } - } - - return s0; - } - - function peg$parseobjectOfPredicate() { - var s0; - - s0 = peg$parsepercentage(); - if (s0 === peg$FAILED) { - s0 = peg$parseconstant(); - if (s0 === peg$FAILED) { - s0 = peg$parseviewPredicate(); - } - } - - return s0; - } - - function peg$parsepriority() { - var s0, s1, s2; - - s0 = peg$currPos; - s1 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c73(s1); - } - s0 = s1; - - return s0; - } - - function peg$parseconstant() { - var s0, s1, s2; - - s0 = peg$currPos; - s1 = peg$parsenumber(); - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c74(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c42; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c75(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 43) { - s1 = peg$c76; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c77); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c74(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } - } - - return s0; - } - - function peg$parsepercentage() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - s1 = peg$parsenumber(); - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 37) { - s2 = peg$c78; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c79); - } - } - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c80(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c42; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 37) { - s3 = peg$c78; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c79); - } - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c81(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 43) { - s1 = peg$c76; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c77); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 37) { - s3 = peg$c78; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c79); - } - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c80(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } - } - - return s0; - } - - function peg$parseviewPredicate() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = peg$parseviewName(); - if (s1 !== peg$FAILED) { - s2 = peg$parseattribute(); - if (s2 === peg$FAILED) { - s2 = peg$c4; - } - if (s2 !== peg$FAILED) { - s3 = peg$parsemultiplier(); - if (s3 === peg$FAILED) { - s3 = peg$c4; - } - if (s3 !== peg$FAILED) { - s4 = peg$parseconstantExpr(); - if (s4 === peg$FAILED) { - s4 = peg$c4; - } - if (s4 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c82(s1, s2, s3, s4); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parseattribute() { - var s0, s1; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c83) { - s1 = peg$c83; - peg$currPos += 5; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c84); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c85(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c86) { - s1 = peg$c86; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c87); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c88(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 4) === peg$c89) { - s1 = peg$c89; - peg$currPos += 4; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c90); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c91(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c92) { - s1 = peg$c92; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c93); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c94(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 6) === peg$c95) { - s1 = peg$c95; - peg$currPos += 6; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c96); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c97(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 7) === peg$c98) { - s1 = peg$c98; - peg$currPos += 7; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c99); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c100(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 8) === peg$c101) { - s1 = peg$c101; - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c102); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c103(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 8) === peg$c104) { - s1 = peg$c104; - peg$currPos += 8; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c105); - } - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c106(); - } - s0 = s1; - } - } - } - } - } - } - } - - return s0; - } - - function peg$parsemultiplier() { - var s0, s1, s2; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 47) { - s1 = peg$c107; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c108); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c109(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c110) { - s1 = peg$c110; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c111); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c109(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c112) { - s1 = peg$c112; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c113); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c114(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 42) { - s1 = peg$c115; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c116); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c117(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c118) { - s1 = peg$c118; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c119); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c117(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c120) { - s1 = peg$c120; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c121); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c122(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } - } - } - } - } - - return s0; - } - - function peg$parseconstantExpr() { - var s0, s1, s2; - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s1 = peg$c42; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c43); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c122(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 43) { - s1 = peg$c76; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c77); - } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsenumber(); - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c117(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } - - return s0; - } - - function peg$parseviewNameRange() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = []; - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - s2 = input.substring(s1, peg$currPos); - } - s1 = s2; - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = []; - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - } - if (s3 !== peg$FAILED) { - s3 = input.substring(s2, peg$currPos); - } - s2 = s3; - if (s2 !== peg$FAILED) { - s3 = peg$parserange(); - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c127(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$currPos; - s2 = []; - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - s2 = input.substring(s1, peg$currPos); - } - s1 = s2; - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = []; - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - } - if (s3 !== peg$FAILED) { - s3 = input.substring(s2, peg$currPos); - } - s2 = s3; - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c128(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } - - return s0; - } - - function peg$parseviewName() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = []; - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c123.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c124); - } - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - s2 = input.substring(s1, peg$currPos); - } - s1 = s2; - if (s1 !== peg$FAILED) { - s2 = peg$currPos; - s3 = []; - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c125.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c126); - } - } - } - if (s3 !== peg$FAILED) { - s3 = input.substring(s2, peg$currPos); - } - s2 = s3; - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c128(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parserange() { - var s0, s1, s2, s3; - - s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c129) { - s1 = peg$c129; - peg$currPos += 2; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c130); - } - } - if (s1 !== peg$FAILED) { - s2 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - if (s3 !== peg$FAILED) { - while (s3 !== peg$FAILED) { - s2.push(s3); - if (peg$c71.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - } - } else { - s2 = peg$c0; - } - if (s2 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c131(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - - return s0; - } - - function peg$parsenumber() { - var s0, s1, s2, s3, s4; - - s0 = peg$currPos; - s1 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 46) { - s2 = peg$c132; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c133); - } - } - if (s2 !== peg$FAILED) { - s3 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c71.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - } - } else { - s3 = peg$c0; - } - if (s3 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c134(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - } else { - peg$currPos = s0; - s0 = peg$c0; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = []; - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c71.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { - peg$fail(peg$c72); - } - } - } - } else { - s1 = peg$c0; - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c135(s1); - } - s0 = s1; - } - - return s0; - } - - function extend(dst) { - for (var i = 1; i < arguments.length; i++) { - for (var k in arguments[i]) { - dst[k] = arguments[i][k]; - } - } - return dst; - } - - peg$result = peg$startRuleFunction(); - - if (peg$result !== peg$FAILED && peg$currPos === input.length) { - return peg$result; - } else { - if (peg$result !== peg$FAILED && peg$currPos < input.length) { - peg$fail({ type: "end", description: "end of input" }); - } - - throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos); - } - } - - return { - SyntaxError: SyntaxError, - parse: parse - }; -}(); - -var Orientation = { - HORIZONTAL: 1, - VERTICAL: 2, - ZINDEX: 4 -}; - -/** - * Helper function that inserts equal spacers (~). - * @private - */ -function _processEqualSpacer(context, stackView) { - - // Determine unique name for the spacer - context.equalSpacerIndex = context.equalSpacerIndex || 1; - var name = '_~' + context.lineIndex + ':' + context.equalSpacerIndex + '~'; - if (context.equalSpacerIndex > 1) { - - // Ensure that all spacers have the same width/height - context.constraints.push({ - view1: '_~' + context.lineIndex + ':1~', - attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - relation: context.relation.relation || Relation.EQU, - view2: name, - attr2: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - priority: context.relation.priority - }); - } - context.equalSpacerIndex++; - - // Enforce view/proportional width/height - if (context.relation.view || context.relation.multiplier && context.relation.multiplier !== 1) { - context.constraints.push({ - view1: name, - attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - relation: context.relation.relation || Relation.EQU, - view2: context.relation.view, - attr2: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - priority: context.relation.priority, - multiplier: context.relation.multiplier - }); - context.relation.multiplier = undefined; - } else if (context.relation.constant) { - context.constraints.push({ - view1: name, - attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - relation: Relation.EQU, - view2: null, - attr2: Attribute.CONST, - priority: context.relation.priority, - constant: context.relation.constant - }); - context.relation.constant = undefined; - } - - // Add constraint - for (var i = 0; i < context.prevViews.length; i++) { - var prevView = context.prevViews[i]; - switch (context.orientation) { - case Orientation.HORIZONTAL: - context.prevAttr = prevView !== stackView ? Attribute.RIGHT : Attribute.LEFT; - context.curAttr = Attribute.LEFT; - break; - case Orientation.VERTICAL: - context.prevAttr = prevView !== stackView ? Attribute.BOTTOM : Attribute.TOP; - context.curAttr = Attribute.TOP; - break; - case Orientation.ZINDEX: - context.prevAttr = Attribute.ZINDEX; - context.curAttr = Attribute.ZINDEX; - context.relation.constant = prevView !== stackView ? 'default' : 0; - break; - } - context.constraints.push({ - view1: prevView, - attr1: context.prevAttr, - relation: context.relation.relation, - view2: name, - attr2: context.curAttr, - priority: context.relation.priority - }); - } - context.prevViews = [name]; -} - -/** - * Helper function that inserts proportional spacers (-12%-). - * @private - */ -function _processProportionalSpacer(context, stackView) { - context.proportionalSpacerIndex = context.proportionalSpacerIndex || 1; - var name = '_-' + context.lineIndex + ':' + context.proportionalSpacerIndex + '-'; - context.proportionalSpacerIndex++; - context.constraints.push({ - view1: name, - attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - relation: context.relation.relation || Relation.EQU, - view2: context.relation.view, // or relative to the stackView... food for thought - attr2: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT, - priority: context.relation.priority, - multiplier: context.relation.multiplier - }); - context.relation.multiplier = undefined; - - // Add constraint - for (var i = 0; i < context.prevViews.length; i++) { - var prevView = context.prevViews[i]; - switch (context.orientation) { - case Orientation.HORIZONTAL: - context.prevAttr = prevView !== stackView ? Attribute.RIGHT : Attribute.LEFT; - context.curAttr = Attribute.LEFT; - break; - case Orientation.VERTICAL: - context.prevAttr = prevView !== stackView ? Attribute.BOTTOM : Attribute.TOP; - context.curAttr = Attribute.TOP; - break; - case Orientation.ZINDEX: - context.prevAttr = Attribute.ZINDEX; - context.curAttr = Attribute.ZINDEX; - context.relation.constant = prevView !== stackView ? 'default' : 0; - break; - } - context.constraints.push({ - view1: prevView, - attr1: context.prevAttr, - relation: context.relation.relation, - view2: name, - attr2: context.curAttr, - priority: context.relation.priority - }); - } - context.prevViews = [name]; -} - -/** - * In case of a stack-view, set constraints for opposite orientations - * @private - */ -function _processStackView(context, name, subView) { - var viewName = void 0; - for (var orientation = 1; orientation <= 4; orientation *= 2) { - if (subView.orientations & orientation && subView.stack.orientation !== orientation && !(subView.stack.processedOrientations & orientation)) { - subView.stack.processedOrientations = subView.stack.processedOrientations | orientation; - viewName = viewName || { - name: name, - type: 'stack' - }; - for (var i = 0, j = subView.stack.subViews.length; i < j; i++) { - if (orientation === Orientation.ZINDEX) { - context.constraints.push({ - view1: viewName, - attr1: Attribute.ZINDEX, - relation: Relation.EQU, - view2: subView.stack.subViews[i], - attr2: Attribute.ZINDEX - }); - } else { - context.constraints.push({ - view1: viewName, - attr1: orientation === Orientation.VERTICAL ? Attribute.HEIGHT : Attribute.WIDTH, - relation: Relation.EQU, - view2: subView.stack.subViews[i], - attr2: orientation === Orientation.VERTICAL ? Attribute.HEIGHT : Attribute.WIDTH - }); - context.constraints.push({ - view1: viewName, - attr1: orientation === Orientation.VERTICAL ? Attribute.TOP : Attribute.LEFT, - relation: Relation.EQU, - view2: subView.stack.subViews[i], - attr2: orientation === Orientation.VERTICAL ? Attribute.TOP : Attribute.LEFT - }); - } - } - } - } -} - -/** - * Recursive helper function converts a view-name and a range to a series - * of view-names (e.g. [child1, child2, child3, ...]). - * @private - */ -function _getRange(name, range) { - if (range === true) { - range = name.match(/\.\.\d+$/); - if (range) { - name = name.substring(0, name.length - range[0].length); - range = parseInt(range[0].substring(2)); - } - } - if (!range) { - return [name]; - } - var start = name.match(/\d+$/); - var res = []; - var i; - if (start) { - name = name.substring(0, name.length - start[0].length); - for (i = parseInt(start); i <= range; i++) { - res.push(name + i); - } - } else { - res.push(name); - for (i = 2; i <= range; i++) { - res.push(name + i); - } - } - return res; -} - -/** - * Recursive helper function that processes the cascaded data. - * @private - */ -function _processCascade(context, cascade, parentItem) { - var stackView = parentItem ? parentItem.view : null; - var subViews = []; - var curViews = []; - var subView = void 0; - if (stackView) { - cascade.push({ view: stackView }); - curViews.push(stackView); - } - for (var i = 0; i < cascade.length; i++) { - var item = cascade[i]; - if (!Array.isArray(item) && item.hasOwnProperty('view') || Array.isArray(item) && item[0].view && !item[0].relation) { - var items = Array.isArray(item) ? item : [item]; - for (var z = 0; z < items.length; z++) { - item = items[z]; - var viewRange = item === ',' ? [] : item.view ? _getRange(item.view, item.range) : [null]; - for (var r = 0; r < viewRange.length; r++) { - var curView = viewRange[r]; - curViews.push(curView); - - // - // Add this view to the collection of subViews - // - if (curView !== stackView) { - subViews.push(curView); - subView = context.subViews[curView]; - if (!subView) { - subView = { orientations: 0 }; - context.subViews[curView] = subView; - } - subView.orientations = subView.orientations | context.orientation; - if (subView.stack) { - _processStackView(context, curView, subView); - } - } - - // - // Process the relationship between this and the previous views - // - if (context.prevViews !== undefined && curView !== undefined && context.relation) { - if (context.relation.relation !== 'none') { - for (var p = 0; p < context.prevViews.length; p++) { - var prevView = context.prevViews[p]; - switch (context.orientation) { - case Orientation.HORIZONTAL: - context.prevAttr = prevView !== stackView ? Attribute.RIGHT : Attribute.LEFT; - context.curAttr = curView !== stackView ? Attribute.LEFT : Attribute.RIGHT; - break; - case Orientation.VERTICAL: - context.prevAttr = prevView !== stackView ? Attribute.BOTTOM : Attribute.TOP; - context.curAttr = curView !== stackView ? Attribute.TOP : Attribute.BOTTOM; - break; - case Orientation.ZINDEX: - context.prevAttr = Attribute.ZINDEX; - context.curAttr = Attribute.ZINDEX; - context.relation.constant = !prevView ? 0 : context.relation.constant || 'default'; - break; - } - context.constraints.push({ - view1: prevView, - attr1: context.prevAttr, - relation: context.relation.relation, - view2: curView, - attr2: context.curAttr, - multiplier: context.relation.multiplier, - constant: context.relation.constant === 'default' || !context.relation.constant ? context.relation.constant : -context.relation.constant, - priority: context.relation.priority - }); - } - } - } - - // - // Process view size constraints - // - var constraints = item.constraints; - if (constraints) { - for (var n = 0; n < constraints.length; n++) { - context.prevAttr = context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT; - context.curAttr = constraints[n].view || constraints[n].multiplier ? constraints[n].attribute || context.prevAttr : constraints[n].variable ? Attribute.VARIABLE : Attribute.CONST; - context.constraints.push({ - view1: curView, - attr1: context.prevAttr, - relation: constraints[n].relation, - view2: constraints[n].view, - attr2: context.curAttr, - multiplier: constraints[n].multiplier, - constant: constraints[n].constant, - priority: constraints[n].priority - }); - } - } - - // - // Process cascaded data (child stack-views) - // - if (item.cascade) { - _processCascade(context, item.cascade, item); - } - } - } - } else if (item !== ',') { - context.prevViews = curViews; - curViews = []; - context.relation = item[0]; - if (context.prevViews !== undefined) { - if (context.relation.equalSpacing) { - _processEqualSpacer(context, stackView); - } - if (context.relation.multiplier) { - _processProportionalSpacer(context, stackView); - } - } - } - } - - if (stackView) { - subView = context.subViews[stackView]; - if (!subView) { - subView = { orientations: context.orientation }; - context.subViews[stackView] = subView; - } else if (subView.stack) { - var err = new Error('A stack named "' + stackView + '" has already been created'); - err.column = parentItem.$parserOffset + 1; - throw err; - } - subView.stack = { - orientation: context.orientation, - processedOrientations: context.orientation, - subViews: subViews - }; - _processStackView(context, stackView, subView); - } -} - -var metaInfoCategories = ['viewport', 'spacing', 'colors', 'shapes', 'widths', 'heights']; - -/** - * VisualFormat - * - * @namespace VisualFormat - */ - -var VisualFormat = function () { - function VisualFormat() { - _classCallCheck(this, VisualFormat); - } - - _createClass(VisualFormat, null, [{ - key: 'parseLine', - - - /** - * Parses a single line of vfl into an array of constraint definitions. - * - * When the visual-format could not be succesfully parsed an exception is thrown containing - * additional info about the parse error and column position. - * - * @param {String} visualFormat Visual format string (cannot contain line-endings!). - * @param {Object} [options] Configuration options. - * @param {Boolean} [options.extended] When set to true uses the extended syntax (default: false). - * @param {String} [options.outFormat] Output format (`constraints` or `raw`) (default: `constraints`). - * @param {Number} [options.lineIndex] Line-index used when auto generating equal-spacing constraints. - * @return {Array} Array of constraint definitions. - */ - value: function parseLine(visualFormat, options) { - if (visualFormat.length === 0 || options && options.extended && visualFormat.indexOf('//') === 0) { - return []; - } - var res = options && options.extended ? parserExt.parse(visualFormat) : parser.parse(visualFormat); - if (options && options.outFormat === 'raw') { - return [res]; - } - var context = { - constraints: [], - lineIndex: (options ? options.lineIndex : undefined) || 1, - subViews: (options ? options.subViews : undefined) || {} - }; - if (res.type === 'attribute') { - for (var n = 0; n < res.attributes.length; n++) { - var attr = res.attributes[n]; - for (var m = 0; m < attr.predicates.length; m++) { - var predicate = attr.predicates[m]; - context.constraints.push({ - view1: res.view, - attr1: attr.attr, - relation: predicate.relation, - view2: predicate.view, - attr2: predicate.attribute || attr.attr, - multiplier: predicate.multiplier, - constant: predicate.constant, - priority: predicate.priority - }); - } - } - } else { - switch (res.orientation) { - case 'horizontal': - context.orientation = Orientation.HORIZONTAL; - context.horizontal = true; - _processCascade(context, res.cascade, null); - break; - case 'vertical': - context.orientation = Orientation.VERTICAL; - _processCascade(context, res.cascade, null); - break; - case 'horzvert': - context.orientation = Orientation.HORIZONTAL; - context.horizontal = true; - _processCascade(context, res.cascade, null); - context = { - constraints: context.constraints, - lineIndex: context.lineIndex, - subViews: context.subViews, - orientation: Orientation.VERTICAL - }; - _processCascade(context, res.cascade, null); - break; - case 'zIndex': - context.orientation = Orientation.ZINDEX; - _processCascade(context, res.cascade, null); - break; - } - } - return context.constraints; - } - - /** - * Parses one or more visual format strings into an array of constraint definitions. - * - * When the visual-format could not be succesfully parsed an exception is thrown containing - * additional info about the parse error and column position. - * - * @param {String|Array} visualFormat One or more visual format strings. - * @param {Object} [options] Configuration options. - * @param {Boolean} [options.extended] When set to true uses the extended syntax (default: false). - * @param {Boolean} [options.strict] When set to false trims any leading/trailing spaces and ignores empty lines (default: true). - * @param {String} [options.lineSeparator] String that defines the end of a line (default `\n`). - * @param {String} [options.outFormat] Output format (`constraints` or `raw`) (default: `constraints`). - * @return {Array} Array of constraint definitions. - */ - - }, { - key: 'parse', - value: function parse(visualFormat, options) { - var lineSeparator = options && options.lineSeparator ? options.lineSeparator : '\n'; - if (!Array.isArray(visualFormat) && visualFormat.indexOf(lineSeparator) < 0) { - try { - return this.parseLine(visualFormat, options); - } catch (err) { - err.source = visualFormat; - throw err; - } - } - - // Decompose visual-format into an array of strings, and within those strings - // search for line-endings, and treat each line as a seperate visual-format. - visualFormat = Array.isArray(visualFormat) ? visualFormat : [visualFormat]; - var lines = void 0; - var constraints = []; - var lineIndex = 0; - var line = void 0; - var parseOptions = { - lineIndex: lineIndex, - extended: options && options.extended, - strict: options && options.strict !== undefined ? options.strict : true, - outFormat: options ? options.outFormat : undefined, - subViews: {} - }; - try { - for (var i = 0; i < visualFormat.length; i++) { - lines = visualFormat[i].split(lineSeparator); - for (var j = 0; j < lines.length; j++) { - line = lines[j]; - lineIndex++; - parseOptions.lineIndex = lineIndex; - if (!parseOptions.strict) { - line = line.trim(); - } - if (parseOptions.strict || line.length) { - constraints = constraints.concat(this.parseLine(line, parseOptions)); - } - } - } - } catch (err) { - err.source = line; - err.line = lineIndex; - throw err; - } - return constraints; - } - - /** - * Parses meta information from the comments in the VFL. - * - * Additional meta information can be specified in the comments - * for previewing and rendering purposes. For instance, the view-port - * aspect-ratio, sub-view widths and colors, can be specified. The - * following example renders three colored circles in the visual-format editor: - * - * ```vfl - * //viewport aspect-ratio:3/1 max-height:300 - * //colors red:#FF0000 green:#00FF00 blue:#0000FF - * //shapes red:circle green:circle blue:circle - * H:|-[row:[red(green,blue)]-[green]-[blue]]-| - * V:|[row]| - * ``` - * - * Supported categories and properties: - * - * |Category|Property|Example| - * |--------|--------|-------| - * |`viewport`|`aspect-ratio:{width}/{height}`|`//viewport aspect-ratio:16/9`| - * ||`width:[{number}/intrinsic]`|`//viewport width:10`| - * ||`height:[{number}/intrinsic]`|`//viewport height:intrinsic`| - * ||`min-width:{number}`| - * ||`max-width:{number}`| - * ||`min-height:{number}`| - * ||`max-height:{number}`| - * |`spacing`|`[{number}/array]`|`//spacing:8` or `//spacing:[10, 20, 5]`| - * |`widths`|`{view-name}:[{number}/intrinsic]`|`//widths subview1:100`| - * |`heights`|`{view-name}:[{number}/intrinsic]`|`//heights subview1:intrinsic`| - * |`colors`|`{view-name}:{color}`|`//colors redview:#FF0000 blueview:#00FF00`| - * |`shapes`|`{view-name}:[circle/square]`|`//shapes avatar:circle`| - * - * @param {String|Array} visualFormat One or more visual format strings. - * @param {Object} [options] Configuration options. - * @param {String} [options.lineSeparator] String that defines the end of a line (default `\n`). - * @param {String} [options.prefix] When specified, also processes the categories using that prefix (e.g. "-dev-viewport max-height:10"). - * @return {Object} meta-info - */ - - }, { - key: 'parseMetaInfo', - value: function parseMetaInfo(visualFormat, options) { - var lineSeparator = options && options.lineSeparator ? options.lineSeparator : '\n'; - var prefix = options ? options.prefix : undefined; - visualFormat = Array.isArray(visualFormat) ? visualFormat : [visualFormat]; - var metaInfo = {}; - var key; - for (var k = 0; k < visualFormat.length; k++) { - var lines = visualFormat[k].split(lineSeparator); - for (var i = 0; i < lines.length; i++) { - var line = lines[i]; - for (var c = 0; c < metaInfoCategories.length; c++) { - for (var s = 0; s < (prefix ? 2 : 1); s++) { - var category = metaInfoCategories[c]; - var prefixedCategory = (s === 0 ? '' : prefix) + category; - if (line.indexOf('//' + prefixedCategory + ' ') === 0) { - var items = line.substring(3 + prefixedCategory.length).split(' '); - for (var j = 0; j < items.length; j++) { - metaInfo[category] = metaInfo[category] || {}; - var item = items[j].split(':'); - var names = _getRange(item[0], true); - for (var r = 0; r < names.length; r++) { - metaInfo[category][names[r]] = item.length > 1 ? item[1] : ''; - } - } - } else if (line.indexOf('//' + prefixedCategory + ':') === 0) { - metaInfo[category] = line.substring(3 + prefixedCategory.length); - } - } - } - } - } - if (metaInfo.viewport) { - var viewport = metaInfo.viewport; - var aspectRatio = viewport['aspect-ratio']; - if (aspectRatio) { - aspectRatio = aspectRatio.split('/'); - viewport['aspect-ratio'] = parseInt(aspectRatio[0]) / parseInt(aspectRatio[1]); - } - if (viewport.height !== undefined) { - viewport.height = viewport.height === 'intrinsic' ? true : parseInt(viewport.height); - } - if (viewport.width !== undefined) { - viewport.width = viewport.width === 'intrinsic' ? true : parseInt(viewport.width); - } - if (viewport['max-height'] !== undefined) { - viewport['max-height'] = parseInt(viewport['max-height']); - } - if (viewport['max-width'] !== undefined) { - viewport['max-width'] = parseInt(viewport['max-width']); - } - if (viewport['min-height'] !== undefined) { - viewport['min-height'] = parseInt(viewport['min-height']); - } - if (viewport['min-width'] !== undefined) { - viewport['min-width'] = parseInt(viewport['min-width']); - } - } - if (metaInfo.widths) { - for (key in metaInfo.widths) { - var width = metaInfo.widths[key] === 'intrinsic' ? true : parseInt(metaInfo.widths[key]); - metaInfo.widths[key] = width; - if (width === undefined || isNaN(width)) { - delete metaInfo.widths[key]; - } - } - } - if (metaInfo.heights) { - for (key in metaInfo.heights) { - var height = metaInfo.heights[key] === 'intrinsic' ? true : parseInt(metaInfo.heights[key]); - metaInfo.heights[key] = height; - if (height === undefined || isNaN(height)) { - delete metaInfo.heights[key]; - } - } - } - if (metaInfo.spacing) { - var value = JSON.parse(metaInfo.spacing); - metaInfo.spacing = value; - if (Array.isArray(value)) { - for (var sIdx = 0, len = value.length; sIdx < len; sIdx++) { - if (isNaN(value[sIdx])) { - delete metaInfo.spacing; - break; - } - } - } else if (value === undefined || isNaN(value)) { - delete metaInfo.spacing; - } - } - return metaInfo; - } - }]); - - return VisualFormat; -}(); - -/** - * A SubView is automatically generated when constraints are added to a View. - * - * @namespace SubView - */ - - -var SubView = function () { - function SubView(options) { - _classCallCheck(this, SubView); - - this._name = options.name; - this._type = options.type; - this._solver = options.solver; - this._attr = {}; - if (!options.name) { - if (false) { - this._attr[Attribute.LEFT] = new c.Variable(); - this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.LEFT], c.Strength.required)); - this._attr[Attribute.TOP] = new c.Variable(); - this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.TOP], c.Strength.required)); - this._attr[Attribute.ZINDEX] = new c.Variable(); - this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.ZINDEX], c.Strength.required)); - } else { - this._attr[Attribute.LEFT] = new kiwi.Variable(); - this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.LEFT], kiwi.Operator.Eq, 0)); - this._attr[Attribute.TOP] = new kiwi.Variable(); - this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.TOP], kiwi.Operator.Eq, 0)); - this._attr[Attribute.ZINDEX] = new kiwi.Variable(); - this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.ZINDEX], kiwi.Operator.Eq, 0)); - } - } - } - - _createClass(SubView, [{ - key: 'toJSON', - value: function toJSON() { - return { - name: this.name, - left: this.left, - top: this.top, - width: this.width, - height: this.height - }; - } - }, { - key: 'toString', - value: function toString() { - JSON.stringify(this.toJSON(), undefined, 2); - } - - /** - * Name of the sub-view. - * @readonly - * @type {String} - */ - - }, { - key: 'getValue', - - - /** - * Gets the value of one of the attributes. - * - * @param {String|Attribute} attr Attribute name (e.g. 'right', 'centerY', Attribute.TOP). - * @return {Number} value or `undefined` - */ - value: function getValue(attr) { - return this._attr[attr] ? this._attr[attr].value() : undefined; - } - - /** - * @private - */ - - }, { - key: '_getAttr', - value: function _getAttr(attr) { - if (this._attr[attr]) { - return this._attr[attr]; - } - this._attr[attr] = false ? new c.Variable() : new kiwi.Variable(); - switch (attr) { - case Attribute.RIGHT: - this._getAttr(Attribute.LEFT); - this._getAttr(Attribute.WIDTH); - if (false) { - this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.LEFT], this._attr[Attribute.WIDTH]))); - } else { - this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.LEFT].plus(this._attr[Attribute.WIDTH]))); - } - break; - case Attribute.BOTTOM: - this._getAttr(Attribute.TOP); - this._getAttr(Attribute.HEIGHT); - if (false) { - this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.TOP], this._attr[Attribute.HEIGHT]))); - } else { - this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.TOP].plus(this._attr[Attribute.HEIGHT]))); - } - break; - case Attribute.CENTERX: - this._getAttr(Attribute.LEFT); - this._getAttr(Attribute.WIDTH); - if (false) { - this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.LEFT], c.divide(this._attr[Attribute.WIDTH], 2)))); - } else { - this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.LEFT].plus(this._attr[Attribute.WIDTH].divide(2)))); - } - break; - case Attribute.CENTERY: - this._getAttr(Attribute.TOP); - this._getAttr(Attribute.HEIGHT); - if (false) { - this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.TOP], c.divide(this._attr[Attribute.HEIGHT], 2)))); - } else { - this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.TOP].plus(this._attr[Attribute.HEIGHT].divide(2)))); - } - break; - } - if (!false) { - this._solver.updateVariables(); - } - return this._attr[attr]; - } - - /** - * @private - */ - - }, { - key: '_getAttrValue', - value: function _getAttrValue(attr) { - if (false) { - return this._getAttr(attr).value; - } else { - return this._getAttr(attr).value(); - } - } - }, { - key: 'name', - get: function get() { - return this._name; - } - - /** - * Left value (`Attribute.LEFT`). - * @readonly - * @type {Number} - */ - - }, { - key: 'left', - get: function get() { - return this._getAttrValue(Attribute.LEFT); - } - - /** - * Right value (`Attribute.RIGHT`). - * @readonly - * @type {Number} - */ - - }, { - key: 'right', - get: function get() { - return this._getAttrValue(Attribute.RIGHT); - } - - /** - * Width value (`Attribute.WIDTH`). - * @type {Number} - */ - - }, { - key: 'width', - get: function get() { - return this._getAttrValue(Attribute.WIDTH); - } - - /** - * Height value (`Attribute.HEIGHT`). - * @readonly - * @type {Number} - */ - - }, { - key: 'height', - get: function get() { - return this._getAttrValue(Attribute.HEIGHT); - } - - /** - * Intrinsic width of the sub-view. - * - * Use this property to explicitely set the width of the sub-view, e.g.: - * ```javascript - * var view = new AutoLayout.View(AutoLayout.VisualFormat.parse('|[child1][child2]|'), { - * width: 500 - * }); - * view.subViews.child1.intrinsicWidth = 100; - * console.log('child2 width: ' + view.subViews.child2.width); // 400 - * ``` - * - * @type {Number} - */ - - }, { - key: 'intrinsicWidth', - get: function get() { - return this._intrinsicWidth; - }, - set: function set(value) { - if (value !== undefined && value !== this._intrinsicWidth) { - var attr = this._getAttr(Attribute.WIDTH); - if (this._intrinsicWidth === undefined) { - if (false) { - this._solver.addEditVar(attr, new c.Strength('required', this._name ? 998 : 999, 1000, 1000)); - } else { - this._solver.addEditVariable(attr, kiwi.Strength.create(this._name ? 998 : 999, 1000, 1000)); - } - } - this._intrinsicWidth = value; - this._solver.suggestValue(attr, value); - if (false) { - this._solver.resolve(); - } else { - this._solver.updateVariables(); - } - } - } - - /** - * Intrinsic height of the sub-view. - * - * See `intrinsicWidth`. - * - * @type {Number} - */ - - }, { - key: 'intrinsicHeight', - get: function get() { - return this._intrinsicHeight; - }, - set: function set(value) { - if (value !== undefined && value !== this._intrinsicHeight) { - var attr = this._getAttr(Attribute.HEIGHT); - if (this._intrinsicHeight === undefined) { - if (false) { - this._solver.addEditVar(attr, new c.Strength('required', this._name ? 998 : 999, 1000, 1000)); - } else { - this._solver.addEditVariable(attr, kiwi.Strength.create(this._name ? 998 : 999, 1000, 1000)); - } - } - this._intrinsicHeight = value; - this._solver.suggestValue(attr, value); - if (false) { - this._solver.resolve(); - } else { - this._solver.updateVariables(); - } - } - } - - /** - * Top value (`Attribute.TOP`). - * @readonly - * @type {Number} - */ - - }, { - key: 'top', - get: function get() { - return this._getAttrValue(Attribute.TOP); - } - - /** - * Bottom value (`Attribute.BOTTOM`). - * @readonly - * @type {Number} - */ - - }, { - key: 'bottom', - get: function get() { - return this._getAttrValue(Attribute.BOTTOM); - } - - /** - * Horizontal center (`Attribute.CENTERX`). - * @readonly - * @type {Number} - */ - - }, { - key: 'centerX', - get: function get() { - return this._getAttrValue(Attribute.CENTERX); - } - - /** - * Vertical center (`Attribute.CENTERY`). - * @readonly - * @type {Number} - */ - - }, { - key: 'centerY', - get: function get() { - return this._getAttrValue(Attribute.CENTERY); - } - - /** - * Z-index (`Attribute.ZINDEX`). - * @readonly - * @type {Number} - */ - - }, { - key: 'zIndex', - get: function get() { - return this._getAttrValue(Attribute.ZINDEX); - } - - /** - * Returns the type of the sub-view. - * @readonly - * @type {String} - */ - - }, { - key: 'type', - get: function get() { - return this._type; - } - }]); - - return SubView; -}(); - -var defaultPriorityStrength = false ? new c.Strength('defaultPriority', 0, 1000, 1000) : kiwi.Strength.create(0, 1000, 1000); - -function _getConst(name, value) { - if (false) { - var vr = new c.Variable({ value: value }); - this._solver.addConstraint(new c.StayConstraint(vr, c.Strength.required, 0)); - return vr; - } else { - var _vr = new kiwi.Variable(); - this._solver.addConstraint(new kiwi.Constraint(_vr, kiwi.Operator.Eq, value)); - return _vr; - } -} - -function _getSubView(viewName) { - if (!viewName) { - return this._parentSubView; - } else if (viewName.name) { - this._subViews[viewName.name] = this._subViews[viewName.name] || new SubView({ - name: viewName.name, - solver: this._solver - }); - this._subViews[viewName.name]._type = this._subViews[viewName.name]._type || viewName.type; - return this._subViews[viewName.name]; - } else { - this._subViews[viewName] = this._subViews[viewName] || new SubView({ - name: viewName, - solver: this._solver - }); - return this._subViews[viewName]; - } -} - -function _getSpacing(constraint) { - var index = 4; - if (!constraint.view1 && constraint.attr1 === 'left') { - index = 3; - } else if (!constraint.view1 && constraint.attr1 === 'top') { - index = 0; - } else if (!constraint.view2 && constraint.attr2 === 'right') { - index = 1; - } else if (!constraint.view2 && constraint.attr2 === 'bottom') { - index = 2; - } else { - switch (constraint.attr1) { - case 'left': - case 'right': - case 'centerX': - case 'leading': - case 'trailing': - index = 4; - break; - case 'zIndex': - index = 6; - break; - default: - index = 5; - } - } - this._spacingVars = this._spacingVars || new Array(7); - this._spacingExpr = this._spacingExpr || new Array(7); - if (!this._spacingVars[index]) { - if (false) { - this._spacingVars[index] = new c.Variable(); - this._solver.addEditVar(this._spacingVars[index]); - this._spacingExpr[index] = c.minus(0, this._spacingVars[index]); - } else { - this._spacingVars[index] = new kiwi.Variable(); - this._solver.addEditVariable(this._spacingVars[index], kiwi.Strength.create(999, 1000, 1000)); - this._spacingExpr[index] = this._spacingVars[index].multiply(-1); - } - this._solver.suggestValue(this._spacingVars[index], this._spacing[index]); - } - return this._spacingExpr[index]; -} - -function _addConstraint(constraint) { - //this.constraints.push(constraint); - var relation = void 0; - var multiplier = constraint.multiplier !== undefined ? constraint.multiplier : 1; - var constant = constraint.constant !== undefined ? constraint.constant : 0; - if (constant === 'default') { - constant = _getSpacing.call(this, constraint); - } - var attr1 = _getSubView.call(this, constraint.view1)._getAttr(constraint.attr1); - var attr2 = void 0; - if (false) { - if (constraint.attr2 === Attribute.CONST) { - attr2 = _getConst.call(this, undefined, constraint.constant); - } else { - attr2 = _getSubView.call(this, constraint.view2)._getAttr(constraint.attr2); - if (multiplier !== 1 && constant) { - attr2 = c.plus(c.times(attr2, multiplier), constant); - } else if (constant) { - attr2 = c.plus(attr2, constant); - } else if (multiplier !== 1) { - attr2 = c.times(attr2, multiplier); - } - } - var strength = constraint.priority !== undefined && constraint.priority < 1000 ? new c.Strength('priority', 0, constraint.priority, 1000) : defaultPriorityStrength; - switch (constraint.relation) { - case Relation.EQU: - relation = new c.Equation(attr1, attr2, strength); - break; - case Relation.GEQ: - relation = new c.Inequality(attr1, c.GEQ, attr2, strength); - break; - case Relation.LEQ: - relation = new c.Inequality(attr1, c.LEQ, attr2, strength); - break; - default: - throw 'Invalid relation specified: ' + constraint.relation; - } - } else { - if (constraint.attr2 === Attribute.CONST) { - attr2 = _getConst.call(this, undefined, constraint.constant); - } else { - attr2 = _getSubView.call(this, constraint.view2)._getAttr(constraint.attr2); - if (multiplier !== 1 && constant) { - attr2 = attr2.multiply(multiplier).plus(constant); - } else if (constant) { - attr2 = attr2.plus(constant); - } else if (multiplier !== 1) { - attr2 = attr2.multiply(multiplier); - } - } - var _strength = constraint.priority !== undefined && constraint.priority < 1000 ? kiwi.Strength.create(0, constraint.priority, 1000) : defaultPriorityStrength; - switch (constraint.relation) { - case Relation.EQU: - relation = new kiwi.Constraint(attr1, kiwi.Operator.Eq, attr2, _strength); - break; - case Relation.GEQ: - relation = new kiwi.Constraint(attr1, kiwi.Operator.Ge, attr2, _strength); - break; - case Relation.LEQ: - relation = new kiwi.Constraint(attr1, kiwi.Operator.Le, attr2, _strength); - break; - default: - throw 'Invalid relation specified: ' + constraint.relation; - } - } - this._solver.addConstraint(relation); -} - -function _compareSpacing(old, newz) { - if (old === newz) { - return true; - } - if (!old || !newz) { - return false; - } - for (var i = 0; i < 7; i++) { - if (old[i] !== newz[i]) { - return false; - } - } - return true; -} - -/** - * AutoLayoutJS API reference. - * - * ### Index - * - * |Entity|Type|Description| - * |---|---|---| - * |[AutoLayout](#autolayout)|`namespace`|Top level AutoLayout object.| - * |[VisualFormat](#autolayoutvisualformat--object)|`namespace`|Parses VFL into constraints.| - * |[View](#autolayoutview)|`class`|Main entity for adding & evaluating constraints.| - * |[SubView](#autolayoutsubview--object)|`class`|SubView's are automatically created when constraints are added to views. They give access to the evaluated results.| - * |[Attribute](#autolayoutattribute--enum)|`enum`|Attribute types that are supported when adding constraints.| - * |[Relation](#autolayoutrelation--enum)|`enum`|Relationship types that are supported when adding constraints.| - * |[Priority](#autolayoutpriority--enum)|`enum`|Default priority values for when adding constraints.| - * - * ### AutoLayout - * - * @module AutoLayout - */ - -var View = function () { - - /** - * @class View - * @param {Object} [options] Configuration options. - * @param {Number} [options.width] Initial width of the view. - * @param {Number} [options.height] Initial height of the view. - * @param {Number|Object} [options.spacing] Spacing for the view (default: 8) (see `setSpacing`). - * @param {Array} [options.constraints] One or more constraint definitions (see `addConstraints`). - */ - function View(options) { - _classCallCheck(this, View); - - this._solver = false ? new c.SimplexSolver() : new kiwi.Solver(); - this._subViews = {}; - //this._spacing = undefined; - this._parentSubView = new SubView({ - solver: this._solver - }); - this.setSpacing(options && options.spacing !== undefined ? options.spacing : 8); - //this.constraints = []; - if (options) { - if (options.width !== undefined || options.height !== undefined) { - this.setSize(options.width, options.height); - } - if (options.constraints) { - this.addConstraints(options.constraints); - } - } - } - - /** - * Sets the width and height of the view. - * - * @param {Number} width Width of the view. - * @param {Number} height Height of the view. - * @return {View} this - */ - - - _createClass(View, [{ - key: 'setSize', - value: function setSize(width, height /*, depth*/) { - this._parentSubView.intrinsicWidth = width; - this._parentSubView.intrinsicHeight = height; - return this; - } - - /** - * Width that was set using `setSize`. - * @readonly - * @type {Number} - */ - - }, { - key: 'setSpacing', - - - /** - * Sets the spacing for the view. - * - * The spacing can be set for 7 different variables: - * `top`, `right`, `bottom`, `left`, `width`, `height` and `zIndex`. The `left`-spacing is - * used when a spacer is used between the parent-view and a sub-view (e.g. `|-[subView]`). - * The same is true for the `right`, `top` and `bottom` spacers. The `width` and `height` are - * used for spacers in between sub-views (e.g. `[view1]-[view2]`). - * - * Instead of using the full spacing syntax, it is also possible to use shorthand notations: - * - * |Syntax|Type|Description| - * |---|---|---| - * |`[top, right, bottom, left, width, height, zIndex]`|Array(7)|Full syntax including z-index **(clockwise order)**.| - * |`[top, right, bottom, left, width, height]`|Array(6)|Full horizontal & vertical spacing syntax (no z-index) **(clockwise order)**.| - * |`[horizontal, vertical, zIndex]`|Array(3)|Horizontal = left, right, width, vertical = top, bottom, height.| - * |`[horizontal, vertical]`|Array(2)|Horizontal = left, right, width, vertical = top, bottom, height, z-index = 1.| - * |`spacing`|Number|Horizontal & vertical spacing are all the same, z-index = 1.| - * - * Examples: - * ```javascript - * view.setSpacing(10); // horizontal & vertical spacing 10 - * view.setSpacing([10, 15, 2]); // horizontal spacing 10, vertical spacing 15, z-axis spacing 2 - * view.setSpacing([10, 20, 10, 20, 5, 5]); // top, right, bottom, left, horizontal, vertical - * view.setSpacing([10, 20, 10, 20, 5, 5, 1]); // top, right, bottom, left, horizontal, vertical, z - * ``` - * - * @param {Number|Array} spacing - * @return {View} this - */ - value: function setSpacing(spacing) { - // convert spacing into array: [top, right, bottom, left, horz, vert, z-index] - switch (Array.isArray(spacing) ? spacing.length : -1) { - case -1: - spacing = [spacing, spacing, spacing, spacing, spacing, spacing, 1];break; - case 1: - spacing = [spacing[0], spacing[0], spacing[0], spacing[0], spacing[0], spacing[0], 1];break; - case 2: - spacing = [spacing[1], spacing[0], spacing[1], spacing[0], spacing[0], spacing[1], 1];break; - case 3: - spacing = [spacing[1], spacing[0], spacing[1], spacing[0], spacing[0], spacing[1], spacing[2]];break; - case 6: - spacing = [spacing[0], spacing[1], spacing[2], spacing[3], spacing[4], spacing[5], 1];break; - case 7: - break; - default: - throw 'Invalid spacing syntax'; - } - if (!_compareSpacing(this._spacing, spacing)) { - this._spacing = spacing; - // update spacing variables - if (this._spacingVars) { - for (var i = 0; i < this._spacingVars.length; i++) { - if (this._spacingVars[i]) { - this._solver.suggestValue(this._spacingVars[i], this._spacing[i]); - } - } - if (false) { - this._solver.resolve(); - } else { - this._solver.updateVariables(); - } - } - } - return this; - } - - /** - * Adds a constraint definition. - * - * A constraint definition has the following format: - * - * ```javascript - * constraint: { - * view1: {String}, - * attr1: {AutoLayout.Attribute}, - * relation: {AutoLayout.Relation}, - * view2: {String}, - * attr2: {AutoLayout.Attribute}, - * multiplier: {Number}, - * constant: {Number}, - * priority: {Number}(0..1000) - * } - * ``` - * @param {Object} constraint Constraint definition. - * @return {View} this - */ - - }, { - key: 'addConstraint', - value: function addConstraint(constraint) { - _addConstraint.call(this, constraint); - if (!false) { - this._solver.updateVariables(); - } - return this; - } - - /** - * Adds one or more constraint definitions. - * - * A constraint definition has the following format: - * - * ```javascript - * constraint: { - * view1: {String}, - * attr1: {AutoLayout.Attribute}, - * relation: {AutoLayout.Relation}, - * view2: {String}, - * attr2: {AutoLayout.Attribute}, - * multiplier: {Number}, - * constant: {Number}, - * priority: {Number}(0..1000) - * } - * ``` - * @param {Array} constraints One or more constraint definitions. - * @return {View} this - */ - - }, { - key: 'addConstraints', - value: function addConstraints(constraints) { - for (var j = 0; j < constraints.length; j++) { - _addConstraint.call(this, constraints[j]); - } - if (!false) { - this._solver.updateVariables(); - } - return this; - } - - /** - * Dictionary of `SubView` objects that have been created when adding constraints. - * @readonly - * @type {Object.SubView} - */ - - }, { - key: 'width', - get: function get() { - return this._parentSubView.intrinsicWidth; - } - - /** - * Height that was set using `setSize`. - * @readonly - * @type {Number} - */ - - }, { - key: 'height', - get: function get() { - return this._parentSubView.intrinsicHeight; - } - - /** - * Width that is calculated from the constraints and the `.intrinsicWidth` of - * the sub-views. - * - * When the width has been explicitely set using `setSize`, the fittingWidth - * will **always** be the same as the explicitely set width. To calculate the size - * based on the content, use: - * ```javascript - * var view = new AutoLayout.View({ - * constraints: VisualFormat.parse('|-[view1]-[view2]-'), - * spacing: 20 - * }); - * view.subViews.view1.intrinsicWidth = 100; - * view.subViews.view2.intrinsicWidth = 100; - * console.log('fittingWidth: ' + view.fittingWidth); // 260 - * ``` - * - * @readonly - * @type {Number} - */ - - }, { - key: 'fittingWidth', - get: function get() { - return this._parentSubView.width; - } - - /** - * Height that is calculated from the constraints and the `.intrinsicHeight` of - * the sub-views. - * - * See `.fittingWidth`. - * - * @readonly - * @type {Number} - */ - - }, { - key: 'fittingHeight', - get: function get() { - return this._parentSubView.height; - } - }, { - key: 'subViews', - get: function get() { - return this._subViews; - } - - /** - * Checks whether the constraints incompletely specify the location - * of the subViews. - * @private - */ - //get hasAmbiguousLayout() { - // Todo - //} - - }]); - - return View; -}(); - -//import DOM from './DOM'; - -/** - * AutoLayout. - * - * @namespace AutoLayout - * @property {Attribute} Attribute - * @property {Relation} Relation - * @property {Priority} Priority - * @property {VisualFormat} VisualFormat - * @property {View} View - * @property {SubView} SubView - */ - - -var AutoLayout = { - Attribute: Attribute, - Relation: Relation, - Priority: Priority, - VisualFormat: VisualFormat, - View: View, - SubView: SubView - //DOM: DOM -}; - -module.exports = AutoLayout; - -},{"kiwi.js":2}],2:[function(require,module,exports){ -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module unless amdModuleId is set - define([], function () { - return (root['kiwi'] = factory()); - }); - } else if (typeof exports === 'object') { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory(); - } else { - root['kiwi'] = factory(); - } -}(this, function () { - -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -var tsu; -(function (tsu) { - - /** - * An iterator for an array of items. - */ - var ArrayIterator = (function () { - /* - * Construct a new ArrayIterator. - * - * @param array The array of items to iterate. - * @param [index] The index at which to start iteration. - */ - function ArrayIterator(array, index) { - if (typeof index === "undefined") { index = 0; } - this._array = array; - this._index = Math.max(0, Math.min(index, array.length)); - } - /** - * Returns the next item from the iterator or undefined. - */ - ArrayIterator.prototype.__next__ = function () { - return this._array[this._index++]; - }; - - /** - * Returns this same iterator. - */ - ArrayIterator.prototype.__iter__ = function () { - return this; - }; - return ArrayIterator; - })(); - tsu.ArrayIterator = ArrayIterator; - - /** - * A reverse iterator for an array of items. - */ - var ReverseArrayIterator = (function () { - /** - * Construct a new ReverseArrayIterator. - * - * @param array The array of items to iterate. - * @param [index] The index at which to start iteration. - */ - function ReverseArrayIterator(array, index) { - if (typeof index === "undefined") { index = array.length; } - this._array = array; - this._index = Math.max(0, Math.min(index, array.length)); - } - /** - * Returns the next item from the iterator or undefined. - */ - ReverseArrayIterator.prototype.__next__ = function () { - return this._array[--this._index]; - }; - - /** - * Returns this same iterator. - */ - ReverseArrayIterator.prototype.__iter__ = function () { - return this; - }; - return ReverseArrayIterator; - })(); - tsu.ReverseArrayIterator = ReverseArrayIterator; - - - - function iter(object) { - if (object instanceof Array) { - return new ArrayIterator(object); - } - return object.__iter__(); - } - tsu.iter = iter; - - - - function reversed(object) { - if (object instanceof Array) { - return new ReverseArrayIterator(object); - } - return object.__reversed__(); - } - tsu.reversed = reversed; - - /** - * Returns the next value from an iterator, or undefined. - */ - function next(iterator) { - return iterator.__next__(); - } - tsu.next = next; - - - function forEach(object, callback) { - if (object instanceof Array) { - for (var i = 0, n = object.length; i < n; ++i) { - if (callback(object[i]) === false) { - return; - } - } - } else { - var value; - var it = object.__iter__(); - while ((value = it.__next__()) !== undefined) { - if (callback(value) === false) { - return; - } - } - } - } - tsu.forEach = forEach; - -})(tsu || (tsu = {})); -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -var tsu; -(function (tsu) { - - - /** - * A class which defines a generic pair object. - */ - var Pair = (function () { - /** - * Construct a new Pair object. - * - * @param first The first item of the pair. - * @param second The second item of the pair. - */ - function Pair(first, second) { - this.first = first; - this.second = second; - } - /** - * Create a copy of the pair. - */ - Pair.prototype.copy = function () { - return new Pair(this.first, this.second); - }; - return Pair; - })(); - tsu.Pair = Pair; -})(tsu || (tsu = {})); -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -/// -/// -var tsu; -(function (tsu) { - /** - * Perform a lower bound search on a sorted array. - * - * @param array The array of sorted items to search. - * @param value The value to located in the array. - * @param compare The value comparison function. - * @returns The index of the first element in the array which - * compares greater than or equal to the given value. - */ - function lowerBound(array, value, compare) { - var begin = 0; - var n = array.length; - var half; - var middle; - while (n > 0) { - half = n >> 1; - middle = begin + half; - if (compare(array[middle], value) < 0) { - begin = middle + 1; - n -= half + 1; - } else { - n = half; - } - } - return begin; - } - tsu.lowerBound = lowerBound; - - /** - * Perform a binary search on a sorted array. - * - * @param array The array of sorted items to search. - * @param value The value to located in the array. - * @param compare The value comparison function. - * @returns The index of the found item, or -1. - */ - function binarySearch(array, value, compare) { - var index = lowerBound(array, value, compare); - if (index === array.length) { - return -1; - } - var item = array[index]; - if (compare(item, value) !== 0) { - return -1; - } - return index; - } - tsu.binarySearch = binarySearch; - - /** - * Perform a binary find on a sorted array. - * - * @param array The array of sorted items to search. - * @param value The value to located in the array. - * @param compare The value comparison function. - * @returns The found item in the array, or undefined. - */ - function binaryFind(array, value, compare) { - var index = lowerBound(array, value, compare); - if (index === array.length) { - return undefined; - } - var item = array[index]; - if (compare(item, value) !== 0) { - return undefined; - } - return item; - } - tsu.binaryFind = binaryFind; - -})(tsu || (tsu = {})); -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -/// -var tsu; -(function (tsu) { - /** - * A base class for implementing array-based data structures. - * - * @class - */ - var ArrayBase = (function () { - function ArrayBase() { - /* - * The internal data array. - * - * @protected - */ - this._array = []; - } - /** - * Returns the number of items in the array. - */ - ArrayBase.prototype.size = function () { - return this._array.length; - }; - - /** - * Returns true if the array is empty. - */ - ArrayBase.prototype.empty = function () { - return this._array.length === 0; - }; - - /** - * Returns the item at the given array index. - * - * @param index The integer index of the desired item. - */ - ArrayBase.prototype.itemAt = function (index) { - return this._array[index]; - }; - - /** - * Removes and returns the item at the given index. - * - * @param index The integer index of the desired item. - */ - ArrayBase.prototype.takeAt = function (index) { - return this._array.splice(index, 1)[0]; - }; - - /** - * Clear the internal contents of array. - */ - ArrayBase.prototype.clear = function () { - this._array = []; - }; - - /** - * Swap this array's contents with another array. - * - * @param other The array base to use for the swap. - */ - ArrayBase.prototype.swap = function (other) { - var array = this._array; - this._array = other._array; - other._array = array; - }; - - /** - * Returns an iterator over the array of items. - */ - ArrayBase.prototype.__iter__ = function () { - return tsu.iter(this._array); - }; - - /** - * Returns a reverse iterator over the array of items. - */ - ArrayBase.prototype.__reversed__ = function () { - return tsu.reversed(this._array); - }; - return ArrayBase; - })(); - tsu.ArrayBase = ArrayBase; -})(tsu || (tsu = {})); -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -var __extends = this.__extends || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -/// -/// -/// -/// -var tsu; -(function (tsu) { - /** - * A mapping container build on a sorted array. - * - * @class - */ - var AssociativeArray = (function (_super) { - __extends(AssociativeArray, _super); - /** - * Construct a new AssociativeArray. - * - * @param compare The key comparison function. - */ - function AssociativeArray(compare) { - _super.call(this); - this._compare = compare; - this._wrapped = wrapCompare(compare); - } - /** - * Returns the key comparison function used by this array. - */ - AssociativeArray.prototype.comparitor = function () { - return this._compare; - }; - - /** - * Return the array index of the given key, or -1. - * - * @param key The key to locate in the array. - */ - AssociativeArray.prototype.indexOf = function (key) { - return tsu.binarySearch(this._array, key, this._wrapped); - }; - - /** - * Returns true if the key is in the array, false otherwise. - * - * @param key The key to locate in the array. - */ - AssociativeArray.prototype.contains = function (key) { - return tsu.binarySearch(this._array, key, this._wrapped) >= 0; - }; - - /** - * Returns the pair associated with the given key, or undefined. - * - * @param key The key to locate in the array. - */ - AssociativeArray.prototype.find = function (key) { - return tsu.binaryFind(this._array, key, this._wrapped); - }; - - /** - * Returns the pair associated with the key if it exists. - * - * If the key does not exist, a new pair will be created and - * inserted using the value created by the given factory. - * - * @param key The key to locate in the array. - * @param factory The function which creates the default value. - */ - AssociativeArray.prototype.setDefault = function (key, factory) { - var array = this._array; - var index = tsu.lowerBound(array, key, this._wrapped); - if (index === array.length) { - var pair = new tsu.Pair(key, factory()); - array.push(pair); - return pair; - } - var currPair = array[index]; - if (this._compare(currPair.first, key) !== 0) { - var pair = new tsu.Pair(key, factory()); - array.splice(index, 0, pair); - return pair; - } - return currPair; - }; - - /** - * Insert the pair into the array and return the pair. - * - * This will overwrite any existing entry in the array. - * - * @param key The key portion of the pair. - * @param value The value portion of the pair. - */ - AssociativeArray.prototype.insert = function (key, value) { - var array = this._array; - var index = tsu.lowerBound(array, key, this._wrapped); - if (index === array.length) { - var pair = new tsu.Pair(key, value); - array.push(pair); - return pair; - } - var currPair = array[index]; - if (this._compare(currPair.first, key) !== 0) { - var pair = new tsu.Pair(key, value); - array.splice(index, 0, pair); - return pair; - } - currPair.second = value; - return currPair; - }; - - AssociativeArray.prototype.update = function (object) { - var _this = this; - if (object instanceof AssociativeArray) { - var obj = object; - this._array = merge(this._array, obj._array, this._compare); - } else { - tsu.forEach(object, function (pair) { - _this.insert(pair.first, pair.second); - }); - } - }; - - /** - * Removes and returns the pair for the given key, or undefined. - * - * @param key The key to remove from the map. - */ - AssociativeArray.prototype.erase = function (key) { - var array = this._array; - var index = tsu.binarySearch(array, key, this._wrapped); - if (index < 0) { - return undefined; - } - return array.splice(index, 1)[0]; - }; - - /** - * Create a copy of this associative array. - */ - AssociativeArray.prototype.copy = function () { - var theCopy = new AssociativeArray(this._compare); - var copyArray = theCopy._array; - var thisArray = this._array; - for (var i = 0, n = thisArray.length; i < n; ++i) { - copyArray.push(thisArray[i].copy()); - } - return theCopy; - }; - return AssociativeArray; - })(tsu.ArrayBase); - tsu.AssociativeArray = AssociativeArray; - - /** - * An internal which wraps a comparison key function. - */ - function wrapCompare(cmp) { - return function (pair, value) { - return cmp(pair.first, value); - }; - } - - /** - * An internal function which merges two ordered pair arrays. - */ - function merge(first, second, compare) { - var i = 0, j = 0; - var len1 = first.length; - var len2 = second.length; - var merged = []; - while (i < len1 && j < len2) { - var a = first[i]; - var b = second[j]; - var v = compare(a.first, b.first); - if (v < 0) { - merged.push(a.copy()); - ++i; - } else if (v > 0) { - merged.push(b.copy()); - ++j; - } else { - merged.push(b.copy()); - ++i; - ++j; - } - } - while (i < len1) { - merged.push(first[i].copy()); - ++i; - } - while (j < len2) { - merged.push(second[j].copy()); - ++j; - } - return merged; - } -})(tsu || (tsu = {})); -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -/// -/// -/// -/// -/// -/// - -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -// -// -/** - * Kiwi is an efficient implementation of the Cassowary constraint solving - * algorithm, based on the seminal Cassowary paper. - * It is *not* a refactoring or port of the original C++ solver, but - * has been designed from the ground up to be lightweight and fast. - * - * **Example** - * ```javascript - * var kiwi = require('kiwi'); - * - * // Create a solver - * var solver = new kiwi.Solver(); - * - * // Create and add some editable variables - * var left = new kiwi.Variable(); - * var width = new kiwi.Variable(); - * solver.addEditVariable(left, kiwi.Strength.strong); - * solver.addEditVariable(width, kiwi.Strength.strong); - * - * // Create a variable calculated through a constraint - * var centerX = new kiwi.Variable(); - * var expr = new kiwi.Expression([-1, centerX], left, [0.5, width]); - * solver.addConstraint(new kiwi.Constraint(expr, kiwi.Operator.Eq, kiwi.Strength.required)); - * - * // Suggest some values to the solver - * solver.suggestValue(left, 0); - * solver.suggestValue(width, 500); - * - * // Lets solve the problem! - * solver.updateVariables(); - * assert(centerX.value(), 250); - * ``` - * - * ##API Documentation - * @module kiwi - */ -var kiwi; -(function (kiwi) { - /** - * An enum defining the linear constraint operators. - * - * |Value|Operator|Description| - * |----|-----|-----| - * |`Le`|<=|Less than equal| - * |`Ge`|>=|Greater than equal| - * |`Eq`|==|Equal| - * - * @enum {Number} - */ - (function (Operator) { - Operator[Operator["Le"] = 0] = "Le"; - Operator[Operator["Ge"] = 1] = "Ge"; - Operator[Operator["Eq"] = 2] = "Eq"; // == - })(kiwi.Operator || (kiwi.Operator = {})); - var Operator = kiwi.Operator; - /** - * A linear constraint equation. - * - * A constraint equation is composed of an expression, an operator, - * and a strength. The RHS of the equation is implicitly zero. - * - * @class - * @param {Expression} expression The constraint expression (LHS). - * @param {Operator} operator The equation operator. - * @param {Expression} [rhs] Right hand side of the expression. - * @param {Number} [strength=Strength.required] The strength of the constraint. - */ - var Constraint = (function () { - function Constraint(expression, operator, rhs, strength) { - if (strength === void 0) { strength = kiwi.Strength.required; } - this._id = CnId++; - this._operator = operator; - this._strength = kiwi.Strength.clip(strength); - if ((rhs === undefined) && (expression instanceof kiwi.Expression)) { - this._expression = expression; - } - else { - this._expression = expression.minus(rhs); - } - } - /** - * A static constraint comparison function. - * @private - */ - Constraint.Compare = function (a, b) { - return a.id() - b.id(); - }; - /** - * Returns the unique id number of the constraint. - * @private - */ - Constraint.prototype.id = function () { - return this._id; - }; - /** - * Returns the expression of the constraint. - * - * @return {Expression} expression - */ - Constraint.prototype.expression = function () { - return this._expression; - }; - /** - * Returns the relational operator of the constraint. - * - * @return {Operator} linear constraint operator - */ - Constraint.prototype.op = function () { - return this._operator; - }; - /** - * Returns the strength of the constraint. - * - * @return {Number} strength - */ - Constraint.prototype.strength = function () { - return this._strength; - }; - Constraint.prototype.toString = function () { - return this._expression.toString() + " " + ["<=", ">=", "="][this._operator] + " 0 (" + this._strength.toString() + ")"; - }; - return Constraint; - })(); - kiwi.Constraint = Constraint; - /** - * The internal constraint id counter. - * @private - */ - var CnId = 0; -})(kiwi || (kiwi = {})); -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -/// -var kiwi; -(function (kiwi) { - function createMap(compare) { - return new tsu.AssociativeArray(compare); - } - kiwi.createMap = createMap; -})(kiwi || (kiwi = {})); -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -var kiwi; -(function (kiwi) { - /** - * The primary user constraint variable. - * - * @class - * @param {String} [name=""] The name to associated with the variable. - */ - var Variable = (function () { - function Variable(name) { - if (name === void 0) { name = ""; } - this._value = 0.0; - this._context = null; - this._id = VarId++; - this._name = name; - } - /** - * A static variable comparison function. - * @private - */ - Variable.Compare = function (a, b) { - return a.id() - b.id(); - }; - /** - * Returns the unique id number of the variable. - * @private - */ - Variable.prototype.id = function () { - return this._id; - }; - /** - * Returns the name of the variable. - * - * @return {String} name of the variable - */ - Variable.prototype.name = function () { - return this._name; - }; - /** - * Set the name of the variable. - * - * @param {String} name Name of the variable - */ - Variable.prototype.setName = function (name) { - this._name = name; - }; - /** - * Returns the user context object of the variable. - * @private - */ - Variable.prototype.context = function () { - return this._context; - }; - /** - * Set the user context object of the variable. - * @private - */ - Variable.prototype.setContext = function (context) { - this._context = context; - }; - /** - * Returns the value of the variable. - * - * @return {Number} Calculated value - */ - Variable.prototype.value = function () { - return this._value; - }; - /** - * Set the value of the variable. - * @private - */ - Variable.prototype.setValue = function (value) { - this._value = value; - }; - /** - * Creates a new Expression by adding a number, variable or expression - * to the variable. - * - * @param {Number|Variable|Expression} value Value to add. - * @return {Expression} expression - */ - Variable.prototype.plus = function (value) { - return new kiwi.Expression(this, value); - }; - /** - * Creates a new Expression by substracting a number, variable or expression - * from the variable. - * - * @param {Number|Variable|Expression} value Value to substract. - * @return {Expression} expression - */ - Variable.prototype.minus = function (value) { - return new kiwi.Expression(this, typeof value === 'number' ? -value : [-1, value]); - }; - /** - * Creates a new Expression by multiplying with a fixed number. - * - * @param {Number} coefficient Coefficient to multiply with. - * @return {Expression} expression - */ - Variable.prototype.multiply = function (coefficient) { - return new kiwi.Expression([coefficient, this]); - }; - /** - * Creates a new Expression by dividing with a fixed number. - * - * @param {Number} coefficient Coefficient to divide by. - * @return {Expression} expression - */ - Variable.prototype.divide = function (coefficient) { - return new kiwi.Expression([1 / coefficient, this]); - }; - /** - * Returns the JSON representation of the variable. - * @private - */ - Variable.prototype.toJSON = function () { - return { - name: this._name, - value: this._value - }; - }; - Variable.prototype.toString = function () { - return this._context + "[" + this._name + ":" + this._value + "]"; - }; - return Variable; - })(); - kiwi.Variable = Variable; - /** - * The internal variable id counter. - * @private - */ - var VarId = 0; -})(kiwi || (kiwi = {})); -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -/// -/// -/// -var kiwi; -(function (kiwi) { - /** - * An expression of variable terms and a constant. - * - * The constructor accepts an arbitrary number of parameters, - * each of which must be one of the following types: - * - number - * - Variable - * - Expression - * - 2-tuple of [number, Variable|Expression] - * - * The parameters are summed. The tuples are multiplied. - * - * @class - * @param {...(number|Variable|Expression|Array)} args - */ - var Expression = (function () { - function Expression() { - var parsed = parseArgs(arguments); - this._terms = parsed.terms; - this._constant = parsed.constant; - } - /** - * Returns the mapping of terms in the expression. - * - * This *must* be treated as const. - * @private - */ - Expression.prototype.terms = function () { - return this._terms; - }; - /** - * Returns the constant of the expression. - * @private - */ - Expression.prototype.constant = function () { - return this._constant; - }; - /** - * Returns the computed value of the expression. - * - * @private - * @return {Number} computed value of the expression - */ - Expression.prototype.value = function () { - var result = this._constant; - for (var i = 0, n = this._terms.size(); i < n; i++) { - var pair = this._terms.itemAt(i); - result += pair.first.value() * pair.second; - } - return result; - }; - /** - * Creates a new Expression by adding a number, variable or expression - * to the expression. - * - * @param {Number|Variable|Expression} value Value to add. - * @return {Expression} expression - */ - Expression.prototype.plus = function (value) { - return new Expression(this, value); - }; - /** - * Creates a new Expression by substracting a number, variable or expression - * from the expression. - * - * @param {Number|Variable|Expression} value Value to substract. - * @return {Expression} expression - */ - Expression.prototype.minus = function (value) { - return new Expression(this, typeof value === 'number' ? -value : [-1, value]); - }; - /** - * Creates a new Expression by multiplying with a fixed number. - * - * @param {Number} coefficient Coefficient to multiply with. - * @return {Expression} expression - */ - Expression.prototype.multiply = function (coefficient) { - return new Expression([coefficient, this]); - }; - /** - * Creates a new Expression by dividing with a fixed number. - * - * @param {Number} coefficient Coefficient to divide by. - * @return {Expression} expression - */ - Expression.prototype.divide = function (coefficient) { - return new Expression([1 / coefficient, this]); - }; - Expression.prototype.isConstant = function () { - return this._terms.size() == 0; - }; - Expression.prototype.toString = function () { - var result = this._terms._array.map(function (pair, idx) { - return (pair.second + "*" + pair.first.toString()); - }).join(" + "); - if (!this.isConstant() && this._constant !== 0) { - result += " + "; - } - result += this._constant; - return result; - }; - return Expression; - })(); - kiwi.Expression = Expression; - /** - * An internal argument parsing function. - * @private - */ - function parseArgs(args) { - var constant = 0.0; - var factory = function () { return 0.0; }; - var terms = kiwi.createMap(kiwi.Variable.Compare); - for (var i = 0, n = args.length; i < n; ++i) { - var item = args[i]; - if (typeof item === "number") { - constant += item; - } - else if (item instanceof kiwi.Variable) { - terms.setDefault(item, factory).second += 1.0; - } - else if (item instanceof Expression) { - constant += item.constant(); - var terms2 = item.terms(); - for (var j = 0, k = terms2.size(); j < k; j++) { - var termPair = terms2.itemAt(j); - terms.setDefault(termPair.first, factory).second += termPair.second; - } - } - else if (item instanceof Array) { - if (item.length !== 2) { - throw new Error("array must have length 2"); - } - var value = item[0]; - var value2 = item[1]; - if (typeof value !== "number") { - throw new Error("array item 0 must be a number"); - } - if (value2 instanceof kiwi.Variable) { - terms.setDefault(value2, factory).second += value; - } - else if (value2 instanceof Expression) { - constant += (value2.constant() * value); - var terms2 = value2.terms(); - for (var j = 0, k = terms2.size(); j < k; j++) { - var termPair = terms2.itemAt(j); - terms.setDefault(termPair.first, factory).second += (termPair.second * value); - } - } - else { - throw new Error("array item 1 must be a variable or expression"); - } - } - else { - throw new Error("invalid Expression argument: " + item); - } - } - return { terms: terms, constant: constant }; - } -})(kiwi || (kiwi = {})); -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -var kiwi; -(function (kiwi) { - /** - * @class Strength - */ - var Strength; - (function (Strength) { - /** - * Create a new symbolic strength. - * - * @param {Number} a strong - * @param {Number} b medium - * @param {Number} c weak - * @param {Number} [w] weight - * @return {Number} strength - */ - function create(a, b, c, w) { - if (w === void 0) { w = 1.0; } - var result = 0.0; - result += Math.max(0.0, Math.min(1000.0, a * w)) * 1000000.0; - result += Math.max(0.0, Math.min(1000.0, b * w)) * 1000.0; - result += Math.max(0.0, Math.min(1000.0, c * w)); - return result; - } - Strength.create = create; - /** - * The 'required' symbolic strength. - */ - Strength.required = create(1000.0, 1000.0, 1000.0); - /** - * The 'strong' symbolic strength. - */ - Strength.strong = create(1.0, 0.0, 0.0); - /** - * The 'medium' symbolic strength. - */ - Strength.medium = create(0.0, 1.0, 0.0); - /** - * The 'weak' symbolic strength. - */ - Strength.weak = create(0.0, 0.0, 1.0); - /** - * Clip a symbolic strength to the allowed min and max. - * @private - */ - function clip(value) { - return Math.max(0.0, Math.min(Strength.required, value)); - } - Strength.clip = clip; - })(Strength = kiwi.Strength || (kiwi.Strength = {})); -})(kiwi || (kiwi = {})); -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -/// -/// -/// -/// -/// -/// -var kiwi; -(function (kiwi) { - /** - * The constraint solver class. - * - * @class - */ - var Solver = (function () { - /** - * Construct a new Solver. - */ - function Solver() { - this._cnMap = createCnMap(); - this._rowMap = createRowMap(); - this._varMap = createVarMap(); - this._editMap = createEditMap(); - this._infeasibleRows = []; - this._objective = new Row(); - this._artificial = null; - this._idTick = 0; - } - /** - * Creates and add a constraint to the solver. - * - * @param {Expression|Variable} lhs Left hand side of the expression - * @param {Operator} operator Operator - * @param {Expression|Variable|Number} rhs Right hand side of the expression - * @param {Number} [strength=Strength.required] Strength - */ - Solver.prototype.createConstraint = function (lhs, operator, rhs, strength) { - if (strength === void 0) { strength = kiwi.Strength.required; } - var cn = new kiwi.Constraint(lhs, operator, rhs, strength); - this.addConstraint(cn); - return cn; - }; - /** - * Add a constraint to the solver. - * - * @param {Constraint} constraint Constraint to add to the solver - */ - Solver.prototype.addConstraint = function (constraint) { - var cnPair = this._cnMap.find(constraint); - if (cnPair !== undefined) { - throw new Error("duplicate constraint"); - } - // Creating a row causes symbols to be reserved for the variables - // in the constraint. If this method exits with an exception, - // then its possible those variables will linger in the var map. - // Since its likely that those variables will be used in other - // constraints and since exceptional conditions are uncommon, - // i'm not too worried about aggressive cleanup of the var map. - var data = this._createRow(constraint); - var row = data.row; - var tag = data.tag; - var subject = this._chooseSubject(row, tag); - // If chooseSubject couldnt find a valid entering symbol, one - // last option is available if the entire row is composed of - // dummy variables. If the constant of the row is zero, then - // this represents redundant constraints and the new dummy - // marker can enter the basis. If the constant is non-zero, - // then it represents an unsatisfiable constraint. - if (subject.type() === SymbolType.Invalid && row.allDummies()) { - if (!nearZero(row.constant())) { - throw new Error("unsatisfiable constraint"); - } - else { - subject = tag.marker; - } - } - // If an entering symbol still isn't found, then the row must - // be added using an artificial variable. If that fails, then - // the row represents an unsatisfiable constraint. - if (subject.type() === SymbolType.Invalid) { - if (!this._addWithArtificialVariable(row)) { - throw new Error("unsatisfiable constraint"); - } - } - else { - row.solveFor(subject); - this._substitute(subject, row); - this._rowMap.insert(subject, row); - } - this._cnMap.insert(constraint, tag); - // Optimizing after each constraint is added performs less - // aggregate work due to a smaller average system size. It - // also ensures the solver remains in a consistent state. - this._optimize(this._objective); - }; - /** - * Remove a constraint from the solver. - * - * @param {Constraint} constraint Constraint to remove from the solver - */ - Solver.prototype.removeConstraint = function (constraint) { - var cnPair = this._cnMap.erase(constraint); - if (cnPair === undefined) { - throw new Error("unknown constraint"); - } - // Remove the error effects from the objective function - // *before* pivoting, or substitutions into the objective - // will lead to incorrect solver results. - this._removeConstraintEffects(constraint, cnPair.second); - // If the marker is basic, simply drop the row. Otherwise, - // pivot the marker into the basis and then drop the row. - var marker = cnPair.second.marker; - var rowPair = this._rowMap.erase(marker); - if (rowPair === undefined) { - var leaving = this._getMarkerLeavingSymbol(marker); - if (leaving.type() === SymbolType.Invalid) { - throw new Error("failed to find leaving row"); - } - rowPair = this._rowMap.erase(leaving); - rowPair.second.solveForEx(leaving, marker); - this._substitute(marker, rowPair.second); - } - // Optimizing after each constraint is removed ensures that the - // solver remains consistent. It makes the solver api easier to - // use at a small tradeoff for speed. - this._optimize(this._objective); - }; - /** - * Test whether the solver contains the constraint. - * - * @param {Constraint} constraint Constraint to test for - * @return {Bool} true or false - */ - Solver.prototype.hasConstraint = function (constraint) { - return this._cnMap.contains(constraint); - }; - /** - * Add an edit variable to the solver. - * - * @param {Variable} variable Edit variable to add to the solver - * @param {Number} strength Strength, should be less than `Strength.required` - */ - Solver.prototype.addEditVariable = function (variable, strength) { - var editPair = this._editMap.find(variable); - if (editPair !== undefined) { - throw new Error("duplicate edit variable"); - } - strength = kiwi.Strength.clip(strength); - if (strength === kiwi.Strength.required) { - throw new Error("bad required strength"); - } - var expr = new kiwi.Expression(variable); - var cn = new kiwi.Constraint(expr, kiwi.Operator.Eq, undefined, strength); - this.addConstraint(cn); - var tag = this._cnMap.find(cn).second; - var info = { tag: tag, constraint: cn, constant: 0.0 }; - this._editMap.insert(variable, info); - }; - /** - * Remove an edit variable from the solver. - * - * @param {Variable} variable Edit variable to remove from the solver - */ - Solver.prototype.removeEditVariable = function (variable) { - var editPair = this._editMap.erase(variable); - if (editPair === undefined) { - throw new Error("unknown edit variable"); - } - this.removeConstraint(editPair.second.constraint); - }; - /** - * Test whether the solver contains the edit variable. - * - * @param {Variable} variable Edit variable to test for - * @return {Bool} true or false - */ - Solver.prototype.hasEditVariable = function (variable) { - return this._editMap.contains(variable); - }; - /** - * Suggest the value of an edit variable. - * - * @param {Variable} variable Edit variable to suggest a value for - * @param {Number} value Suggested value - */ - Solver.prototype.suggestValue = function (variable, value) { - var editPair = this._editMap.find(variable); - if (editPair === undefined) { - throw new Error("unknown edit variable"); - } - var rows = this._rowMap; - var info = editPair.second; - var delta = value - info.constant; - info.constant = value; - // Check first if the positive error variable is basic. - var marker = info.tag.marker; - var rowPair = rows.find(marker); - if (rowPair !== undefined) { - if (rowPair.second.add(-delta) < 0.0) { - this._infeasibleRows.push(marker); - } - this._dualOptimize(); - return; - } - // Check next if the negative error variable is basic. - var other = info.tag.other; - var rowPair = rows.find(other); - if (rowPair !== undefined) { - if (rowPair.second.add(delta) < 0.0) { - this._infeasibleRows.push(other); - } - this._dualOptimize(); - return; - } - // Otherwise update each row where the error variables exist. - for (var i = 0, n = rows.size(); i < n; ++i) { - var rowPair = rows.itemAt(i); - var row = rowPair.second; - var coeff = row.coefficientFor(marker); - if (coeff !== 0.0 && row.add(delta * coeff) < 0.0 && - rowPair.first.type() !== SymbolType.External) { - this._infeasibleRows.push(rowPair.first); - } - } - this._dualOptimize(); - }; - /** - * Update the values of the variables. - */ - Solver.prototype.updateVariables = function () { - var vars = this._varMap; - var rows = this._rowMap; - for (var i = 0, n = vars.size(); i < n; ++i) { - var pair = vars.itemAt(i); - var rowPair = rows.find(pair.second); - if (rowPair !== undefined) { - pair.first.setValue(rowPair.second.constant()); - } - else { - pair.first.setValue(0.0); - } - } - }; - /** - * Get the symbol for the given variable. - * - * If a symbol does not exist for the variable, one will be created. - * @private - */ - Solver.prototype._getVarSymbol = function (variable) { - var _this = this; - var factory = function () { return _this._makeSymbol(SymbolType.External); }; - return this._varMap.setDefault(variable, factory).second; - }; - /** - * Create a new Row object for the given constraint. - * - * The terms in the constraint will be converted to cells in the row. - * Any term in the constraint with a coefficient of zero is ignored. - * This method uses the `_getVarSymbol` method to get the symbol for - * the variables added to the row. If the symbol for a given cell - * variable is basic, the cell variable will be substituted with the - * basic row. - * - * The necessary slack and error variables will be added to the row. - * If the constant for the row is negative, the sign for the row - * will be inverted so the constant becomes positive. - * - * Returns the created Row and the tag for tracking the constraint. - * @private - */ - Solver.prototype._createRow = function (constraint) { - var expr = constraint.expression(); - var row = new Row(expr.constant()); - // Substitute the current basic variables into the row. - var terms = expr.terms(); - for (var i = 0, n = terms.size(); i < n; ++i) { - var termPair = terms.itemAt(i); - if (!nearZero(termPair.second)) { - var symbol = this._getVarSymbol(termPair.first); - var basicPair = this._rowMap.find(symbol); - if (basicPair !== undefined) { - row.insertRow(basicPair.second, termPair.second); - } - else { - row.insertSymbol(symbol, termPair.second); - } - } - } - // Add the necessary slack, error, and dummy variables. - var objective = this._objective; - var strength = constraint.strength(); - var tag = { marker: INVALID_SYMBOL, other: INVALID_SYMBOL }; - switch (constraint.op()) { - case kiwi.Operator.Le: - case kiwi.Operator.Ge: - { - var coeff = constraint.op() === kiwi.Operator.Le ? 1.0 : -1.0; - var slack = this._makeSymbol(SymbolType.Slack); - tag.marker = slack; - row.insertSymbol(slack, coeff); - if (strength < kiwi.Strength.required) { - var error = this._makeSymbol(SymbolType.Error); - tag.other = error; - row.insertSymbol(error, -coeff); - objective.insertSymbol(error, strength); - } - break; - } - case kiwi.Operator.Eq: - { - if (strength < kiwi.Strength.required) { - var errplus = this._makeSymbol(SymbolType.Error); - var errminus = this._makeSymbol(SymbolType.Error); - tag.marker = errplus; - tag.other = errminus; - row.insertSymbol(errplus, -1.0); // v = eplus - eminus - row.insertSymbol(errminus, 1.0); // v - eplus + eminus = 0 - objective.insertSymbol(errplus, strength); - objective.insertSymbol(errminus, strength); - } - else { - var dummy = this._makeSymbol(SymbolType.Dummy); - tag.marker = dummy; - row.insertSymbol(dummy); - } - break; - } - } - // Ensure the row has a positive constant. - if (row.constant() < 0.0) { - row.reverseSign(); - } - return { row: row, tag: tag }; - }; - /** - * Choose the subject for solving for the row. - * - * This method will choose the best subject for using as the solve - * target for the row. An invalid symbol will be returned if there - * is no valid target. - * - * The symbols are chosen according to the following precedence: - * - * 1) The first symbol representing an external variable. - * 2) A negative slack or error tag variable. - * - * If a subject cannot be found, an invalid symbol will be returned. - * - * @private - */ - Solver.prototype._chooseSubject = function (row, tag) { - var cells = row.cells(); - for (var i = 0, n = cells.size(); i < n; ++i) { - var pair = cells.itemAt(i); - if (pair.first.type() === SymbolType.External) { - return pair.first; - } - } - var type = tag.marker.type(); - if (type === SymbolType.Slack || type === SymbolType.Error) { - if (row.coefficientFor(tag.marker) < 0.0) { - return tag.marker; - } - } - type = tag.other.type(); - if (type === SymbolType.Slack || type === SymbolType.Error) { - if (row.coefficientFor(tag.other) < 0.0) { - return tag.other; - } - } - return INVALID_SYMBOL; - }; - /** - * Add the row to the tableau using an artificial variable. - * - * This will return false if the constraint cannot be satisfied. - * - * @private - */ - Solver.prototype._addWithArtificialVariable = function (row) { - // Create and add the artificial variable to the tableau. - var art = this._makeSymbol(SymbolType.Slack); - this._rowMap.insert(art, row.copy()); - this._artificial = row.copy(); - // Optimize the artificial objective. This is successful - // only if the artificial objective is optimized to zero. - this._optimize(this._artificial); - var success = nearZero(this._artificial.constant()); - this._artificial = null; - // If the artificial variable is basic, pivot the row so that - // it becomes non-basic. If the row is constant, exit early. - var pair = this._rowMap.erase(art); - if (pair !== undefined) { - var basicRow = pair.second; - if (basicRow.isConstant()) { - return success; - } - var entering = this._anyPivotableSymbol(basicRow); - if (entering.type() === SymbolType.Invalid) { - return false; // unsatisfiable (will this ever happen?) - } - basicRow.solveForEx(art, entering); - this._substitute(entering, basicRow); - this._rowMap.insert(entering, basicRow); - } - // Remove the artificial variable from the tableau. - var rows = this._rowMap; - for (var i = 0, n = rows.size(); i < n; ++i) { - rows.itemAt(i).second.removeSymbol(art); - } - this._objective.removeSymbol(art); - return success; - }; - /** - * Substitute the parametric symbol with the given row. - * - * This method will substitute all instances of the parametric symbol - * in the tableau and the objective function with the given row. - * - * @private - */ - Solver.prototype._substitute = function (symbol, row) { - var rows = this._rowMap; - for (var i = 0, n = rows.size(); i < n; ++i) { - var pair = rows.itemAt(i); - pair.second.substitute(symbol, row); - if (pair.second.constant() < 0.0 && - pair.first.type() !== SymbolType.External) { - this._infeasibleRows.push(pair.first); - } - } - this._objective.substitute(symbol, row); - if (this._artificial) { - this._artificial.substitute(symbol, row); - } - }; - /** - * Optimize the system for the given objective function. - * - * This method performs iterations of Phase 2 of the simplex method - * until the objective function reaches a minimum. - * - * @private - */ - Solver.prototype._optimize = function (objective) { - while (true) { - var entering = this._getEnteringSymbol(objective); - if (entering.type() === SymbolType.Invalid) { - return; - } - var leaving = this._getLeavingSymbol(entering); - if (leaving.type() === SymbolType.Invalid) { - throw new Error("the objective is unbounded"); - } - // pivot the entering symbol into the basis - var row = this._rowMap.erase(leaving).second; - row.solveForEx(leaving, entering); - this._substitute(entering, row); - this._rowMap.insert(entering, row); - } - }; - /** - * Optimize the system using the dual of the simplex method. - * - * The current state of the system should be such that the objective - * function is optimal, but not feasible. This method will perform - * an iteration of the dual simplex method to make the solution both - * optimal and feasible. - * - * @private - */ - Solver.prototype._dualOptimize = function () { - var rows = this._rowMap; - var infeasible = this._infeasibleRows; - while (infeasible.length !== 0) { - var leaving = infeasible.pop(); - var pair = rows.find(leaving); - if (pair !== undefined && pair.second.constant() < 0.0) { - var entering = this._getDualEnteringSymbol(pair.second); - if (entering.type() === SymbolType.Invalid) { - throw new Error("dual optimize failed"); - } - // pivot the entering symbol into the basis - var row = pair.second; - rows.erase(leaving); - row.solveForEx(leaving, entering); - this._substitute(entering, row); - rows.insert(entering, row); - } - } - }; - /** - * Compute the entering variable for a pivot operation. - * - * This method will return first symbol in the objective function which - * is non-dummy and has a coefficient less than zero. If no symbol meets - * the criteria, it means the objective function is at a minimum, and an - * invalid symbol is returned. - * - * @private - */ - Solver.prototype._getEnteringSymbol = function (objective) { - var cells = objective.cells(); - for (var i = 0, n = cells.size(); i < n; ++i) { - var pair = cells.itemAt(i); - var symbol = pair.first; - if (pair.second < 0.0 && symbol.type() !== SymbolType.Dummy) { - return symbol; - } - } - return INVALID_SYMBOL; - }; - /** - * Compute the entering symbol for the dual optimize operation. - * - * This method will return the symbol in the row which has a positive - * coefficient and yields the minimum ratio for its respective symbol - * in the objective function. The provided row *must* be infeasible. - * If no symbol is found which meats the criteria, an invalid symbol - * is returned. - * - * @private - */ - Solver.prototype._getDualEnteringSymbol = function (row) { - var ratio = Number.MAX_VALUE; - var entering = INVALID_SYMBOL; - var cells = row.cells(); - for (var i = 0, n = cells.size(); i < n; ++i) { - var pair = cells.itemAt(i); - var symbol = pair.first; - var c = pair.second; - if (c > 0.0 && symbol.type() !== SymbolType.Dummy) { - var coeff = this._objective.coefficientFor(symbol); - var r = coeff / c; - if (r < ratio) { - ratio = r; - entering = symbol; - } - } - } - return entering; - }; - /** - * Compute the symbol for pivot exit row. - * - * This method will return the symbol for the exit row in the row - * map. If no appropriate exit symbol is found, an invalid symbol - * will be returned. This indicates that the objective function is - * unbounded. - * - * @private - */ - Solver.prototype._getLeavingSymbol = function (entering) { - var ratio = Number.MAX_VALUE; - var found = INVALID_SYMBOL; - var rows = this._rowMap; - for (var i = 0, n = rows.size(); i < n; ++i) { - var pair = rows.itemAt(i); - var symbol = pair.first; - if (symbol.type() !== SymbolType.External) { - var row = pair.second; - var temp = row.coefficientFor(entering); - if (temp < 0.0) { - var temp_ratio = -row.constant() / temp; - if (temp_ratio < ratio) { - ratio = temp_ratio; - found = symbol; - } - } - } - } - return found; - }; - /** - * Compute the leaving symbol for a marker variable. - * - * This method will return a symbol corresponding to a basic row - * which holds the given marker variable. The row will be chosen - * according to the following precedence: - * - * 1) The row with a restricted basic varible and a negative coefficient - * for the marker with the smallest ratio of -constant / coefficient. - * - * 2) The row with a restricted basic variable and the smallest ratio - * of constant / coefficient. - * - * 3) The last unrestricted row which contains the marker. - * - * If the marker does not exist in any row, an invalid symbol will be - * returned. This indicates an internal solver error since the marker - * *should* exist somewhere in the tableau. - * - * @private - */ - Solver.prototype._getMarkerLeavingSymbol = function (marker) { - var dmax = Number.MAX_VALUE; - var r1 = dmax; - var r2 = dmax; - var invalid = INVALID_SYMBOL; - var first = invalid; - var second = invalid; - var third = invalid; - var rows = this._rowMap; - for (var i = 0, n = rows.size(); i < n; ++i) { - var pair = rows.itemAt(i); - var row = pair.second; - var c = row.coefficientFor(marker); - if (c === 0.0) { - continue; - } - var symbol = pair.first; - if (symbol.type() === SymbolType.External) { - third = symbol; - } - else if (c < 0.0) { - var r = -row.constant() / c; - if (r < r1) { - r1 = r; - first = symbol; - } - } - else { - var r = row.constant() / c; - if (r < r2) { - r2 = r; - second = symbol; - } - } - } - if (first !== invalid) { - return first; - } - if (second !== invalid) { - return second; - } - return third; - }; - /** - * Remove the effects of a constraint on the objective function. - * - * @private - */ - Solver.prototype._removeConstraintEffects = function (cn, tag) { - if (tag.marker.type() === SymbolType.Error) { - this._removeMarkerEffects(tag.marker, cn.strength()); - } - if (tag.other.type() === SymbolType.Error) { - this._removeMarkerEffects(tag.other, cn.strength()); - } - }; - /** - * Remove the effects of an error marker on the objective function. - * - * @private - */ - Solver.prototype._removeMarkerEffects = function (marker, strength) { - var pair = this._rowMap.find(marker); - if (pair !== undefined) { - this._objective.insertRow(pair.second, -strength); - } - else { - this._objective.insertSymbol(marker, -strength); - } - }; - /** - * Get the first Slack or Error symbol in the row. - * - * If no such symbol is present, an invalid symbol will be returned. - * - * @private - */ - Solver.prototype._anyPivotableSymbol = function (row) { - var cells = row.cells(); - for (var i = 0, n = cells.size(); i < n; ++i) { - var pair = cells.itemAt(i); - var type = pair.first.type(); - if (type === SymbolType.Slack || type === SymbolType.Error) { - return pair.first; - } - } - return INVALID_SYMBOL; - }; - /** - * Returns a new Symbol of the given type. - * - * @private - */ - Solver.prototype._makeSymbol = function (type) { - return new Symbol(type, this._idTick++); - }; - return Solver; - })(); - kiwi.Solver = Solver; - /** - * Test whether a value is approximately zero. - * @private - */ - function nearZero(value) { - var eps = 1.0e-8; - return value < 0.0 ? -value < eps : value < eps; - } - /** - * An internal function for creating a constraint map. - * @private - */ - function createCnMap() { - return kiwi.createMap(kiwi.Constraint.Compare); - } - /** - * An internal function for creating a row map. - * @private - */ - function createRowMap() { - return kiwi.createMap(Symbol.Compare); - } - /** - * An internal function for creating a variable map. - * @private - */ - function createVarMap() { - return kiwi.createMap(kiwi.Variable.Compare); - } - /** - * An internal function for creating an edit map. - * @private - */ - function createEditMap() { - return kiwi.createMap(kiwi.Variable.Compare); - } - /** - * An enum defining the available symbol types. - * @private - */ - var SymbolType; - (function (SymbolType) { - SymbolType[SymbolType["Invalid"] = 0] = "Invalid"; - SymbolType[SymbolType["External"] = 1] = "External"; - SymbolType[SymbolType["Slack"] = 2] = "Slack"; - SymbolType[SymbolType["Error"] = 3] = "Error"; - SymbolType[SymbolType["Dummy"] = 4] = "Dummy"; - })(SymbolType || (SymbolType = {})); - /** - * An internal class representing a symbol in the solver. - * @private - */ - var Symbol = (function () { - /** - * Construct a new Symbol - * - * @param [type] The type of the symbol. - * @param [id] The unique id number of the symbol. - */ - function Symbol(type, id) { - this._id = id; - this._type = type; - } - /** - * The static Symbol comparison function. - */ - Symbol.Compare = function (a, b) { - return a.id() - b.id(); - }; - /** - * Returns the unique id number of the symbol. - */ - Symbol.prototype.id = function () { - return this._id; - }; - /** - * Returns the type of the symbol. - */ - Symbol.prototype.type = function () { - return this._type; - }; - return Symbol; - })(); - /** - * A static invalid symbol - * @private - */ - var INVALID_SYMBOL = new Symbol(SymbolType.Invalid, -1); - /** - * An internal row class used by the solver. - * @private - */ - var Row = (function () { - /** - * Construct a new Row. - */ - function Row(constant) { - if (constant === void 0) { constant = 0.0; } - this._cellMap = kiwi.createMap(Symbol.Compare); - this._constant = constant; - } - /** - * Returns the mapping of symbols to coefficients. - */ - Row.prototype.cells = function () { - return this._cellMap; - }; - /** - * Returns the constant for the row. - */ - Row.prototype.constant = function () { - return this._constant; - }; - /** - * Returns true if the row is a constant value. - */ - Row.prototype.isConstant = function () { - return this._cellMap.empty(); - }; - /** - * Returns true if the Row has all dummy symbols. - */ - Row.prototype.allDummies = function () { - var cells = this._cellMap; - for (var i = 0, n = cells.size(); i < n; ++i) { - var pair = cells.itemAt(i); - if (pair.first.type() !== SymbolType.Dummy) { - return false; - } - } - return true; - }; - /** - * Create a copy of the row. - */ - Row.prototype.copy = function () { - var theCopy = new Row(this._constant); - theCopy._cellMap = this._cellMap.copy(); - return theCopy; - }; - /** - * Add a constant value to the row constant. - * - * Returns the new value of the constant. - */ - Row.prototype.add = function (value) { - return this._constant += value; - }; - /** - * Insert the symbol into the row with the given coefficient. - * - * If the symbol already exists in the row, the coefficient - * will be added to the existing coefficient. If the resulting - * coefficient is zero, the symbol will be removed from the row. - */ - Row.prototype.insertSymbol = function (symbol, coefficient) { - if (coefficient === void 0) { coefficient = 1.0; } - var pair = this._cellMap.setDefault(symbol, function () { return 0.0; }); - if (nearZero(pair.second += coefficient)) { - this._cellMap.erase(symbol); - } - }; - /** - * Insert a row into this row with a given coefficient. - * - * The constant and the cells of the other row will be - * multiplied by the coefficient and added to this row. Any - * cell with a resulting coefficient of zero will be removed - * from the row. - */ - Row.prototype.insertRow = function (other, coefficient) { - if (coefficient === void 0) { coefficient = 1.0; } - this._constant += other._constant * coefficient; - var cells = other._cellMap; - for (var i = 0, n = cells.size(); i < n; ++i) { - var pair = cells.itemAt(i); - this.insertSymbol(pair.first, pair.second * coefficient); - } - }; - /** - * Remove a symbol from the row. - */ - Row.prototype.removeSymbol = function (symbol) { - this._cellMap.erase(symbol); - }; - /** - * Reverse the sign of the constant and cells in the row. - */ - Row.prototype.reverseSign = function () { - this._constant = -this._constant; - var cells = this._cellMap; - for (var i = 0, n = cells.size(); i < n; ++i) { - var pair = cells.itemAt(i); - pair.second = -pair.second; - } - }; - /** - * Solve the row for the given symbol. - * - * This method assumes the row is of the form - * a * x + b * y + c = 0 and (assuming solve for x) will modify - * the row to represent the right hand side of - * x = -b/a * y - c / a. The target symbol will be removed from - * the row, and the constant and other cells will be multiplied - * by the negative inverse of the target coefficient. - * - * The given symbol *must* exist in the row. - */ - Row.prototype.solveFor = function (symbol) { - var cells = this._cellMap; - var pair = cells.erase(symbol); - var coeff = -1.0 / pair.second; - this._constant *= coeff; - for (var i = 0, n = cells.size(); i < n; ++i) { - cells.itemAt(i).second *= coeff; - } - }; - /** - * Solve the row for the given symbols. - * - * This method assumes the row is of the form - * x = b * y + c and will solve the row such that - * y = x / b - c / b. The rhs symbol will be removed from the - * row, the lhs added, and the result divided by the negative - * inverse of the rhs coefficient. - * - * The lhs symbol *must not* exist in the row, and the rhs - * symbol must* exist in the row. - */ - Row.prototype.solveForEx = function (lhs, rhs) { - this.insertSymbol(lhs, -1.0); - this.solveFor(rhs); - }; - /** - * Returns the coefficient for the given symbol. - */ - Row.prototype.coefficientFor = function (symbol) { - var pair = this._cellMap.find(symbol); - return pair !== undefined ? pair.second : 0.0; - }; - /** - * Substitute a symbol with the data from another row. - * - * Given a row of the form a * x + b and a substitution of the - * form x = 3 * y + c the row will be updated to reflect the - * expression 3 * a * y + a * c + b. - * - * If the symbol does not exist in the row, this is a no-op. - */ - Row.prototype.substitute = function (symbol, row) { - var pair = this._cellMap.erase(symbol); - if (pair !== undefined) { - this.insertRow(row, pair.second); - } - }; - return Row; - })(); -})(kiwi || (kiwi = {})); -/*----------------------------------------------------------------------------- -| Copyright (c) 2014, Nucleic Development Team. -| -| Distributed under the terms of the Modified BSD License. -| -| The full license is in the file COPYING.txt, distributed with this software. -|----------------------------------------------------------------------------*/ -/// -/// -/// -/// -/// -/// - -return kiwi; - -})); - -},{}]},{},[1])(1) -}); \ No newline at end of file diff --git a/dist/autolayout.min.js b/dist/autolayout.min.js deleted file mode 100644 index 638b4a6..0000000 --- a/dist/autolayout.min.js +++ /dev/null @@ -1,30 +0,0 @@ -/** -* AutoLayout.js is licensed under the MIT license. If a copy of the -* MIT-license was not distributed with this file, You can obtain one at: -* http://opensource.org/licenses/mit-license.html. -* -* @author: Hein Rutjes (IjzerenHein) -* @license MIT -* @copyright Gloey Apps, 2017 -* -* @library autolayout.js -* @version 0.7.0 -*/ -/** -* Parts Copyright (C) 2011-2012, Alex Russell (slightlyoff@chromium.org) -* Parts Copyright (C) Copyright (C) 1998-2000 Greg J. Badros -* -* Use of this source code is governed by the LGPL, which can be found in the -* COPYING.LGPL file. -*/ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AutoLayout = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o1&&t.constraints.push({view1:"_~"+t.lineIndex+":1~",attr1:t.horizontal?Attribute.WIDTH:Attribute.HEIGHT,relation:t.relation.relation||Relation.EQU,view2:r,attr2:t.horizontal?Attribute.WIDTH:Attribute.HEIGHT,priority:t.relation.priority}),t.equalSpacerIndex++,t.relation.view||t.relation.multiplier&&1!==t.relation.multiplier?(t.constraints.push({view1:r,attr1:t.horizontal?Attribute.WIDTH:Attribute.HEIGHT,relation:t.relation.relation||Relation.EQU,view2:t.relation.view,attr2:t.horizontal?Attribute.WIDTH:Attribute.HEIGHT,priority:t.relation.priority,multiplier:t.relation.multiplier}),t.relation.multiplier=void 0):t.relation.constant&&(t.constraints.push({view1:r,attr1:t.horizontal?Attribute.WIDTH:Attribute.HEIGHT,relation:Relation.EQU,view2:null,attr2:Attribute.CONST,priority:t.relation.priority,constant:t.relation.constant}),t.relation.constant=void 0);for(var i=0;ie&&(kt=0,Rt={line:1,column:1,seenCR:!1}),r(Rt,kt,e),kt=e),Rt}function n(t){StFt&&(Ft=St,Nt=[]),Nt.push(t))}function a(r,n,a){function s(t){var e=1;for(t.sort(function(t,e){return t.descriptione.description?1:0});e1?s.slice(0,-1).join(", ")+" or "+s[t.length-1]:s[0],n=e?'"'+r(e)+'"':"end of input","Expected "+i+" but "+n+" found."}var u=i(a),c=a1?arguments[1]:{},E={},T={visualFormatString:s},V=s,m=E,O=null,H=":",S={type:"literal",value:":",description:'":"'},x=function(t,e,r,i,n){return{orientation:t?t[0]:"horizontal",cascade:(e||[]).concat([r],[].concat.apply([],i),n||[])}},k="H",R={type:"literal",value:"H",description:'"H"'},F="V",N={type:"literal",value:"V",description:'"V"'},L=function(t){return"H"==t?"horizontal":"vertical"},q="|",Z={type:"literal",value:"|",description:'"|"'},D=function(){return{view:null}},z="[",G={type:"literal",value:"[",description:'"["'},X="]",P={type:"literal",value:"]",description:'"]"'},W=function(t,e){return _(t,e?{constraints:e}:{})},Q="-",U={type:"literal",value:"-",description:'"-"'},B=function(t){return t},$=function(){return[{relation:"equ",constant:"default",$parserOffset:r()}]},j="",Y=function(){return[{relation:"equ",constant:0,$parserOffset:r()}]},M=function(t){return[{relation:"equ",constant:t,$parserOffset:r()}]},J="(",K={type:"literal",value:"(",description:'"("'},tt=",",et={type:"literal",value:",",description:'","'},rt=")",it={type:"literal",value:")",description:'")"'},nt=function(t,e){return[t].concat(e.map(function(t){return t[1]}))},at="@",st={type:"literal",value:"@",description:'"@"'},ot=function(t,e,r){return _({relation:"equ"},t||{},e,r?r[1]:{})},ut="==",ct={type:"literal",value:"==",description:'"=="'},lt=function(){return{relation:"equ",$parserOffset:r()}},ht="<=",pt={type:"literal",value:"<=",description:'"<="'},ft=function(){return{relation:"leq",$parserOffset:r()}},vt=">=",dt={type:"literal",value:">=",description:'">="'},At=function(){return{relation:"geq",$parserOffset:r()}},gt=/^[0-9]/,bt={type:"class",value:"[0-9]",description:"[0-9]"},wt=function(t){return{priority:parseInt(t.join(""),10)}},yt=function(t){return{constant:t}},_t=/^[a-zA-Z_]/,Ct={type:"class",value:"[a-zA-Z_]",description:"[a-zA-Z_]"},It=/^[a-zA-Z0-9_]/,Et={type:"class",value:"[a-zA-Z0-9_]",description:"[a-zA-Z0-9_]"},Tt=function(t,e){return{view:t+e}},Vt=".",mt={type:"literal",value:".",description:'"."'},Ot=function(t,e){return parseFloat(t.concat(".").concat(e).join(""),10)},Ht=function(t){return parseInt(t.join(""),10)},St=0,xt=0,kt=0,Rt={line:1,column:1,seenCR:!1},Ft=0,Nt=[],Lt=0;if("startRule"in I){if(!(I.startRule in T))throw new Error("Can't start parsing from rule \""+I.startRule+'".');V=T[I.startRule]}if(C=V(),C!==E&&St===t.length)return C;throw C!==E&&Ste&&(gr=0,br={line:1,column:1,seenCR:!1}),r(br,gr,e),gr=e),br}function n(t){drwr&&(wr=dr,yr=[]),yr.push(t))}function a(r,n,a){function s(t){var e=1;for(t.sort(function(t,e){return t.descriptione.description?1:0});e1?s.slice(0,-1).join(", ")+" or "+s[t.length-1]:s[0],n=e?'"'+r(e)+'"':"end of input","Expected "+i+" but "+n+" found."}var u=i(a),c=adr?(s=t.charAt(dr),dr++):(s=D,0===_r&&n(ft));s!==D;)a.push(s),t.length>dr?(s=t.charAt(dr),dr++):(s=D,0===_r&&n(ft));a!==D?(r=[r,i,a],e=r):(dr=e,e=X)}else dr=e,e=X;else dr=e,e=X;return e}function p(){var e,r;return e=dr,124===t.charCodeAt(dr)?(r=vt,dr++):(r=D,0===_r&&n(dt)),r!==D&&(Ar=e,r=At()),e=r}function f(){var e,r,i,a,s,o,u;if(e=dr,91===t.charCodeAt(dr)?(r=gt,dr++):(r=D,0===_r&&n(bt)),r!==D)if(i=v(),i!==D){for(a=[],s=dr,44===t.charCodeAt(dr)?(o=wt,dr++):(o=D,0===_r&&n(yt)),o!==D?(u=v(),u!==D?(o=[o,u],s=o):(dr=s,s=X)):(dr=s,s=X);s!==D;)a.push(s),s=dr,44===t.charCodeAt(dr)?(o=wt,dr++):(o=D,0===_r&&n(yt)),o!==D?(u=v(),u!==D?(o=[o,u],s=o):(dr=s,s=X)):(dr=s,s=X);a!==D?(93===t.charCodeAt(dr)?(s=_t,dr++):(s=D,0===_r&&n(Ct)),s!==D?(Ar=e,r=It(i,a),e=r):(dr=e,e=X)):(dr=e,e=X)}else dr=e,e=X;else dr=e,e=X;return e}function v(){var t,e,r,i;return t=dr,e=k(),e!==D?(r=w(),r===D&&(r=Q),r!==D?(i=d(),i===D&&(i=Q),i!==D?(Ar=t,e=Et(e,r,i),t=e):(dr=t,t=X)):(dr=t,t=X)):(dr=t,t=X),t}function d(){var e,r,i,a,s,o;if(e=dr,58===t.charCodeAt(dr)?(r=$,dr++):(r=D,0===_r&&n(j)),r!==D){if(i=[],a=dr,s=A(),s!==D?(o=f(),o!==D?(s=[s,o],a=s):(dr=a,a=X)):(dr=a,a=X),a!==D)for(;a!==D;)i.push(a),a=dr,s=A(),s!==D?(o=f(),o!==D?(s=[s,o],a=s):(dr=a,a=X)):(dr=a,a=X);else i=X;i!==D?(a=A(),a!==D?(Ar=e,r=Tt(i,a),e=r):(dr=e,e=X)):(dr=e,e=X)}else dr=e,e=X;return e}function A(){var e,r,i,a;return e=dr,t.substr(dr,2)===Vt?(r=Vt,dr+=2):(r=D,0===_r&&n(mt)),r!==D&&(Ar=e,r=Ot()),e=r,e===D&&(e=dr,45===t.charCodeAt(dr)?(r=Ht,dr++):(r=D,0===_r&&n(St)),r!==D?(i=g(),i!==D?(45===t.charCodeAt(dr)?(a=Ht,dr++):(a=D,0===_r&&n(St)),a!==D?(Ar=e,r=xt(i),e=r):(dr=e,e=X)):(dr=e,e=X)):(dr=e,e=X),e===D&&(e=dr,45===t.charCodeAt(dr)?(r=Ht,dr++):(r=D,0===_r&&n(St)),r!==D&&(Ar=e,r=kt()),e=r,e===D&&(e=dr,126===t.charCodeAt(dr)?(r=Rt,dr++):(r=D,0===_r&&n(Ft)),r!==D?(i=_(),i!==D?(126===t.charCodeAt(dr)?(a=Rt,dr++):(a=D,0===_r&&n(Ft)),a!==D?(Ar=e,r=xt(i),e=r):(dr=e,e=X)):(dr=e,e=X)):(dr=e,e=X),e===D&&(e=dr,126===t.charCodeAt(dr)?(r=Rt,dr++):(r=D,0===_r&&n(Ft)),r!==D&&(Ar=e,r=Nt()),e=r,e===D&&(e=dr,r=Lt,r!==D&&(Ar=e,r=qt()),e=r))))),e}function g(){var t;return t=b(),t===D&&(t=w()),t}function b(){var t,e;return t=dr,e=m(),e!==D&&(Ar=t,e=Zt(e)),t=e,t===D&&(t=dr,e=N(),e!==D&&(Ar=t,e=Dt(e)),t=e),t}function w(){var e,r,i,a,s,o,u;if(e=dr,40===t.charCodeAt(dr)?(r=zt,dr++):(r=D,0===_r&&n(Gt)),r!==D)if(i=y(),i!==D){for(a=[],s=dr,44===t.charCodeAt(dr)?(o=wt,dr++):(o=D,0===_r&&n(yt)),o!==D?(u=y(),u!==D?(o=[o,u],s=o):(dr=s,s=X)):(dr=s,s=X);s!==D;)a.push(s),s=dr,44===t.charCodeAt(dr)?(o=wt,dr++):(o=D,0===_r&&n(yt)),o!==D?(u=y(),u!==D?(o=[o,u],s=o):(dr=s,s=X)):(dr=s,s=X);a!==D?(41===t.charCodeAt(dr)?(s=Xt,dr++):(s=D,0===_r&&n(Pt)),s!==D?(Ar=e,r=Wt(i,a),e=r):(dr=e,e=X)):(dr=e,e=X)}else dr=e,e=X;else dr=e,e=X;return e}function y(){var e,r,i,a,s,o;return e=dr,r=I(),r===D&&(r=Q),r!==D?(i=E(),i!==D?(a=dr,64===t.charCodeAt(dr)?(s=Qt,dr++):(s=D,0===_r&&n(Ut)),s!==D?(o=T(),o!==D?(s=[s,o],a=s):(dr=a,a=X)):(dr=a,a=X),a===D&&(a=Q),a!==D?(Ar=e,r=Bt(r,i,a),e=r):(dr=e,e=X)):(dr=e,e=X)):(dr=e,e=X),e}function _(){var e,r,i,a,s,o,u;if(e=dr,40===t.charCodeAt(dr)?(r=zt,dr++):(r=D,0===_r&&n(Gt)),r!==D)if(i=C(),i!==D){for(a=[],s=dr,44===t.charCodeAt(dr)?(o=wt,dr++):(o=D,0===_r&&n(yt)),o!==D?(u=C(),u!==D?(o=[o,u],s=o):(dr=s,s=X)):(dr=s,s=X);s!==D;)a.push(s),s=dr,44===t.charCodeAt(dr)?(o=wt,dr++):(o=D,0===_r&&n(yt)),o!==D?(u=C(),u!==D?(o=[o,u],s=o):(dr=s,s=X)):(dr=s,s=X);a!==D?(41===t.charCodeAt(dr)?(s=Xt,dr++):(s=D,0===_r&&n(Pt)),s!==D?(Ar=e,r=Wt(i,a),e=r):(dr=e,e=X)):(dr=e,e=X)}else dr=e,e=X;else dr=e,e=X;return e}function C(){var e,r,i,a,s,o;return e=dr,r=I(),r===D&&(r=Q),r!==D?(i=E(),i!==D?(a=dr,64===t.charCodeAt(dr)?(s=Qt,dr++):(s=D,0===_r&&n(Ut)),s!==D?(o=T(),o!==D?(s=[s,o],a=s):(dr=a,a=X)):(dr=a,a=X),a===D&&(a=Q),a!==D?(Ar=e,r=$t(r,i,a),e=r):(dr=e,e=X)):(dr=e,e=X)):(dr=e,e=X),e}function I(){var e,r;return e=dr,t.substr(dr,2)===jt?(r=jt,dr+=2):(r=D,0===_r&&n(Yt)),r!==D&&(Ar=e,r=Mt()),e=r,e===D&&(e=dr,t.substr(dr,2)===Jt?(r=Jt,dr+=2):(r=D,0===_r&&n(Kt)),r!==D&&(Ar=e,r=te()),e=r,e===D&&(e=dr,t.substr(dr,2)===ee?(r=ee,dr+=2):(r=D,0===_r&&n(re)),r!==D&&(Ar=e,r=ie()),e=r)),e}function E(){var t;return t=m(),t===D&&(t=V(),t===D&&(t=O())),t}function T(){var e,r,i;if(e=dr,r=[],ne.test(t.charAt(dr))?(i=t.charAt(dr),dr++):(i=D,0===_r&&n(ae)),i!==D)for(;i!==D;)r.push(i),ne.test(t.charAt(dr))?(i=t.charAt(dr),dr++):(i=D,0===_r&&n(ae));else r=X;return r!==D&&(Ar=e,r=se(r)),e=r}function V(){var e,r,i;return e=dr,r=N(),r!==D&&(Ar=e,r=oe(r)),e=r,e===D&&(e=dr,45===t.charCodeAt(dr)?(r=Ht,dr++):(r=D,0===_r&&n(St)),r!==D?(i=N(),i!==D?(Ar=e,r=ue(i),e=r):(dr=e,e=X)):(dr=e,e=X),e===D&&(e=dr,43===t.charCodeAt(dr)?(r=ce,dr++):(r=D,0===_r&&n(le)),r!==D?(i=N(),i!==D?(Ar=e,r=oe(i),e=r):(dr=e,e=X)):(dr=e,e=X))),e}function m(){var e,r,i,a;return e=dr,r=N(),r!==D?(37===t.charCodeAt(dr)?(i=he,dr++):(i=D,0===_r&&n(pe)),i!==D?(Ar=e,r=fe(r),e=r):(dr=e,e=X)):(dr=e,e=X),e===D&&(e=dr,45===t.charCodeAt(dr)?(r=Ht,dr++):(r=D,0===_r&&n(St)),r!==D?(i=N(),i!==D?(37===t.charCodeAt(dr)?(a=he,dr++):(a=D,0===_r&&n(pe)),a!==D?(Ar=e,r=ve(i),e=r):(dr=e,e=X)):(dr=e,e=X)):(dr=e,e=X),e===D&&(e=dr,43===t.charCodeAt(dr)?(r=ce,dr++):(r=D,0===_r&&n(le)),r!==D?(i=N(),i!==D?(37===t.charCodeAt(dr)?(a=he,dr++):(a=D,0===_r&&n(pe)),a!==D?(Ar=e,r=fe(i),e=r):(dr=e,e=X)):(dr=e,e=X)):(dr=e,e=X))),e}function O(){var t,e,r,i,n;return t=dr,e=R(),e!==D?(r=H(),r===D&&(r=Q),r!==D?(i=S(),i===D&&(i=Q),i!==D?(n=x(),n===D&&(n=Q),n!==D?(Ar=t,e=de(e,r,i,n),t=e):(dr=t,t=X)):(dr=t,t=X)):(dr=t,t=X)):(dr=t,t=X),t}function H(){var e,r;return e=dr,t.substr(dr,5)===Ae?(r=Ae,dr+=5):(r=D,0===_r&&n(ge)),r!==D&&(Ar=e,r=be()),e=r,e===D&&(e=dr,t.substr(dr,6)===we?(r=we,dr+=6):(r=D,0===_r&&n(ye)),r!==D&&(Ar=e,r=_e()),e=r,e===D&&(e=dr,t.substr(dr,4)===Ce?(r=Ce,dr+=4):(r=D,0===_r&&n(Ie)),r!==D&&(Ar=e,r=Ee()),e=r,e===D&&(e=dr,t.substr(dr,7)===Te?(r=Te,dr+=7):(r=D,0===_r&&n(Ve)),r!==D&&(Ar=e,r=me()),e=r,e===D&&(e=dr,t.substr(dr,6)===Oe?(r=Oe,dr+=6):(r=D,0===_r&&n(He)),r!==D&&(Ar=e,r=Se()),e=r,e===D&&(e=dr,t.substr(dr,7)===xe?(r=xe,dr+=7):(r=D,0===_r&&n(ke)),r!==D&&(Ar=e,r=Re()),e=r,e===D&&(e=dr,t.substr(dr,8)===Fe?(r=Fe,dr+=8):(r=D,0===_r&&n(Ne)),r!==D&&(Ar=e,r=Le()),e=r,e===D&&(e=dr,t.substr(dr,8)===qe?(r=qe,dr+=8):(r=D,0===_r&&n(Ze)),r!==D&&(Ar=e,r=De()),e=r))))))),e}function S(){var e,r,i;return e=dr,47===t.charCodeAt(dr)?(r=ze,dr++):(r=D,0===_r&&n(Ge)),r!==D?(i=N(),i!==D?(Ar=e,r=Xe(i),e=r):(dr=e,e=X)):(dr=e,e=X),e===D&&(e=dr,t.substr(dr,2)===Pe?(r=Pe,dr+=2):(r=D,0===_r&&n(We)),r!==D?(i=N(),i!==D?(Ar=e,r=Xe(i),e=r):(dr=e,e=X)):(dr=e,e=X),e===D&&(e=dr,t.substr(dr,2)===Qe?(r=Qe,dr+=2):(r=D,0===_r&&n(Ue)),r!==D?(i=N(),i!==D?(Ar=e,r=Be(i),e=r):(dr=e,e=X)):(dr=e,e=X),e===D&&(e=dr,42===t.charCodeAt(dr)?(r=$e,dr++):(r=D,0===_r&&n(je)),r!==D?(i=N(),i!==D?(Ar=e,r=Ye(i),e=r):(dr=e,e=X)):(dr=e,e=X),e===D&&(e=dr,t.substr(dr,2)===Me?(r=Me,dr+=2):(r=D,0===_r&&n(Je)),r!==D?(i=N(),i!==D?(Ar=e,r=Ye(i),e=r):(dr=e,e=X)):(dr=e,e=X),e===D&&(e=dr,t.substr(dr,2)===Ke?(r=Ke,dr+=2):(r=D,0===_r&&n(tr)),r!==D?(i=N(),i!==D?(Ar=e,r=er(i),e=r):(dr=e,e=X)):(dr=e,e=X)))))),e}function x(){var e,r,i;return e=dr,45===t.charCodeAt(dr)?(r=Ht,dr++):(r=D,0===_r&&n(St)),r!==D?(i=N(),i!==D?(Ar=e,r=er(i),e=r):(dr=e,e=X)):(dr=e,e=X),e===D&&(e=dr,43===t.charCodeAt(dr)?(r=ce,dr++):(r=D,0===_r&&n(le)),r!==D?(i=N(),i!==D?(Ar=e,r=Ye(i),e=r):(dr=e,e=X)):(dr=e,e=X)),e}function k(){var e,r,i,a,s;if(e=dr,r=dr,i=[],rr.test(t.charAt(dr))?(a=t.charAt(dr),dr++):(a=D,0===_r&&n(ir)),a!==D)for(;a!==D;)i.push(a),rr.test(t.charAt(dr))?(a=t.charAt(dr),dr++):(a=D,0===_r&&n(ir));else i=X;if(i!==D&&(i=t.substring(r,dr)),r=i,r!==D){for(i=dr,a=[],nr.test(t.charAt(dr))?(s=t.charAt(dr),dr++):(s=D,0===_r&&n(ar));s!==D;)a.push(s),nr.test(t.charAt(dr))?(s=t.charAt(dr),dr++):(s=D,0===_r&&n(ar));a!==D&&(a=t.substring(i,dr)),i=a,i!==D?(a=F(),a!==D?(Ar=e,r=sr(r,i,a),e=r):(dr=e,e=X)):(dr=e,e=X)}else dr=e,e=X;if(e===D){if(e=dr,r=dr,i=[],rr.test(t.charAt(dr))?(a=t.charAt(dr),dr++):(a=D,0===_r&&n(ir)),a!==D)for(;a!==D;)i.push(a),rr.test(t.charAt(dr))?(a=t.charAt(dr),dr++):(a=D,0===_r&&n(ir));else i=X;if(i!==D&&(i=t.substring(r,dr)),r=i,r!==D){for(i=dr,a=[],nr.test(t.charAt(dr))?(s=t.charAt(dr),dr++):(s=D,0===_r&&n(ar));s!==D;)a.push(s),nr.test(t.charAt(dr))?(s=t.charAt(dr),dr++):(s=D,0===_r&&n(ar));a!==D&&(a=t.substring(i,dr)),i=a,i!==D?(Ar=e,r=or(r,i),e=r):(dr=e,e=X)}else dr=e,e=X}return e}function R(){var e,r,i,a,s;if(e=dr,r=dr,i=[],rr.test(t.charAt(dr))?(a=t.charAt(dr),dr++):(a=D,0===_r&&n(ir)),a!==D)for(;a!==D;)i.push(a),rr.test(t.charAt(dr))?(a=t.charAt(dr),dr++):(a=D,0===_r&&n(ir));else i=X;if(i!==D&&(i=t.substring(r,dr)),r=i,r!==D){for(i=dr,a=[],nr.test(t.charAt(dr))?(s=t.charAt(dr),dr++):(s=D,0===_r&&n(ar));s!==D;)a.push(s),nr.test(t.charAt(dr))?(s=t.charAt(dr),dr++):(s=D,0===_r&&n(ar));a!==D&&(a=t.substring(i,dr)),i=a,i!==D?(Ar=e,r=or(r,i),e=r):(dr=e,e=X)}else dr=e,e=X;return e}function F(){var e,r,i,a;if(e=dr,t.substr(dr,2)===ur?(r=ur,dr+=2):(r=D,0===_r&&n(cr)),r!==D){if(i=[],ne.test(t.charAt(dr))?(a=t.charAt(dr),dr++):(a=D,0===_r&&n(ae)),a!==D)for(;a!==D;)i.push(a),ne.test(t.charAt(dr))?(a=t.charAt(dr),dr++):(a=D,0===_r&&n(ae));else i=X;i!==D?(Ar=e,r=lr(i),e=r):(dr=e,e=X)}else dr=e,e=X;return e}function N(){var e,r,i,a,s;if(e=dr,r=[],ne.test(t.charAt(dr))?(i=t.charAt(dr),dr++):(i=D,0===_r&&n(ae)),i!==D)for(;i!==D;)r.push(i),ne.test(t.charAt(dr))?(i=t.charAt(dr),dr++):(i=D,0===_r&&n(ae));else r=X;if(r!==D)if(46===t.charCodeAt(dr)?(i=hr,dr++):(i=D,0===_r&&n(pr)),i!==D){if(a=[],ne.test(t.charAt(dr))?(s=t.charAt(dr),dr++):(s=D,0===_r&&n(ae)),s!==D)for(;s!==D;)a.push(s),ne.test(t.charAt(dr))?(s=t.charAt(dr),dr++):(s=D,0===_r&&n(ae));else a=X;a!==D?(Ar=e,r=fr(r,a),e=r):(dr=e,e=X)}else dr=e,e=X;else dr=e,e=X;if(e===D){if(e=dr,r=[],ne.test(t.charAt(dr))?(i=t.charAt(dr),dr++):(i=D,0===_r&&n(ae)),i!==D)for(;i!==D;)r.push(i),ne.test(t.charAt(dr))?(i=t.charAt(dr),dr++):(i=D,0===_r&&n(ae));else r=X;r!==D&&(Ar=e,r=vr(r)),e=r}return e}function L(t){for(var e=1;e1?arguments[1]:{},D={},z={visualFormatStringExt:s},G=s,X=D,P="C:",W={type:"literal",value:"C:",description:'"C:"'},Q=null,U=function(t,e,r,i){return{type:"attribute",view:t.view,attributes:[e].concat(r)}},B=function(t,e){return{attr:t,predicates:e}},$=":",j={type:"literal",value:":",description:'":"'},Y=function(t,e,r,i,n,a){return{type:"vfl",orientation:t?t[0]:"horizontal",cascade:(e||[]).concat(r,[].concat.apply([],i),n||[])}},M="HV",J={type:"literal",value:"HV",description:'"HV"'},K=function(){return"horzvert"},tt="H",et={type:"literal",value:"H",description:'"H"'},rt=function(){return"horizontal"},it="V",nt={type:"literal",value:"V",description:'"V"'},at=function(){return"vertical"},st="Z",ot={type:"literal",value:"Z",description:'"Z"'},ut=function(){return"zIndex"},ct=" ",lt={type:"literal",value:" ",description:'" "'},ht="//",pt={type:"literal",value:"//",description:'"//"'},ft={type:"any",description:"any character"},vt="|",dt={type:"literal",value:"|",description:'"|"'},At=function(){return{view:null}},gt="[",bt={type:"literal",value:"[",description:'"["'},wt=",",yt={type:"literal",value:",",description:'","'},_t="]",Ct={type:"literal", -value:"]",description:'"]"'},It=function(t,e){return e.length?[t].concat([].concat.apply([],e)):t},Et=function(t,e,r){return L(L(t,e?{constraints:e}:{}),r?{cascade:r}:{})},Tt=function(t,e){return[].concat([].concat.apply([],t),[e])},Vt="->",mt={type:"literal",value:"->",description:'"->"'},Ot=function(){return[{relation:"none"}]},Ht="-",St={type:"literal",value:"-",description:'"-"'},xt=function(t){return t},kt=function(){return[{relation:"equ",constant:"default"}]},Rt="~",Ft={type:"literal",value:"~",description:'"~"'},Nt=function(){return[{relation:"equ",equalSpacing:!0}]},Lt="",qt=function(){return[{relation:"equ",constant:0}]},Zt=function(t){return[{relation:"equ",multiplier:t.multiplier}]},Dt=function(t){return[{relation:"equ",constant:t}]},zt="(",Gt={type:"literal",value:"(",description:'"("'},Xt=")",Pt={type:"literal",value:")",description:'")"'},Wt=function(t,e){return[t].concat(e.map(function(t){return t[1]}))},Qt="@",Ut={type:"literal",value:"@",description:'"@"'},Bt=function(t,e,r){return L({relation:"equ"},t||{},e,r?r[1]:{})},$t=function(t,e,r){return L({relation:"equ",equalSpacing:!0},t||{},e,r?r[1]:{})},jt="==",Yt={type:"literal",value:"==",description:'"=="'},Mt=function(){return{relation:"equ"}},Jt="<=",Kt={type:"literal",value:"<=",description:'"<="'},te=function(){return{relation:"leq"}},ee=">=",re={type:"literal",value:">=",description:'">="'},ie=function(){return{relation:"geq"}},ne=/^[0-9]/,ae={type:"class",value:"[0-9]",description:"[0-9]"},se=function(t){return{priority:parseInt(t.join(""),10)}},oe=function(t){return{constant:t}},ue=function(t){return{constant:-t}},ce="+",le={type:"literal",value:"+",description:'"+"'},he="%",pe={type:"literal",value:"%",description:'"%"'},fe=function(t){return{view:null,multiplier:t/100}},ve=function(t){return{view:null,multiplier:t/-100}},de=function(t,e,r,i){return{view:t.view,attribute:e?e:void 0,multiplier:r?r:1,constant:i?i:void 0}},Ae=".left",ge={type:"literal",value:".left",description:'".left"'},be=function(){return"left"},we=".right",ye={type:"literal",value:".right",description:'".right"'},_e=function(){return"right"},Ce=".top",Ie={type:"literal",value:".top",description:'".top"'},Ee=function(){return"top"},Te=".bottom",Ve={type:"literal",value:".bottom",description:'".bottom"'},me=function(){return"bottom"},Oe=".width",He={type:"literal",value:".width",description:'".width"'},Se=function(){return"width"},xe=".height",ke={type:"literal",value:".height",description:'".height"'},Re=function(){return"height"},Fe=".centerX",Ne={type:"literal",value:".centerX",description:'".centerX"'},Le=function(){return"centerX"},qe=".centerY",Ze={type:"literal",value:".centerY",description:'".centerY"'},De=function(){return"centerY"},ze="/",Ge={type:"literal",value:"/",description:'"/"'},Xe=function(t){return 1/t},Pe="/+",We={type:"literal",value:"/+",description:'"/+"'},Qe="/-",Ue={type:"literal",value:"/-",description:'"/-"'},Be=function(t){return-1/t},$e="*",je={type:"literal",value:"*",description:'"*"'},Ye=function(t){return t},Me="*+",Je={type:"literal",value:"*+",description:'"*+"'},Ke="*-",tr={type:"literal",value:"*-",description:'"*-"'},er=function(t){return-t},rr=/^[a-zA-Z_]/,ir={type:"class",value:"[a-zA-Z_]",description:"[a-zA-Z_]"},nr=/^[a-zA-Z0-9_]/,ar={type:"class",value:"[a-zA-Z0-9_]",description:"[a-zA-Z0-9_]"},sr=function(t,e,i){return{view:t+e,range:i,$parserOffset:r()}},or=function(t,e){return{view:t+e,$parserOffset:r()}},ur="..",cr={type:"literal",value:"..",description:'".."'},lr=function(t){return parseInt(t)},hr=".",pr={type:"literal",value:".",description:'"."'},fr=function(t,e){return parseFloat(t.concat(".").concat(e).join(""),10)},vr=function(t){return parseInt(t.join(""),10)},dr=0,Ar=0,gr=0,br={line:1,column:1,seenCR:!1},wr=0,yr=[],_r=0;if("startRule"in Z){if(!(Z.startRule in z))throw new Error("Can't start parsing from rule \""+Z.startRule+'".');G=z[Z.startRule]}if(q=G(),q!==D&&dr===t.length)return q;throw q!==D&&dr1?A[1]:""}else 0===c.indexOf("//"+f+":")&&(a[p]=c.substring(3+f.length))}if(a.viewport){var w=a.viewport,y=w["aspect-ratio"];y&&(y=y.split("/"),w["aspect-ratio"]=parseInt(y[0])/parseInt(y[1])),void 0!==w.height&&(w.height="intrinsic"===w.height||parseInt(w.height)),void 0!==w.width&&(w.width="intrinsic"===w.width||parseInt(w.width)),void 0!==w["max-height"]&&(w["max-height"]=parseInt(w["max-height"])),void 0!==w["max-width"]&&(w["max-width"]=parseInt(w["max-width"])),void 0!==w["min-height"]&&(w["min-height"]=parseInt(w["min-height"])),void 0!==w["min-width"]&&(w["min-width"]=parseInt(w["min-width"]))}if(a.widths)for(n in a.widths){var _="intrinsic"===a.widths[n]||parseInt(a.widths[n]);a.widths[n]=_,(void 0===_||isNaN(_))&&delete a.widths[n]}if(a.heights)for(n in a.heights){var C="intrinsic"===a.heights[n]||parseInt(a.heights[n]);a.heights[n]=C,(void 0===C||isNaN(C))&&delete a.heights[n]}if(a.spacing){var I=JSON.parse(a.spacing);if(a.spacing=I,Array.isArray(I)){for(var E=0,T=I.length;EMath.abs(r):0==r?i>Math.abs(n):Math.abs(n-r)64||this._deleted>this._compactThreshold&&(this._compact(),this._deleted=0)},delete:function(t){t=e(t),this._store.hasOwnProperty(t)&&(this._deleted++,delete this._store[t],this.size>0&&this.size--)},each:function(t,e){if(this.size){this._perhapsCompact();var n=this._store,i=this._keyStrMap;Object.keys(this._store).forEach(function(r){t.call(e||null,i[r],n[r])},this)}},escapingEach:function(t,e){if(this.size){this._perhapsCompact();for(var n=this,r=this._store,s=this._keyStrMap,a=i,l=Object.keys(r),o=0;l.length>o;o++)if(function(i){n._store.hasOwnProperty(i)&&(a=t.call(e||null,s[i],r[i]))}(l[o]),a){if(void 0!==a.retval)return a;if(a.brk)break}}},clone:function(){var e=new t.HashTable;return this.size&&(e.size=this.size,n(this._store,e._store),n(this._keyStrMap,e._keyStrMap)),e},equals:function(e){if(e===this)return!0;if(!(e instanceof t.HashTable)||e._size!==this._size)return!1;for(var n=Object.keys(this._store),i=0;n.length>i;i++){var r=n[i];if(this._keyStrMap[r]!==e._keyStrMap[r]||this._store[r]!==e._store[r])return!1}return!0},toString:function(){var t="";return this.each(function(e,n){t+=e+" => "+n+"\n"}),t}})}(this.c||module.parent.exports||{}),function(t){"use strict";t.HashSet=t.inherit({_t:"c.HashSet",initialize:function(){this.storage=[],this.size=0},add:function(t){var e=this.storage;e.indexOf(t),-1==e.indexOf(t)&&e.push(t),this.size=this.storage.length},values:function(){return this.storage},has:function(t){var e=this.storage;return-1!=e.indexOf(t)},delete:function(t){var e=this.storage.indexOf(t);return-1==e?null:(this.storage.splice(e,1)[0],void(this.size=this.storage.length))},clear:function(){this.storage.length=0},each:function(t,e){this.size&&this.storage.forEach(t,e)},escapingEach:function(t,e){this.size&&this.storage.forEach(t,e)},toString:function(){var t=this.size+" {",e=!0;return this.each(function(n){e?e=!1:t+=", ",t+=n}),t+="}\n"},toJSON:function(){var t=[];return this.each(function(e){t.push(e.toJSON())}),{_t:"c.HashSet",data:t}},fromJSON:function(e){var n=new t.HashSet;return e.data&&(n.size=e.data.length,n.storage=e.data),n}})}(this.c||module.parent.exports||{}),function(t){"use strict";t.Error=t.inherit({initialize:function(t){t&&(this._description=t)},_name:"c.Error",_description:"An error has occured in Cassowary",set description(t){this._description=t},get description(){return"("+this._name+") "+this._description},get message(){return this.description},toString:function(){return this.description}});var e=function(e,n){return t.inherit({extends:t.Error,initialize:function(){t.Error.apply(this,arguments)},_name:e||"",_description:n||""})};t.ConstraintNotFound=e("c.ConstraintNotFound","Tried to remove a constraint never added to the tableu"),t.InternalError=e("c.InternalError"),t.NonExpression=e("c.NonExpression","The resulting expression would be non"),t.NotEnoughStays=e("c.NotEnoughStays","There are not enough stays to give specific values to every variable"),t.RequiredFailure=e("c.RequiredFailure","A required constraint cannot be satisfied"),t.TooDifficult=e("c.TooDifficult","The constraints are too difficult to solve")}(this.c||module.parent.exports||{}),function(t){"use strict";var e=1e3;t.SymbolicWeight=t.inherit({_t:"c.SymbolicWeight",initialize:function(){this.value=0;for(var t=1,n=arguments.length-1;n>=0;--n)this.value+=arguments[n]*t,t*=e},toJSON:function(){return{_t:this._t,value:this.value}}})}(this.c||module.parent.exports||{}),function(t){t.Strength=t.inherit({initialize:function(e,n,i,r){this.name=e,this.symbolicWeight=n instanceof t.SymbolicWeight?n:new t.SymbolicWeight(n,i,r)},get required(){return this===t.Strength.required},toString:function(){return this.name+(this.isRequired?"":":"+this.symbolicWeight)}}),t.Strength.required=new t.Strength("",1e3,1e3,1e3),t.Strength.strong=new t.Strength("strong",1,0,0),t.Strength.medium=new t.Strength("medium",0,1,0),t.Strength.weak=new t.Strength("weak",0,0,1)}(this.c||("undefined"!=typeof module?module.parent.exports.c:{})),function(t){"use strict";t.AbstractVariable=t.inherit({isDummy:!1,isExternal:!1,isPivotable:!1,isRestricted:!1,_init:function(e,n){this.hashCode=t._inc(),this.name=(n||"")+this.hashCode,e&&(void 0!==e.name&&(this.name=e.name),void 0!==e.value&&(this.value=e.value),void 0!==e.prefix&&(this._prefix=e.prefix))},_prefix:"",name:"",value:0,toJSON:function(){var t={};return this._t&&(t._t=this._t),this.name&&(t.name=this.name),void 0!==this.value&&(t.value=this.value),this._prefix&&(t._prefix=this._prefix),this._t&&(t._t=this._t),t},fromJSON:function(e,n){var i=new n;return t.extend(i,e),i},toString:function(){return this._prefix+"["+this.name+":"+this.value+"]"}}),t.Variable=t.inherit({_t:"c.Variable",extends:t.AbstractVariable,initialize:function(e){this._init(e,"v");var n=t.Variable._map;n&&(n[this.name]=this)},isExternal:!0}),t.DummyVariable=t.inherit({_t:"c.DummyVariable",extends:t.AbstractVariable,initialize:function(t){this._init(t,"d")},isDummy:!0,isRestricted:!0,value:"dummy"}),t.ObjectiveVariable=t.inherit({_t:"c.ObjectiveVariable",extends:t.AbstractVariable,initialize:function(t){this._init(t,"o")},value:"obj"}),t.SlackVariable=t.inherit({_t:"c.SlackVariable",extends:t.AbstractVariable,initialize:function(t){this._init(t,"s")},isPivotable:!0,isRestricted:!0,value:"slack"})}(this.c||module.parent.exports||{}),function(t){"use strict";t.Point=t.inherit({initialize:function(e,n,i){if(e instanceof t.Variable)this._x=e;else{var r={value:e};i&&(r.name="x"+i),this._x=new t.Variable(r)}if(n instanceof t.Variable)this._y=n;else{var s={value:n};i&&(s.name="y"+i),this._y=new t.Variable(s)}},get x(){return this._x},set x(e){e instanceof t.Variable?this._x=e:this._x.value=e},get y(){return this._y},set y(e){e instanceof t.Variable?this._y=e:this._y.value=e},toString:function(){return"("+this.x+", "+this.y+")"}})}(this.c||module.parent.exports||{}),function(t){"use strict";t.Expression=t.inherit({initialize:function(e,n,i){t.GC&&console.log("new c.Expression"),this.constant="number"!=typeof i||isNaN(i)?0:i,this.terms=new t.HashTable,e instanceof t.AbstractVariable?this.setVariable(e,"number"==typeof n?n:1):"number"==typeof e&&(isNaN(e)?console.trace():this.constant=e)},initializeFromHash:function(e,n){return t.verbose&&(console.log("*******************************"),console.log("clone c.initializeFromHash"),console.log("*******************************")),t.GC&&console.log("clone c.Expression"),this.constant=e,this.terms=n.clone(),this},multiplyMe:function(t){this.constant*=t;var e=this.terms;return e.each(function(n,i){e.set(n,i*t)}),this},clone:function(){t.verbose&&(console.log("*******************************"),console.log("clone c.Expression"),console.log("*******************************"));var e=new t.Expression;return e.initializeFromHash(this.constant,this.terms),e},times:function(e){if("number"==typeof e)return this.clone().multiplyMe(e);if(this.isConstant)return e.times(this.constant);if(e.isConstant)return this.times(e.constant);throw new t.NonExpression},plus:function(e){return e instanceof t.Expression?this.clone().addExpression(e,1):e instanceof t.Variable?this.clone().addVariable(e,1):void 0},minus:function(e){return e instanceof t.Expression?this.clone().addExpression(e,-1):e instanceof t.Variable?this.clone().addVariable(e,-1):void 0},divide:function(e){if("number"==typeof e){if(t.approx(e,0))throw new t.NonExpression;return this.times(1/e)}if(e instanceof t.Expression){if(!e.isConstant)throw new t.NonExpression;return this.times(1/e.constant)}},addExpression:function(e,n,i,r){return e instanceof t.AbstractVariable&&(e=new t.Expression(e),t.trace&&console.log("addExpression: Had to cast a var to an expression")),n=n||1,this.constant+=n*e.constant,e.terms.each(function(t,e){this.addVariable(t,e*n,i,r)},this),this},addVariable:function(e,n,i,r){null==n&&(n=1),t.trace&&console.log("c.Expression::addVariable():",e,n);var s=this.terms.get(e);if(s){var a=s+n;0==a||t.approx(a,0)?(r&&r.noteRemovedVariable(e,i),this.terms.delete(e)):this.setVariable(e,a)}else t.approx(n,0)||(this.setVariable(e,n),r&&r.noteAddedVariable(e,i));return this},setVariable:function(t,e){return this.terms.set(t,e),this},anyPivotableVariable:function(){if(this.isConstant)throw new t.InternalError("anyPivotableVariable called on a constant");var e=this.terms.escapingEach(function(t){return t.isPivotable?{retval:t}:void 0});return e&&void 0!==e.retval?e.retval:null},substituteOut:function(e,n,i,r){t.trace&&(t.fnenterprint("CLE:substituteOut: "+e+", "+n+", "+i+", ..."),t.traceprint("this = "+this));var s=this.setVariable.bind(this),a=this.terms,l=a.get(e);a.delete(e),this.constant+=l*n.constant,n.terms.each(function(e,n){var o=a.get(e);if(o){var u=o+l*n;t.approx(u,0)?(r.noteRemovedVariable(e,i),a.delete(e)):s(e,u)}else s(e,l*n),r&&r.noteAddedVariable(e,i)}),t.trace&&t.traceprint("Now this is "+this)},changeSubject:function(t,e){this.setVariable(t,this.newSubject(e))},newSubject:function(e){t.trace&&t.fnenterprint("newSubject:"+e);var n=1/this.terms.get(e);return this.terms.delete(e),this.multiplyMe(-n),n},coefficientFor:function(t){return this.terms.get(t)||0},get isConstant(){return 0==this.terms.size},toString:function(){var e="",n=!1;if(!t.approx(this.constant,0)||this.isConstant){if(e+=this.constant,this.isConstant)return e;n=!0}return this.terms.each(function(t,i){n&&(e+=" + "),e+=i+"*"+t,n=!0}),e},equals:function(e){return e===this||e instanceof t.Expression&&e.constant===this.constant&&e.terms.equals(this.terms)},Plus:function(t,e){return t.plus(e)},Minus:function(t,e){return t.minus(e)},Times:function(t,e){return t.times(e)},Divide:function(t,e){return t.divide(e)}})}(this.c||module.parent.exports||{}),function(t){"use strict";t.AbstractConstraint=t.inherit({initialize:function(e,n){this.hashCode=t._inc(),this.strength=e||t.Strength.required,this.weight=n||1},isEditConstraint:!1,isInequality:!1,isStayConstraint:!1,get required(){return this.strength===t.Strength.required},toString:function(){return this.strength+" {"+this.weight+"} ("+this.expression+")"}});var e=t.AbstractConstraint.prototype.toString,n=function(e,n,i){t.AbstractConstraint.call(this,n||t.Strength.strong,i),this.variable=e,this.expression=new t.Expression(e,-1,e.value)};t.EditConstraint=t.inherit({extends:t.AbstractConstraint,initialize:function(){n.apply(this,arguments)},isEditConstraint:!0,toString:function(){return"edit:"+e.call(this)}}),t.StayConstraint=t.inherit({extends:t.AbstractConstraint,initialize:function(){n.apply(this,arguments)},isStayConstraint:!0,toString:function(){return"stay:"+e.call(this)}});var i=t.Constraint=t.inherit({extends:t.AbstractConstraint,initialize:function(e,n,i){t.AbstractConstraint.call(this,n,i),this.expression=e}});t.Inequality=t.inherit({extends:t.Constraint,_cloneOrNewCle:function(e){return e.clone?e.clone():new t.Expression(e)},initialize:function(e,n,r,s,a){var l=e instanceof t.Expression,o=r instanceof t.Expression,u=e instanceof t.AbstractVariable,c=r instanceof t.AbstractVariable,h="number"==typeof e,f="number"==typeof r;if((l||h)&&c){var d=e,p=n,v=r,b=s,m=a;if(i.call(this,this._cloneOrNewCle(d),b,m),p==t.LEQ)this.expression.multiplyMe(-1),this.expression.addVariable(v);else{if(p!=t.GEQ)throw new t.InternalError("Invalid operator in c.Inequality constructor");this.expression.addVariable(v,-1)}}else if(u&&(o||f)){var d=r,p=n,v=e,b=s,m=a;if(i.call(this,this._cloneOrNewCle(d),b,m),p==t.GEQ)this.expression.multiplyMe(-1),this.expression.addVariable(v);else{if(p!=t.LEQ)throw new t.InternalError("Invalid operator in c.Inequality constructor");this.expression.addVariable(v,-1)}}else{if(l&&f){var _=e,p=n,g=r,b=s,m=a;if(i.call(this,this._cloneOrNewCle(_),b,m),p==t.LEQ)this.expression.multiplyMe(-1),this.expression.addExpression(this._cloneOrNewCle(g));else{if(p!=t.GEQ)throw new t.InternalError("Invalid operator in c.Inequality constructor");this.expression.addExpression(this._cloneOrNewCle(g),-1)}return this}if(h&&o){var _=r,p=n,g=e,b=s,m=a;if(i.call(this,this._cloneOrNewCle(_),b,m),p==t.GEQ)this.expression.multiplyMe(-1),this.expression.addExpression(this._cloneOrNewCle(g));else{if(p!=t.LEQ)throw new t.InternalError("Invalid operator in c.Inequality constructor");this.expression.addExpression(this._cloneOrNewCle(g),-1)}return this}if(l&&o){var _=e,p=n,g=r,b=s,m=a;if(i.call(this,this._cloneOrNewCle(g),b,m),p==t.GEQ)this.expression.multiplyMe(-1),this.expression.addExpression(this._cloneOrNewCle(_));else{if(p!=t.LEQ)throw new t.InternalError("Invalid operator in c.Inequality constructor");this.expression.addExpression(this._cloneOrNewCle(_),-1)}}else{if(l)return i.call(this,e,n,r);if(n==t.GEQ)i.call(this,new t.Expression(r),s,a),this.expression.multiplyMe(-1),this.expression.addVariable(e);else{if(n!=t.LEQ)throw new t.InternalError("Invalid operator in c.Inequality constructor");i.call(this,new t.Expression(r),s,a),this.expression.addVariable(e,-1)}}}},isInequality:!0,toString:function(){return i.prototype.toString.call(this)+" >= 0) id: "+this.hashCode}}),t.Equation=t.inherit({extends:t.Constraint,initialize:function(e,n,r,s){if(e instanceof t.Expression&&!n||n instanceof t.Strength)i.call(this,e,n,r);else if(e instanceof t.AbstractVariable&&n instanceof t.Expression){var a=e,l=n,o=r,u=s;i.call(this,l.clone(),o,u),this.expression.addVariable(a,-1)}else if(e instanceof t.AbstractVariable&&"number"==typeof n){var a=e,c=n,o=r,u=s;i.call(this,new t.Expression(c),o,u),this.expression.addVariable(a,-1)}else if(e instanceof t.Expression&&n instanceof t.AbstractVariable){var l=e,a=n,o=r,u=s;i.call(this,l.clone(),o,u),this.expression.addVariable(a,-1)}else{if(!(e instanceof t.Expression||e instanceof t.AbstractVariable||"number"==typeof e)||!(n instanceof t.Expression||n instanceof t.AbstractVariable||"number"==typeof n))throw"Bad initializer to c.Equation";e=e instanceof t.Expression?e.clone():new t.Expression(e),n=n instanceof t.Expression?n.clone():new t.Expression(n),i.call(this,e,r,s),this.expression.addExpression(n,-1)}t.assert(this.strength instanceof t.Strength,"_strength not set")},toString:function(){return i.prototype.toString.call(this)+" = 0)"}})}(this.c||module.parent.exports||{}),function(t){"use strict";t.EditInfo=t.inherit({initialize:function(t,e,n,i,r){this.constraint=t,this.editPlus=e,this.editMinus=n,this.prevEditConstant=i,this.index=r},toString:function(){return""}})}(this.c||module.parent.exports||{}),function(t){"use strict";t.Tableau=t.inherit({initialize:function(){this.columns=new t.HashTable,this.rows=new t.HashTable,this._infeasibleRows=new t.HashSet,this._externalRows=new t.HashSet,this._externalParametricVars=new t.HashSet},noteRemovedVariable:function(e,n){t.trace&&console.log("c.Tableau::noteRemovedVariable: ",e,n);var i=this.columns.get(e);n&&i&&i.delete(n)},noteAddedVariable:function(t,e){e&&this.insertColVar(t,e)},getInternalInfo:function(){var t="Tableau Information:\n";return t+="Rows: "+this.rows.size,t+=" (= "+(this.rows.size-1)+" constraints)",t+="\nColumns: "+this.columns.size,t+="\nInfeasible Rows: "+this._infeasibleRows.size,t+="\nExternal basic variables: "+this._externalRows.size,t+="\nExternal parametric variables: ",t+=this._externalParametricVars.size,t+="\n"},toString:function(){var t="Tableau:\n";return this.rows.each(function(e,n){t+=e,t+=" <==> ",t+=n,t+="\n"}),t+="\nColumns:\n",t+=this.columns,t+="\nInfeasible rows: ",t+=this._infeasibleRows,t+="External basic variables: ",t+=this._externalRows,t+="External parametric variables: ",t+=this._externalParametricVars},insertColVar:function(e,n){var i=this.columns.get(e);i||(i=new t.HashSet,this.columns.set(e,i)),i.add(n)},addRow:function(e,n){t.trace&&t.fnenterprint("addRow: "+e+", "+n),this.rows.set(e,n),n.terms.each(function(t){this.insertColVar(t,e),t.isExternal&&this._externalParametricVars.add(t)},this),e.isExternal&&this._externalRows.add(e),t.trace&&t.traceprint(""+this)},removeColumn:function(e){t.trace&&t.fnenterprint("removeColumn:"+e);var n=this.columns.get(e);n?(this.columns.delete(e),n.each(function(t){var n=this.rows.get(t);n.terms.delete(e)},this)):t.trace&&console.log("Could not find var",e,"in columns"),e.isExternal&&(this._externalRows.delete(e),this._externalParametricVars.delete(e))},removeRow:function(e){t.trace&&t.fnenterprint("removeRow:"+e);var n=this.rows.get(e);return t.assert(null!=n),n.terms.each(function(n){var i=this.columns.get(n);null!=i&&(t.trace&&console.log("removing from varset:",e),i.delete(e))},this),this._infeasibleRows.delete(e),e.isExternal&&this._externalRows.delete(e),this.rows.delete(e),t.trace&&t.fnexitprint("returning "+n),n},substituteOut:function(e,n){t.trace&&t.fnenterprint("substituteOut:"+e+", "+n),t.trace&&t.traceprint(""+this);var i=this.columns.get(e);i.each(function(t){var i=this.rows.get(t);i.substituteOut(e,n,t,this),t.isRestricted&&0>i.constant&&this._infeasibleRows.add(t)},this),e.isExternal&&(this._externalRows.add(e),this._externalParametricVars.delete(e)),this.columns.delete(e)},columnsHasKey:function(t){return!!this.columns.get(t)}})}(this.c||module.parent.exports||{}),function(t){var e=t.Tableau,n=e.prototype,i=1e-8,r=t.Strength.weak;t.SimplexSolver=t.inherit({extends:t.Tableau,initialize:function(){t.Tableau.call(this),this._stayMinusErrorVars=[],this._stayPlusErrorVars=[],this._errorVars=new t.HashTable,this._markerVars=new t.HashTable,this._objective=new t.ObjectiveVariable({name:"Z"}),this._editVarMap=new t.HashTable,this._editVarList=[],this._slackCounter=0,this._artificialCounter=0,this._dummyCounter=0,this.autoSolve=!0,this._fNeedsSolving=!1,this._optimizeCount=0,this.rows.set(this._objective,new t.Expression),this._stkCedcns=[0],t.trace&&t.traceprint("objective expr == "+this.rows.get(this._objective))},addLowerBound:function(e,n){var i=new t.Inequality(e,t.GEQ,new t.Expression(n));return this.addConstraint(i)},addUpperBound:function(e,n){var i=new t.Inequality(e,t.LEQ,new t.Expression(n));return this.addConstraint(i)},addBounds:function(t,e,n){return this.addLowerBound(t,e),this.addUpperBound(t,n),this},add:function(){for(var t=0;arguments.length>t;t++)this.addConstraint(arguments[t]);return this},addConstraint:function(e){t.trace&&t.fnenterprint("addConstraint: "+e);var n=Array(2),i=Array(1),r=this.newExpression(e,n,i);if(i=i[0],this.tryAddingDirectly(r)||this.addWithArtificialVariable(r),this._fNeedsSolving=!0,e.isEditConstraint){var s=this._editVarMap.size,a=n[0],l=n[1];!a instanceof t.SlackVariable&&console.warn("cvEplus not a slack variable =",a),!l instanceof t.SlackVariable&&console.warn("cvEminus not a slack variable =",l),t.debug&&console.log("new c.EditInfo("+e+", "+a+", "+l+", "+i+", "+s+")");var o=new t.EditInfo(e,a,l,i,s);this._editVarMap.set(e.variable,o),this._editVarList[s]={v:e.variable,info:o}}return this.autoSolve&&(this.optimize(this._objective),this._setExternalVariables()),this},addConstraintNoException:function(e){t.trace&&t.fnenterprint("addConstraintNoException: "+e);try{return this.addConstraint(e),!0}catch(t){return!1}},addEditVar:function(e,n){return t.trace&&t.fnenterprint("addEditVar: "+e+" @ "+n),this.addConstraint(new t.EditConstraint(e,n||t.Strength.strong))},beginEdit:function(){return t.assert(this._editVarMap.size>0,"_editVarMap.size > 0"),this._infeasibleRows.clear(),this._resetStayConstants(),this._stkCedcns.push(this._editVarMap.size),this},endEdit:function(){return t.assert(this._editVarMap.size>0,"_editVarMap.size > 0"),this.resolve(),this._stkCedcns.pop(),this.removeEditVarsTo(this._stkCedcns[this._stkCedcns.length-1]),this},removeAllEditVars:function(){return this.removeEditVarsTo(0)},removeEditVarsTo:function(e){try{for(var n=this._editVarList.length,i=e;n>i;i++)this._editVarList[i]&&this.removeConstraint(this._editVarMap.get(this._editVarList[i].v).constraint);return this._editVarList.length=e,t.assert(this._editVarMap.size==e,"_editVarMap.size == n"),this}catch(e){throw new t.InternalError("Constraint not found in removeEditVarsTo")}},addPointStays:function(e){return t.trace&&console.log("addPointStays",e),e.forEach(function(t,e){this.addStay(t.x,r,Math.pow(2,e)),this.addStay(t.y,r,Math.pow(2,e))},this),this},addStay:function(e,n,i){var s=new t.StayConstraint(e,n||r,i||1);return this.addConstraint(s)},removeConstraint:function(t){return this.removeConstraintInternal(t),this},removeConstraintInternal:function(e){t.trace&&t.fnenterprint("removeConstraintInternal: "+e),t.trace&&t.traceprint(""+this),this._fNeedsSolving=!0,this._resetStayConstants();var n=this.rows.get(this._objective),i=this._errorVars.get(e);t.trace&&t.traceprint("eVars == "+i),null!=i&&i.each(function(r){var s=this.rows.get(r);null==s?n.addVariable(r,-e.weight*e.strength.symbolicWeight.value,this._objective,this):n.addExpression(s,-e.weight*e.strength.symbolicWeight.value,this._objective,this),t.trace&&t.traceprint("now eVars == "+i)},this);var r=this._markerVars.get(e);if(this._markerVars.delete(e),null==r)throw new t.InternalError("Constraint not found in removeConstraintInternal");if(t.trace&&t.traceprint("Looking to remove var "+r),null==this.rows.get(r)){var s=this.columns.get(r);t.trace&&t.traceprint("Must pivot -- columns are "+s);var a=null,l=0;s.each(function(e){if(e.isRestricted){var n=this.rows.get(e),i=n.coefficientFor(r);if(t.trace&&t.traceprint("Marker "+r+"'s coefficient in "+n+" is "+i),0>i){var s=-n.constant/i;(null==a||l>s||t.approx(s,l)&&e.hashCodei)&&(l=i,a=t)}},this)),null==a&&(0==s.size?this.removeColumn(r):s.escapingEach(function(t){return t!=this._objective?(a=t,{brk:!0}):void 0},this)),null!=a&&this.pivot(r,a)}if(null!=this.rows.get(r)&&this.removeRow(r),null!=i&&i.each(function(t){t!=r&&this.removeColumn(t)},this),e.isStayConstraint){if(null!=i)for(var o=0;this._stayPlusErrorVars.length>o;o++)i.delete(this._stayPlusErrorVars[o]),i.delete(this._stayMinusErrorVars[o])}else if(e.isEditConstraint){t.assert(null!=i,"eVars != null");var u=this._editVarMap.get(e.variable);this.removeColumn(u.editMinus),this._editVarMap.delete(e.variable)}return null!=i&&this._errorVars.delete(i),this.autoSolve&&(this.optimize(this._objective),this._setExternalVariables()),this},reset:function(){throw t.trace&&t.fnenterprint("reset"),new t.InternalError("reset not implemented")},resolveArray:function(e){t.trace&&t.fnenterprint("resolveArray"+e);var n=e.length;this._editVarMap.each(function(t,i){var r=i.index;n>r&&this.suggestValue(t,e[r])},this),this.resolve()},resolvePair:function(t,e){this.suggestValue(this._editVarList[0].v,t),this.suggestValue(this._editVarList[1].v,e),this.resolve()},resolve:function(){t.trace&&t.fnenterprint("resolve()"),this.dualOptimize(),this._setExternalVariables(),this._infeasibleRows.clear(),this._resetStayConstants()},suggestValue:function(e,n){t.trace&&console.log("suggestValue("+e+", "+n+")");var i=this._editVarMap.get(e);if(!i)throw new t.Error("suggestValue for variable "+e+", but var is not an edit variable");var r=n-i.prevEditConstant;return i.prevEditConstant=n,this.deltaEditConstant(r,i.editPlus,i.editMinus),this},solve:function(){return this._fNeedsSolving&&(this.optimize(this._objective),this._setExternalVariables()),this},setEditedValue:function(e,n){if(!this.columnsHasKey(e)&&null==this.rows.get(e))return e.value=n,this;if(!t.approx(n,e.value)){this.addEditVar(e),this.beginEdit();try{this.suggestValue(e,n)}catch(e){throw new t.InternalError("Error in setEditedValue")}this.endEdit()}return this},addVar:function(e){if(!this.columnsHasKey(e)&&null==this.rows.get(e)){try{this.addStay(e)}catch(e){throw new t.InternalError("Error in addVar -- required failure is impossible")}t.trace&&t.traceprint("added initial stay on "+e)}return this},getInternalInfo:function(){var t=n.getInternalInfo.call(this);return t+="\nSolver info:\n",t+="Stay Error Variables: ",t+=this._stayPlusErrorVars.length+this._stayMinusErrorVars.length,t+=" ("+this._stayPlusErrorVars.length+" +, ",t+=this._stayMinusErrorVars.length+" -)\n",t+="Edit Variables: "+this._editVarMap.size,t+="\n"},getDebugInfo:function(){return""+this+this.getInternalInfo()+"\n"},toString:function(){var t=n.getInternalInfo.call(this);return t+="\n_stayPlusErrorVars: ",t+="["+this._stayPlusErrorVars+"]",t+="\n_stayMinusErrorVars: ",t+="["+this._stayMinusErrorVars+"]",t+="\n",t+="_editVarMap:\n"+this._editVarMap,t+="\n"},getConstraintMap:function(){return this._markerVars},addWithArtificialVariable:function(e){t.trace&&t.fnenterprint("addWithArtificialVariable: "+e);var n=new t.SlackVariable({value:++this._artificialCounter,prefix:"a"}),i=new t.ObjectiveVariable({name:"az"}),r=e.clone();t.trace&&t.traceprint("before addRows:\n"+this),this.addRow(i,r),this.addRow(n,e),t.trace&&t.traceprint("after addRows:\n"+this),this.optimize(i);var s=this.rows.get(i);if(t.trace&&t.traceprint("azTableauRow.constant == "+s.constant),!t.approx(s.constant,0))throw this.removeRow(i),this.removeColumn(n),new t.RequiredFailure;var a=this.rows.get(n);if(null!=a){if(a.isConstant)return this.removeRow(n),void this.removeRow(i);var l=a.anyPivotableVariable();this.pivot(l,n)}t.assert(null==this.rows.get(n),"rowExpression(av) == null"),this.removeColumn(n),this.removeRow(i)},tryAddingDirectly:function(e){t.trace&&t.fnenterprint("tryAddingDirectly: "+e);var n=this.chooseSubject(e);return null==n?(t.trace&&t.fnexitprint("returning false"),!1):(e.newSubject(n),this.columnsHasKey(n)&&this.substituteOut(n,e),this.addRow(n,e),t.trace&&t.fnexitprint("returning true"),!0)},chooseSubject:function(e){t.trace&&t.fnenterprint("chooseSubject: "+e);var n=null,i=!1,r=!1,s=e.terms,a=s.escapingEach(function(t,e){if(i){if(!t.isRestricted&&!this.columnsHasKey(t))return{retval:t}}else if(t.isRestricted){if(!r&&!t.isDummy&&0>e){var s=this.columns.get(t);(null==s||1==s.size&&this.columnsHasKey(this._objective))&&(n=t,r=!0)}}else n=t,i=!0},this);if(a&&void 0!==a.retval)return a.retval;if(null!=n)return n;var l=0,a=s.escapingEach(function(t,e){return t.isDummy?void(this.columnsHasKey(t)||(n=t,l=e)):{retval:null}},this);if(a&&void 0!==a.retval)return a.retval;if(!t.approx(e.constant,0))throw new t.RequiredFailure;return l>0&&e.multiplyMe(-1),n},deltaEditConstant:function(e,n,i){t.trace&&t.fnenterprint("deltaEditConstant :"+e+", "+n+", "+i);var r=this.rows.get(n);if(null!=r)return r.constant+=e,void(0>r.constant&&this._infeasibleRows.add(n));var s=this.rows.get(i);if(null!=s)return s.constant+=-e,void(0>s.constant&&this._infeasibleRows.add(i));var a=this.columns.get(i);a||console.log("columnVars is null -- tableau is:\n"+this),a.each(function(t){var n=this.rows.get(t),r=n.coefficientFor(i);n.constant+=r*e,t.isRestricted&&0>n.constant&&this._infeasibleRows.add(t)},this)},dualOptimize:function(){t.trace&&t.fnenterprint("dualOptimize:");for(var e=this.rows.get(this._objective);this._infeasibleRows.size;){var n=this._infeasibleRows.values()[0];this._infeasibleRows.delete(n);var i=null,r=this.rows.get(n);if(r&&0>r.constant){var s,a=Number.MAX_VALUE,l=r.terms;if(l.each(function(n,r){if(r>0&&n.isPivotable){var l=e.coefficientFor(n);s=l/r,(a>s||t.approx(s,a)&&n.hashCodes.constant&&s.multiplyMe(-1),t.trace&&t.fnexitprint("returning "+s),s},optimize:function(e){t.trace&&t.fnenterprint("optimize: "+e),t.trace&&t.traceprint(""+this),this._optimizeCount++;var n=this.rows.get(e);t.assert(null!=n,"zRow != null");for(var r,s,a=null,l=null;;){if(r=0,s=n.terms,s.escapingEach(function(t,e){return t.isPivotable&&r>e?(r=e,a=t,{brk:1}):void 0},this),r>=-i)return;t.trace&&console.log("entryVar:",a,"objectiveCoeff:",r);var o=Number.MAX_VALUE,u=this.columns.get(a),c=0;if(u.each(function(e){if(t.trace&&t.traceprint("Checking "+e),e.isPivotable){var n=this.rows.get(e),i=n.coefficientFor(a);t.trace&&t.traceprint("pivotable, coeff = "+i),0>i&&(c=-n.constant/i,(o>c||t.approx(c,o)&&e.hashCodee;e++){var n=this.rows.get(this._stayPlusErrorVars[e]);null==n&&(n=this.rows.get(this._stayMinusErrorVars[e])),null!=n&&(n.constant=0)}},_setExternalVariables:function(){t.trace&&t.fnenterprint("_setExternalVariables:"),t.trace&&t.traceprint(""+this),this._externalParametricVars.each(function(e){null!=this.rows.get(e)?t.trace&&console.log("Error: variable"+e+" in _externalParametricVars is basic"):e.value=0},this),this._externalRows.each(function(t){var e=this.rows.get(t);t.value!=e.constant&&(t.value=e.constant)},this),this._fNeedsSolving=!1,this.onsolved()},onsolved:function(){},insertErrorVar:function(e,n){t.trace&&t.fnenterprint("insertErrorVar:"+e+", "+n);var i=this._errorVars.get(n);i||(i=new t.HashSet,this._errorVars.set(e,i)),i.add(n)}})}(this.c||module.parent.exports||{}),function(t){"use strict";t.Timer=t.inherit({initialize:function(){this.isRunning=!1,this._elapsedMs=0},start:function(){return this.isRunning=!0,this._startReading=new Date,this},stop:function(){return this.isRunning=!1,this._elapsedMs+=new Date-this._startReading,this},reset:function(){return this.isRunning=!1,this._elapsedMs=0,this},elapsedTime:function(){return this.isRunning?(this._elapsedMs+(new Date-this._startReading))/1e3:this._elapsedMs/1e3}})}(this.c||module.parent.exports||{}),__cassowary_parser=function(){function t(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var e={parse:function(e,n){function i(t){H>T||(T>H&&(H=T,F=[]),F.push(t))}function r(){var t,e,n,i,r;if(i=T,r=T,t=_(),null!==t){if(n=s(),null!==n)for(e=[];null!==n;)e.push(n),n=s();else e=null;null!==e?(n=_(),null!==n?t=[t,e,n]:(t=null,T=r)):(t=null,T=r)}else t=null,T=r;return null!==t&&(t=function(t,e){return e}(i,t[1])),null===t&&(T=i),t}function s(){var t,e,n,i;return n=T,i=T,t=k(),null!==t?(e=h(),null!==e?t=[t,e]:(t=null,T=i)):(t=null,T=i),null!==t&&(t=function(t,e){return e}(n,t[0])),null===t&&(T=n),t}function a(){var t;return e.length>T?(t=e.charAt(T),T++):(t=null,0===L&&i("any character")),t}function l(){var t;return/^[a-zA-Z]/.test(e.charAt(T))?(t=e.charAt(T),T++):(t=null,0===L&&i("[a-zA-Z]")),null===t&&(36===e.charCodeAt(T)?(t="$",T++):(t=null,0===L&&i('"$"')),null===t&&(95===e.charCodeAt(T)?(t="_",T++):(t=null,0===L&&i('"_"')))),t}function o(){var t;return L++,/^[\t\x0B\f \xA0\uFEFF]/.test(e.charAt(T))?(t=e.charAt(T),T++):(t=null,0===L&&i("[\\t\\x0B\\f \\xA0\\uFEFF]")),L--,0===L&&null===t&&i("whitespace"),t}function u(){var t;return/^[\n\r\u2028\u2029]/.test(e.charAt(T))?(t=e.charAt(T),T++):(t=null,0===L&&i("[\\n\\r\\u2028\\u2029]")),t}function c(){var t;return L++,10===e.charCodeAt(T)?(t="\n",T++):(t=null,0===L&&i('"\\n"')),null===t&&("\r\n"===e.substr(T,2)?(t="\r\n",T+=2):(t=null,0===L&&i('"\\r\\n"')),null===t&&(13===e.charCodeAt(T)?(t="\r",T++):(t=null,0===L&&i('"\\r"')),null===t&&(8232===e.charCodeAt(T)?(t="\u2028",T++):(t=null,0===L&&i('"\\u2028"')),null===t&&(8233===e.charCodeAt(T)?(t="\u2029",T++):(t=null,0===L&&i('"\\u2029"')))))),L--,0===L&&null===t&&i("end of line"),t}function h(){var t,n,r;return r=T,t=_(),null!==t?(59===e.charCodeAt(T)?(n=";",T++):(n=null,0===L&&i('";"')),null!==n?t=[t,n]:(t=null,T=r)):(t=null,T=r),null===t&&(r=T,t=m(),null!==t?(n=c(),null!==n?t=[t,n]:(t=null,T=r)):(t=null,T=r),null===t&&(r=T,t=_(),null!==t?(n=f(),null!==n?t=[t,n]:(t=null,T=r)):(t=null,T=r))),t}function f(){var t,n;return n=T,L++,e.length>T?(t=e.charAt(T),T++):(t=null,0===L&&i("any character")),L--,null===t?t="":(t=null,T=n),t}function d(){var t;return L++,t=p(),null===t&&(t=b()),L--,0===L&&null===t&&i("comment"),t}function p(){var t,n,r,s,l,o,u;if(l=T,"/*"===e.substr(T,2)?(t="/*",T+=2):(t=null,0===L&&i('"/*"')),null!==t){for(n=[],o=T,u=T,L++,"*/"===e.substr(T,2)?(r="*/",T+=2):(r=null,0===L&&i('"*/"')),L--,null===r?r="":(r=null,T=u),null!==r?(s=a(),null!==s?r=[r,s]:(r=null,T=o)):(r=null,T=o);null!==r;)n.push(r),o=T,u=T,L++,"*/"===e.substr(T,2)?(r="*/",T+=2):(r=null,0===L&&i('"*/"')),L--,null===r?r="":(r=null,T=u),null!==r?(s=a(),null!==s?r=[r,s]:(r=null,T=o)):(r=null,T=o);null!==n?("*/"===e.substr(T,2)?(r="*/",T+=2):(r=null,0===L&&i('"*/"')),null!==r?t=[t,n,r]:(t=null,T=l)):(t=null,T=l)}else t=null,T=l;return t}function v(){var t,n,r,s,l,o,c;if(l=T,"/*"===e.substr(T,2)?(t="/*",T+=2):(t=null,0===L&&i('"/*"')),null!==t){for(n=[],o=T,c=T,L++,"*/"===e.substr(T,2)?(r="*/",T+=2):(r=null,0===L&&i('"*/"')),null===r&&(r=u()),L--,null===r?r="":(r=null,T=c),null!==r?(s=a(),null!==s?r=[r,s]:(r=null,T=o)):(r=null,T=o);null!==r;)n.push(r),o=T,c=T,L++,"*/"===e.substr(T,2)?(r="*/",T+=2):(r=null,0===L&&i('"*/"')),null===r&&(r=u()),L--,null===r?r="":(r=null,T=c),null!==r?(s=a(),null!==s?r=[r,s]:(r=null,T=o)):(r=null,T=o);null!==n?("*/"===e.substr(T,2)?(r="*/",T+=2):(r=null,0===L&&i('"*/"')),null!==r?t=[t,n,r]:(t=null,T=l)):(t=null,T=l)}else t=null,T=l;return t}function b(){var t,n,r,s,l,o,c;if(l=T,"//"===e.substr(T,2)?(t="//",T+=2):(t=null,0===L&&i('"//"')),null!==t){for(n=[],o=T,c=T,L++,r=u(),L--,null===r?r="":(r=null,T=c),null!==r?(s=a(),null!==s?r=[r,s]:(r=null,T=o)):(r=null,T=o);null!==r;)n.push(r),o=T,c=T,L++,r=u(),L--,null===r?r="":(r=null,T=c),null!==r?(s=a(),null!==s?r=[r,s]:(r=null,T=o)):(r=null,T=o);null!==n?t=[t,n]:(t=null,T=l)}else t=null,T=l;return t}function m(){var t,e;for(t=[],e=o(),null===e&&(e=v(),null===e&&(e=b()));null!==e;)t.push(e),e=o(),null===e&&(e=v(),null===e&&(e=b()));return t}function _(){var t,e;for(t=[],e=o(),null===e&&(e=c(),null===e&&(e=d()));null!==e;)t.push(e),e=o(),null===e&&(e=c(),null===e&&(e=d()));return t}function g(){var t,e;return e=T,t=x(),null===t&&(t=w()),null!==t&&(t=function(t,e){return{type:"NumericLiteral",value:e}}(e,t)),null===t&&(T=e),t}function w(){var t,n,r;if(r=T,/^[0-9]/.test(e.charAt(T))?(n=e.charAt(T),T++):(n=null,0===L&&i("[0-9]")),null!==n)for(t=[];null!==n;)t.push(n),/^[0-9]/.test(e.charAt(T))?(n=e.charAt(T),T++):(n=null,0===L&&i("[0-9]"));else t=null;return null!==t&&(t=function(t,e){return parseInt(e.join(""))}(r,t)),null===t&&(T=r),t}function x(){var t,n,r,s,a;return s=T,a=T,t=w(),null!==t?(46===e.charCodeAt(T)?(n=".",T++):(n=null,0===L&&i('"."')),null!==n?(r=w(),null!==r?t=[t,n,r]:(t=null,T=a)):(t=null,T=a)):(t=null,T=a),null!==t&&(t=function(t,e){return parseFloat(e.join(""))}(s,t)),null===t&&(T=s),t}function E(){var t,n,r,s;if(s=T,/^[\-+]/.test(e.charAt(T))?(t=e.charAt(T),T++):(t=null,0===L&&i("[\\-+]")),t=null!==t?t:"",null!==t){if(/^[0-9]/.test(e.charAt(T))?(r=e.charAt(T),T++):(r=null,0===L&&i("[0-9]")),null!==r)for(n=[];null!==r;)n.push(r),/^[0-9]/.test(e.charAt(T))?(r=e.charAt(T),T++):(r=null,0===L&&i("[0-9]"));else n=null;null!==n?t=[t,n]:(t=null,T=s)}else t=null,T=s;return t}function y(){var t,e;return L++,e=T,t=V(),null!==t&&(t=function(t,e){return e}(e,t)),null===t&&(T=e),L--,0===L&&null===t&&i("identifier"),t}function V(){var t,e,n,r,s;if(L++,r=T,s=T,t=l(),null!==t){for(e=[],n=l();null!==n;)e.push(n),n=l();null!==e?t=[t,e]:(t=null,T=s)}else t=null,T=s;return null!==t&&(t=function(t,e,n){return e+n.join("")}(r,t[0],t[1])),null===t&&(T=r),L--,0===L&&null===t&&i("identifier"),t}function C(){var t,n,r,s,a,l,o;return l=T,t=y(),null!==t&&(t=function(t,e){return{type:"Variable",name:e}}(l,t)),null===t&&(T=l),null===t&&(t=g(),null===t&&(l=T,o=T,40===e.charCodeAt(T)?(t="(",T++):(t=null,0===L&&i('"("')),null!==t?(n=_(),null!==n?(r=k(),null!==r?(s=_(),null!==s?(41===e.charCodeAt(T)?(a=")",T++):(a=null,0===L&&i('")"')),null!==a?t=[t,n,r,s,a]:(t=null,T=o)):(t=null,T=o)):(t=null,T=o)):(t=null,T=o)):(t=null,T=o),null!==t&&(t=function(t,e){return e}(l,t[2])),null===t&&(T=l))),t}function S(){var t,e,n,i,r;return t=C(),null===t&&(i=T,r=T,t=A(),null!==t?(e=_(),null!==e?(n=S(),null!==n?t=[t,e,n]:(t=null,T=r)):(t=null,T=r)):(t=null,T=r),null!==t&&(t=function(t,e,n){return{type:"UnaryExpression",operator:e,expression:n}}(i,t[0],t[2])),null===t&&(T=i)),t}function A(){var t;return 43===e.charCodeAt(T)?(t="+",T++):(t=null,0===L&&i('"+"')),null===t&&(45===e.charCodeAt(T)?(t="-",T++):(t=null,0===L&&i('"-"')),null===t&&(33===e.charCodeAt(T)?(t="!",T++):(t=null,0===L&&i('"!"')))),t}function z(){var t,e,n,i,r,s,a,l,o;if(a=T,l=T,t=S(),null!==t){for(e=[],o=T,n=_(),null!==n?(i=M(),null!==i?(r=_(),null!==r?(s=S(),null!==s?n=[n,i,r,s]:(n=null,T=o)):(n=null,T=o)):(n=null,T=o)):(n=null,T=o);null!==n;)e.push(n),o=T,n=_(),null!==n?(i=M(),null!==i?(r=_(),null!==r?(s=S(),null!==s?n=[n,i,r,s]:(n=null,T=o)):(n=null,T=o)):(n=null,T=o)):(n=null,T=o);null!==e?t=[t,e]:(t=null,T=l)}else t=null,T=l;return null!==t&&(t=function(t,e,n){for(var i=e,r=0;n.length>r;r++)i={type:"MultiplicativeExpression",operator:n[r][1],left:i,right:n[r][3]};return i}(a,t[0],t[1])),null===t&&(T=a),t}function M(){var t;return 42===e.charCodeAt(T)?(t="*",T++):(t=null,0===L&&i('"*"')),null===t&&(47===e.charCodeAt(T)?(t="/",T++):(t=null,0===L&&i('"/"'))),t}function O(){var t,e,n,i,r,s,a,l,o;if(a=T,l=T,t=z(),null!==t){for(e=[],o=T,n=_(),null!==n?(i=j(),null!==i?(r=_(),null!==r?(s=z(),null!==s?n=[n,i,r,s]:(n=null,T=o)):(n=null,T=o)):(n=null,T=o)):(n=null,T=o);null!==n;)e.push(n),o=T,n=_(),null!==n?(i=j(),null!==i?(r=_(),null!==r?(s=z(),null!==s?n=[n,i,r,s]:(n=null,T=o)):(n=null,T=o)):(n=null,T=o)):(n=null,T=o);null!==e?t=[t,e]:(t=null,T=l)}else t=null,T=l;return null!==t&&(t=function(t,e,n){for(var i=e,r=0;n.length>r;r++)i={type:"AdditiveExpression",operator:n[r][1],left:i,right:n[r][3]};return i}(a,t[0],t[1])),null===t&&(T=a),t}function j(){var t;return 43===e.charCodeAt(T)?(t="+",T++):(t=null,0===L&&i('"+"')),null===t&&(45===e.charCodeAt(T)?(t="-",T++):(t=null,0===L&&i('"-"'))),t}function R(){var t,e,n,i,r,s,a,l,o;if(a=T,l=T,t=O(),null!==t){for(e=[],o=T,n=_(),null!==n?(i=I(),null!==i?(r=_(),null!==r?(s=O(),null!==s?n=[n,i,r,s]:(n=null,T=o)):(n=null,T=o)):(n=null,T=o)):(n=null,T=o);null!==n;)e.push(n),o=T,n=_(),null!==n?(i=I(),null!==i?(r=_(),null!==r?(s=O(),null!==s?n=[n,i,r,s]:(n=null,T=o)):(n=null,T=o)):(n=null,T=o)):(n=null,T=o);null!==e?t=[t,e]:(t=null,T=l)}else t=null,T=l;return null!==t&&(t=function(t,e,n){for(var i=e,r=0;n.length>r;r++)i={type:"Inequality",operator:n[r][1],left:i,right:n[r][3]};return i}(a,t[0],t[1])),null===t&&(T=a),t}function I(){var t;return"<="===e.substr(T,2)?(t="<=",T+=2):(t=null,0===L&&i('"<="')),null===t&&(">="===e.substr(T,2)?(t=">=",T+=2):(t=null,0===L&&i('">="')),null===t&&(60===e.charCodeAt(T)?(t="<",T++):(t=null,0===L&&i('"<"')),null===t&&(62===e.charCodeAt(T)?(t=">",T++):(t=null,0===L&&i('">"'))))),t}function k(){var t,n,r,s,a,l,o,u,c;if(o=T,u=T,t=R(),null!==t){for(n=[],c=T,r=_(),null!==r?("=="===e.substr(T,2)?(s="==",T+=2):(s=null,0===L&&i('"=="')),null!==s?(a=_(),null!==a?(l=R(),null!==l?r=[r,s,a,l]:(r=null,T=c)):(r=null,T=c)):(r=null,T=c)):(r=null,T=c);null!==r;)n.push(r),c=T,r=_(),null!==r?("=="===e.substr(T,2)?(s="==",T+=2):(s=null,0===L&&i('"=="')),null!==s?(a=_(),null!==a?(l=R(),null!==l?r=[r,s,a,l]:(r=null,T=c)):(r=null,T=c)):(r=null,T=c)):(r=null,T=c);null!==n?t=[t,n]:(t=null,T=u)}else t=null,T=u;return null!==t&&(t=function(t,e,n){for(var i=e,r=0;n.length>r;r++)i={type:"Equality",operator:n[r][1],left:i,right:n[r][3]};return i}(o,t[0],t[1])),null===t&&(T=o),t}function N(t){t.sort();for(var e=null,n=[],i=0;t.length>i;i++)t[i]!==e&&(n.push(t[i]),e=t[i]);return n}function q(){for(var t=1,n=1,i=!1,r=0;Math.max(T,H)>r;r++){var s=e.charAt(r);"\n"===s?(i||t++,n=1,i=!1):"\r"===s||"\u2028"===s||"\u2029"===s?(t++,n=1,i=!0):(n++,i=!1)}return{line:t,column:n}}var P={start:r,Statement:s,SourceCharacter:a,IdentifierStart:l,WhiteSpace:o,LineTerminator:u,LineTerminatorSequence:c,EOS:h,EOF:f,Comment:d,MultiLineComment:p,MultiLineCommentNoLineTerminator:v,SingleLineComment:b,_:m,__:_,Literal:g,Integer:w,Real:x,SignedInteger:E,Identifier:y,IdentifierName:V,PrimaryExpression:C,UnaryExpression:S,UnaryOperator:A,MultiplicativeExpression:z,MultiplicativeOperator:M,AdditiveExpression:O,AdditiveOperator:j,InequalityExpression:R,InequalityOperator:I,LinearExpression:k};if(void 0!==n){if(void 0===P[n])throw Error("Invalid rule name: "+t(n)+".")}else n="start";var T=0,L=0,H=0,F=[],D=P[n]();if(null===D||T!==e.length){var Q=Math.max(T,H),W=e.length>Q?e.charAt(Q):null,G=q();throw new this.SyntaxError(N(F),W,Q,G.line,G.column)}return D},toSource:function(){return this._source}};return e.SyntaxError=function(e,n,i,r,s){function a(e,n){var i,r;switch(e.length){case 0:i="end of input";break;case 1:i=e[0];break;default:i=e.slice(0,e.length-1).join(", ")+" or "+e[e.length-1]}return r=n?t(n):"end of input","Expected "+i+" but "+r+" found."}this.name="SyntaxError",this.expected=e,this.found=n,this.message=a(e,n),this.offset=i,this.line=r,this.column=s},e.SyntaxError.prototype=Error.prototype,e}()}).call("undefined"!=typeof module?module.compiled=module:this); -},{}]},{},[1])(1) -}); - - -//# sourceMappingURL=autolayout.min.map \ No newline at end of file diff --git a/dist/autolayout.min.map b/dist/autolayout.min.map deleted file mode 100644 index 16128f3..0000000 --- a/dist/autolayout.min.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../node_modules/browser-pack/_prelude.js","../_stream_0.js","../node_modules/cassowary/bin/c.js"],"names":["_processEqualSpacer","context","stackView","equalSpacerIndex","name","lineIndex","constraints","push","view1","attr1","horizontal","Attribute","WIDTH","HEIGHT","relation","Relation","EQU","view2","attr2","priority","view","multiplier","undefined","constant","CONST","i","prevViews","length","prevView","orientation","Orientation","HORIZONTAL","prevAttr","RIGHT","LEFT","curAttr","VERTICAL","BOTTOM","TOP","ZINDEX","_processProportionalSpacer","proportionalSpacerIndex","_processStackView","subView","viewName","orientations","stack","processedOrientations","type","j","subViews","_getRange","range","match","substring","parseInt","start","res","_processCascade","cascade","parentItem","curViews","item","Array","isArray","hasOwnProperty","items","z","viewRange","r","curView","p","n","attribute","variable","VARIABLE","equalSpacing","err","Error","column","$parserOffset","_getConst","value","vr","c","Variable","this","_solver","addConstraint","StayConstraint","Strength","required","_getSubView","_subViews","SubView","solver","_type","_parentSubView","_getSpacing","constraint","index","_spacingVars","_spacingExpr","addEditVar","minus","suggestValue","_spacing","_addConstraint","call","_getAttr","plus","times","strength","defaultPriorityStrength","Equation","GEQ","Inequality","LEQ","_compareSpacing","old","newz","require","NOTANATTRIBUTE","CENTERX","CENTERY","Priority","REQUIRED","DEFAULTHIGH","DEFAULTLOW","parser","peg$subclass","child","parent","ctor","constructor","prototype","SyntaxError","message","expected","found","offset","line","parse","input","peg$reportedPos","peg$computePosDetails","pos","advance","details","startPos","endPos","ch","charAt","seenCR","peg$cachedPos","peg$cachedPosDetails","peg$fail","peg$currPos","peg$maxFailPos","peg$maxFailExpected","peg$buildException","cleanupExpected","sort","a","b","description","splice","buildMessage","stringEscape","s","hex","charCodeAt","toString","toUpperCase","replace","expectedDesc","foundDesc","expectedDescs","slice","join","posDetails","peg$parsevisualFormatString","s0","s1","s2","s3","s4","s5","s6","s7","peg$parseorientation","peg$FAILED","peg$c2","peg$silentFails","peg$c3","peg$c0","peg$c1","peg$parsesuperview","peg$parseconnection","peg$parseview","peg$c5","peg$c6","peg$c7","peg$c8","peg$c9","peg$c10","peg$c11","peg$c12","peg$c13","peg$c14","peg$c15","peg$parseviewName","peg$parsepredicateListWithParens","peg$c16","peg$c17","peg$c18","peg$c19","peg$c20","peg$parsepredicateList","peg$c21","peg$c22","peg$c23","peg$c24","peg$parsesimplePredicate","peg$parsenumber","peg$c25","peg$c26","peg$c27","peg$parsepredicate","peg$c28","peg$c29","peg$c30","peg$c31","peg$c32","peg$parserelation","peg$parseobjectOfPredicate","peg$c33","peg$c34","peg$parsepriority","peg$c35","substr","peg$c36","peg$c37","peg$c38","peg$c39","peg$c40","peg$c41","peg$c42","peg$c43","peg$c44","peg$parseconstant","peg$c45","test","peg$c46","peg$c47","peg$c48","peg$c49","peg$c50","peg$c51","peg$c52","peg$c53","peg$c54","peg$c55","peg$c56","peg$c57","extend","dst","arguments","k","peg$result","options","peg$startRuleFunctions","visualFormatString","peg$startRuleFunction","o","superto","views","tosuper","concat","apply","orient","predicates","predicateList","ps","map","digits","f","v","decimals","parseFloat","startRule","parserExt","peg$parsevisualFormatStringExt","peg$parsevisualFormatStringConstraintExpression","peg$parseattributePredicate","peg$parsecomments","peg$c4","peg$parseattribute","peg$parseviewGroup","peg$parseviewNameRange","peg$parsecascadedViews","peg$parseequalSpacingPredicateList","peg$parsepercentage","peg$c58","peg$c59","peg$c60","peg$parseequalSpacingPredicate","peg$c61","peg$c62","peg$c63","peg$c64","peg$c65","peg$c66","peg$c67","peg$c68","peg$c69","peg$c70","peg$parseviewPredicate","peg$c71","peg$c72","peg$c73","peg$c74","peg$c75","peg$c76","peg$c77","peg$c78","peg$c79","peg$c80","peg$c81","peg$parsemultiplier","peg$parseconstantExpr","peg$c82","peg$c83","peg$c84","peg$c85","peg$c86","peg$c87","peg$c88","peg$c89","peg$c90","peg$c91","peg$c92","peg$c93","peg$c94","peg$c95","peg$c96","peg$c97","peg$c98","peg$c99","peg$c100","peg$c101","peg$c102","peg$c103","peg$c104","peg$c105","peg$c106","peg$c107","peg$c108","peg$c109","peg$c110","peg$c111","peg$c112","peg$c113","peg$c114","peg$c115","peg$c116","peg$c117","peg$c118","peg$c119","peg$c120","peg$c121","peg$c122","peg$c123","peg$c124","peg$c125","peg$c126","peg$parserange","peg$c127","peg$c128","peg$c129","peg$c130","peg$c131","peg$c132","peg$c133","peg$c134","peg$c135","visualFormatStringExt","attributes","comments","attr","cascadedViews","connection","vn","m","d","metaInfoCategories","VisualFormat","visualFormat","extended","indexOf","outFormat","predicate","lineSeparator","parseLine","source","lines","parseOptions","strict","split","trim","prefix","key","metaInfo","category","prefixedCategory","names","viewport","aspectRatio","height","width","widths","isNaN","heights","spacing","JSON","sIdx","len","_classCallCheck","_name","_attr","left","top","stringify","toJSON","process","CASSOWARYJS","divide","_getAttrValue","_intrinsicWidth","resolve","_intrinsicHeight","View","setSpacing","setSize","addConstraints","intrinsicWidth","intrinsicHeight","AutoLayout","module","exports","bind","Object","defineProperty","Function","enumerable","configurable","writable","HTMLElement","tagName","e","g","__super__","h","debug","trace","verbose","traceAdded","GC","inherit","initialize","_t","create","l","__proto__","created","decorate","upgrade","document","createElement","own","getOwnPropertyDescriptor","get","set","getOwnPropertyNames","forEach","traceprint","console","log","fnenterprint","fnexitprint","assert","InternalError","Expression","approx","Math","abs","_inc","parseJSON","load","hashCode","keys","HashTable","size","_store","_keyStrMap","_deleted","clear","_compact","_compactThreshold","_perhapsCompact","_size","delete","each","escapingEach","retval","brk","clone","equals","HashSet","storage","add","values","has","data","fromJSON","_description","extends","ConstraintNotFound","NonExpression","NotEnoughStays","RequiredFailure","TooDifficult","SymbolicWeight","symbolicWeight","isRequired","strong","medium","weak","AbstractVariable","isDummy","isExternal","isPivotable","isRestricted","_init","_prefix","_map","DummyVariable","ObjectiveVariable","SlackVariable","Point","_x","_y","x","y","terms","setVariable","initializeFromHash","multiplyMe","isConstant","addExpression","addVariable","noteRemovedVariable","noteAddedVariable","anyPivotableVariable","substituteOut","changeSubject","newSubject","coefficientFor","Plus","Minus","Times","Divide","AbstractConstraint","weight","isEditConstraint","isInequality","isStayConstraint","expression","EditConstraint","Constraint","_cloneOrNewCle","q","t","EditInfo","editPlus","editMinus","prevEditConstant","Tableau","columns","rows","_infeasibleRows","_externalRows","_externalParametricVars","insertColVar","getInternalInfo","addRow","removeColumn","removeRow","columnsHasKey","SimplexSolver","_stayMinusErrorVars","_stayPlusErrorVars","_errorVars","_markerVars","_objective","_editVarMap","_editVarList","_slackCounter","_artificialCounter","_dummyCounter","autoSolve","_fNeedsSolving","_optimizeCount","_stkCedcns","addLowerBound","addUpperBound","addBounds","newExpression","tryAddingDirectly","addWithArtificialVariable","warn","info","optimize","_setExternalVariables","addConstraintNoException","beginEdit","_resetStayConstants","endEdit","pop","removeEditVarsTo","removeAllEditVars","removeConstraint","addPointStays","addStay","pow","removeConstraintInternal","pivot","reset","resolveArray","resolvePair","dualOptimize","deltaEditConstant","solve","setEditedValue","addVar","getDebugInfo","getConstraintMap","chooseSubject","Number","MAX_VALUE","insertErrorVar","time","timeEnd","onsolved","Timer","isRunning","_elapsedMs","_startReading","Date","stop","elapsedTime","__cassowary_parser","escape","P","u","w","A","C","B","D","E","F","G","H","I","operator","J","K","right","L","M","N","O","Q","R","max","Statement","SourceCharacter","IdentifierStart","WhiteSpace","LineTerminator","LineTerminatorSequence","EOS","EOF","Comment","MultiLineComment","MultiLineCommentNoLineTerminator","SingleLineComment","_","__","Literal","Integer","Real","SignedInteger","Identifier","IdentifierName","PrimaryExpression","UnaryExpression","UnaryOperator","MultiplicativeExpression","MultiplicativeOperator","AdditiveExpression","AdditiveOperator","InequalityExpression","InequalityOperator","LinearExpression","S","T","U","V","toSource","_source","compiled"],"mappings":"AAAA;yHCk9GA,QAASA,qBAAoBC,EAASC,GAGlCD,EAAQE,iBAAmBF,EAAQE,kBAAoB,CACvD,IAAMC,GAAO,KAAOH,EAAQI,UAAY,IAAMJ,EAAQE,iBAAmB,GACrEF,GAAQE,iBAAmB,GAG3BF,EAAQK,YAAYC,MAChBC,MAAO,KAAOP,EAAQI,UAAY,MAClCI,MAAOR,EAAQS,WAAaC,UAAUC,MAAQD,UAAUE,OACxDC,SAAUb,EAAQa,SAASA,UAAYC,SAASC,IAChDC,MAAOb,EACPc,MAAOjB,EAAQS,WAAaC,UAAUC,MAAQD,UAAUE,OACxDM,SAAUlB,EAAQa,SAASK,WAGnClB,EAAQE,mBAGJF,EAAQa,SAASM,MAASnB,EAAQa,SAASO,YAA+C,IAAhCpB,EAAQa,SAASO,YAC3EpB,EAAQK,YAAYC,MAChBC,MAAOJ,EACPK,MAAOR,EAAQS,WAAaC,UAAUC,MAAQD,UAAUE,OACxDC,SAAUb,EAAQa,SAASA,UAAYC,SAASC,IACh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c,MAAM,EAAEd,EAAEzI,OAAO,GAAGwJ,KAAK,MAAM,OAAOf,EAAEA,EAAEzI,OAAO,GAAG,MAAOgb,GAAEvX,EAAE+E,EAAE/E,GAAG,eAAe,YAAYsT,EAAE,QAAQiE,EAAE,UAAUrX,KAAKlF,KAAK,cAAckF,KAAKoD,SAAS0B,EAAE9E,KAAKqD,MAAMvD,EAAEE,KAAKmD,QAAQmU,EAAExS,EAAEhF,GAAGE,KAAKsD,OAAO8P,EAAEpT,KAAKuD,KAAK8T,EAAErX,KAAKP,OAAO+M,GAAG1H,EAAE5B,YAAYD,UAAUzD,MAAMyD,UAAU6B,OACztexD,KACiB,mBAAVoV,QACHA,OAAOkR,SAAmBlR,OAAU1W","file":"bundle.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o 1 ? arguments[1] : {},\n\n peg$FAILED = {},\n\n peg$startRuleFunctions = { visualFormatString: peg$parsevisualFormatString },\n peg$startRuleFunction = peg$parsevisualFormatString,\n\n peg$c0 = peg$FAILED,\n peg$c1 = null,\n peg$c2 = \":\",\n peg$c3 = { type: \"literal\", value: \":\", description: \"\\\":\\\"\" },\n peg$c4 = [],\n peg$c5 = function(o, superto, view, views, tosuper) { return {\n orientation: o ? o[0] : 'horizontal',\n cascade: (superto || []).concat(\n [view],\n [].concat.apply([], views),\n (tosuper || [])\n )\n }\n },\n peg$c6 = \"H\",\n peg$c7 = { type: \"literal\", value: \"H\", description: \"\\\"H\\\"\" },\n peg$c8 = \"V\",\n peg$c9 = { type: \"literal\", value: \"V\", description: \"\\\"V\\\"\" },\n peg$c10 = function(orient) { return orient == 'H' ? 'horizontal' : 'vertical' },\n peg$c11 = \"|\",\n peg$c12 = { type: \"literal\", value: \"|\", description: \"\\\"|\\\"\" },\n peg$c13 = function() { return { view: null } },\n peg$c14 = \"[\",\n peg$c15 = { type: \"literal\", value: \"[\", description: \"\\\"[\\\"\" },\n peg$c16 = \"]\",\n peg$c17 = { type: \"literal\", value: \"]\", description: \"\\\"]\\\"\" },\n peg$c18 = function(view, predicates) { return extend(view, predicates ? { constraints: predicates } : {}) },\n peg$c19 = \"-\",\n peg$c20 = { type: \"literal\", value: \"-\", description: \"\\\"-\\\"\" },\n peg$c21 = function(predicateList) { return predicateList },\n peg$c22 = function() { return [{ relation: 'equ', constant: 'default', $parserOffset: offset() }] },\n peg$c23 = \"\",\n peg$c24 = function() { return [{ relation: 'equ', constant: 0, $parserOffset: offset() }] },\n peg$c25 = function(n) { return [{ relation: 'equ', constant: n, $parserOffset: offset() }] },\n peg$c26 = \"(\",\n peg$c27 = { type: \"literal\", value: \"(\", description: \"\\\"(\\\"\" },\n peg$c28 = \",\",\n peg$c29 = { type: \"literal\", value: \",\", description: \"\\\",\\\"\" },\n peg$c30 = \")\",\n peg$c31 = { type: \"literal\", value: \")\", description: \"\\\")\\\"\" },\n peg$c32 = function(p, ps) { return [p].concat(ps.map(function(p){ return p[1] })) },\n peg$c33 = \"@\",\n peg$c34 = { type: \"literal\", value: \"@\", description: \"\\\"@\\\"\" },\n peg$c35 = function(r, o, p) { return extend({ relation: 'equ' }, (r || {}), o, (p ? p[1]: {})) },\n peg$c36 = \"==\",\n peg$c37 = { type: \"literal\", value: \"==\", description: \"\\\"==\\\"\" },\n peg$c38 = function() { return { relation: 'equ', $parserOffset: offset() } },\n peg$c39 = \"<=\",\n peg$c40 = { type: \"literal\", value: \"<=\", description: \"\\\"<=\\\"\" },\n peg$c41 = function() { return { relation: 'leq', $parserOffset: offset() } },\n peg$c42 = \">=\",\n peg$c43 = { type: \"literal\", value: \">=\", description: \"\\\">=\\\"\" },\n peg$c44 = function() { return { relation: 'geq', $parserOffset: offset() } },\n peg$c45 = /^[0-9]/,\n peg$c46 = { type: \"class\", value: \"[0-9]\", description: \"[0-9]\" },\n peg$c47 = function(digits) { return { priority: parseInt(digits.join(\"\"), 10) } },\n peg$c48 = function(n) { return { constant: n } },\n peg$c49 = /^[a-zA-Z_]/,\n peg$c50 = { type: \"class\", value: \"[a-zA-Z_]\", description: \"[a-zA-Z_]\" },\n peg$c51 = /^[a-zA-Z0-9_]/,\n peg$c52 = { type: \"class\", value: \"[a-zA-Z0-9_]\", description: \"[a-zA-Z0-9_]\" },\n peg$c53 = function(f, v) { return { view: f + v } },\n peg$c54 = \".\",\n peg$c55 = { type: \"literal\", value: \".\", description: \"\\\".\\\"\" },\n peg$c56 = function(digits, decimals) { return parseFloat(digits.concat(\".\").concat(decimals).join(\"\"), 10); },\n peg$c57 = function(digits) { return parseInt(digits.join(\"\"), 10); },\n\n peg$currPos = 0,\n peg$reportedPos = 0,\n peg$cachedPos = 0,\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$reportedPos, peg$currPos);\n }\n\n function offset() {\n return peg$reportedPos;\n }\n\n function line() {\n return peg$computePosDetails(peg$reportedPos).line;\n }\n\n function column() {\n return peg$computePosDetails(peg$reportedPos).column;\n }\n\n function expected(description) {\n throw peg$buildException(\n null,\n [{ type: \"other\", description: description }],\n peg$reportedPos\n );\n }\n\n function error(message) {\n throw peg$buildException(message, null, peg$reportedPos);\n }\n\n function peg$computePosDetails(pos) {\n function advance(details, startPos, endPos) {\n var p, ch;\n\n for (p = startPos; p < endPos; p++) {\n ch = input.charAt(p);\n if (ch === \"\\n\") {\n if (!details.seenCR) { details.line++; }\n details.column = 1;\n details.seenCR = false;\n } else if (ch === \"\\r\" || ch === \"\\u2028\" || ch === \"\\u2029\") {\n details.line++;\n details.column = 1;\n details.seenCR = true;\n } else {\n details.column++;\n details.seenCR = false;\n }\n }\n }\n\n if (peg$cachedPos !== pos) {\n if (peg$cachedPos > pos) {\n peg$cachedPos = 0;\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };\n }\n advance(peg$cachedPosDetails, peg$cachedPos, pos);\n peg$cachedPos = pos;\n }\n\n return peg$cachedPosDetails;\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildException(message, expected, pos) {\n function cleanupExpected(expected) {\n var i = 1;\n\n expected.sort(function(a, b) {\n if (a.description < b.description) {\n return -1;\n } else if (a.description > b.description) {\n return 1;\n } else {\n return 0;\n }\n });\n\n while (i < expected.length) {\n if (expected[i - 1] === expected[i]) {\n expected.splice(i, 1);\n } else {\n i++;\n }\n }\n }\n\n function buildMessage(expected, found) {\n function stringEscape(s) {\n function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }\n\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\x08/g, '\\\\b')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\f/g, '\\\\f')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x07\\x0B\\x0E\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x80-\\xFF]/g, function(ch) { return '\\\\x' + hex(ch); })\n .replace(/[\\u0180-\\u0FFF]/g, function(ch) { return '\\\\u0' + hex(ch); })\n .replace(/[\\u1080-\\uFFFF]/g, function(ch) { return '\\\\u' + hex(ch); });\n }\n\n var expectedDescs = new Array(expected.length),\n expectedDesc, foundDesc, i;\n\n for (i = 0; i < expected.length; i++) {\n expectedDescs[i] = expected[i].description;\n }\n\n expectedDesc = expected.length > 1\n ? expectedDescs.slice(0, -1).join(\", \")\n + \" or \"\n + expectedDescs[expected.length - 1]\n : expectedDescs[0];\n\n foundDesc = found ? \"\\\"\" + stringEscape(found) + \"\\\"\" : \"end of input\";\n\n return \"Expected \" + expectedDesc + \" but \" + foundDesc + \" found.\";\n }\n\n var posDetails = peg$computePosDetails(pos),\n found = pos < input.length ? input.charAt(pos) : null;\n\n if (expected !== null) {\n cleanupExpected(expected);\n }\n\n return new SyntaxError(\n message !== null ? message : buildMessage(expected, found),\n expected,\n found,\n pos,\n posDetails.line,\n posDetails.column\n );\n }\n\n function peg$parsevisualFormatString() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = peg$parseorientation();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 58) {\n s3 = peg$c2;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$c0;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$c0;\n }\n if (s1 === peg$FAILED) {\n s1 = peg$c1;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$parsesuperview();\n if (s3 !== peg$FAILED) {\n s4 = peg$parseconnection();\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c0;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c0;\n }\n if (s2 === peg$FAILED) {\n s2 = peg$c1;\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parseview();\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$currPos;\n s6 = peg$parseconnection();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseview();\n if (s7 !== peg$FAILED) {\n s6 = [s6, s7];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$currPos;\n s6 = peg$parseconnection();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseview();\n if (s7 !== peg$FAILED) {\n s6 = [s6, s7];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$currPos;\n s6 = peg$parseconnection();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsesuperview();\n if (s7 !== peg$FAILED) {\n s6 = [s6, s7];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n if (s5 === peg$FAILED) {\n s5 = peg$c1;\n }\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c5(s1, s2, s3, s4, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parseorientation() {\n var s0, s1;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 72) {\n s1 = peg$c6;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c7); }\n }\n if (s1 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 86) {\n s1 = peg$c8;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c9); }\n }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c10(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsesuperview() {\n var s0, s1;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 124) {\n s1 = peg$c11;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c12); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c13();\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseview() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c14;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c15); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseviewName();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsepredicateListWithParens();\n if (s3 === peg$FAILED) {\n s3 = peg$c1;\n }\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s4 = peg$c16;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c17); }\n }\n if (s4 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c18(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parseconnection() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 45) {\n s1 = peg$c19;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsepredicateList();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 45) {\n s3 = peg$c19;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c21(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 45) {\n s1 = peg$c19;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c22();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$c23;\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c24();\n }\n s0 = s1;\n }\n }\n\n return s0;\n }\n\n function peg$parsepredicateList() {\n var s0;\n\n s0 = peg$parsesimplePredicate();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepredicateListWithParens();\n }\n\n return s0;\n }\n\n function peg$parsesimplePredicate() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsenumber();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c25(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsepredicateListWithParens() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 40) {\n s1 = peg$c26;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c27); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsepredicate();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c28;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parsepredicate();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c28;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parsepredicate();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n }\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s4 = peg$c30;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s4 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c32(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parsepredicate() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = peg$parserelation();\n if (s1 === peg$FAILED) {\n s1 = peg$c1;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseobjectOfPredicate();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 64) {\n s4 = peg$c33;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepriority();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c0;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c0;\n }\n if (s3 === peg$FAILED) {\n s3 = peg$c1;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c35(s1, s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parserelation() {\n var s0, s1;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c36) {\n s1 = peg$c36;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c37); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c38();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c39) {\n s1 = peg$c39;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c41();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c42) {\n s1 = peg$c42;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c44();\n }\n s0 = s1;\n }\n }\n\n return s0;\n }\n\n function peg$parseobjectOfPredicate() {\n var s0;\n\n s0 = peg$parseconstant();\n if (s0 === peg$FAILED) {\n s0 = peg$parseviewName();\n }\n\n return s0;\n }\n\n function peg$parsepriority() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c45.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c46); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c45.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c46); }\n }\n }\n } else {\n s1 = peg$c0;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c47(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseconstant() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsenumber();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c48(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseviewName() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c49.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c50); }\n }\n }\n } else {\n s2 = peg$c0;\n }\n if (s2 !== peg$FAILED) {\n s2 = input.substring(s1, peg$currPos);\n }\n s1 = s2;\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = [];\n if (peg$c51.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c51.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n }\n if (s3 !== peg$FAILED) {\n s3 = input.substring(s2, peg$currPos);\n }\n s2 = s3;\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c53(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c45.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c46); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c45.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c46); }\n }\n }\n } else {\n s1 = peg$c0;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s2 = peg$c54;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c55); }\n }\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c45.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c46); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c45.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c46); }\n }\n }\n } else {\n s3 = peg$c0;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c56(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = [];\n if (peg$c45.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c46); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c45.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c46); }\n }\n }\n } else {\n s1 = peg$c0;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c57(s1);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n\n function extend(dst) {\n for (var i = 1; i < arguments.length; i++) {\n for (var k in arguments[i]) {\n dst[k] = arguments[i][k];\n }\n }\n return dst;\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail({ type: \"end\", description: \"end of input\" });\n }\n\n throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);\n }\n }\n\n return {\n SyntaxError: SyntaxError,\n parse: parse\n };\n})();\n\nvar parserExt = (function() {\n /*\n * Generated by PEG.js 0.8.0.\n *\n * http://pegjs.majda.cz/\n */\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function SyntaxError(message, expected, found, offset, line, column) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.offset = offset;\n this.line = line;\n this.column = column;\n\n this.name = \"SyntaxError\";\n }\n\n peg$subclass(SyntaxError, Error);\n\n function parse(input) {\n var options = arguments.length > 1 ? arguments[1] : {},\n\n peg$FAILED = {},\n\n peg$startRuleFunctions = { visualFormatStringExt: peg$parsevisualFormatStringExt },\n peg$startRuleFunction = peg$parsevisualFormatStringExt,\n\n peg$c0 = peg$FAILED,\n peg$c1 = \"C:\",\n peg$c2 = { type: \"literal\", value: \"C:\", description: \"\\\"C:\\\"\" },\n peg$c3 = [],\n peg$c4 = null,\n peg$c5 = function(view, attribute, attributes, comments) { return {\n type: 'attribute',\n view: view.view,\n attributes: [attribute].concat(attributes)\n }\n },\n peg$c6 = function(attr, predicates) { return { attr: attr, predicates:predicates } },\n peg$c7 = \":\",\n peg$c8 = { type: \"literal\", value: \":\", description: \"\\\":\\\"\" },\n peg$c9 = function(o, superto, view, views, tosuper, comments) { return {\n type: 'vfl',\n orientation: o ? o[0] : 'horizontal',\n cascade: (superto || []).concat(\n view,\n [].concat.apply([], views),\n (tosuper || [])\n )\n }\n },\n peg$c10 = \"HV\",\n peg$c11 = { type: \"literal\", value: \"HV\", description: \"\\\"HV\\\"\" },\n peg$c12 = function() { return 'horzvert' },\n peg$c13 = \"H\",\n peg$c14 = { type: \"literal\", value: \"H\", description: \"\\\"H\\\"\" },\n peg$c15 = function() { return 'horizontal' },\n peg$c16 = \"V\",\n peg$c17 = { type: \"literal\", value: \"V\", description: \"\\\"V\\\"\" },\n peg$c18 = function() { return 'vertical' },\n peg$c19 = \"Z\",\n peg$c20 = { type: \"literal\", value: \"Z\", description: \"\\\"Z\\\"\" },\n peg$c21 = function() { return 'zIndex' },\n peg$c22 = \" \",\n peg$c23 = { type: \"literal\", value: \" \", description: \"\\\" \\\"\" },\n peg$c24 = \"//\",\n peg$c25 = { type: \"literal\", value: \"//\", description: \"\\\"//\\\"\" },\n peg$c26 = { type: \"any\", description: \"any character\" },\n peg$c27 = \"|\",\n peg$c28 = { type: \"literal\", value: \"|\", description: \"\\\"|\\\"\" },\n peg$c29 = function() { return { view: null } },\n peg$c30 = \"[\",\n peg$c31 = { type: \"literal\", value: \"[\", description: \"\\\"[\\\"\" },\n peg$c32 = \",\",\n peg$c33 = { type: \"literal\", value: \",\", description: \"\\\",\\\"\" },\n peg$c34 = \"]\",\n peg$c35 = { type: \"literal\", value: \"]\", description: \"\\\"]\\\"\" },\n peg$c36 = function(view, views) { return views.length ? [view].concat([].concat.apply([], views)) : view },\n peg$c37 = function(view, predicates, cascadedViews) { return extend(extend(view, predicates ? { constraints: predicates } : {}), cascadedViews ? {\n cascade: cascadedViews\n } : {}) },\n peg$c38 = function(views, connection) { return [].concat([].concat.apply([], views),[connection]); },\n peg$c39 = \"->\",\n peg$c40 = { type: \"literal\", value: \"->\", description: \"\\\"->\\\"\" },\n peg$c41 = function() { return [{ relation: 'none' }] },\n peg$c42 = \"-\",\n peg$c43 = { type: \"literal\", value: \"-\", description: \"\\\"-\\\"\" },\n peg$c44 = function(predicateList) { return predicateList },\n peg$c45 = function() { return [{ relation: 'equ', constant: 'default' }] },\n peg$c46 = \"~\",\n peg$c47 = { type: \"literal\", value: \"~\", description: \"\\\"~\\\"\" },\n peg$c48 = function() { return [{ relation: 'equ', equalSpacing: true }] },\n peg$c49 = \"\",\n peg$c50 = function() { return [{ relation: 'equ', constant: 0 }] },\n peg$c51 = function(p) { return [{ relation: 'equ', multiplier: p.multiplier }] },\n peg$c52 = function(n) { return [{ relation: 'equ', constant: n }] },\n peg$c53 = \"(\",\n peg$c54 = { type: \"literal\", value: \"(\", description: \"\\\"(\\\"\" },\n peg$c55 = \")\",\n peg$c56 = { type: \"literal\", value: \")\", description: \"\\\")\\\"\" },\n peg$c57 = function(p, ps) { return [p].concat(ps.map(function(p){ return p[1] })) },\n peg$c58 = \"@\",\n peg$c59 = { type: \"literal\", value: \"@\", description: \"\\\"@\\\"\" },\n peg$c60 = function(r, o, p) { return extend({ relation: 'equ' }, (r || {}), o, (p ? p[1]: {})) },\n peg$c61 = function(r, o, p) { return extend({ relation: 'equ', equalSpacing: true }, (r || {}), o, (p ? p[1]: {})) },\n peg$c62 = \"==\",\n peg$c63 = { type: \"literal\", value: \"==\", description: \"\\\"==\\\"\" },\n peg$c64 = function() { return { relation: 'equ' } },\n peg$c65 = \"<=\",\n peg$c66 = { type: \"literal\", value: \"<=\", description: \"\\\"<=\\\"\" },\n peg$c67 = function() { return { relation: 'leq' } },\n peg$c68 = \">=\",\n peg$c69 = { type: \"literal\", value: \">=\", description: \"\\\">=\\\"\" },\n peg$c70 = function() { return { relation: 'geq' } },\n peg$c71 = /^[0-9]/,\n peg$c72 = { type: \"class\", value: \"[0-9]\", description: \"[0-9]\" },\n peg$c73 = function(digits) { return { priority: parseInt(digits.join(\"\"), 10) } },\n peg$c74 = function(n) { return { constant: n } },\n peg$c75 = function(n) { return { constant: -n } },\n peg$c76 = \"+\",\n peg$c77 = { type: \"literal\", value: \"+\", description: \"\\\"+\\\"\" },\n peg$c78 = \"%\",\n peg$c79 = { type: \"literal\", value: \"%\", description: \"\\\"%\\\"\" },\n peg$c80 = function(n) { return { view: null, multiplier: n / 100 } },\n peg$c81 = function(n) { return { view: null, multiplier: n / -100 } },\n peg$c82 = function(vn, a, m, c) { return { view: vn.view, attribute: a ? a : undefined, multiplier: m ? m : 1, constant: c ? c : undefined } },\n peg$c83 = \".left\",\n peg$c84 = { type: \"literal\", value: \".left\", description: \"\\\".left\\\"\" },\n peg$c85 = function() { return 'left'},\n peg$c86 = \".right\",\n peg$c87 = { type: \"literal\", value: \".right\", description: \"\\\".right\\\"\" },\n peg$c88 = function() { return 'right'},\n peg$c89 = \".top\",\n peg$c90 = { type: \"literal\", value: \".top\", description: \"\\\".top\\\"\" },\n peg$c91 = function() { return 'top'},\n peg$c92 = \".bottom\",\n peg$c93 = { type: \"literal\", value: \".bottom\", description: \"\\\".bottom\\\"\" },\n peg$c94 = function() { return 'bottom'},\n peg$c95 = \".width\",\n peg$c96 = { type: \"literal\", value: \".width\", description: \"\\\".width\\\"\" },\n peg$c97 = function() { return 'width'},\n peg$c98 = \".height\",\n peg$c99 = { type: \"literal\", value: \".height\", description: \"\\\".height\\\"\" },\n peg$c100 = function() { return 'height'},\n peg$c101 = \".centerX\",\n peg$c102 = { type: \"literal\", value: \".centerX\", description: \"\\\".centerX\\\"\" },\n peg$c103 = function() { return 'centerX'},\n peg$c104 = \".centerY\",\n peg$c105 = { type: \"literal\", value: \".centerY\", description: \"\\\".centerY\\\"\" },\n peg$c106 = function() { return 'centerY'},\n peg$c107 = \"/\",\n peg$c108 = { type: \"literal\", value: \"/\", description: \"\\\"/\\\"\" },\n peg$c109 = function(n) { return 1 / n; },\n peg$c110 = \"/+\",\n peg$c111 = { type: \"literal\", value: \"/+\", description: \"\\\"/+\\\"\" },\n peg$c112 = \"/-\",\n peg$c113 = { type: \"literal\", value: \"/-\", description: \"\\\"/-\\\"\" },\n peg$c114 = function(n) { return -1 / n; },\n peg$c115 = \"*\",\n peg$c116 = { type: \"literal\", value: \"*\", description: \"\\\"*\\\"\" },\n peg$c117 = function(n) { return n; },\n peg$c118 = \"*+\",\n peg$c119 = { type: \"literal\", value: \"*+\", description: \"\\\"*+\\\"\" },\n peg$c120 = \"*-\",\n peg$c121 = { type: \"literal\", value: \"*-\", description: \"\\\"*-\\\"\" },\n peg$c122 = function(n) { return -n; },\n peg$c123 = /^[a-zA-Z_]/,\n peg$c124 = { type: \"class\", value: \"[a-zA-Z_]\", description: \"[a-zA-Z_]\" },\n peg$c125 = /^[a-zA-Z0-9_]/,\n peg$c126 = { type: \"class\", value: \"[a-zA-Z0-9_]\", description: \"[a-zA-Z0-9_]\" },\n peg$c127 = function(f, v, r) { return { view: f + v, range: r, $parserOffset: offset() } },\n peg$c128 = function(f, v) { return { view: f + v, $parserOffset: offset() } },\n peg$c129 = \"..\",\n peg$c130 = { type: \"literal\", value: \"..\", description: \"\\\"..\\\"\" },\n peg$c131 = function(d) { return parseInt(d) },\n peg$c132 = \".\",\n peg$c133 = { type: \"literal\", value: \".\", description: \"\\\".\\\"\" },\n peg$c134 = function(digits, decimals) { return parseFloat(digits.concat(\".\").concat(decimals).join(\"\"), 10); },\n peg$c135 = function(digits) { return parseInt(digits.join(\"\"), 10); },\n\n peg$currPos = 0,\n peg$reportedPos = 0,\n peg$cachedPos = 0,\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$reportedPos, peg$currPos);\n }\n\n function offset() {\n return peg$reportedPos;\n }\n\n function line() {\n return peg$computePosDetails(peg$reportedPos).line;\n }\n\n function column() {\n return peg$computePosDetails(peg$reportedPos).column;\n }\n\n function expected(description) {\n throw peg$buildException(\n null,\n [{ type: \"other\", description: description }],\n peg$reportedPos\n );\n }\n\n function error(message) {\n throw peg$buildException(message, null, peg$reportedPos);\n }\n\n function peg$computePosDetails(pos) {\n function advance(details, startPos, endPos) {\n var p, ch;\n\n for (p = startPos; p < endPos; p++) {\n ch = input.charAt(p);\n if (ch === \"\\n\") {\n if (!details.seenCR) { details.line++; }\n details.column = 1;\n details.seenCR = false;\n } else if (ch === \"\\r\" || ch === \"\\u2028\" || ch === \"\\u2029\") {\n details.line++;\n details.column = 1;\n details.seenCR = true;\n } else {\n details.column++;\n details.seenCR = false;\n }\n }\n }\n\n if (peg$cachedPos !== pos) {\n if (peg$cachedPos > pos) {\n peg$cachedPos = 0;\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };\n }\n advance(peg$cachedPosDetails, peg$cachedPos, pos);\n peg$cachedPos = pos;\n }\n\n return peg$cachedPosDetails;\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildException(message, expected, pos) {\n function cleanupExpected(expected) {\n var i = 1;\n\n expected.sort(function(a, b) {\n if (a.description < b.description) {\n return -1;\n } else if (a.description > b.description) {\n return 1;\n } else {\n return 0;\n }\n });\n\n while (i < expected.length) {\n if (expected[i - 1] === expected[i]) {\n expected.splice(i, 1);\n } else {\n i++;\n }\n }\n }\n\n function buildMessage(expected, found) {\n function stringEscape(s) {\n function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }\n\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\x08/g, '\\\\b')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\f/g, '\\\\f')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x07\\x0B\\x0E\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x80-\\xFF]/g, function(ch) { return '\\\\x' + hex(ch); })\n .replace(/[\\u0180-\\u0FFF]/g, function(ch) { return '\\\\u0' + hex(ch); })\n .replace(/[\\u1080-\\uFFFF]/g, function(ch) { return '\\\\u' + hex(ch); });\n }\n\n var expectedDescs = new Array(expected.length),\n expectedDesc, foundDesc, i;\n\n for (i = 0; i < expected.length; i++) {\n expectedDescs[i] = expected[i].description;\n }\n\n expectedDesc = expected.length > 1\n ? expectedDescs.slice(0, -1).join(\", \")\n + \" or \"\n + expectedDescs[expected.length - 1]\n : expectedDescs[0];\n\n foundDesc = found ? \"\\\"\" + stringEscape(found) + \"\\\"\" : \"end of input\";\n\n return \"Expected \" + expectedDesc + \" but \" + foundDesc + \" found.\";\n }\n\n var posDetails = peg$computePosDetails(pos),\n found = pos < input.length ? input.charAt(pos) : null;\n\n if (expected !== null) {\n cleanupExpected(expected);\n }\n\n return new SyntaxError(\n message !== null ? message : buildMessage(expected, found),\n expected,\n found,\n pos,\n posDetails.line,\n posDetails.column\n );\n }\n\n function peg$parsevisualFormatStringExt() {\n var s0;\n\n s0 = peg$parsevisualFormatString();\n if (s0 === peg$FAILED) {\n s0 = peg$parsevisualFormatStringConstraintExpression();\n }\n\n return s0;\n }\n\n function peg$parsevisualFormatStringConstraintExpression() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c1) {\n s1 = peg$c1;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c2); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseviewName();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattributePredicate();\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parseattributePredicate();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parseattributePredicate();\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parsecomments();\n if (s5 === peg$FAILED) {\n s5 = peg$c4;\n }\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c5(s2, s3, s4, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parseattributePredicate() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = peg$parseattribute();\n if (s1 !== peg$FAILED) {\n s2 = peg$parsepredicateListWithParens();\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c6(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parsevisualFormatString() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = peg$parseorientation();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 58) {\n s3 = peg$c7;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$c0;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$c0;\n }\n if (s1 === peg$FAILED) {\n s1 = peg$c4;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$parsesuperview();\n if (s3 !== peg$FAILED) {\n s4 = peg$parseconnection();\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c0;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c0;\n }\n if (s2 === peg$FAILED) {\n s2 = peg$c4;\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parseviewGroup();\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$currPos;\n s6 = peg$parseconnection();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseviewGroup();\n if (s7 !== peg$FAILED) {\n s6 = [s6, s7];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$currPos;\n s6 = peg$parseconnection();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseviewGroup();\n if (s7 !== peg$FAILED) {\n s6 = [s6, s7];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$currPos;\n s6 = peg$parseconnection();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsesuperview();\n if (s7 !== peg$FAILED) {\n s6 = [s6, s7];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c0;\n }\n if (s5 === peg$FAILED) {\n s5 = peg$c4;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parsecomments();\n if (s6 === peg$FAILED) {\n s6 = peg$c4;\n }\n if (s6 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c9(s1, s2, s3, s4, s5, s6);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parseorientation() {\n var s0, s1;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c10) {\n s1 = peg$c10;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c12();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 72) {\n s1 = peg$c13;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c15();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 86) {\n s1 = peg$c16;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c17); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c18();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 90) {\n s1 = peg$c19;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c21();\n }\n s0 = s1;\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsecomments() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s2 = peg$c22;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (input.charCodeAt(peg$currPos) === 32) {\n s2 = peg$c22;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n }\n if (s1 !== peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c24) {\n s2 = peg$c24;\n peg$currPos += 2;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c25); }\n }\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n }\n if (s3 !== peg$FAILED) {\n s1 = [s1, s2, s3];\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parsesuperview() {\n var s0, s1;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 124) {\n s1 = peg$c27;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c28); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c29();\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseviewGroup() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c30;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c31); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseview();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseview();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseview();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n }\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s4 = peg$c34;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c35); }\n }\n if (s4 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c36(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parseview() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$parseviewNameRange();\n if (s1 !== peg$FAILED) {\n s2 = peg$parsepredicateListWithParens();\n if (s2 === peg$FAILED) {\n s2 = peg$c4;\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsecascadedViews();\n if (s3 === peg$FAILED) {\n s3 = peg$c4;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c37(s1, s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parsecascadedViews() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c7;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parseconnection();\n if (s4 !== peg$FAILED) {\n s5 = peg$parseviewGroup();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c0;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c0;\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parseconnection();\n if (s4 !== peg$FAILED) {\n s5 = peg$parseviewGroup();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c0;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c0;\n }\n }\n } else {\n s2 = peg$c0;\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parseconnection();\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c38(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parseconnection() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c39) {\n s1 = peg$c39;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c41();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 45) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsepredicateList();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 45) {\n s3 = peg$c42;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c44(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 45) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c45();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 126) {\n s1 = peg$c46;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c47); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseequalSpacingPredicateList();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s3 = peg$c46;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c47); }\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c44(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 126) {\n s1 = peg$c46;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c47); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c48();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$c49;\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c50();\n }\n s0 = s1;\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsepredicateList() {\n var s0;\n\n s0 = peg$parsesimplePredicate();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepredicateListWithParens();\n }\n\n return s0;\n }\n\n function peg$parsesimplePredicate() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsepercentage();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c51(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsenumber();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c52(s1);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parsepredicateListWithParens() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 40) {\n s1 = peg$c53;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsepredicate();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parsepredicate();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parsepredicate();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n }\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s4 = peg$c55;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c56); }\n }\n if (s4 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c57(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parsepredicate() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = peg$parserelation();\n if (s1 === peg$FAILED) {\n s1 = peg$c4;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseobjectOfPredicate();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 64) {\n s4 = peg$c58;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepriority();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c0;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c0;\n }\n if (s3 === peg$FAILED) {\n s3 = peg$c4;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c60(s1, s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parseequalSpacingPredicateList() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 40) {\n s1 = peg$c53;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseequalSpacingPredicate();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseequalSpacingPredicate();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c32;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c33); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseequalSpacingPredicate();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$c0;\n }\n }\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s4 = peg$c55;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c56); }\n }\n if (s4 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c57(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parseequalSpacingPredicate() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = peg$parserelation();\n if (s1 === peg$FAILED) {\n s1 = peg$c4;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseobjectOfPredicate();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 64) {\n s4 = peg$c58;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c59); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepriority();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c0;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c0;\n }\n if (s3 === peg$FAILED) {\n s3 = peg$c4;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c61(s1, s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parserelation() {\n var s0, s1;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c62) {\n s1 = peg$c62;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c63); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c64();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c67();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c68) {\n s1 = peg$c68;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c69); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c70();\n }\n s0 = s1;\n }\n }\n\n return s0;\n }\n\n function peg$parseobjectOfPredicate() {\n var s0;\n\n s0 = peg$parsepercentage();\n if (s0 === peg$FAILED) {\n s0 = peg$parseconstant();\n if (s0 === peg$FAILED) {\n s0 = peg$parseviewPredicate();\n }\n }\n\n return s0;\n }\n\n function peg$parsepriority() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s1 = peg$c0;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c73(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseconstant() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = peg$parsenumber();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c74(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 45) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c75(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 43) {\n s1 = peg$c76;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c77); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c74(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsepercentage() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$parsenumber();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 37) {\n s2 = peg$c78;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c79); }\n }\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c80(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 45) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 37) {\n s3 = peg$c78;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c79); }\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c81(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 43) {\n s1 = peg$c76;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c77); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 37) {\n s3 = peg$c78;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c79); }\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c80(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n }\n }\n\n return s0;\n }\n\n function peg$parseviewPredicate() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = peg$parseviewName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseattribute();\n if (s2 === peg$FAILED) {\n s2 = peg$c4;\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsemultiplier();\n if (s3 === peg$FAILED) {\n s3 = peg$c4;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseconstantExpr();\n if (s4 === peg$FAILED) {\n s4 = peg$c4;\n }\n if (s4 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c82(s1, s2, s3, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parseattribute() {\n var s0, s1;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c83) {\n s1 = peg$c83;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c84); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c85();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c86) {\n s1 = peg$c86;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c87); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c88();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 4) === peg$c89) {\n s1 = peg$c89;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c90); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c91();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 7) === peg$c92) {\n s1 = peg$c92;\n peg$currPos += 7;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c93); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c94();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c95) {\n s1 = peg$c95;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c96); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c97();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 7) === peg$c98) {\n s1 = peg$c98;\n peg$currPos += 7;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c99); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c100();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 8) === peg$c101) {\n s1 = peg$c101;\n peg$currPos += 8;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c102); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c103();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 8) === peg$c104) {\n s1 = peg$c104;\n peg$currPos += 8;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c105); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c106();\n }\n s0 = s1;\n }\n }\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsemultiplier() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c107;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c108); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c109(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c110) {\n s1 = peg$c110;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c111); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c109(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c112) {\n s1 = peg$c112;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c113); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c114(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c115;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c116); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c117(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c118) {\n s1 = peg$c118;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c119); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c117(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c120) {\n s1 = peg$c120;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c121); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c122(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parseconstantExpr() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 45) {\n s1 = peg$c42;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c122(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 43) {\n s1 = peg$c76;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c77); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c117(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n }\n\n return s0;\n }\n\n function peg$parseviewNameRange() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c123.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c124); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c123.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c124); }\n }\n }\n } else {\n s2 = peg$c0;\n }\n if (s2 !== peg$FAILED) {\n s2 = input.substring(s1, peg$currPos);\n }\n s1 = s2;\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = [];\n if (peg$c125.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c126); }\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c125.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c126); }\n }\n }\n if (s3 !== peg$FAILED) {\n s3 = input.substring(s2, peg$currPos);\n }\n s2 = s3;\n if (s2 !== peg$FAILED) {\n s3 = peg$parserange();\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c127(s1, s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c123.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c124); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c123.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c124); }\n }\n }\n } else {\n s2 = peg$c0;\n }\n if (s2 !== peg$FAILED) {\n s2 = input.substring(s1, peg$currPos);\n }\n s1 = s2;\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = [];\n if (peg$c125.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c126); }\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c125.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c126); }\n }\n }\n if (s3 !== peg$FAILED) {\n s3 = input.substring(s2, peg$currPos);\n }\n s2 = s3;\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c128(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n }\n\n return s0;\n }\n\n function peg$parseviewName() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c123.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c124); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c123.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c124); }\n }\n }\n } else {\n s2 = peg$c0;\n }\n if (s2 !== peg$FAILED) {\n s2 = input.substring(s1, peg$currPos);\n }\n s1 = s2;\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = [];\n if (peg$c125.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c126); }\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c125.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c126); }\n }\n }\n if (s3 !== peg$FAILED) {\n s3 = input.substring(s2, peg$currPos);\n }\n s2 = s3;\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c128(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parserange() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c129) {\n s1 = peg$c129;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c130); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s2 = peg$c0;\n }\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c131(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s1 = peg$c0;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s2 = peg$c132;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c133); }\n }\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s3 = peg$c0;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c134(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c0;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = [];\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c71.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c72); }\n }\n }\n } else {\n s1 = peg$c0;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c135(s1);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n\n function extend(dst) {\n for (var i = 1; i < arguments.length; i++) {\n for (var k in arguments[i]) {\n dst[k] = arguments[i][k];\n }\n }\n return dst;\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail({ type: \"end\", description: \"end of input\" });\n }\n\n throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);\n }\n }\n\n return {\n SyntaxError: SyntaxError,\n parse: parse\n };\n})();\n\nconst Orientation = {\n HORIZONTAL: 1,\n VERTICAL: 2,\n ZINDEX: 4\n};\n\n/**\n * Helper function that inserts equal spacers (~).\n * @private\n */\nfunction _processEqualSpacer(context, stackView) {\n\n // Determine unique name for the spacer\n context.equalSpacerIndex = context.equalSpacerIndex || 1;\n const name = '_~' + context.lineIndex + ':' + context.equalSpacerIndex + '~';\n if (context.equalSpacerIndex > 1) {\n\n // Ensure that all spacers have the same width/height\n context.constraints.push({\n view1: '_~' + context.lineIndex + ':1~',\n attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT,\n relation: context.relation.relation || Relation.EQU,\n view2: name,\n attr2: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT,\n priority: context.relation.priority\n });\n }\n context.equalSpacerIndex++;\n\n // Enforce view/proportional width/height\n if (context.relation.view || (context.relation.multiplier && (context.relation.multiplier !== 1))) {\n context.constraints.push({\n view1: name,\n attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT,\n relation: context.relation.relation || Relation.EQU,\n view2: context.relation.view,\n attr2: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT,\n priority: context.relation.priority,\n multiplier: context.relation.multiplier\n });\n context.relation.multiplier = undefined;\n }\n else if (context.relation.constant) {\n context.constraints.push({\n view1: name,\n attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT,\n relation: Relation.EQU,\n view2: null,\n attr2: Attribute.CONST,\n priority: context.relation.priority,\n constant: context.relation.constant\n });\n context.relation.constant = undefined;\n }\n\n // Add constraint\n for (var i = 0; i < context.prevViews.length; i++) {\n const prevView = context.prevViews[i];\n switch (context.orientation) {\n case Orientation.HORIZONTAL:\n context.prevAttr = (prevView !== stackView) ? Attribute.RIGHT : Attribute.LEFT;\n context.curAttr = Attribute.LEFT;\n break;\n case Orientation.VERTICAL:\n context.prevAttr = (prevView !== stackView) ? Attribute.BOTTOM : Attribute.TOP;\n context.curAttr = Attribute.TOP;\n break;\n case Orientation.ZINDEX:\n context.prevAttr = Attribute.ZINDEX;\n context.curAttr = Attribute.ZINDEX;\n context.relation.constant = (prevView !== stackView) ? 'default' : 0;\n break;\n }\n context.constraints.push({\n view1: prevView,\n attr1: context.prevAttr,\n relation: context.relation.relation,\n view2: name,\n attr2: context.curAttr,\n priority: context.relation.priority\n });\n }\n context.prevViews = [name];\n}\n\n/**\n * Helper function that inserts proportional spacers (-12%-).\n * @private\n */\nfunction _processProportionalSpacer(context, stackView) {\n context.proportionalSpacerIndex = context.proportionalSpacerIndex || 1;\n const name = '_-' + context.lineIndex + ':' + context.proportionalSpacerIndex + '-';\n context.proportionalSpacerIndex++;\n context.constraints.push({\n view1: name,\n attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT,\n relation: context.relation.relation || Relation.EQU,\n view2: context.relation.view, // or relative to the stackView... food for thought\n attr2: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT,\n priority: context.relation.priority,\n multiplier: context.relation.multiplier\n });\n context.relation.multiplier = undefined;\n\n // Add constraint\n for (var i = 0; i < context.prevViews.length; i++) {\n const prevView = context.prevViews[i];\n switch (context.orientation) {\n case Orientation.HORIZONTAL:\n context.prevAttr = (prevView !== stackView) ? Attribute.RIGHT : Attribute.LEFT;\n context.curAttr = Attribute.LEFT;\n break;\n case Orientation.VERTICAL:\n context.prevAttr = (prevView !== stackView) ? Attribute.BOTTOM : Attribute.TOP;\n context.curAttr = Attribute.TOP;\n break;\n case Orientation.ZINDEX:\n context.prevAttr = Attribute.ZINDEX;\n context.curAttr = Attribute.ZINDEX;\n context.relation.constant = (prevView !== stackView) ? 'default' : 0;\n break;\n }\n context.constraints.push({\n view1: prevView,\n attr1: context.prevAttr,\n relation: context.relation.relation,\n view2: name,\n attr2: context.curAttr,\n priority: context.relation.priority\n });\n }\n context.prevViews = [name];\n}\n\n/**\n * In case of a stack-view, set constraints for opposite orientations\n * @private\n */\nfunction _processStackView(context, name, subView) {\n let viewName;\n for (var orientation = 1; orientation <= 4; orientation *= 2) {\n if ((subView.orientations & orientation) &&\n (subView.stack.orientation !== orientation) &&\n !(subView.stack.processedOrientations & orientation)) {\n subView.stack.processedOrientations = subView.stack.processedOrientations | orientation;\n viewName = viewName || {\n name: name,\n type: 'stack'\n };\n for (var i = 0, j = subView.stack.subViews.length; i < j; i++) {\n if (orientation === Orientation.ZINDEX) {\n context.constraints.push({\n view1: viewName,\n attr1: Attribute.ZINDEX,\n relation: Relation.EQU,\n view2: subView.stack.subViews[i],\n attr2: Attribute.ZINDEX\n });\n }\n else {\n context.constraints.push({\n view1: viewName,\n attr1: (orientation === Orientation.VERTICAL) ? Attribute.HEIGHT : Attribute.WIDTH,\n relation: Relation.EQU,\n view2: subView.stack.subViews[i],\n attr2: (orientation === Orientation.VERTICAL) ? Attribute.HEIGHT : Attribute.WIDTH\n });\n context.constraints.push({\n view1: viewName,\n attr1: (orientation === Orientation.VERTICAL) ? Attribute.TOP : Attribute.LEFT,\n relation: Relation.EQU,\n view2: subView.stack.subViews[i],\n attr2: (orientation === Orientation.VERTICAL) ? Attribute.TOP : Attribute.LEFT\n });\n }\n }\n }\n }\n}\n\n/**\n * Recursive helper function converts a view-name and a range to a series\n * of view-names (e.g. [child1, child2, child3, ...]).\n * @private\n */\nfunction _getRange(name, range) {\n if (range === true) {\n range = name.match(/\\.\\.\\d+$/);\n if (range) {\n name = name.substring(0, name.length - range[0].length);\n range = parseInt(range[0].substring(2));\n }\n }\n if (!range) {\n return [name];\n }\n var start = name.match(/\\d+$/);\n var res = [];\n var i;\n if (start) {\n name = name.substring(0, name.length - start[0].length);\n for (i = parseInt(start); i <= range; i++) {\n res.push(name + i);\n }\n }\n else {\n res.push(name);\n for (i = 2; i <= range; i++) {\n res.push(name + i);\n }\n }\n return res;\n}\n\n/**\n * Recursive helper function that processes the cascaded data.\n * @private\n */\nfunction _processCascade(context, cascade, parentItem) {\n const stackView = parentItem ? parentItem.view : null;\n const subViews = [];\n let curViews = [];\n let subView;\n if (stackView) {\n cascade.push({view: stackView});\n curViews.push(stackView);\n }\n for (var i = 0; i < cascade.length; i++) {\n let item = cascade[i];\n if ((!Array.isArray(item) && item.hasOwnProperty('view')) ||\n (Array.isArray(item) && item[0].view && !item[0].relation)) {\n const items = Array.isArray(item) ? item : [item];\n for (var z = 0; z < items.length; z++) {\n item = items[z];\n const viewRange = (item === ',') ? [] : item.view ? _getRange(item.view, item.range) : [null];\n for (var r = 0; r < viewRange.length; r++) {\n const curView = viewRange[r];\n curViews.push(curView);\n\n //\n // Add this view to the collection of subViews\n //\n if (curView !== stackView) {\n subViews.push(curView);\n subView = context.subViews[curView];\n if (!subView) {\n subView = {orientations: 0};\n context.subViews[curView] = subView;\n }\n subView.orientations = subView.orientations | context.orientation;\n if (subView.stack) {\n _processStackView(context, curView, subView);\n }\n }\n\n //\n // Process the relationship between this and the previous views\n //\n if ((context.prevViews !== undefined) && (curView !== undefined) && context.relation) {\n if (context.relation.relation !== 'none') {\n for (var p = 0; p < context.prevViews.length; p++) {\n const prevView = context.prevViews[p];\n switch (context.orientation) {\n case Orientation.HORIZONTAL:\n context.prevAttr = (prevView !== stackView) ? Attribute.RIGHT : Attribute.LEFT;\n context.curAttr = (curView !== stackView) ? Attribute.LEFT : Attribute.RIGHT;\n break;\n case Orientation.VERTICAL:\n context.prevAttr = (prevView !== stackView) ? Attribute.BOTTOM : Attribute.TOP;\n context.curAttr = (curView !== stackView) ? Attribute.TOP : Attribute.BOTTOM;\n break;\n case Orientation.ZINDEX:\n context.prevAttr = Attribute.ZINDEX;\n context.curAttr = Attribute.ZINDEX;\n context.relation.constant = !prevView ? 0 : (context.relation.constant || 'default');\n break;\n }\n context.constraints.push({\n view1: prevView,\n attr1: context.prevAttr,\n relation: context.relation.relation,\n view2: curView,\n attr2: context.curAttr,\n multiplier: context.relation.multiplier,\n constant: ((context.relation.constant === 'default') || !context.relation.constant) ? context.relation.constant : -context.relation.constant,\n priority: context.relation.priority\n });\n }\n }\n }\n\n //\n // Process view size constraints\n //\n const constraints = item.constraints;\n if (constraints) {\n for (var n = 0; n < constraints.length; n++) {\n context.prevAttr = context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT;\n context.curAttr = (constraints[n].view || constraints[n].multiplier) ?\n (constraints[n].attribute || context.prevAttr) :\n (constraints[n].variable ? Attribute.VARIABLE : Attribute.CONST);\n context.constraints.push({\n view1: curView,\n attr1: context.prevAttr,\n relation: constraints[n].relation,\n view2: constraints[n].view,\n attr2: context.curAttr,\n multiplier: constraints[n].multiplier,\n constant: constraints[n].constant,\n priority: constraints[n].priority\n });\n }\n }\n\n //\n // Process cascaded data (child stack-views)\n //\n if (item.cascade) {\n _processCascade(context, item.cascade, item);\n }\n }\n }\n }\n else if (item !== ',') {\n context.prevViews = curViews;\n curViews = [];\n context.relation = item[0];\n if (context.prevViews !== undefined) {\n if (context.relation.equalSpacing) {\n _processEqualSpacer(context, stackView);\n }\n if (context.relation.multiplier) {\n _processProportionalSpacer(context, stackView);\n }\n }\n }\n }\n\n if (stackView) {\n subView = context.subViews[stackView];\n if (!subView) {\n subView = {orientations: context.orientation};\n context.subViews[stackView] = subView;\n }\n else if (subView.stack) {\n const err = new Error('A stack named \"' + stackView + '\" has already been created');\n err.column = parentItem.$parserOffset + 1;\n throw err;\n }\n subView.stack = {\n orientation: context.orientation,\n processedOrientations: context.orientation,\n subViews: subViews\n };\n _processStackView(context, stackView, subView);\n }\n}\n\nconst metaInfoCategories = [\n 'viewport',\n 'spacing',\n 'colors',\n 'shapes',\n 'widths',\n 'heights'\n];\n\n/**\n * VisualFormat\n *\n * @namespace VisualFormat\n */\nclass VisualFormat {\n\n /**\n * Parses a single line of vfl into an array of constraint definitions.\n *\n * When the visual-format could not be succesfully parsed an exception is thrown containing\n * additional info about the parse error and column position.\n *\n * @param {String} visualFormat Visual format string (cannot contain line-endings!).\n * @param {Object} [options] Configuration options.\n * @param {Boolean} [options.extended] When set to true uses the extended syntax (default: false).\n * @param {String} [options.outFormat] Output format (`constraints` or `raw`) (default: `constraints`).\n * @param {Number} [options.lineIndex] Line-index used when auto generating equal-spacing constraints.\n * @return {Array} Array of constraint definitions.\n */\n static parseLine(visualFormat, options) {\n if ((visualFormat.length === 0) ||\n (options && options.extended && (visualFormat.indexOf('//') === 0))) {\n return [];\n }\n const res = (options && options.extended) ? parserExt.parse(visualFormat) : parser.parse(visualFormat);\n if (options && options.outFormat === 'raw') {\n return [res];\n }\n let context = {\n constraints: [],\n lineIndex: (options ? options.lineIndex : undefined) || 1,\n subViews: (options ? options.subViews : undefined) || {}\n };\n if (res.type === 'attribute') {\n for (let n = 0; n < res.attributes.length; n++) {\n const attr = res.attributes[n];\n for (let m = 0; m < attr.predicates.length; m++) {\n const predicate = attr.predicates[m];\n context.constraints.push({\n view1: res.view,\n attr1: attr.attr,\n relation: predicate.relation,\n view2: predicate.view,\n attr2: predicate.attribute || attr.attr,\n multiplier: predicate.multiplier,\n constant: predicate.constant,\n priority: predicate.priority\n });\n }\n }\n } else {\n switch (res.orientation) {\n case 'horizontal':\n context.orientation = Orientation.HORIZONTAL;\n context.horizontal = true;\n _processCascade(context, res.cascade, null);\n break;\n case 'vertical':\n context.orientation = Orientation.VERTICAL;\n _processCascade(context, res.cascade, null);\n break;\n case 'horzvert':\n context.orientation = Orientation.HORIZONTAL;\n context.horizontal = true;\n _processCascade(context, res.cascade, null);\n context = {\n constraints: context.constraints,\n lineIndex: context.lineIndex,\n subViews: context.subViews,\n orientation: Orientation.VERTICAL\n };\n _processCascade(context, res.cascade, null);\n break;\n case 'zIndex':\n context.orientation = Orientation.ZINDEX;\n _processCascade(context, res.cascade, null);\n break;\n }\n }\n return context.constraints;\n }\n\n /**\n * Parses one or more visual format strings into an array of constraint definitions.\n *\n * When the visual-format could not be succesfully parsed an exception is thrown containing\n * additional info about the parse error and column position.\n *\n * @param {String|Array} visualFormat One or more visual format strings.\n * @param {Object} [options] Configuration options.\n * @param {Boolean} [options.extended] When set to true uses the extended syntax (default: false).\n * @param {Boolean} [options.strict] When set to false trims any leading/trailing spaces and ignores empty lines (default: true).\n * @param {String} [options.lineSeparator] String that defines the end of a line (default `\\n`).\n * @param {String} [options.outFormat] Output format (`constraints` or `raw`) (default: `constraints`).\n * @return {Array} Array of constraint definitions.\n */\n static parse(visualFormat, options) {\n const lineSeparator = (options && options.lineSeparator) ? options.lineSeparator : '\\n';\n if (!Array.isArray(visualFormat) && (visualFormat.indexOf(lineSeparator) < 0)) {\n try {\n return this.parseLine(visualFormat, options);\n }\n catch (err) {\n err.source = visualFormat;\n throw err;\n }\n }\n\n // Decompose visual-format into an array of strings, and within those strings\n // search for line-endings, and treat each line as a seperate visual-format.\n visualFormat = Array.isArray(visualFormat) ? visualFormat : [visualFormat];\n let lines;\n let constraints = [];\n let lineIndex = 0;\n let line;\n const parseOptions = {\n lineIndex: lineIndex,\n extended: (options && options.extended),\n strict: (options && (options.strict !== undefined)) ? options.strict : true,\n outFormat: options ? options.outFormat : undefined,\n subViews: {}\n };\n try {\n for (var i = 0; i < visualFormat.length; i++) {\n lines = visualFormat[i].split(lineSeparator);\n for (var j = 0; j < lines.length; j++) {\n line = lines[j];\n lineIndex++;\n parseOptions.lineIndex = lineIndex;\n if (!parseOptions.strict) {\n line = line.trim();\n }\n if (parseOptions.strict || line.length) {\n constraints = constraints.concat(this.parseLine(line, parseOptions));\n }\n }\n }\n }\n catch (err) {\n err.source = line;\n err.line = lineIndex;\n throw err;\n }\n return constraints;\n }\n\n /**\n * Parses meta information from the comments in the VFL.\n *\n * Additional meta information can be specified in the comments\n * for previewing and rendering purposes. For instance, the view-port\n * aspect-ratio, sub-view widths and colors, can be specified. The\n * following example renders three colored circles in the visual-format editor:\n *\n * ```vfl\n * //viewport aspect-ratio:3/1 max-height:300\n * //colors red:#FF0000 green:#00FF00 blue:#0000FF\n * //shapes red:circle green:circle blue:circle\n * H:|-[row:[red(green,blue)]-[green]-[blue]]-|\n * V:|[row]|\n * ```\n *\n * Supported categories and properties:\n *\n * |Category|Property|Example|\n * |--------|--------|-------|\n * |`viewport`|`aspect-ratio:{width}/{height}`|`//viewport aspect-ratio:16/9`|\n * ||`width:[{number}/intrinsic]`|`//viewport width:10`|\n * ||`height:[{number}/intrinsic]`|`//viewport height:intrinsic`|\n * ||`min-width:{number}`|\n * ||`max-width:{number}`|\n * ||`min-height:{number}`|\n * ||`max-height:{number}`|\n * |`spacing`|`[{number}/array]`|`//spacing:8` or `//spacing:[10, 20, 5]`|\n * |`widths`|`{view-name}:[{number}/intrinsic]`|`//widths subview1:100`|\n * |`heights`|`{view-name}:[{number}/intrinsic]`|`//heights subview1:intrinsic`|\n * |`colors`|`{view-name}:{color}`|`//colors redview:#FF0000 blueview:#00FF00`|\n * |`shapes`|`{view-name}:[circle/square]`|`//shapes avatar:circle`|\n *\n * @param {String|Array} visualFormat One or more visual format strings.\n * @param {Object} [options] Configuration options.\n * @param {String} [options.lineSeparator] String that defines the end of a line (default `\\n`).\n * @param {String} [options.prefix] When specified, also processes the categories using that prefix (e.g. \"-dev-viewport max-height:10\").\n * @return {Object} meta-info\n */\n static parseMetaInfo(visualFormat, options) {\n const lineSeparator = (options && options.lineSeparator) ? options.lineSeparator : '\\n';\n const prefix = options ? options.prefix : undefined;\n visualFormat = Array.isArray(visualFormat) ? visualFormat : [visualFormat];\n const metaInfo = {};\n var key;\n for (var k = 0; k < visualFormat.length; k++) {\n const lines = visualFormat[k].split(lineSeparator);\n for (var i = 0; i < lines.length; i++) {\n const line = lines[i];\n for (var c = 0; c < metaInfoCategories.length; c++) {\n for (var s = 0; s < (prefix ? 2 : 1); s++) {\n const category = metaInfoCategories[c];\n const prefixedCategory = ((s === 0) ? '' : prefix) + category;\n if (line.indexOf('//' + prefixedCategory + ' ') === 0) {\n const items = line.substring(3 + prefixedCategory.length).split(' ');\n for (var j = 0; j < items.length; j++) {\n metaInfo[category] = metaInfo[category] || {};\n const item = items[j].split(':');\n const names = _getRange(item[0], true);\n for (var r = 0; r < names.length; r++) {\n metaInfo[category][names[r]] = (item.length > 1) ? item[1] : '';\n }\n }\n }\n else if (line.indexOf('//' + prefixedCategory + ':') === 0) {\n metaInfo[category] = line.substring(3 + prefixedCategory.length);\n }\n }\n }\n }\n }\n if (metaInfo.viewport) {\n const viewport = metaInfo.viewport;\n var aspectRatio = viewport['aspect-ratio'];\n if (aspectRatio) {\n aspectRatio = aspectRatio.split('/');\n viewport['aspect-ratio'] = parseInt(aspectRatio[0]) / parseInt(aspectRatio[1]);\n }\n if (viewport.height !== undefined) {\n viewport.height = (viewport.height === 'intrinsic') ? true : parseInt(viewport.height);\n }\n if (viewport.width !== undefined) {\n viewport.width = (viewport.width === 'intrinsic') ? true : parseInt(viewport.width);\n }\n if (viewport['max-height'] !== undefined) {\n viewport['max-height'] = parseInt(viewport['max-height']);\n }\n if (viewport['max-width'] !== undefined) {\n viewport['max-width'] = parseInt(viewport['max-width']);\n }\n if (viewport['min-height'] !== undefined) {\n viewport['min-height'] = parseInt(viewport['min-height']);\n }\n if (viewport['min-width'] !== undefined) {\n viewport['min-width'] = parseInt(viewport['min-width']);\n }\n }\n if (metaInfo.widths) {\n for (key in metaInfo.widths) {\n const width = (metaInfo.widths[key] === 'intrinsic') ? true : parseInt(metaInfo.widths[key]);\n metaInfo.widths[key] = width;\n if ((width === undefined) || isNaN(width)) {\n delete metaInfo.widths[key];\n }\n }\n }\n if (metaInfo.heights) {\n for (key in metaInfo.heights) {\n const height = (metaInfo.heights[key] === 'intrinsic') ? true : parseInt(metaInfo.heights[key]);\n metaInfo.heights[key] = height;\n if ((height === undefined) || isNaN(height)) {\n delete metaInfo.heights[key];\n }\n }\n }\n if (metaInfo.spacing) {\n const value = JSON.parse(metaInfo.spacing);\n metaInfo.spacing = value;\n if (Array.isArray(value)){\n for (var sIdx = 0, len = value.length; sIdx < len; sIdx++) {\n if (isNaN(value[sIdx])){\n delete metaInfo.spacing;\n break;\n }\n }\n } else if (value === undefined || isNaN(value)){\n delete metaInfo.spacing;\n }\n }\n return metaInfo;\n }\n}\n\n/**\n * A SubView is automatically generated when constraints are added to a View.\n *\n * @namespace SubView\n */\nclass SubView {\n constructor(options) {\n this._name = options.name;\n this._type = options.type;\n this._solver = options.solver;\n this._attr = {};\n if (!options.name) {\n if (process.env.CASSOWARYJS) {\n this._attr[Attribute.LEFT] = new c.Variable();\n this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.LEFT], c.Strength.required));\n this._attr[Attribute.TOP] = new c.Variable();\n this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.TOP], c.Strength.required));\n this._attr[Attribute.ZINDEX] = new c.Variable();\n this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.ZINDEX], c.Strength.required));\n }\n else {\n this._attr[Attribute.LEFT] = new kiwi.Variable();\n this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.LEFT], kiwi.Operator.Eq, 0));\n this._attr[Attribute.TOP] = new kiwi.Variable();\n this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.TOP], kiwi.Operator.Eq, 0));\n this._attr[Attribute.ZINDEX] = new kiwi.Variable();\n this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.ZINDEX], kiwi.Operator.Eq, 0));\n }\n }\n }\n toJSON() {\n return {\n name: this.name,\n left: this.left,\n top: this.top,\n width: this.width,\n height: this.height\n };\n }\n toString() {\n JSON.stringify(this.toJSON(), undefined, 2);\n }\n\n /**\n * Name of the sub-view.\n * @readonly\n * @type {String}\n */\n get name() {\n return this._name;\n }\n\n /**\n * Left value (`Attribute.LEFT`).\n * @readonly\n * @type {Number}\n */\n get left() {\n return this._getAttrValue(Attribute.LEFT);\n }\n\n /**\n * Right value (`Attribute.RIGHT`).\n * @readonly\n * @type {Number}\n */\n get right() {\n return this._getAttrValue(Attribute.RIGHT);\n }\n\n /**\n * Width value (`Attribute.WIDTH`).\n * @type {Number}\n */\n get width() {\n return this._getAttrValue(Attribute.WIDTH);\n }\n\n /**\n * Height value (`Attribute.HEIGHT`).\n * @readonly\n * @type {Number}\n */\n get height() {\n return this._getAttrValue(Attribute.HEIGHT);\n }\n\n /**\n * Intrinsic width of the sub-view.\n *\n * Use this property to explicitely set the width of the sub-view, e.g.:\n * ```javascript\n * var view = new AutoLayout.View(AutoLayout.VisualFormat.parse('|[child1][child2]|'), {\n * width: 500\n * });\n * view.subViews.child1.intrinsicWidth = 100;\n * console.log('child2 width: ' + view.subViews.child2.width); // 400\n * ```\n *\n * @type {Number}\n */\n get intrinsicWidth() {\n return this._intrinsicWidth;\n }\n set intrinsicWidth(value) {\n if ((value !== undefined) && (value !== this._intrinsicWidth)) {\n const attr = this._getAttr(Attribute.WIDTH);\n if (this._intrinsicWidth === undefined) {\n if (process.env.CASSOWARYJS) {\n this._solver.addEditVar(attr, new c.Strength('required', this._name ? 998 : 999, 1000, 1000));\n }\n else {\n this._solver.addEditVariable(attr, kiwi.Strength.create(this._name ? 998 : 999, 1000, 1000));\n }\n }\n this._intrinsicWidth = value;\n this._solver.suggestValue(attr, value);\n if (process.env.CASSOWARYJS) {\n this._solver.resolve();\n }\n else {\n this._solver.updateVariables();\n }\n }\n }\n\n /**\n * Intrinsic height of the sub-view.\n *\n * See `intrinsicWidth`.\n *\n * @type {Number}\n */\n get intrinsicHeight() {\n return this._intrinsicHeight;\n }\n set intrinsicHeight(value) {\n if ((value !== undefined) && (value !== this._intrinsicHeight)) {\n const attr = this._getAttr(Attribute.HEIGHT);\n if (this._intrinsicHeight === undefined) {\n if (process.env.CASSOWARYJS) {\n this._solver.addEditVar(attr, new c.Strength('required', this._name ? 998 : 999, 1000, 1000));\n }\n else {\n this._solver.addEditVariable(attr, kiwi.Strength.create(this._name ? 998 : 999, 1000, 1000));\n }\n }\n this._intrinsicHeight = value;\n this._solver.suggestValue(attr, value);\n if (process.env.CASSOWARYJS) {\n this._solver.resolve();\n }\n else {\n this._solver.updateVariables();\n }\n }\n }\n\n /**\n * Top value (`Attribute.TOP`).\n * @readonly\n * @type {Number}\n */\n get top() {\n return this._getAttrValue(Attribute.TOP);\n }\n\n /**\n * Bottom value (`Attribute.BOTTOM`).\n * @readonly\n * @type {Number}\n */\n get bottom() {\n return this._getAttrValue(Attribute.BOTTOM);\n }\n\n /**\n * Horizontal center (`Attribute.CENTERX`).\n * @readonly\n * @type {Number}\n */\n get centerX() {\n return this._getAttrValue(Attribute.CENTERX);\n }\n\n /**\n * Vertical center (`Attribute.CENTERY`).\n * @readonly\n * @type {Number}\n */\n get centerY() {\n return this._getAttrValue(Attribute.CENTERY);\n }\n\n /**\n * Z-index (`Attribute.ZINDEX`).\n * @readonly\n * @type {Number}\n */\n get zIndex() {\n return this._getAttrValue(Attribute.ZINDEX);\n }\n\n /**\n * Returns the type of the sub-view.\n * @readonly\n * @type {String}\n */\n get type() {\n return this._type;\n }\n\n /**\n * Gets the value of one of the attributes.\n *\n * @param {String|Attribute} attr Attribute name (e.g. 'right', 'centerY', Attribute.TOP).\n * @return {Number} value or `undefined`\n */\n getValue(attr) {\n return this._attr[attr] ? this._attr[attr].value() : undefined;\n }\n\n /**\n * @private\n */\n _getAttr(attr) {\n if (this._attr[attr]) {\n return this._attr[attr];\n }\n this._attr[attr] = process.env.CASSOWARYJS ? new c.Variable() : new kiwi.Variable();\n switch (attr) {\n case Attribute.RIGHT:\n this._getAttr(Attribute.LEFT);\n this._getAttr(Attribute.WIDTH);\n if (process.env.CASSOWARYJS) {\n this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.LEFT], this._attr[Attribute.WIDTH])));\n }\n else {\n this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.LEFT].plus(this._attr[Attribute.WIDTH])));\n }\n break;\n case Attribute.BOTTOM:\n this._getAttr(Attribute.TOP);\n this._getAttr(Attribute.HEIGHT);\n if (process.env.CASSOWARYJS) {\n this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.TOP], this._attr[Attribute.HEIGHT])));\n }\n else {\n this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.TOP].plus(this._attr[Attribute.HEIGHT])));\n }\n break;\n case Attribute.CENTERX:\n this._getAttr(Attribute.LEFT);\n this._getAttr(Attribute.WIDTH);\n if (process.env.CASSOWARYJS) {\n this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.LEFT], c.divide(this._attr[Attribute.WIDTH], 2))));\n }\n else {\n this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.LEFT].plus(this._attr[Attribute.WIDTH].divide(2))));\n }\n break;\n case Attribute.CENTERY:\n this._getAttr(Attribute.TOP);\n this._getAttr(Attribute.HEIGHT);\n if (process.env.CASSOWARYJS) {\n this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.TOP], c.divide(this._attr[Attribute.HEIGHT], 2))));\n }\n else {\n this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.TOP].plus(this._attr[Attribute.HEIGHT].divide(2))));\n }\n break;\n }\n if (!process.env.CASSOWARYJS) {\n this._solver.updateVariables();\n }\n return this._attr[attr];\n }\n\n /**\n * @private\n */\n _getAttrValue(attr) {\n if (process.env.CASSOWARYJS) {\n return this._getAttr(attr).value;\n }\n else {\n return this._getAttr(attr).value();\n }\n }\n}\n\nconst defaultPriorityStrength = process.env.CASSOWARYJS ? new c.Strength('defaultPriority', 0, 1000, 1000) : kiwi.Strength.create(0, 1000, 1000);\n\nfunction _getConst(name, value) {\n if (process.env.CASSOWARYJS) {\n const vr = new c.Variable({value: value});\n this._solver.addConstraint(new c.StayConstraint(vr, c.Strength.required, 0));\n return vr;\n }\n else {\n const vr = new kiwi.Variable();\n this._solver.addConstraint(new kiwi.Constraint(vr, kiwi.Operator.Eq, value));\n return vr;\n }\n}\n\nfunction _getSubView(viewName) {\n if (!viewName) {\n return this._parentSubView;\n }\n else if (viewName.name) {\n this._subViews[viewName.name] = this._subViews[viewName.name] || new SubView({\n name: viewName.name,\n solver: this._solver\n });\n this._subViews[viewName.name]._type = this._subViews[viewName.name]._type || viewName.type;\n return this._subViews[viewName.name];\n }\n else {\n this._subViews[viewName] = this._subViews[viewName] || new SubView({\n name: viewName,\n solver: this._solver\n });\n return this._subViews[viewName];\n }\n}\n\nfunction _getSpacing(constraint) {\n let index = 4;\n if (!constraint.view1 && (constraint.attr1 === 'left')) {\n index = 3;\n }\n else if (!constraint.view1 && (constraint.attr1 === 'top')) {\n index = 0;\n }\n else if (!constraint.view2 && (constraint.attr2 === 'right')) {\n index = 1;\n }\n else if (!constraint.view2 && (constraint.attr2 === 'bottom')) {\n index = 2;\n }\n else {\n switch (constraint.attr1) {\n case 'left':\n case 'right':\n case 'centerX':\n case 'leading':\n case 'trailing':\n index = 4;\n break;\n case 'zIndex':\n index = 6;\n break;\n default:\n index = 5;\n }\n }\n this._spacingVars = this._spacingVars || new Array(7);\n this._spacingExpr = this._spacingExpr || new Array(7);\n if (!this._spacingVars[index]) {\n if (process.env.CASSOWARYJS) {\n this._spacingVars[index] = new c.Variable();\n this._solver.addEditVar(this._spacingVars[index]);\n this._spacingExpr[index] = c.minus(0, this._spacingVars[index]);\n }\n else {\n this._spacingVars[index] = new kiwi.Variable();\n this._solver.addEditVariable(this._spacingVars[index], kiwi.Strength.create(999, 1000, 1000));\n this._spacingExpr[index] = this._spacingVars[index].multiply(-1);\n }\n this._solver.suggestValue(this._spacingVars[index], this._spacing[index]);\n }\n return this._spacingExpr[index];\n}\n\nfunction _addConstraint(constraint) {\n //this.constraints.push(constraint);\n let relation;\n const multiplier = (constraint.multiplier !== undefined) ? constraint.multiplier : 1;\n let constant = (constraint.constant !== undefined) ? constraint.constant : 0;\n if (constant === 'default') {\n constant = _getSpacing.call(this, constraint);\n }\n const attr1 = _getSubView.call(this, constraint.view1)._getAttr(constraint.attr1);\n let attr2;\n if (process.env.CASSOWARYJS) {\n if (constraint.attr2 === Attribute.CONST) {\n attr2 = _getConst.call(this, undefined, constraint.constant);\n }\n else {\n attr2 = _getSubView.call(this, constraint.view2)._getAttr(constraint.attr2);\n if ((multiplier !== 1) && constant) {\n attr2 = c.plus(c.times(attr2, multiplier), constant);\n }\n else if (constant) {\n attr2 = c.plus(attr2, constant);\n }\n else if (multiplier !== 1) {\n attr2 = c.times(attr2, multiplier);\n }\n }\n const strength = ((constraint.priority !== undefined) && (constraint.priority < 1000)) ? new c.Strength('priority', 0, constraint.priority, 1000) : defaultPriorityStrength;\n switch (constraint.relation) {\n case Relation.EQU:\n relation = new c.Equation(attr1, attr2, strength);\n break;\n case Relation.GEQ:\n relation = new c.Inequality(attr1, c.GEQ, attr2, strength);\n break;\n case Relation.LEQ:\n relation = new c.Inequality(attr1, c.LEQ, attr2, strength);\n break;\n default:\n throw 'Invalid relation specified: ' + constraint.relation;\n }\n }\n else {\n if (constraint.attr2 === Attribute.CONST) {\n attr2 = _getConst.call(this, undefined, constraint.constant);\n }\n else {\n attr2 = _getSubView.call(this, constraint.view2)._getAttr(constraint.attr2);\n if ((multiplier !== 1) && constant) {\n attr2 = attr2.multiply(multiplier).plus(constant);\n }\n else if (constant) {\n attr2 = attr2.plus(constant);\n }\n else if (multiplier !== 1) {\n attr2 = attr2.multiply(multiplier);\n }\n }\n const strength = ((constraint.priority !== undefined) && (constraint.priority < 1000)) ? kiwi.Strength.create(0, constraint.priority, 1000) : defaultPriorityStrength;\n switch (constraint.relation) {\n case Relation.EQU:\n relation = new kiwi.Constraint(attr1, kiwi.Operator.Eq, attr2, strength);\n break;\n case Relation.GEQ:\n relation = new kiwi.Constraint(attr1, kiwi.Operator.Ge, attr2, strength);\n break;\n case Relation.LEQ:\n relation = new kiwi.Constraint(attr1, kiwi.Operator.Le, attr2, strength);\n break;\n default:\n throw 'Invalid relation specified: ' + constraint.relation;\n }\n }\n this._solver.addConstraint(relation);\n}\n\nfunction _compareSpacing(old, newz) {\n if (old === newz) {\n return true;\n }\n if (!old || !newz) {\n return false;\n }\n for (var i = 0; i < 7; i++) {\n if (old[i] !== newz[i]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * AutoLayoutJS API reference.\n *\n * ### Index\n *\n * |Entity|Type|Description|\n * |---|---|---|\n * |[AutoLayout](#autolayout)|`namespace`|Top level AutoLayout object.|\n * |[VisualFormat](#autolayoutvisualformat--object)|`namespace`|Parses VFL into constraints.|\n * |[View](#autolayoutview)|`class`|Main entity for adding & evaluating constraints.|\n * |[SubView](#autolayoutsubview--object)|`class`|SubView's are automatically created when constraints are added to views. They give access to the evaluated results.|\n * |[Attribute](#autolayoutattribute--enum)|`enum`|Attribute types that are supported when adding constraints.|\n * |[Relation](#autolayoutrelation--enum)|`enum`|Relationship types that are supported when adding constraints.|\n * |[Priority](#autolayoutpriority--enum)|`enum`|Default priority values for when adding constraints.|\n *\n * ### AutoLayout\n *\n * @module AutoLayout\n */\nclass View {\n\n /**\n * @class View\n * @param {Object} [options] Configuration options.\n * @param {Number} [options.width] Initial width of the view.\n * @param {Number} [options.height] Initial height of the view.\n * @param {Number|Object} [options.spacing] Spacing for the view (default: 8) (see `setSpacing`).\n * @param {Array} [options.constraints] One or more constraint definitions (see `addConstraints`).\n */\n constructor(options) {\n this._solver = process.env.CASSOWARYJS ? new c.SimplexSolver() : new kiwi.Solver();\n this._subViews = {};\n //this._spacing = undefined;\n this._parentSubView = new SubView({\n solver: this._solver\n });\n this.setSpacing((options && (options.spacing !== undefined)) ? options.spacing : 8);\n //this.constraints = [];\n if (options) {\n if ((options.width !== undefined) || (options.height !== undefined)) {\n this.setSize(options.width, options.height);\n }\n if (options.constraints) {\n this.addConstraints(options.constraints);\n }\n }\n }\n\n /**\n * Sets the width and height of the view.\n *\n * @param {Number} width Width of the view.\n * @param {Number} height Height of the view.\n * @return {View} this\n */\n setSize(width, height /*, depth*/) {\n this._parentSubView.intrinsicWidth = width;\n this._parentSubView.intrinsicHeight = height;\n return this;\n }\n\n /**\n * Width that was set using `setSize`.\n * @readonly\n * @type {Number}\n */\n get width() {\n return this._parentSubView.intrinsicWidth;\n }\n\n /**\n * Height that was set using `setSize`.\n * @readonly\n * @type {Number}\n */\n get height() {\n return this._parentSubView.intrinsicHeight;\n }\n\n /**\n * Width that is calculated from the constraints and the `.intrinsicWidth` of\n * the sub-views.\n *\n * When the width has been explicitely set using `setSize`, the fittingWidth\n * will **always** be the same as the explicitely set width. To calculate the size\n * based on the content, use:\n * ```javascript\n * var view = new AutoLayout.View({\n * constraints: VisualFormat.parse('|-[view1]-[view2]-'),\n * spacing: 20\n * });\n * view.subViews.view1.intrinsicWidth = 100;\n * view.subViews.view2.intrinsicWidth = 100;\n * console.log('fittingWidth: ' + view.fittingWidth); // 260\n * ```\n *\n * @readonly\n * @type {Number}\n */\n get fittingWidth() {\n return this._parentSubView.width;\n }\n\n /**\n * Height that is calculated from the constraints and the `.intrinsicHeight` of\n * the sub-views.\n *\n * See `.fittingWidth`.\n *\n * @readonly\n * @type {Number}\n */\n get fittingHeight() {\n return this._parentSubView.height;\n }\n\n /**\n * Sets the spacing for the view.\n *\n * The spacing can be set for 7 different variables:\n * `top`, `right`, `bottom`, `left`, `width`, `height` and `zIndex`. The `left`-spacing is\n * used when a spacer is used between the parent-view and a sub-view (e.g. `|-[subView]`).\n * The same is true for the `right`, `top` and `bottom` spacers. The `width` and `height` are\n * used for spacers in between sub-views (e.g. `[view1]-[view2]`).\n *\n * Instead of using the full spacing syntax, it is also possible to use shorthand notations:\n *\n * |Syntax|Type|Description|\n * |---|---|---|\n * |`[top, right, bottom, left, width, height, zIndex]`|Array(7)|Full syntax including z-index **(clockwise order)**.|\n * |`[top, right, bottom, left, width, height]`|Array(6)|Full horizontal & vertical spacing syntax (no z-index) **(clockwise order)**.|\n * |`[horizontal, vertical, zIndex]`|Array(3)|Horizontal = left, right, width, vertical = top, bottom, height.|\n * |`[horizontal, vertical]`|Array(2)|Horizontal = left, right, width, vertical = top, bottom, height, z-index = 1.|\n * |`spacing`|Number|Horizontal & vertical spacing are all the same, z-index = 1.|\n *\n * Examples:\n * ```javascript\n * view.setSpacing(10); // horizontal & vertical spacing 10\n * view.setSpacing([10, 15, 2]); // horizontal spacing 10, vertical spacing 15, z-axis spacing 2\n * view.setSpacing([10, 20, 10, 20, 5, 5]); // top, right, bottom, left, horizontal, vertical\n * view.setSpacing([10, 20, 10, 20, 5, 5, 1]); // top, right, bottom, left, horizontal, vertical, z\n * ```\n *\n * @param {Number|Array} spacing\n * @return {View} this\n */\n setSpacing(spacing) {\n // convert spacing into array: [top, right, bottom, left, horz, vert, z-index]\n switch (Array.isArray(spacing) ? spacing.length : -1) {\n case -1: spacing = [spacing, spacing, spacing, spacing, spacing, spacing, 1]; break;\n case 1: spacing = [spacing[0], spacing[0], spacing[0], spacing[0], spacing[0], spacing[0], 1]; break;\n case 2: spacing = [spacing[1], spacing[0], spacing[1], spacing[0], spacing[0], spacing[1], 1]; break;\n case 3: spacing = [spacing[1], spacing[0], spacing[1], spacing[0], spacing[0], spacing[1], spacing[2]]; break;\n case 6: spacing = [spacing[0], spacing[1], spacing[2], spacing[3], spacing[4], spacing[5], 1]; break;\n case 7: break;\n default: throw 'Invalid spacing syntax';\n }\n if (!_compareSpacing(this._spacing, spacing)) {\n this._spacing = spacing;\n // update spacing variables\n if (this._spacingVars) {\n for (var i = 0; i < this._spacingVars.length; i++) {\n if (this._spacingVars[i]) {\n this._solver.suggestValue(this._spacingVars[i], this._spacing[i]);\n }\n }\n if (process.env.CASSOWARYJS) {\n this._solver.resolve();\n }\n else {\n this._solver.updateVariables();\n }\n }\n }\n return this;\n }\n\n /**\n * Adds a constraint definition.\n *\n * A constraint definition has the following format:\n *\n * ```javascript\n * constraint: {\n * view1: {String},\n * attr1: {AutoLayout.Attribute},\n * relation: {AutoLayout.Relation},\n * view2: {String},\n * attr2: {AutoLayout.Attribute},\n * multiplier: {Number},\n * constant: {Number},\n * priority: {Number}(0..1000)\n * }\n * ```\n * @param {Object} constraint Constraint definition.\n * @return {View} this\n */\n addConstraint(constraint) {\n _addConstraint.call(this, constraint);\n if (!process.env.CASSOWARYJS) {\n this._solver.updateVariables();\n }\n return this;\n }\n\n /**\n * Adds one or more constraint definitions.\n *\n * A constraint definition has the following format:\n *\n * ```javascript\n * constraint: {\n * view1: {String},\n * attr1: {AutoLayout.Attribute},\n * relation: {AutoLayout.Relation},\n * view2: {String},\n * attr2: {AutoLayout.Attribute},\n * multiplier: {Number},\n * constant: {Number},\n * priority: {Number}(0..1000)\n * }\n * ```\n * @param {Array} constraints One or more constraint definitions.\n * @return {View} this\n */\n addConstraints(constraints) {\n for (var j = 0; j < constraints.length; j++) {\n _addConstraint.call(this, constraints[j]);\n }\n if (!process.env.CASSOWARYJS) {\n this._solver.updateVariables();\n }\n return this;\n }\n\n /**\n * Dictionary of `SubView` objects that have been created when adding constraints.\n * @readonly\n * @type {Object.SubView}\n */\n get subViews() {\n return this._subViews;\n }\n\n /**\n * Checks whether the constraints incompletely specify the location\n * of the subViews.\n * @private\n */\n //get hasAmbiguousLayout() {\n // Todo\n //}\n}\n\n//import DOM from './DOM';\n\n/**\n * AutoLayout.\n *\n * @namespace AutoLayout\n * @property {Attribute} Attribute\n * @property {Relation} Relation\n * @property {Priority} Priority\n * @property {VisualFormat} VisualFormat\n * @property {View} View\n * @property {SubView} SubView\n */\nvar AutoLayout = {\n Attribute: Attribute,\n Relation: Relation,\n Priority: Priority,\n VisualFormat: VisualFormat,\n View: View,\n SubView: SubView\n //DOM: DOM\n};\n\nmodule.exports = AutoLayout;","/**\n * Parts Copyright (C) 2011-2012, Alex Russell (slightlyoff@chromium.org)\n * Parts Copyright (C) Copyright (C) 1998-2000 Greg J. Badros\n *\n * Use of this source code is governed by the LGPL, which can be found in the\n * COPYING.LGPL file.\n *\n * This is a compiled version of Cassowary/JS. For source versions or to\n * contribute, see the github project:\n *\n * https://github.com/slightlyoff/cassowary-js-refactor\n *\n */\n\n(function() {\n(function(a){\"use strict\";try{(function(){}).bind(a)}catch(b){Object.defineProperty(Function.prototype,\"bind\",{value:function(a){var b=this;return function(){return b.apply(a,arguments)}},enumerable:!1,configurable:!0,writable:!0})}var c=a.HTMLElement!==void 0,d=function(a){for(var b=null;a&&a!=Object.prototype;){if(a.tagName){b=a.tagName;break}a=a.prototype}return b||\"div\"},e=1e-8,f={},g=function(a,b){if(a&&b){if(\"function\"==typeof a[b])return a[b];var c=a.prototype;if(c&&\"function\"==typeof c[b])return c[b];if(c!==Object.prototype&&c!==Function.prototype)return\"function\"==typeof a.__super__?g(a.__super__,b):void 0}},h=a.c={debug:!1,trace:!1,verbose:!1,traceAdded:!1,GC:!1,GEQ:1,LEQ:2,inherit:function(b){var e=null,g=null;b[\"extends\"]&&(g=b[\"extends\"],delete b[\"extends\"]),b.initialize&&(e=b.initialize,delete b.initialize);var h=e||function(){};Object.defineProperty(h,\"__super__\",{value:g?g:Object,enumerable:!1,configurable:!0,writable:!1}),b._t&&(f[b._t]=h);var i=h.prototype=Object.create(g?g.prototype:Object.prototype);if(this.extend(i,b),c&&g&&g.prototype instanceof a.HTMLElement){var j=h,k=d(i),l=function(a){return a.__proto__=i,j.apply(a,arguments),i.created&&a.created(),i.decorate&&a.decorate(),a};this.extend(i,{upgrade:l}),h=function(){return l(a.document.createElement(k))},h.prototype=i,this.extend(h,{ctor:j})}return h},extend:function(a,b){return this.own(b,function(c){var d=Object.getOwnPropertyDescriptor(b,c);try{\"function\"==typeof d.get||\"function\"==typeof d.set?Object.defineProperty(a,c,d):\"function\"==typeof d.value||\"_\"===c.charAt(0)?(d.writable=!0,d.configurable=!0,d.enumerable=!1,Object.defineProperty(a,c,d)):a[c]=b[c]}catch(e){}}),a},own:function(b,c,d){return Object.getOwnPropertyNames(b).forEach(c,d||a),b},traceprint:function(a){h.verbose&&console.log(a)},fnenterprint:function(a){console.log(\"* \"+a)},fnexitprint:function(a){console.log(\"- \"+a)},assert:function(a,b){if(!a)throw new h.InternalError(\"Assertion failed: \"+b)},plus:function(a,b){return a instanceof h.Expression||(a=new h.Expression(a)),b instanceof h.Expression||(b=new h.Expression(b)),a.plus(b)},minus:function(a,b){return a instanceof h.Expression||(a=new h.Expression(a)),b instanceof h.Expression||(b=new h.Expression(b)),a.minus(b)},times:function(a,b){return(\"number\"==typeof a||a instanceof h.Variable)&&(a=new h.Expression(a)),(\"number\"==typeof b||b instanceof h.Variable)&&(b=new h.Expression(b)),a.times(b)},divide:function(a,b){return(\"number\"==typeof a||a instanceof h.Variable)&&(a=new h.Expression(a)),(\"number\"==typeof b||b instanceof h.Variable)&&(b=new h.Expression(b)),a.divide(b)},approx:function(a,b){if(a===b)return!0;var c,d;return c=a instanceof h.Variable?a.value:a,d=b instanceof h.Variable?b.value:b,0==c?e>Math.abs(d):0==d?e>Math.abs(c):Math.abs(c-d)64||this._deleted>this._compactThreshold&&(this._compact(),this._deleted=0)},\"delete\":function(a){a=b(a),this._store.hasOwnProperty(a)&&(this._deleted++,delete this._store[a],this.size>0&&this.size--)},each:function(a,b){if(this.size){this._perhapsCompact();var c=this._store,d=this._keyStrMap;Object.keys(this._store).forEach(function(e){a.call(b||null,d[e],c[e])},this)}},escapingEach:function(a,b){if(this.size){this._perhapsCompact();for(var c=this,e=this._store,f=this._keyStrMap,g=d,h=Object.keys(e),i=0;h.length>i;i++)if(function(d){c._store.hasOwnProperty(d)&&(g=a.call(b||null,f[d],e[d]))}(h[i]),g){if(void 0!==g.retval)return g;if(g.brk)break}}},clone:function(){var b=new a.HashTable;return this.size&&(b.size=this.size,c(this._store,b._store),c(this._keyStrMap,b._keyStrMap)),b},equals:function(b){if(b===this)return!0;if(!(b instanceof a.HashTable)||b._size!==this._size)return!1;for(var c=Object.keys(this._store),d=0;c.length>d;d++){var e=c[d];if(this._keyStrMap[e]!==b._keyStrMap[e]||this._store[e]!==b._store[e])return!1}return!0},toString:function(){var b=\"\";return this.each(function(a,c){b+=a+\" => \"+c+\"\\n\"}),b}})}(this.c||module.parent.exports||{}),function(a){\"use strict\";a.HashSet=a.inherit({_t:\"c.HashSet\",initialize:function(){this.storage=[],this.size=0},add:function(a){var b=this.storage;b.indexOf(a),-1==b.indexOf(a)&&b.push(a),this.size=this.storage.length},values:function(){return this.storage},has:function(a){var b=this.storage;return-1!=b.indexOf(a)},\"delete\":function(a){var b=this.storage.indexOf(a);return-1==b?null:(this.storage.splice(b,1)[0],this.size=this.storage.length,void 0)},clear:function(){this.storage.length=0},each:function(a,b){this.size&&this.storage.forEach(a,b)},escapingEach:function(a,b){this.size&&this.storage.forEach(a,b)},toString:function(){var a=this.size+\" {\",b=!0;return this.each(function(c){b?b=!1:a+=\", \",a+=c}),a+=\"}\\n\"},toJSON:function(){var a=[];return this.each(function(b){a.push(b.toJSON())}),{_t:\"c.HashSet\",data:a}},fromJSON:function(b){var c=new a.HashSet;return b.data&&(c.size=b.data.length,c.storage=b.data),c}})}(this.c||module.parent.exports||{}),function(a){\"use strict\";a.Error=a.inherit({initialize:function(a){a&&(this._description=a)},_name:\"c.Error\",_description:\"An error has occured in Cassowary\",set description(a){this._description=a},get description(){return\"(\"+this._name+\") \"+this._description},get message(){return this.description},toString:function(){return this.description}});var b=function(b,c){return a.inherit({\"extends\":a.Error,initialize:function(){a.Error.apply(this,arguments)},_name:b||\"\",_description:c||\"\"})};a.ConstraintNotFound=b(\"c.ConstraintNotFound\",\"Tried to remove a constraint never added to the tableu\"),a.InternalError=b(\"c.InternalError\"),a.NonExpression=b(\"c.NonExpression\",\"The resulting expression would be non\"),a.NotEnoughStays=b(\"c.NotEnoughStays\",\"There are not enough stays to give specific values to every variable\"),a.RequiredFailure=b(\"c.RequiredFailure\",\"A required constraint cannot be satisfied\"),a.TooDifficult=b(\"c.TooDifficult\",\"The constraints are too difficult to solve\")}(this.c||module.parent.exports||{}),function(a){\"use strict\";var b=1e3;a.SymbolicWeight=a.inherit({_t:\"c.SymbolicWeight\",initialize:function(){this.value=0;for(var a=1,c=arguments.length-1;c>=0;--c)this.value+=arguments[c]*a,a*=b},toJSON:function(){return{_t:this._t,value:this.value}}})}(this.c||module.parent.exports||{}),function(a){a.Strength=a.inherit({initialize:function(b,c,d,e){this.name=b,this.symbolicWeight=c instanceof a.SymbolicWeight?c:new a.SymbolicWeight(c,d,e)},get required(){return this===a.Strength.required},toString:function(){return this.name+(this.isRequired?\"\":\":\"+this.symbolicWeight)}}),a.Strength.required=new a.Strength(\"\",1e3,1e3,1e3),a.Strength.strong=new a.Strength(\"strong\",1,0,0),a.Strength.medium=new a.Strength(\"medium\",0,1,0),a.Strength.weak=new a.Strength(\"weak\",0,0,1)}(this.c||(\"undefined\"!=typeof module?module.parent.exports.c:{})),function(a){\"use strict\";a.AbstractVariable=a.inherit({isDummy:!1,isExternal:!1,isPivotable:!1,isRestricted:!1,_init:function(b,c){this.hashCode=a._inc(),this.name=(c||\"\")+this.hashCode,b&&(b.name!==void 0&&(this.name=b.name),b.value!==void 0&&(this.value=b.value),b.prefix!==void 0&&(this._prefix=b.prefix))},_prefix:\"\",name:\"\",value:0,toJSON:function(){var a={};return this._t&&(a._t=this._t),this.name&&(a.name=this.name),this.value!==void 0&&(a.value=this.value),this._prefix&&(a._prefix=this._prefix),this._t&&(a._t=this._t),a},fromJSON:function(b,c){var d=new c;return a.extend(d,b),d},toString:function(){return this._prefix+\"[\"+this.name+\":\"+this.value+\"]\"}}),a.Variable=a.inherit({_t:\"c.Variable\",\"extends\":a.AbstractVariable,initialize:function(b){this._init(b,\"v\");var c=a.Variable._map;c&&(c[this.name]=this)},isExternal:!0}),a.DummyVariable=a.inherit({_t:\"c.DummyVariable\",\"extends\":a.AbstractVariable,initialize:function(a){this._init(a,\"d\")},isDummy:!0,isRestricted:!0,value:\"dummy\"}),a.ObjectiveVariable=a.inherit({_t:\"c.ObjectiveVariable\",\"extends\":a.AbstractVariable,initialize:function(a){this._init(a,\"o\")},value:\"obj\"}),a.SlackVariable=a.inherit({_t:\"c.SlackVariable\",\"extends\":a.AbstractVariable,initialize:function(a){this._init(a,\"s\")},isPivotable:!0,isRestricted:!0,value:\"slack\"})}(this.c||module.parent.exports||{}),function(a){\"use strict\";a.Point=a.inherit({initialize:function(b,c,d){if(b instanceof a.Variable)this._x=b;else{var e={value:b};d&&(e.name=\"x\"+d),this._x=new a.Variable(e)}if(c instanceof a.Variable)this._y=c;else{var f={value:c};d&&(f.name=\"y\"+d),this._y=new a.Variable(f)}},get x(){return this._x},set x(b){b instanceof a.Variable?this._x=b:this._x.value=b},get y(){return this._y},set y(b){b instanceof a.Variable?this._y=b:this._y.value=b},toString:function(){return\"(\"+this.x+\", \"+this.y+\")\"}})}(this.c||module.parent.exports||{}),function(a){\"use strict\";a.Expression=a.inherit({initialize:function(b,c,d){a.GC&&console.log(\"new c.Expression\"),this.constant=\"number\"!=typeof d||isNaN(d)?0:d,this.terms=new a.HashTable,b instanceof a.AbstractVariable?this.setVariable(b,\"number\"==typeof c?c:1):\"number\"==typeof b&&(isNaN(b)?console.trace():this.constant=b)},initializeFromHash:function(b,c){return a.verbose&&(console.log(\"*******************************\"),console.log(\"clone c.initializeFromHash\"),console.log(\"*******************************\")),a.GC&&console.log(\"clone c.Expression\"),this.constant=b,this.terms=c.clone(),this},multiplyMe:function(a){this.constant*=a;var b=this.terms;return b.each(function(c,d){b.set(c,d*a)}),this},clone:function(){a.verbose&&(console.log(\"*******************************\"),console.log(\"clone c.Expression\"),console.log(\"*******************************\"));var b=new a.Expression;return b.initializeFromHash(this.constant,this.terms),b},times:function(b){if(\"number\"==typeof b)return this.clone().multiplyMe(b);if(this.isConstant)return b.times(this.constant);if(b.isConstant)return this.times(b.constant);throw new a.NonExpression},plus:function(b){return b instanceof a.Expression?this.clone().addExpression(b,1):b instanceof a.Variable?this.clone().addVariable(b,1):void 0},minus:function(b){return b instanceof a.Expression?this.clone().addExpression(b,-1):b instanceof a.Variable?this.clone().addVariable(b,-1):void 0},divide:function(b){if(\"number\"==typeof b){if(a.approx(b,0))throw new a.NonExpression;return this.times(1/b)}if(b instanceof a.Expression){if(!b.isConstant)throw new a.NonExpression;return this.times(1/b.constant)}},addExpression:function(b,c,d,e){return b instanceof a.AbstractVariable&&(b=new a.Expression(b),a.trace&&console.log(\"addExpression: Had to cast a var to an expression\")),c=c||1,this.constant+=c*b.constant,b.terms.each(function(a,b){this.addVariable(a,b*c,d,e)},this),this},addVariable:function(b,c,d,e){null==c&&(c=1),a.trace&&console.log(\"c.Expression::addVariable():\",b,c);var f=this.terms.get(b);if(f){var g=f+c;0==g||a.approx(g,0)?(e&&e.noteRemovedVariable(b,d),this.terms.delete(b)):this.setVariable(b,g)}else a.approx(c,0)||(this.setVariable(b,c),e&&e.noteAddedVariable(b,d));return this},setVariable:function(a,b){return this.terms.set(a,b),this},anyPivotableVariable:function(){if(this.isConstant)throw new a.InternalError(\"anyPivotableVariable called on a constant\");var b=this.terms.escapingEach(function(a){return a.isPivotable?{retval:a}:void 0});return b&&void 0!==b.retval?b.retval:null},substituteOut:function(b,c,d,e){a.trace&&(a.fnenterprint(\"CLE:substituteOut: \"+b+\", \"+c+\", \"+d+\", ...\"),a.traceprint(\"this = \"+this));var f=this.setVariable.bind(this),g=this.terms,h=g.get(b);g.delete(b),this.constant+=h*c.constant,c.terms.each(function(b,c){var i=g.get(b);if(i){var j=i+h*c;a.approx(j,0)?(e.noteRemovedVariable(b,d),g.delete(b)):f(b,j)}else f(b,h*c),e&&e.noteAddedVariable(b,d)}),a.trace&&a.traceprint(\"Now this is \"+this)},changeSubject:function(a,b){this.setVariable(a,this.newSubject(b))},newSubject:function(b){a.trace&&a.fnenterprint(\"newSubject:\"+b);var c=1/this.terms.get(b);return this.terms.delete(b),this.multiplyMe(-c),c},coefficientFor:function(a){return this.terms.get(a)||0},get isConstant(){return 0==this.terms.size},toString:function(){var b=\"\",c=!1;if(!a.approx(this.constant,0)||this.isConstant){if(b+=this.constant,this.isConstant)return b;c=!0}return this.terms.each(function(a,d){c&&(b+=\" + \"),b+=d+\"*\"+a,c=!0}),b},equals:function(b){return b===this?!0:b instanceof a.Expression&&b.constant===this.constant&&b.terms.equals(this.terms)},Plus:function(a,b){return a.plus(b)},Minus:function(a,b){return a.minus(b)},Times:function(a,b){return a.times(b)},Divide:function(a,b){return a.divide(b)}})}(this.c||module.parent.exports||{}),function(a){\"use strict\";a.AbstractConstraint=a.inherit({initialize:function(b,c){this.hashCode=a._inc(),this.strength=b||a.Strength.required,this.weight=c||1},isEditConstraint:!1,isInequality:!1,isStayConstraint:!1,get required(){return this.strength===a.Strength.required},toString:function(){return this.strength+\" {\"+this.weight+\"} (\"+this.expression+\")\"}});var b=a.AbstractConstraint.prototype.toString,c=function(b,c,d){a.AbstractConstraint.call(this,c||a.Strength.strong,d),this.variable=b,this.expression=new a.Expression(b,-1,b.value)};a.EditConstraint=a.inherit({\"extends\":a.AbstractConstraint,initialize:function(){c.apply(this,arguments)},isEditConstraint:!0,toString:function(){return\"edit:\"+b.call(this)}}),a.StayConstraint=a.inherit({\"extends\":a.AbstractConstraint,initialize:function(){c.apply(this,arguments)},isStayConstraint:!0,toString:function(){return\"stay:\"+b.call(this)}});var d=a.Constraint=a.inherit({\"extends\":a.AbstractConstraint,initialize:function(b,c,d){a.AbstractConstraint.call(this,c,d),this.expression=b}});a.Inequality=a.inherit({\"extends\":a.Constraint,_cloneOrNewCle:function(b){return b.clone?b.clone():new a.Expression(b)},initialize:function(b,c,e,f,g){var h=b instanceof a.Expression,i=e instanceof a.Expression,j=b instanceof a.AbstractVariable,k=e instanceof a.AbstractVariable,l=\"number\"==typeof b,m=\"number\"==typeof e;if((h||l)&&k){var n=b,o=c,p=e,q=f,r=g;if(d.call(this,this._cloneOrNewCle(n),q,r),o==a.LEQ)this.expression.multiplyMe(-1),this.expression.addVariable(p);else{if(o!=a.GEQ)throw new a.InternalError(\"Invalid operator in c.Inequality constructor\");this.expression.addVariable(p,-1)}}else if(j&&(i||m)){var n=e,o=c,p=b,q=f,r=g;if(d.call(this,this._cloneOrNewCle(n),q,r),o==a.GEQ)this.expression.multiplyMe(-1),this.expression.addVariable(p);else{if(o!=a.LEQ)throw new a.InternalError(\"Invalid operator in c.Inequality constructor\");this.expression.addVariable(p,-1)}}else{if(h&&m){var s=b,o=c,t=e,q=f,r=g;if(d.call(this,this._cloneOrNewCle(s),q,r),o==a.LEQ)this.expression.multiplyMe(-1),this.expression.addExpression(this._cloneOrNewCle(t));else{if(o!=a.GEQ)throw new a.InternalError(\"Invalid operator in c.Inequality constructor\");this.expression.addExpression(this._cloneOrNewCle(t),-1)}return this}if(l&&i){var s=e,o=c,t=b,q=f,r=g;if(d.call(this,this._cloneOrNewCle(s),q,r),o==a.GEQ)this.expression.multiplyMe(-1),this.expression.addExpression(this._cloneOrNewCle(t));else{if(o!=a.LEQ)throw new a.InternalError(\"Invalid operator in c.Inequality constructor\");this.expression.addExpression(this._cloneOrNewCle(t),-1)}return this}if(h&&i){var s=b,o=c,t=e,q=f,r=g;if(d.call(this,this._cloneOrNewCle(t),q,r),o==a.GEQ)this.expression.multiplyMe(-1),this.expression.addExpression(this._cloneOrNewCle(s));else{if(o!=a.LEQ)throw new a.InternalError(\"Invalid operator in c.Inequality constructor\");this.expression.addExpression(this._cloneOrNewCle(s),-1)}}else{if(h)return d.call(this,b,c,e);if(c==a.GEQ)d.call(this,new a.Expression(e),f,g),this.expression.multiplyMe(-1),this.expression.addVariable(b);else{if(c!=a.LEQ)throw new a.InternalError(\"Invalid operator in c.Inequality constructor\");d.call(this,new a.Expression(e),f,g),this.expression.addVariable(b,-1)}}}},isInequality:!0,toString:function(){return d.prototype.toString.call(this)+\" >= 0) id: \"+this.hashCode}}),a.Equation=a.inherit({\"extends\":a.Constraint,initialize:function(b,c,e,f){if(b instanceof a.Expression&&!c||c instanceof a.Strength)d.call(this,b,c,e);else if(b instanceof a.AbstractVariable&&c instanceof a.Expression){var g=b,h=c,i=e,j=f;d.call(this,h.clone(),i,j),this.expression.addVariable(g,-1)}else if(b instanceof a.AbstractVariable&&\"number\"==typeof c){var g=b,k=c,i=e,j=f;d.call(this,new a.Expression(k),i,j),this.expression.addVariable(g,-1)}else if(b instanceof a.Expression&&c instanceof a.AbstractVariable){var h=b,g=c,i=e,j=f;d.call(this,h.clone(),i,j),this.expression.addVariable(g,-1)}else{if(!(b instanceof a.Expression||b instanceof a.AbstractVariable||\"number\"==typeof b)||!(c instanceof a.Expression||c instanceof a.AbstractVariable||\"number\"==typeof c))throw\"Bad initializer to c.Equation\";b=b instanceof a.Expression?b.clone():new a.Expression(b),c=c instanceof a.Expression?c.clone():new a.Expression(c),d.call(this,b,e,f),this.expression.addExpression(c,-1)}a.assert(this.strength instanceof a.Strength,\"_strength not set\")},toString:function(){return d.prototype.toString.call(this)+\" = 0)\"}})}(this.c||module.parent.exports||{}),function(a){\"use strict\";a.EditInfo=a.inherit({initialize:function(a,b,c,d,e){this.constraint=a,this.editPlus=b,this.editMinus=c,this.prevEditConstant=d,this.index=e},toString:function(){return\"\"}})}(this.c||module.parent.exports||{}),function(a){\"use strict\";a.Tableau=a.inherit({initialize:function(){this.columns=new a.HashTable,this.rows=new a.HashTable,this._infeasibleRows=new a.HashSet,this._externalRows=new a.HashSet,this._externalParametricVars=new a.HashSet},noteRemovedVariable:function(b,c){a.trace&&console.log(\"c.Tableau::noteRemovedVariable: \",b,c);var d=this.columns.get(b);c&&d&&d.delete(c)},noteAddedVariable:function(a,b){b&&this.insertColVar(a,b)},getInternalInfo:function(){var a=\"Tableau Information:\\n\";return a+=\"Rows: \"+this.rows.size,a+=\" (= \"+(this.rows.size-1)+\" constraints)\",a+=\"\\nColumns: \"+this.columns.size,a+=\"\\nInfeasible Rows: \"+this._infeasibleRows.size,a+=\"\\nExternal basic variables: \"+this._externalRows.size,a+=\"\\nExternal parametric variables: \",a+=this._externalParametricVars.size,a+=\"\\n\"},toString:function(){var a=\"Tableau:\\n\";return this.rows.each(function(b,c){a+=b,a+=\" <==> \",a+=c,a+=\"\\n\"}),a+=\"\\nColumns:\\n\",a+=this.columns,a+=\"\\nInfeasible rows: \",a+=this._infeasibleRows,a+=\"External basic variables: \",a+=this._externalRows,a+=\"External parametric variables: \",a+=this._externalParametricVars},insertColVar:function(b,c){var d=this.columns.get(b);d||(d=new a.HashSet,this.columns.set(b,d)),d.add(c)},addRow:function(b,c){a.trace&&a.fnenterprint(\"addRow: \"+b+\", \"+c),this.rows.set(b,c),c.terms.each(function(a){this.insertColVar(a,b),a.isExternal&&this._externalParametricVars.add(a)},this),b.isExternal&&this._externalRows.add(b),a.trace&&a.traceprint(\"\"+this)},removeColumn:function(b){a.trace&&a.fnenterprint(\"removeColumn:\"+b);var c=this.columns.get(b);c?(this.columns.delete(b),c.each(function(a){var c=this.rows.get(a);c.terms.delete(b)},this)):a.trace&&console.log(\"Could not find var\",b,\"in columns\"),b.isExternal&&(this._externalRows.delete(b),this._externalParametricVars.delete(b))},removeRow:function(b){a.trace&&a.fnenterprint(\"removeRow:\"+b);var c=this.rows.get(b);return a.assert(null!=c),c.terms.each(function(c){var e=this.columns.get(c);null!=e&&(a.trace&&console.log(\"removing from varset:\",b),e.delete(b))},this),this._infeasibleRows.delete(b),b.isExternal&&this._externalRows.delete(b),this.rows.delete(b),a.trace&&a.fnexitprint(\"returning \"+c),c},substituteOut:function(b,c){a.trace&&a.fnenterprint(\"substituteOut:\"+b+\", \"+c),a.trace&&a.traceprint(\"\"+this);var d=this.columns.get(b);d.each(function(a){var d=this.rows.get(a);d.substituteOut(b,c,a,this),a.isRestricted&&0>d.constant&&this._infeasibleRows.add(a)},this),b.isExternal&&(this._externalRows.add(b),this._externalParametricVars.delete(b)),this.columns.delete(b)},columnsHasKey:function(a){return!!this.columns.get(a)}})}(this.c||module.parent.exports||{}),function(a){var b=a.Tableau,c=b.prototype,d=1e-8,e=a.Strength.weak;a.SimplexSolver=a.inherit({\"extends\":a.Tableau,initialize:function(){a.Tableau.call(this),this._stayMinusErrorVars=[],this._stayPlusErrorVars=[],this._errorVars=new a.HashTable,this._markerVars=new a.HashTable,this._objective=new a.ObjectiveVariable({name:\"Z\"}),this._editVarMap=new a.HashTable,this._editVarList=[],this._slackCounter=0,this._artificialCounter=0,this._dummyCounter=0,this.autoSolve=!0,this._fNeedsSolving=!1,this._optimizeCount=0,this.rows.set(this._objective,new a.Expression),this._stkCedcns=[0],a.trace&&a.traceprint(\"objective expr == \"+this.rows.get(this._objective))},addLowerBound:function(b,c){var d=new a.Inequality(b,a.GEQ,new a.Expression(c));return this.addConstraint(d)},addUpperBound:function(b,c){var d=new a.Inequality(b,a.LEQ,new a.Expression(c));return this.addConstraint(d)},addBounds:function(a,b,c){return this.addLowerBound(a,b),this.addUpperBound(a,c),this},add:function(){for(var a=0;arguments.length>a;a++)this.addConstraint(arguments[a]);return this},addConstraint:function(b){a.trace&&a.fnenterprint(\"addConstraint: \"+b);var c=Array(2),d=Array(1),e=this.newExpression(b,c,d);if(d=d[0],this.tryAddingDirectly(e)||this.addWithArtificialVariable(e),this._fNeedsSolving=!0,b.isEditConstraint){var f=this._editVarMap.size,g=c[0],h=c[1];!g instanceof a.SlackVariable&&console.warn(\"cvEplus not a slack variable =\",g),!h instanceof a.SlackVariable&&console.warn(\"cvEminus not a slack variable =\",h),a.debug&&console.log(\"new c.EditInfo(\"+b+\", \"+g+\", \"+h+\", \"+d+\", \"+f+\")\");var i=new a.EditInfo(b,g,h,d,f);this._editVarMap.set(b.variable,i),this._editVarList[f]={v:b.variable,info:i}}return this.autoSolve&&(this.optimize(this._objective),this._setExternalVariables()),this},addConstraintNoException:function(b){a.trace&&a.fnenterprint(\"addConstraintNoException: \"+b);try{return this.addConstraint(b),!0}catch(c){return!1}},addEditVar:function(b,c){return a.trace&&a.fnenterprint(\"addEditVar: \"+b+\" @ \"+c),this.addConstraint(new a.EditConstraint(b,c||a.Strength.strong))},beginEdit:function(){return a.assert(this._editVarMap.size>0,\"_editVarMap.size > 0\"),this._infeasibleRows.clear(),this._resetStayConstants(),this._stkCedcns.push(this._editVarMap.size),this},endEdit:function(){return a.assert(this._editVarMap.size>0,\"_editVarMap.size > 0\"),this.resolve(),this._stkCedcns.pop(),this.removeEditVarsTo(this._stkCedcns[this._stkCedcns.length-1]),this},removeAllEditVars:function(){return this.removeEditVarsTo(0)},removeEditVarsTo:function(b){try{for(var c=this._editVarList.length,d=b;c>d;d++)this._editVarList[d]&&this.removeConstraint(this._editVarMap.get(this._editVarList[d].v).constraint);return this._editVarList.length=b,a.assert(this._editVarMap.size==b,\"_editVarMap.size == n\"),this}catch(e){throw new a.InternalError(\"Constraint not found in removeEditVarsTo\")}},addPointStays:function(b){return a.trace&&console.log(\"addPointStays\",b),b.forEach(function(a,b){this.addStay(a.x,e,Math.pow(2,b)),this.addStay(a.y,e,Math.pow(2,b))},this),this},addStay:function(b,c,d){var f=new a.StayConstraint(b,c||e,d||1);return this.addConstraint(f)},removeConstraint:function(a){return this.removeConstraintInternal(a),this},removeConstraintInternal:function(b){a.trace&&a.fnenterprint(\"removeConstraintInternal: \"+b),a.trace&&a.traceprint(\"\"+this),this._fNeedsSolving=!0,this._resetStayConstants();var c=this.rows.get(this._objective),d=this._errorVars.get(b);a.trace&&a.traceprint(\"eVars == \"+d),null!=d&&d.each(function(e){var f=this.rows.get(e);null==f?c.addVariable(e,-b.weight*b.strength.symbolicWeight.value,this._objective,this):c.addExpression(f,-b.weight*b.strength.symbolicWeight.value,this._objective,this),a.trace&&a.traceprint(\"now eVars == \"+d)},this);var e=this._markerVars.get(b);if(this._markerVars.delete(b),null==e)throw new a.InternalError(\"Constraint not found in removeConstraintInternal\");if(a.trace&&a.traceprint(\"Looking to remove var \"+e),null==this.rows.get(e)){var f=this.columns.get(e);a.trace&&a.traceprint(\"Must pivot -- columns are \"+f);var g=null,h=0;f.each(function(b){if(b.isRestricted){var c=this.rows.get(b),d=c.coefficientFor(e);if(a.trace&&a.traceprint(\"Marker \"+e+\"'s coefficient in \"+c+\" is \"+d),0>d){var f=-c.constant/d;(null==g||h>f||a.approx(f,h)&&b.hashCoded)&&(h=d,g=a)}},this)),null==g&&(0==f.size?this.removeColumn(e):f.escapingEach(function(a){return a!=this._objective?(g=a,{brk:!0}):void 0},this)),null!=g&&this.pivot(e,g)}if(null!=this.rows.get(e)&&this.removeRow(e),null!=d&&d.each(function(a){a!=e&&this.removeColumn(a)},this),b.isStayConstraint){if(null!=d)for(var j=0;this._stayPlusErrorVars.length>j;j++)d.delete(this._stayPlusErrorVars[j]),d.delete(this._stayMinusErrorVars[j])}else if(b.isEditConstraint){a.assert(null!=d,\"eVars != null\");var k=this._editVarMap.get(b.variable);this.removeColumn(k.editMinus),this._editVarMap.delete(b.variable)}return null!=d&&this._errorVars.delete(d),this.autoSolve&&(this.optimize(this._objective),this._setExternalVariables()),this},reset:function(){throw a.trace&&a.fnenterprint(\"reset\"),new a.InternalError(\"reset not implemented\")},resolveArray:function(b){a.trace&&a.fnenterprint(\"resolveArray\"+b);var c=b.length;this._editVarMap.each(function(a,d){var e=d.index;c>e&&this.suggestValue(a,b[e])},this),this.resolve()},resolvePair:function(a,b){this.suggestValue(this._editVarList[0].v,a),this.suggestValue(this._editVarList[1].v,b),this.resolve()},resolve:function(){a.trace&&a.fnenterprint(\"resolve()\"),this.dualOptimize(),this._setExternalVariables(),this._infeasibleRows.clear(),this._resetStayConstants()},suggestValue:function(b,c){a.trace&&console.log(\"suggestValue(\"+b+\", \"+c+\")\");var d=this._editVarMap.get(b);if(!d)throw new a.Error(\"suggestValue for variable \"+b+\", but var is not an edit variable\");var e=c-d.prevEditConstant;return d.prevEditConstant=c,this.deltaEditConstant(e,d.editPlus,d.editMinus),this},solve:function(){return this._fNeedsSolving&&(this.optimize(this._objective),this._setExternalVariables()),this},setEditedValue:function(b,c){if(!this.columnsHasKey(b)&&null==this.rows.get(b))return b.value=c,this;if(!a.approx(c,b.value)){this.addEditVar(b),this.beginEdit();try{this.suggestValue(b,c)}catch(d){throw new a.InternalError(\"Error in setEditedValue\")}this.endEdit()}return this},addVar:function(b){if(!this.columnsHasKey(b)&&null==this.rows.get(b)){try{this.addStay(b)}catch(c){throw new a.InternalError(\"Error in addVar -- required failure is impossible\")}a.trace&&a.traceprint(\"added initial stay on \"+b)}return this},getInternalInfo:function(){var a=c.getInternalInfo.call(this);return a+=\"\\nSolver info:\\n\",a+=\"Stay Error Variables: \",a+=this._stayPlusErrorVars.length+this._stayMinusErrorVars.length,a+=\" (\"+this._stayPlusErrorVars.length+\" +, \",a+=this._stayMinusErrorVars.length+\" -)\\n\",a+=\"Edit Variables: \"+this._editVarMap.size,a+=\"\\n\"},getDebugInfo:function(){return\"\"+this+this.getInternalInfo()+\"\\n\"},toString:function(){var a=c.getInternalInfo.call(this);return a+=\"\\n_stayPlusErrorVars: \",a+=\"[\"+this._stayPlusErrorVars+\"]\",a+=\"\\n_stayMinusErrorVars: \",a+=\"[\"+this._stayMinusErrorVars+\"]\",a+=\"\\n\",a+=\"_editVarMap:\\n\"+this._editVarMap,a+=\"\\n\"},getConstraintMap:function(){return this._markerVars},addWithArtificialVariable:function(b){a.trace&&a.fnenterprint(\"addWithArtificialVariable: \"+b);var c=new a.SlackVariable({value:++this._artificialCounter,prefix:\"a\"}),d=new a.ObjectiveVariable({name:\"az\"}),e=b.clone();a.trace&&a.traceprint(\"before addRows:\\n\"+this),this.addRow(d,e),this.addRow(c,b),a.trace&&a.traceprint(\"after addRows:\\n\"+this),this.optimize(d);var f=this.rows.get(d);if(a.trace&&a.traceprint(\"azTableauRow.constant == \"+f.constant),!a.approx(f.constant,0))throw this.removeRow(d),this.removeColumn(c),new a.RequiredFailure;var g=this.rows.get(c);if(null!=g){if(g.isConstant)return this.removeRow(c),this.removeRow(d),void 0;var h=g.anyPivotableVariable();this.pivot(h,c)}a.assert(null==this.rows.get(c),\"rowExpression(av) == null\"),this.removeColumn(c),this.removeRow(d)},tryAddingDirectly:function(b){a.trace&&a.fnenterprint(\"tryAddingDirectly: \"+b);var c=this.chooseSubject(b);return null==c?(a.trace&&a.fnexitprint(\"returning false\"),!1):(b.newSubject(c),this.columnsHasKey(c)&&this.substituteOut(c,b),this.addRow(c,b),a.trace&&a.fnexitprint(\"returning true\"),!0)},chooseSubject:function(b){a.trace&&a.fnenterprint(\"chooseSubject: \"+b);var c=null,d=!1,e=!1,f=b.terms,g=f.escapingEach(function(a,b){if(d){if(!a.isRestricted&&!this.columnsHasKey(a))return{retval:a}}else if(a.isRestricted){if(!e&&!a.isDummy&&0>b){var f=this.columns.get(a);(null==f||1==f.size&&this.columnsHasKey(this._objective))&&(c=a,e=!0)}}else c=a,d=!0},this);if(g&&void 0!==g.retval)return g.retval;if(null!=c)return c;var h=0,g=f.escapingEach(function(a,b){return a.isDummy?(this.columnsHasKey(a)||(c=a,h=b),void 0):{retval:null}},this);if(g&&void 0!==g.retval)return g.retval;if(!a.approx(b.constant,0))throw new a.RequiredFailure;return h>0&&b.multiplyMe(-1),c},deltaEditConstant:function(b,c,d){a.trace&&a.fnenterprint(\"deltaEditConstant :\"+b+\", \"+c+\", \"+d);var e=this.rows.get(c);if(null!=e)return e.constant+=b,0>e.constant&&this._infeasibleRows.add(c),void 0;var f=this.rows.get(d);if(null!=f)return f.constant+=-b,0>f.constant&&this._infeasibleRows.add(d),void 0;var g=this.columns.get(d);g||console.log(\"columnVars is null -- tableau is:\\n\"+this),g.each(function(a){var c=this.rows.get(a),e=c.coefficientFor(d);c.constant+=e*b,a.isRestricted&&0>c.constant&&this._infeasibleRows.add(a)},this)},dualOptimize:function(){a.trace&&a.fnenterprint(\"dualOptimize:\");for(var b=this.rows.get(this._objective);this._infeasibleRows.size;){var c=this._infeasibleRows.values()[0];this._infeasibleRows.delete(c);var d=null,e=this.rows.get(c);if(e&&0>e.constant){var g,f=Number.MAX_VALUE,h=e.terms;if(h.each(function(c,e){if(e>0&&c.isPivotable){var h=b.coefficientFor(c);g=h/e,(f>g||a.approx(g,f)&&c.hashCodef.constant&&f.multiplyMe(-1),a.trace&&a.fnexitprint(\"returning \"+f),f},optimize:function(b){a.trace&&a.fnenterprint(\"optimize: \"+b),a.trace&&a.traceprint(\"\"+this),this._optimizeCount++;var c=this.rows.get(b);a.assert(null!=c,\"zRow != null\");for(var g,h,e=null,f=null;;){if(g=0,h=c.terms,h.escapingEach(function(a,b){return a.isPivotable&&g>b?(g=b,e=a,{brk:1}):void 0},this),g>=-d)return;a.trace&&console.log(\"entryVar:\",e,\"objectiveCoeff:\",g);var i=Number.MAX_VALUE,j=this.columns.get(e),k=0;if(j.each(function(b){if(a.trace&&a.traceprint(\"Checking \"+b),b.isPivotable){var c=this.rows.get(b),d=c.coefficientFor(e);a.trace&&a.traceprint(\"pivotable, coeff = \"+d),0>d&&(k=-c.constant/d,(i>k||a.approx(k,i)&&b.hashCodeb;b++){var c=this.rows.get(this._stayPlusErrorVars[b]);null==c&&(c=this.rows.get(this._stayMinusErrorVars[b])),null!=c&&(c.constant=0)}},_setExternalVariables:function(){a.trace&&a.fnenterprint(\"_setExternalVariables:\"),a.trace&&a.traceprint(\"\"+this),this._externalParametricVars.each(function(b){null!=this.rows.get(b)?a.trace&&console.log(\"Error: variable\"+b+\" in _externalParametricVars is basic\"):b.value=0},this),this._externalRows.each(function(a){var b=this.rows.get(a);a.value!=b.constant&&(a.value=b.constant)},this),this._fNeedsSolving=!1,this.onsolved()},onsolved:function(){},insertErrorVar:function(b,c){a.trace&&a.fnenterprint(\"insertErrorVar:\"+b+\", \"+c);var d=this._errorVars.get(c);d||(d=new a.HashSet,this._errorVars.set(b,d)),d.add(c)}})}(this.c||module.parent.exports||{}),function(a){\"use strict\";a.Timer=a.inherit({initialize:function(){this.isRunning=!1,this._elapsedMs=0},start:function(){return this.isRunning=!0,this._startReading=new Date,this},stop:function(){return this.isRunning=!1,this._elapsedMs+=new Date-this._startReading,this},reset:function(){return this.isRunning=!1,this._elapsedMs=0,this},elapsedTime:function(){return this.isRunning?(this._elapsedMs+(new Date-this._startReading))/1e3:this._elapsedMs/1e3}})}(this.c||module.parent.exports||{}),__cassowary_parser=function(){function a(a){return'\"'+a.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\x08/g,\"\\\\b\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\f/g,\"\\\\f\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g,escape)+'\"'}var b={parse:function(b,c){function k(a){g>e||(e>g&&(g=e,h=[]),h.push(a))}function l(){var a,b,c,d,f;if(d=e,f=e,a=z(),null!==a){if(c=m(),null!==c)for(b=[];null!==c;)b.push(c),c=m();else b=null;null!==b?(c=z(),null!==c?a=[a,b,c]:(a=null,e=f)):(a=null,e=f)}else a=null,e=f;return null!==a&&(a=function(a,b){return b}(d,a[1])),null===a&&(e=d),a}function m(){var a,b,c,d;return c=e,d=e,a=P(),null!==a?(b=s(),null!==b?a=[a,b]:(a=null,e=d)):(a=null,e=d),null!==a&&(a=function(a,b){return b}(c,a[0])),null===a&&(e=c),a}function n(){var a;return b.length>e?(a=b.charAt(e),e++):(a=null,0===f&&k(\"any character\")),a}function o(){var a;return/^[a-zA-Z]/.test(b.charAt(e))?(a=b.charAt(e),e++):(a=null,0===f&&k(\"[a-zA-Z]\")),null===a&&(36===b.charCodeAt(e)?(a=\"$\",e++):(a=null,0===f&&k('\"$\"')),null===a&&(95===b.charCodeAt(e)?(a=\"_\",e++):(a=null,0===f&&k('\"_\"')))),a}function p(){var a;return f++,/^[\\t\\x0B\\f \\xA0\\uFEFF]/.test(b.charAt(e))?(a=b.charAt(e),e++):(a=null,0===f&&k(\"[\\\\t\\\\x0B\\\\f \\\\xA0\\\\uFEFF]\")),f--,0===f&&null===a&&k(\"whitespace\"),a}function q(){var a;return/^[\\n\\r\\u2028\\u2029]/.test(b.charAt(e))?(a=b.charAt(e),e++):(a=null,0===f&&k(\"[\\\\n\\\\r\\\\u2028\\\\u2029]\")),a}function r(){var a;return f++,10===b.charCodeAt(e)?(a=\"\\n\",e++):(a=null,0===f&&k('\"\\\\n\"')),null===a&&(\"\\r\\n\"===b.substr(e,2)?(a=\"\\r\\n\",e+=2):(a=null,0===f&&k('\"\\\\r\\\\n\"')),null===a&&(13===b.charCodeAt(e)?(a=\"\\r\",e++):(a=null,0===f&&k('\"\\\\r\"')),null===a&&(8232===b.charCodeAt(e)?(a=\"\\u2028\",e++):(a=null,0===f&&k('\"\\\\u2028\"')),null===a&&(8233===b.charCodeAt(e)?(a=\"\\u2029\",e++):(a=null,0===f&&k('\"\\\\u2029\"')))))),f--,0===f&&null===a&&k(\"end of line\"),a}function s(){var a,c,d;return d=e,a=z(),null!==a?(59===b.charCodeAt(e)?(c=\";\",e++):(c=null,0===f&&k('\";\"')),null!==c?a=[a,c]:(a=null,e=d)):(a=null,e=d),null===a&&(d=e,a=y(),null!==a?(c=r(),null!==c?a=[a,c]:(a=null,e=d)):(a=null,e=d),null===a&&(d=e,a=z(),null!==a?(c=t(),null!==c?a=[a,c]:(a=null,e=d)):(a=null,e=d))),a}function t(){var a,c;return c=e,f++,b.length>e?(a=b.charAt(e),e++):(a=null,0===f&&k(\"any character\")),f--,null===a?a=\"\":(a=null,e=c),a}function u(){var a;return f++,a=v(),null===a&&(a=x()),f--,0===f&&null===a&&k(\"comment\"),a}function v(){var a,c,d,g,h,i,j;if(h=e,\"/*\"===b.substr(e,2)?(a=\"/*\",e+=2):(a=null,0===f&&k('\"/*\"')),null!==a){for(c=[],i=e,j=e,f++,\"*/\"===b.substr(e,2)?(d=\"*/\",e+=2):(d=null,0===f&&k('\"*/\"')),f--,null===d?d=\"\":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==d;)c.push(d),i=e,j=e,f++,\"*/\"===b.substr(e,2)?(d=\"*/\",e+=2):(d=null,0===f&&k('\"*/\"')),f--,null===d?d=\"\":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==c?(\"*/\"===b.substr(e,2)?(d=\"*/\",e+=2):(d=null,0===f&&k('\"*/\"')),null!==d?a=[a,c,d]:(a=null,e=h)):(a=null,e=h)}else a=null,e=h;return a}function w(){var a,c,d,g,h,i,j;if(h=e,\"/*\"===b.substr(e,2)?(a=\"/*\",e+=2):(a=null,0===f&&k('\"/*\"')),null!==a){for(c=[],i=e,j=e,f++,\"*/\"===b.substr(e,2)?(d=\"*/\",e+=2):(d=null,0===f&&k('\"*/\"')),null===d&&(d=q()),f--,null===d?d=\"\":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==d;)c.push(d),i=e,j=e,f++,\"*/\"===b.substr(e,2)?(d=\"*/\",e+=2):(d=null,0===f&&k('\"*/\"')),null===d&&(d=q()),f--,null===d?d=\"\":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==c?(\"*/\"===b.substr(e,2)?(d=\"*/\",e+=2):(d=null,0===f&&k('\"*/\"')),null!==d?a=[a,c,d]:(a=null,e=h)):(a=null,e=h)}else a=null,e=h;return a}function x(){var a,c,d,g,h,i,j;if(h=e,\"//\"===b.substr(e,2)?(a=\"//\",e+=2):(a=null,0===f&&k('\"//\"')),null!==a){for(c=[],i=e,j=e,f++,d=q(),f--,null===d?d=\"\":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==d;)c.push(d),i=e,j=e,f++,d=q(),f--,null===d?d=\"\":(d=null,e=j),null!==d?(g=n(),null!==g?d=[d,g]:(d=null,e=i)):(d=null,e=i);null!==c?a=[a,c]:(a=null,e=h)}else a=null,e=h;return a}function y(){var a,b;for(a=[],b=p(),null===b&&(b=w(),null===b&&(b=x()));null!==b;)a.push(b),b=p(),null===b&&(b=w(),null===b&&(b=x()));return a}function z(){var a,b;for(a=[],b=p(),null===b&&(b=r(),null===b&&(b=u()));null!==b;)a.push(b),b=p(),null===b&&(b=r(),null===b&&(b=u()));return a}function A(){var a,b;return b=e,a=C(),null===a&&(a=B()),null!==a&&(a=function(a,b){return{type:\"NumericLiteral\",value:b}}(b,a)),null===a&&(e=b),a}function B(){var a,c,d;if(d=e,/^[0-9]/.test(b.charAt(e))?(c=b.charAt(e),e++):(c=null,0===f&&k(\"[0-9]\")),null!==c)for(a=[];null!==c;)a.push(c),/^[0-9]/.test(b.charAt(e))?(c=b.charAt(e),e++):(c=null,0===f&&k(\"[0-9]\"));else a=null;return null!==a&&(a=function(a,b){return parseInt(b.join(\"\"))}(d,a)),null===a&&(e=d),a}function C(){var a,c,d,g,h;return g=e,h=e,a=B(),null!==a?(46===b.charCodeAt(e)?(c=\".\",e++):(c=null,0===f&&k('\".\"')),null!==c?(d=B(),null!==d?a=[a,c,d]:(a=null,e=h)):(a=null,e=h)):(a=null,e=h),null!==a&&(a=function(a,b){return parseFloat(b.join(\"\"))}(g,a)),null===a&&(e=g),a}function D(){var a,c,d,g;if(g=e,/^[\\-+]/.test(b.charAt(e))?(a=b.charAt(e),e++):(a=null,0===f&&k(\"[\\\\-+]\")),a=null!==a?a:\"\",null!==a){if(/^[0-9]/.test(b.charAt(e))?(d=b.charAt(e),e++):(d=null,0===f&&k(\"[0-9]\")),null!==d)for(c=[];null!==d;)c.push(d),/^[0-9]/.test(b.charAt(e))?(d=b.charAt(e),e++):(d=null,0===f&&k(\"[0-9]\"));else c=null;null!==c?a=[a,c]:(a=null,e=g)}else a=null,e=g;return a}function E(){var a,b;return f++,b=e,a=F(),null!==a&&(a=function(a,b){return b}(b,a)),null===a&&(e=b),f--,0===f&&null===a&&k(\"identifier\"),a}function F(){var a,b,c,d,g;if(f++,d=e,g=e,a=o(),null!==a){for(b=[],c=o();null!==c;)b.push(c),c=o();null!==b?a=[a,b]:(a=null,e=g)}else a=null,e=g;return null!==a&&(a=function(a,b,c){return b+c.join(\"\")}(d,a[0],a[1])),null===a&&(e=d),f--,0===f&&null===a&&k(\"identifier\"),a}function G(){var a,c,d,g,h,i,j;return i=e,a=E(),null!==a&&(a=function(a,b){return{type:\"Variable\",name:b}}(i,a)),null===a&&(e=i),null===a&&(a=A(),null===a&&(i=e,j=e,40===b.charCodeAt(e)?(a=\"(\",e++):(a=null,0===f&&k('\"(\"')),null!==a?(c=z(),null!==c?(d=P(),null!==d?(g=z(),null!==g?(41===b.charCodeAt(e)?(h=\")\",e++):(h=null,0===f&&k('\")\"')),null!==h?a=[a,c,d,g,h]:(a=null,e=j)):(a=null,e=j)):(a=null,e=j)):(a=null,e=j)):(a=null,e=j),null!==a&&(a=function(a,b){return b}(i,a[2])),null===a&&(e=i))),a}function H(){var a,b,c,d,f;return a=G(),null===a&&(d=e,f=e,a=I(),null!==a?(b=z(),null!==b?(c=H(),null!==c?a=[a,b,c]:(a=null,e=f)):(a=null,e=f)):(a=null,e=f),null!==a&&(a=function(a,b,c){return{type:\"UnaryExpression\",operator:b,expression:c}}(d,a[0],a[2])),null===a&&(e=d)),a}function I(){var a;return 43===b.charCodeAt(e)?(a=\"+\",e++):(a=null,0===f&&k('\"+\"')),null===a&&(45===b.charCodeAt(e)?(a=\"-\",e++):(a=null,0===f&&k('\"-\"')),null===a&&(33===b.charCodeAt(e)?(a=\"!\",e++):(a=null,0===f&&k('\"!\"')))),a}function J(){var a,b,c,d,f,g,h,i,j;if(h=e,i=e,a=H(),null!==a){for(b=[],j=e,c=z(),null!==c?(d=K(),null!==d?(f=z(),null!==f?(g=H(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==c;)b.push(c),j=e,c=z(),null!==c?(d=K(),null!==d?(f=z(),null!==f?(g=H(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==b?a=[a,b]:(a=null,e=i)}else a=null,e=i;return null!==a&&(a=function(a,b,c){for(var d=b,e=0;c.length>e;e++)d={type:\"MultiplicativeExpression\",operator:c[e][1],left:d,right:c[e][3]};return d}(h,a[0],a[1])),null===a&&(e=h),a}function K(){var a;return 42===b.charCodeAt(e)?(a=\"*\",e++):(a=null,0===f&&k('\"*\"')),null===a&&(47===b.charCodeAt(e)?(a=\"/\",e++):(a=null,0===f&&k('\"/\"'))),a}function L(){var a,b,c,d,f,g,h,i,j;if(h=e,i=e,a=J(),null!==a){for(b=[],j=e,c=z(),null!==c?(d=M(),null!==d?(f=z(),null!==f?(g=J(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==c;)b.push(c),j=e,c=z(),null!==c?(d=M(),null!==d?(f=z(),null!==f?(g=J(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==b?a=[a,b]:(a=null,e=i)}else a=null,e=i;return null!==a&&(a=function(a,b,c){for(var d=b,e=0;c.length>e;e++)d={type:\"AdditiveExpression\",operator:c[e][1],left:d,right:c[e][3]};return d}(h,a[0],a[1])),null===a&&(e=h),a}function M(){var a;return 43===b.charCodeAt(e)?(a=\"+\",e++):(a=null,0===f&&k('\"+\"')),null===a&&(45===b.charCodeAt(e)?(a=\"-\",e++):(a=null,0===f&&k('\"-\"'))),a}function N(){var a,b,c,d,f,g,h,i,j;if(h=e,i=e,a=L(),null!==a){for(b=[],j=e,c=z(),null!==c?(d=O(),null!==d?(f=z(),null!==f?(g=L(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==c;)b.push(c),j=e,c=z(),null!==c?(d=O(),null!==d?(f=z(),null!==f?(g=L(),null!==g?c=[c,d,f,g]:(c=null,e=j)):(c=null,e=j)):(c=null,e=j)):(c=null,e=j);null!==b?a=[a,b]:(a=null,e=i)}else a=null,e=i;return null!==a&&(a=function(a,b,c){for(var d=b,e=0;c.length>e;e++)d={type:\"Inequality\",operator:c[e][1],left:d,right:c[e][3]};return d}(h,a[0],a[1])),null===a&&(e=h),a}function O(){var a;return\"<=\"===b.substr(e,2)?(a=\"<=\",e+=2):(a=null,0===f&&k('\"<=\"')),null===a&&(\">=\"===b.substr(e,2)?(a=\">=\",e+=2):(a=null,0===f&&k('\">=\"')),null===a&&(60===b.charCodeAt(e)?(a=\"<\",e++):(a=null,0===f&&k('\"<\"')),null===a&&(62===b.charCodeAt(e)?(a=\">\",e++):(a=null,0===f&&k('\">\"'))))),a}function P(){var a,c,d,g,h,i,j,l,m;if(j=e,l=e,a=N(),null!==a){for(c=[],m=e,d=z(),null!==d?(\"==\"===b.substr(e,2)?(g=\"==\",e+=2):(g=null,0===f&&k('\"==\"')),null!==g?(h=z(),null!==h?(i=N(),null!==i?d=[d,g,h,i]:(d=null,e=m)):(d=null,e=m)):(d=null,e=m)):(d=null,e=m);null!==d;)c.push(d),m=e,d=z(),null!==d?(\"==\"===b.substr(e,2)?(g=\"==\",e+=2):(g=null,0===f&&k('\"==\"')),null!==g?(h=z(),null!==h?(i=N(),null!==i?d=[d,g,h,i]:(d=null,e=m)):(d=null,e=m)):(d=null,e=m)):(d=null,e=m);null!==c?a=[a,c]:(a=null,e=l)}else a=null,e=l;return null!==a&&(a=function(a,b,c){for(var d=b,e=0;c.length>e;e++)d={type:\"Equality\",operator:c[e][1],left:d,right:c[e][3]};return d}(j,a[0],a[1])),null===a&&(e=j),a}function Q(a){a.sort();for(var b=null,c=[],d=0;a.length>d;d++)a[d]!==b&&(c.push(a[d]),b=a[d]);return c}function R(){for(var a=1,c=1,d=!1,f=0;Math.max(e,g)>f;f++){var h=b.charAt(f);\"\\n\"===h?(d||a++,c=1,d=!1):\"\\r\"===h||\"\\u2028\"===h||\"\\u2029\"===h?(a++,c=1,d=!0):(c++,d=!1)}return{line:a,column:c}}var d={start:l,Statement:m,SourceCharacter:n,IdentifierStart:o,WhiteSpace:p,LineTerminator:q,LineTerminatorSequence:r,EOS:s,EOF:t,Comment:u,MultiLineComment:v,MultiLineCommentNoLineTerminator:w,SingleLineComment:x,_:y,__:z,Literal:A,Integer:B,Real:C,SignedInteger:D,Identifier:E,IdentifierName:F,PrimaryExpression:G,UnaryExpression:H,UnaryOperator:I,MultiplicativeExpression:J,MultiplicativeOperator:K,AdditiveExpression:L,AdditiveOperator:M,InequalityExpression:N,InequalityOperator:O,LinearExpression:P};if(void 0!==c){if(void 0===d[c])throw Error(\"Invalid rule name: \"+a(c)+\".\")}else c=\"start\";var e=0,f=0,g=0,h=[],S=d[c]();if(null===S||e!==b.length){var T=Math.max(e,g),U=b.length>T?b.charAt(T):null,V=R();throw new this.SyntaxError(Q(h),U,T,V.line,V.column)}return S},toSource:function(){return this._source}};return b.SyntaxError=function(b,c,d,e,f){function g(b,c){var d,e;switch(b.length){case 0:d=\"end of input\";break;case 1:d=b[0];break;default:d=b.slice(0,b.length-1).join(\", \")+\" or \"+b[b.length-1]}return e=c?a(c):\"end of input\",\"Expected \"+d+\" but \"+e+\" found.\"}this.name=\"SyntaxError\",this.expected=b,this.found=c,this.message=g(b,c),this.offset=d,this.line=e,this.column=f},b.SyntaxError.prototype=Error.prototype,b}();\n}).call(\n (typeof module != \"undefined\") ?\n (module.compiled = true && module) : this\n);\n"]} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..b7d9d75 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,5937 @@ +{ + "name": "autolayout", + "version": "0.7.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@webassemblyjs/ast": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.3.tgz", + "integrity": "sha512-xy3m06+Iu4D32+6soz6zLnwznigXJRuFNTovBX2M4GqVqLb0dnyWLbPnpcXvUSdEN+9DVyDeaq2jyH1eIL2LZQ==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.8.3", + "@webassemblyjs/helper-wasm-bytecode": "1.8.3", + "@webassemblyjs/wast-parser": "1.8.3" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.3.tgz", + "integrity": "sha512-vq1TISG4sts4f0lDwMUM0f3kpe0on+G3YyV5P0IySHFeaLKRYZ++n2fCFfG4TcCMYkqFeTUYFxm75L3ddlk2xA==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.3.tgz", + "integrity": "sha512-BmWEynI4FnZbjk8CaYZXwcv9a6gIiu+rllRRouQUo73hglanXD3AGFJE7Q4JZCoVE0p5/jeX6kf5eKa3D4JxwQ==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.3.tgz", + "integrity": "sha512-iVIMhWnNHoFB94+/2l7LpswfCsXeMRnWfExKtqsZ/E2NxZyUx9nTeKK/MEMKTQNEpyfznIUX06OchBHQ+VKi/Q==", + "dev": true + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.3.tgz", + "integrity": "sha512-K1UxoJML7GKr1QXR+BG7eXqQkvu+eEeTjlSl5wUFQ6W6vaOc5OwSxTcb3oE9x/3+w4NHhrIKD4JXXCZmLdL2cg==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.8.3" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.3.tgz", + "integrity": "sha512-387zipfrGyO77/qm7/SDUiZBjQ5KGk4qkrVIyuoubmRNIiqn3g+6ijY8BhnlGqsCCQX5bYKOnttJobT5xoyviA==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.3.tgz", + "integrity": "sha512-lPLFdQfaRssfnGEJit5Sk785kbBPPPK4ZS6rR5W/8hlUO/5v3F+rN8XuUcMj/Ny9iZiyKhhuinWGTUuYL4VKeQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.3", + "mamacro": "^0.0.3" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.3.tgz", + "integrity": "sha512-R1nJW7bjyJLjsJQR5t3K/9LJ0QWuZezl8fGa49DZq4IVaejgvkbNlKEQxLYTC579zgT4IIIVHb5JA59uBPHXyw==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.3.tgz", + "integrity": "sha512-P6F7D61SJY73Yz+fs49Q3+OzlYAZP86OfSpaSY448KzUy65NdfzDmo2NPVte+Rw4562MxEAacvq/mnDuvRWOcg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.3", + "@webassemblyjs/helper-buffer": "1.8.3", + "@webassemblyjs/helper-wasm-bytecode": "1.8.3", + "@webassemblyjs/wasm-gen": "1.8.3" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.3.tgz", + "integrity": "sha512-UD4HuLU99hjIvWz1pD68b52qsepWQlYCxDYVFJQfHh3BHyeAyAlBJ+QzLR1nnS5J6hAzjki3I3AoJeobNNSZlg==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.3.tgz", + "integrity": "sha512-XXd3s1BmkC1gpGABuCRLqCGOD6D2L+Ma2BpwpjrQEHeQATKWAQtxAyU9Z14/z8Ryx6IG+L4/NDkIGHrccEhRUg==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.3.tgz", + "integrity": "sha512-Wv/WH9Zo5h5ZMyfCNpUrjFsLZ3X1amdfEuwdb7MLdG3cPAjRS6yc6ElULlpjLiiBTuzvmLhr3ENsuGyJ3wyCgg==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.3.tgz", + "integrity": "sha512-nB19eUx3Yhi1Vvv3yev5r+bqQixZprMtaoCs1brg9Efyl8Hto3tGaUoZ0Yb4Umn/gQCyoEGFfUxPLp1/8+Jvnw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.3", + "@webassemblyjs/helper-buffer": "1.8.3", + "@webassemblyjs/helper-wasm-bytecode": "1.8.3", + "@webassemblyjs/helper-wasm-section": "1.8.3", + "@webassemblyjs/wasm-gen": "1.8.3", + "@webassemblyjs/wasm-opt": "1.8.3", + "@webassemblyjs/wasm-parser": "1.8.3", + "@webassemblyjs/wast-printer": "1.8.3" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.3.tgz", + "integrity": "sha512-sDNmu2nLBJZ/huSzlJvd9IK8B1EjCsOl7VeMV9VJPmxKYgTJ47lbkSP+KAXMgZWGcArxmcrznqm7FrAPQ7vVGg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.3", + "@webassemblyjs/helper-wasm-bytecode": "1.8.3", + "@webassemblyjs/ieee754": "1.8.3", + "@webassemblyjs/leb128": "1.8.3", + "@webassemblyjs/utf8": "1.8.3" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.3.tgz", + "integrity": "sha512-j8lmQVFR+FR4/645VNgV4R/Jz8i50eaPAj93GZyd3EIJondVshE/D9pivpSDIXyaZt+IkCodlzOoZUE4LnQbeA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.3", + "@webassemblyjs/helper-buffer": "1.8.3", + "@webassemblyjs/wasm-gen": "1.8.3", + "@webassemblyjs/wasm-parser": "1.8.3" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.3.tgz", + "integrity": "sha512-NBI3SNNtRoy4T/KBsRZCAWUzE9lI94RH2nneLwa1KKIrt/2zzcTavWg6oY05ArCbb/PZDk3OUi63CD1RYtN65w==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.3", + "@webassemblyjs/helper-api-error": "1.8.3", + "@webassemblyjs/helper-wasm-bytecode": "1.8.3", + "@webassemblyjs/ieee754": "1.8.3", + "@webassemblyjs/leb128": "1.8.3", + "@webassemblyjs/utf8": "1.8.3" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.3.tgz", + "integrity": "sha512-gZPst4CNcmGtKC1eYQmgCx6gwQvxk4h/nPjfPBbRoD+Raw3Hs+BS3yhrfgyRKtlYP+BJ8LcY9iFODEQofl2qbg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.3", + "@webassemblyjs/floating-point-hex-parser": "1.8.3", + "@webassemblyjs/helper-api-error": "1.8.3", + "@webassemblyjs/helper-code-frame": "1.8.3", + "@webassemblyjs/helper-fsm": "1.8.3", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.3.tgz", + "integrity": "sha512-DTA6kpXuHK4PHu16yAD9QVuT1WZQRT7079oIFFmFSjqjLWGXS909I/7kiLTn931mcj7wGsaUNungjwNQ2lGQ3Q==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.3", + "@webassemblyjs/wast-parser": "1.8.3", + "@xtuc/long": "4.2.2" + } + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "acorn": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.0.tgz", + "integrity": "sha512-MW/FjM+IvU9CgBzjO3UIPCE2pyEwUsoFl+VGdczOPEdxfGFjuKny/gN54mOuX7Qxmb9Rg9MCn2oKiSUeW+pjrw==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, + "acorn-node": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.6.2.tgz", + "integrity": "sha512-rIhNEZuNI8ibQcL7ANm/mGyPukIaZsRNX9psFNQURyJW0nu6k8wjSDld20z6v2mDBWqX13pIEnk9gGZJHIlEXg==", + "dev": true, + "requires": { + "acorn": "^6.0.2", + "acorn-dynamic-import": "^4.0.0", + "acorn-walk": "^6.1.0", + "xtend": "^4.0.1" + } + }, + "acorn-walk": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", + "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", + "dev": true + }, + "ajv": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", + "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true + }, + "ajv-keywords": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", + "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-filter": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", + "dev": true + }, + "array-map": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", + "dev": true + }, + "array-reduce": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "benchmark": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz", + "integrity": "sha1-CfPeMckWQl1JjMLuVloOvzwqVik=", + "dev": true, + "requires": { + "lodash": "^4.17.4", + "platform": "^1.3.3" + } + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "binary-extensions": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz", + "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==", + "dev": true + }, + "bluebird": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", + "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-pack": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", + "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "combine-source-map": "~0.8.0", + "defined": "^1.0.0", + "safe-buffer": "^5.1.1", + "through2": "^2.0.0", + "umd": "^3.0.0" + } + }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browserify": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-13.3.0.tgz", + "integrity": "sha1-tanJAgJD8McORnW+yCI7xifkFc4=", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^1.11.0", + "browserify-zlib": "~0.1.2", + "buffer": "^4.1.0", + "cached-path-relative": "^1.0.0", + "concat-stream": "~1.5.1", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.0", + "domain-browser": "~1.1.0", + "duplexer2": "~0.1.2", + "events": "~1.1.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "~0.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.0.0", + "labeled-stream-splicer": "^2.0.0", + "module-deps": "^4.0.8", + "os-browserify": "~0.1.1", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^2.0.0", + "stream-http": "^2.0.0", + "string_decoder": "~0.10.0", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "~0.0.0", + "url": "~0.11.0", + "util": "~0.10.1", + "vm-browserify": "~0.0.1", + "xtend": "^4.0.0" + } + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", + "dev": true, + "requires": { + "pako": "~0.2.0" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "cacache": { + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", + "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", + "dev": true, + "requires": { + "bluebird": "^3.5.3", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "cached-path-relative": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", + "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==", + "dev": true + }, + "callsites": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", + "dev": true + }, + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "dev": true + }, + "cassowary": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/cassowary/-/cassowary-0.0.2.tgz", + "integrity": "sha1-RhTxU38XLoQusxyOQfnW/6fiSj0=" + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chai": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", + "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", + "dev": true, + "requires": { + "assertion-error": "^1.0.1", + "deep-eql": "^0.1.3", + "type-detect": "^1.0.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "chokidar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.2.tgz", + "integrity": "sha512-IwXUx0FXc5ibYmPC2XeEj5mpXoV66sR+t3jqu2NS2GYwCktt3KF1/Qqjws/NkegajBA4RbZ5+DDwlOiJsxDHEg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.0" + }, + "dependencies": { + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + } + } + }, + "chownr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", + "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + } + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "combine-source-map": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", + "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", + "dev": true, + "requires": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + }, + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", + "dev": true + } + } + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "~2.0.0", + "typedarray": "~0.0.5" + }, + "dependencies": { + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + } + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "copy-webpack-plugin": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.0.0.tgz", + "integrity": "sha512-iiDj+8nnZeW/i8vYJ3+ABSZkOefJnDYIGLojiZKKFDvf1wcEInABXH1+hN7axQMn04qvJxKjgVOee0e14XPtCg==", + "dev": true, + "requires": { + "cacache": "^11.3.1", + "find-cache-dir": "^2.0.0", + "globby": "^7.1.1", + "is-glob": "^4.0.0", + "loader-utils": "^1.1.0", + "minimatch": "^3.0.4", + "normalize-path": "^3.0.0", + "p-limit": "^2.1.0", + "serialize-javascript": "^1.4.0", + "webpack-log": "^2.0.0" + }, + "dependencies": { + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + } + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-eql": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "dev": true, + "requires": { + "type-detect": "0.1.1" + }, + "dependencies": { + "type-detect": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", + "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", + "dev": true + } + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "deps-sort": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", + "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "shasum": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "detective": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", + "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", + "dev": true, + "requires": { + "acorn": "^5.2.1", + "defined": "^1.0.0" + }, + "dependencies": { + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + } + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "dev": true, + "requires": { + "path-type": "^3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + } + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", + "dev": true + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "elliptic": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", + "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "es-abstract": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", + "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-keys": "^1.0.12" + } + }, + "es-to-primitive": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "5.14.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.14.1.tgz", + "integrity": "sha512-CyUMbmsjxedx8B0mr79mNOqetvkbij/zrXnFeK2zc3pGRn3/tibjiNAv/3UxFEyfMDjh+ZqTrJrEGBFiGfD5Og==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.9.1", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^5.0.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.2.2", + "js-yaml": "^3.12.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0" + } + }, + "eslint-scope": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "dependencies": { + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figgy-pudding": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", + "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-cache-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz", + "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", + "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", + "dev": true + } + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-assigned-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", + "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", + "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", + "dev": true + }, + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + }, + "dependencies": { + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + } + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", + "dev": true + }, + "https-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", + "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "dev": true, + "requires": { + "source-map": "~0.5.3" + } + }, + "inquirer": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.2.tgz", + "integrity": "sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.11", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true + }, + "strip-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", + "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "dev": true, + "requires": { + "ansi-regex": "^4.0.0" + } + } + } + }, + "insert-module-globals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", + "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "acorn-node": "^1.5.2", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "undeclared-identifiers": "^1.1.2", + "xtend": "^4.0.0" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + } + } + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-symbol": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.0" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", + "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "kiwi.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kiwi.js/-/kiwi.js-1.1.0.tgz", + "integrity": "sha512-V1L6/tKmGcabUHjHxBFJAJCZya8rJa0YY1MZLyxkpm9C8nKw0h/Hec40QJIe5ZZoS4JjoVWkMwzFQWBcziqS+g==" + }, + "labeled-stream-splicer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz", + "integrity": "sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "isarray": "^2.0.4", + "stream-splicer": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz", + "integrity": "sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA==", + "dev": true + } + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "dev": true + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, + "lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=", + "dev": true + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", + "dev": true + }, + "lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=", + "dev": true + }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "mamacro": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", + "dev": true + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mem": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.1.0.tgz", + "integrity": "sha512-I5u6Q1x7wxO0kdOpYBB28xueHADYps5uty/zg936CiG8NTe5sJL8EjrCuLneuDW3PlMdZBGDIn8BirEVdovZvg==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^2.0.0" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minifyify": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/minifyify/-/minifyify-7.3.5.tgz", + "integrity": "sha1-n0uwyGklAkeNjuhbEL1ySFcGKa4=", + "dev": true, + "requires": { + "concat-stream": "^1.4.7", + "convert-source-map": "^1.0.0", + "lodash.assign": "^4.0.0", + "lodash.bind": "^4.0.0", + "lodash.defaults": "^4.0.0", + "lodash.foreach": "^4.0.0", + "mkdirp": "^0.5.0", + "source-map": "^0.5.3", + "through": "^2.3.6", + "tmp": "0.0.28", + "transform-filter": "^0.1.1", + "uglify-js": "^2.6.1" + }, + "dependencies": { + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + } + } + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "mocha": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.0.0.tgz", + "integrity": "sha512-A7g9k3yr8oJaXn2IItFnfgjyxFc/LTe6Wwv7FczP+e8G74o9xYNSbMYmCf1ouldRojLrFcOb+z75P6Ak0GX6ug==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "findup-sync": "2.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.12.0", + "log-symbols": "2.2.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "ms": "2.1.1", + "node-environment-flags": "1.0.4", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "12.0.5", + "yargs-parser": "11.1.1", + "yargs-unparser": "1.5.0" + }, + "dependencies": { + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + } + } + }, + "module-deps": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", + "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "browser-resolve": "^1.7.0", + "cached-path-relative": "^1.0.0", + "concat-stream": "~1.5.0", + "defined": "^1.0.0", + "detective": "^4.0.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.3", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "neo-async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", + "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-environment-flags": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.4.tgz", + "integrity": "sha512-M9rwCnWVLW7PX+NUWe3ejEdiLYinRpsEre9hMkU/6NS4h+EEulYaDH1gCEZ2gyXsmw+RXYDaV2JkkTNcsPDJ0Q==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "node-libs-browser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", + "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "dev": true + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "pako": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.8.tgz", + "integrity": "sha512-6i0HVbUfcKaTv+EG8ZTr75az7GFXcLYk9UyLEg7Notv/Ma+z/UG3TCoz6GiNeOrn1E/e63I0X/Hpw18jHOTUnA==", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "string_decoder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz", + "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-browserify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", + "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=", + "dev": true + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", + "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", + "dev": true + }, + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", + "dev": true + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "parent-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", + "integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "dev": true, + "requires": { + "path-platform": "~0.11.15" + } + }, + "parse-asn1": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", + "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "platform": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.5.tgz", + "integrity": "sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q==", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + } + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "serialize-javascript": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", + "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "dev": true, + "requires": { + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "dev": true, + "requires": { + "array-filter": "~0.0.0", + "array-map": "~0.0.0", + "array-reduce": "~0.0.0", + "jsonify": "~0.0.0" + } + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", + "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "dev": true, + "requires": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "stream-splicer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", + "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "dev": true, + "requires": { + "minimist": "^1.1.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "dev": true, + "requires": { + "acorn-node": "^1.2.0" + } + }, + "table": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/table/-/table-5.2.3.tgz", + "integrity": "sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "dev": true + }, + "string-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.0.0.tgz", + "integrity": "sha512-rr8CUxBbvOZDUvc5lNIJ+OC1nPVpz+Siw9VBtUjB9b6jZehZLFt0JMCZzShFHIsI8cbhm0EsNIfWJMFV3cu3Ew==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.0.0" + } + }, + "strip-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", + "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "dev": true, + "requires": { + "ansi-regex": "^4.0.0" + } + } + } + }, + "tapable": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", + "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==", + "dev": true + }, + "terser": { + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-3.16.1.tgz", + "integrity": "sha512-JDJjgleBROeek2iBcSNzOHLKsB/MdDf+E/BOAJ0Tk9r7p9/fVobfv7LMJ/g/k3v9SXdmjZnIlFd5nfn/Rt0Xow==", + "dev": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1", + "source-map-support": "~0.5.9" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.2.tgz", + "integrity": "sha512-1DMkTk286BzmfylAvLXwpJrI7dWa5BnFmscV/2dCr8+c56egFcbaeFAl7+sujAjdmpLam21XRdhA4oifLyiWWg==", + "dev": true, + "requires": { + "cacache": "^11.0.2", + "find-cache-dir": "^2.0.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "terser": "^3.16.1", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "dev": true, + "requires": { + "process": "~0.11.0" + } + }, + "tmp": { + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.28.tgz", + "integrity": "sha1-Fyc1t/YU6nrzlmT6hM8N5OUV0SA=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.1" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "transform-filter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/transform-filter/-/transform-filter-0.1.1.tgz", + "integrity": "sha1-gG+FG25ECyN4j9OMoEMbUCAlulk=", + "dev": true, + "requires": { + "multimatch": "^2.0.0", + "through": "^2.3.6" + } + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-detect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz", + "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", + "dev": true + }, + "undeclared-identifiers": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz", + "integrity": "sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ==", + "dev": true, + "requires": { + "acorn-node": "^1.3.0", + "get-assigned-identifiers": "^1.2.0", + "simple-concat": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", + "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "v8-compile-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz", + "integrity": "sha512-1wFuMUIM16MDJRCrpbpuEPTUGmM5QMUg0cr3KFwra2XgOgFcPGDQHDh3CszSCD2Zewc/dh/pamNEW8CbfDebUw==", + "dev": true + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "webpack": { + "version": "4.29.5", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.5.tgz", + "integrity": "sha512-DuWlYUT982c7XVHodrLO9quFbNpVq5FNxLrMUfYUTlgKW0+yPimynYf1kttSQpEneAL1FH3P3OLNgkyImx8qIQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.3", + "@webassemblyjs/helper-module-context": "1.8.3", + "@webassemblyjs/wasm-edit": "1.8.3", + "@webassemblyjs/wasm-parser": "1.8.3", + "acorn": "^6.0.5", + "acorn-dynamic-import": "^4.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^1.0.0", + "enhanced-resolve": "^4.1.0", + "eslint-scope": "^4.0.0", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^1.0.0", + "tapable": "^1.1.0", + "terser-webpack-plugin": "^1.1.0", + "watchpack": "^1.5.0", + "webpack-sources": "^1.3.0" + } + }, + "webpack-cli": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.2.3.tgz", + "integrity": "sha512-Ik3SjV6uJtWIAN5jp5ZuBMWEAaP5E4V78XJ2nI+paFPh8v4HPSwo/myN0r29Xc/6ZKnd2IdrAlpSgNOu2CDQ6Q==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.1.0", + "findup-sync": "^2.0.0", + "global-modules": "^1.0.0", + "import-local": "^2.0.0", + "interpret": "^1.1.0", + "loader-utils": "^1.1.0", + "supports-color": "^5.5.0", + "v8-compile-cache": "^2.0.2", + "yargs": "^12.0.4" + }, + "dependencies": { + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + } + } + }, + "webpack-conditional-loader": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/webpack-conditional-loader/-/webpack-conditional-loader-1.0.12.tgz", + "integrity": "sha512-sUJBnZoehjB8GysGY5G+ftU4WPkfDz+j0iYAV6xdNNpnzBVqIS6UKcu7HgZqay/+5voaU++c7QgfbxqqjDCSuA==", + "dev": true + }, + "webpack-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", + "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", + "dev": true, + "requires": { + "ansi-colors": "^3.0.0", + "uuid": "^3.3.2" + } + }, + "webpack-sources": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", + "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + } + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", + "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.11", + "yargs": "^12.0.5" + }, + "dependencies": { + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + } + } + } + } +} diff --git a/package.json b/package.json index b581316..5c55887 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "url": "git://github.com/IjzerenHein/autolayout.js.git" }, "main": "dist/autolayout.js", + "types": "dist/autolayout.d.ts", "author": { "name": "Hein Rutjes " }, @@ -37,33 +38,31 @@ "LICENSE" ], "devDependencies": { - "babel-eslint": "^7.1.1", - "babel-preset-es2015": "^6.18.0", - "babelify": "^7.3.0", "benchmark": "^2.1.3", "browserify": "^13.3.0", "chai": "^3.5.0", "combined-stream": "^1.0.5", - "envify": "^4.0.0", - "esperanto": "^0.7.5", - "grunt": "^1.0.1", - "grunt-contrib-concat": "^1.0.1", - "grunt-eslint": "^19.0.0", - "grunt-exec": "^1.0.1", - "grunt-jscs": "^3.0.1", - "grunt-jsdoc-to-markdown": "^2.0.0", - "grunt-peg": "1.5.0", - "kiwi.js": "^1.0.1", + "copy-webpack-plugin": "^5.0.0", + "eslint": "^5.14.1", "lodash": "^4.17.4", "minifyify": "^7.3.4", "minimist": "^1.2.0", - "mocha": "^3.2.0", - "platform": "^1.3.1" + "mocha": "^6.0.0", + "platform": "^1.3.1", + "webpack": "^4.29.5", + "webpack-cli": "^3.2.3", + "webpack-conditional-loader": "^1.0.12" }, "dependencies": { - "cassowary": "0.0.2" + "cassowary": "0.0.2", + "kiwi.js": "^1.1.0" }, "scripts": { - "test": "mocha" + "test": "mocha", + "build-dev-kiwi": "npx webpack --mode development", + "build-prod-kiwi": "npx webpack --mode production", + "build-dev-cassowary": "npx webpack --mode development --env.CASSOWARYJS", + "build-prod-cassowary": "npx webpack --mode production --env.CASSOWARYJS", + "release": "npm run build-prod-kiwi && npm run build-prod-cassowary" } } diff --git a/src/AutoLayout.js b/src/AutoLayout.js index 9315413..0543c9f 100644 --- a/src/AutoLayout.js +++ b/src/AutoLayout.js @@ -1,30 +1,7 @@ -import Attribute from './Attribute'; -import Relation from './Relation'; -import Priority from './Priority'; -import VisualFormat from './VisualFormat'; -import View from './View'; -import SubView from './SubView'; +export {default as Attribute} from './Attribute'; +export {default as Relation} from './Relation'; +export {default as Priority} from './Priority'; +export {default as VisualFormat} from './VisualFormat'; +export {default as View} from './View'; +export {default as SubView} from './SubView'; //import DOM from './DOM'; - -/** - * AutoLayout. - * - * @namespace AutoLayout - * @property {Attribute} Attribute - * @property {Relation} Relation - * @property {Priority} Priority - * @property {VisualFormat} VisualFormat - * @property {View} View - * @property {SubView} SubView - */ -var AutoLayout = { - Attribute: Attribute, - Relation: Relation, - Priority: Priority, - VisualFormat: VisualFormat, - View: View, - SubView: SubView - //DOM: DOM -}; - -export default AutoLayout; diff --git a/src/SubView.js b/src/SubView.js index fe5ed7d..b752266 100644 --- a/src/SubView.js +++ b/src/SubView.js @@ -1,5 +1,10 @@ -import c from 'cassowary/bin/c'; -//import kiwi from 'kiwi.js'; +// #if process.env.CASSOWARYJS + import c from 'cassowary/bin/c'; +// #endif + +// #if !process.env.CASSOWARYJS + import * as kiwi from 'kiwi.js'; +// #endif import Attribute from './Attribute'; /** @@ -14,22 +19,23 @@ class SubView { this._solver = options.solver; this._attr = {}; if (!options.name) { - if (process.env.CASSOWARYJS) { + // #if process.env.CASSOWARYJS this._attr[Attribute.LEFT] = new c.Variable(); this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.LEFT], c.Strength.required)); this._attr[Attribute.TOP] = new c.Variable(); this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.TOP], c.Strength.required)); this._attr[Attribute.ZINDEX] = new c.Variable(); this._solver.addConstraint(new c.StayConstraint(this._attr[Attribute.ZINDEX], c.Strength.required)); - } - else { + // #endif + + // #if !process.env.CASSOWARYJS this._attr[Attribute.LEFT] = new kiwi.Variable(); this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.LEFT], kiwi.Operator.Eq, 0)); this._attr[Attribute.TOP] = new kiwi.Variable(); this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.TOP], kiwi.Operator.Eq, 0)); this._attr[Attribute.ZINDEX] = new kiwi.Variable(); this._solver.addConstraint(new kiwi.Constraint(this._attr[Attribute.ZINDEX], kiwi.Operator.Eq, 0)); - } + // #endif } } toJSON() { @@ -110,21 +116,23 @@ class SubView { if ((value !== undefined) && (value !== this._intrinsicWidth)) { const attr = this._getAttr(Attribute.WIDTH); if (this._intrinsicWidth === undefined) { - if (process.env.CASSOWARYJS) { + // #if process.env.CASSOWARYJS this._solver.addEditVar(attr, new c.Strength('required', this._name ? 998 : 999, 1000, 1000)); - } - else { + // #endif + + // #if !process.env.CASSOWARYJS this._solver.addEditVariable(attr, kiwi.Strength.create(this._name ? 998 : 999, 1000, 1000)); - } + // #endif } this._intrinsicWidth = value; this._solver.suggestValue(attr, value); - if (process.env.CASSOWARYJS) { + // #if process.env.CASSOWARYJS this._solver.resolve(); - } - else { + // #endif + + // #if !process.env.CASSOWARYJS this._solver.updateVariables(); - } + // #endif } } @@ -142,21 +150,24 @@ class SubView { if ((value !== undefined) && (value !== this._intrinsicHeight)) { const attr = this._getAttr(Attribute.HEIGHT); if (this._intrinsicHeight === undefined) { - if (process.env.CASSOWARYJS) { + // #if process.env.CASSOWARYJS this._solver.addEditVar(attr, new c.Strength('required', this._name ? 998 : 999, 1000, 1000)); - } - else { + // #endif + + // #if !process.env.CASSOWARYJS this._solver.addEditVariable(attr, kiwi.Strength.create(this._name ? 998 : 999, 1000, 1000)); - } + // #endif } this._intrinsicHeight = value; this._solver.suggestValue(attr, value); - if (process.env.CASSOWARYJS) { + + // #if process.env.CASSOWARYJS this._solver.resolve(); - } - else { + // #endif + + // #if !process.env.CASSOWARYJS this._solver.updateVariables(); - } + // #endif } } @@ -231,52 +242,64 @@ class SubView { if (this._attr[attr]) { return this._attr[attr]; } - this._attr[attr] = process.env.CASSOWARYJS ? new c.Variable() : new kiwi.Variable(); + // #if process.env.CASSOWARYJS + this._attr[attr] = new c.Variable(); + // #endif + + // #if !process.env.CASSOWARYJS + this._attr[attr] = new kiwi.Variable(); + // #endif + switch (attr) { case Attribute.RIGHT: this._getAttr(Attribute.LEFT); this._getAttr(Attribute.WIDTH); - if (process.env.CASSOWARYJS) { + // #if process.env.CASSOWARYJS this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.LEFT], this._attr[Attribute.WIDTH]))); - } - else { + // #endif + + // #if !process.env.CASSOWARYJS this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.LEFT].plus(this._attr[Attribute.WIDTH]))); - } + // #endif break; case Attribute.BOTTOM: this._getAttr(Attribute.TOP); this._getAttr(Attribute.HEIGHT); - if (process.env.CASSOWARYJS) { + // #if process.env.CASSOWARYJS this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.TOP], this._attr[Attribute.HEIGHT]))); - } - else { + // #endif + + // #if !process.env.CASSOWARYJS this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.TOP].plus(this._attr[Attribute.HEIGHT]))); - } + // #endif break; case Attribute.CENTERX: this._getAttr(Attribute.LEFT); this._getAttr(Attribute.WIDTH); - if (process.env.CASSOWARYJS) { + // #if process.env.CASSOWARYJS this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.LEFT], c.divide(this._attr[Attribute.WIDTH], 2)))); - } - else { + // #endif + + // #if !process.env.CASSOWARYJS this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.LEFT].plus(this._attr[Attribute.WIDTH].divide(2)))); - } + // #endif break; case Attribute.CENTERY: this._getAttr(Attribute.TOP); this._getAttr(Attribute.HEIGHT); - if (process.env.CASSOWARYJS) { + // #if process.env.CASSOWARYJS this._solver.addConstraint(new c.Equation(this._attr[attr], c.plus(this._attr[Attribute.TOP], c.divide(this._attr[Attribute.HEIGHT], 2)))); - } - else { + // #endif + + // #if !process.env.CASSOWARYJS this._solver.addConstraint(new kiwi.Constraint(this._attr[attr], kiwi.Operator.Eq, this._attr[Attribute.TOP].plus(this._attr[Attribute.HEIGHT].divide(2)))); - } + // #endif break; } - if (!process.env.CASSOWARYJS) { + // #if !process.env.CASSOWARYJS this._solver.updateVariables(); - } + // #endif + return this._attr[attr]; } @@ -284,12 +307,16 @@ class SubView { * @private */ _getAttrValue(attr) { - if (process.env.CASSOWARYJS) { - return this._getAttr(attr).value; - } - else { - return this._getAttr(attr).value(); - } + let value; + // #if process.env.CASSOWARYJS + value = this._getAttr(attr).value; + // #endif + + // #if !process.env.CASSOWARYJS + value = this._getAttr(attr).value(); + // #endif + + return value; } } diff --git a/src/View.js b/src/View.js index 30e0d00..693298d 100644 --- a/src/View.js +++ b/src/View.js @@ -1,22 +1,35 @@ -import c from 'cassowary/bin/c'; -//import kiwi from 'kiwi.js'; +// #if process.env.CASSOWARYJS + import c from 'cassowary/bin/c'; +// #endif + +// #if !process.env.CASSOWARYJS + import * as kiwi from 'kiwi.js'; +// #endif import Attribute from './Attribute'; import Relation from './Relation'; import SubView from './SubView'; -const defaultPriorityStrength = process.env.CASSOWARYJS ? new c.Strength('defaultPriority', 0, 1000, 1000) : kiwi.Strength.create(0, 1000, 1000); +let defaultPriorityStrength; +// #if process.env.CASSOWARYJS + defaultPriorityStrength = new c.Strength('defaultPriority', 0, 1000, 1000); +// #endif +// #if !process.env.CASSOWARYJS + defaultPriorityStrength = kiwi.Strength.create(0, 1000, 1000); +// #endif function _getConst(name, value) { - if (process.env.CASSOWARYJS) { - const vr = new c.Variable({value: value}); + let vr; + // #if process.env.CASSOWARYJS + vr = new c.Variable({value: value}); this._solver.addConstraint(new c.StayConstraint(vr, c.Strength.required, 0)); - return vr; - } - else { - const vr = new kiwi.Variable(); + // #endif + + // #if !process.env.CASSOWARYJS + vr = new kiwi.Variable(); this._solver.addConstraint(new kiwi.Constraint(vr, kiwi.Operator.Eq, value)); - return vr; - } + // #endif + + return vr; } function _getSubView(viewName) { @@ -73,16 +86,17 @@ function _getSpacing(constraint) { this._spacingVars = this._spacingVars || new Array(7); this._spacingExpr = this._spacingExpr || new Array(7); if (!this._spacingVars[index]) { - if (process.env.CASSOWARYJS) { + // #if process.env.CASSOWARYJS this._spacingVars[index] = new c.Variable(); this._solver.addEditVar(this._spacingVars[index]); this._spacingExpr[index] = c.minus(0, this._spacingVars[index]); - } - else { + // #endif + + // #if !process.env.CASSOWARYJS this._spacingVars[index] = new kiwi.Variable(); this._solver.addEditVariable(this._spacingVars[index], kiwi.Strength.create(999, 1000, 1000)); this._spacingExpr[index] = this._spacingVars[index].multiply(-1); - } + // #endif this._solver.suggestValue(this._spacingVars[index], this._spacing[index]); } return this._spacingExpr[index]; @@ -97,8 +111,8 @@ function _addConstraint(constraint) { constant = _getSpacing.call(this, constraint); } const attr1 = _getSubView.call(this, constraint.view1)._getAttr(constraint.attr1); - let attr2; - if (process.env.CASSOWARYJS) { + let attr2, strength; + // #if process.env.CASSOWARYJS if (constraint.attr2 === Attribute.CONST) { attr2 = _getConst.call(this, undefined, constraint.constant); } @@ -114,7 +128,7 @@ function _addConstraint(constraint) { attr2 = c.times(attr2, multiplier); } } - const strength = ((constraint.priority !== undefined) && (constraint.priority < 1000)) ? new c.Strength('priority', 0, constraint.priority, 1000) : defaultPriorityStrength; + strength = ((constraint.priority !== undefined) && (constraint.priority < 1000)) ? new c.Strength('priority', 0, constraint.priority, 1000) : defaultPriorityStrength; switch (constraint.relation) { case Relation.EQU: relation = new c.Equation(attr1, attr2, strength); @@ -128,8 +142,9 @@ function _addConstraint(constraint) { default: throw 'Invalid relation specified: ' + constraint.relation; } - } - else { + // #endif + + // #if !process.env.CASSOWARYJS if (constraint.attr2 === Attribute.CONST) { attr2 = _getConst.call(this, undefined, constraint.constant); } @@ -145,7 +160,7 @@ function _addConstraint(constraint) { attr2 = attr2.multiply(multiplier); } } - const strength = ((constraint.priority !== undefined) && (constraint.priority < 1000)) ? kiwi.Strength.create(0, constraint.priority, 1000) : defaultPriorityStrength; + strength = ((constraint.priority !== undefined) && (constraint.priority < 1000)) ? kiwi.Strength.create(0, constraint.priority, 1000) : defaultPriorityStrength; switch (constraint.relation) { case Relation.EQU: relation = new kiwi.Constraint(attr1, kiwi.Operator.Eq, attr2, strength); @@ -159,7 +174,7 @@ function _addConstraint(constraint) { default: throw 'Invalid relation specified: ' + constraint.relation; } - } + // #endif this._solver.addConstraint(relation); } @@ -208,7 +223,14 @@ class View { * @param {Array} [options.constraints] One or more constraint definitions (see `addConstraints`). */ constructor(options) { - this._solver = process.env.CASSOWARYJS ? new c.SimplexSolver() : new kiwi.Solver(); + // #if process.env.CASSOWARYJS + this._solver = new c.SimplexSolver(); + // #endif + + // #if !process.env.CASSOWARYJS + this._solver = new kiwi.Solver(); + // #endif + this._subViews = {}; //this._spacing = undefined; this._parentSubView = new SubView({ @@ -344,12 +366,13 @@ class View { this._solver.suggestValue(this._spacingVars[i], this._spacing[i]); } } - if (process.env.CASSOWARYJS) { + // #if process.env.CASSOWARYJS this._solver.resolve(); - } - else { + // #endif + + // #if !process.env.CASSOWARYJS this._solver.updateVariables(); - } + // #endif } } return this; @@ -377,9 +400,9 @@ class View { */ addConstraint(constraint) { _addConstraint.call(this, constraint); - if (!process.env.CASSOWARYJS) { + // #if !process.env.CASSOWARYJS this._solver.updateVariables(); - } + // #endif return this; } @@ -407,9 +430,9 @@ class View { for (var j = 0; j < constraints.length; j++) { _addConstraint.call(this, constraints[j]); } - if (!process.env.CASSOWARYJS) { + // #if !process.env.CASSOWARYJS this._solver.updateVariables(); - } + // #endif return this; } diff --git a/src/autolayout.d.ts b/src/autolayout.d.ts new file mode 100644 index 0000000..8d1648a --- /dev/null +++ b/src/autolayout.d.ts @@ -0,0 +1,295 @@ + +declare module 'autolayout' +{ + /** + * [top, right, bottom, left, width, height, zIndex] Full syntax including z-index (clockwise order). + * [top, right, bottom, left, width, height] Full horizontal & vertical spacing syntax (no z-index) (clockwise order). + * [horizontal, vertical, zIndex] Horizontal = left, right, width, vertical = top, bottom, height. + * [horizontal, vertical] Array(2) Horizontal = left, right, width, vertical = top, bottom, height, z-index = 1. + * spacing Number Horizontal & vertical spacing are all the same, z-index = 1. + */ + type Spacing = number | [number,number] | [number,number,number] | [number,number,number,number,number,number] | [number,number,number,number,number,number,number]; + + /** + * Layout attributes. + */ + enum Attribute + { + CONST, + NOTANATTRIBUTE, + VARIABLE, + LEFT, + RIGHT, + TOP, + BOTTOM, + WIDTH, + HEIGHT, + CENTERX, + CENTERY, + ZINDEX, + } + + /** + * Relation types. + */ + enum Relation + { + LEQ, + EQU, + GEQ + } + + /** + * Layout priorities. + */ + enum Priority + { + REQUIRED, + DEFAULTHIGH , + DEFAULTLOW + } + + type ConstraintDef = { + view1: {String}, + attr1: Attribute, + relation: Relation, + view2: string, + attr2: Attribute, + multiplier: number, + constant: number, + priority: number + }; + + class View + { + /** @private */ + _solver:any; + + /** + * @param options Configuration options. + * @param options.width Initial width of the view. + * @param options.height Initial height of the view. + * @param options.spacing Spacing for the view (default: 8). + * @param options.constraints One or more constraint definitions. + * @see setSpacing + * @see addConstraints + */ + constructor(options?:{width?:number, height?:number, spacing?:Spacing, constraints?:Array}); + + /** + * Width that was set using setSize. + */ + readonly width : number; + + /** + * Height that was set using setSize. + */ + readonly height: number; + + /** + * Width that is calculated from the constraints and the .intrinsicWidth of the sub-views. + * When the width has been explicitely set using setSize, the fittingWidth will always be the same as the explicitely set width. To calculate the size based on the content, use: + * ```js + * var view = new AutoLayout.View({ + * constraints: VisualFormat.parse('|-[view1]-[view2]-'), + * spacing: 20 + * }); + * view.subViews.view1.intrinsicWidth = 100; + * view.subViews.view2.intrinsicWidth = 100; + * console.log('fittingWidth: ' + view.fittingWidth); // 260 + * ``` + */ + readonly fittingWidth:number; + + /** + * Height that is calculated from the constraints and the .intrinsicHeight of the sub-views. + * @see fittingWidth. + */ + readonly fittingHeight:number; + + /** + * Dictionary of SubView objects that have been created when adding constraints. + */ + readonly subViews: {[k:string]:SubView}; + + /** + * Sets the width and height of the view. + * @param width + * @param height + * @returns this + */ + setSize(width:number, height:number):View; + + /** + * Sets the spacing for the view. + * The spacing can be set for 7 different variables: top, right, bottom, left, width, height and zIndex. + * The left-spacing is used when a spacer is used between the parent-view and a sub-view (e.g. |-[subView]). + * The same is true for the right, top and bottom spacers. + * The width and height are used for spacers in between sub-views (e.g. [view1]-[view2]). + * Examples: + * ```js + * view.setSpacing(10); // horizontal & vertical spacing 10 + * view.setSpacing([10, 15, 2]); // horizontal spacing 10, vertical spacing 15, z-axis spacing 2 + * view.setSpacing([10, 20, 10, 20, 5, 5]); // top, right, bottom, left, horizontal, vertical + * view.setSpacing([10, 20, 10, 20, 5, 5, 1]); // top, right, bottom, left, horizontal, vertical, z + * ``` + * @param spacing + * @returns this + */ + setSpacing(spacing: Spacing):View; + + /** + * Adds a constraint definition. + * @param constraint + * @returns this + */ + addConstraint(constraint: ConstraintDef) : View; + + /** + * Adds one or more constraint definitions. + * @param constraints + * @returns this + */ + addConstraints(constraints: ReadonlyArray) : View; + } + + /** + * A SubView is automatically generated when constraints are added to a View. + */ + class SubView + { + /** @private */ + _solver:any; + + /** @private */ + _getAttr(attr:string) : Attribute; + + /** + * Name of the sub-view. + */ + readonly name : string; + + /** + * Left value (Attribute.LEFT). + */ + readonly left : number; + + /** + * Right value (Attribute.RIGHT). + */ + readonly right : number; + + /** + * Width value (Attribute.WIDTH). + */ + readonly width : number; + + /** + * Height value (Attribute.HEIGHT). + */ + readonly height : number; + + /** + * Intrinsic width of the sub-view. + * Use this property to explicitely set the width of the sub-view, e.g.: + * ```js + * let view = new AutoLayout.View(AutoLayout.VisualFormat.parse('|[child1][child2]|'), { + * width: 500 + * }); + * view.subViews.child1.intrinsicWidth = 100; + * console.log('child2 width: ' + view.subViews.child2.width); // 400 + * ``` + * */ + intrinsicWidth : number; + + /** + * Intrinsic height of the sub-view. + * @see intrinsicWidth. + */ + intrinsicHeight : number; + + /** + * Top value (Attribute.TOP). + */ + readonly top : number; + + /** + * Bottom value (Attribute.BOTTOM). + */ + readonly bottom : number; + + /** + * Horizontal center (Attribute.CENTERX). + */ + readonly centerX : number; + + /** + * Vertical center (Attribute.CENTERY). + */ + readonly centerY : number; + + /** + * Z-index (Attribute.ZINDEX). + */ + readonly zIndex : number; + + /** + * Returns the type of the sub-view. + */ + readonly type : string; + + /** + * Gets the value of one of the attributes. + * @param attr Attribute name (e.g. 'right', 'centerY', Attribute.TOP). + */ + getValue(attr: string | Attribute): number; + } + + module VisualFormat + { + /** + * Parses a single line of vfl into an array of constraint definitions. + * When the visual-format could not be succesfully parsed an exception is thrown containing additional info about the parse error and column position. + * @param visualFormat Visual format string (cannot contain line-endings!). + * @param options Configuration options. + * @param options.extended When set to true uses the extended syntax (default: false). + * @param options.outFormat Output format (constraints or raw) (default: constraints). + * @param options.lineIndex Line-index used when auto generating equal-spacing constraints. + * @returns Array of constraint definitions. + */ + function parseLine(visualFormat: string | Array, options?:{extended?:boolean, outFormat?:'constraints'|'raw', lineIndex?:number}): Array; + + /** + * Parses one or more visual format strings into an array of constraint definitions. + * When the visual-format could not be succesfully parsed an exception is thrown containing additional info about the parse error and column position. + * @param visualFormat One or more visual format strings. + * @param options Object Configuration options. + * @param options.extended When set to true uses the extended syntax (default: false). + * @param options.strict When set to false trims any leading/trailing spaces and ignores empty lines (default: true). + * @param options.lineSeparator String that defines the end of a line (default \n). + * @param options.outFormat Output format (constraints or raw) (default: constraints). + * @returns Array of constraint definitions. + */ + function parse(visualFormat: string | Array, options?:{extended?: boolean, strict?:boolean, lineSeparator?:string, outFormat?: 'constraints'|'raw'}): Array; + + /** + * Parses meta information from the comments in the VFL. + * Additional meta information can be specified in the comments for previewing and rendering purposes. For instance, the view-port aspect-ratio, sub-view widths and colors, can be specified. The following example renders three colored circles in the visual-format editor: + * ```js + * //viewport aspect-ratio:3/1 max-height:300 + * //colors red:#FF0000 green:#00FF00 blue:#0000FF + * //shapes red:circle green:circle blue:circle + * H:|-[row:[red(green,blue)]-[green]-[blue]]-| + * V:|[row]| + * ``` + * @param visualFormat String | Array One or more visual format strings. + * @param options Configuration options. + * @param options.lineSeparator String that defines the end of a line (default \n). + * @param options.prefix When specified, also processes the categories using that prefix (e.g. "-dev-viewport max-height:10"). + * @returns meta-info + */ + function parseMetaInfo(visualFormat: string | Array, options?: {lineSparator?: string, prefix?: string}): Object; + } + +} + diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..cfe4361 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,30 @@ +const path = require('path'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); + +module.exports = (env,{mode})=> { + + process.env.CASSOWARYJS = env ? env.CASSOWARYJS : ''; + const postfix = (env && env.CASSOWARYJS) ? '.cassowary' : ''; + + return { + entry: './src/AutoLayout.js', + output: { + path: path.resolve(__dirname, 'dist'), + filename: `autolayout${postfix}.js`, + libraryTarget:'umd', + library: 'autolayout', + globalObject: 'this' + }, + devtool:'source-map', + module:{ + rules: [{ + test: /\.js$/, + use: ['webpack-conditional-loader'] + }] + }, + plugins: [ + new CopyWebpackPlugin([ + {from:'./src/autolayout.d.ts', to:'./'}, + ])] + } +};