diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..fab4002 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "printWidth": 80, + "singleQuote": true, + "tabWidth": 2 +} diff --git a/Docker b/Dockerfile similarity index 91% rename from Docker rename to Dockerfile index a30a006..183c1ad 100644 --- a/Docker +++ b/Dockerfile @@ -34,4 +34,6 @@ COPY --from=server /app /usr/src/app COPY --from=builder /app/dist /usr/src/app ENV PORT 80 -CMD [ "node", "index.js" ] \ No newline at end of file +CMD [ "node", "index.js" ] + +# docker build -t ngfoundry -f Dockerfile . diff --git a/README.md b/README.md index 0967fb5..dca2eef 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ ngFoundry mashes together computer science ideas from Object Oriented, programmi As an engineer practicing in the early days of computer programming, I was always disappointed that computer languages were created to procedurally execute instructions, and not semantically describe scenarios declaratively and optimize the outcome. I have learned that writing software is a process of primarily listening and coding toward the truth. I believe visualization and collaboration leads to a deeper understanding of a problem and the people you are working with to build a solution. -After 40 years of writing software I understand deeply understand why this must be true, but there is still a part of me that hopes by creating language elements that let non-programmers declarative describe their domain using their own vocabulary the task of creating software can become use error prone +After 40 years of writing software I understand deeply why this must be true, but there is still a part of me that hopes by creating language elements that let non-programmers declarative describe their domain using their own vocabulary the task of creating software can become use error prone # Instructions for building and running ngFoundry yourself diff --git a/package-lock.json b/package-lock.json index 9e5fa24..3116c07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,15 +5,15 @@ "requires": true, "dependencies": { "@angular-devkit/build-optimizer": { - "version": "0.0.35", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.0.35.tgz", - "integrity": "sha512-7JxZZAYFSCc0tP6+NrRn3b2Cd1b9d+a3+OfwVNyNsNd2unelqUMko2hm0KLbC8BXcXt/OILg1E/ZgLAXSS47nw==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.3.2.tgz", + "integrity": "sha512-U0BCZtThq5rUfY08shHXpxe8ZhSsiYB/cJjUvAWRTs/ORrs8pbngS6xwseQws8d/vHoVrtqGD9GU9h8AmFRERQ==", "dev": true, "requires": { - "loader-utils": "1.1.0", - "source-map": "0.5.7", - "typescript": "2.6.2", - "webpack-sources": "1.1.0" + "loader-utils": "^1.1.0", + "source-map": "^0.5.6", + "typescript": "~2.6.2", + "webpack-sources": "^1.0.1" }, "dependencies": { "typescript": { @@ -25,190 +25,202 @@ } }, "@angular-devkit/core": { - "version": "0.0.22", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-0.0.22.tgz", - "integrity": "sha512-zxrNtTiv60liye/GGeRMnnGgLgAWoqlMTfPLMW0D1qJ4bbrPHtme010mpxS3QL4edcDtQseyXSFCnEkuo2MrRw==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-0.3.2.tgz", + "integrity": "sha512-zABk/iP7YX5SVbmK4e+IX7j2d0D37MQJQiKgWdV3JzfvVJhNJzddiirtT980pIafoq+KyvTgVwXtc+vnux0oeQ==", "dev": true, "requires": { - "source-map": "0.5.7" + "ajv": "~5.5.1", + "chokidar": "^1.7.0", + "rxjs": "^5.5.6", + "source-map": "^0.5.6" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + } } }, "@angular-devkit/schematics": { - "version": "0.0.41", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-0.0.41.tgz", - "integrity": "sha512-eSXyRLM7g9NvNUwDd71iPjHEL0Zutg9PcLUSCrwFXR3Z8S6iStO2FpZACNmz5/Y7ksWLy5/1wjLuDJCHS4X/ig==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-0.3.2.tgz", + "integrity": "sha512-B6zZoqvHaTJy+vVdA6EtlxnCdGMa5elCa4j9lQLC3JI8DLvMXUWkCIPVbPzJ/GSRR9nsKWpvYMYaJyfBDUqfhw==", "dev": true, "requires": { - "@angular-devkit/core": "0.0.22", - "@ngtools/json-schema": "1.1.0", - "@schematics/schematics": "0.0.10", - "minimist": "1.2.0", - "rxjs": "5.5.5" + "@ngtools/json-schema": "^1.1.0", + "rxjs": "^5.5.6" } }, "@angular/animations": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-5.1.0.tgz", - "integrity": "sha512-s0tV6y2D16CQAcXjv8CN8AahHb+LoWm9KAUkxvSJ18ZZQweuAY4T8jlRB95ODRFFKfjwyRD9HqXKUC5yHmG9ww==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-5.2.9.tgz", + "integrity": "sha512-H/3fMs4PhYjKoA81II6D0PHifDrqlKet2u/EXzUBq3ehXby+N/0GBzqsBYwPeU5pTye7WPFfW+5sgoJpN8Ye6Q==", "requires": { - "tslib": "1.8.1" + "tslib": "^1.7.1" } }, "@angular/cli": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-1.6.0.tgz", - "integrity": "sha512-X049QAgSKy5J48byyo3T6iBTHubTC66QBMshMpTT7PWAaSq3HpPPE1xW0WwgFIXZWMQIsmncaqPwmnFmxljUdw==", - "dev": true, - "requires": { - "@angular-devkit/build-optimizer": "0.0.35", - "@angular-devkit/schematics": "0.0.41", - "@ngtools/json-schema": "1.1.0", - "@ngtools/webpack": "1.9.0", - "@schematics/angular": "0.1.10", - "autoprefixer": "6.7.7", - "chalk": "2.2.2", - "circular-dependency-plugin": "4.3.0", - "common-tags": "1.5.1", - "copy-webpack-plugin": "4.2.3", - "core-object": "3.1.5", - "css-loader": "0.28.7", - "cssnano": "3.10.0", - "denodeify": "1.2.1", - "ember-cli-string-utils": "1.1.0", - "exports-loader": "0.6.4", - "extract-text-webpack-plugin": "3.0.2", - "file-loader": "1.1.5", - "fs-extra": "4.0.3", - "glob": "7.1.2", - "html-webpack-plugin": "2.30.1", - "istanbul-instrumenter-loader": "2.0.0", - "karma-source-map-support": "1.2.0", - "less": "2.7.3", - "less-loader": "4.0.5", - "license-webpack-plugin": "1.1.1", - "lodash": "4.17.4", - "memory-fs": "0.4.1", - "minimatch": "3.0.4", - "node-modules-path": "1.0.1", - "node-sass": "4.7.2", - "nopt": "4.0.1", - "opn": "5.1.0", - "portfinder": "1.0.13", - "postcss-custom-properties": "6.2.0", - "postcss-loader": "2.0.9", - "postcss-url": "7.3.0", - "raw-loader": "0.5.1", - "resolve": "1.5.0", - "rxjs": "5.5.5", - "sass-loader": "6.0.6", - "semver": "5.4.1", - "silent-error": "1.1.0", - "source-map-loader": "0.2.3", - "source-map-support": "0.4.18", - "style-loader": "0.13.2", - "stylus": "0.54.5", - "stylus-loader": "3.0.1", - "uglifyjs-webpack-plugin": "1.1.2", - "url-loader": "0.6.2", - "webpack": "3.10.0", - "webpack-concat-plugin": "1.4.2", - "webpack-dev-middleware": "1.12.2", - "webpack-dev-server": "2.9.7", - "webpack-merge": "4.1.1", - "webpack-sources": "1.1.0", - "webpack-subresource-integrity": "1.0.3", - "zone.js": "0.8.18" + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-1.7.4.tgz", + "integrity": "sha512-URdb1QtnQf+Ievy93wjq7gE81s25BkWUwJFPey+YkphBA3G1lbCAQPiEh2pntBwaIKavgEuCw+Sf2YZdgTVhDA==", + "dev": true, + "requires": { + "@angular-devkit/build-optimizer": "0.3.2", + "@angular-devkit/core": "0.3.2", + "@angular-devkit/schematics": "0.3.2", + "@ngtools/json-schema": "1.2.0", + "@ngtools/webpack": "1.10.2", + "@schematics/angular": "0.3.2", + "@schematics/package-update": "0.3.2", + "ajv": "^6.1.1", + "autoprefixer": "^7.2.3", + "cache-loader": "^1.2.0", + "chalk": "~2.2.0", + "circular-dependency-plugin": "^4.2.1", + "clean-css": "^4.1.11", + "common-tags": "^1.3.1", + "copy-webpack-plugin": "~4.4.1", + "core-object": "^3.1.0", + "denodeify": "^1.2.1", + "ember-cli-string-utils": "^1.0.0", + "extract-text-webpack-plugin": "^3.0.2", + "file-loader": "^1.1.5", + "fs-extra": "^4.0.0", + "glob": "^7.0.3", + "html-webpack-plugin": "^2.29.0", + "istanbul-instrumenter-loader": "^3.0.0", + "karma-source-map-support": "^1.2.0", + "less": "^2.7.2", + "less-loader": "^4.0.5", + "license-webpack-plugin": "^1.0.0", + "loader-utils": "1.1.0", + "lodash": "^4.11.1", + "memory-fs": "^0.4.1", + "minimatch": "^3.0.4", + "node-modules-path": "^1.0.0", + "node-sass": "^4.7.2", + "nopt": "^4.0.1", + "opn": "~5.1.0", + "portfinder": "~1.0.12", + "postcss": "^6.0.16", + "postcss-import": "^11.0.0", + "postcss-loader": "^2.0.10", + "postcss-url": "^7.1.2", + "raw-loader": "^0.5.1", + "resolve": "^1.1.7", + "rxjs": "^5.5.6", + "sass-loader": "^6.0.6", + "semver": "^5.1.0", + "silent-error": "^1.0.0", + "source-map-support": "^0.4.1", + "style-loader": "^0.19.1", + "stylus": "^0.54.5", + "stylus-loader": "^3.0.1", + "uglifyjs-webpack-plugin": "^1.1.8", + "url-loader": "^0.6.2", + "webpack": "~3.11.0", + "webpack-dev-middleware": "~1.12.0", + "webpack-dev-server": "~2.11.0", + "webpack-merge": "^4.1.0", + "webpack-sources": "^1.0.0", + "webpack-subresource-integrity": "^1.0.1" } }, "@angular/common": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.1.0.tgz", - "integrity": "sha512-J6E0OfTJJGcyoKU51ZucsDFV40YEAPgP6VCIPYECgOFHxrqg6O1ZFZSD1fdviMXMLVEFCi6Fy6IB7GJyiWgDIA==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.9.tgz", + "integrity": "sha512-g2hPcI0fnT4TV+Fd+1IohjuqBxPvxwyH9IzTn8PkU9X2M+F6cHCUvHxL1sWI2sF8pYcaHzVjq9WClym10X36Lg==", "requires": { - "tslib": "1.8.1" + "tslib": "^1.7.1" } }, "@angular/compiler": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.1.0.tgz", - "integrity": "sha512-iyFQqmhKNRSc9JRx7ty6z/wCsypjpbRu0QR6q2LMa6imuCt9qLHOvTajBQExRB8guqd/LTVDG4WiYY1lf8iO2w==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.9.tgz", + "integrity": "sha512-mN+ofInk8y/tk2TCJZx8RrGdOKdrfunoCair7tfDy4XoQJE90waGfaYWo07hYU+UYwLhrg19m2Czy6rIDciUJA==", "requires": { - "tslib": "1.8.1" + "tslib": "^1.7.1" } }, "@angular/compiler-cli": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.1.0.tgz", - "integrity": "sha512-M1//TjgcckkwTMeGTRe7mvFY+00NxaLqlsObnGA9+R3T9cpWeLpy5iVD444Wdxl5MA/Bo3TgGNmeXZsJvh466w==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.9.tgz", + "integrity": "sha512-LAEpL/6PAev3zwTow/43Atzv9AtKLAiLoS285X3EV1f80yQpYAmFRrPUtDlrIZdhZHBBv7CxnyCVpOLU3T8ohw==", "dev": true, "requires": { - "chokidar": "1.7.0", - "minimist": "1.2.0", - "reflect-metadata": "0.1.10", - "tsickle": "0.25.5" + "chokidar": "^1.4.2", + "minimist": "^1.2.0", + "reflect-metadata": "^0.1.2", + "tsickle": "^0.27.2" } }, "@angular/core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.1.0.tgz", - "integrity": "sha512-duObjve+INoz4wWuqcaJzl1isUyI37RtRblTFXgZBp2n2n0nXJq1CubcfgxQhMMR2d64xWLKg9+d34PvnzaMmg==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.9.tgz", + "integrity": "sha512-cvHBJGtasrIoARvbLFyHaOsiWKVwMNrrSTZLwrlyHP8oYzkDrE0qKGer6QCqyKt+51hF53cgWEffGzM/u/0wYg==", "requires": { - "tslib": "1.8.1" + "tslib": "^1.7.1" } }, "@angular/forms": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-5.1.0.tgz", - "integrity": "sha512-2sJqtMht/6vbFg6HwFs0MX4pRhgLt7h2pa6oTH4oBoQ2UF67jCuq4cMljDm9SVxrGw0Q83+/eBk3ER4QnKk48Q==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-5.2.9.tgz", + "integrity": "sha512-zyIOiZV/FAm1iVZWTk3Joz6Jt096hbhfDbBUrssmuiTKi9dU6rWG+Z4b88zStqulKe3HFVZkgdixWlminG8nKA==", "requires": { - "tslib": "1.8.1" + "tslib": "^1.7.1" } }, "@angular/http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.1.0.tgz", - "integrity": "sha512-ltSs52OYnWZJEnbxtHoN5LQiH/37F3GxN6iL0TsQdSlw8HzrdcdbmebKlCpfXwhgcgZC48KWbKSaOs5/xVurfQ==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.2.9.tgz", + "integrity": "sha512-DKjgIk+Dp0Xv1ieG8LawvUnL4dYZp1KroAq5cfKuO9EojP0zM3tUvBtw2vbPLsHYma7g7ZMjOoAbzVxtmTBZqw==", "requires": { - "tslib": "1.8.1" + "tslib": "^1.7.1" } }, "@angular/language-service": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-5.1.0.tgz", - "integrity": "sha512-U3RxFzjryaXkrri/JYxZPwv9Mt4IXhIfUgGn3b9gHXrmXyQZQ1kIhWW9SZ0YbExJzQZErpyPfB5mZ2DSNL9WeQ==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-5.2.9.tgz", + "integrity": "sha512-aaLnGpW9NBDkG0JYqUeGc+al1Jd1CY9yrs3mew53x5nByetQbIdZwpYm1hnSTw7LBEZBxfHTMw5EZD2YYTDmJw==", "dev": true }, "@angular/platform-browser": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.1.0.tgz", - "integrity": "sha512-8aeppeASwQv4Fj3B8KBiFHQrKPrwA328AEhlH/HnggCvt0CFffIs2PSqzJBwnOfFWvhFZk020W51B8jrHLQyoQ==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.9.tgz", + "integrity": "sha512-P6iviRTuLsLRuqtZNOO0fd4cjTo8DWsDCecwntUlI08R3kH5qeqvqarTzlw/4oD+wBzZY6bfb89JyY+n5XbX3Q==", "requires": { - "tslib": "1.8.1" + "tslib": "^1.7.1" } }, "@angular/platform-browser-dynamic": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.1.0.tgz", - "integrity": "sha512-f6Iv4NCYQwBkNeyInZzja8pg0nfUOrxx5H5rEvr0J1bwag2eDofGVPOftha7LDOLVALVOQQiXQBePATMNLB85g==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.9.tgz", + "integrity": "sha512-8C3MtyguJKDTT8FcHIRDlBxswcIdpfugOf4S2t94pVedCr4h9w2da/lcfwJKUISw1aKjfA77Sl8TDUhoS8ymmQ==", "requires": { - "tslib": "1.8.1" + "tslib": "^1.7.1" } }, "@angular/router": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.1.0.tgz", - "integrity": "sha512-CtOwqeo1IUk4kUs+tUggkYFmuu2fPTZ1G/GP7YK6gd3Jr9OtkMFB7wkmnd5YcaYo3wVeYkJWZdJQAvj6OakMww==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.2.9.tgz", + "integrity": "sha512-NtDbFK0EA1rfFc+5Dqd5mIv8E1Wcc5rDUnSty4cX2V+HxTEZvQ9DRdpO2Q0abWU5siXyqponuPHJzF08OVGyNA==", "requires": { - "tslib": "1.8.1" + "tslib": "^1.7.1" } }, - "@aspnet/signalr-client": { - "version": "1.0.0-alpha2-final", - "resolved": "https://registry.npmjs.org/@aspnet/signalr-client/-/signalr-client-1.0.0-alpha2-final.tgz", - "integrity": "sha1-a899AQKHXfiqbwOhB0h8k/Tx/rQ=", - "requires": { - "msgpack5": "3.6.0" - } + "@aspnet/signalr": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@aspnet/signalr/-/signalr-1.0.0.tgz", + "integrity": "sha512-7fXNdSTnp2y7a3i7BnvBpQpDEoG71DNq1J/Caowr+3v/nzGivnJApRg40VgBp6FlyeJqoBEQO/QuDPE0kTpczg==" }, "@ngrx/store": { "version": "4.1.1", @@ -216,45 +228,59 @@ "integrity": "sha1-aA403yd16IUnVO13f/rJW9gbfeA=" }, "@ngtools/json-schema": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.1.0.tgz", - "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.2.0.tgz", + "integrity": "sha512-pMh+HDc6mOjUO3agRfB1tInimo7hf67u+0Cska2bfXFe6oU7rSMnr5PLVtiZVgwMoBHpx/6XjBymvcnWPo2Uzg==", "dev": true }, "@ngtools/webpack": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-1.9.0.tgz", - "integrity": "sha512-+9EFOELj9D7zarsKTiIFSbTL2Pr3jYdRJ/cEuSoTxzZUDq7f3urq9ILbcy3DTaDlZs2CCYKwgz+In8QnDtw4fg==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-1.10.2.tgz", + "integrity": "sha512-3u2zg2rarG3qNLSukBClGADWuq/iNn5SQtlSeAbfKzwBeyLGbF0gN1z1tVx1Bcr8YwFzR6NdRePQmJGcoqq1fg==", "dev": true, "requires": { - "chalk": "2.2.2", - "enhanced-resolve": "3.4.1", - "loader-utils": "1.1.0", - "magic-string": "0.22.4", - "semver": "5.4.1", - "source-map": "0.5.7", - "tree-kill": "1.2.0" + "chalk": "~2.2.0", + "enhanced-resolve": "^3.1.0", + "loader-utils": "^1.0.2", + "magic-string": "^0.22.3", + "semver": "^5.3.0", + "source-map": "^0.5.6", + "tree-kill": "^1.0.0", + "webpack-sources": "^1.1.0" } }, "@schematics/angular": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-0.1.10.tgz", - "integrity": "sha512-ykq4FL0WTygkpvIcGDxnxHHT2uvJMWseDeAujmfyZpzdT9X22GOTURNo3LjvOIhhVUpMVZvnAYqjV46KqB702g==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-0.3.2.tgz", + "integrity": "sha512-Elrk0BA951s0ScFZU0AWrpUeJBYVR52DZ1QTIO5R0AhwEd1PW4olI8szPLGQlVW5Sd6H0FA/fyFLIvn2r9v6Rw==", "dev": true, "requires": { - "@angular-devkit/core": "0.0.22" + "typescript": "~2.6.2" + }, + "dependencies": { + "typescript": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", + "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", + "dev": true + } } }, - "@schematics/schematics": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/@schematics/schematics/-/schematics-0.0.10.tgz", - "integrity": "sha512-9vr9W1X6oRp42pbiGRIk3L+T6SoFtHlAGrzbh6rbFQDNXT4UCHarqDigow+DEL6PR2ptXZO9WeLcad4it7zNyA==", - "dev": true + "@schematics/package-update": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@schematics/package-update/-/package-update-0.3.2.tgz", + "integrity": "sha512-7aVP4994Hu8vRdTTohXkfGWEwLhrdNP3EZnWyBootm5zshWqlQojUGweZe5zwewsKcixeVOiy2YtW+aI4aGSLA==", + "dev": true, + "requires": { + "rxjs": "^5.5.6", + "semver": "^5.3.0", + "semver-intersect": "^1.1.2" + } }, "@types/jasmine": { - "version": "2.5.54", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.5.54.tgz", - "integrity": "sha512-B9YofFbUljs19g5gBKUYeLIulsh31U5AK70F41BImQRHEZQGm4GcN922UvnYwkduMqbC/NH+9fruWa/zrqvHIg==", + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.6.tgz", + "integrity": "sha512-clg9raJTY0EOo5pVZKX3ZlMjlYzVU73L71q5OV1jhE2Uezb7oF94jh4CvwrW6wInquQAdhOxJz5VDF2TLUGmmA==", "dev": true }, "@types/jasminewd2": { @@ -263,7 +289,7 @@ "integrity": "sha512-hYDVmQZT5VA2kigd4H4bv7vl/OhlympwREUemqBdOqtrYTo5Ytm12a5W5/nGgGYdanGVxj0x/VhZ7J3hOg/YKg==", "dev": true, "requires": { - "@types/jasmine": "2.5.54" + "@types/jasmine": "*" } }, "@types/node": { @@ -284,12 +310,24 @@ "integrity": "sha512-UBYHWph6P3tutkbXpW6XYg9ZPbTKjw/YC2hGG1/GEvWwTbvezBUv3h+mmUFw79T3RFPnmedpiXdOBbXX+4l0jg==", "dev": true }, + "@types/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=", + "dev": true + }, + "@types/strip-json-comments": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", + "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==", + "dev": true + }, "@types/three": { "version": "0.89.2", "resolved": "https://registry.npmjs.org/@types/three/-/three-0.89.2.tgz", "integrity": "sha512-+V19FU/UHijbm+i2CVF0pdsD0rMRyUuNaIiXzn/6CxYf44BcfDGMb0fQ9hv7DUpXHR51kk0IBsvwVWh6Mxmfxg==", "requires": { - "@types/webvr-api": "0.0.31" + "@types/webvr-api": "*" } }, "@types/webvr-api": { @@ -297,6 +335,16 @@ "resolved": "https://registry.npmjs.org/@types/webvr-api/-/webvr-api-0.0.31.tgz", "integrity": "sha1-9gYf6IoDXTSotqDFX4dYkB7IoI4=" }, + "JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -304,19 +352,36 @@ "dev": true }, "accepts": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", - "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "dev": true, "requires": { - "mime-types": "2.1.17", + "mime-types": "~2.1.18", "negotiator": "0.6.1" + }, + "dependencies": { + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "requires": { + "mime-db": "~1.33.0" + } + } } }, "acorn": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz", - "integrity": "sha512-jG0u7c4Ly+3QkkW18V+NRDN+4bWHdln30NL1ZL2AvFZZmQe/BfopYCtghCKKVBUSetZ4QKcyA0pY6/4Gw8Pv8w==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", "dev": true }, "acorn-dynamic-import": { @@ -325,7 +390,7 @@ "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", "dev": true, "requires": { - "acorn": "4.0.13" + "acorn": "^4.0.3" }, "dependencies": { "acorn": { @@ -336,6 +401,23 @@ } } }, + "acorn-node": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.3.0.tgz", + "integrity": "sha512-efP54n3d1aLfjL2UMdaXa6DsswwzJeI5rqhbFvXMrKiJ6eJFpf+7R0zN7t8IC+XKn2YOAFAv6xbBNgHUkoHWLw==", + "dev": true, + "requires": { + "acorn": "^5.4.1", + "xtend": "^4.0.1" + } + }, + "addressparser": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/addressparser/-/addressparser-1.0.1.tgz", + "integrity": "sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y=", + "dev": true, + "optional": true + }, "adm-zip": { "version": "0.4.7", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz", @@ -354,8 +436,8 @@ "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", "dev": true, "requires": { - "extend": "3.0.1", - "semver": "5.0.3" + "extend": "~3.0.0", + "semver": "~5.0.1" }, "dependencies": { "semver": { @@ -367,21 +449,21 @@ } }, "ajv": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.1.tgz", - "integrity": "sha1-s4u4h22ehr7plJVqBOch6IskjrI=", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", + "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", "dev": true, "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0", + "uri-js": "^3.0.2" } }, "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz", + "integrity": "sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74=", "dev": true }, "align-text": { @@ -390,23 +472,68 @@ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true - }, "amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, + "amqplib": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.5.2.tgz", + "integrity": "sha512-l9mCs6LbydtHqRniRwYkKdqxVa6XMz3Vw1fh+2gJaaVgTM6Jk3o8RccAKWKtlhT1US5sWrFh+KKxsVUALURSIA==", + "dev": true, + "optional": true, + "requires": { + "bitsyntax": "~0.0.4", + "bluebird": "^3.4.6", + "buffer-more-ints": "0.0.2", + "readable-stream": "1.x >=1.1.9", + "safe-buffer": "^5.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "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, + "optional": true + } + } + }, + "angular2-moment": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/angular2-moment/-/angular2-moment-1.8.0.tgz", + "integrity": "sha512-cBppm4FM9sOtZr4eSnodjbIhvn3bZzuw1VIb3VN53/aWKQVrNosQVG7l0dnX5ifdy08i9Yd/5eGYOXw+Lb63YA==", + "requires": { + "moment": "^2.16.0" + } + }, "ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", @@ -420,12 +547,12 @@ "dev": true }, "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "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.1" + "color-convert": "^1.9.0" } }, "anymatch": { @@ -434,8 +561,8 @@ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "micromatch": "2.3.11", - "normalize-path": "2.1.1" + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" } }, "app-root-path": { @@ -450,7 +577,7 @@ "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "aproba": { @@ -465,8 +592,8 @@ "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "dev": true, "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.3" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "argparse": { @@ -475,7 +602,7 @@ "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "arr-diff": { @@ -484,7 +611,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "arr-flatten": { @@ -493,6 +620,18 @@ "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-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-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -511,10 +650,22 @@ "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", "dev": true, "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.10.0" + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" } }, + "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-slice": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", @@ -527,7 +678,7 @@ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, "requires": { - "array-uniq": "1.0.3" + "array-uniq": "^1.0.1" } }, "array-uniq": { @@ -543,9 +694,9 @@ "dev": true }, "arraybuffer.slice": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", - "integrity": "sha1-8zshWfBTKj8xB6JywMz70a0peco=", + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", "dev": true }, "arrify": { @@ -568,14 +719,14 @@ "dev": true }, "asn1.js": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz", - "integrity": "sha512-b/OsSjvWEo8Pi8H0zsDd2P6Uqo2TK2pH8gNLSJtNLM2Db0v2QaAZ0pBQJXVjAn4gBuugeVDr7s63ZogpUIwWDg==", + "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.11.8", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "assert": { @@ -593,13 +744,43 @@ "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", "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 + }, + "ast-types": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.3.tgz", + "integrity": "sha512-XA5o5dsNw8MhyW0Q7MWXJWc4oOzZKbdsEJq45h7c8q/d9DwWZ5F2ugUc1PuMLPGsUnphCt/cNDHu8JeBbxf1qA==", + "dev": true, + "optional": true + }, + "astw": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", + "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=", + "dev": true, + "requires": { + "acorn": "^4.0.3" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + } + } + }, "async": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "dev": true, "requires": { - "lodash": "4.17.4" + "lodash": "^4.14.0" } }, "async-each": { @@ -615,24 +796,36 @@ "dev": true, "optional": true }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, + "atob": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.0.tgz", + "integrity": "sha512-SuiKH8vbsOyCALjA/+EINmt/Kdl+TQPrtFgW7XZZcwtryFu9e5kQoX3bjCW6mIvGH1fbeAZZuvwGR5IlBRznGw==", + "dev": true + }, "autoprefixer": { - "version": "6.7.7", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz", - "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.6.tgz", + "integrity": "sha512-Iq8TRIB+/9eQ8rbGhcP7ct5cYb/3qjNYAR2SnzLCEcwF6rvVOax8+9+fccgXk4bEhQGjOZd5TLhsksmAdsbGqQ==", "dev": true, "requires": { - "browserslist": "1.7.7", - "caniuse-db": "1.0.30000780", - "normalize-range": "0.1.2", - "num2fraction": "1.2.2", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" + "browserslist": "^2.11.3", + "caniuse-lite": "^1.0.30000805", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^6.0.17", + "postcss-value-parser": "^3.2.3" } }, "aws-sign2": { @@ -647,15 +840,25 @@ "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", "dev": true }, + "axios": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.15.3.tgz", + "integrity": "sha1-LJ1jiy4ZGgjqHWzJiOrda6W9wFM=", + "dev": true, + "optional": true, + "requires": { + "follow-redirects": "1.0.0" + } + }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" }, "dependencies": { "ansi-styles": { @@ -670,11 +873,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "supports-color": { @@ -691,14 +894,14 @@ "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", "dev": true, "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.4", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.6", + "trim-right": "^1.0.1" }, "dependencies": { "jsesc": { @@ -715,7 +918,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-runtime": { @@ -724,8 +927,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.1", - "regenerator-runtime": "0.11.1" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -734,11 +937,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.4" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, "babel-traverse": { @@ -747,15 +950,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" } }, "babel-types": { @@ -764,10 +967,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -788,6 +991,38 @@ "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" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, "base64-arraybuffer": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", @@ -795,9 +1030,9 @@ "dev": true }, "base64-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", - "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.3.tgz", + "integrity": "sha512-MsAhsUW1GxCdgYSO6tAfZrNapmUKk7mWx/k5mFY/A1gBtkaCaNapTg+FExCw1r9yeaZhqx/xPg43xgTFH6KL5w==", "dev": true }, "base64id": { @@ -819,7 +1054,7 @@ "dev": true, "optional": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "better-assert": { @@ -843,12 +1078,14 @@ "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", "dev": true }, - "bl": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", - "integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=", + "bitsyntax": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/bitsyntax/-/bitsyntax-0.0.4.tgz", + "integrity": "sha1-6xDMb4K4xJDj6FaY8H6D1G4MuoI=", + "dev": true, + "optional": true, "requires": { - "readable-stream": "2.3.3" + "buffer-more-ints": "0.0.2" } }, "blob": { @@ -864,7 +1101,7 @@ "dev": true, "optional": true, "requires": { - "inherits": "2.0.3" + "inherits": "~2.0.0" } }, "blocking-proxy": { @@ -873,7 +1110,7 @@ "integrity": "sha1-RikF4Nz76pcPQao3Ij3anAexkSs=", "dev": true, "requires": { - "minimist": "1.2.0" + "minimist": "^1.2.0" } }, "bluebird": { @@ -895,15 +1132,15 @@ "dev": true, "requires": { "bytes": "3.0.0", - "content-type": "1.0.4", + "content-type": "~1.0.4", "debug": "2.6.9", - "depd": "1.1.1", - "http-errors": "1.6.2", + "depd": "~1.1.1", + "http-errors": "~1.6.2", "iconv-lite": "0.4.19", - "on-finished": "2.3.0", + "on-finished": "~2.3.0", "qs": "6.5.1", "raw-body": "2.3.2", - "type-is": "1.6.15" + "type-is": "~1.6.15" }, "dependencies": { "qs": { @@ -920,12 +1157,12 @@ "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", "dev": true, "requires": { - "array-flatten": "2.1.1", - "deep-equal": "1.0.1", - "dns-equal": "1.0.0", - "dns-txt": "2.0.2", - "multicast-dns": "6.2.1", - "multicast-dns-service-types": "1.1.0" + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" } }, "boolbase": { @@ -940,7 +1177,7 @@ "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "dev": true, "requires": { - "hoek": "2.16.3" + "hoek": "2.x.x" } }, "brace-expansion": { @@ -949,7 +1186,7 @@ "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -959,9 +1196,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "brorand": { @@ -970,18 +1207,164 @@ "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.2", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "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 + } + } + }, + "browserify": { + "version": "14.5.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.5.0.tgz", + "integrity": "sha512-gKfOsNQv/toWz+60nSPfYzuwSEdzvV2WdxrVPUbPD/qui44rAkB3t3muNtmmGYHqrG56FGwX9SUEQmzNLAeS7g==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^1.11.0", + "browserify-zlib": "~0.2.0", + "buffer": "^5.0.2", + "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": "^1.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.3.0", + "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": "~1.0.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" + }, + "dependencies": { + "buffer": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.1.0.tgz", + "integrity": "sha512-YkIRgwsZwJWTnyQrsBTWefizHh+8GYj3kbL1BTiAQ/9pwpino0G7B2gp5tx/FUBqUlvtxV85KNR3mwfAtv15Yw==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "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": { + "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" + } + }, + "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 + } + } + }, + "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 + }, + "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" + } + } + } + }, "browserify-aes": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz", - "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==", + "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.4", - "create-hash": "1.1.3", - "evp_bytestokey": "1.0.3", - "inherits": "2.0.3", - "safe-buffer": "5.1.1" + "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": { @@ -990,9 +1373,9 @@ "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", "dev": true, "requires": { - "browserify-aes": "1.1.1", - "browserify-des": "1.0.0", - "evp_bytestokey": "1.0.3" + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, "browserify-des": { @@ -1001,9 +1384,9 @@ "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", "dev": true, "requires": { - "cipher-base": "1.0.4", - "des.js": "1.0.0", - "inherits": "2.0.3" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1" } }, "browserify-rsa": { @@ -1012,8 +1395,8 @@ "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { - "bn.js": "4.11.8", - "randombytes": "2.0.5" + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" } }, "browserify-sign": { @@ -1022,13 +1405,13 @@ "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "dev": true, "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "elliptic": "6.4.0", - "inherits": "2.0.3", - "parse-asn1": "5.1.0" + "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": { @@ -1037,17 +1420,17 @@ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "dev": true, "requires": { - "pako": "1.0.6" + "pako": "~1.0.5" } }, "browserslist": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", - "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "version": "2.11.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", + "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", "dev": true, "requires": { - "caniuse-db": "1.0.30000780", - "electron-to-chromium": "1.3.28" + "caniuse-lite": "^1.0.30000792", + "electron-to-chromium": "^1.3.30" } }, "buffer": { @@ -1056,23 +1439,51 @@ "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { - "base64-js": "1.2.1", - "ieee754": "1.1.8", - "isarray": "1.0.0" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, + "buffer-from": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", + "dev": true + }, "buffer-indexof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", "dev": true }, + "buffer-more-ints": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-0.0.2.tgz", + "integrity": "sha1-JrOIXRD6E9t/wBquOquHAZngEkw=", + "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 }, + "buildmail": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/buildmail/-/buildmail-4.0.1.tgz", + "integrity": "sha1-h393OLeHKYccmhBeO4N9K+EaenI=", + "dev": true, + "optional": true, + "requires": { + "addressparser": "1.0.1", + "libbase64": "0.1.0", + "libmime": "3.0.0", + "libqp": "1.1.0", + "nodemailer-fetch": "1.6.0", + "nodemailer-shared": "1.1.0", + "punycode": "1.4.1" + } + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -1092,27 +1503,70 @@ "dev": true }, "cacache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.1.tgz", - "integrity": "sha512-dRHYcs9LvG9cHgdPzjiI+/eS7e1xRhULrcyOx04RZQsszNJXU2SL9CyG60yLnge282Qq5nwTv+ieK2fH+WPZmA==", - "dev": true, - "requires": { - "bluebird": "3.5.1", - "chownr": "1.0.1", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "lru-cache": "4.1.1", - "mississippi": "1.3.0", - "mkdirp": "0.5.1", - "move-concurrently": "1.0.1", - "promise-inflight": "1.0.1", - "rimraf": "2.6.2", - "ssri": "5.0.0", - "unique-filename": "1.1.0", - "y18n": "3.2.1" - } - }, - "callsite": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "cache-loader": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-1.2.2.tgz", + "integrity": "sha512-rsGh4SIYyB9glU+d0OcHwiXHXBoUgDhHZaQ1KAbiXqfz1CDPxtTboh1gPbJ0q2qdO8a9lfcjgC5CJ2Ms32y5bw==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "mkdirp": "^0.5.1", + "neo-async": "^2.5.0", + "schema-utils": "^0.4.2" + } + }, + "cached-path-relative": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", + "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=", + "dev": true + }, + "callsite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", @@ -1124,8 +1578,8 @@ "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", "dev": true, "requires": { - "no-case": "2.3.2", - "upper-case": "1.1.3" + "no-case": "^2.2.0", + "upper-case": "^1.1.1" } }, "camelcase": { @@ -1140,26 +1594,14 @@ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" - } - }, - "caniuse-api": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz", - "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", - "dev": true, - "requires": { - "browserslist": "1.7.7", - "caniuse-db": "1.0.30000780", - "lodash.memoize": "4.1.2", - "lodash.uniq": "4.5.0" + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" } }, - "caniuse-db": { - "version": "1.0.30000780", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000780.tgz", - "integrity": "sha1-jRl3Vh0A/w8O0ra2YUAyirRQTAo=", + "caniuse-lite": { + "version": "1.0.30000824", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000824.tgz", + "integrity": "sha512-KcgeAvVkpzN05Mjiyz5vf0le5AWRwfRGqGkKXWWsdrLQd4EIBevReSy7mYCdwSq7MqKrmJ0lEQEkUQE2VspRRw==", "dev": true }, "caseless": { @@ -1174,8 +1616,8 @@ "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", "dev": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" }, "dependencies": { "lazy-cache": { @@ -1192,49 +1634,26 @@ "integrity": "sha512-LvixLAQ4MYhbf7hgL4o5PeK32gJKvVzDRiSNIApDofQvyhl8adgG2lJVXn4+ekQoK7HL9RF8lqxwerpe0x2pCw==", "dev": true, "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" + "ansi-styles": "^3.1.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^4.0.0" } }, - "charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=", - "dev": true - }, "chokidar": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "fsevents": "1.1.3", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - } + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" } }, "chownr": { @@ -1249,59 +1668,115 @@ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "circular-dependency-plugin": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-4.3.0.tgz", - "integrity": "sha512-L3W9L1S0wC64rq+QSaZzmWnJW7cVBgimxI2lNEFEX5biwlRG8EHRM68JFi+CX5ZkCGUWJHIpnhdVs181Zlq3wA==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-4.4.0.tgz", + "integrity": "sha512-yEFtUNUYT4jBykEX5ZOHw+5goA3glGZr9wAXIQqoyakjz5H5TeUmScnWRc52douAhb9eYzK3s7V6bXfNnjFdzg==", "dev": true }, - "clap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", - "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", + "circular-json": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.1.tgz", + "integrity": "sha512-UjgcRlTAhAkLeXmDe2wK7ktwy/tgAqxiSndTIPiFZuIPLZmzHzWMwUIe9h9m/OokypG7snxCDEuwJshGBdPvaw==", + "dev": true + }, + "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": { - "chalk": "1.1.3" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true + "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" + } }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "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": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "kind-of": "^3.0.2" + }, + "dependencies": { + "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" + } + } } }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "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" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "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 } } }, "clean-css": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.9.tgz", - "integrity": "sha1-Nc7ornaHpJuYA09w3gDE7dOCYwE=", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", + "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "0.5.x" } }, "cliui": { @@ -1310,27 +1785,44 @@ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, "clone": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", - "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", "dev": true }, "clone-deep": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.3.0.tgz", - "integrity": "sha1-NIxhrpzb4O3+BT2R/0zFIdeQ7eg=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", + "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", "dev": true, "requires": { - "for-own": "1.0.0", - "is-plain-object": "2.0.4", - "kind-of": "3.2.2", - "shallow-clone": "0.1.2" + "for-own": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.0", + "shallow-clone": "^1.0.0" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "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 + } } }, "co": { @@ -1339,15 +1831,6 @@ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, - "coa": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.4.tgz", - "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", - "dev": true, - "requires": { - "q": "1.5.1" - } - }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -1360,23 +1843,22 @@ "integrity": "sha512-MsOcaiLqcBK7hjHbfp9HZrflqWg5tD9A5qVSXkW208OJ8pkf63id8IiOjEiK/XU3o70W8tWbFKi1tAOwiJDMrQ==", "dev": true, "requires": { - "app-root-path": "2.0.1", - "css-selector-tokenizer": "0.7.0", - "cssauron": "1.4.0", - "semver-dsl": "1.0.1", - "source-map": "0.5.7", - "sprintf-js": "1.0.3" + "app-root-path": "^2.0.1", + "css-selector-tokenizer": "^0.7.0", + "cssauron": "^1.4.0", + "semver-dsl": "^1.0.1", + "source-map": "^0.5.6", + "sprintf-js": "^1.0.3" } }, - "color": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", - "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "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": { - "clone": "1.0.3", - "color-convert": "1.9.1", - "color-string": "0.3.0" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "color-convert": { @@ -1385,7 +1867,7 @@ "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "^1.1.1" } }, "color-name": { @@ -1394,26 +1876,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "color-string": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", - "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "colormin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", - "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", - "dev": true, - "requires": { - "color": "0.11.4", - "css-color-names": "0.0.4", - "has": "1.0.1" - } - }, "colors": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", @@ -1426,7 +1888,27 @@ "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", "dev": true, "requires": { - "lodash": "4.17.4" + "lodash": "^4.5.0" + } + }, + "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": { @@ -1435,7 +1917,7 @@ "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", "dev": true, "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "commander": { @@ -1444,12 +1926,12 @@ "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==" }, "common-tags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.5.1.tgz", - "integrity": "sha512-NrUYGY5TApAk9KB+IZXkR3GR4tA3g26HDsoiGt4kCMHZ727gOGkC+UNfq0Z22jE15bLkc/6RV5Jw1RBW6Usg6A==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.7.2.tgz", + "integrity": "sha512-joj9ZlUOjCrwdbmiLqafeUSgkUM74NqhLsZtSqDmhKudaIY197zTrb8JMl31fMnCUuxwFT23eC/oWvrZzDLRJQ==", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.26.0" } }, "commondir": { @@ -1465,9 +1947,9 @@ "dev": true }, "component-emitter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", - "integrity": "sha1-KWWU8nU9qmOZbSrwjRWpURbJrsM=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", "dev": true }, "component-inherit": { @@ -1477,27 +1959,35 @@ "dev": true }, "compressible": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.12.tgz", - "integrity": "sha1-xZpcmdt2dn6YdlAOJx72OzSTvWY=", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz", + "integrity": "sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k=", "dev": true, "requires": { - "mime-db": "1.30.0" + "mime-db": ">= 1.33.0 < 2" + }, + "dependencies": { + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true + } } }, "compression": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.1.tgz", - "integrity": "sha1-7/JgPvwuIs+G810uuTWJ+YdTc9s=", + "version": "1.7.2", + "resolved": "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz", + "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", "dev": true, "requires": { - "accepts": "1.3.4", + "accepts": "~1.3.4", "bytes": "3.0.0", - "compressible": "2.0.12", + "compressible": "~2.0.13", "debug": "2.6.9", - "on-headers": "1.0.1", + "on-headers": "~1.0.1", "safe-buffer": "5.1.1", - "vary": "1.1.2" + "vary": "~1.1.2" } }, "concat-map": { @@ -1507,42 +1997,49 @@ "dev": true }, "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "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": { - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "connect": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.5.tgz", - "integrity": "sha1-+43ee6B2OHfQ7J352sC0tA5yx9o=", + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", + "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", "dev": true, "requires": { "debug": "2.6.9", - "finalhandler": "1.0.6", - "parseurl": "1.3.2", + "finalhandler": "1.1.0", + "parseurl": "~1.3.2", "utils-merge": "1.0.1" }, "dependencies": { "finalhandler": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.6.tgz", - "integrity": "sha1-AHrqM9Gk0+QgF/YkhIrVjSEvgU8=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", "dev": true, "requires": { "debug": "2.6.9", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "on-finished": "2.3.0", - "parseurl": "1.3.2", - "statuses": "1.3.1", - "unpipe": "1.0.0" - } + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "dev": true } } }, @@ -1558,7 +2055,7 @@ "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { - "date-now": "0.1.4" + "date-now": "^0.1.4" } }, "console-control-strings": { @@ -1609,38 +2106,49 @@ "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "dev": true, "requires": { - "aproba": "1.2.0", - "fs-write-stream-atomic": "1.0.10", - "iferr": "0.1.5", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "run-queue": "1.0.3" + "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": "4.2.3", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.2.3.tgz", - "integrity": "sha512-cL/Wl3Y1QmmKThl/mWeGB+HH3YH+25tn8nhqEGsZda4Yn7GqGnDZ+TbeKJ7A6zvrxyNhhuviYAxn/tCyyAqh8Q==", - "dev": true, - "requires": { - "bluebird": "3.5.1", - "glob": "7.1.2", - "is-glob": "4.0.0", - "loader-utils": "0.2.17", - "lodash": "4.17.4", - "minimatch": "3.0.4" + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.4.3.tgz", + "integrity": "sha512-v4THQ24Tks2NkyOvZuFDgZVfDD9YaA9rwYLZTrWg2GHIA8lrH5DboEyeoorh5Skki+PUbgSmnsCwhMWqYrQZrA==", + "dev": true, + "requires": { + "cacache": "^10.0.1", + "find-cache-dir": "^1.0.0", + "globby": "^7.1.1", + "is-glob": "^4.0.0", + "loader-utils": "^1.1.0", + "minimatch": "^3.0.4", + "p-limit": "^1.0.0", + "serialize-javascript": "^1.4.0" }, "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "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-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": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" + "is-extglob": "2.1.1" } } } @@ -1656,13 +2164,14 @@ "integrity": "sha512-sA2/4+/PZ/KV6CKgjrVrrUVBKCkdDO02CUlQ0YKTQoYUwPYNOtOAcWlbYhd5v/1JqYaA6oZ4sDlOU4ppVw6Wbg==", "dev": true, "requires": { - "chalk": "2.2.2" + "chalk": "^2.0.0" } }, "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=" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true }, "cosmiconfig": { "version": "2.2.2", @@ -1670,13 +2179,13 @@ "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", "dev": true, "requires": { - "is-directory": "0.3.1", - "js-yaml": "3.7.0", - "minimist": "1.2.0", - "object-assign": "4.1.1", - "os-homedir": "1.0.2", - "parse-json": "2.2.0", - "require-from-string": "1.2.1" + "is-directory": "^0.3.1", + "js-yaml": "^3.4.3", + "minimist": "^1.2.0", + "object-assign": "^4.1.0", + "os-homedir": "^1.0.1", + "parse-json": "^2.2.0", + "require-from-string": "^1.1.0" } }, "create-ecdh": { @@ -1685,8 +2194,8 @@ "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", "dev": true, "requires": { - "bn.js": "4.11.8", - "elliptic": "6.4.0" + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" } }, "create-hash": { @@ -1695,10 +2204,10 @@ "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", "dev": true, "requires": { - "cipher-base": "1.0.4", - "inherits": "2.0.3", - "ripemd160": "2.0.1", - "sha.js": "2.4.9" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "sha.js": "^2.4.0" } }, "create-hmac": { @@ -1707,12 +2216,12 @@ "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", "dev": true, "requires": { - "cipher-base": "1.0.4", - "create-hash": "1.1.3", - "inherits": "2.0.3", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", - "sha.js": "2.4.9" + "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": { @@ -1722,23 +2231,17 @@ "dev": true, "optional": true, "requires": { - "lru-cache": "4.1.1", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "which": "^1.2.9" } }, - "crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=", - "dev": true - }, "cryptiles": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "dev": true, "requires": { - "boom": "2.10.1" + "boom": "2.x.x" } }, "crypto-browserify": { @@ -1747,45 +2250,17 @@ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dev": true, "requires": { - "browserify-cipher": "1.0.0", - "browserify-sign": "4.0.4", - "create-ecdh": "4.0.0", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "diffie-hellman": "5.0.2", - "inherits": "2.0.3", - "pbkdf2": "3.0.14", - "public-encrypt": "4.0.0", - "randombytes": "2.0.5", - "randomfill": "1.0.3" - } - }, - "css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", - "dev": true - }, - "css-loader": { - "version": "0.28.7", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.28.7.tgz", - "integrity": "sha512-GxMpax8a/VgcfRrVy0gXD6yLd5ePYbXX/5zGgTVYp4wXtJklS8Z2VaUArJgc//f6/Dzil7BaJObdSv8eKKCPgg==", - "dev": true, - "requires": { - "babel-code-frame": "6.26.0", - "css-selector-tokenizer": "0.7.0", - "cssnano": "3.10.0", - "icss-utils": "2.1.0", - "loader-utils": "1.1.0", - "lodash.camelcase": "4.3.0", - "object-assign": "4.1.1", - "postcss": "5.2.18", - "postcss-modules-extract-imports": "1.1.0", - "postcss-modules-local-by-default": "1.2.0", - "postcss-modules-scope": "1.1.0", - "postcss-modules-values": "1.3.0", - "postcss-value-parser": "3.3.0", - "source-list-map": "2.0.0" + "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" } }, "css-parse": { @@ -1800,10 +2275,10 @@ "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", "dev": true, "requires": { - "boolbase": "1.0.0", - "css-what": "2.1.0", + "boolbase": "~1.0.0", + "css-what": "2.1", "domutils": "1.5.1", - "nth-check": "1.0.1" + "nth-check": "~1.0.1" } }, "css-selector-tokenizer": { @@ -1812,9 +2287,9 @@ "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", "dev": true, "requires": { - "cssesc": "0.1.0", - "fastparse": "1.1.1", - "regexpu-core": "1.0.0" + "cssesc": "^0.1.0", + "fastparse": "^1.1.1", + "regexpu-core": "^1.0.0" } }, "css-what": { @@ -1829,7 +2304,7 @@ "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", "dev": true, "requires": { - "through": "2.3.8" + "through": "X.X.X" } }, "cssesc": { @@ -1838,56 +2313,6 @@ "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", "dev": true }, - "cssnano": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", - "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", - "dev": true, - "requires": { - "autoprefixer": "6.7.7", - "decamelize": "1.2.0", - "defined": "1.0.0", - "has": "1.0.1", - "object-assign": "4.1.1", - "postcss": "5.2.18", - "postcss-calc": "5.3.1", - "postcss-colormin": "2.2.2", - "postcss-convert-values": "2.6.1", - "postcss-discard-comments": "2.0.4", - "postcss-discard-duplicates": "2.1.0", - "postcss-discard-empty": "2.1.0", - "postcss-discard-overridden": "0.1.1", - "postcss-discard-unused": "2.2.3", - "postcss-filter-plugins": "2.0.2", - "postcss-merge-idents": "2.1.7", - "postcss-merge-longhand": "2.0.2", - "postcss-merge-rules": "2.1.2", - "postcss-minify-font-values": "1.0.5", - "postcss-minify-gradients": "1.0.5", - "postcss-minify-params": "1.2.2", - "postcss-minify-selectors": "2.1.1", - "postcss-normalize-charset": "1.1.1", - "postcss-normalize-url": "3.0.8", - "postcss-ordered-values": "2.2.3", - "postcss-reduce-idents": "2.4.0", - "postcss-reduce-initial": "1.0.1", - "postcss-reduce-transforms": "1.0.4", - "postcss-svgo": "2.1.6", - "postcss-unique-selectors": "2.0.2", - "postcss-value-parser": "3.3.0", - "postcss-zindex": "2.2.0" - } - }, - "csso": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/csso/-/csso-2.3.2.tgz", - "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=", - "dev": true, - "requires": { - "clap": "1.2.3", - "source-map": "0.5.7" - } - }, "cuint": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", @@ -1900,7 +2325,7 @@ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "requires": { - "array-find-index": "1.0.2" + "array-find-index": "^1.0.1" } }, "custom-event": { @@ -1921,7 +2346,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.37" + "es5-ext": "^0.10.9" } }, "d3": { @@ -1976,11 +2401,11 @@ "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-1.0.4.tgz", "integrity": "sha1-AMLyOAGfJPbAoZSibUGhUw/+e8Q=", "requires": { - "d3-dispatch": "1.0.3", - "d3-drag": "1.2.1", - "d3-interpolate": "1.1.6", - "d3-selection": "1.2.0", - "d3-transition": "1.1.1" + "d3-dispatch": "1", + "d3-drag": "1", + "d3-interpolate": "1", + "d3-selection": "1", + "d3-transition": "1" } }, "d3-chord": { @@ -1988,8 +2413,8 @@ "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-1.0.4.tgz", "integrity": "sha1-fexPC6iG9xP+ERxF92NBT290yiw=", "requires": { - "d3-array": "1.2.1", - "d3-path": "1.0.5" + "d3-array": "1", + "d3-path": "1" } }, "d3-collection": { @@ -2012,8 +2437,8 @@ "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-1.2.1.tgz", "integrity": "sha512-Cg8/K2rTtzxzrb0fmnYOUeZHvwa4PHzwXOLZZPwtEs2SKLLKLXeYwZKBB+DlOxUvFmarOnmt//cU4+3US2lyyQ==", "requires": { - "d3-dispatch": "1.0.3", - "d3-selection": "1.2.0" + "d3-dispatch": "1", + "d3-selection": "1" } }, "d3-dsv": { @@ -2021,9 +2446,9 @@ "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-1.0.8.tgz", "integrity": "sha512-IVCJpQ+YGe3qu6odkPQI0KPqfxkhbP/oM1XhhE/DFiYmcXKfCRub4KXyiuehV1d4drjWVXHUWx4gHqhdZb6n/A==", "requires": { - "commander": "2.12.2", - "iconv-lite": "0.4.19", - "rw": "1.3.3" + "commander": "2", + "iconv-lite": "0.4", + "rw": "1" } }, "d3-ease": { @@ -2036,10 +2461,10 @@ "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-1.1.0.tgz", "integrity": "sha512-2HVQz3/VCQs0QeRNZTYb7GxoUCeb6bOzMp/cGcLa87awY9ZsPvXOGeZm0iaGBjXic6I1ysKwMn+g+5jSAdzwcg==", "requires": { - "d3-collection": "1.0.4", - "d3-dispatch": "1.0.3", - "d3-quadtree": "1.0.3", - "d3-timer": "1.0.7" + "d3-collection": "1", + "d3-dispatch": "1", + "d3-quadtree": "1", + "d3-timer": "1" } }, "d3-format": { @@ -2052,7 +2477,7 @@ "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-1.9.0.tgz", "integrity": "sha512-94YbAT+q5E/p+XEd4VKiNkQNicrrON3l6eoW70sC8aHjUGoBDJ/Ht8Z/hvhGJJTi2zhYBvUd34Mfqv4TG7we9A==", "requires": { - "d3-array": "1.2.1" + "d3-array": "1" } }, "d3-hierarchy": { @@ -2065,7 +2490,7 @@ "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.1.6.tgz", "integrity": "sha512-mOnv5a+pZzkNIHtw/V6I+w9Lqm9L5bG3OTXPM5A+QO0yyVMQ4W1uZhR+VOJmazaOZXri2ppbiZ5BUNWT0pFM9A==", "requires": { - "d3-color": "1.0.3" + "d3-color": "1" } }, "d3-path": { @@ -2098,10 +2523,10 @@ "resolved": "https://registry.npmjs.org/d3-request/-/d3-request-1.0.6.tgz", "integrity": "sha512-FJj8ySY6GYuAJHZMaCQ83xEYE4KbkPkmxZ3Hu6zA1xxG2GD+z6P+Lyp+zjdsHf0xEbp2xcluDI50rCS855EQ6w==", "requires": { - "d3-collection": "1.0.4", - "d3-dispatch": "1.0.3", - "d3-dsv": "1.0.8", - "xmlhttprequest": "1.8.0" + "d3-collection": "1", + "d3-dispatch": "1", + "d3-dsv": "1", + "xmlhttprequest": "1" } }, "d3-scale": { @@ -2109,13 +2534,13 @@ "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-1.0.7.tgz", "integrity": "sha512-KvU92czp2/qse5tUfGms6Kjig0AhHOwkzXG0+PqIJB3ke0WUv088AHMZI0OssO9NCkXt4RP8yju9rpH8aGB7Lw==", "requires": { - "d3-array": "1.2.1", - "d3-collection": "1.0.4", - "d3-color": "1.0.3", - "d3-format": "1.2.1", - "d3-interpolate": "1.1.6", - "d3-time": "1.0.8", - "d3-time-format": "2.1.1" + "d3-array": "^1.2.0", + "d3-collection": "1", + "d3-color": "1", + "d3-format": "1", + "d3-interpolate": "1", + "d3-time": "1", + "d3-time-format": "2" } }, "d3-selection": { @@ -2128,7 +2553,7 @@ "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.2.0.tgz", "integrity": "sha1-RdAVOPBkuv0F6j1tLLdI/YxB93c=", "requires": { - "d3-path": "1.0.5" + "d3-path": "1" } }, "d3-time": { @@ -2141,7 +2566,7 @@ "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.1.1.tgz", "integrity": "sha512-8kAkymq2WMfzW7e+s/IUNAtN/y3gZXGRrdGfo6R8NKPAA85UBTxZg5E61bR6nLwjPjj4d3zywSQe1CkYLPFyrw==", "requires": { - "d3-time": "1.0.8" + "d3-time": "1" } }, "d3-timer": { @@ -2154,12 +2579,12 @@ "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-1.1.1.tgz", "integrity": "sha512-xeg8oggyQ+y5eb4J13iDgKIjUcEfIOZs2BqV/eEmXm2twx80wTzJ4tB4vaZ5BKfz7XsI/DFmQL5me6O27/5ykQ==", "requires": { - "d3-color": "1.0.3", - "d3-dispatch": "1.0.3", - "d3-ease": "1.0.3", - "d3-interpolate": "1.1.6", - "d3-selection": "1.2.0", - "d3-timer": "1.0.7" + "d3-color": "1", + "d3-dispatch": "1", + "d3-ease": "1", + "d3-interpolate": "1", + "d3-selection": "^1.1.0", + "d3-timer": "1" } }, "d3-voronoi": { @@ -2172,11 +2597,11 @@ "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-1.7.1.tgz", "integrity": "sha512-sZHQ55DGq5BZBFGnRshUT8tm2sfhPHFnOlmPbbwTkAoPeVdRTkB4Xsf9GCY0TSHrTD8PeJPZGmP/TpGicwJDJQ==", "requires": { - "d3-dispatch": "1.0.3", - "d3-drag": "1.2.1", - "d3-interpolate": "1.1.6", - "d3-selection": "1.2.0", - "d3-transition": "1.1.1" + "d3-dispatch": "1", + "d3-drag": "1", + "d3-interpolate": "1", + "d3-selection": "1", + "d3-transition": "1" } }, "dashdash": { @@ -2185,7 +2610,7 @@ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" }, "dependencies": { "assert-plus": { @@ -2196,6 +2621,19 @@ } } }, + "data-uri-to-buffer": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", + "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==", + "dev": true, + "optional": true + }, + "date-format": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-1.2.0.tgz", + "integrity": "sha1-YV6CjiM90aubua4JUODOzPpuytg=", + "dev": true + }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", @@ -2217,19 +2655,32 @@ "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-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", "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, + "optional": true + }, "default-require-extensions": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "define-properties": { @@ -2238,8 +2689,26 @@ "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "dev": true, "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" + "foreach": "^2.0.5", + "object-keys": "^1.0.8" + } + }, + "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": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } } }, "defined": { @@ -2248,20 +2717,62 @@ "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", "dev": true }, - "del": { - "version": "3.0.0", + "degenerator": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", + "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", + "dev": true, + "optional": true, + "requires": { + "ast-types": "0.x.x", + "escodegen": "1.x.x", + "esprima": "3.x.x" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true, + "optional": true + } + } + }, + "del": { + "version": "3.0.0", "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", "dev": true, "requires": { - "globby": "6.1.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "p-map": "1.2.0", - "pify": "3.0.0", - "rimraf": "2.6.2" + "globby": "^6.1.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", + "rimraf": "^2.2.8" }, "dependencies": { + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -2289,19 +2800,31 @@ "dev": true }, "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "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.3", - "minimalistic-assert": "1.0.0" + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "destroy": { @@ -2316,7 +2839,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "detect-node": { @@ -2325,6 +2848,16 @@ "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=", "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" + } + }, "di": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", @@ -2332,9 +2865,9 @@ "dev": true }, "diff": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", - "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, "diffie-hellman": { @@ -2343,9 +2876,19 @@ "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", "dev": true, "requires": { - "bn.js": "4.11.8", - "miller-rabin": "4.0.1", - "randombytes": "2.0.5" + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" } }, "dns-equal": { @@ -2355,13 +2898,13 @@ "dev": true }, "dns-packet": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.2.2.tgz", - "integrity": "sha512-kN+DjfGF7dJGUL7nWRktL9Z18t1rWP3aQlyZdY8XlpvU3Nc6GeFTQApftcjtWKxAZfiggZSGrCEoszNgvnpwDg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", "dev": true, "requires": { - "ip": "1.1.5", - "safe-buffer": "5.1.1" + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" } }, "dns-txt": { @@ -2370,7 +2913,7 @@ "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", "dev": true, "requires": { - "buffer-indexof": "1.1.1" + "buffer-indexof": "^1.0.0" } }, "dom-converter": { @@ -2379,7 +2922,7 @@ "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", "dev": true, "requires": { - "utila": "0.3.3" + "utila": "~0.3" }, "dependencies": { "utila": { @@ -2396,10 +2939,10 @@ "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", "dev": true, "requires": { - "custom-event": "1.0.1", - "ent": "2.2.0", - "extend": "3.0.1", - "void-elements": "2.0.1" + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" } }, "dom-serializer": { @@ -2408,8 +2951,8 @@ "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "dev": true, "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" + "domelementtype": "~1.1.1", + "entities": "~1.1.1" }, "dependencies": { "domelementtype": { @@ -2421,9 +2964,9 @@ } }, "domain-browser": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", "dev": true }, "domelementtype": { @@ -2438,7 +2981,7 @@ "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", "dev": true, "requires": { - "domelementtype": "1.3.0" + "domelementtype": "1" } }, "domutils": { @@ -2447,20 +2990,36 @@ "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", "dev": true, "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "double-ended-queue": { + "version": "2.1.0-0", + "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", + "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=", + "dev": true, + "optional": 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.5.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", - "integrity": "sha512-j5goxHTwVED1Fpe5hh3q9R93Kip0Bg2KVAt4f8CEYM3UEwYcPSvWbXaUQOzdX/HtiNomipv+gU7ASQPDbV7pGQ==", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", + "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", "dev": true, "requires": { - "end-of-stream": "1.4.0", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "stream-shift": "1.0.0" + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" } }, "ecc-jsbn": { @@ -2470,7 +3029,7 @@ "dev": true, "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "~0.1.0" } }, "ee-first": { @@ -2480,15 +3039,15 @@ "dev": true }, "ejs": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz", - "integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=", + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.8.tgz", + "integrity": "sha512-QIDZL54fyV8MDcAsO91BMH1ft2qGGaHIJsJIA/+t+7uvXol1dm413fPcUgUb4k8F/9457rx4/KFE4XfDifrQxQ==", "dev": true }, "electron-to-chromium": { - "version": "1.3.28", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.28.tgz", - "integrity": "sha1-jdTmRYCGZE6fnwoc8y4qH53/2e4=", + "version": "1.3.42", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz", + "integrity": "sha1-lcM78B0MxAVVauyJn+Yf1NduoPk=", "dev": true }, "elliptic": { @@ -2497,13 +3056,13 @@ "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", "dev": true, "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0", - "hash.js": "1.1.3", - "hmac-drbg": "1.0.1", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" + "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" } }, "ember-cli-string-utils": { @@ -2519,116 +3078,121 @@ "dev": true }, "encodeurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", - "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", "dev": true }, "end-of-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", - "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", + "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" + "once": "^1.4.0" } }, "engine.io": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-1.8.3.tgz", - "integrity": "sha1-jef5eJXSDTm4X4ju7nd7K9QrE9Q=", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.5.tgz", + "integrity": "sha512-D06ivJkYxyRrcEe0bTpNnBQNgP9d3xog+qZlLbui8EsMr/DouQpf5o9FzJnWYHEYE0YsFHllUv2R1dkgYZXHcA==", "dev": true, "requires": { - "accepts": "1.3.3", + "accepts": "~1.3.4", "base64id": "1.0.0", "cookie": "0.3.1", - "debug": "2.3.3", - "engine.io-parser": "1.3.2", - "ws": "1.1.2" + "debug": "~3.1.0", + "engine.io-parser": "~2.1.0", + "uws": "~9.14.0", + "ws": "~3.3.1" }, "dependencies": { - "accepts": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", - "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { - "mime-types": "2.1.17", - "negotiator": "0.6.1" + "ms": "2.0.0" } }, - "debug": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", - "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true + }, + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", "dev": true, "requires": { - "ms": "0.7.2" + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" } - }, - "ms": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", - "dev": true } } }, "engine.io-client": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.8.3.tgz", - "integrity": "sha1-F5jtk0USRkU9TG9jXXogH+lA1as=", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.6.tgz", + "integrity": "sha512-hnuHsFluXnsKOndS4Hv6SvUrgdYx1pk2NqfaDMW+GWdgfU3+/V25Cj7I8a0x92idSpa5PIhJRKxPvp9mnoLsfg==", "dev": true, "requires": { "component-emitter": "1.2.1", "component-inherit": "0.0.3", - "debug": "2.3.3", - "engine.io-parser": "1.3.2", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.1", "has-cors": "1.1.0", "indexof": "0.0.1", - "parsejson": "0.0.3", "parseqs": "0.0.5", "parseuri": "0.0.5", - "ws": "1.1.2", - "xmlhttprequest-ssl": "1.5.3", + "ws": "~3.3.1", + "xmlhttprequest-ssl": "~1.5.4", "yeast": "0.1.2" }, "dependencies": { - "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 - }, "debug": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", - "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { - "ms": "0.7.2" + "ms": "2.0.0" } }, - "ms": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", "dev": true + }, + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } } } }, "engine.io-parser": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.3.2.tgz", - "integrity": "sha1-k3sHnwAH0Ik+xW1GyyILjLQ1Igo=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.2.tgz", + "integrity": "sha512-dInLFzr80RijZ1rGpx1+56/uFoH7/7InhH3kZt+Ms6hT8tNx3NGW/WNSA/f8As1WkOfkuyb3tnRyuXGxusclMw==", "dev": true, "requires": { "after": "0.8.2", - "arraybuffer.slice": "0.0.6", + "arraybuffer.slice": "~0.0.7", "base64-arraybuffer": "0.1.5", "blob": "0.0.4", - "has-binary": "0.1.7", - "wtf-8": "1.0.0" + "has-binary2": "~1.0.2" } }, "enhanced-resolve": { @@ -2637,10 +3201,10 @@ "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "memory-fs": "0.4.1", - "object-assign": "4.1.1", - "tapable": "0.2.8" + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "object-assign": "^4.0.1", + "tapable": "^0.2.7" } }, "ent": { @@ -2656,12 +3220,12 @@ "dev": true }, "errno": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", - "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "dev": true, "requires": { - "prr": "0.0.0" + "prr": "~1.0.1" } }, "error-ex": { @@ -2670,20 +3234,20 @@ "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es-abstract": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz", - "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.11.0.tgz", + "integrity": "sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA==", "dev": true, "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.1", - "is-callable": "1.1.3", - "is-regex": "1.0.4" + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" } }, "es-to-primitive": { @@ -2692,19 +3256,20 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" } }, "es5-ext": { - "version": "0.10.37", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.37.tgz", - "integrity": "sha1-DudB0Ui4AGm6J9AgOTdWryV978M=", + "version": "0.10.42", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", + "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", "dev": true, "requires": { - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" } }, "es6-iterator": { @@ -2713,9 +3278,9 @@ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, "es6-map": { @@ -2724,12 +3289,12 @@ "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-iterator": "2.0.3", - "es6-set": "0.1.5", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" } }, "es6-set": { @@ -2738,11 +3303,11 @@ "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-iterator": "2.0.3", + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "event-emitter": "~0.3.5" } }, "es6-symbol": { @@ -2751,8 +3316,8 @@ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37" + "d": "1", + "es5-ext": "~0.10.14" } }, "es6-weak-map": { @@ -2761,10 +3326,10 @@ "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" } }, "escape-html": { @@ -2779,16 +3344,46 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "escodegen": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", + "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", + "dev": true, + "optional": true, + "requires": { + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true, + "optional": true + }, + "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, + "optional": true + } + } + }, "escope": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", "dev": true, "requires": { - "es6-map": "0.1.5", - "es6-weak-map": "2.0.2", - "esrecurse": "4.2.0", - "estraverse": "4.2.0" + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "esprima": { @@ -2798,13 +3393,12 @@ "dev": true }, "esrecurse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", - "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "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.2.0", - "object-assign": "4.1.1" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -2831,8 +3425,8 @@ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37" + "d": "1", + "es5-ext": "~0.10.14" } }, "eventemitter3": { @@ -2853,7 +3447,7 @@ "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", "dev": true, "requires": { - "original": "1.0.0" + "original": ">=0.0.5" } }, "evp_bytestokey": { @@ -2862,8 +3456,8 @@ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { - "md5.js": "1.3.4", - "safe-buffer": "5.1.1" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, "execa": { @@ -2872,13 +3466,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.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" }, "dependencies": { "cross-spawn": { @@ -2887,9 +3481,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -2906,9 +3500,9 @@ "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", "dev": true, "requires": { - "array-slice": "0.2.3", - "array-unique": "0.2.1", - "braces": "0.1.5" + "array-slice": "^0.2.3", + "array-unique": "^0.2.1", + "braces": "^0.1.2" }, "dependencies": { "braces": { @@ -2917,7 +3511,7 @@ "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", "dev": true, "requires": { - "expand-range": "0.1.1" + "expand-range": "^0.1.0" } }, "expand-range": { @@ -2926,8 +3520,8 @@ "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", "dev": true, "requires": { - "is-number": "0.1.1", - "repeat-string": "0.2.2" + "is-number": "^0.1.1", + "repeat-string": "^0.2.2" } }, "is-number": { @@ -2950,7 +3544,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "expand-range": { @@ -2959,55 +3553,45 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "2.2.3" - } - }, - "exports-loader": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/exports-loader/-/exports-loader-0.6.4.tgz", - "integrity": "sha1-1w/GEhl1s1/BKDDPUnVL4nQPyIY=", - "dev": true, - "requires": { - "loader-utils": "1.1.0", - "source-map": "0.5.7" + "fill-range": "^2.1.0" } }, "express": { - "version": "4.16.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.2.tgz", - "integrity": "sha1-41xt/i1kt9ygpc1PIXgb4ymeB2w=", + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", + "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", "dev": true, "requires": { - "accepts": "1.3.4", + "accepts": "~1.3.5", "array-flatten": "1.1.1", "body-parser": "1.18.2", "content-disposition": "0.5.2", - "content-type": "1.0.4", + "content-type": "~1.0.4", "cookie": "0.3.1", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "1.1.1", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "etag": "1.8.1", - "finalhandler": "1.1.0", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", "fresh": "0.5.2", "merge-descriptors": "1.0.1", - "methods": "1.1.2", - "on-finished": "2.3.0", - "parseurl": "1.3.2", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "2.0.2", + "proxy-addr": "~2.0.3", "qs": "6.5.1", - "range-parser": "1.2.0", + "range-parser": "~1.2.0", "safe-buffer": "5.1.1", - "send": "0.16.1", - "serve-static": "1.13.1", + "send": "0.16.2", + "serve-static": "1.13.2", "setprototypeof": "1.1.0", - "statuses": "1.3.1", - "type-is": "1.6.15", + "statuses": "~1.4.0", + "type-is": "~1.6.16", "utils-merge": "1.0.1", - "vary": "1.1.2" + "vary": "~1.1.2" }, "dependencies": { "array-flatten": { @@ -3030,21 +3614,34 @@ "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", "dev": true }, + "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" + } + } + } + }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "1.0.0" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - } + "is-extglob": "^1.0.0" } }, "extract-text-webpack-plugin": { @@ -3053,10 +3650,33 @@ "integrity": "sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ==", "dev": true, "requires": { - "async": "2.6.0", - "loader-utils": "1.1.0", - "schema-utils": "0.3.0", - "webpack-sources": "1.1.0" + "async": "^2.4.1", + "loader-utils": "^1.1.0", + "schema-utils": "^0.3.0", + "webpack-sources": "^1.0.1" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "dev": true, + "requires": { + "ajv": "^5.0.0" + } + } } }, "extsprintf": { @@ -3066,9 +3686,9 @@ "dev": true }, "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, "fast-json-stable-stringify": { @@ -3077,6 +3697,13 @@ "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, + "optional": true + }, "fastparse": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", @@ -3089,19 +3716,26 @@ "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", "dev": true, "requires": { - "websocket-driver": "0.7.0" + "websocket-driver": ">=0.5.1" } }, "file-loader": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.5.tgz", - "integrity": "sha512-RzGHDatcVNpGISTvCpfUfOGpYuSR7HSsSg87ki+wF6rw1Hm0RALPTiAdsxAq1UwLf0RRhbe22/eHK6nhXspiOQ==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", + "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", "dev": true, "requires": { - "loader-utils": "1.1.0", - "schema-utils": "0.3.0" + "loader-utils": "^1.0.2", + "schema-utils": "^0.4.5" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -3114,8 +3748,8 @@ "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", "dev": true, "requires": { - "glob": "7.1.2", - "minimatch": "3.0.4" + "glob": "^7.0.3", + "minimatch": "^3.0.3" } }, "fill-range": { @@ -3124,37 +3758,26 @@ "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" - }, - "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" - } - } + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", "dev": true, "requires": { "debug": "2.6.9", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "on-finished": "2.3.0", - "parseurl": "1.3.2", - "statuses": "1.3.1", - "unpipe": "1.0.0" + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" } }, "find-cache-dir": { @@ -3163,35 +3786,38 @@ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "dev": true, "requires": { - "commondir": "1.0.1", - "make-dir": "1.1.0", - "pkg-dir": "2.0.0" + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" } }, "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "locate-path": "^2.0.0" } }, - "flatten": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", - "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", - "dev": true - }, "flush-write-stream": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz", - "integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "follow-redirects": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.0.0.tgz", + "integrity": "sha1-jjQpjL0uF28lTv/sdaHHjMhJ/Tc=", + "dev": true, + "optional": true, + "requires": { + "debug": "^2.2.0" } }, "font-awesome": { @@ -3206,12 +3832,12 @@ "dev": true }, "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreach": { @@ -3232,9 +3858,9 @@ "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", "dev": true, "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" } }, "forwarded": { @@ -3243,6 +3869,15 @@ "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", "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" + } + }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -3255,8 +3890,8 @@ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" } }, "fs-access": { @@ -3265,7 +3900,7 @@ "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", "dev": true, "requires": { - "null-check": "1.0.0" + "null-check": "^1.0.0" } }, "fs-extra": { @@ -3274,9 +3909,9 @@ "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, "fs-write-stream-atomic": { @@ -3285,10 +3920,10 @@ "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "iferr": "0.1.5", - "imurmurhash": "0.1.4", - "readable-stream": "2.3.3" + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" } }, "fs.realpath": { @@ -3304,8 +3939,8 @@ "dev": true, "optional": true, "requires": { - "nan": "2.8.0", - "node-pre-gyp": "0.6.39" + "nan": "^2.3.0", + "node-pre-gyp": "^0.6.39" }, "dependencies": { "abbrev": { @@ -3417,7 +4052,8 @@ "buffer-shims": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "caseless": { "version": "0.12.0", @@ -3434,7 +4070,8 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "combined-stream": { "version": "1.0.5", @@ -3563,10 +4200,10 @@ "bundled": true, "dev": true, "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" } }, "fstream-ignore": { @@ -3575,9 +4212,9 @@ "dev": true, "optional": true, "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" + "fstream": "^1.0.0", + "inherits": "2", + "minimatch": "^3.0.0" } }, "gauge": { @@ -3833,17 +4470,17 @@ "dev": true, "optional": true, "requires": { - "detect-libc": "1.0.2", + "detect-libc": "^1.0.2", "hawk": "3.1.3", - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", + "mkdirp": "^0.5.1", + "nopt": "^4.0.1", + "npmlog": "^4.0.2", + "rc": "^1.1.7", "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^2.2.1", + "tar-pack": "^3.4.0" } }, "nopt": { @@ -4114,9 +4751,9 @@ "bundled": true, "dev": true, "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" } }, "tar-pack": { @@ -4125,14 +4762,14 @@ "dev": true, "optional": true, "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" + "debug": "^2.2.0", + "fstream": "^1.0.10", + "fstream-ignore": "^1.0.5", + "once": "^1.3.3", + "readable-stream": "^2.1.4", + "rimraf": "^2.5.1", + "tar": "^2.2.1", + "uid-number": "^0.0.6" } }, "tough-cookie": { @@ -4207,10 +4844,50 @@ "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.2" + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "ftp": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", + "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": "1.1.x", + "xregexp": "2.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "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, + "optional": true + } } }, "function-bind": { @@ -4225,14 +4902,14 @@ "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "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" } }, "gaze": { @@ -4242,7 +4919,7 @@ "dev": true, "optional": true, "requires": { - "globule": "1.2.0" + "globule": "^1.0.0" } }, "generate-function": { @@ -4259,7 +4936,7 @@ "dev": true, "optional": true, "requires": { - "is-property": "1.0.2" + "is-property": "^1.0.0" } }, "get-caller-file": { @@ -4280,13 +4957,34 @@ "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", "dev": true }, + "get-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz", + "integrity": "sha512-7aelVrYqCLuVjq2kEKRTH8fXPTC0xKTkM+G7UlFkEwCXY3sFbSxvY375JoFowOAYbkaU47SrBvOefUlLZZ+6QA==", + "dev": true, + "optional": true, + "requires": { + "data-uri-to-buffer": "1", + "debug": "2", + "extend": "3", + "file-uri-to-path": "1", + "ftp": "~0.3.10", + "readable-stream": "2" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dev": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" }, "dependencies": { "assert-plus": { @@ -4297,18 +4995,27 @@ } } }, + "git-describe": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/git-describe/-/git-describe-4.0.2.tgz", + "integrity": "sha1-nsxebfRlhFDInqNdEBg8n19A3HM=", + "requires": { + "lodash": "^4.16.6", + "semver": "^5.3.0" + } + }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "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-base": { @@ -4317,25 +5024,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - } + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" } }, "glob-parent": { @@ -4344,24 +5034,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - } + "is-glob": "^2.0.0" } }, "globals": { @@ -4371,16 +5044,25 @@ "dev": true }, "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "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.2", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "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": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "globule": { @@ -4390,9 +5072,9 @@ "dev": true, "optional": true, "requires": { - "glob": "7.1.2", - "lodash": "4.17.4", - "minimatch": "3.0.4" + "glob": "~7.1.1", + "lodash": "~4.17.4", + "minimatch": "~3.0.2" } }, "graceful-fs": { @@ -4418,10 +5100,10 @@ "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "async": { @@ -4444,8 +5126,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" } }, @@ -4455,7 +5137,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } }, "uglify-js": { @@ -4465,9 +5147,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "source-map": { @@ -4486,9 +5168,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -4506,8 +5188,8 @@ "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", "dev": true, "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" + "ajv": "^4.9.1", + "har-schema": "^1.0.5" }, "dependencies": { "ajv": { @@ -4516,8 +5198,8 @@ "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", "dev": true, "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" } } } @@ -4528,7 +5210,7 @@ "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "dev": true, "requires": { - "function-bind": "1.1.1" + "function-bind": "^1.0.2" } }, "has-ansi": { @@ -4537,22 +5219,22 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, - "has-binary": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz", - "integrity": "sha1-aOYesWIQyVRaClzOBqhzkS/h5ow=", + "has-binary2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.2.tgz", + "integrity": "sha1-6D26SfC5vk0CbSc2U1DZ8D9Uvpg=", "dev": true, "requires": { - "isarray": "0.0.1" + "isarray": "2.0.1" }, "dependencies": { "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", "dev": true } } @@ -4575,13 +5257,73 @@ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "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": { + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "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": "2.0.2", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", "dev": true, "requires": { - "inherits": "2.0.3" + "inherits": "^2.0.1" } }, "hash.js": { @@ -4590,8 +5332,8 @@ "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "dev": true, "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" } }, "hawk": { @@ -4600,10 +5342,10 @@ "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "dev": true, "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" } }, "he": { @@ -4612,15 +5354,26 @@ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, + "hipchat-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hipchat-notifier/-/hipchat-notifier-1.1.0.tgz", + "integrity": "sha1-ttJJdVQ3wZEII2d5nTupoPI7Ix4=", + "dev": true, + "optional": true, + "requires": { + "lodash": "^4.0.0", + "request": "^2.0.0" + } + }, "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.1.3", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, "hoek": { @@ -4635,13 +5388,13 @@ "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", "dev": true, "requires": { - "parse-passwd": "1.0.0" + "parse-passwd": "^1.0.0" } }, "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", "dev": true }, "hpack.js": { @@ -4650,18 +5403,12 @@ "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", "dev": true, "requires": { - "inherits": "2.0.3", - "obuf": "1.1.1", - "readable-stream": "2.3.3", - "wbuf": "1.7.2" + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" } }, - "html-comment-regex": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz", - "integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=", - "dev": true - }, "html-entities": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", @@ -4669,19 +5416,26 @@ "dev": true }, "html-minifier": { - "version": "3.5.7", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.7.tgz", - "integrity": "sha512-GISXn6oKDo7+gVpKOgZJTbHMCUI2TSGfpg/8jgencWhWJsvEmsvp3M8emX7QocsXsYznWloLib3OeSfeyb/ewg==", - "dev": true, - "requires": { - "camel-case": "3.0.0", - "clean-css": "4.1.9", - "commander": "2.12.2", - "he": "1.1.1", - "ncname": "1.0.0", - "param-case": "2.1.1", - "relateurl": "0.2.7", - "uglify-js": "3.2.1" + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.13.tgz", + "integrity": "sha512-B7P99uf0LPQ5lslyhrAZAXE7Lk1tpiv52KVapKbeFhgqNMUI7JBd/fYLX55imu3Rz7sCTzZM6r/IBe4oT7qCjg==", + "dev": true, + "requires": { + "camel-case": "3.0.x", + "clean-css": "4.1.x", + "commander": "2.15.x", + "he": "1.1.x", + "param-case": "2.1.x", + "relateurl": "0.2.x", + "uglify-js": "3.3.x" + }, + "dependencies": { + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + } } }, "html-webpack-plugin": { @@ -4690,12 +5444,12 @@ "integrity": "sha1-f5xCG36pHsRg9WUn1430hO51N9U=", "dev": true, "requires": { - "bluebird": "3.5.1", - "html-minifier": "3.5.7", - "loader-utils": "0.2.17", - "lodash": "4.17.4", - "pretty-error": "2.1.1", - "toposort": "1.0.6" + "bluebird": "^3.4.7", + "html-minifier": "^3.2.3", + "loader-utils": "^0.2.16", + "lodash": "^4.17.3", + "pretty-error": "^2.0.2", + "toposort": "^1.0.0" }, "dependencies": { "loader-utils": { @@ -4712,16 +5466,22 @@ } } }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", + "dev": true + }, "htmlparser2": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", "dev": true, "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.1.0", - "domutils": "1.1.6", - "readable-stream": "1.0.34" + "domelementtype": "1", + "domhandler": "2.1", + "domutils": "1.1", + "readable-stream": "1.0" }, "dependencies": { "domutils": { @@ -4730,7 +5490,7 @@ "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", "dev": true, "requires": { - "domelementtype": "1.3.0" + "domelementtype": "1" } }, "isarray": { @@ -4745,10 +5505,10 @@ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", "isarray": "0.0.1", - "string_decoder": "0.10.31" + "string_decoder": "~0.10.x" } }, "string_decoder": { @@ -4766,29 +5526,21 @@ "dev": true }, "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "dev": true, "requires": { - "depd": "1.1.1", + "depd": "~1.1.2", "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": "1.3.1" - }, - "dependencies": { - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", - "dev": true - } + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" } }, "http-parser-js": { - "version": "0.4.9", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.9.tgz", - "integrity": "sha1-6hoE+2St/wJC6ZdPKX3Uw8rSceE=", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.11.tgz", + "integrity": "sha512-QCR5O2AjjMW8Mo4HyI1ctFcv+O99j/0g367V3YoVnrNw5hkDvAWZD0lWGcc+F4yN3V55USPCVix4efb75HxFfA==", "dev": true }, "http-proxy": { @@ -4797,8 +5549,19 @@ "integrity": "sha1-Bt/ykpUr9k2+hHH6nfcwZtTzd0I=", "dev": true, "requires": { - "eventemitter3": "1.2.0", - "requires-port": "1.0.0" + "eventemitter3": "1.x.x", + "requires-port": "1.x.x" + } + }, + "http-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", + "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", + "dev": true, + "requires": { + "agent-base": "2", + "debug": "2", + "extend": "3" } }, "http-proxy-middleware": { @@ -4807,19 +5570,25 @@ "integrity": "sha1-ZC6ISIUdZvCdTxJJEoRtuutBuDM=", "dev": true, "requires": { - "http-proxy": "1.16.2", - "is-glob": "3.1.0", - "lodash": "4.17.4", - "micromatch": "2.3.11" + "http-proxy": "^1.16.2", + "is-glob": "^3.1.0", + "lodash": "^4.17.2", + "micromatch": "^2.3.11" }, "dependencies": { + "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-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.1" + "is-extglob": "^2.1.0" } } } @@ -4830,11 +5599,27 @@ "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "dev": true, "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "httpntlm": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.6.1.tgz", + "integrity": "sha1-rQFScUOi6Hc8+uapb1hla7UqNLI=", + "dev": true, + "requires": { + "httpreq": ">=0.4.22", + "underscore": "~1.7.0" } }, + "httpreq": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", + "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=", + "dev": true + }, "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", @@ -4847,9 +5632,9 @@ "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", "dev": true, "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" + "agent-base": "2", + "debug": "2", + "extend": "3" } }, "iconv-lite": { @@ -4857,55 +5642,10 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" }, - "icss-replace-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", - "dev": true - }, - "icss-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-2.1.0.tgz", - "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", - "dev": true, - "requires": { - "postcss": "6.0.14" - }, - "dependencies": { - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "postcss": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.14.tgz", - "integrity": "sha512-NJ1z0f+1offCgadPhz+DvGm5Mkci+mmV5BqD13S992o0Xk9eElxUfPPF+t2ksH5R/17gz4xVK8KWocUQ5o3Rog==", - "dev": true, - "requires": { - "chalk": "2.3.0", - "source-map": "0.6.1", - "supports-color": "4.5.0" - } - }, - "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 - } - } - }, "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.11.tgz", + "integrity": "sha512-VhDzCKN7K8ufStx/CLj5/PDTMgph+qwN5Pkd5i0sGnVwk56zJ0lkT8Qzi1xqWLS0Wp29DgDtNeS7v8/wMoZeHg==", "dev": true }, "iferr": { @@ -4914,6 +5654,12 @@ "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", "dev": true }, + "ignore": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", + "dev": true + }, "image-size": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", @@ -4927,13 +5673,13 @@ "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=" }, "import-local": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-0.1.1.tgz", - "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", "dev": true, "requires": { - "pkg-dir": "2.0.0", - "resolve-cwd": "2.0.0" + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" } }, "imurmurhash": { @@ -4955,35 +5701,37 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true - }, "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", "dev": true }, + "inflection": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.10.0.tgz", + "integrity": "sha1-W//LEZetPoEFD44X4hZoCH7p6y8=", + "dev": true, + "optional": 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.4.0", - "wrappy": "1.0.2" + "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=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true }, "ini": { "version": "1.3.5", @@ -4991,6 +5739,32 @@ "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" + } + }, + "insert-module-globals": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.6.tgz", + "integrity": "sha512-R3sidKJr3SsggqQQ5cEwQb3pWG8RNx0UnpyeiOSR6jorRIeAOzH2gkTWnNdMnyRiVbjrG047K7UCtlMkQ1Mo9w==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "lexical-scope": "^1.2.0", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + } + }, "interactjs": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/interactjs/-/interactjs-1.3.1.tgz", @@ -5002,7 +5776,7 @@ "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", "dev": true, "requires": { - "meow": "3.7.0" + "meow": "^3.3.0" } }, "interpret": { @@ -5017,7 +5791,7 @@ "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -5033,16 +5807,27 @@ "dev": true }, "ipaddr.js": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.5.2.tgz", - "integrity": "sha1-1LUFvemUaYfM8PxY2QEP+WB+P6A=", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", + "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=", "dev": true }, - "is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", - "dev": true + "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" + }, + "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 + } + } }, "is-arrayish": { "version": "0.2.1", @@ -5056,7 +5841,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.11.0" + "binary-extensions": "^1.0.0" } }, "is-buffer": { @@ -5071,7 +5856,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-callable": { @@ -5080,12 +5865,48 @@ "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", "dev": true }, + "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" + }, + "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 + } + } + }, "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": "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" + }, + "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 + } + } + }, "is-directory": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", @@ -5104,7 +5925,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-extendable": { @@ -5114,9 +5935,9 @@ "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=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", "dev": true }, "is-finite": { @@ -5125,7 +5946,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -5134,29 +5955,37 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^1.0.0" } }, + "is-my-ip-valid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", + "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", + "dev": true, + "optional": true + }, "is-my-json-valid": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", - "integrity": "sha512-ochPsqWS1WXj8ZnMIV0vnNXooaMhp7cyL4FMSIPKTtnV0Ha/T19G2b9kkhcNsabV9bxYkze7/aLZJb/bYuFduQ==", + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", + "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", "dev": true, "optional": true, "requires": { - "generate-function": "2.0.0", - "generate-object-property": "1.2.0", - "jsonpointer": "4.0.1", - "xtend": "4.0.1" + "generate-function": "^2.0.0", + "generate-object-property": "^1.1.0", + "is-my-ip-valid": "^1.0.0", + "jsonpointer": "^4.0.0", + "xtend": "^4.0.0" } }, "is-number": { @@ -5165,7 +5994,24 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", + "dev": true, + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } } }, "is-path-cwd": { @@ -5180,7 +6026,7 @@ "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", "dev": true, "requires": { - "is-path-inside": "1.0.1" + "is-path-inside": "^1.0.0" } }, "is-path-inside": { @@ -5189,22 +6035,24 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "1.0.2" + "path-is-inside": "^1.0.1" } }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, "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" + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } } }, "is-posix-bracket": { @@ -5232,7 +6080,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "1.0.1" + "has": "^1.0.1" } }, "is-stream": { @@ -5241,15 +6089,6 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, - "is-svg": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz", - "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", - "dev": true, - "requires": { - "html-comment-regex": "1.1.1" - } - }, "is-symbol": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", @@ -5268,6 +6107,12 @@ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, + "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 + }, "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", @@ -5277,7 +6122,8 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true }, "isbinaryfile": { "version": "3.0.2", @@ -5292,10 +6138,13 @@ "dev": true }, "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true + "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" + } }, "isstream": { "version": "0.1.2", @@ -5309,41 +6158,50 @@ "integrity": "sha512-oFCwXvd65amgaPCzqrR+a2XjanS1MvpXN6l/MlMUTv6uiA1NOgGX+I0uyq8Lg3GDxsxPsaP1049krz3hIJ5+KA==", "dev": true, "requires": { - "async": "2.6.0", - "fileset": "2.0.3", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.9.1", - "istanbul-lib-report": "1.1.2", - "istanbul-lib-source-maps": "1.2.2", - "istanbul-reports": "1.1.3", - "js-yaml": "3.7.0", - "mkdirp": "0.5.1", - "once": "1.4.0" + "async": "^2.1.4", + "fileset": "^2.0.2", + "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-hook": "^1.1.0", + "istanbul-lib-instrument": "^1.9.1", + "istanbul-lib-report": "^1.1.2", + "istanbul-lib-source-maps": "^1.2.2", + "istanbul-reports": "^1.1.3", + "js-yaml": "^3.7.0", + "mkdirp": "^0.5.1", + "once": "^1.4.0" } }, "istanbul-instrumenter-loader": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-2.0.0.tgz", - "integrity": "sha1-5UkpAKsLuoNe+oAkywC+mz7qJwA=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", + "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", "dev": true, "requires": { - "convert-source-map": "1.5.1", - "istanbul-lib-instrument": "1.9.1", - "loader-utils": "0.2.17", - "object-assign": "4.1.1" + "convert-source-map": "^1.5.0", + "istanbul-lib-instrument": "^1.7.3", + "loader-utils": "^1.1.0", + "schema-utils": "^0.3.0" }, "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "dev": true, + "requires": { + "ajv": "^5.0.0" } } } @@ -5360,7 +6218,7 @@ "integrity": "sha512-U3qEgwVDUerZ0bt8cfl3dSP3S6opBoOtk3ROO5f2EfBr/SRiD9FQqzwaZBqFORu8W7O0EXpai+k7kxHK13beRg==", "dev": true, "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-instrument": { @@ -5369,13 +6227,13 @@ "integrity": "sha512-RQmXeQ7sphar7k7O1wTNzVczF9igKpaeGQAG9qR2L+BS4DCJNTI9nytRmIVYevwO0bbq+2CXvJmYDuz0gMrywA==", "dev": true, "requires": { - "babel-generator": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", - "semver": "5.4.1" + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.1.1", + "semver": "^5.3.0" } }, "istanbul-lib-report": { @@ -5384,10 +6242,10 @@ "integrity": "sha512-UTv4VGx+HZivJQwAo1wnRwe1KTvFpfi/NYwN7DcsrdzMXwpRT/Yb6r4SBPoHWj4VuQPakR32g4PUUeyKkdDkBA==", "dev": true, "requires": { - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { "has-flag": { @@ -5402,7 +6260,7 @@ "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -5413,11 +6271,11 @@ "integrity": "sha512-8BfdqSfEdtip7/wo1RnrvLpHVEd8zMZEDmOFEnpC6dg0vXflHt9nvoAyQUzig2uMSXfF2OBEYBV3CVjIL9JvaQ==", "dev": true, "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" }, "dependencies": { "debug": { @@ -5437,7 +6295,7 @@ "integrity": "sha512-ZEelkHh8hrZNI5xDaKwPMFwDsUf5wIEI2bXAFGp1e6deR2mnEKBPhLJEgr4ZBt8Gi6Mj38E/C8kcy9XLggVO2Q==", "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "jasmine": { @@ -5446,9 +6304,9 @@ "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", "dev": true, "requires": { - "exit": "0.1.2", - "glob": "7.1.2", - "jasmine-core": "2.8.0" + "exit": "^0.1.2", + "glob": "^7.0.6", + "jasmine-core": "~2.8.0" }, "dependencies": { "jasmine-core": { @@ -5460,15 +6318,15 @@ } }, "jasmine-core": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.6.4.tgz", - "integrity": "sha1-3skmzQqfoof7bbXHVfpIfnTOysU=", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", + "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=", "dev": true }, "jasmine-spec-reporter": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.1.1.tgz", - "integrity": "sha1-Wm1Yq11hvqcwn7wnkjlRF1axtYg=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", + "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", "dev": true, "requires": { "colors": "1.1.2" @@ -5481,10 +6339,11 @@ "dev": true }, "js-base64": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.0.tgz", - "integrity": "sha512-Wehd+7Pf9tFvGb+ydPm9TjYjV8X1YHOVyG8QyELZxEMqOhemVwGRmoG8iQ/soqI3n8v4xn59zaLxiCJiaaRzKA==", - "dev": true + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz", + "integrity": "sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw==", + "dev": true, + "optional": true }, "js-tokens": { "version": "3.0.2", @@ -5498,8 +6357,8 @@ "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", "dev": true, "requires": { - "argparse": "1.0.9", - "esprima": "2.7.3" + "argparse": "^1.0.7", + "esprima": "^2.6.0" } }, "jsbn": { @@ -5539,7 +6398,7 @@ "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", "dev": true, "requires": { - "jsonify": "0.0.0" + "jsonify": "~0.0.0" } }, "json-stringify-safe": { @@ -5566,7 +6425,7 @@ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.6" } }, "jsonify": { @@ -5575,6 +6434,12 @@ "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 + }, "jsonpointer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", @@ -5603,65 +6468,57 @@ } }, "karma": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/karma/-/karma-1.7.1.tgz", - "integrity": "sha512-k5pBjHDhmkdaUccnC7gE3mBzZjcxyxYsYVaqiL2G5AqlfLyBO5nw2VdNK+O16cveEPd/gIOWULH7gkiYYwVNHg==", - "dev": true, - "requires": { - "bluebird": "3.5.1", - "body-parser": "1.18.2", - "chokidar": "1.7.0", - "colors": "1.1.2", - "combine-lists": "1.0.1", - "connect": "3.6.5", - "core-js": "2.5.1", - "di": "0.0.1", - "dom-serialize": "2.2.1", - "expand-braces": "0.1.2", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "http-proxy": "1.16.2", - "isbinaryfile": "3.0.2", - "lodash": "3.10.1", - "log4js": "0.6.38", - "mime": "1.6.0", - "minimatch": "3.0.4", - "optimist": "0.6.1", - "qjobs": "1.1.5", - "range-parser": "1.2.0", - "rimraf": "2.6.2", - "safe-buffer": "5.1.1", - "socket.io": "1.7.3", - "source-map": "0.5.7", - "tmp": "0.0.31", - "useragent": "2.2.1" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.0.tgz", + "integrity": "sha512-K9Kjp8CldLyL9ANSUctDyxC7zH3hpqXj/K09qVf06K3T/kXaHtFZ5tQciK7OzQu68FLvI89Na510kqQ2LCbpIw==", + "dev": true, + "requires": { + "bluebird": "^3.3.0", + "body-parser": "^1.16.1", + "browserify": "^14.5.0", + "chokidar": "^1.4.1", + "colors": "^1.1.0", + "combine-lists": "^1.0.0", + "connect": "^3.6.0", + "core-js": "^2.2.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.0", + "expand-braces": "^0.1.1", + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "http-proxy": "^1.13.0", + "isbinaryfile": "^3.0.0", + "lodash": "^4.17.4", + "log4js": "^2.3.9", + "mime": "^1.3.4", + "minimatch": "^3.0.2", + "optimist": "^0.6.1", + "qjobs": "^1.1.4", + "range-parser": "^1.2.0", + "rimraf": "^2.6.0", + "safe-buffer": "^5.0.1", + "socket.io": "2.0.4", + "source-map": "^0.6.1", + "tmp": "0.0.33", + "useragent": "^2.1.12" }, "dependencies": { - "lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", + "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 } } }, "karma-chrome-launcher": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.1.1.tgz", - "integrity": "sha1-IWh5xorATY1RQOmWGboEtZr9Rs8=", - "dev": true, - "requires": { - "fs-access": "1.0.1", - "which": "1.3.0" - } - }, - "karma-cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/karma-cli/-/karma-cli-1.0.1.tgz", - "integrity": "sha1-rmw8WKMTodALRRZMRVubhs4X+WA=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", + "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", "dev": true, "requires": { - "resolve": "1.5.0" + "fs-access": "^1.0.0", + "which": "^1.2.1" } }, "karma-coverage-istanbul-reporter": { @@ -5670,8 +6527,8 @@ "integrity": "sha1-0ULNnFVzHJ42Pvc3To7xoxvr+ts=", "dev": true, "requires": { - "istanbul-api": "1.2.1", - "minimatch": "3.0.4" + "istanbul-api": "^1.1.8", + "minimatch": "^3.0.4" } }, "karma-jasmine": { @@ -5686,7 +6543,7 @@ "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", "dev": true, "requires": { - "karma-jasmine": "1.1.1" + "karma-jasmine": "^1.0.2" } }, "karma-source-map-support": { @@ -5695,7 +6552,7 @@ "integrity": "sha1-G/gee7SwiWJ6s1LsQXnhF8QGpUA=", "dev": true, "requires": { - "source-map-support": "0.4.18" + "source-map-support": "^0.4.1" } }, "killable": { @@ -5710,7 +6567,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "konva": { @@ -5718,11 +6575,24 @@ "resolved": "https://registry.npmjs.org/konva/-/konva-1.7.6.tgz", "integrity": "sha512-TPYwJi3z3eK94N/eoPfYs8JXBcwrY8uC3GhllsKLCOXkdIpg51+M1ZCIM6sQtlmknRZOy1GGlCendzXajCj+fQ==" }, - "lazy-cache": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", - "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=", - "dev": true + "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 + } + } }, "lcid": { "version": "1.0.0", @@ -5730,7 +6600,7 @@ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "less": { @@ -5739,42 +6609,93 @@ "integrity": "sha512-KPdIJKWcEAb02TuJtaLrhue0krtRLoRoo7x6BNJIBelO00t/CCdJQUnHW5V34OnHMWzIktSalJxRO+FvytQlCQ==", "dev": true, "requires": { - "errno": "0.1.4", - "graceful-fs": "4.1.11", - "image-size": "0.5.5", - "mime": "1.6.0", - "mkdirp": "0.5.1", - "promise": "7.3.1", + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "mime": "^1.2.11", + "mkdirp": "^0.5.0", + "promise": "^7.1.1", "request": "2.81.0", - "source-map": "0.5.7" + "source-map": "^0.5.3" } }, "less-loader": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.0.5.tgz", - "integrity": "sha1-rhVadAbKxqzSk9eFWH/P8PR4xN0=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", + "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", "dev": true, "requires": { - "clone": "2.1.1", - "loader-utils": "1.1.0", - "pify": "2.3.0" + "clone": "^2.1.1", + "loader-utils": "^1.1.0", + "pify": "^3.0.0" }, "dependencies": { - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=", + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "optional": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lexical-scope": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", + "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", + "dev": true, + "requires": { + "astw": "^2.0.0" + } + }, + "libbase64": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz", + "integrity": "sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY=", + "dev": true + }, + "libmime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/libmime/-/libmime-3.0.0.tgz", + "integrity": "sha1-UaGp50SOy9Ms2lRCFnW7IbwJPaY=", + "dev": true, + "requires": { + "iconv-lite": "0.4.15", + "libbase64": "0.1.0", + "libqp": "1.1.0" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", + "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=", "dev": true } } }, + "libqp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/libqp/-/libqp-1.1.0.tgz", + "integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g=", + "dev": true + }, "license-webpack-plugin": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.1.1.tgz", - "integrity": "sha512-TjKOyiC0exqd4Idy/4M8/DETR22dXBZks387DuS5LbslxHiMRXGx/Q2F/j9IUtvEoH5uFvt72vRgk/G6f8j3Dg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.3.1.tgz", + "integrity": "sha512-NqAFodJdpBUuf1iD+Ij8hQvF0rCFKlO2KaieoQzAPhFgzLCtJnC7Z7x5gQbGNjoe++wOKAtAmwVEIBLqq2Yp1A==", "dev": true, "requires": { - "ejs": "2.5.7" + "ejs": "^2.5.7" } }, "load-json-file": { @@ -5783,11 +6704,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "loader-runner": { @@ -5802,9 +6723,9 @@ "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", "dev": true, "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1" + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" } }, "locate-path": { @@ -5813,23 +6734,14 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" - }, - "dependencies": { - "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 - } + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", - "dev": true + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" }, "lodash.assign": { "version": "4.2.0", @@ -5838,12 +6750,6 @@ "dev": true, "optional": true }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "dev": true - }, "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", @@ -5851,15 +6757,15 @@ "dev": true }, "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", "dev": true }, "lodash.mergewith": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz", - "integrity": "sha1-FQzwoWeR9ZA7iJHqsVRgknS96lU=", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", + "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", "dev": true, "optional": true }, @@ -5869,58 +6775,199 @@ "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=", "dev": true }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, "log4js": { - "version": "0.6.38", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz", - "integrity": "sha1-LElBFmldb7JUgJQ9P8hy5mKlIv0=", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.5.3.tgz", + "integrity": "sha512-YL/qpTxYtK0iWWbuKCrevDZz5lh+OjyHHD+mICqpjnYGKdNRBvPeh/1uYjkKUemT1CSO4wwLOwphWMpKAnD9kw==", + "dev": true, + "requires": { + "amqplib": "^0.5.2", + "axios": "^0.15.3", + "circular-json": "^0.5.1", + "date-format": "^1.2.0", + "debug": "^3.1.0", + "hipchat-notifier": "^1.1.0", + "loggly": "^1.1.0", + "mailgun-js": "^0.7.0", + "nodemailer": "^2.5.0", + "redis": "^2.7.1", + "semver": "^5.3.0", + "slack-node": "~0.2.0", + "streamroller": "^0.7.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "loggly": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/loggly/-/loggly-1.1.1.tgz", + "integrity": "sha1-Cg/B0/o6XsRP3HuJe+uipGlc6+4=", "dev": true, + "optional": true, "requires": { - "readable-stream": "1.0.34", - "semver": "4.3.6" + "json-stringify-safe": "5.0.x", + "request": "2.75.x", + "timespan": "2.3.x" }, "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true, + "optional": true + }, + "bl": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", + "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": "~2.0.5" + } + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", + "dev": true, + "optional": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "form-data": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz", + "integrity": "sha1-bwrrrcxdoWwT4ezBETfYX5uIOyU=", + "dev": true, + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.11" + } + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", + "dev": true, + "optional": true, + "requires": { + "chalk": "^1.1.1", + "commander": "^2.9.0", + "is-my-json-valid": "^2.12.4", + "pinkie-promise": "^2.0.0" + } + }, + "node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=", + "dev": true, + "optional": true + }, + "qs": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", + "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", + "dev": true, + "optional": true }, "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", "dev": true, + "optional": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" + "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" } }, - "semver": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", - "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", - "dev": true + "request": { + "version": "2.75.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.75.0.tgz", + "integrity": "sha1-0rgmiihtoT6qXQGt9dGMyQ9lfZM=", + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "bl": "~1.1.2", + "caseless": "~0.11.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.0.0", + "har-validator": "~2.0.6", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "node-uuid": "~1.4.7", + "oauth-sign": "~0.8.1", + "qs": "~6.2.0", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "~0.4.1" + } }, "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 + "dev": true, + "optional": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true, + "optional": true + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "dev": true, + "optional": true } } }, "loglevel": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.0.tgz", - "integrity": "sha1-rgyqVhERSYxboTcj1vtjHSQAOTQ=", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", + "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", "dev": true }, "longest": { @@ -5935,7 +6982,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "loud-rejection": { @@ -5944,8 +6991,8 @@ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" } }, "lower-case": { @@ -5955,37 +7002,89 @@ "dev": true }, "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, - "macaddress": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.2.8.tgz", - "integrity": "sha1-WQTcU3w57G2+/q6QIycTX6hRHxI=", - "dev": true - }, "magic-string": { - "version": "0.22.4", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.4.tgz", - "integrity": "sha512-kxBL06p6iO2qPBHsqGK2b3cRwiRGpnmSuVWNhwHcMX7qJOUr1HvricYP1LZOCdkQBUp0jiWg2d6WJwR3vYgByw==", + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", + "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", + "dev": true, + "requires": { + "vlq": "^0.2.2" + } + }, + "mailcomposer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mailcomposer/-/mailcomposer-4.0.1.tgz", + "integrity": "sha1-DhxEsqB890DuF9wUm6AJ8Zyt/rQ=", + "dev": true, + "optional": true, + "requires": { + "buildmail": "4.0.1", + "libmime": "3.0.0" + } + }, + "mailgun-js": { + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/mailgun-js/-/mailgun-js-0.7.15.tgz", + "integrity": "sha1-7jZqINrGTDwVwD1sGz4O15UlKrs=", "dev": true, + "optional": true, "requires": { - "vlq": "0.2.3" + "async": "~2.1.2", + "debug": "~2.2.0", + "form-data": "~2.1.1", + "inflection": "~1.10.0", + "is-stream": "^1.1.0", + "path-proxy": "~1.0.0", + "proxy-agent": "~2.0.0", + "q": "~1.4.0", + "tsscmp": "~1.0.0" + }, + "dependencies": { + "async": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/async/-/async-2.1.5.tgz", + "integrity": "sha1-5YfGhYCZSsZ/xW/4bTrFa9voELw=", + "dev": true, + "optional": true, + "requires": { + "lodash": "^4.14.0" + } + }, + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "optional": true, + "requires": { + "ms": "0.7.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true, + "optional": true + } } }, "make-dir": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", - "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", + "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", "dev": true, "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" }, "dependencies": { "pify": { @@ -5997,9 +7096,15 @@ } }, "make-error": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.0.tgz", - "integrity": "sha1-Uq06M5zPEM5itAQLcI/nByRLi5Y=", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", + "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", + "dev": true + }, + "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-obj": { @@ -6008,21 +7113,13 @@ "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", "dev": true }, - "math-expression-evaluator": { - "version": "1.2.17", - "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", - "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=", - "dev": true - }, - "md5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", - "integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=", + "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": { - "charenc": "0.0.2", - "crypt": "0.0.2", - "is-buffer": "1.1.6" + "object-visit": "^1.0.0" } }, "md5.js": { @@ -6031,8 +7128,8 @@ "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", "dev": true, "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.3" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" }, "dependencies": { "hash-base": { @@ -6041,8 +7138,8 @@ "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "dev": true, "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } } } @@ -6064,7 +7161,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "^1.0.0" } }, "memory-fs": { @@ -6073,8 +7170,8 @@ "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "dev": true, "requires": { - "errno": "0.1.4", - "readable-stream": "2.3.3" + "errno": "^0.1.3", + "readable-stream": "^2.0.1" } }, "meow": { @@ -6083,16 +7180,16 @@ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" } }, "merge-descriptors": { @@ -6113,36 +7210,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - } + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, "miller-rabin": { @@ -6151,8 +7231,8 @@ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "dev": true, "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0" + "bn.js": "^4.0.0", + "brorand": "^1.0.1" } }, "mime": { @@ -6173,13 +7253,13 @@ "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", "dev": true, "requires": { - "mime-db": "1.30.0" + "mime-db": "~1.30.0" } }, "mimic-fn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", - "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "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 }, "minimalistic-assert": { @@ -6200,7 +7280,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -6210,21 +7290,42 @@ "dev": true }, "mississippi": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-1.3.0.tgz", - "integrity": "sha1-0gFYPrEjJ+PFwWQqQEqcrPlONPU=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "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": "^2.0.1", + "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": { - "concat-stream": "1.6.0", - "duplexify": "3.5.1", - "end-of-stream": "1.4.0", - "flush-write-stream": "1.0.2", - "from2": "2.3.0", - "parallel-transform": "1.1.0", - "pump": "1.0.3", - "pumpify": "1.3.5", - "stream-each": "1.2.2", - "through2": "2.0.3" + "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" + } + } } }, "mixin-object": { @@ -6233,8 +7334,8 @@ "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", "dev": true, "requires": { - "for-in": "0.1.8", - "is-extendable": "0.1.1" + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" }, "dependencies": { "for-in": { @@ -6262,18 +7363,81 @@ } } }, + "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" + }, + "dependencies": { + "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": { + "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" + } + } + } + }, + "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 + } + } + }, + "moment": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz", + "integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ==" + }, "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.2.0", - "copy-concurrently": "1.0.5", - "fs-write-stream-atomic": "1.0.10", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "run-queue": "1.0.3" + "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": { @@ -6282,25 +7446,14 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "msgpack5": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/msgpack5/-/msgpack5-3.6.0.tgz", - "integrity": "sha512-6HuCZHA57WtNUzrKIvjJ8OMxigzveJ6D5i13y6TsgGu3X3zxABpuBvChpppOoGdB9SyWZcmqUs1fwUV/PpSQ7Q==", - "requires": { - "bl": "1.2.1", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "safe-buffer": "5.1.1" - } - }, "multicast-dns": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.1.tgz", - "integrity": "sha512-uV3/ckdsffHx9IrGQrx613mturMdMqQ06WTq+C09NsStJ9iNG6RcUWgPKs1Rfjy+idZT6tfQoXEusGNnEZhT3w==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", "dev": true, "requires": { - "dns-packet": "1.2.2", - "thunky": "0.1.0" + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" } }, "multicast-dns-service-types": { @@ -6310,19 +7463,50 @@ "dev": true }, "nan": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", - "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", "dev": true, "optional": true }, - "ncname": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ncname/-/ncname-1.0.0.tgz", - "integrity": "sha1-W1etGLHKCShk72Kwse2BlPODtxw=", - "dev": true, - "requires": { - "xml-char-classes": "1.0.0" + "nanomatch": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "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-odd": "^2.0.0", + "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": { + "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 + }, + "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 + }, + "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 + } } }, "negotiator": { @@ -6331,6 +7515,25 @@ "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", "dev": true }, + "neo-async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.0.tgz", + "integrity": "sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g==", + "dev": true + }, + "netmask": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", + "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", + "dev": true, + "optional": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, "ng2-toastr": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/ng2-toastr/-/ng2-toastr-4.1.2.tgz", @@ -6352,13 +7555,13 @@ "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", "dev": true, "requires": { - "lower-case": "1.1.4" + "lower-case": "^1.1.1" } }, "node-forge": { - "version": "0.6.33", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.6.33.tgz", - "integrity": "sha1-RjgRh59XPUUVWtap9D3ClujoXrw=", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.1.tgz", + "integrity": "sha1-naYR6giYL0uUIGs760zJZl8gwwA=", "dev": true }, "node-gyp": { @@ -6368,19 +7571,19 @@ "dev": true, "optional": true, "requires": { - "fstream": "1.0.11", - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "nopt": "3.0.6", - "npmlog": "4.1.2", - "osenv": "0.1.4", - "request": "2.81.0", - "rimraf": "2.6.2", - "semver": "5.3.0", - "tar": "2.2.1", - "which": "1.3.0" + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "2", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" }, "dependencies": { "nopt": { @@ -6390,7 +7593,7 @@ "dev": true, "optional": true, "requires": { - "abbrev": "1.1.1" + "abbrev": "1" } }, "semver": { @@ -6408,28 +7611,28 @@ "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", "dev": true, "requires": { - "assert": "1.4.1", - "browserify-zlib": "0.2.0", - "buffer": "4.9.1", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.12.0", - "domain-browser": "1.1.7", - "events": "1.1.1", - "https-browserify": "1.0.0", - "os-browserify": "0.3.0", + "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": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "readable-stream": "2.3.3", - "stream-browserify": "2.0.1", - "stream-http": "2.7.2", - "string_decoder": "1.0.3", - "timers-browserify": "2.0.4", + "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.10.3", + "url": "^0.11.0", + "util": "^0.10.3", "vm-browserify": "0.0.4" } }, @@ -6440,31 +7643,31 @@ "dev": true }, "node-sass": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.7.2.tgz", - "integrity": "sha512-CaV+wLqZ7//Jdom5aUFCpGNoECd7BbNhjuwdsX/LkXBrHl8eb1Wjw4HvWqcFvhr5KuNgAk8i/myf/MQ1YYeroA==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.8.3.tgz", + "integrity": "sha512-tfFWhUsCk/Y19zarDcPo5xpj+IW3qCfOjVdHtYeG6S1CKbQOh1zqylnQK6cV3z9k80yxAnFX9Y+a9+XysDhhfg==", "dev": true, "optional": true, "requires": { - "async-foreach": "0.1.3", - "chalk": "1.1.3", - "cross-spawn": "3.0.1", - "gaze": "1.1.2", - "get-stdin": "4.0.1", - "glob": "7.1.2", - "in-publish": "2.0.0", - "lodash.assign": "4.2.0", - "lodash.clonedeep": "4.5.0", - "lodash.mergewith": "4.6.0", - "meow": "3.7.0", - "mkdirp": "0.5.1", - "nan": "2.8.0", - "node-gyp": "3.6.2", - "npmlog": "4.1.2", - "request": "2.79.0", - "sass-graph": "2.2.4", - "stdout-stream": "1.4.0", - "true-case-path": "1.0.2" + "async-foreach": "^0.1.3", + "chalk": "^1.1.1", + "cross-spawn": "^3.0.0", + "gaze": "^1.0.0", + "get-stdin": "^4.0.1", + "glob": "^7.0.3", + "in-publish": "^2.0.0", + "lodash.assign": "^4.2.0", + "lodash.clonedeep": "^4.3.2", + "lodash.mergewith": "^4.6.0", + "meow": "^3.7.0", + "mkdirp": "^0.5.1", + "nan": "^2.10.0", + "node-gyp": "^3.3.1", + "npmlog": "^4.0.0", + "request": "~2.79.0", + "sass-graph": "^2.2.4", + "stdout-stream": "^1.4.0", + "true-case-path": "^1.0.2" }, "dependencies": { "ansi-styles": { @@ -6502,7 +7705,7 @@ "requires": { "chalk": "1.1.3", "commander": "2.12.2", - "is-my-json-valid": "2.16.1", + "is-my-json-valid": "2.17.2", "pinkie-promise": "2.0.1" } }, @@ -6557,14 +7760,99 @@ } } }, + "nodemailer": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-2.7.2.tgz", + "integrity": "sha1-8kLmSa7q45tsftdA73sGHEBNMPk=", + "dev": true, + "optional": true, + "requires": { + "libmime": "3.0.0", + "mailcomposer": "4.0.1", + "nodemailer-direct-transport": "3.3.2", + "nodemailer-shared": "1.1.0", + "nodemailer-smtp-pool": "2.8.2", + "nodemailer-smtp-transport": "2.7.2", + "socks": "1.1.9" + }, + "dependencies": { + "socks": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.9.tgz", + "integrity": "sha1-Yo1+TQSRJDVEWsC25Fk3bLPm1pE=", + "dev": true, + "optional": true, + "requires": { + "ip": "^1.1.2", + "smart-buffer": "^1.0.4" + } + } + } + }, + "nodemailer-direct-transport": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/nodemailer-direct-transport/-/nodemailer-direct-transport-3.3.2.tgz", + "integrity": "sha1-6W+vuQNYVglH5WkBfZfmBzilCoY=", + "dev": true, + "optional": true, + "requires": { + "nodemailer-shared": "1.1.0", + "smtp-connection": "2.12.0" + } + }, + "nodemailer-fetch": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz", + "integrity": "sha1-ecSQihwPXzdbc/6IjamCj23JY6Q=", + "dev": true + }, + "nodemailer-shared": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz", + "integrity": "sha1-z1mU4v0mjQD1zw+nZ6CBae2wfsA=", + "dev": true, + "requires": { + "nodemailer-fetch": "1.6.0" + } + }, + "nodemailer-smtp-pool": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/nodemailer-smtp-pool/-/nodemailer-smtp-pool-2.8.2.tgz", + "integrity": "sha1-LrlNbPhXgLG0clzoU7nL1ejajHI=", + "dev": true, + "optional": true, + "requires": { + "nodemailer-shared": "1.1.0", + "nodemailer-wellknown": "0.1.10", + "smtp-connection": "2.12.0" + } + }, + "nodemailer-smtp-transport": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/nodemailer-smtp-transport/-/nodemailer-smtp-transport-2.7.2.tgz", + "integrity": "sha1-A9ccdjFPFKx9vHvwM6am0W1n+3c=", + "dev": true, + "optional": true, + "requires": { + "nodemailer-shared": "1.1.0", + "nodemailer-wellknown": "0.1.10", + "smtp-connection": "2.12.0" + } + }, + "nodemailer-wellknown": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/nodemailer-wellknown/-/nodemailer-wellknown-0.1.10.tgz", + "integrity": "sha1-WG24EB2zDLRDjrVGc3pBqtDPE9U=", + "dev": true + }, "nopt": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.4" + "abbrev": "1", + "osenv": "^0.1.4" } }, "normalize-package-data": { @@ -6573,10 +7861,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { @@ -6585,7 +7873,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "normalize-range": { @@ -6594,25 +7882,13 @@ "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", "dev": true }, - "normalize-url": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", - "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", - "dev": true, - "requires": { - "object-assign": "4.1.1", - "prepend-http": "1.0.4", - "query-string": "4.3.4", - "sort-keys": "1.1.2" - } - }, "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.1" + "path-key": "^2.0.0" } }, "npmlog": { @@ -6621,10 +7897,10 @@ "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "nth-check": { @@ -6633,7 +7909,7 @@ "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", "dev": true, "requires": { - "boolbase": "1.0.0" + "boolbase": "~1.0.0" } }, "null-check": { @@ -6672,37 +7948,119 @@ "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", "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" + } + }, + "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-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-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 + } + } + } + } + }, "object-keys": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.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" }, "dependencies": { - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "1.0.2" - } + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true } } }, "obuf": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.1.tgz", - "integrity": "sha1-EEEktsYCxnlogaBCVB0220OlJk4=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", "dev": true }, "on-finished": { @@ -6726,7 +8084,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "opn": { @@ -6735,7 +8093,7 @@ "integrity": "sha512-iPNl7SyM8L30Rm1sjGdLLheyHVw5YXVfi3SKWJzBI7efxRwHojfRFjwE/OLM6qp9xJYMgab8WicTU1cPoY+Hpg==", "dev": true, "requires": { - "is-wsl": "1.1.0" + "is-wsl": "^1.1.0" } }, "optimist": { @@ -6744,8 +8102,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "0.0.10", - "wordwrap": "0.0.2" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" }, "dependencies": { "minimist": { @@ -6756,6 +8114,30 @@ } } }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "optional": 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" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true, + "optional": true + } + } + }, "options": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", @@ -6768,7 +8150,7 @@ "integrity": "sha1-kUf5P6FpbQS+YeAb1QuurKZWvTs=", "dev": true, "requires": { - "url-parse": "1.0.5" + "url-parse": "1.0.x" }, "dependencies": { "url-parse": { @@ -6777,8 +8159,8 @@ "integrity": "sha1-CFSGBCKv3P7+tsllxmLUgAFpkns=", "dev": true, "requires": { - "querystringify": "0.0.4", - "requires-port": "1.0.0" + "querystringify": "0.0.x", + "requires-port": "1.0.x" } } } @@ -6801,7 +8183,7 @@ "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { - "lcid": "1.0.0" + "lcid": "^1.0.0" } }, "os-tmpdir": { @@ -6811,13 +8193,13 @@ "dev": true }, "osenv": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "p-finally": { @@ -6827,10 +8209,13 @@ "dev": true }, "p-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", - "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", - "dev": true + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } }, "p-locate": { "version": "2.0.0", @@ -6838,7 +8223,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.1.0" + "p-limit": "^1.1.0" } }, "p-map": { @@ -6847,6 +8232,60 @@ "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", "dev": true }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pac-proxy-agent": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-1.1.0.tgz", + "integrity": "sha512-QBELCWyLYPgE2Gj+4wUEiMscHrQ8nRPBzYItQNOHWavwBt25ohZHQC4qnd5IszdVVrFbLsQ+dPkm6eqdjJAmwQ==", + "dev": true, + "optional": true, + "requires": { + "agent-base": "2", + "debug": "2", + "extend": "3", + "get-uri": "2", + "http-proxy-agent": "1", + "https-proxy-agent": "1", + "pac-resolver": "~2.0.0", + "raw-body": "2", + "socks-proxy-agent": "2" + } + }, + "pac-resolver": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-2.0.0.tgz", + "integrity": "sha1-mbiNLxk/ve78HJpSnB8yYKtSd80=", + "dev": true, + "optional": true, + "requires": { + "co": "~3.0.6", + "degenerator": "~1.0.2", + "ip": "1.0.1", + "netmask": "~1.0.4", + "thunkify": "~2.1.1" + }, + "dependencies": { + "co": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/co/-/co-3.0.6.tgz", + "integrity": "sha1-FEXyJsXrlWE45oyawwFn6n0ua9o=", + "dev": true, + "optional": true + }, + "ip": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.0.1.tgz", + "integrity": "sha1-x+NWzeoiWucbNtcPLnGpK6TkJZA=", + "dev": true, + "optional": true + } + } + }, "pako": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", @@ -6859,9 +8298,9 @@ "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", "dev": true, "requires": { - "cyclist": "0.2.2", - "inherits": "2.0.3", - "readable-stream": "2.3.3" + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" } }, "param-case": { @@ -6870,7 +8309,16 @@ "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", "dev": true, "requires": { - "no-case": "2.3.2" + "no-case": "^2.2.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": { @@ -6879,11 +8327,11 @@ "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", "dev": true, "requires": { - "asn1.js": "4.9.2", - "browserify-aes": "1.1.1", - "create-hash": "1.1.3", - "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.14" + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" } }, "parse-glob": { @@ -6892,27 +8340,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - } + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" } }, "parse-json": { @@ -6921,7 +8352,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "parse-passwd": { @@ -6930,22 +8361,13 @@ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, - "parsejson": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz", - "integrity": "sha1-q343WfIJ7OmUN5c/fQ8fZK4OZKs=", - "dev": true, - "requires": { - "better-assert": "1.0.2" - } - }, "parseqs": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", "dev": true, "requires": { - "better-assert": "1.0.2" + "better-assert": "~1.0.0" } }, "parseuri": { @@ -6954,7 +8376,7 @@ "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", "dev": true, "requires": { - "better-assert": "1.0.2" + "better-assert": "~1.0.0" } }, "parseurl": { @@ -6963,20 +8385,29 @@ "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", "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.0", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", "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": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "2.0.1" - } + "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", @@ -7002,6 +8433,31 @@ "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", "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 + }, + "path-proxy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-proxy/-/path-proxy-1.0.0.tgz", + "integrity": "sha1-GOijaFn8nS8aU7SN7hOFQ8Ag3l4=", + "dev": true, + "optional": true, + "requires": { + "inflection": "~1.3.0" + }, + "dependencies": { + "inflection": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.3.8.tgz", + "integrity": "sha1-y9Fg2p91sUw8xjV41POWeEvzAU4=", + "dev": true, + "optional": true + } + } + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -7009,14 +8465,20 @@ "dev": true }, "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "pbkdf2": { @@ -7025,11 +8487,11 @@ "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", "dev": true, "requires": { - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", - "sha.js": "2.4.9" + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "performance-now": { @@ -7056,7 +8518,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -7065,18 +8527,7 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "2.1.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "2.0.0" - } - } + "find-up": "^2.1.0" } }, "portfinder": { @@ -7085,656 +8536,137 @@ "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", "dev": true, "requires": { - "async": "1.5.2", - "debug": "2.6.9", - "mkdirp": "0.5.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "dev": true, - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "1.0.0" - } - } - } - }, - "postcss-calc": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", - "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", - "dev": true, - "requires": { - "postcss": "5.2.18", - "postcss-message-helpers": "2.0.0", - "reduce-css-calc": "1.3.0" - } - }, - "postcss-colormin": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", - "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", - "dev": true, - "requires": { - "colormin": "1.1.2", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-convert-values": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", - "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", - "dev": true, - "requires": { - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-custom-properties": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-6.2.0.tgz", - "integrity": "sha512-eNR2h9T9ciKMoQEORrPjH33XeN/nuvVuxArOKmHtsFbGbNss631tgTrKou3/pmjAZbA4QQkhLIkPQkIk3WW+8w==", - "dev": true, - "requires": { - "balanced-match": "1.0.0", - "postcss": "6.0.14" - }, - "dependencies": { - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "postcss": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.14.tgz", - "integrity": "sha512-NJ1z0f+1offCgadPhz+DvGm5Mkci+mmV5BqD13S992o0Xk9eElxUfPPF+t2ksH5R/17gz4xVK8KWocUQ5o3Rog==", - "dev": true, - "requires": { - "chalk": "2.3.0", - "source-map": "0.6.1", - "supports-color": "4.5.0" - } - }, - "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 - } - } - }, - "postcss-discard-comments": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", - "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", - "dev": true, - "requires": { - "postcss": "5.2.18" - } - }, - "postcss-discard-duplicates": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", - "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", - "dev": true, - "requires": { - "postcss": "5.2.18" - } - }, - "postcss-discard-empty": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", - "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", - "dev": true, - "requires": { - "postcss": "5.2.18" - } - }, - "postcss-discard-overridden": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", - "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", - "dev": true, - "requires": { - "postcss": "5.2.18" - } - }, - "postcss-discard-unused": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", - "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", - "dev": true, - "requires": { - "postcss": "5.2.18", - "uniqs": "2.0.0" - } - }, - "postcss-filter-plugins": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz", - "integrity": "sha1-bYWGJTTXNaxCDkqFgG4fXUKG2Ew=", - "dev": true, - "requires": { - "postcss": "5.2.18", - "uniqid": "4.1.1" - } - }, - "postcss-load-config": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", - "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", - "dev": true, - "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1", - "postcss-load-options": "1.2.0", - "postcss-load-plugins": "2.3.0" - } - }, - "postcss-load-options": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", - "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", - "dev": true, - "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1" - } - }, - "postcss-load-plugins": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", - "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", - "dev": true, - "requires": { - "cosmiconfig": "2.2.2", - "object-assign": "4.1.1" - } - }, - "postcss-loader": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.0.9.tgz", - "integrity": "sha512-sgoXPtmgVT3aBAhU47Kig8oPF+mbXl8Unjvtz1Qj1q2D2EvSVJW2mKJNzxv5y/LvA9xWwuvdysvhc7Zn80UWWw==", - "dev": true, - "requires": { - "loader-utils": "1.1.0", - "postcss": "6.0.14", - "postcss-load-config": "1.2.0", - "schema-utils": "0.3.0" - }, - "dependencies": { - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "postcss": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.14.tgz", - "integrity": "sha512-NJ1z0f+1offCgadPhz+DvGm5Mkci+mmV5BqD13S992o0Xk9eElxUfPPF+t2ksH5R/17gz4xVK8KWocUQ5o3Rog==", - "dev": true, - "requires": { - "chalk": "2.3.0", - "source-map": "0.6.1", - "supports-color": "4.5.0" - } - }, - "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 - } - } - }, - "postcss-merge-idents": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", - "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", - "dev": true, - "requires": { - "has": "1.0.1", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-merge-longhand": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", - "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", - "dev": true, - "requires": { - "postcss": "5.2.18" - } - }, - "postcss-merge-rules": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", - "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", - "dev": true, - "requires": { - "browserslist": "1.7.7", - "caniuse-api": "1.6.1", - "postcss": "5.2.18", - "postcss-selector-parser": "2.2.3", - "vendors": "1.0.1" - } - }, - "postcss-message-helpers": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", - "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=", - "dev": true - }, - "postcss-minify-font-values": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", - "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", - "dev": true, - "requires": { - "object-assign": "4.1.1", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-minify-gradients": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", - "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", - "dev": true, - "requires": { - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-minify-params": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", - "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", - "dev": true, - "requires": { - "alphanum-sort": "1.0.2", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0", - "uniqs": "2.0.0" - } - }, - "postcss-minify-selectors": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", - "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", - "dev": true, - "requires": { - "alphanum-sort": "1.0.2", - "has": "1.0.1", - "postcss": "5.2.18", - "postcss-selector-parser": "2.2.3" - } - }, - "postcss-modules-extract-imports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz", - "integrity": "sha1-thTJcgvmgW6u41+zpfqh26agXds=", - "dev": true, - "requires": { - "postcss": "6.0.14" - }, - "dependencies": { - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "postcss": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.14.tgz", - "integrity": "sha512-NJ1z0f+1offCgadPhz+DvGm5Mkci+mmV5BqD13S992o0Xk9eElxUfPPF+t2ksH5R/17gz4xVK8KWocUQ5o3Rog==", - "dev": true, - "requires": { - "chalk": "2.3.0", - "source-map": "0.6.1", - "supports-color": "4.5.0" - } - }, - "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 - } - } - }, - "postcss-modules-local-by-default": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", - "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", - "dev": true, - "requires": { - "css-selector-tokenizer": "0.7.0", - "postcss": "6.0.14" - }, - "dependencies": { - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "postcss": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.14.tgz", - "integrity": "sha512-NJ1z0f+1offCgadPhz+DvGm5Mkci+mmV5BqD13S992o0Xk9eElxUfPPF+t2ksH5R/17gz4xVK8KWocUQ5o3Rog==", - "dev": true, - "requires": { - "chalk": "2.3.0", - "source-map": "0.6.1", - "supports-color": "4.5.0" - } - }, - "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 - } - } - }, - "postcss-modules-scope": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", - "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", - "dev": true, - "requires": { - "css-selector-tokenizer": "0.7.0", - "postcss": "6.0.14" - }, - "dependencies": { - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "postcss": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.14.tgz", - "integrity": "sha512-NJ1z0f+1offCgadPhz+DvGm5Mkci+mmV5BqD13S992o0Xk9eElxUfPPF+t2ksH5R/17gz4xVK8KWocUQ5o3Rog==", - "dev": true, - "requires": { - "chalk": "2.3.0", - "source-map": "0.6.1", - "supports-color": "4.5.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "async": "^1.5.2", + "debug": "^2.2.0", + "mkdirp": "0.5.x" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "dev": true } } }, - "postcss-modules-values": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", - "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", + "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 + }, + "postcss": { + "version": "6.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", "dev": true, "requires": { - "icss-replace-symbols": "1.1.0", - "postcss": "6.0.14" + "chalk": "^2.3.2", + "source-map": "^0.6.1", + "supports-color": "^5.3.0" }, "dependencies": { "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", + "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", "dev": true, "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "postcss": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.14.tgz", - "integrity": "sha512-NJ1z0f+1offCgadPhz+DvGm5Mkci+mmV5BqD13S992o0Xk9eElxUfPPF+t2ksH5R/17gz4xVK8KWocUQ5o3Rog==", - "dev": true, - "requires": { - "chalk": "2.3.0", - "source-map": "0.6.1", - "supports-color": "4.5.0" - } + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true }, "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 + }, + "supports-color": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, - "postcss-normalize-charset": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", - "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", - "dev": true, - "requires": { - "postcss": "5.2.18" - } - }, - "postcss-normalize-url": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", - "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", - "dev": true, - "requires": { - "is-absolute-url": "2.1.0", - "normalize-url": "1.9.1", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-ordered-values": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", - "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", - "dev": true, - "requires": { - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-reduce-idents": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", - "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", - "dev": true, - "requires": { - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" - } - }, - "postcss-reduce-initial": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", - "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", + "postcss-import": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", + "integrity": "sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==", "dev": true, "requires": { - "postcss": "5.2.18" + "postcss": "^6.0.1", + "postcss-value-parser": "^3.2.3", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" } }, - "postcss-reduce-transforms": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", - "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", + "postcss-load-config": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", + "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", "dev": true, "requires": { - "has": "1.0.1", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0" + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0", + "postcss-load-options": "^1.2.0", + "postcss-load-plugins": "^2.3.0" } }, - "postcss-selector-parser": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", - "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", + "postcss-load-options": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", + "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", "dev": true, "requires": { - "flatten": "1.0.2", - "indexes-of": "1.0.1", - "uniq": "1.0.1" + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0" } }, - "postcss-svgo": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", - "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", + "postcss-load-plugins": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", + "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", "dev": true, "requires": { - "is-svg": "2.1.0", - "postcss": "5.2.18", - "postcss-value-parser": "3.3.0", - "svgo": "0.7.2" + "cosmiconfig": "^2.1.1", + "object-assign": "^4.1.0" } }, - "postcss-unique-selectors": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", - "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "postcss-loader": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.3.tgz", + "integrity": "sha512-RuBcNE8rjCkIB0IsbmkGFRmQJTeQJfCI88E0VTarPNTvaNSv9OFv1DvTwgtAN/qlzyiELsmmmtX/tEzKp/cdug==", "dev": true, "requires": { - "alphanum-sort": "1.0.2", - "postcss": "5.2.18", - "uniqs": "2.0.0" + "loader-utils": "^1.1.0", + "postcss": "^6.0.0", + "postcss-load-config": "^1.2.0", + "schema-utils": "^0.4.0" } }, "postcss-url": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.0.tgz", - "integrity": "sha512-VBP6uf6iL3AZra23nkPkOEkS/5azj1xf/toRrjfkolfFEgg9Gyzg9UhJZeIsz12EGKZTNVeGbPa2XtaZm/iZvg==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.2.tgz", + "integrity": "sha512-QMV5mA+pCYZQcUEPQkmor9vcPQ2MT+Ipuu8qdi1gVxbNiIiErEGft+eny1ak19qALoBkccS5AHaCaCDzh7b9MA==", "dev": true, "requires": { - "mime": "1.6.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "postcss": "6.0.14", - "xxhashjs": "0.2.1" - }, - "dependencies": { - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "postcss": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.14.tgz", - "integrity": "sha512-NJ1z0f+1offCgadPhz+DvGm5Mkci+mmV5BqD13S992o0Xk9eElxUfPPF+t2ksH5R/17gz4xVK8KWocUQ5o3Rog==", - "dev": true, - "requires": { - "chalk": "2.3.0", - "source-map": "0.6.1", - "supports-color": "4.5.0" - } - }, - "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 - } + "mime": "^1.4.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.0", + "postcss": "^6.0.1", + "xxhashjs": "^0.2.1" } }, "postcss-value-parser": { @@ -7743,21 +8675,10 @@ "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", "dev": true }, - "postcss-zindex": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", - "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", - "dev": true, - "requires": { - "has": "1.0.1", - "postcss": "5.2.18", - "uniqs": "2.0.0" - } - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "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 }, "preserve": { @@ -7772,8 +8693,8 @@ "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", "dev": true, "requires": { - "renderkid": "2.0.1", - "utila": "0.4.0" + "renderkid": "^2.0.1", + "utila": "~0.4" } }, "process": { @@ -7785,7 +8706,8 @@ "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=" + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true }, "promise": { "version": "7.3.1", @@ -7794,7 +8716,7 @@ "dev": true, "optional": true, "requires": { - "asap": "2.0.6" + "asap": "~2.0.3" } }, "promise-inflight": { @@ -7809,21 +8731,21 @@ "integrity": "sha1-myIXQXCaTGLVzVPGqt1UpxE36V8=", "dev": true, "requires": { - "@types/node": "6.0.92", - "@types/q": "0.0.32", - "@types/selenium-webdriver": "2.53.43", + "@types/node": "^6.0.46", + "@types/q": "^0.0.32", + "@types/selenium-webdriver": "~2.53.39", "blocking-proxy": "0.0.5", - "chalk": "1.1.3", - "glob": "7.1.2", - "jasmine": "2.8.0", - "jasminewd2": "2.2.0", - "optimist": "0.6.1", + "chalk": "^1.1.3", + "glob": "^7.0.3", + "jasmine": "^2.5.3", + "jasminewd2": "^2.1.0", + "optimist": "~0.6.0", "q": "1.4.1", - "saucelabs": "1.3.0", + "saucelabs": "~1.3.0", "selenium-webdriver": "3.0.1", - "source-map-support": "0.4.18", - "webdriver-js-extender": "1.0.0", - "webdriver-manager": "12.0.6" + "source-map-support": "~0.4.0", + "webdriver-js-extender": "^1.0.0", + "webdriver-manager": "^12.0.6" }, "dependencies": { "ansi-styles": { @@ -7838,11 +8760,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "del": { @@ -7851,13 +8773,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" } }, "globby": { @@ -7866,12 +8788,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "q": { @@ -7892,35 +8814,61 @@ "integrity": "sha1-PfGkgZdwELTL+MnYXHpXeCjA5ws=", "dev": true, "requires": { - "adm-zip": "0.4.7", - "chalk": "1.1.3", - "del": "2.2.2", - "glob": "7.1.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "q": "1.4.1", - "request": "2.81.0", - "rimraf": "2.6.2", - "semver": "5.4.1", - "xml2js": "0.4.19" + "adm-zip": "^0.4.7", + "chalk": "^1.1.1", + "del": "^2.2.0", + "glob": "^7.0.3", + "ini": "^1.3.4", + "minimist": "^1.2.0", + "q": "^1.4.1", + "request": "^2.78.0", + "rimraf": "^2.5.2", + "semver": "^5.3.0", + "xml2js": "^0.4.17" } } } }, "proxy-addr": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.2.tgz", - "integrity": "sha1-ZXFQT0e7mI7IGAJT+F3X4UlSvew=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", + "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", + "dev": true, + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.6.0" + } + }, + "proxy-agent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.0.0.tgz", + "integrity": "sha1-V+tTR6qAXXTsaByyVknbo5yTNJk=", "dev": true, + "optional": true, "requires": { - "forwarded": "0.1.2", - "ipaddr.js": "1.5.2" + "agent-base": "2", + "debug": "2", + "extend": "3", + "http-proxy-agent": "1", + "https-proxy-agent": "1", + "lru-cache": "~2.6.5", + "pac-proxy-agent": "1", + "socks-proxy-agent": "2" + }, + "dependencies": { + "lru-cache": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz", + "integrity": "sha1-5W1jVBSO3o13B7WNFDIg/QjfD9U=", + "dev": true, + "optional": true + } } }, "prr": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", - "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", "dev": true }, "pseudomap": { @@ -7935,32 +8883,32 @@ "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", "dev": true, "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "parse-asn1": "5.1.0", - "randombytes": "2.0.5" + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" } }, "pump": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", - "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "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.4.0", - "once": "1.4.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, "pumpify": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.3.5.tgz", - "integrity": "sha1-G2ccYZlAq8rqwK0OOjwWS+dgmTs=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", + "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", "dev": true, "requires": { - "duplexify": "3.5.1", - "inherits": "2.0.3", - "pump": "1.0.3" + "duplexify": "^3.5.3", + "inherits": "^2.0.3", + "pump": "^2.0.0" } }, "punycode": { @@ -7970,15 +8918,16 @@ "dev": true }, "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", + "dev": true, + "optional": true }, "qjobs": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.1.5.tgz", - "integrity": "sha1-ZZ3p8s+NzCehSBJ28gU3cnI4LnM=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", "dev": true }, "qs": { @@ -7987,16 +8936,6 @@ "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", "dev": true }, - "query-string": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", - "dev": true, - "requires": { - "object-assign": "4.1.1", - "strict-uri-encode": "1.1.0" - } - }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", @@ -8021,8 +8960,8 @@ "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "is-number": { @@ -8031,7 +8970,7 @@ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -8040,7 +8979,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -8051,28 +8990,28 @@ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } }, "randombytes": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", - "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", "dev": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "^5.1.0" } }, "randomfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz", - "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==", + "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.1" + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" } }, "range-parser": { @@ -8091,6 +9030,32 @@ "http-errors": "1.6.2", "iconv-lite": "0.4.19", "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "dev": true + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "dev": true, + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", + "dev": true + } } }, "raw-loader": { @@ -8098,15 +9063,46 @@ "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=" }, + "read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", + "dev": true, + "requires": { + "pify": "^2.3.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" + } + }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "dependencies": { + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + } } }, "read-pkg-up": { @@ -8115,22 +9111,44 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + } } }, "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.0.3", + "util-deprecate": "~1.0.1" } }, "readdirp": { @@ -8139,10 +9157,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.3", - "set-immediate-shim": "1.0.1" + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" } }, "redent": { @@ -8151,45 +9169,35 @@ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" } }, - "reduce-css-calc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", - "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "redis": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", + "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", "dev": true, + "optional": true, "requires": { - "balanced-match": "0.4.2", - "math-expression-evaluator": "1.2.17", - "reduce-function-call": "1.0.2" - }, - "dependencies": { - "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", - "dev": true - } + "double-ended-queue": "^2.1.0-0", + "redis-commands": "^1.2.0", + "redis-parser": "^2.6.0" } }, - "reduce-function-call": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", - "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", + "redis-commands": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.5.tgz", + "integrity": "sha512-foGF8u6MXGFF++1TZVC6icGXuMYPftKXt1FBT2vrfU9ZATNtZJ8duRC5d1lEfE8hyVe3jhelHGB91oB7I6qLsA==", "dev": true, - "requires": { - "balanced-match": "0.4.2" - }, - "dependencies": { - "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", - "dev": true - } - } + "optional": true + }, + "redis-parser": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", + "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=", + "dev": true, + "optional": true }, "reflect-metadata": { "version": "0.1.10", @@ -8214,7 +9222,17 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" + } + }, + "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" } }, "regexpu-core": { @@ -8223,9 +9241,9 @@ "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", "dev": true, "requires": { - "regenerate": "1.3.3", - "regjsgen": "0.2.0", - "regjsparser": "0.1.5" + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" } }, "regjsgen": { @@ -8240,7 +9258,7 @@ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "jsesc": "0.5.0" + "jsesc": "~0.5.0" } }, "relateurl": { @@ -8261,11 +9279,11 @@ "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", "dev": true, "requires": { - "css-select": "1.2.0", - "dom-converter": "0.1.4", - "htmlparser2": "3.3.0", - "strip-ansi": "3.0.1", - "utila": "0.3.3" + "css-select": "^1.1.0", + "dom-converter": "~0.1", + "htmlparser2": "~3.3.0", + "strip-ansi": "^3.0.0", + "utila": "~0.3" }, "dependencies": { "utila": { @@ -8294,7 +9312,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "request": { @@ -8303,28 +9321,50 @@ "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", "dev": true, "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~4.2.1", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "performance-now": "^0.2.0", + "qs": "~6.4.0", + "safe-buffer": "^5.0.1", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.0.0" + } + }, + "requestretry": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.13.0.tgz", + "integrity": "sha512-Lmh9qMvnQXADGAQxsXHP4rbgO6pffCfuR8XUBdP9aitJcLQJxhp7YZK4xAVYXnPJ5E52mwrfiKQtKonPL8xsmg==", + "dev": true, + "optional": true, + "requires": { + "extend": "^3.0.0", + "lodash": "^4.15.0", + "request": "^2.74.0", + "when": "^3.7.7" + }, + "dependencies": { + "when": { + "version": "3.7.8", + "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", + "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=", + "dev": true, + "optional": true + } } }, "require-directory": { @@ -8352,12 +9392,12 @@ "dev": true }, "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.6.0.tgz", + "integrity": "sha512-mw7JQNu5ExIkcw4LPih0owX/TZXjD/ZUF/ZQ/pDnkw3ZKhDcZZw5klmBlj6gVMwjQ3Pz5Jgu7F3d0jcDVuEWdw==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } }, "resolve-cwd": { @@ -8366,7 +9406,7 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "resolve-from": "3.0.0" + "resolve-from": "^3.0.0" } }, "resolve-from": { @@ -8375,13 +9415,25 @@ "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", "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 + }, + "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.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -8390,7 +9442,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "ripemd160": { @@ -8399,8 +9451,8 @@ "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", "dev": true, "requires": { - "hash-base": "2.0.2", - "inherits": "2.0.3" + "hash-base": "^2.0.0", + "inherits": "^2.0.1" } }, "run-queue": { @@ -8409,7 +9461,7 @@ "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "dev": true, "requires": { - "aproba": "1.2.0" + "aproba": "^1.1.1" } }, "rw": { @@ -8418,9 +9470,9 @@ "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=" }, "rxjs": { - "version": "5.5.5", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.5.tgz", - "integrity": "sha512-D/MfQnPMBk8P8gfwGxvCkuaWBcG58W7dUMT//URPoYzIbDEKT0GezdirkK5whMgKFBATfCoTpxO8bJQGJ04W5A==", + "version": "5.5.8", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.8.tgz", + "integrity": "sha512-Bz7qou7VAIoGiglJZbzbXa4vpX5BmTTN2Dj/se6+SwADtw4SihqBIiEa7VmTXJ8pynvq0iFr5Gx9VLyye1rIxQ==", "requires": { "symbol-observable": "1.0.1" } @@ -8428,7 +9480,17 @@ "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "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" + } }, "sass-graph": { "version": "2.2.4", @@ -8437,23 +9499,23 @@ "dev": true, "optional": true, "requires": { - "glob": "7.1.2", - "lodash": "4.17.4", - "scss-tokenizer": "0.2.3", - "yargs": "7.1.0" + "glob": "^7.0.0", + "lodash": "^4.0.0", + "scss-tokenizer": "^0.2.3", + "yargs": "^7.0.0" } }, "sass-loader": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.6.tgz", - "integrity": "sha512-c3/Zc+iW+qqDip6kXPYLEgsAu2lf4xz0EZDplB7EmSUMda12U1sGJPetH55B/j9eu0bTtKzKlNPWWyYC7wFNyQ==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.7.tgz", + "integrity": "sha512-JoiyD00Yo1o61OJsoP2s2kb19L1/Y2p3QFcCdWdF6oomBGKVYuZyqHWemRBfQ2uGYsk+CH3eCguXNfpjzlcpaA==", "dev": true, "requires": { - "async": "2.6.0", - "clone-deep": "0.3.0", - "loader-utils": "1.1.0", - "lodash.tail": "4.1.1", - "pify": "3.0.0" + "clone-deep": "^2.0.1", + "loader-utils": "^1.0.1", + "lodash.tail": "^4.1.1", + "neo-async": "^2.5.0", + "pify": "^3.0.0" }, "dependencies": { "pify": { @@ -8470,7 +9532,30 @@ "integrity": "sha1-0kDoAJ33+ocwbsRXimm6O1xCT+4=", "dev": true, "requires": { - "https-proxy-agent": "1.0.0" + "https-proxy-agent": "^1.0.0" + } + }, + "savery": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/savery/-/savery-1.2.0.tgz", + "integrity": "sha1-CqlrSjpMlhvHOJt49agoyDa94hw=", + "requires": { + "mime-types": "2.1.12" + }, + "dependencies": { + "mime-db": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.24.0.tgz", + "integrity": "sha1-4tE/k58AFsbk6a0lqGUvEmxGfww=" + }, + "mime-types": { + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.12.tgz", + "integrity": "sha1-FSuiVndwIN1GY/VMLnvCY4HnFyk=", + "requires": { + "mime-db": "~1.24.0" + } + } } }, "sax": { @@ -8480,12 +9565,13 @@ "dev": true }, "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "dev": true, "requires": { - "ajv": "5.5.1" + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" } }, "scss-tokenizer": { @@ -8495,8 +9581,8 @@ "dev": true, "optional": true, "requires": { - "js-base64": "2.4.0", - "source-map": "0.4.4" + "js-base64": "^2.1.8", + "source-map": "^0.4.2" }, "dependencies": { "source-map": { @@ -8506,7 +9592,7 @@ "dev": true, "optional": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -8523,10 +9609,10 @@ "integrity": "sha1-ot6l2kqX9mcuiefKcnbO+jZRR6c=", "dev": true, "requires": { - "adm-zip": "0.4.7", - "rimraf": "2.6.2", + "adm-zip": "^0.4.7", + "rimraf": "^2.5.4", "tmp": "0.0.30", - "xml2js": "0.4.19" + "xml2js": "^0.4.17" }, "dependencies": { "tmp": { @@ -8535,25 +9621,24 @@ "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", "dev": true, "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.1" } } } }, "selfsigned": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.1.tgz", - "integrity": "sha1-v4y3uDJWxFUeMTR8YxF3jbme7FI=", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.2.tgz", + "integrity": "sha1-tESVgNmZKbZbEKSDiTAaZZIIh1g=", "dev": true, "requires": { - "node-forge": "0.6.33" + "node-forge": "0.7.1" } }, "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "dev": true + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" }, "semver-dsl": { "version": "1.0.1", @@ -8561,28 +9646,37 @@ "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", "dev": true, "requires": { - "semver": "5.4.1" + "semver": "^5.3.0" + } + }, + "semver-intersect": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.3.1.tgz", + "integrity": "sha1-j6hKnhAovSOeRTDRo+GB5pjYhLo=", + "dev": true, + "requires": { + "semver": "^5.0.0" } }, "send": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz", - "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==", + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", "dev": true, "requires": { "debug": "2.6.9", - "depd": "1.1.1", - "destroy": "1.0.4", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "etag": "1.8.1", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "1.6.2", + "http-errors": "~1.6.2", "mime": "1.4.1", "ms": "2.0.0", - "on-finished": "2.3.0", - "range-parser": "1.2.0", - "statuses": "1.3.1" + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" }, "dependencies": { "mime": { @@ -8593,31 +9687,37 @@ } } }, + "serialize-javascript": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.4.0.tgz", + "integrity": "sha1-fJWFFNtqwkQ6irwGLcn3iGp/YAU=", + "dev": true + }, "serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", "dev": true, "requires": { - "accepts": "1.3.4", + "accepts": "~1.3.4", "batch": "0.6.1", "debug": "2.6.9", - "escape-html": "1.0.3", - "http-errors": "1.6.2", - "mime-types": "2.1.17", - "parseurl": "1.3.2" + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" } }, "serve-static": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz", - "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", "dev": true, "requires": { - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "parseurl": "1.3.2", - "send": "0.16.1" + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" } }, "set-blocking": { @@ -8632,6 +9732,29 @@ "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", "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", @@ -8645,34 +9768,51 @@ "dev": true }, "sha.js": { - "version": "2.4.9", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz", - "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==", + "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.3", - "safe-buffer": "5.1.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "shallow-clone": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", - "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", + "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", "dev": true, "requires": { - "is-extendable": "0.1.1", - "kind-of": "2.0.1", - "lazy-cache": "0.2.7", - "mixin-object": "2.0.1" + "is-extendable": "^0.1.1", + "kind-of": "^5.0.0", + "mixin-object": "^2.0.1" }, "dependencies": { "kind-of": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", - "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", + "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 + } + } + }, + "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" + }, + "dependencies": { + "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": { - "is-buffer": "1.1.6" + "jsonify": "~0.0.0" } } } @@ -8683,7 +9823,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -8692,6 +9832,18 @@ "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", @@ -8704,176 +9856,257 @@ "integrity": "sha1-IglwbxyFCp8dENDYQJGLRvJuG8k=", "dev": true, "requires": { - "debug": "2.6.9" + "debug": "^2.2.0" } }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "slack-node": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/slack-node/-/slack-node-0.2.0.tgz", + "integrity": "sha1-3kuN3aqLeT9h29KTgQT9q/N9+jA=", "dev": true, + "optional": true, "requires": { - "hoek": "2.16.3" + "requestretry": "^1.2.2" } }, - "socket.io": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-1.7.3.tgz", - "integrity": "sha1-uK+cq6AJSeVo42nxMn6pvp6iRhs=", + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "smart-buffer": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", + "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=", + "dev": true + }, + "smtp-connection": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/smtp-connection/-/smtp-connection-2.12.0.tgz", + "integrity": "sha1-1275EnyyPCJZ7bHoNJwujV4tdME=", "dev": true, "requires": { - "debug": "2.3.3", - "engine.io": "1.8.3", - "has-binary": "0.1.7", - "object-assign": "4.1.0", - "socket.io-adapter": "0.5.0", - "socket.io-client": "1.7.3", - "socket.io-parser": "2.3.1" + "httpntlm": "1.6.1", + "nodemailer-shared": "1.1.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.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", - "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "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": { - "ms": "0.7.2" + "is-descriptor": "^0.1.0" } }, - "ms": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", - "dev": true + "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" + } }, - "object-assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", - "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=", + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "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" + } + }, + "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 } } }, - "socket.io-adapter": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.5.0.tgz", - "integrity": "sha1-y21LuL7IHhB4uZZ3+c7QBGBmu4s=", + "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": { - "debug": "2.3.3", - "socket.io-parser": "2.3.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { - "debug": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", - "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "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": { - "ms": "0.7.2" + "is-descriptor": "^1.0.0" } }, - "ms": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "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" + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "requires": { + "hoek": "2.x.x" + } + }, + "socket.io": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.0.4.tgz", + "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=", + "dev": true, + "requires": { + "debug": "~2.6.6", + "engine.io": "~3.1.0", + "socket.io-adapter": "~1.1.0", + "socket.io-client": "2.0.4", + "socket.io-parser": "~3.1.1" + } + }, + "socket.io-adapter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", + "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", + "dev": true + }, "socket.io-client": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.7.3.tgz", - "integrity": "sha1-sw6GqhDV7zVGYBwJzeR2Xjgdo3c=", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.0.4.tgz", + "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=", "dev": true, "requires": { "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", "component-bind": "1.0.0", "component-emitter": "1.2.1", - "debug": "2.3.3", - "engine.io-client": "1.8.3", - "has-binary": "0.1.7", + "debug": "~2.6.4", + "engine.io-client": "~3.1.0", + "has-cors": "1.1.0", "indexof": "0.0.1", "object-component": "0.0.3", + "parseqs": "0.0.5", "parseuri": "0.0.5", - "socket.io-parser": "2.3.1", + "socket.io-parser": "~3.1.1", "to-array": "0.1.4" - }, - "dependencies": { - "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 - }, - "debug": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", - "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", - "dev": true, - "requires": { - "ms": "0.7.2" - } - }, - "ms": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", - "dev": true - } } }, "socket.io-parser": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.3.1.tgz", - "integrity": "sha1-3VMgJRA85Clpcya+/WQAX8/ltKA=", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.3.tgz", + "integrity": "sha512-g0a2HPqLguqAczs3dMECuA1RgoGFPyvDqcbaDEdCWY9g59kdUAz3YRmaJBNKXflrHNwB7Q12Gkf/0CZXfdHR7g==", "dev": true, "requires": { - "component-emitter": "1.1.2", - "debug": "2.2.0", - "isarray": "0.0.1", - "json3": "3.3.2" + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "has-binary2": "~1.0.2", + "isarray": "2.0.1" }, "dependencies": { "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { - "ms": "0.7.1" + "ms": "2.0.0" } }, "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", "dev": true } } }, "sockjs": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.18.tgz", - "integrity": "sha1-2bKJMWyn33dZXvKZ4HXw+TfrQgc=", + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", + "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", "dev": true, "requires": { - "faye-websocket": "0.10.0", - "uuid": "2.0.3" - }, - "dependencies": { - "uuid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", - "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", - "dev": true - } + "faye-websocket": "^0.10.0", + "uuid": "^3.0.1" } }, "sockjs-client": { @@ -8882,12 +10115,12 @@ "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=", "dev": true, "requires": { - "debug": "2.6.9", + "debug": "^2.6.6", "eventsource": "0.1.6", - "faye-websocket": "0.11.1", - "inherits": "2.0.3", - "json3": "3.3.2", - "url-parse": "1.2.0" + "faye-websocket": "~0.11.0", + "inherits": "^2.0.1", + "json3": "^3.3.2", + "url-parse": "^1.1.8" }, "dependencies": { "faye-websocket": { @@ -8896,18 +10129,30 @@ "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", "dev": true, "requires": { - "websocket-driver": "0.7.0" + "websocket-driver": ">=0.5.1" } } } }, - "sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "socks": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", + "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", + "dev": true, + "requires": { + "ip": "^1.1.4", + "smart-buffer": "^1.0.13" + } + }, + "socks-proxy-agent": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-2.1.1.tgz", + "integrity": "sha512-sFtmYqdUK5dAMh85H0LEVFUCO7OhJJe1/z2x/Z6mxp3s7/QPf1RkZmpZy+BpuU0bEjcV9npqKjq9Y3kwFUjnxw==", "dev": true, "requires": { - "is-plain-obj": "1.1.0" + "agent-base": "2", + "extend": "3", + "socks": "~1.1.5" } }, "source-list-map": { @@ -8922,35 +10167,17 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, - "source-map-loader": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.3.tgz", - "integrity": "sha512-MYbFX9DYxmTQFfy2v8FC1XZwpwHKYxg3SK8Wb7VPBKuhDjz8gi9re2819MsG4p49HDyiOSUKlmZ+nQBArW5CGw==", + "source-map-resolve": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", + "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "dev": true, "requires": { - "async": "2.6.0", - "loader-utils": "0.2.17", - "source-map": "0.6.1" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } - }, - "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 - } + "atob": "^2.0.0", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-support": { @@ -8959,28 +10186,45 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } }, + "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 + }, "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", "dev": true }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", "dev": true }, "spdy": { @@ -8989,27 +10233,36 @@ "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", "dev": true, "requires": { - "debug": "2.6.9", - "handle-thing": "1.2.5", - "http-deceiver": "1.2.7", - "safe-buffer": "5.1.1", - "select-hose": "2.0.0", - "spdy-transport": "2.0.20" + "debug": "^2.6.8", + "handle-thing": "^1.2.5", + "http-deceiver": "^1.2.7", + "safe-buffer": "^5.0.1", + "select-hose": "^2.0.0", + "spdy-transport": "^2.0.18" } }, "spdy-transport": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.0.20.tgz", - "integrity": "sha1-c15yBUxIayNU/onnAiVgBKOazk0=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", + "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", "dev": true, "requires": { - "debug": "2.6.9", - "detect-node": "2.0.3", - "hpack.js": "2.1.6", - "obuf": "1.1.1", - "readable-stream": "2.3.3", - "safe-buffer": "5.1.1", - "wbuf": "1.7.2" + "debug": "^2.6.8", + "detect-node": "^2.0.3", + "hpack.js": "^2.1.6", + "obuf": "^1.1.1", + "readable-stream": "^2.2.9", + "safe-buffer": "^5.0.1", + "wbuf": "^1.7.2" + } + }, + "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": { @@ -9024,14 +10277,14 @@ "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", "dev": true, "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0" }, "dependencies": { "assert-plus": { @@ -9042,19 +10295,97 @@ } } }, - "ssri": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.0.0.tgz", - "integrity": "sha512-728D4yoQcQm1ooZvSbywLkV1RjfITZXh0oWrhM/lnsx3nAHx7LsRGJWB/YyvoceAYRq98xqbstiN4JBv1/wNHg==", - "dev": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, + "ssri": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.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" + } + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "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" + } + }, + "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 + } + } + }, "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", "dev": true }, "stdout-stream": { @@ -9064,7 +10395,7 @@ "dev": true, "optional": true, "requires": { - "readable-stream": "2.3.3" + "readable-stream": "^2.0.1" } }, "stream-browserify": { @@ -9073,8 +10404,18 @@ "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" + "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": { @@ -9083,21 +10424,21 @@ "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", "dev": true, "requires": { - "end-of-stream": "1.4.0", - "stream-shift": "1.0.0" + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" } }, "stream-http": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", - "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.1.tgz", + "integrity": "sha512-cQ0jo17BLca2r0GfRdZKYAGLU6JRoIWxqSOakUMuKOT6MOK7AAlE856L33QuDmAy/eeOrhLee3dZKX0Uadu93A==", "dev": true, "requires": { - "builtin-status-codes": "3.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "to-arraybuffer": "1.0.1", - "xtend": "4.0.1" + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.3", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" } }, "stream-shift": { @@ -9106,11 +10447,38 @@ "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", "dev": true }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "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" + } + }, + "streamroller": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz", + "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==", + "dev": true, + "requires": { + "date-format": "^1.2.0", + "debug": "^3.1.0", + "mkdirp": "^0.5.1", + "readable-stream": "^2.3.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } }, "string-width": { "version": "1.0.2", @@ -9118,17 +10486,18 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } }, "stringstream": { @@ -9143,7 +10512,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -9152,7 +10521,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -9167,7 +10536,7 @@ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "get-stdin": "4.0.1" + "get-stdin": "^4.0.1" } }, "strip-json-comments": { @@ -9177,12 +10546,36 @@ "dev": true }, "style-loader": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.13.2.tgz", - "integrity": "sha1-dFMzhM9pjHEEx5URULSXF63C87s=", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.19.1.tgz", + "integrity": "sha512-IRE+ijgojrygQi3rsqT0U4dd+UcPCqcVvauZpCnQrGAlEe+FUIyrK93bUDScamesjP08JlQNsFJU+KmPedP5Og==", "dev": true, "requires": { - "loader-utils": "1.1.0" + "loader-utils": "^1.0.2", + "schema-utils": "^0.3.0" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "dev": true, + "requires": { + "ajv": "^5.0.0" + } + } } }, "stylus": { @@ -9191,12 +10584,12 @@ "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", "dev": true, "requires": { - "css-parse": "1.7.0", - "debug": "2.6.9", - "glob": "7.0.6", - "mkdirp": "0.5.1", - "sax": "0.5.8", - "source-map": "0.1.43" + "css-parse": "1.7.x", + "debug": "*", + "glob": "7.0.x", + "mkdirp": "0.5.x", + "sax": "0.5.x", + "source-map": "0.1.x" }, "dependencies": { "glob": { @@ -9205,12 +10598,12 @@ "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "sax": { @@ -9225,44 +10618,38 @@ "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } }, "stylus-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.1.tgz", - "integrity": "sha1-d/SzT9Aw0lsmF7z1UT21sHMMQIk=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", + "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", "dev": true, "requires": { - "loader-utils": "1.1.0", - "lodash.clonedeep": "4.5.0", - "when": "3.6.4" + "loader-utils": "^1.0.2", + "lodash.clonedeep": "^4.5.0", + "when": "~3.6.x" } }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", "dev": true, "requires": { - "has-flag": "2.0.0" + "minimist": "^1.1.0" } }, - "svgo": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz", - "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", "dev": true, "requires": { - "coa": "1.0.4", - "colors": "1.1.2", - "csso": "2.3.2", - "js-yaml": "3.7.0", - "mkdirp": "0.5.1", - "sax": "1.2.4", - "whet.extend": "0.9.9" + "has-flag": "^2.0.0" } }, "symbol-observable": { @@ -9270,6 +10657,15 @@ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" }, + "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" + } + }, "tapable": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", @@ -9283,9 +10679,9 @@ "dev": true, "optional": true, "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" } }, "three": { @@ -9305,14 +10701,21 @@ "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "dev": true, "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" } }, + "thunkify": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", + "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=", + "dev": true, + "optional": true + }, "thunky": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-0.1.0.tgz", - "integrity": "sha1-vzAUaCTituZ7Dy16Ssi+smkIaE4=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", + "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=", "dev": true }, "time-stamp": { @@ -9322,21 +10725,28 @@ "dev": true }, "timers-browserify": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.4.tgz", - "integrity": "sha512-uZYhyU3EX8O7HQP+J9fTVYwsq90Vr68xPEFo7yrVImIxYvHgukBEgOB/SgGoorWVTzGM/3Z+wUNnboA4M8jWrg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.6.tgz", + "integrity": "sha512-HQ3nbYRAowdVd0ckGFvmJPPCOH/CHleFN/Y0YQCX1DVaB7t+KFvisuyN09fuP8Jtp1CpfSh8O8bMkHbdbPe6Pw==", "dev": true, "requires": { - "setimmediate": "1.0.5" + "setimmediate": "^1.0.4" } }, + "timespan": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz", + "integrity": "sha1-SQLOBAvRPYRcj1myfp1ZutbzmSk=", + "dev": true, + "optional": true + }, "tmp": { - "version": "0.0.31", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", - "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", + "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" + "os-tmpdir": "~1.0.2" } }, "to-array": { @@ -9357,6 +10767,48 @@ "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", "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" + }, + "dependencies": { + "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" + } + } + } + }, "toposort": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.6.tgz", @@ -9369,7 +10821,7 @@ "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", "dev": true, "requires": { - "punycode": "1.4.1" + "punycode": "^1.4.1" } }, "tree-kill": { @@ -9397,7 +10849,7 @@ "dev": true, "optional": true, "requires": { - "glob": "6.0.4" + "glob": "^6.0.4" }, "dependencies": { "glob": { @@ -9407,41 +10859,86 @@ "dev": true, "optional": true, "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } } } }, "ts-node": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-3.2.2.tgz", - "integrity": "sha1-u9KOOK9Kqj6WB2xGbhsiAZfBo84=", - "dev": true, - "requires": { - "arrify": "1.0.1", - "chalk": "2.2.2", - "diff": "3.4.0", - "make-error": "1.3.0", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "source-map-support": "0.4.18", - "tsconfig": "6.0.0", - "v8flags": "3.0.1", - "yn": "2.0.0" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-4.1.0.tgz", + "integrity": "sha512-xcZH12oVg9PShKhy3UHyDmuDLV3y7iKwX25aMVPt1SIXSuAfWkFiGPEkg+th8R4YKW/QCxDoW7lJdb15lx6QWg==", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "chalk": "^2.3.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.0", + "tsconfig": "^7.0.0", + "v8flags": "^3.0.0", + "yn": "^2.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", + "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "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-support": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.4.tgz", + "integrity": "sha512-PETSPG6BjY1AHs2t64vS2aqAgu6dMIMXJULWFBGbh2Gr8nVLbCFDo6i/RMMvviIQ2h1Z8+5gQhVKSn2je9nmdg==", + "dev": true, + "requires": { + "source-map": "^0.6.0" + } + }, + "supports-color": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "tsconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-6.0.0.tgz", - "integrity": "sha1-aw6DdgA9evGGT434+J3QBZ/80DI=", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", + "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", "dev": true, "requires": { - "strip-bom": "3.0.0", - "strip-json-comments": "2.0.1" + "@types/strip-bom": "^3.0.0", + "@types/strip-json-comments": "0.0.30", + "strip-bom": "^3.0.0", + "strip-json-comments": "^2.0.0" }, "dependencies": { "strip-bom": { @@ -9453,47 +10950,101 @@ } }, "tsickle": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.25.5.tgz", - "integrity": "sha512-CgOT/1WqOKtE1fyvqB+kTJ7bizE33xj1TyUIzGbxJBGCbQmknCrZbb35DtxMiK6pJo4CrPyoS8iGFddfHKtSNA==", + "version": "0.27.5", + "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.27.5.tgz", + "integrity": "sha512-NP+CjM1EXza/M8mOXBLH3vkFEJiu1zfEAlC5WdJxHPn8l96QPz5eooP6uAgYtw1CcKfuSyIiheNUdKxtDWCNeg==", "dev": true, "requires": { - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "source-map": "0.5.7", - "source-map-support": "0.4.18" + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map": "^0.6.0", + "source-map-support": "^0.5.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-support": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.4.tgz", + "integrity": "sha512-PETSPG6BjY1AHs2t64vS2aqAgu6dMIMXJULWFBGbh2Gr8nVLbCFDo6i/RMMvviIQ2h1Z8+5gQhVKSn2je9nmdg==", + "dev": true, + "requires": { + "source-map": "^0.6.0" + } + } } }, "tslib": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.1.tgz", - "integrity": "sha1-aUavLR1lGnsYY7Ux1uWvpBqkTqw=" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" }, "tslint": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.7.0.tgz", - "integrity": "sha1-wl4NDJL6EgHCvDDoROCOaCtPNVI=", - "dev": true, - "requires": { - "babel-code-frame": "6.26.0", - "colors": "1.1.2", - "commander": "2.12.2", - "diff": "3.4.0", - "glob": "7.1.2", - "minimatch": "3.0.4", - "resolve": "1.5.0", - "semver": "5.4.1", - "tslib": "1.8.1", - "tsutils": "2.13.0" + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", + "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.22.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.7.0", + "minimatch": "^3.0.4", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.12.1" + }, + "dependencies": { + "chalk": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", + "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, + "tsscmp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.5.tgz", + "integrity": "sha1-fcSjOvcVgatDN9qR2FylQn69mpc=", + "dev": true, + "optional": true + }, "tsutils": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.13.0.tgz", - "integrity": "sha512-FuWzNJbMsp3gcZMbI3b5DomhW4Ia41vMxjN63nKWI0t7f+I3UmHfRl0TrXJTwI2LUduDG+eR1Mksp3pvtlyCFQ==", + "version": "2.26.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.26.1.tgz", + "integrity": "sha512-bnm9bcjOqOr1UljleL94wVCDlpa6KjfGaTkefeLch4GRafgDkROxPizbB/FxTEdI++5JqhxczRy/Qub0syNqZA==", "dev": true, "requires": { - "tslib": "1.8.1" + "tslib": "^1.8.1" } }, "tty-browserify": { @@ -9508,7 +11059,7 @@ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -9518,14 +11069,40 @@ "dev": true, "optional": 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-is": { - "version": "1.6.15", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", - "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", "dev": true, "requires": { "media-typer": "0.3.0", - "mime-types": "2.1.17" + "mime-types": "~2.1.18" + }, + "dependencies": { + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "requires": { + "mime-db": "~1.33.0" + } + } } }, "typedarray": { @@ -9535,21 +11112,27 @@ "dev": true }, "typescript": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.2.tgz", - "integrity": "sha1-+DlfhdRZJ2BnyYiqQYN6j4KHCEQ=", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.5.3.tgz", + "integrity": "sha512-ptLSQs2S4QuS6/OD1eAKG+S5G8QQtrU5RT32JULdZQtM1L3WTi34Wsu48Yndzi8xsObRAB9RPt/KhA9wlpEF6w==", "dev": true }, "uglify-js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.2.1.tgz", - "integrity": "sha512-BhZTJPmOKPSUcjnx2nlfaOQKHLyjjT4HFyzFWF1BUErx9knJNpdW94ql5o8qVxeNL+8IAWjEjnPvASH2yZnkMg==", + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.18.tgz", + "integrity": "sha512-VhjIFv93KnTx/ntNi9yTBbfrsWnQnqUy02MT32uqU/5i2oEJ8GAEJ0AwYV206JeOmIzSjm41Ba0iXVKv6j7y9g==", "dev": true, "requires": { - "commander": "2.12.2", - "source-map": "0.6.1" + "commander": "~2.15.0", + "source-map": "~0.6.1" }, "dependencies": { + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -9566,20 +11149,27 @@ "optional": true }, "uglifyjs-webpack-plugin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.1.2.tgz", - "integrity": "sha512-k07cmJTj+8vZMSc3BaQ9uW7qVl2MqDts4ti4KaNACXEcXSw2vQM2S8olSk/CODxvcSFGvUHzNSqA8JQlhgUJPw==", - "dev": true, - "requires": { - "cacache": "10.0.1", - "find-cache-dir": "1.0.0", - "schema-utils": "0.3.0", - "source-map": "0.6.1", - "uglify-es": "3.2.1", - "webpack-sources": "1.1.0", - "worker-farm": "1.5.2" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.4.tgz", + "integrity": "sha512-z0IbjpW8b3O/OVn+TTZN4pI29RN1zktFBXLIzzfZ+++cUtZ1ERSlLWgpE/5OERuEUs1ijVQnpYAkSlpoVmQmSQ==", + "dev": true, + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "schema-utils": "^0.4.5", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "uglify-es": "^3.3.4", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" }, "dependencies": { + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -9587,12 +11177,12 @@ "dev": true }, "uglify-es": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.2.1.tgz", - "integrity": "sha512-c+Fy4VuGvPmT7mj7vEPjRR/iNFuXuOAkufhCtCvTGX0Hr4gCM9YwCnLgHkxr1ngqSODQaDObU3g8SF8uE/tY1w==", + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", "dev": true, "requires": { - "commander": "2.12.2", + "commander": "2.13.0", "source-map": "0.6.1" } } @@ -9604,34 +11194,60 @@ "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=", "dev": true }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", "dev": true }, - "uniqid": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/uniqid/-/uniqid-4.1.1.tgz", - "integrity": "sha1-iSIN32t1GuUrX3JISGNShZa7hME=", + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", + "dev": true + }, + "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": { - "macaddress": "0.2.8" + "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" + } + } } }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, "unique-filename": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", "dev": true, "requires": { - "unique-slug": "2.0.0" + "unique-slug": "^2.0.0" } }, "unique-slug": { @@ -9640,7 +11256,7 @@ "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", "dev": true, "requires": { - "imurmurhash": "0.1.4" + "imurmurhash": "^0.1.4" } }, "universalify": { @@ -9655,12 +11271,87 @@ "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", "dev": true }, + "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 + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "upath": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz", + "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==", + "dev": true + }, "upper-case": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", "dev": true }, + "uri-js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", + "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=", + "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", @@ -9685,19 +11376,42 @@ "integrity": "sha512-h3qf9TNn53BpuXTTcpC+UehiRrl0Cv45Yr/xWayApjw6G8Bg2dGke7rIwDQ39piciWCWrC+WiqLjOh3SUp9n0Q==", "dev": true, "requires": { - "loader-utils": "1.1.0", - "mime": "1.6.0", - "schema-utils": "0.3.0" + "loader-utils": "^1.0.2", + "mime": "^1.4.1", + "schema-utils": "^0.3.0" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "dev": true, + "requires": { + "ajv": "^5.0.0" + } + } } }, "url-parse": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz", - "integrity": "sha512-DT1XbYAfmQP65M/mE6OALxmXzZ/z1+e5zk2TcSKe/KiYbNGZxgtttzC0mR/sjopbpOXcbniq7eIKmocJnUWlEw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.3.0.tgz", + "integrity": "sha512-zPvPA3T7P6M+0iNsgX+iAcAz4GshKrowtQBHHc/28tVsBc8jK7VRCNX+2GEcoE6zDB6XqXhcyiUWPVZY6C70Cg==", "dev": true, "requires": { - "querystringify": "1.0.0", - "requires-port": "1.0.0" + "querystringify": "~1.0.0", + "requires-port": "~1.0.0" }, "dependencies": { "querystringify": { @@ -9708,24 +11422,33 @@ } } }, - "useragent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz", - "integrity": "sha1-z1k+9PLRdYdei7ZY6pLhik/QbY4=", + "use": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "dev": true, "requires": { - "lru-cache": "2.2.4", - "tmp": "0.0.31" + "kind-of": "^6.0.2" }, "dependencies": { - "lru-cache": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", - "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=", + "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 } } }, + "useragent": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", + "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", + "dev": true, + "requires": { + "lru-cache": "4.1.x", + "tmp": "0.0.x" + } + }, "util": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", @@ -9746,7 +11469,8 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true }, "utila": { "version": "0.4.0", @@ -9766,23 +11490,30 @@ "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", "dev": true }, + "uws": { + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/uws/-/uws-9.14.0.tgz", + "integrity": "sha512-HNMztPP5A1sKuVFmdZ6BPVpBQd5bUjNC8EFMFiICK+oho/OQsAJy5hnIx4btMHiOk8j04f/DbIlqnEZ9d72dqg==", + "dev": true, + "optional": true + }, "v8flags": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.0.1.tgz", - "integrity": "sha1-3Oj8N5wX2fLJ6e142JzgAFKxt2s=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.0.2.tgz", + "integrity": "sha512-6sgSKoFw1UpUPd3cFdF7QGnrH6tDeBgW1F3v9gy8gLY0mlbiBXq8soy8aQpY6xeeCjH5K+JvC62Acp7gtl7wWA==", "dev": true, "requires": { - "homedir-polyfill": "1.0.1" + "homedir-polyfill": "^1.0.1" } }, "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "vary": { @@ -9791,21 +11522,15 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true }, - "vendors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.1.tgz", - "integrity": "sha1-N61zyO5Bf7PVgOeFMSMH0nSEfyI=", - "dev": true - }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, "requires": { - "assert-plus": "1.0.0", + "assert-plus": "^1.0.0", "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "extsprintf": "^1.2.0" }, "dependencies": { "assert-plus": { @@ -9838,23 +11563,347 @@ "dev": true }, "watchpack": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz", - "integrity": "sha1-ShRyvLuVK9Cpu0A2gB+VTfs5+qw=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.5.0.tgz", + "integrity": "sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA==", "dev": true, "requires": { - "async": "2.6.0", - "chokidar": "1.7.0", - "graceful-fs": "4.1.11" + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + }, + "dependencies": { + "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.10", + "normalize-path": "2.1.1" + } + }, + "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 + }, + "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 + }, + "braces": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", + "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "kind-of": "^6.0.2", + "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": { + "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.1" + } + } + } + }, + "chokidar": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", + "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", + "dev": true, + "requires": { + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.1", + "fsevents": "1.1.3", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.0.4" + } + }, + "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.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "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.6" + } + }, + "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.1" + } + }, + "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.1.0" + } + }, + "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 + } + } + }, + "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.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "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.2" + } + }, + "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.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.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.1" + } + } + } + }, + "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.2" + }, + "dependencies": { + "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.1" + } + } + } + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "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-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" + } + }, + "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.2.2" + }, + "dependencies": { + "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.6" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "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 + }, + "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.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + } } }, "wbuf": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.2.tgz", - "integrity": "sha1-1pe5nx9ZUS3ydRvkJ2nBWAtYAf4=", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", "dev": true, "requires": { - "minimalistic-assert": "1.0.0" + "minimalistic-assert": "^1.0.0" } }, "webdriver-js-extender": { @@ -9863,8 +11912,8 @@ "integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=", "dev": true, "requires": { - "@types/selenium-webdriver": "2.53.43", - "selenium-webdriver": "2.53.3" + "@types/selenium-webdriver": "^2.53.35", + "selenium-webdriver": "^2.53.2" }, "dependencies": { "adm-zip": { @@ -9886,9 +11935,9 @@ "dev": true, "requires": { "adm-zip": "0.4.4", - "rimraf": "2.6.2", + "rimraf": "^2.2.8", "tmp": "0.0.24", - "ws": "1.1.2", + "ws": "^1.0.1", "xml2js": "0.4.4" } }, @@ -9904,40 +11953,40 @@ "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=", "dev": true, "requires": { - "sax": "0.6.1", - "xmlbuilder": "9.0.4" + "sax": "0.6.x", + "xmlbuilder": ">=1.0.0" } } } }, "webpack": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.10.0.tgz", - "integrity": "sha512-fxxKXoicjdXNUMY7LIdY89tkJJJ0m1Oo8PQutZ5rLgWbV5QVKI15Cn7+/IHnRTd3vfKfiwBx6SBqlorAuNA8LA==", - "dev": true, - "requires": { - "acorn": "5.2.1", - "acorn-dynamic-import": "2.0.2", - "ajv": "5.5.1", - "ajv-keywords": "2.1.1", - "async": "2.6.0", - "enhanced-resolve": "3.4.1", - "escope": "3.6.0", - "interpret": "1.1.0", - "json-loader": "0.5.7", - "json5": "0.5.1", - "loader-runner": "2.3.0", - "loader-utils": "1.1.0", - "memory-fs": "0.4.1", - "mkdirp": "0.5.1", - "node-libs-browser": "2.1.0", - "source-map": "0.5.7", - "supports-color": "4.5.0", - "tapable": "0.2.8", - "uglifyjs-webpack-plugin": "0.4.6", - "watchpack": "1.4.0", - "webpack-sources": "1.1.0", - "yargs": "8.0.2" + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.11.0.tgz", + "integrity": "sha512-3kOFejWqj5ISpJk4Qj/V7w98h9Vl52wak3CLiw/cDOfbVTq7FeoZ0SdoHHY9PYlHr50ZS42OfvzE2vB4nncKQg==", + "dev": true, + "requires": { + "acorn": "^5.0.0", + "acorn-dynamic-import": "^2.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "async": "^2.1.2", + "enhanced-resolve": "^3.4.0", + "escope": "^3.6.0", + "interpret": "^1.0.0", + "json-loader": "^0.5.4", + "json5": "^0.5.1", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "mkdirp": "~0.5.0", + "node-libs-browser": "^2.0.0", + "source-map": "^0.5.3", + "supports-color": "^4.2.1", + "tapable": "^0.2.7", + "uglifyjs-webpack-plugin": "^0.4.6", + "watchpack": "^1.4.0", + "webpack-sources": "^1.0.1", + "yargs": "^8.0.2" }, "dependencies": { "ansi-regex": { @@ -9958,30 +12007,21 @@ "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", "dev": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" } }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "2.0.0" - } - }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" } }, "os-locale": { @@ -9990,9 +12030,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "path-type": { @@ -10001,7 +12041,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "2.3.0" + "pify": "^2.0.0" } }, "read-pkg": { @@ -10010,9 +12050,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" } }, "read-pkg-up": { @@ -10021,8 +12061,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" } }, "string-width": { @@ -10031,8 +12071,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "is-fullwidth-code-point": { @@ -10047,7 +12087,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -10064,9 +12104,9 @@ "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", "dev": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "yargs": { @@ -10075,9 +12115,9 @@ "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } } @@ -10089,9 +12129,9 @@ "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", "dev": true, "requires": { - "source-map": "0.5.7", - "uglify-js": "2.8.29", - "webpack-sources": "1.1.0" + "source-map": "^0.5.6", + "uglify-js": "^2.8.29", + "webpack-sources": "^1.0.1" } }, "which-module": { @@ -10100,25 +12140,31 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, "yargs": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", "dev": true, "requires": { - "camelcase": "4.1.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "read-pkg-up": "2.0.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "7.0.0" + "camelcase": "^4.1.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "read-pkg-up": "^2.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", + "yargs-parser": "^7.0.0" }, "dependencies": { "camelcase": { @@ -10133,9 +12179,9 @@ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" }, "dependencies": { "string-width": { @@ -10144,9 +12190,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -10159,7 +12205,7 @@ "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { @@ -10172,66 +12218,14 @@ } } }, - "webpack-concat-plugin": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/webpack-concat-plugin/-/webpack-concat-plugin-1.4.2.tgz", - "integrity": "sha512-HdV2xOq4twtL2ThR9NSCCQ888v1JBMpJfm3k2mA1I5LkS2+/6rv8q/bb9yTSaR0fVaMtANZi4Wkz0xc33MAt6w==", - "dev": true, - "requires": { - "md5": "2.2.1", - "uglify-js": "2.8.29" - }, - "dependencies": { - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "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.3", - "right-align": "0.1.3", - "wordwrap": "0.0.2" - } - }, - "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.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" - } - }, - "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.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", - "window-size": "0.1.0" - } - } - } - }, "webpack-core": { "version": "0.6.9", "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", "dev": true, "requires": { - "source-list-map": "0.1.8", - "source-map": "0.4.4" + "source-list-map": "~0.1.7", + "source-map": "~0.4.1" }, "dependencies": { "source-list-map": { @@ -10246,7 +12240,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -10257,54 +12251,136 @@ "integrity": "sha512-FCrqPy1yy/sN6U/SaEZcHKRXGlqU0DUaEBL45jkUYoB8foVb6wCnbIJ1HKIx+qUFTW+3JpVcCJCxZ8VATL4e+A==", "dev": true, "requires": { - "memory-fs": "0.4.1", - "mime": "1.6.0", - "path-is-absolute": "1.0.1", - "range-parser": "1.2.0", - "time-stamp": "2.0.0" + "memory-fs": "~0.4.1", + "mime": "^1.5.0", + "path-is-absolute": "^1.0.0", + "range-parser": "^1.0.3", + "time-stamp": "^2.0.0" } }, "webpack-dev-server": { - "version": "2.9.7", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.9.7.tgz", - "integrity": "sha512-Pu7uoQFgQj5RE5wmlfkpYSzihMKxulwEuO2xCsaMnAnyRSApwoVi3B8WCm9XbigyWTHaIMzYGkB90Vr6leAeTQ==", + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.2.tgz", + "integrity": "sha512-zrPoX97bx47vZiAXfDrkw8pe9QjJ+lunQl3dypojyWwWr1M5I2h0VSrMPfTjopHQPRNn+NqfjcMmhoLcUJe2gA==", "dev": true, "requires": { "ansi-html": "0.0.7", - "array-includes": "3.0.3", - "bonjour": "3.5.0", - "chokidar": "1.7.0", - "compression": "1.7.1", - "connect-history-api-fallback": "1.5.0", - "debug": "3.1.0", - "del": "3.0.0", - "express": "4.16.2", - "html-entities": "1.2.1", - "http-proxy-middleware": "0.17.4", - "import-local": "0.1.1", + "array-includes": "^3.0.3", + "bonjour": "^3.5.0", + "chokidar": "^2.0.0", + "compression": "^1.5.2", + "connect-history-api-fallback": "^1.3.0", + "debug": "^3.1.0", + "del": "^3.0.0", + "express": "^4.16.2", + "html-entities": "^1.2.0", + "http-proxy-middleware": "~0.17.4", + "import-local": "^1.0.0", "internal-ip": "1.2.0", - "ip": "1.1.5", - "killable": "1.0.0", - "loglevel": "1.6.0", - "opn": "5.1.0", - "portfinder": "1.0.13", - "selfsigned": "1.10.1", - "serve-index": "1.9.1", - "sockjs": "0.3.18", + "ip": "^1.1.5", + "killable": "^1.0.0", + "loglevel": "^1.4.1", + "opn": "^5.1.0", + "portfinder": "^1.0.9", + "selfsigned": "^1.9.1", + "serve-index": "^1.7.2", + "sockjs": "0.3.19", "sockjs-client": "1.1.4", - "spdy": "3.4.7", - "strip-ansi": "3.0.1", - "supports-color": "4.5.0", + "spdy": "^3.4.1", + "strip-ansi": "^3.0.0", + "supports-color": "^5.1.0", "webpack-dev-middleware": "1.12.2", "yargs": "6.6.0" }, "dependencies": { + "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.10", + "normalize-path": "2.1.1" + } + }, + "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 + }, + "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 + }, + "braces": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", + "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "kind-of": "^6.0.2", + "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": { + "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.1" + } + } + } + }, "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", "dev": true }, + "chokidar": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", + "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", + "dev": true, + "requires": { + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.1", + "fsevents": "1.1.3", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.0.4" + } + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -10314,25 +12390,295 @@ "ms": "2.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.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "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.6" + } + }, + "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.1" + } + }, + "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.1.0" + } + }, + "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 + } + } + }, + "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.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "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.2" + } + }, + "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.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.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.1" + } + } + } + }, + "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.2" + }, + "dependencies": { + "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.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 + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "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-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" + } + }, + "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.2.2" + }, + "dependencies": { + "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.6" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "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 + }, + "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.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "supports-color": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, "yargs": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", "dev": true, "requires": { - "camelcase": "3.0.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "y18n": "3.2.1", - "yargs-parser": "4.2.1" + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^4.2.0" } }, "yargs-parser": { @@ -10341,18 +12687,26 @@ "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", "dev": true, "requires": { - "camelcase": "3.0.0" + "camelcase": "^3.0.0" } } } }, "webpack-merge": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.1.tgz", - "integrity": "sha512-geQsZ86YkXOVOjvPC5yv3JSNnL6/X3Kzh935AQ/gJNEYXEfJDQFu/sdFuktS9OW2JcH/SJec8TGfRdrpHshH7A==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.2.tgz", + "integrity": "sha512-/0QYwW/H1N/CdXYA2PNPVbsxO3u2Fpz34vs72xm03SRfg6bMNGfMJIQEpQjKRvkG2JvT6oRJFpDtSrwbX8Jzvw==", "dev": true, "requires": { - "lodash": "4.17.4" + "lodash": "^4.17.5" + }, + "dependencies": { + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", + "dev": true + } } }, "webpack-sources": { @@ -10361,8 +12715,8 @@ "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", "dev": true, "requires": { - "source-list-map": "2.0.0", - "source-map": "0.6.1" + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" }, "dependencies": { "source-map": { @@ -10374,12 +12728,12 @@ } }, "webpack-subresource-integrity": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.0.3.tgz", - "integrity": "sha1-wGBtQAkLBwzeQovsjfNgMhbkcus=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.0.4.tgz", + "integrity": "sha1-j6yKfo61n8ahZ2ioXJ2U7n+dDts=", "dev": true, "requires": { - "webpack-core": "0.6.9" + "webpack-core": "^0.6.8" } }, "websocket-driver": { @@ -10388,8 +12742,8 @@ "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", "dev": true, "requires": { - "http-parser-js": "0.4.9", - "websocket-extensions": "0.1.3" + "http-parser-js": ">=0.4.0", + "websocket-extensions": ">=0.1.1" } }, "websocket-extensions": { @@ -10409,19 +12763,13 @@ "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=", "dev": true }, - "whet.extend": { - "version": "0.9.9", - "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", - "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=", - "dev": true - }, "which": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -10436,7 +12784,7 @@ "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "dev": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2" } }, "window-size": { @@ -10452,13 +12800,12 @@ "dev": true }, "worker-farm": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.2.tgz", - "integrity": "sha512-XxiQ9kZN5n6mmnW+mFJ+wXjNNI/Nx4DIdaAKLX1Bn6LYBWlN/zaBhu34DQYPZ1AJobQuu67S2OfDdNSVULvXkQ==", + "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.4", - "xtend": "4.0.1" + "errno": "~0.1.7" } }, "wrap-ansi": { @@ -10467,8 +12814,8 @@ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" } }, "wrappy": { @@ -10483,30 +12830,18 @@ "integrity": "sha1-iiRPoFJAHgjJiGz0SoUYnh/UBn8=", "dev": true, "requires": { - "options": "0.0.6", - "ultron": "1.0.2" + "options": ">=0.0.5", + "ultron": "1.0.x" } }, - "wtf-8": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wtf-8/-/wtf-8-1.0.0.tgz", - "integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=", - "dev": true - }, - "xml-char-classes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz", - "integrity": "sha1-ZGV4SKIP/F31g6Qq2KJ3tFErvE0=", - "dev": true - }, "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", "dev": true, "requires": { - "sax": "1.2.4", - "xmlbuilder": "9.0.4" + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" } }, "xmlbuilder": { @@ -10521,11 +12856,18 @@ "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" }, "xmlhttprequest-ssl": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz", - "integrity": "sha1-GFqIjATspGw+QHDZn3tJ3jUomS0=", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", + "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", "dev": true }, + "xregexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", + "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=", + "dev": true, + "optional": true + }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", @@ -10533,18 +12875,18 @@ "dev": true }, "xxhashjs": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.1.tgz", - "integrity": "sha1-m76b6JYUKXbfo0wGGy0GjEPTDeA=", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/xxhashjs/-/xxhashjs-0.2.2.tgz", + "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==", "dev": true, "requires": { - "cuint": "0.2.2" + "cuint": "^0.2.2" } }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "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": { @@ -10560,19 +12902,19 @@ "dev": true, "optional": true, "requires": { - "camelcase": "3.0.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "y18n": "3.2.1", - "yargs-parser": "5.0.0" + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" }, "dependencies": { "camelcase": { @@ -10581,6 +12923,13 @@ "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", "dev": true, "optional": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true, + "optional": true } } }, @@ -10591,7 +12940,7 @@ "dev": true, "optional": true, "requires": { - "camelcase": "3.0.0" + "camelcase": "^3.0.0" }, "dependencies": { "camelcase": { @@ -10616,9 +12965,9 @@ "dev": true }, "zone.js": { - "version": "0.8.18", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.18.tgz", - "integrity": "sha512-knKOBQM0oea3/x9pdyDuDi7RhxDlJhOIkeixXSiTKWLgs4LpK37iBc+1HaHwzlciHUKT172CymJFKo8Xgh+44Q==" + "version": "0.8.25", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.25.tgz", + "integrity": "sha512-/4HpggPPo8aVMDhB18X0734eZftRNPR8Y9kURWzwzXMFi5rp6Igk5kFrlIIY6AueLlm1zcvi2WBOqBTvrX+0Rw==" } } } diff --git a/package.json b/package.json index 4e89542..bf45199 100644 --- a/package.json +++ b/package.json @@ -8,25 +8,30 @@ "build": "ng build", "test": "ng test", "lint": "ng lint", - "e2e": "ng e2e" + "e2e": "ng e2e", + "postinstall": "node version.js" }, "private": true, "dependencies": { - "@angular/animations": "^5.0.0", - "@angular/common": "^5.0.0", - "@angular/compiler": "^5.0.0", - "@angular/core": "^5.0.0", - "@angular/forms": "^5.0.0", - "@angular/http": "^5.0.0", - "@angular/platform-browser": "^5.0.0", - "@angular/platform-browser-dynamic": "^5.0.0", - "@angular/router": "^5.0.0", - "@aspnet/signalr-client": "^1.0.0-alpha2-final", + "@angular/animations": "^5.2.0", + "@angular/common": "^5.2.0", + "@angular/compiler": "^5.2.0", + "@angular/core": "^5.2.0", + "@angular/forms": "^5.2.0", + "@angular/http": "^5.2.0", + "@angular/platform-browser": "^5.2.0", + "@angular/platform-browser-dynamic": "^5.2.0", + "@angular/router": "^5.2.0", + "core-js": "^2.4.1", + "rxjs": "^5.5.6", + "zone.js": "^0.8.19", + "@aspnet/signalr": "^1.0.0", "@ngrx/store": "^4.1.1", "@types/three": "^0.89.2", - "core-js": "^2.4.1", + "angular2-moment": "^1.8.0", "d3": "^4.12.0", "font-awesome": "^4.7.0", + "git-describe": "^4.0.2", "gsap": "^1.20.3", "immutable": "^3.8.2", "interactjs": "^1.3.1", @@ -37,30 +42,28 @@ "ngx-bootstrap": "^2.0.0-rc.0", "raw-loader": "^0.5.1", "reflect-metadata": "^0.1.10", - "rxjs": "^5.5.2", + "savery": "^1.2.0", "three": "^0.84.0", - "webvr-polyfill": "^0.9.40", - "zone.js": "^0.8.14" + "webvr-polyfill": "^0.9.40" }, "devDependencies": { - "@angular/cli": "1.6.0", - "@angular/compiler-cli": "^5.0.0", - "@angular/language-service": "^5.0.0", - "@types/jasmine": "~2.5.53", + "@angular/cli": "~1.7.3", + "@angular/compiler-cli": "^5.2.0", + "@angular/language-service": "^5.2.0", + "@types/jasmine": "~2.8.3", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "^4.0.1", - "jasmine-core": "~2.6.2", - "jasmine-spec-reporter": "~4.1.0", - "karma": "~1.7.0", - "karma-chrome-launcher": "~2.1.1", - "karma-cli": "~1.0.1", + "jasmine-core": "~2.8.0", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~2.0.0", + "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", - "ts-node": "~3.2.0", - "tslint": "~5.7.0", - "typescript": "~2.4.2" + "ts-node": "~4.1.0", + "tslint": "~5.9.1", + "typescript": "~2.5.3" } } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 7c57f23..ffa7c75 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -16,6 +16,7 @@ import { TestSvgCircleComponent } from './networkview/test-svg-circle.component' import { ZoneTestComponent } from './zone-test/zone-test.component'; import { DomainComponent } from './canvas/domain.component'; import { DevSecOpsComponent } from './canvas/devsecops.component'; +import { DashboardComponent } from './dashboard/dashboard.component'; const routes: Routes = [ { path: '', pathMatch: 'full', redirectTo: 'welcome' }, @@ -26,6 +27,7 @@ const routes: Routes = [ { path: 'world', component: WorldComponent }, { path: 'domian', component: DomainComponent }, { path: 'devsecops', component: DevSecOpsComponent }, + { path: 'dashboard', component: DashboardComponent }, { path: 'test', component: CanvasTestComponent }, { path: 'svg', component: TestSvgComponent }, { path: 'circle', component: TestSvgCircleComponent }, diff --git a/src/app/app.component.html b/src/app/app.component.html index ee532c1..27a11f5 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -5,6 +5,7 @@ Domian Drawing World + Dashboard DevSecOps +
+
diff --git a/src/app/canvas/devsecops.component.ts b/src/app/canvas/devsecops.component.ts index d299135..365e0c7 100644 --- a/src/app/canvas/devsecops.component.ts +++ b/src/app/canvas/devsecops.component.ts @@ -1,19 +1,31 @@ -import { Component, OnInit, Input, ViewChild, ElementRef, AfterViewInit } from '@angular/core'; - -import { foWorkspace } from "../foundry/foWorkspace.model"; -import { foPage } from "../foundry/shapes/foPage.model"; -import { foModel } from "../foundry/foModel.model"; - -import { Screen2D } from "../foundry/shapes/canvasDriver"; +import { + Component, + OnInit, + Input, + ViewChild, + ElementRef, + AfterViewInit +} from '@angular/core'; + +import { foWorkspace } from '../foundry/foWorkspace.model'; +import { foPage } from '../foundry/shapes/foPage.model'; +import { foModel } from '../foundry/foModel.model'; + +import { Screen2D } from '../foundry/shapes/canvasDriver'; import { foDocument } from '../foundry/shapes/foDocument.model'; import { cPoint2D } from '../foundry/shapes/foGeometry2D'; -import { foGlyph2D } from "../foundry/shapes/foGlyph2D.model"; +import { foGlyph2D } from '../foundry/shapes/foGlyph2D.model'; + +import { Toast } from '../common/emitter.service'; +import { SharingService } from '../common/sharing.service'; +import { DevSecOps } from './devsecops.model'; -import { SharingService } from "../common/sharing.service"; -import { DevSecOps, DevSecOpsShapes, DevSecOpsSolids } from "./devsecops.model"; +import { BoidStencil, boidBehaviour } from './boid.model'; +import { FactoryStencil, factoryBehaviour } from './factory.model'; +import { foCommand, foToggle } from '../foundry/foController'; -import { Star } from "konva"; +import { Star } from 'konva'; @Component({ selector: 'fo-devsecops', @@ -21,104 +33,219 @@ import { Star } from "konva"; styleUrls: ['./devsecops.component.css'] }) export class DevSecOpsComponent implements OnInit, AfterViewInit { - + showZones: boolean = true; workspace: foWorkspace = DevSecOps; - model: foModel; + model: foModel = DevSecOps.model.getItem('default'); - @ViewChild('canvas') - public canvasRef: ElementRef; + @ViewChild('canvas') public canvasRef: ElementRef; - @Input() - public pageWidth = 1400; - @Input() - public pageHeight = 800; + @Input() public pageWidth = 1400; + @Input() public pageHeight = 800; screen2D: Screen2D = new Screen2D(); currentDocument: foDocument; - - constructor( - private sharing: SharingService) { + + constructor(private sharing: SharingService) {} + + doOpen() { + this.workspace.openFile(result => { + Toast.info('open', result.filename); + this.workspace.reHydratePayload(result.payload); + }); + } + + doSave() { + this.workspace.SaveInstanceAs( + this.workspace.activePage, + 'page1', + '.json', + result => { + Toast.info('saved', result.filename); + } + ); + } + + doClear() { + this.workspace.clearActivePage(); + } + + doSaveWorkspace() { + this.workspace.SaveFileAs('work', '.json', result => { + Toast.info('saved', result.filename); + }); } ngOnInit() { + const space = this.workspace; + + space.stencil.add(FactoryStencil); + space.controller.add(factoryBehaviour); + + factoryBehaviour.addCommands( + new foCommand('layout', () => { + const page = space.activePage; + const shape = factoryBehaviour.buildLayout(page); + page.centerShape( shape ); + }) + ); + + // factoryBehaviour.addCommands(new foCommand('grid', () => { + // factoryBehaviour.buildGrid(space.activePage); + // })); + + factoryBehaviour.addCommands( + new foCommand('create package', () => { + factoryBehaviour.createPackage(space.activePage); + }) + ); + + factoryBehaviour.addCommands( + new foCommand('build factory', () => { + factoryBehaviour.buildFactory(space.activePage); + }) + ); + + factoryBehaviour.addCommands( + new foCommand('run', () => { + factoryBehaviour.runFactory(space.activePage); + }) + ); + + space.library.members.forEach(lib => { + lib.solutions.publicMembers.forEach(know => { + factoryBehaviour.addCommands( + new foCommand(know.myName, () => { + const model = space.model.establish('default'); + const item = know.makeComponent(model).defaultName(); + factoryBehaviour.renderModel(space.activePage, item); + }) + ); + }); + }); + + space.stencil.add(BoidStencil); + space.controller.add(boidBehaviour); + + boidBehaviour.addCommands( + new foCommand('100++', () => { + boidBehaviour.creatBoids(space.activePage, 100); + }) + ); + + boidBehaviour.addCommands( + new foCommand('+1', () => { + boidBehaviour.creatBoids(space.activePage, 1); + }) + ); + + const root = this; + boidBehaviour.addToggle( + new foToggle( + 'zone', + () => { + root.showZones = !root.showZones; + const page = space.activePage; + page.Subcomponents.forEach(boid => { + boid.isVisible = root.showZones; + }); + }, + () => { + return { active: root.showZones }; + } + ) + ); + this.currentDocument = this.workspace.document.override({ pageWidth: this.pageWidth, - pageHeight: this.pageHeight, + pageHeight: this.pageHeight }); - this.workspace.model.addItem('default', new foModel({})); - - this.model = this.workspace.model.getItem('default') + this.model = this.workspace.model.establish('default'); //this.model = workspace.context() } public ngAfterViewInit() { + this.screen2D.setRoot( + this.canvasRef.nativeElement, + this.pageWidth, + this.pageHeight + ); - this.screen2D.setRoot(this.canvasRef.nativeElement, this.pageWidth, this.pageHeight); - this.sharing.startSharing(); - setTimeout( _ => { + setTimeout(_ => { this.doSetCurrentPage(this.currentDocument.currentPage); - }) - - + }); } addEventHooks(page: foPage) { - - page.onItemHoverEnter = (loc: cPoint2D, shape: foGlyph2D, keys?: any): void => { + page.onItemHoverEnter = ( + loc: cPoint2D, + shape: foGlyph2D, + keys?: any + ): void => { if (shape) { - shape.drawHover = function (ctx: CanvasRenderingContext2D) { - ctx.strokeStyle = "yellow"; + shape.drawHover = function(ctx: CanvasRenderingContext2D) { + ctx.strokeStyle = 'yellow'; ctx.lineWidth = 4; shape.drawOutline(ctx); - } + }; } - } + }; - page.onItemHoverExit = (loc: cPoint2D, shape: foGlyph2D, keys?: any): void => { + page.onItemHoverExit = ( + loc: cPoint2D, + shape: foGlyph2D, + keys?: any + ): void => { if (shape) { shape.drawHover = undefined; } - } - - page.onItemOverlapEnter = (loc: cPoint2D, shape: foGlyph2D, shapeUnder: foGlyph2D, keys?: any): void => { - + }; + + page.onItemOverlapEnter = ( + loc: cPoint2D, + shape: foGlyph2D, + shapeUnder: foGlyph2D, + keys?: any + ): void => { if (shapeUnder) { - shapeUnder.drawHover = function (ctx: CanvasRenderingContext2D) { - ctx.strokeStyle = "green"; + shapeUnder.drawHover = function(ctx: CanvasRenderingContext2D) { + ctx.strokeStyle = 'green'; ctx.lineWidth = 8; shapeUnder.drawOutline(ctx); - ctx.strokeStyle = "yellow"; + ctx.strokeStyle = 'yellow'; ctx.lineWidth = 4; shapeUnder.drawOutline(ctx); - } + }; } - } - - page.onItemOverlapExit = (loc: cPoint2D, shape: foGlyph2D, shapeUnder: foGlyph2D, keys?: any): void => { - + }; + + page.onItemOverlapExit = ( + loc: cPoint2D, + shape: foGlyph2D, + shapeUnder: foGlyph2D, + keys?: any + ): void => { if (shapeUnder) { shapeUnder.drawHover = undefined; } - } - + }; } doSetCurrentPage(page: foPage) { - this.screen2D.clear(); + page.canvas = this.canvasRef.nativeElement; + //with the render function you could //1) render a single page //2) render pages like layers //3) render pages side by side this.screen2D.render = (ctx: CanvasRenderingContext2D) => { page.render(ctx); - } + }; this.screen2D.go(); this.addEventHooks(page); } - } diff --git a/src/app/canvas/devsecops.knowledge.ts b/src/app/canvas/devsecops.knowledge.ts new file mode 100644 index 0000000..d12a042 --- /dev/null +++ b/src/app/canvas/devsecops.knowledge.ts @@ -0,0 +1,58 @@ +import { foComponent } from '../foundry/foComponent.model'; +import { foLibrary } from '../foundry/foLibrary.model'; + +export let DevSecOpsKnowledge: foLibrary = new foLibrary().defaultName('definitions'); + +function Concept(name: string, spec?: any) { + return DevSecOpsKnowledge.concepts.define(name, foComponent, spec).hide(); +} + +function Structure(name: string, spec?: any) { + return DevSecOpsKnowledge.structures.define(name, spec).hide(); +} + +function Solution(name: string, spec?: any) { + return DevSecOpsKnowledge.solutions.define(name, spec).hide(); +} + +const root = Concept('Root', { + pipelineName: 'dave' +}); + +const gitRepository = Concept('gitRepository'); +const gitOrganization = Concept('gitOrganization'); +const gitBranch = Concept('gitBranch'); + +const environment = Concept('environment'); +const workpacket = Concept('workpacket'); + +const user = Concept('user'); +const developer = Concept('developer').inheritsFrom(user); +const tester = Concept('tester').inheritsFrom(user); + +const test = Concept('test'); + +const compile = Concept('compile'); +compile.subComponent('details'); + +const stage1 = Structure('stage1').concept(compile); + +const stage2 = Structure('stage2').concept(test); + +const stage3 = Structure('stage3') + .concept(Concept('package')) + .subComponent('local'); + +const pipe = Structure('Pipeline').show() + .concept(root) + .subComponent('stage1', stage1) + .subComponent('stage2', stage2) + .subComponent('stage3', stage3); + + + Solution('DevOps').show() + .useStructure(pipe) + .subSolution('security', Solution('security')) + .subSolution('metrics', Solution('metrics')) + .subSolution('governance', Solution('governance')); +//.useStructureWhen(pipe, function(c) { return true}); diff --git a/src/app/canvas/devsecops.model.ts b/src/app/canvas/devsecops.model.ts index 7533618..e96ca48 100644 --- a/src/app/canvas/devsecops.model.ts +++ b/src/app/canvas/devsecops.model.ts @@ -1,21 +1,29 @@ -import { foLibrary } from "../foundry/foLibrary.model"; -import { foStencilLibrary } from "../foundry/foStencil"; -import { foWorkspace } from "../foundry/foWorkspace.model"; -import { foComponent } from "../foundry/foComponent.model"; -import { foModel } from "../foundry/foModel.model"; -import { foImage2D } from "../foundry/shapes/foImage2D.model"; -import { foShape3D } from "../foundry/solids/foShape3D.model"; -import { foShape2D } from "./particle.model"; +import { foStencilLibrary } from '../foundry/foStencil'; +import { foWorkspace } from '../foundry/foWorkspace.model'; + +import { foModel } from '../foundry/foModel.model'; +import { foImage2D } from '../foundry/shapes/foImage2D.model'; +import { foInputText2D } from '../foundry/shapes/foText2D.model'; +import { foShape2D } from '../foundry/shapes/foShape2D.model'; +import { foShape3D } from '../foundry/solids/foShape3D.model'; +//import { foShape2D } from "./particle.model"; import { iPoint2D } from '../foundry/foInterface'; import { foGlyph2D } from '../foundry/shapes/foGlyph2D.model'; import { foPath2D } from '../foundry/shapes/foPath2D.model'; +import { DevSecOpsKnowledge } from './devsecops.knowledge'; +export { DevSecOpsKnowledge } from './devsecops.knowledge'; + +import { RuntimeType } from '../foundry/foRuntimeType'; + + -export let DevSecOpsKnowledge: foLibrary = new foLibrary().defaultName('definitions'); export let DevSecOpsShapes: foStencilLibrary = new foStencilLibrary().defaultName('shapes'); + export let DevSecOpsSolids: foStencilLibrary = new foStencilLibrary().defaultName('solids'); + export let DevSecOps: foWorkspace = new foWorkspace().defaultName('Dev Sec Ops'); DevSecOps.library.add(DevSecOpsKnowledge); @@ -25,54 +33,70 @@ DevSecOps.stencil.add(DevSecOpsSolids); DevSecOps.context.define('DevOpsFactory', foModel, { title: 'Understand DevSecOps', subtitle: 'Strutured Flexability' -}) +}); + +DevSecOpsShapes.define('Text', foInputText2D, { + text: 'Understand DevSecOps', + fontSize: 30 +}); DevSecOpsShapes.define('Image', foImage2D, { background: 'green', - imageURL: "https://lorempixel.com/900/500?r=2", + imageURL: 'https://lorempixel.com/900/500?r=2', width: 400, height: 250 }); class shapeDevOps extends foShape2D { + doAnimation = () => {}; + + public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { + this.doAnimation(); + super.render(ctx, deep); + } + public drawSelected = (ctx: CanvasRenderingContext2D): void => { - ctx.strokeStyle = "red"; + ctx.strokeStyle = 'red'; ctx.lineWidth = 4; this.drawOutline(ctx); - //this.drawHandles(ctx); - //this.drawConnectionPoints(ctx); this.drawPin(ctx); } findObjectUnderPoint(hit: iPoint2D, deep: boolean): foGlyph2D { - let found: foGlyph2D = this.hitTest(hit) ? this : undefined; - - // if (deep) { - // let child = this.findChildObjectUnderPoint(hit); - // found = child ? child : found; - // } + const found: foGlyph2D = this.hitTest(hit) ? this : undefined; return found; } } -let core = DevSecOpsShapes.mixin('core', { +const core = DevSecOpsShapes.mixin('core', { color: 'blue', - opacity: .5, + opacity: 0.5, width: 50, height: 50 }); -DevSecOpsShapes.define('Heart', foPath2D, { - scale: 2, +DevSecOpsShapes.define('Heart', foPath2D, { + scale: 2 +}).mixin(core); + +DevSecOpsShapes.define('rocket', foPath2D, { + path: + // tslint:disable-next-line:max-line-length + 'M 201.2 222.1 C 210 216.5 218.6 210.1 225.7 203 C 249.9 178.8 252.6 157.5 250.1 149.9 C 253.7 146.3 257.3 142.7 260.9 139.1 C 261.9 138.1 261.9 136.5 260.9 135.5 C 259.9 134.5 258.3 134.5 257.3 135.5 C 253.7 139.1 250.1 142.7 246.5 146.3 C 238.9 143.8 217.6 146.5 193.4 170.7 C 186.3 177.8 179.9 186.4 174.3 195.2 C 166.2 193.2 152.1 193.2 142.3 204.1 C 131.1 216.4 137.7 228.1 140.2 225.7 C 142.2 223.6 145.6 211.3 160.4 220.8 C 158 225.8 158.1 228.9 159.7 230.4 C 161.8 232.5 163.9 234.6 166 236.7 C 167.6 238.3 170.6 238.5 175.7 236 C 185.1 250.8 172.8 254.2 170.8 256.3 C 168.3 258.7 180 265.3 192.3 254.1 C 203.2 244.3 203.2 230.2 201.2 222.1M 216.5 179.9 C 212.9 176.3 212.9 170.3 216.5 166.7 C 220.2 163 226.1 163 229.7 166.7 C 233.4 170.4 233.4 176.2 229.7 179.9 C 226.1 183.5 220.2 183.5 216.5 179.9M 156.4 233.5 C 156.4 233.5 146.4 235.3 142.7 253.7 C 161.1 250.1 162.9 240 162.9 240 C 160.8 237.8 158.6 235.7 156.4 233.5z' }).mixin(core); -DevSecOpsShapes.define('rocket', foPath2D, { - path: "M 201.2 222.1 C 210 216.5 218.6 210.1 225.7 203 C 249.9 178.8 252.6 157.5 250.1 149.9 C 253.7 146.3 257.3 142.7 260.9 139.1 C 261.9 138.1 261.9 136.5 260.9 135.5 C 259.9 134.5 258.3 134.5 257.3 135.5 C 253.7 139.1 250.1 142.7 246.5 146.3 C 238.9 143.8 217.6 146.5 193.4 170.7 C 186.3 177.8 179.9 186.4 174.3 195.2 C 166.2 193.2 152.1 193.2 142.3 204.1 C 131.1 216.4 137.7 228.1 140.2 225.7 C 142.2 223.6 145.6 211.3 160.4 220.8 C 158 225.8 158.1 228.9 159.7 230.4 C 161.8 232.5 163.9 234.6 166 236.7 C 167.6 238.3 170.6 238.5 175.7 236 C 185.1 250.8 172.8 254.2 170.8 256.3 C 168.3 258.7 180 265.3 192.3 254.1 C 203.2 244.3 203.2 230.2 201.2 222.1M 216.5 179.9 C 212.9 176.3 212.9 170.3 216.5 166.7 C 220.2 163 226.1 163 229.7 166.7 C 233.4 170.4 233.4 176.2 229.7 179.9 C 226.1 183.5 220.2 183.5 216.5 179.9M 156.4 233.5 C 156.4 233.5 146.4 235.3 142.7 253.7 C 161.1 250.1 162.9 240 162.9 240 C 160.8 237.8 158.6 235.7 156.4 233.5z", +DevSecOpsShapes.define('body', foPath2D, { + path: + // tslint:disable-next-line:max-line-length + 'M13.38,201.93a101.41,101.41,0,0,1,2-19.62,99.45,99.45,0,0,1,27-50.85,96.1,96.1,0,0,1,21.5-16.3c1.32-.74,2-.19,2.86.56a64,64,0,0,0,82.22.46l2-1.62c34.2,17.57,52.4,55.17,51.68,87.36Z' +}).mixin(core); +DevSecOpsShapes.define('head', foPath2D, { + path: + 'M55.62,66.49c-.22-28.7,23.73-52.88,53.65-52.41,28,.44,51.48,24.15,51.41,52.53a52.53,52.53,0,1,1-105.06-.13Z' }).mixin(core); class shapeUI extends shapeDevOps { - drawTriangle(ctx: CanvasRenderingContext2D, x1, y1, x2, y2, x3, y3) { ctx.beginPath(); ctx.moveTo(x1, y1); @@ -86,7 +110,15 @@ class shapeUI extends shapeDevOps { ctx.fillStyle = this.color; ctx.lineWidth = 1; ctx.globalAlpha = this.opacity; - this.drawTriangle(ctx, 0, this.height, this.width / 2, 0, this.width, this.height); + this.drawTriangle( + ctx, + 0, + this.height, + this.width / 2, + 0, + this.width, + this.height + ); } } @@ -113,19 +145,18 @@ class shapeEnv extends shapeDevOps { ctx.lineWidth = 1; ctx.globalAlpha = this.opacity; ctx.fillRect(0, this.height / 2, this.width, this.height / 2); - this.drawSemiCircle(ctx, this.width / 2, this.height / 2, this.radius) + this.drawSemiCircle(ctx, this.width / 2, this.height / 2, this.radius); } } DevSecOpsShapes.define('Env', shapeEnv, { - radius: 10, + radius: 10 }).mixin(core); - class shapeInvEnv extends shapeDevOps { radius: number; drawSemiCircle(ctx: CanvasRenderingContext2D, x, y, r) { - ctx.save() + ctx.save(); ctx.fillStyle = 'white'; ctx.beginPath(); ctx.arc(x, y, r, 0, 2 * Math.PI); @@ -139,16 +170,15 @@ class shapeInvEnv extends shapeDevOps { ctx.lineWidth = 1; ctx.globalAlpha = this.opacity; ctx.fillRect(0, 0, this.width, this.height / 2); - this.drawSemiCircle(ctx, this.width / 2, this.height / 2, this.radius) + this.drawSemiCircle(ctx, this.width / 2, this.height / 2, this.radius); } } DevSecOpsShapes.define('InvEnv', shapeInvEnv, { - radius: 10, + radius: 10 }).mixin(core); class shapeData extends shapeDevOps { - drawCircle(ctx: CanvasRenderingContext2D, r) { ctx.beginPath(); ctx.arc(this.width / 2, this.height / 2, r, 0, 2 * Math.PI); @@ -160,83 +190,159 @@ class shapeData extends shapeDevOps { ctx.fillStyle = this.color; ctx.strokeStyle = this.color; ctx.lineWidth = 1; - this.drawCircle(ctx, this.width / 2) + this.drawCircle(ctx, this.width / 2); } } -DevSecOpsShapes.define('UI', shapeUI, { -}).mixin(core); +DevSecOpsShapes.define('UI', shapeUI, {}).mixin(core); -DevSecOpsShapes.define('Service', shapeService, { -}).mixin(core); - -DevSecOpsShapes.define('Data', shapeData, { -}).mixin(core); +DevSecOpsShapes.define('Service', shapeService, {}).mixin(core); +DevSecOpsShapes.define('Data', shapeData, {}).mixin(core); class shapeApp extends shapeDevOps { + //override the storage of subcomponents because + //they get created during on creation + public deHydrate(context?: any, deep: boolean = false) { + return super.deHydrate(context, false); + } } DevSecOpsShapes.define('App', shapeApp, { - color: 'cyan', + color: 'cyan' }).onCreation(obj => { - - let UI = DevSecOpsShapes.find('UI').makeComponent(obj); - let Service = DevSecOpsShapes.find('Service').makeComponent(obj); - let Data = DevSecOpsShapes.find('Data').makeComponent(obj); - let InvEnv = DevSecOpsShapes.find('InvEnv').makeComponent(obj); + //with predefined names, save and restore is easire + const UI = DevSecOpsShapes.find('UI') + .makeComponent(obj) + .setName('UI'); + const Service = DevSecOpsShapes.find('Service') + .makeComponent(obj) + .setName('Service'); + const Data = DevSecOpsShapes.find('Data') + .makeComponent(obj) + .setName('Data'); + const InvEnv = DevSecOpsShapes.find('InvEnv') + .makeComponent(obj) + .setName('InvEnv'); obj.width = 1.3 * UI.width; obj.height = 3.3 * UI.height; - let x = obj.width / 2; - let y = obj.height / 6; + const x = obj.width / 2; + const y = obj.height / 6; UI.dropAt(x, 1 * y); Service.dropAt(x, 3 * y); Data.dropAt(x, 5 * y); InvEnv.dropAt(x, 7 * y); -}) + UI.doAnimation = function(): void { + let angle = this.angle + 2; + angle = angle >= 360 ? 0 : angle; + this.angle = angle; + }; +}); DevSecOpsSolids.define('red box', foShape3D, { color: 'red', - opacity: .5, + opacity: 0.5, width: 100, height: 400, depth: 900 -}) - - - -function getConcept(name: string, spec?: any) { - return DevSecOpsKnowledge.concepts.define(name, foComponent, spec).hide(); -} -let root = getConcept('Root', { - pipelineName: 'dave', }); -let compile = getConcept('compile'); -compile.subComponent('details', {}) -let s1 = DevSecOpsKnowledge.structures.define('stage1', {}) - .concept(compile).hide(); -let s2 = DevSecOpsKnowledge.structures.define('stage2', {}) - .concept(getConcept('test')).hide(); -let s3 = DevSecOpsKnowledge.structures.define('stage3', {}) - .concept(getConcept('package')).hide() - .subComponent('local', {}) +class legoCore extends foShape2D { + description: string; + size: string = '0:0'; + + constructor(properties?: any) { + super(properties); + this.description = this.myType; + + this.override({ + height: function() { + // tslint:disable-next-line:radix + const size = parseInt(this.size.split(':')[1]); + return 25 * size; + }, + width: function() { + // tslint:disable-next-line:radix + const size = parseInt(this.size.split(':')[0]); + return 25 * size; + } + }); + } -let pipe = DevSecOpsKnowledge.structures.define('Pipeline', { -}).concept(root) - .subComponent('s1', s1) - .subComponent('s2', s2) - .subComponent('s3', s3) + doAnimation = () => {}; + public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { + this.doAnimation(); + super.render(ctx, deep); + } -DevSecOpsKnowledge.solutions.define('DevOps') - .useStructure(pipe) - .subSolution('security', DevSecOpsKnowledge.solutions.define('security').hide()) - .subSolution('metrics', DevSecOpsKnowledge.solutions.define('metrics').hide()) - .subSolution('governance', DevSecOpsKnowledge.solutions.define('governance').hide()) - //.useStructureWhen(pipe, function(c) { return true}); + public postDraw = (ctx: CanvasRenderingContext2D): void => { + this.drawPin(ctx); + } +} + +class TwoByFour extends legoCore { + public pinX = (): number => { + return 0 * this.width / 2; + } + public pinY = (): number => { + return 1 * this.height / 2; + } + constructor(properties?: any) { + super(properties); + this.size = '2:4'; + } + doAnimation = function(): void { + let angle = this.angle + 5; + angle = angle >= 360 ? 0 : angle; + this.angle = angle; + }; +} +RuntimeType.define(TwoByFour); +class TenByTen extends legoCore { + constructor(properties?: any) { + super(properties); + this.size = '10:10'; + } +} +RuntimeType.define(TenByTen); + +DevSecOpsShapes.factory('animation', (spec?: any) => { + const results = Array(); + + const shape = RuntimeType.create(TenByTen, { + myGuid: spec && spec.shape, + opacity: 0.5, + color: 'gray', + angle: 10 + }) + .dropAt(600, 300) + .pushTo(results) + .defaultName(); + + const subShape = RuntimeType.create(TwoByFour, { + myGuid: spec && spec.subShape, + color: 'red' + }) + .addAsSubcomponent(shape, { + x: function() { + return shape.width / 4; + }, + y: 150, + angle: 0 + }) + .setName('spinner'); + + // subShape.doAnimation = function (): void { + // let angle = this.angle + 5; + // angle = angle >= 360 ? 0 : angle; + // this.angle = angle; + // } + + return results; +}); diff --git a/src/app/canvas/domain.component.html b/src/app/canvas/domain.component.html index a82006a..9438964 100644 --- a/src/app/canvas/domain.component.html +++ b/src/app/canvas/domain.component.html @@ -2,8 +2,13 @@
@@ -38,4 +43,4 @@

{{workspace.myName}}

- + \ No newline at end of file diff --git a/src/app/canvas/domain.component.ts b/src/app/canvas/domain.component.ts index f60e4f1..590c88e 100644 --- a/src/app/canvas/domain.component.ts +++ b/src/app/canvas/domain.component.ts @@ -1,17 +1,17 @@ -import { Component, Input, OnInit, AfterViewInit, ElementRef, ViewChild, HostListener } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; -import { Tools } from "../foundry/foTools"; +import { globalWorkspace, foWorkspace } from '../foundry/foWorkspace.model'; +import { foModel } from '../foundry/foModel.model'; -import { globalWorkspace, foWorkspace } from "../foundry/foWorkspace.model"; -import { foPage } from "../foundry/shapes/foPage.model"; -import { foModel } from "../foundry/foModel.model"; - -import { SharingService } from "../common/sharing.service"; -import { Lifecycle, foLifecycleEvent, Knowcycle } from "../foundry/foLifecycle"; - -import { DevSecOpsKnowledge, DevSecOpsShapes, DevSecOpsSolids } from "./devsecops.model"; +import { SharingService } from '../common/sharing.service'; +import { Toast } from '../common/emitter.service'; +import { + DevSecOpsKnowledge, + DevSecOpsShapes, + DevSecOpsSolids +} from './devsecops.model'; @Component({ selector: 'fo-domain', @@ -19,22 +19,40 @@ import { DevSecOpsKnowledge, DevSecOpsShapes, DevSecOpsSolids } from "./devsecop styleUrls: ['./domain.component.css'] }) export class DomainComponent implements OnInit { - workspace: foWorkspace = globalWorkspace; model: foModel; - - constructor( - private sharing: SharingService) { - } + + constructor() {} ngOnInit() { - + globalWorkspace.setName('Domain Model'); this.workspace.stencil.add(DevSecOpsShapes); this.workspace.stencil.add(DevSecOpsSolids); this.workspace.library.add(DevSecOpsKnowledge); - this.workspace.model.addItem('default', new foModel({})); - this.model = this.workspace.model.getItem('default') + this.model = new foModel().defaultName('Domain Model'); + this.workspace.model.addItem('default', this.model); } + doSave() { + this.workspace.SaveInstanceAs( + this.model, + this.model.myName, + '.json', + result => { + Toast.info('saved', result.filename); + } + ); + } + + doOpen() { + this.workspace.openFile(result => { + Toast.info('open', result.filename); + this.workspace.reHydratePayload(result.payload); + }); + } + + doClear() { + this.model.clearAll(); + } } diff --git a/src/app/canvas/domain.model.ts b/src/app/canvas/domain.model.ts index 52d0ea4..fabc002 100644 --- a/src/app/canvas/domain.model.ts +++ b/src/app/canvas/domain.model.ts @@ -1,6 +1,6 @@ -import { foLibrary } from "../foundry/foLibrary.model"; -import { foComponent } from "../foundry/foComponent.model"; +import { foLibrary } from '../foundry/foLibrary.model'; +import { foComponent } from '../foundry/foComponent.model'; //import { RuntimeType } from '../foundry/foRuntimeType'; export let PersonDomain: foLibrary = new foLibrary().defaultName(); diff --git a/src/app/canvas/drawing.component.ts b/src/app/canvas/drawing.component.ts index e55909d..f64bd81 100644 --- a/src/app/canvas/drawing.component.ts +++ b/src/app/canvas/drawing.component.ts @@ -1,42 +1,47 @@ -import { Component, Input, OnInit, AfterViewInit, ElementRef, ViewChild, HostListener } from '@angular/core'; +import { + Component, + Input, + OnInit, + AfterViewInit, + ElementRef, + ViewChild, + HostListener +} from '@angular/core'; -import { Tools } from "../foundry/foTools"; +import { Tools } from '../foundry/foTools'; -import { globalWorkspace, foWorkspace } from "../foundry/foWorkspace.model"; -import { foPage } from "../foundry/shapes/foPage.model"; -import { foModel } from "../foundry/foModel.model"; +import { globalWorkspace, foWorkspace } from '../foundry/foWorkspace.model'; +import { foPage } from '../foundry/shapes/foPage.model'; +import { foModel } from '../foundry/foModel.model'; -import { Screen2D } from "../foundry/shapes/canvasDriver"; -import { Screen3D } from "../foundry/solids/threeDriver"; +import { Screen2D } from '../foundry/shapes/canvasDriver'; +import { Screen3D } from '../foundry/solids/threeDriver'; import { BroadcastChange } from '../foundry/foChange'; import { cPoint2D } from '../foundry/shapes/foGeometry2D'; -import { foGlyph2D } from "../foundry/shapes/foGlyph2D.model"; -import { foShape3D } from "../foundry/solids/foShape3D.model"; +import { foGlyph2D } from '../foundry/shapes/foGlyph2D.model'; +import { foShape3D } from '../foundry/solids/foShape3D.model'; -import { SharingService } from "../common/sharing.service"; -import { Lifecycle, foLifecycleEvent, Knowcycle } from "../foundry/foLifecycle"; +import { SharingService } from '../common/sharing.service'; +import { Lifecycle, foLifecycleEvent, Knowcycle } from '../foundry/foLifecycle'; import { foChangeEvent } from '../foundry/foChange'; import { foDocument } from '../foundry/shapes/foDocument.model'; import { foStudio } from '../foundry/solids/foStudio.model'; import { foStage } from '../foundry/solids/foStage.model'; - -import { ParticleStencil, foShape2D } from "./particle.model"; -import { ShapeStencil } from "./shapes.model"; -import { PersonDomain } from "./domain.model"; +import { ParticleStencil, foShape2D } from './particle.model'; +import { ShapeStencil } from './shapes.model'; +import { PersonDomain } from './domain.model'; import { foGlue2D } from '../foundry/shapes/foGlue2D'; import { filter } from 'rxjs/operators'; -import { SolidStencil } from "./solids.model"; - - - //using tween - //https://greensock.com/forums/topic/12406-make-threejs-object-invisible/ +import { SolidStencil } from './solids.model'; - //https://www.npmjs.com/package/modular-three +//using tween +//https://greensock.com/forums/topic/12406-make-threejs-object-invisible/ +//https://www.npmjs.com/package/modular-three @Component({ selector: 'foundry-drawing', @@ -45,20 +50,16 @@ import { SolidStencil } from "./solids.model"; }) export class DrawingComponent implements OnInit, AfterViewInit { label: string = 'Off'; - lifecycleEvent: Array = new Array() - changeEvent: Array = new Array() + lifecycleEvent: Array = new Array(); + changeEvent: Array = new Array(); rootWorkspace: foWorkspace = globalWorkspace.defaultName(); - @ViewChild('canvas') - public canvasRef: ElementRef; - @ViewChild('world') - public worldRef: ElementRef; + @ViewChild('canvas') public canvasRef: ElementRef; + @ViewChild('world') public worldRef: ElementRef; - @Input() - public pageWidth = 1400; - @Input() - public pageHeight = 800; + @Input() public pageWidth = 1400; + @Input() public pageHeight = 800; screen2D: Screen2D = new Screen2D(); currentDocument: foDocument; @@ -72,9 +73,7 @@ export class DrawingComponent implements OnInit, AfterViewInit { alert(event.key); } - constructor( - private sharing: SharingService) { - } + constructor(private sharing: SharingService) {} doClear() { this.currentDocument.currentPage.clearPage(); @@ -89,70 +88,68 @@ export class DrawingComponent implements OnInit, AfterViewInit { } doRefresh() { - this.currentStudio.currentStage.clearMesh(true) + this.currentStudio.currentStage.clearMesh(true); } doOnOff() { - this.label = this.screen2D.toggleOnOff() ? "On" : "Off" + this.label = this.screen2D.toggleOnOff() ? 'On' : 'Off'; } doCamera() { - let x = 0; + const x = 0; let y = 0; - let z = 0; - let xxx = this.screen3D; + const z = 0; + const xxx = this.screen3D; function spin() { xxx.cameraSpin(x, y, z); y += 1 * foGlyph2D.DEG_TO_RAD; - y < 360 && setTimeout(spin, 100) + y < 360 && setTimeout(spin, 100); } - spin() + spin(); } doParticleEngine(page: foPage) { - ParticleStencil.find('engine') - .newInstance().defaultName() - .dropAt(500, 500).addAsSubcomponent(page) + .newInstance() + .defaultName() + .dropAt(500, 500) + .addAsSubcomponent(page) .then(item => { item.doStart(); }); } doSubShape(page: foPage) { - - let result = ShapeStencil.factories.getItem('doAddSubGlyph').run(); - result.forEach(item => { item.addAsSubcomponent(page) }); + const result = ShapeStencil.factories.getItem('doAddSubGlyph').run(); + result.forEach(item => { + item.addAsSubcomponent(page); + }); } - initLifecycle() { //Lifecycle.mute = true; - let Lifecycle2D = Lifecycle.observable.pipe(filter(e => e.object.is2D())); + const Lifecycle2D = Lifecycle.observable.pipe(filter(e => e.object.is2D())); // Lifecycle2D.subscribe(event => { // console.log(event.id, event.cmd, event.myGuid, JSON.stringify(event.value)); // }); - let glued = Lifecycle2D.pipe(filter(e => e.isCmd('glued'))); - let moved = Lifecycle2D.pipe(filter(e => e.isCmd('moved'))); - let dropped = Lifecycle2D.pipe(filter(e => e.isCmd('dropped'))); - let reparent = Lifecycle2D.pipe(filter(e => e.isCmd('reparent'))); - let created = Lifecycle2D.pipe(filter(e => e.isCmd('created') && e.value)); - let changed = Lifecycle2D.pipe(filter(e => e.isCmd('changed') && e.value)); - - + const glued = Lifecycle2D.pipe(filter(e => e.isCmd('glued'))); + const moved = Lifecycle2D.pipe(filter(e => e.isCmd('moved'))); + const dropped = Lifecycle2D.pipe(filter(e => e.isCmd('dropped'))); + const reparent = Lifecycle2D.pipe(filter(e => e.isCmd('reparent'))); + const created = Lifecycle2D.pipe(filter(e => e.isCmd('created') && e.value)); + const changed = Lifecycle2D.pipe(filter(e => e.isCmd('changed') && e.value)); glued.subscribe(event => { - let glue = event.object as foGlue2D; - let { sourceGuid, sourceName, targetGuid, targetName } = glue.signature; + const glue = event.object as foGlue2D; + const { sourceGuid, sourceName, targetGuid, targetName } = glue.signature; - this.rootWorkspace.activeStage.found(sourceGuid, (source) => { - this.rootWorkspace.activeStage.found(targetGuid, (target) => { + this.rootWorkspace.activeStage.found(sourceGuid, source => { + this.rootWorkspace.activeStage.found(targetGuid, target => { source.establishGlue(sourceName, target, targetName); }); }); - }); changed.subscribe(event => { @@ -161,95 +158,100 @@ export class DrawingComponent implements OnInit, AfterViewInit { this.currentStudio.currentStage.found(event.myGuid, item => { item.override(event.value); item.setupPreDraw(); - }) + }); }); moved.subscribe(event => { //console.log(event.id, event.cmd, event.myGuid, JSON.stringify(event.value)); this.currentStudio.currentStage.found(event.myGuid, item => { - let { x, y } = event.value; + const { x, y } = event.value; item.move(x, y); - }) + }); }); dropped.subscribe(event => { this.currentStudio.currentStage.found(event.myGuid, item => { - let { x, y } = event.value; + const { x, y } = event.value; item.dropAt(x, y, 0); - }) + }); }); reparent.subscribe(event => { - console.log(event.id, event.cmd, event.myGuid, JSON.stringify(event.value)); + console.log( + event.id, + event.cmd, + event.myGuid, + JSON.stringify(event.value) + ); this.currentStudio.currentStage.found(event.myGuid, shape => { - let parent = event.object.myParent(); - parent && this.currentStudio.currentStage.found(parent.myGuid, - (item) => { shape.reParent(item) }, - (miss) => { shape.reParent(this.currentStudio.currentStage) } - ) - }) + const parent = event.object.myParent(); + parent && + this.currentStudio.currentStage.found( + parent.myGuid, + item => { + shape.reParent(item); + }, + miss => { + shape.reParent(this.currentStudio.currentStage); + } + ); + }); }); created.subscribe(event => { - let stage = this.currentStudio.currentStage; + const stage = this.currentStudio.currentStage; stage.findItem(event.myGuid, () => { - let knowledge = event.value; + const knowledge = event.value; - let myClass = event.myClass.replace('2D::', '3D::'); - let concept = globalWorkspace.select(item => Tools.matches(item.myName, myClass)).first(); + const myClass = event.myClass.replace('2D::', '3D::'); + const concept = globalWorkspace + .select(item => Tools.matches(item.myName, myClass)) + .first(); if (concept) { - let result = concept.newInstance(event.object.asJson); + const result = concept.newInstance(event.object.asJson); stage.establishInDictionary(result); + } else { + knowledge && + knowledge.usingRuntimeType('foGlyph3D', know => { + const result = know.newInstance(event.object.asJson); + stage.establishInDictionary(result); + }); } - else { - knowledge && knowledge.usingRuntimeType('foGlyph3D', concept => { - let result = concept.newInstance(event.object.asJson); - stage.establishInDictionary(result); - }) - } - - }) - + }); }); } ngOnInit() { this.currentDocument = this.rootWorkspace.document.override({ pageWidth: this.pageWidth, - pageHeight: this.pageHeight, + pageHeight: this.pageHeight }); this.currentStudio = this.rootWorkspace.studio.override({ stageWidth: 1000, stageHeight: 1000, - stageDepth: 1000, + stageDepth: 1000 }); - this.initLifecycle(); - - let libs = this.rootWorkspace.stencil; - libs.add(ParticleStencil).displayName = "Particle"; - libs.add(ShapeStencil).displayName = "Shape"; - libs.add(SolidStencil).displayName = "Solid"; + + const libs = this.rootWorkspace.stencil; + libs.add(ParticleStencil).displayName = 'Particle'; + libs.add(ShapeStencil).displayName = 'Shape'; + libs.add(SolidStencil).displayName = 'Solid'; this.rootWorkspace.library.add(PersonDomain); this.rootWorkspace.model.addItem('default', new foModel({})); - - } - doAddPage() { this.currentDocument.createPage(); this.currentStudio.createStage(); } - doDeletePage() { - - } + doDeletePage() {} doGoToPage(page: foPage) { this.currentDocument.currentPage = page; @@ -260,7 +262,6 @@ export class DrawingComponent implements OnInit, AfterViewInit { } doSetCurrentPage(page: foPage) { - this.screen2D.clear(); //with the render function you could //1) render a single page @@ -268,26 +269,32 @@ export class DrawingComponent implements OnInit, AfterViewInit { //3) render pages side by side this.screen2D.render = (ctx: CanvasRenderingContext2D) => { page.render(ctx); - } + }; this.screen2D.go(); this.addEventHooks(page); } doSetCurrentStage(stage: foStage) { - this.screen3D.clear(); this.screen3D.render3D = (screen: Screen3D, deep: boolean = true) => { stage.render3D(screen); - } + }; this.screen3D.go(); } public ngAfterViewInit() { - - this.screen2D.setRoot(this.canvasRef.nativeElement, this.pageWidth, this.pageHeight); - this.screen3D.setRoot(this.worldRef.nativeElement, this.pageWidth, this.pageHeight); + this.screen2D.setRoot( + this.canvasRef.nativeElement, + this.pageWidth, + this.pageHeight + ); + this.screen3D.setRoot( + this.worldRef.nativeElement, + this.pageWidth, + this.pageHeight + ); this.sharing.startSharing(); @@ -300,55 +307,65 @@ export class DrawingComponent implements OnInit, AfterViewInit { } }); - setTimeout( _ => { + setTimeout(_ => { this.doSetCurrentPage(this.currentDocument.currentPage); this.doSetCurrentStage(this.currentStudio.currentStage); this.screen3D.addAxisHelper(1100).addBack(1000, 50); - }) - - - + }); } addEventHooks(page: foPage) { - - page.onItemHoverEnter = (loc: cPoint2D, shape: foGlyph2D, keys?: any): void => { + page.onItemHoverEnter = ( + loc: cPoint2D, + shape: foGlyph2D, + keys?: any + ): void => { if (shape) { - shape.drawHover = function (ctx: CanvasRenderingContext2D) { - ctx.strokeStyle = "yellow"; + shape.drawHover = function(ctx: CanvasRenderingContext2D) { + ctx.strokeStyle = 'yellow'; ctx.lineWidth = 4; shape.drawOutline(ctx); - } + }; } - } + }; - page.onItemHoverExit = (loc: cPoint2D, shape: foGlyph2D, keys?: any): void => { + page.onItemHoverExit = ( + loc: cPoint2D, + shape: foGlyph2D, + keys?: any + ): void => { if (shape) { shape.drawHover = undefined; } - } - - page.onItemOverlapEnter = (loc: cPoint2D, shape: foGlyph2D, shapeUnder: foGlyph2D, keys?: any): void => { - + }; + + page.onItemOverlapEnter = ( + loc: cPoint2D, + shape: foGlyph2D, + shapeUnder: foGlyph2D, + keys?: any + ): void => { if (shapeUnder) { - shapeUnder.drawHover = function (ctx: CanvasRenderingContext2D) { - ctx.strokeStyle = "green"; + shapeUnder.drawHover = function(ctx: CanvasRenderingContext2D) { + ctx.strokeStyle = 'green'; ctx.lineWidth = 8; shapeUnder.drawOutline(ctx); - ctx.strokeStyle = "yellow"; + ctx.strokeStyle = 'yellow'; ctx.lineWidth = 4; shapeUnder.drawOutline(ctx); - } + }; } - } - - page.onItemOverlapExit = (loc: cPoint2D, shape: foGlyph2D, shapeUnder: foGlyph2D, keys?: any): void => { - + }; + + page.onItemOverlapExit = ( + loc: cPoint2D, + shape: foGlyph2D, + shapeUnder: foGlyph2D, + keys?: any + ): void => { if (shapeUnder) { shapeUnder.drawHover = undefined; } - } - + }; } - } diff --git a/src/app/canvas/factory.model.ts b/src/app/canvas/factory.model.ts new file mode 100644 index 0000000..d5ba7e8 --- /dev/null +++ b/src/app/canvas/factory.model.ts @@ -0,0 +1,369 @@ +import { Tools } from '../foundry/foTools'; + +import { iPoint2D, Action } from '../foundry/foInterface'; +import { foGlyph2D } from '../foundry/shapes/foGlyph2D.model'; + +import { foShape2D, foText2D, foLayout2D } from '../foundry/shapes'; +import { foShape1D } from '../foundry/shapes/foShape1D.model'; + +import { foStencilLibrary } from '../foundry/foStencil'; +import { foCollection } from '../foundry/foCollection.model'; +import { foController, foToggle } from '../foundry/foController'; +import { foPage } from '../foundry/shapes/foPage.model'; + +import { foInstance, foObject } from '../foundry'; + +export { foShape1D, foConnect1D } from '../foundry/shapes/foShape1D.model'; +export { foShape2D } from '../foundry/shapes/foShape2D.model'; + +export let FactoryStencil: foStencilLibrary = new foStencilLibrary().defaultName( + 'Factory' +); + +export class PathwayMixin extends foShape1D { + doAnimation = () => {}; + public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { + this.doAnimation(); + super.render(ctx, deep); + } +} + +export class packageMixin extends foShape2D { + doAnimation = () => {}; + public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { + this.doAnimation(); + super.render(ctx, deep); + } + public drawSelected = (ctx: CanvasRenderingContext2D): void => { + ctx.strokeStyle = 'red'; + ctx.lineWidth = 4; + this.drawOutline(ctx); + this.drawPin(ctx); + } + + findObjectUnderPoint(hit: iPoint2D, deep: boolean): foGlyph2D { + const found: foGlyph2D = this.hitTest(hit) ? this : undefined; + return found; + } +} + +export class Package extends packageMixin { + stations: foCollection; + currentStation: Station; + + constructor(properties?: any) { + super(properties); + } + + doGoToNextStation() { + this.currentStation = this.stations.members.shift(); + if (this.currentStation) { + const loc = this.currentStation.getLocation(); + this.easeTween(loc, Tools.random(0.5, 2.5)); + } else { + this.easeTween({ x: 0, y: 0 }, Tools.random(0.5, 2.5)); + this.color = 'red'; + } + } + + drawTriangle(ctx: CanvasRenderingContext2D, x1, y1, x2, y2, x3, y3) { + ctx.beginPath(); + ctx.moveTo(x1, y1); + ctx.lineTo(x2, y2); + ctx.lineTo(x3, y3); + ctx.closePath(); + ctx.fill(); + } + + drawSquare(ctx: CanvasRenderingContext2D, x1, y1, x2, y2) { + ctx.beginPath(); + ctx.moveTo(x1, y1); + ctx.lineTo(x2, y1); + ctx.lineTo(x2, y2); + ctx.lineTo(x1, y2); + ctx.closePath(); + ctx.fill(); + } + + drawCircle(ctx: CanvasRenderingContext2D, x1, y1, radius: number = 100) { + ctx.beginPath(); + ctx.arc(x1, y1, radius, 0, 2 * Math.PI); + ctx.stroke(); + } + + public draw = (ctx: CanvasRenderingContext2D): void => { + ctx.fillStyle = this.color; + ctx.lineWidth = 1; + ctx.globalAlpha = this.opacity; + + this.drawSquare(ctx, 0, 0, this.width, this.height); + this.drawSelected(ctx); + }; +} + +export class stationMixin extends foShape2D { + doAnimation = () => {}; + public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { + this.doAnimation(); + super.render(ctx, deep); + } + public drawSelected = (ctx: CanvasRenderingContext2D): void => { + ctx.strokeStyle = 'red'; + ctx.lineWidth = 4; + this.drawOutline(ctx); + this.drawPin(ctx); + }; + + findObjectUnderPoint(hit: iPoint2D, deep: boolean): foGlyph2D { + const found: foGlyph2D = this.hitTest(hit) ? this : undefined; + return found; + } +} + +export class Station extends stationMixin { + constructor(properties?: any) { + super(properties); + } + + drawSquare(ctx: CanvasRenderingContext2D, x1, y1, x2, y2) { + ctx.beginPath(); + ctx.moveTo(x1, y1); + ctx.lineTo(x2, y1); + ctx.lineTo(x2, y2); + ctx.lineTo(x1, y2); + ctx.closePath(); + ctx.fill(); + } + + drawCircle(ctx: CanvasRenderingContext2D, x1, y1, radius: number = 100) { + ctx.beginPath(); + ctx.arc(x1, y1, radius, 0, 2 * Math.PI); + ctx.stroke(); + } + + public draw = (ctx: CanvasRenderingContext2D): void => { + ctx.fillStyle = this.color; + ctx.lineWidth = 1; + ctx.globalAlpha = this.opacity; + + this.drawSquare(ctx, 0, 0, this.width, this.height); + this.drawCircle(ctx, this.pinX(), this.pinY(), this.width / 2); + }; +} + +export class EnvironmentMixin extends foText2D { + doAnimation = () => {}; + public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { + this.doAnimation(); + super.render(ctx, deep); + } + public drawSelected = (ctx: CanvasRenderingContext2D): void => { + ctx.strokeStyle = 'red'; + ctx.lineWidth = 4; + this.drawOutline(ctx); + this.drawPin(ctx); + }; + + findObjectUnderPoint(hit: iPoint2D, deep: boolean): foGlyph2D { + const found: foGlyph2D = this.hitTest(hit) ? this : undefined; + return found; + } +} + +export class Environment extends EnvironmentMixin { + constructor(properties?: any) { + super(properties); + this.fontSize = 24; + } + + drawSquare(ctx: CanvasRenderingContext2D, x1, y1, x2, y2) { + ctx.beginPath(); + ctx.moveTo(x1, y1); + ctx.lineTo(x2, y1); + ctx.lineTo(x2, y2); + ctx.lineTo(x1, y2); + ctx.closePath(); + ctx.fill(); + } + + drawCircle(ctx: CanvasRenderingContext2D, x1, y1, radius: number = 100) { + ctx.beginPath(); + ctx.arc(x1, y1, radius, 0, 2 * Math.PI); + ctx.stroke(); + } + + public draw = (ctx: CanvasRenderingContext2D): void => { + ctx.fillStyle = this.color; + ctx.lineWidth = 1; + ctx.globalAlpha = this.opacity; + + this.drawSquare(ctx, 0, 0, this.width, this.height); + this.drawCircle(ctx, this.pinX(), this.pinY(), this.width / 2); + this.drawText(ctx); + // this.renderText(ctx, 'show me more', -20, -30); + }; +} + +FactoryStencil.define('Package', Package, { + color: 'green', + opacity: 0.5, + width: 50, + height: 50 +}).onCreation(obj => {}); + +FactoryStencil.define('Station', Station, { + color: 'blue', + opacity: 0.5, + width: 150, + height: 150 +}).onCreation(obj => {}); + +FactoryStencil.define('Environment', Environment, { + background: 'orange', + color: 'blue', + width: 100, + height: 100 +}).onCreation(obj => {}); + +class layoutFactory extends foLayout2D { + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, subcomponents, parent); + } + + generateLayout() { + this.width = 100; + this.height = 100; + this.setDirection(0); + this.setCursorXY(0, this.height / 2); + this.addPoint('start'); + + const list = 'local;development;testing;staging;production;training'.split(';'); + list.forEach(item => { + this.moveCursor(150); + this.addPoint(item); + }); + + this.fitSizeToPoints(); + + } +} + +class factoryController extends foController { + lastLayout: foLayout2D; + + createStation(page: foPage, count: number = 1): foCollection { + const list: foCollection = new foCollection(); + const knowledge = FactoryStencil.find('Station'); + for (let i = 0; i < count; i++) { + const result = knowledge.newInstance().defaultName() as Station; + result.addAsSubcomponent(page).pushTo(list); + } + return list; + } + + createPackage(page: foPage, count: number = 1): foCollection { + const list: foCollection = new foCollection(); + const knowledge = FactoryStencil.find('Package'); + for (let i = 0; i < count; i++) { + const result = knowledge.newInstance().defaultName() as Package; + result.addAsSubcomponent(page).pushTo(list); + } + return list; + } + + buildFactory(page: foPage) { + if (!this.lastLayout) return; + + const grid = this.lastLayout.getPointsXY(); + const list = this.createStation(page, grid.length); + let i = 0; + list.forEach(item => { + item.easeTween(grid[i++], Tools.random(0.5, 2.5)); + }); + this.lastLayout = undefined; + } + + buildGrid(page: foPage) { + const layout: foLayout2D = new layoutFactory(); + layout.generateGrid('f1', 0, 100, 3, 0, 100, 4); + layout.setCursorXY(20, 20); + layout.addPoint('drop here'); + + layout.fitSizeToPoints(); + page.addSubcomponent(layout); + this.lastLayout = layout; + } + + buildLayout(page: foPage): foGlyph { + const layout: layoutFactory = new layoutFactory(); + layout.generateLayout(); + + + layout.fitSizeToPoints(); + page.addSubcomponent(layout); + this.lastLayout = layout; + return layout; + } + + runFactory(page: foPage) { + const stations = page.selectGlyph(item => + Tools.matches(item.myClass, 'Station') + ); + + const list = this.createPackage(page, 1); + + list.forEach(item => { + item.stations = >stations; + }); + + const packages = page.selectGlyph(item => + Tools.matches(item.myClass, 'Package') + ); + packages.forEach(item => { + (item).doGoToNextStation(); + }); + } + + renderView( + obj: foInstance, + viewParent: foShape2D, + grid: Array + ): foShape2D { + const knowledge = FactoryStencil.find('Environment'); + const result = knowledge + .newInstance({ myGuid: obj.myGuid, text: obj.myName, fontSize: 50 }) + .defaultName() as Environment; + + result.addAsSubcomponent(viewParent); + + const loc = grid.shift(); + result.easeTween(loc, 0.5); + + obj.nodes.forEach(item => { + this.renderView(item, result, grid); + }); + + return result; + } + + renderModel(page: foPage, model: foInstance) { + const layout: foLayout2D = new foLayout2D(); + const grid = layout + .generateGrid('factory', 100, 210, 3, 200, 200, 2) + .getPointsXY(); + + this.renderView(model, page, grid); + } +} + +export let factoryBehaviour: factoryController = new factoryController().defaultName( + 'Factory' +); + +import { RuntimeType } from '../foundry/foRuntimeType'; +import { foGlyph } from '../foundry/foGlyph.model'; +RuntimeType.define(Package); diff --git a/src/app/canvas/stage.component.ts b/src/app/canvas/stage.component.ts index aa5c1ef..7b77a6f 100644 --- a/src/app/canvas/stage.component.ts +++ b/src/app/canvas/stage.component.ts @@ -60,7 +60,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { private http: Http) { super(); - this.myName = 'Page 1' + this.myName = 'Page 1'; globalWorkspace.document.currentPage = this; } @@ -81,17 +81,17 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { } doVert() { - let pt = new cPoint2D(100, 150); + const pt = new cPoint2D(100, 150); this.layoutSubcomponentsVertical(false, 2).nodes.forEach(item => { item.moveBy(pt); - }) + }); } doHorz() { - let pt = new cPoint2D(100, 150); + const pt = new cPoint2D(100, 150); this.layoutSubcomponentsHorizontal(false, 2).nodes.forEach(item => { item.moveBy(pt); - }) + }); } addEventHooks() { @@ -107,9 +107,9 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { ctx.strokeStyle = 'yellow'; ctx.lineWidth = 4; shape.drawOutline(ctx); - } + }; } - } + }; this.onItemHoverExit = (loc: cPoint2D, shape: foGlyph2D, keys?: any): void => { @@ -121,7 +121,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { if (shape) { shape.drawHover = undefined; } - } + }; this.onItemOverlapEnter = (loc: cPoint2D, shape: foGlyph2D, shapeUnder: foGlyph2D, keys?: any): void => { @@ -138,9 +138,9 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { ctx.strokeStyle = 'yellow'; ctx.lineWidth = 4; shapeUnder.drawOutline(ctx); - } + }; } - } + }; this.onItemOverlapExit = (loc: cPoint2D, shape: foGlyph2D, shapeUnder: foGlyph2D, keys?: any): void => { @@ -152,7 +152,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { if (shapeUnder) { shapeUnder.drawHover = undefined; } - } + }; this.onHandleHoverEnter = (loc: cPoint2D, handle: foHandle2D, keys?: any): void => { //let shape = handle.myParentGlyph(); @@ -164,7 +164,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { this.message.push(`Handle Hover (${loc.x},${loc.y}) Enter ${handle && handle.myName}`); handle && this.message.push(handle.globalToLocal(loc.x, loc.y)); //this.message.push(handle); - } + }; this.onTrackHandles = (loc: cPoint2D, handles: foCollection, keys?: any): void => { this.message = []; @@ -174,9 +174,9 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { //} this.message.push(`onTrackHandles (${loc.x},${loc.y}) Move ${handle && handle.myName}`); handle && this.message.push(handle.globalToLocal(loc.x, loc.y)); - }) + }); - } + }; this.onHandleMoving = (loc: cPoint2D, handle: foHandle2D, keys?: any): void => { //let shape = handle.myParentGlyph(); @@ -188,7 +188,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { this.message.push(`Handle Hover (${loc.x},${loc.y}) Move ${handle && handle.myName}`); handle && this.message.push(handle.globalToLocal(loc.x, loc.y)); //this.message.push(handle); - } + }; this.onHandleHoverExit = (loc: cPoint2D, handle: foHandle2D, keys?: any): void => { //let shape = handle.myParentGlyph(); @@ -201,7 +201,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { handle && this.message.push(handle.globalToLocal(loc.x, loc.y)); //this.message.push(handle); - } + }; } ngOnInit() { @@ -212,9 +212,9 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { this.addEventHooks(); Lifecycle.observable.subscribe(event => { - console.log(event.id, event.cmd, event.myGuid, JSON.stringify(event.value)); + //console.log(event.id, event.cmd, event.myGuid, JSON.stringify(event.value)); //Toast.info(event.cmd, event.myGuid ) - }) + }); // this.onItemChangedParent = (shape: foGlyph): void => { // //this.sharing.syncParent(shape); @@ -226,9 +226,9 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { this.onMouseLocationChanged = (loc: cPoint2D, state: string, keys?: any): void => { this.mouseLoc = loc; - this.mouseLoc.state = state; 212 + this.mouseLoc.state = state; 212; this.mouseLoc.keys = keys; - } + }; Stencil.define('lego', ThreeByThreeCircle); @@ -253,7 +253,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { item.doStart(); }); - let def = Stencil.define('particle', particleEngine, { + const def = Stencil.define('particle', particleEngine, { color: 'white', particleCount: 100, opacity: .1, @@ -343,9 +343,9 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { angle: Tools.randomInt(0, 300) }).addAsSubcomponent(this); - let place = { x: 800 + Tools.randomInt(-70, 70), y: 200 + Tools.randomInt(-70, 70) } + let place = { x: 800 + Tools.randomInt(-70, 70), y: 200 + Tools.randomInt(-70, 70) }; picture.easeTween(place, 1.5); - }) + }); } for (let i = 0; i < 8; i++) { @@ -354,9 +354,9 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { picture.angle = Tools.randomInt(0, 300); //created forces a broadast of latest state - let place = { x: 700 + Tools.randomInt(-70, 70), y: 300 + Tools.randomInt(-70, 70) } + let place = { x: 700 + Tools.randomInt(-70, 70), y: 300 + Tools.randomInt(-70, 70) }; picture.easeTween(place, 2.5); - }) + }); } @@ -373,7 +373,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { let size = { width: 200, height: 200, - } + }; image.easeTween(size, 2.8, 'easeInOut'); @@ -475,27 +475,27 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { Tools.forEachKeyValue(item, (key, value) => { let attr = attribute.newInstance({ context: key, - text: function () { return this.context + ' : ' } + text: function () { return this.context + ' : '; } }).addAsSubcomponent(body); formula.newInstance({ context: value, - text: function () { return this.context } + text: function () { return this.context; } }).addAsSubcomponent(attr); setTimeout(() => { attr.layoutMarginRight(); - }, 10) + }, 10); }); setTimeout(() => { - body.layoutMarginTop() - }, 10) + body.layoutMarginTop(); + }, 10); }); setTimeout(() => { - this.layoutSubcomponentsVertical(false) - }, 10) + this.layoutSubcomponentsVertical(false); + }, 10); }); @@ -516,7 +516,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { thickness: 1, }); - let list = ['Steve', 'Stu', 'Don', 'Linda', 'Anne', 'Debra', 'Evan']; + const list = ['Steve', 'Stu', 'Don', 'Linda', 'Anne', 'Debra', 'Evan']; let objects = []; let y = 100; @@ -530,19 +530,19 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { }).dropAt(350, y).addAsSubcomponent(this); y += 50; - objects.push(shape) + objects.push(shape); //foObject.jsonAlert(shape.asJson); if (!last) { last = shape; } else { - let wire = wireConcept.newInstance().addAsSubcomponent(this); + const wire = wireConcept.newInstance().addAsSubcomponent(this); wire.glueStartTo(last, shape2DNames.bottom); wire.glueFinishTo(shape, shape2DNames.top); last = shape; } - }) + }); // objects.forEach(shape => { @@ -557,21 +557,21 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { } doConnector2D() { - let def = Stencil.define('glue::shape', foShape2D, { + const def = Stencil.define('glue::shape', foShape2D, { color: 'blue', width: 200, height: 150, }); - let shape1 = def.newInstance().dropAt(300, 200).addAsSubcomponent(this); - let shape2 = def.newInstance().dropAt(600, 200).addAsSubcomponent(this); + const shape1 = def.newInstance().dropAt(300, 200).addAsSubcomponent(this); + const shape2 = def.newInstance().dropAt(600, 200).addAsSubcomponent(this); - let cord = Stencil.define('glue::line', foShape1D, { + const cord = Stencil.define('glue::line', foShape1D, { color: 'red', height: 15, }); - let wire = cord.newInstance().addAsSubcomponent(this); + const wire = cord.newInstance().addAsSubcomponent(this); wire.glueStartTo(shape1, shape2DNames.right); @@ -590,7 +590,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { } doAddSubGlyph() { - let shape = RuntimeType.create(foGlyph2D, { + const shape = RuntimeType.create(foGlyph2D, { color: 'purple', height: 150, width: 200, @@ -606,7 +606,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { } doAddThreeByThree() { - let def = Stencil.define('my', ThreeByThreeCircle, { + const def = Stencil.define('my', ThreeByThreeCircle, { color: 'coral', x: 400, y: 400, @@ -618,7 +618,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { doAddOneByOne() { - let shape = RuntimeType.create(OneByOne, { + const shape = RuntimeType.create(OneByOne, { color: 'red', x: 200, y: 200, @@ -627,7 +627,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { } doAddTwoByOne() { - let shape = RuntimeType.create(TwoByOne, { + const shape = RuntimeType.create(TwoByOne, { color: 'cyan' }); this.addSubcomponent(shape); @@ -647,8 +647,8 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { doAddTwoByFour(properties?: any) { class localTwoByFour extends TwoByFour { - public pinX = (): number => { return 0.5 * this.width; } - public pinY = (): number => { return 0.5 * this.height; } + public pinX = (): number => { return 0.5 * this.width; }; + public pinY = (): number => { return 0.5 * this.height; }; } RuntimeType.define(localTwoByFour); @@ -666,7 +666,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { } doAddOneByTen() { - let shape = RuntimeType.create(OneByTen, { + const shape = RuntimeType.create(OneByTen, { color: 'yellow', // height: 10, // width: function (): number { return this.height / 4; }, @@ -681,7 +681,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { } doAddTenByTen() { - let shape = RuntimeType.create(TenByTen, { + const shape = RuntimeType.create(TenByTen, { color: 'gray' }).dropAt(600, 300); @@ -690,14 +690,14 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { doAddStack(properties?: any) { - let shape = RuntimeType.create(TenByTen, { + const shape = RuntimeType.create(TenByTen, { myGuid: properties && properties.shape, opacity: .5, color: 'gray', angle: 10 }).dropAt(600, 300).addAsSubcomponent(this); - let subShape = RuntimeType.create(TwoByFour, { + const subShape = RuntimeType.create(TwoByFour, { myGuid: properties && properties.subShape, color: 'red', }).addAsSubcomponent(shape, { @@ -719,7 +719,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { let angle = this.angle + .5; angle = angle >= 360 ? 0 : angle; this.angle = angle; - } + }; // !properties && this.sharing.broadcast('doAddStack', { @@ -731,11 +731,11 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { doShape1D() { - let height = 60; - let x1 = 50; - let y1 = 100; - let x2 = 450; - let y2 = 100; + const height = 60; + const x1 = 50; + const y1 = 100; + const x2 = 450; + const y2 = 100; // let dX = x2 - x1; // let dY = y2 - y1; @@ -779,21 +779,21 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { doShapeGlue() { - let shape1 = RuntimeType.create(TwoByOne, { + const shape1 = RuntimeType.create(TwoByOne, { color: 'cyan', opacity: .8, }).dropAt(100, 300, 45).addAsSubcomponent(this); - let pt1 = shape1.localToGlobal(shape1.pinX(), shape1.pinY()); + const pt1 = shape1.localToGlobal(shape1.pinX(), shape1.pinY()); //let pt2 = pt1.clone().add(200, 200); - let shape2 = RuntimeType.create(TwoByOne, { + const shape2 = RuntimeType.create(TwoByOne, { color: 'blue', opacity: .8, }).dropAt(300, 400).addAsSubcomponent(this); - shape2.pinX = (): number => { return 0.0; } - let pt2 = shape2.localToGlobal(shape2.pinX(), shape2.pinY()); + shape2.pinX = (): number => { return 0.0; }; + const pt2 = shape2.localToGlobal(shape2.pinX(), shape2.pinY()); //let pc = pt1.midpoint(pt2); @@ -809,7 +809,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { }).dropAt(600, 350).addAsSubcomponent(this); - let wire = RuntimeType.create(Line, { + const wire = RuntimeType.create(Line, { opacity: .5, height: 30, startX: pt1.x, @@ -826,16 +826,16 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { doObjGlue() { - let wire = RuntimeType.create(Line, { + const wire = RuntimeType.create(Line, { opacity: .5, height: 20, color: 'black', }).dropAt(400, 400).addAsSubcomponent(this); - let shape1 = RuntimeType.create(dGlue).addAsSubcomponent(this); + const shape1 = RuntimeType.create(dGlue).addAsSubcomponent(this); - let shape2 = RuntimeType.create(dGlue).addAsSubcomponent(this); - shape2.pinX = (): number => { return 0.0; } + const shape2 = RuntimeType.create(dGlue).addAsSubcomponent(this); + shape2.pinX = (): number => { return 0.0; }; wire.glueStartTo(shape1); wire.glueFinishTo(shape2); @@ -846,8 +846,8 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { doObjRect() { class objRect extends dRectangle { - pinX = (): number => { return 0.0 * this.width; } - pinY = (): number => { return 0.5 * this.height; } + pinX = (): number => { return 0.0 * this.width; }; + pinY = (): number => { return 0.5 * this.height; }; Animation = (): void => { let angle = this.angle + .5; @@ -870,10 +870,10 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { doObjGroup() { class myRect extends dRectangle { - public pinX = (): number => { return 50; } + public pinX = (): number => { return 50; }; } - let shape = RuntimeType.create(myRect, { + const shape = RuntimeType.create(myRect, { color: 'purple', myName: 'root dRectangle', width: 300, @@ -882,7 +882,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { this.addSubcomponent(shape); - let subShape = RuntimeType.create(dRectangle, { + const subShape = RuntimeType.create(dRectangle, { color: 'blue', myName: 'blue child', width: 50, @@ -894,7 +894,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { let angle = this.angle + .5; angle = angle >= 360 ? 0 : angle; this.angle = angle; - } + }; shape.doAnimation = subShape.doAnimation; @@ -909,7 +909,7 @@ export class StageComponent extends foPage implements OnInit, AfterViewInit { this.screen2D.render = (ctx: CanvasRenderingContext2D) => { this.render(ctx); - } + }; this.screen2D.go(); diff --git a/src/app/canvas/world.component.ts b/src/app/canvas/world.component.ts index 4e5e430..934c729 100644 --- a/src/app/canvas/world.component.ts +++ b/src/app/canvas/world.component.ts @@ -85,7 +85,7 @@ export class WorldComponent implements OnInit, AfterViewInit { }); Lifecycle.observable.subscribe(event => { - console.log(event.id, event.cmd, event.myGuid, JSON.stringify(event.value)); + //console.log(event.id, event.cmd, event.myGuid, JSON.stringify(event.value)); }) let libs = this.rootWorkspace.stencil; @@ -94,7 +94,7 @@ export class WorldComponent implements OnInit, AfterViewInit { libs.add(ShapeStencil); libs.add(SolidStencil); libs.add(PinStencil) - + this.rootWorkspace.library.add(PersonDomain); this.rootWorkspace.model.addItem('default', new foModel({})) diff --git a/src/app/common/memoize-decorator.ts b/src/app/common/memoize-decorator.ts new file mode 100644 index 0000000..a2ee1b5 --- /dev/null +++ b/src/app/common/memoize-decorator.ts @@ -0,0 +1,81 @@ +/** + * Caches the return value of get accessors and methods. + * + * Notes: + * - Doesn't really make sense to put this on a method with parameters. + * - Creates an obscure non-enumerable property on the instance to store the memoized value. + * - Could use a WeakMap, but this way has support in old environments. + */ +export function Memoize(target: any, propertyName: string, descriptor: TypedPropertyDescriptor) { + if (descriptor.value != null) { + descriptor.value = getNewFunction(descriptor.value); + } + else if (descriptor.get != null) { + descriptor.get = getNewFunction(descriptor.get); + } + else { + throw "Only put a Memoize decorator on a method or get accessor."; + } +} + +let counter = 0; +function getNewFunction(originalFunction: () => void) { + const identifier = ++counter; + + return function (this: any, ...args: any[]) { + const propName = `__memoized_value_${identifier}`; + let returnedValue: any; + + if (this.hasOwnProperty(propName)) { + returnedValue = this[propName]; + } + else { + returnedValue = originalFunction.apply(this, args); + Object.defineProperty(this, propName, { + configurable: false, + enumerable: false, + writable: false, + value: returnedValue + }); + } + + return returnedValue; + }; +} + +// Example: +// import * as assert from "assert"; +// import {Memoize} from "./memoize-decorator"; + +// describe("Memoize", () => { +// class MyClass { +// @Memoize +// getNumber() { +// return Math.random(); +// } + +// @Memoize +// get value() { +// return Math.random(); +// } +// } + +// const a = new MyClass(); +// const b = new MyClass(); + +// it("method should be memoized", () => { +// assert.equal(a.getNumber(), a.getNumber()); +// }); + +// it("accessor should be memoized", () => { +// assert.equal(a.value, a.value); +// }); + +// it("multiple instances shouldn't share values for methods", () => { +// assert.notEqual(a.getNumber(), b.getNumber()); +// }); + +// it("multiple instances shouldn't share values for accessors", () => { +// assert.notEqual(a.value, b.value); +// }); +// }); \ No newline at end of file diff --git a/src/app/common/sharing.service.ts b/src/app/common/sharing.service.ts index 388d571..c6d6072 100644 --- a/src/app/common/sharing.service.ts +++ b/src/app/common/sharing.service.ts @@ -38,7 +38,7 @@ export class SharingService { LifecycleLock.whenUnprotected(event.myGuid, this, _ => { let cmd = this[event.cmd]; - let obj = event.object + let obj = event.object; if (cmd) { cmd = cmd.bind(this); cmd(event.object, event.value); @@ -130,44 +130,44 @@ export class SharingService { } public easeTo(shape: foGlyph2D, value?: any) { - this.signalR.pubCommand("easeTo", { guid: shape.myGuid }, value ? value : shape.getLocation()); + this.signalR.pubCommand('easeTo', { guid: shape.myGuid }, value ? value : shape.getLocation()); } public easeTween(shape: foGlyph2D, value?: any) { - this.signalR.pubCommand("easeTween", { guid: shape.myGuid }, value); + this.signalR.pubCommand('easeTween', { guid: shape.myGuid }, value); } public selected(shape: foGlyph2D) { - this.signalR.pubCommand("selectShape", { guid: shape.myGuid }, shape.isSelected); + this.signalR.pubCommand('selectShape', { guid: shape.myGuid }, shape.isSelected); return this; } public defined(know: foObject) { - this.signalR.pubCommand("syncKnow", { guid: know.myGuid, type: know.myType }, know.asJson); + this.signalR.pubCommand('syncKnow', { guid: know.myGuid, type: know.myType }, know.asJson); return this; } public command(know: foObject, value: any) { - this.signalR.pubCommand("syncCommand", { guid: know.myGuid, method: value }, know.asJson); + this.signalR.pubCommand('syncCommand', { guid: know.myGuid, method: value }, know.asJson); return this; } public run(know: foObject, value: any) { let action = value.action; let params = value.params; - this.signalR.pubCommand("syncRun", { guid: know.myGuid, action: action }, params); + this.signalR.pubCommand('syncRun', { guid: know.myGuid, action: action }, params); return this; } public layout(know: foObject, value?: any) { - this.signalR.pubCommand("syncLayout", { guid: know.myGuid }, value); + this.signalR.pubCommand('syncLayout', { guid: know.myGuid }, value); return this; } //-------------------------------- public clearPage() { - this.signalR.pubCommand("clearPage", {}); + this.signalR.pubCommand('clearPage', {}); return this; } @@ -176,15 +176,12 @@ export class SharingService { //------------------------------------------------ public startSharing(next?: (self:SharingService) => {}) { - - this.signalR.start().then(() => { - // function forceParent(shape: foGlyph) { - // let parent = shape.myParent && shape.myParent(); - // if (!parent) shape.reParent(this.workspace.activePage); - // } - this.signalR.subCommand("dropShape", (cmd, data) => { + this.signalR.canStart() && this.signalR.start().then(() => { + + + this.signalR.subCommand('dropShape', (cmd, data) => { LifecycleLock.protected(cmd.guid, this, _ => { this.workspace.activePage.found(cmd.guid, shape => { shape.dropAt(data.x, data.y, data.angle); @@ -193,7 +190,7 @@ export class SharingService { }); }); - this.signalR.subCommand("moveShape", (cmd, data) => { + this.signalR.subCommand('moveShape', (cmd, data) => { LifecycleLock.protected(cmd.guid, this, _ => { this.workspace.activePage.found(cmd.guid, shape => { shape.move(data.x, data.y, data.angle); @@ -202,7 +199,7 @@ export class SharingService { }); }); - this.signalR.subCommand("easeTo", (cmd, data) => { + this.signalR.subCommand('easeTo', (cmd, data) => { LifecycleLock.protected(cmd.guid, this, _ => { this.workspace.activePage.found(cmd.guid, shape => { shape.easeTo(data.x, data.y, .8, Back.easeInOut); @@ -211,7 +208,7 @@ export class SharingService { }); }); - this.signalR.subCommand("selectShape", (cmd, data) => { + this.signalR.subCommand('selectShape', (cmd, data) => { LifecycleLock.protected(cmd.guid, this, _ => { this.workspace.activePage.found(cmd.guid, shape => { shape.isSelected = data; @@ -219,7 +216,7 @@ export class SharingService { }); }); - this.signalR.subCommand("destroyed", (cmd, data) => { + this.signalR.subCommand('destroyed', (cmd, data) => { LifecycleLock.protected(cmd.guid, this, _ => { this.workspace.activePage.found(cmd.guid, shape => { this.workspace.activePage.destroyed(shape); @@ -227,11 +224,11 @@ export class SharingService { }); }); - this.signalR.subCommand("clearPage", (cmd, data) => { + this.signalR.subCommand('clearPage', (cmd, data) => { this.workspace.activePage.clearPage(); }); - this.signalR.subCommand("syncKnow", (cmd, data) => { + this.signalR.subCommand('syncKnow', (cmd, data) => { //foObject.jsonAlert(data); KnowcycleLock.protected(cmd.guid, this, _ => { Stencil.hydrate(data); @@ -250,7 +247,7 @@ export class SharingService { // }); - this.signalR.subCommand("syncParent", (cmd, parentGuid) => { + this.signalR.subCommand('syncParent', (cmd, parentGuid) => { //foObject.jsonAlert(cmd); LifecycleLock.protected(cmd.guid, this, _ => { @@ -263,11 +260,11 @@ export class SharingService { }); - this.signalR.subCommand("syncPage", (cmd, data) => { + this.signalR.subCommand('syncPage', (cmd, data) => { let pages = globalWorkspace.document.pages; LifecycleLock.protected(cmd.guid, this, _ => { - pages.findItem(cmd.name, () => { - globalWorkspace.document.createPage(data); + pages.findItem(cmd.name, () => { + globalWorkspace.document.createPage(data); }, found => { found.override(data); }); @@ -276,12 +273,12 @@ export class SharingService { }); - this.signalR.subCommand("syncShape", (cmd, data) => { + this.signalR.subCommand('syncShape', (cmd, data) => { //foObject.jsonAlert(data); LifecycleLock.protected(cmd.guid, this, _ => { this.workspace.activePage.findItem(cmd.guid, () => { - //this.message.push(json); + //this.message.push(json); let concept = Stencil.find(data.myClass); let shape = concept ? concept.newInstance(data) : RuntimeType.newInstance(data.myType, data); //foObject.jsonAlert(shape); @@ -296,7 +293,7 @@ export class SharingService { }); - this.signalR.subCommand("syncLayout", (cmd, value) => { + this.signalR.subCommand('syncLayout', (cmd, value) => { // foObject.jsonAlert(value); let self = this; let { method, resize, space } = value; @@ -308,7 +305,7 @@ export class SharingService { }); }); - this.signalR.subCommand("easeTween", (cmd, value) => { + this.signalR.subCommand('easeTween', (cmd, value) => { //foObject.jsonAlert(value); LifecycleLock.protected(cmd.guid, this, _ => { let { time, ease, to } = value; @@ -319,12 +316,12 @@ export class SharingService { }); - this.signalR.subCommand("syncCommand", (cmd, data) => { + this.signalR.subCommand('syncCommand', (cmd, data) => { let method = cmd.method; method && this.workspace.activePage[method](data); }); - this.signalR.subCommand("syncRun", (cmd, value) => { + this.signalR.subCommand('syncRun', (cmd, value) => { // foObject.jsonAlert(value); let self = this; this.workspace.activePage.found(cmd.guid, item => { @@ -336,7 +333,7 @@ export class SharingService { }); - this.signalR.subCommand("syncGlue", (cmd, data) => { + this.signalR.subCommand('syncGlue', (cmd, data) => { //foObject.jsonAlert(data); let { sourceGuid, sourceName, targetGuid, targetName } = cmd as iGlueSignature; this.workspace.activePage.found(sourceGuid, (source) => { diff --git a/src/app/common/signalr.service.ts b/src/app/common/signalr.service.ts index a986388..45794cc 100644 --- a/src/app/common/signalr.service.ts +++ b/src/app/common/signalr.service.ts @@ -1,8 +1,8 @@ import { Injectable } from '@angular/core'; -import { HubConnection } from '@aspnet/signalr-client'; -import { Toast } from "../common/emitter.service"; +import * as signalr from '@aspnet/signalr'; +import { Toast } from '../common/emitter.service'; -import { Tools } from "../foundry/foTools"; +import { Tools } from '../foundry/foTools'; import { environment } from '../../environments/environment'; @@ -12,20 +12,26 @@ import { environment } from '../../environments/environment'; @Injectable() export class SignalRService { + private _ignore: boolean = false; private _started: boolean = false; private hubURL = environment.local ? environment.signalRServer : environment.signalfoundry; - private connection: HubConnection; - private _guid:string = Tools.generateUUID(); + private connection: signalr.HubConnection; + private _guid: string = Tools.generateUUID(); constructor() { - if (!this.connection) { - this.connection = new HubConnection(this.hubURL); + if (!this._ignore && !this.connection) { + this.connection = new signalr.HubConnectionBuilder() + .withUrl(this.hubURL) + .configureLogging(signalr.LogLevel.Information) + .build(); + + // Toast.info(JSON.stringify(this.connection), `build: ${this.hubURL}`); } } - public get hub(): HubConnection { + public get hub(): signalr.HubConnection { return this._started && this.connection; } @@ -41,7 +47,7 @@ export class SignalRService { if (this.hub) { //console.log('pubChannel ' + name) command._channel = this._guid; - this.hub.invoke("command", name, command, payload); + this.hub.invoke('command', name, command, payload); } } @@ -51,7 +57,7 @@ export class SignalRService { this.hub.on(name, (command, payload) => { //console.log(name + ': command: ' + JSON.stringify(command, undefined, 3)); //console.log(name + ': payload: ' + JSON.stringify(payload, undefined, 3)); - if ( command._channel != this._guid) { + if ( command._channel !== this._guid) { callback(command, payload); } }); @@ -66,7 +72,7 @@ export class SignalRService { callback(data); }); } else { - Toast.warning("cannot connect at this moment", this.hubURL); + Toast.warning('cannot connect at this moment', this.hubURL); } } @@ -76,6 +82,10 @@ export class SignalRService { } } + canStart() { + return !this._ignore; + } + start(): Promise { let promise: Promise; @@ -88,10 +98,11 @@ export class SignalRService { this._started = true; //Toast.success(this.hubURL, "Connected.."); this.hub.on('version', message => { - Toast.success(this.hubURL, "Connected.. " + message); + Toast.success(this.hubURL, 'Connected.. ' + message); }); this.askforVersion(); }).catch(error => { + console.log(error); Toast.error(JSON.stringify(error), this.hubURL); }); } diff --git a/src/app/welcome/welcome.component.css b/src/app/dashboard/card-a.component.css similarity index 100% rename from src/app/welcome/welcome.component.css rename to src/app/dashboard/card-a.component.css diff --git a/src/app/dashboard/card-a.component.html b/src/app/dashboard/card-a.component.html new file mode 100644 index 0000000..aea0503 --- /dev/null +++ b/src/app/dashboard/card-a.component.html @@ -0,0 +1,9 @@ +
+
+
+

card A works!

+ +
{{context | json}}
+
+
+
diff --git a/src/app/dashboard/card-a.component.ts b/src/app/dashboard/card-a.component.ts new file mode 100644 index 0000000..7a3cc0f --- /dev/null +++ b/src/app/dashboard/card-a.component.ts @@ -0,0 +1,18 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: 'fo-card-a', + templateUrl: './card-a.component.html', + styleUrls: ['./card-a.component.css'] +}) +export class CardAComponent implements OnInit { + + @Input('context') + context:any; + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/dashboard/card-b.component.css b/src/app/dashboard/card-b.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/dashboard/card-b.component.html b/src/app/dashboard/card-b.component.html new file mode 100644 index 0000000..137c44c --- /dev/null +++ b/src/app/dashboard/card-b.component.html @@ -0,0 +1,8 @@ + +
+
+ card B works! + +
{{context | json}}
+
+
diff --git a/src/app/dashboard/card-b.component.ts b/src/app/dashboard/card-b.component.ts new file mode 100644 index 0000000..1bc7d5b --- /dev/null +++ b/src/app/dashboard/card-b.component.ts @@ -0,0 +1,18 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: 'fo-card-b', + templateUrl: './card-b.component.html', + styleUrls: ['./card-b.component.css'] +}) +export class CardBComponent implements OnInit { + + @Input('context') + context:any; + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/dashboard/card-c.component.css b/src/app/dashboard/card-c.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/dashboard/card-c.component.html b/src/app/dashboard/card-c.component.html new file mode 100644 index 0000000..51a4a95 --- /dev/null +++ b/src/app/dashboard/card-c.component.html @@ -0,0 +1,9 @@ +
+
+
+ card C works! + +
{{context | json}}
+
+
+
diff --git a/src/app/dashboard/card-c.component.ts b/src/app/dashboard/card-c.component.ts new file mode 100644 index 0000000..d18e339 --- /dev/null +++ b/src/app/dashboard/card-c.component.ts @@ -0,0 +1,18 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: 'fo-card-c', + templateUrl: './card-c.component.html', + styleUrls: ['./card-c.component.css'] +}) +export class CardCComponent implements OnInit { + + @Input('context') + context:any; + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/dashboard/cardDictionary.ts b/src/app/dashboard/cardDictionary.ts new file mode 100644 index 0000000..5cf4556 --- /dev/null +++ b/src/app/dashboard/cardDictionary.ts @@ -0,0 +1,254 @@ + +import { CardAComponent } from './card-a.component' +import { CardBComponent } from './card-b.component' +import { CardCComponent } from './card-c.component' + + +export let cards = { + A: CardAComponent, + B: CardBComponent, + C: CardCComponent +} + + +export let sampleData = [{ + "id": 1, + "first_name": "Kimball", + "last_name": "Simmers", + "email": "ksimmers0@soundcloud.com", + "gender": "Male", + "type": "A", + "color": "Yellow" + }, { + "id": 2, + "first_name": "Happy", + "last_name": "Mundie", + "email": "hmundie1@narod.ru", + "gender": "Female", + "type": "A", + "color": "Turquoise" + }, { + "id": 3, + "first_name": "Michael", + "last_name": "Pusey", + "email": "mpusey2@umich.edu", + "gender": "Male", + "type": "B", + "color": "Teal" + }, { + "id": 4, + "first_name": "Philippa", + "last_name": "Rigden", + "email": "prigden3@bravesites.com", + "gender": "Female", + "type": "A", + "color": "Yellow" + }, { + "id": 5, + "first_name": "Karleen", + "last_name": "Geering", + "email": "kgeering4@theglobeandmail.com", + "gender": "Female", + "type": "A", + "color": "Maroon" + }, { + "id": 6, + "first_name": "Buckie", + "last_name": "Teffrey", + "email": "bteffrey5@bloglovin.com", + "gender": "Male", + "type": "C", + "color": "Violet" + }, { + "id": 7, + "first_name": "Mile", + "last_name": "Keizman", + "email": "mkeizman6@google.com.hk", + "gender": "Male", + "type": "B", + "color": "Green" + }, { + "id": 8, + "first_name": "Alisander", + "last_name": "Jakubovski", + "email": "ajakubovski7@ocn.ne.jp", + "gender": "Male", + "type": "A", + "color": "Yellow" + }, { + "id": 9, + "first_name": "Tiffani", + "last_name": "Sainsbury-Brown", + "email": "tsainsburybrown8@ed.gov", + "gender": "Female", + "type": "C", + "color": "Yellow" + }, { + "id": 10, + "first_name": "Norry", + "last_name": "Plumstead", + "email": "nplumstead9@yandex.ru", + "gender": "Male", + "type": "C", + "color": "Fuscia" + }, { + "id": 11, + "first_name": "Harvey", + "last_name": "Chick", + "email": "hchicka@epa.gov", + "gender": "Male", + "type": "A", + "color": "Fuscia" + }, { + "id": 12, + "first_name": "Catharine", + "last_name": "Shawcross", + "email": "cshawcrossb@msu.edu", + "gender": "Female", + "type": "B", + "color": "Goldenrod" + }, { + "id": 13, + "first_name": "Violante", + "last_name": "MacIan", + "email": "vmacianc@telegraph.co.uk", + "gender": "Female", + "type": "A", + "color": "Aquamarine" + }, { + "id": 14, + "first_name": "Tome", + "last_name": "Claw", + "email": "tclawd@yelp.com", + "gender": "Male", + "type": "A", + "color": "Indigo" + }, { + "id": 15, + "first_name": "Crichton", + "last_name": "Osban", + "email": "cosbane@godaddy.com", + "gender": "Male", + "type": "B", + "color": "Orange" + }, { + "id": 16, + "first_name": "Nahum", + "last_name": "Sebright", + "email": "nsebrightf@dropbox.com", + "gender": "Male", + "type": "B", + "color": "Orange" + }, { + "id": 17, + "first_name": "Serena", + "last_name": "Attenbrough", + "email": "sattenbroughg@51.la", + "gender": "Female", + "type": "A", + "color": "Yellow" + }, { + "id": 18, + "first_name": "Holly-anne", + "last_name": "Grabeham", + "email": "hgrabehamh@smh.com.au", + "gender": "Female", + "type": "A", + "color": "Khaki" + }, { + "id": 19, + "first_name": "Jared", + "last_name": "Nellis", + "email": "jnellisi@ovh.net", + "gender": "Male", + "type": "A", + "color": "Teal" + }, { + "id": 20, + "first_name": "Viviyan", + "last_name": "Esp", + "email": "vespj@scribd.com", + "gender": "Female", + "type": "A", + "color": "Aquamarine" + }, { + "id": 21, + "first_name": "Hunter", + "last_name": "Verick", + "email": "hverickk@github.io", + "gender": "Male", + "type": "A", + "color": "Maroon" + }, { + "id": 22, + "first_name": "Domini", + "last_name": "Bassom", + "email": "dbassoml@bing.com", + "gender": "Female", + "type": "A", + "color": "Puce" + }, { + "id": 23, + "first_name": "Tina", + "last_name": "Tapping", + "email": "ttappingm@mysql.com", + "gender": "Female", + "type": "A", + "color": "Yellow" + }, { + "id": 24, + "first_name": "Dee dee", + "last_name": "Ianitti", + "email": "dianittin@smugmug.com", + "gender": "Female", + "type": "A", + "color": "Red" + }, { + "id": 25, + "first_name": "Clare", + "last_name": "Burbage", + "email": "cburbageo@rambler.ru", + "gender": "Female", + "type": "A", + "color": "Pink" + }, { + "id": 26, + "first_name": "Udall", + "last_name": "Barg", + "email": "ubargp@wisc.edu", + "gender": "Male", + "type": "A", + "color": "Maroon" + }, { + "id": 27, + "first_name": "Emanuele", + "last_name": "Giovannacc@i", + "email": "egiovannacciq@nps.gov", + "gender": "Male", + "type": "A", + "color": "Orange" + }, { + "id": 28, + "first_name": "Ancell", + "last_name": "Pache", + "email": "apacher@exblog.jp", + "gender": "Male", + "type": "A", + "color": "Violet" + }, { + "id": 29, + "first_name": "Dot", + "last_name": "Hymus", + "email": "dhymuss@last.fm", + "gender": "Female", + "type": "A", + "color": "Goldenrod" + }, { + "id": 30, + "first_name": "Brooks", + "last_name": "O'Duane", + "email": "boduanet@miitbeian.gov.cn", + "gender": "Male", + "type": "A", + "color": "Maroon" + }]; diff --git a/src/app/dashboard/dashboard.component.css b/src/app/dashboard/dashboard.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html new file mode 100644 index 0000000..5ccbc5b --- /dev/null +++ b/src/app/dashboard/dashboard.component.html @@ -0,0 +1,10 @@ +

+ dashboard works! +

+ + + +

Here is the magic

+
diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts new file mode 100644 index 0000000..6ab309c --- /dev/null +++ b/src/app/dashboard/dashboard.component.ts @@ -0,0 +1,30 @@ +import { Component, OnInit, AfterContentInit, ViewChild, ViewContainerRef, ComponentFactoryResolver } from '@angular/core'; + +import { cards, sampleData } from './cardDictionary' + +@Component({ + selector: 'fo-dashboard', + templateUrl: './dashboard.component.html', + styleUrls: ['./dashboard.component.css'] +}) +export class DashboardComponent implements OnInit, AfterContentInit { + @ViewChild('dashboardbody', { read: ViewContainerRef }) dashboardbody; + + dataList = sampleData; + + constructor(private resolver: ComponentFactoryResolver) { + } + + ngOnInit() { + } + + ngAfterContentInit() { + this.dataList.forEach(item => { + let runtimeType = cards[item.type]; + let type = this.resolver.resolveComponentFactory(runtimeType); + let ref = this.dashboardbody.createComponent(type); + ref.instance.context = item; + }); + + } +} diff --git a/src/app/fo-inspector/fo-controller-card.component.css b/src/app/fo-inspector/fo-controller-card.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/fo-inspector/fo-controller-card.component.html b/src/app/fo-inspector/fo-controller-card.component.html new file mode 100644 index 0000000..29ceb88 --- /dev/null +++ b/src/app/fo-inspector/fo-controller-card.component.html @@ -0,0 +1,17 @@ +
+
+

{{control.myName}}

+
+ + + +
+ + + + +
{{control.asJson | json }}
+
+
+
diff --git a/src/app/fo-inspector/fo-controller-card.component.ts b/src/app/fo-inspector/fo-controller-card.component.ts new file mode 100644 index 0000000..eeb8acb --- /dev/null +++ b/src/app/fo-inspector/fo-controller-card.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit, AfterViewInit, Input, ViewChild, ElementRef } from '@angular/core'; + +import { Tools } from "../foundry/foTools"; + +import { foModel } from "../foundry/foModel.model"; +import { foNode } from "../foundry/foNode.model"; +import { foController } from "../foundry/foController"; +import { Toast } from "../common/emitter.service"; + + + +@Component({ + selector: 'fo-controller-card', + templateUrl: './fo-controller-card.component.html', + styleUrls: ['./fo-controller-card.component.css'] +}) +export class foControllerCardComponent implements OnInit { + showDetails = false; + + @Input() + public control:foController; + + @Input() + public model: foModel; + + + constructor() { } + + ngOnInit() { + } + + doToggleDetails() { + this.showDetails = !this.showDetails; + } + + doCommand(cmd: string) { + this.control[cmd](); + } +} diff --git a/src/app/fo-inspector/fo-knowledge.component.html b/src/app/fo-inspector/fo-knowledge.component.html index 7984e5d..9049338 100644 --- a/src/app/fo-inspector/fo-knowledge.component.html +++ b/src/app/fo-inspector/fo-knowledge.component.html @@ -1,8 +1,11 @@ - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/src/app/fo-inspector/fo-knowledge.component.ts b/src/app/fo-inspector/fo-knowledge.component.ts index 83a2d68..7010101 100644 --- a/src/app/fo-inspector/fo-knowledge.component.ts +++ b/src/app/fo-inspector/fo-knowledge.component.ts @@ -3,6 +3,7 @@ import { Component, OnInit, Input } from '@angular/core'; import { foLibrary } from 'app/foundry/foLibrary.model'; import { globalWorkspace, foWorkspace } from "../foundry/foWorkspace.model"; import { foModel } from "../foundry/foModel.model"; +import { foController } from '../foundry/foController'; @Component({ @@ -11,23 +12,26 @@ import { foModel } from "../foundry/foModel.model"; styleUrls: ['./fo-knowledge.component.css'] }) export class foKnowledgeComponent implements OnInit { + @Input() workspace: foWorkspace; model: foModel; list:Array = new Array(); + controllers:Array = new Array(); constructor() { } - ngOnInit() { this.workspace = this.workspace || globalWorkspace; this.model = this.workspace.model.getItem('default') this.list = this.workspace.library.members; + + this.controllers = this.workspace.controller.publicMembers; } diff --git a/src/app/foundry/foAttribute.model.ts b/src/app/foundry/foAttribute.model.ts index 4c49345..9d69c85 100644 --- a/src/app/foundry/foAttribute.model.ts +++ b/src/app/foundry/foAttribute.model.ts @@ -1,16 +1,12 @@ - -import { foKnowledge } from './foKnowledge.model' +import { foKnowledge } from './foKnowledge.model'; export class foAttribute extends foKnowledge { - constructor(properties?: any, parent?: foKnowledge) { super(properties, parent); } - } export class foViewAttribute extends foAttribute { - private _title: string; private _mySource: foAttribute = undefined; @@ -28,6 +24,4 @@ export class foViewAttribute extends foAttribute { set title(name) { this._title = name; } - } - diff --git a/src/app/foundry/foBitwise.ts b/src/app/foundry/foBitwise.ts new file mode 100644 index 0000000..0cb471c --- /dev/null +++ b/src/app/foundry/foBitwise.ts @@ -0,0 +1,51 @@ +export class foBitwise { + //let mask = FLAG_A | FLAG_B | FLAG_D; // 0001 | 0010 | 1000 => 1011 + + createMask(...arg) { + let nMask = 0, + nFlag = 0; + const nLen = arguments.length > 32 ? 32 : arguments.length; + for (nFlag; nFlag < nLen; nMask |= arguments[nFlag] << nFlag++) { } + return nMask; + } + + createBinaryString(nMask) { + let sMask; + // nMask must be between -2147483648 and 2147483647 + for ( + let nFlag = 0, nShifted = nMask, sMask = ''; + nFlag < 32; + nFlag++, sMask += String(nShifted >>> 31), nShifted <<= 1 + ) { } + return sMask; + } + + arrayFromMask(nMask) { + let aFromMask; + // nMask must be between -2147483648 and 2147483647 + if (nMask > 0x7fffffff || nMask < -0x80000000) { + throw new TypeError('arrayFromMask - out of range'); + } + for ( + let nShifted = nMask, aFromMask = []; + nShifted; + aFromMask.push(Boolean(nShifted & 1)), nShifted >>>= 1 + ) {; } + return aFromMask; + } + + example() { + const FLAG_A = 1; // 0001 + const FLAG_B = 2; // 0010 + const FLAG_C = 4; // 0100 + const FLAG_D = 8; // 1000 + + const mask1 = this.createMask(true, true, false, true); // 11, i.e.: 1011 + const mask2 = this.createMask(false, false, true); // 4, i.e.: 0100 + const mask3 = this.createMask(true); // 1, i.e.: 0001 + + const array1 = this.arrayFromMask(11); + const array2 = this.arrayFromMask(4); + const array3 = this.arrayFromMask(1); + } +} diff --git a/src/app/foundry/foBuffer.ts b/src/app/foundry/foBuffer.ts new file mode 100644 index 0000000..5684f34 --- /dev/null +++ b/src/app/foundry/foBuffer.ts @@ -0,0 +1,86 @@ +import { foCollection } from './foCollection.model'; +import { foInstance } from './foInstance.model'; +import { cPoint2D, cFrame } from './shapes/foGeometry2D'; +import { foGlyph2D } from './shapes/foGlyph2D.model'; +import { foHandle2D } from './shapes/foHandle2D'; + +export class foBuffer extends foCollection {} + +export class foCopyPasteBuffer extends foBuffer { + clear(exclude: foInstance = null) { + this.clearAll(); + } + + addSelection(item: foInstance, clear: boolean = true) { + clear && this.clear(item); + + if (!this.isMember(item)) { + this.addMember(item); + } + } +} + +export class foHandleBuffer extends foBuffer { + findHandle(loc: cPoint2D): foHandle2D { + for (let i = 0; i < this.length; i++) { + const handle: foHandle2D = this.getChildAt(i); + if (handle.hitTest(loc)) { + return handle; + } + } + } +} + +export class foSelectionBuffer extends foBuffer { + protected _handles: foHandleBuffer = new foHandleBuffer(); + protected lastFound: foGlyph2D; + + findHandle(loc: cPoint2D): foHandle2D { + return this._handles.findHandle(loc); + } + + get handles() { + return this._handles; + } + + unselect(exclude: foGlyph2D = null) { + this._handles.clearAll(); + this.forEach(item => { + item.unSelect(true, exclude); + item.closeEditor && item.closeEditor(); + }); + } + + clear(exclude: foGlyph2D = null) { + this.unselect(exclude); + this.clearAll(); + } + + addSelection(item: foGlyph2D, clear: boolean = true) { + clear && this.clear(item); + + item.isSelected = true; + if (!this.isMember(item)) { + this.addMember(item); + this._handles.copyMembers(item.handles); + } + } + + findSelected() { + return this.find(item => { + return item.isSelected; + }); + } + + sendKeysToShape(e: KeyboardEvent, keys) { + if (this.lastFound && this.lastFound.isSelected) { + this.lastFound.sendKeys(e, keys); + } else { + const found = this.findSelected(); + if (found && found.sendKeys) { + found.sendKeys(e, keys); + this.lastFound = found; + } + } + } +} diff --git a/src/app/foundry/foChange.ts b/src/app/foundry/foChange.ts index b335985..9361d00 100644 --- a/src/app/foundry/foChange.ts +++ b/src/app/foundry/foChange.ts @@ -1,139 +1,135 @@ -import { Action } from './foInterface' +import { Action } from './foInterface'; import { Tools } from './foTools'; import { foObject } from './foObject.model'; import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; -import { debounceTime, } from 'rxjs/operators'; - +import { debounceTime } from 'rxjs/operators'; let counter = 0; export class foChangeEvent { - id: number = 0; - cmd: string = ''; - object: foObject; - value: any; - - get guid() { - return this.object.myGuid; - } - get simpleGuid() { - return this.object.myGuid.slice(-8); - } - get myGuid() { - return this.object.myGuid; - } - get myType() { - return this.object.myType; - } - - get myName() { - return this.object.myName; - } - - isNamed(name:string){ - return Tools.matches(name,this.myName) - } - - isCmd(cmd:string){ - return Tools.matches(cmd,this.cmd) - } - - constructor(cmd: string, obj: foObject, count: number = 0, value?: any) { - this.id = count; - this.cmd = cmd; - this.object = obj; - this.value = value; - } + id: number = 0; + cmd: string = ''; + object: foObject; + value: any; + + get guid() { + return this.object.myGuid; + } + get simpleGuid() { + return this.object.myGuid.slice(-8); + } + get myGuid() { + return this.object.myGuid; + } + get myType() { + return this.object.myType; + } + + get myName() { + return this.object.myName; + } + + isNamed(name: string) { + return Tools.matches(name, this.myName); + } + + isCmd(cmd: string) { + return Tools.matches(cmd, this.cmd); + } + + constructor(cmd: string, obj: foObject, count: number = 0, value?: any) { + this.id = count; + this.cmd = cmd; + this.object = obj; + this.value = value; + } } //this is needed to prevent circular communiation // create => create => create across browsers export class foChangeEventLock { - private _processLock = {}; - - isLocked(guid: string) { - return this._processLock[guid] ? true : false; - } - - addLock(guid: string) { - if (!this.isLocked(guid)) { - this._processLock[guid] = 0; - } - this._processLock[guid] += 1; - } - - unLock(guid: string) { - if (this.isLocked(guid)) { - this._processLock[guid] -= 1; - if (this._processLock[guid] <= 0) { - delete this._processLock[guid]; - } - } - } - - protected(guid: string, context: any, func: Action) { - this.addLock(guid) - try { - func(context); - } catch (ex) { - console.error('protected', ex); - } - this.unLock(guid); - } - - whenUnprotected(guid: string, context: any, func: Action) { - if (!this.isLocked(guid)) { - try { - func(context); - } catch (ex) { - console.error('whenUnprotected ', ex); - } - } - } - + private _processLock = {}; + + isLocked(guid: string) { + return this._processLock[guid] ? true : false; + } + + addLock(guid: string) { + if (!this.isLocked(guid)) { + this._processLock[guid] = 0; + } + this._processLock[guid] += 1; + } + + unLock(guid: string) { + if (this.isLocked(guid)) { + this._processLock[guid] -= 1; + if (this._processLock[guid] <= 0) { + delete this._processLock[guid]; + } + } + } + + protected(guid: string, context: any, func: Action) { + this.addLock(guid); + try { + func(context); + } catch (ex) { + console.error('protected', ex); + } + this.unLock(guid); + } + + whenUnprotected(guid: string, context: any, func: Action) { + if (!this.isLocked(guid)) { + try { + func(context); + } catch (ex) { + console.error('whenUnprotected ', ex); + } + } + } } export let ChangeLock: foChangeEventLock = new foChangeEventLock(); export class foChange { - - public observable: Observable; - public emit: Subject; - - private debounced: Subject; - - constructor(debouce: number = 500) { - this.emit = new Subject(); - this.observable = this.emit.asObservable(); - - this.debounced = new Subject(); - - this.debounced.asObservable().pipe(debounceTime(debouce)).subscribe(event => { - event.id = counter++; - this.emit.next(event); - }); - } - - - dropped(obj: foObject, value?: any) { - this.emit.next(new foChangeEvent('dropped', obj, counter++, value)) - return this; - } - - moved(obj: foObject, value?: any) { - this.debounced.next(new foChangeEvent('moved', obj, counter++, value)) - return this; - } - - changed(name:string, obj: foObject, value?: any) { - this.emit.next(new foChangeEvent(name, obj, counter++, value)) - return this; - } - + public observable: Observable; + public emit: Subject; + + private debounced: Subject; + + constructor(debouce: number = 500) { + this.emit = new Subject(); + this.observable = this.emit.asObservable(); + + this.debounced = new Subject(); + + this.debounced + .asObservable() + .pipe(debounceTime(debouce)) + .subscribe(event => { + event.id = counter++; + this.emit.next(event); + }); + } + + dropped(obj: foObject, value?: any) { + this.emit.next(new foChangeEvent('dropped', obj, counter++, value)); + return this; + } + + moved(obj: foObject, value?: any) { + this.debounced.next(new foChangeEvent('moved', obj, counter++, value)); + return this; + } + + changed(name: string, obj: foObject, value?: any) { + this.emit.next(new foChangeEvent(name, obj, counter++, value)); + return this; + } } export let BroadcastChange: foChange = new foChange(300); - - diff --git a/src/app/foundry/foCollection.model.ts b/src/app/foundry/foCollection.model.ts index d193047..77392c4 100644 --- a/src/app/foundry/foCollection.model.ts +++ b/src/app/foundry/foCollection.model.ts @@ -1,120 +1,143 @@ -import { Tools } from './foTools' -import { foObject } from './foObject.model' -import { iObject, Action, Func } from './foInterface' +import { Tools } from './foTools'; +import { foObject } from './foObject.model'; +import { iObject, Action, Func } from './foInterface'; //we want foCollection to be observable export class foCollection extends foObject { - protected _members: Array; - - isHidden: boolean = false; - isSelectable: boolean = true; - constructor(list: Array = undefined) { - super(); - - this._members = new Array(); - list && list.forEach(item => this.addMember(item)); - } - - - getChildAt(i: number): T { - return this._members[i] - } - - isEmpty(): boolean { - return this._members.length == 0; - } - - clearAll() { - this._members = []; - } - - get length() { - return this._members.length; - } - - get hasMembers(): boolean { - return this.length > 0; - } - - map(funct) { - return this._members.map(funct); - } - - forEach(funct: Action) { - this._members.forEach(funct); - } - - first() { - return this._members[0]; - } - - last() { - return this._members[this._members.length-1]; - } - - filter(funct: Func) { - return this._members.filter(funct); - } - - findMember(name: string): T { - let found = this._members.filter(item => { - return item.myName == name || item.myGuid == name; - }); - return found.length > 0 ? found[0] : undefined; - } - - getMember(id): T { - return this._members[id] - } - - copyMembers(list: foCollection): foCollection { - list.members.forEach(item => { - this.addMember(item); - }); - return this; - } - - addMember(obj: T): T { - this._members.push(obj); - return obj; - } - - removeMembers(list: foCollection): foCollection { - list.members.forEach(item => { - this.removeMember(item); - }); - return this; - } - - removeMember(obj: T): T { - var index = this._members.indexOf(obj); - if (index > -1) { - this._members.splice(index, 1); - } - return obj; - } - - get members() { - return this._members; - } - - get publicMembers() { - return this.members.filter( item => item.isPublic); - } - - - moveToTop(item: T) { - let loc = this._members.indexOf(item); - if (loc != -1) { - this._members.splice(loc, 1); - this._members.push(item); - } - return this._members; - } - - protected toJson(): any { - let list = !this.hasMembers ?[] : this._members.map( item => item.asJson ) - return Tools.mixin(super.toJson(), list ); - } -} \ No newline at end of file + protected _members: Array; + + isHidden: boolean = false; + isSelectable: boolean = true; + constructor(list: Array = undefined) { + super(); + + this._members = new Array(); + list && list.forEach(item => this.addMember(item)); + } + + getChildAt(i: number): T { + return this._members[i]; + } + + isEmpty(): boolean { + return this._members.length === 0; + } + + clearAll() { + this._members = []; + } + + get length() { + return this._members.length; + } + + get count() { + return this._members.length; + } + + get hasMembers(): boolean { + return this.length > 0; + } + + map(funct) { + return this._members.map(funct); + } + + forEach(funct: Action) { + this._members.forEach(funct); + } + + first() { + return this._members[0]; + } + + last() { + return this._members[this._members.length - 1]; + } + + filter(funct: Func) { + return this._members.filter(funct); + } + + find(funct: Func) { + return this._members.find(funct); + } + + findMember(name: string): T { + const found = this._members.find(item => { + return item.myName === name || item.myGuid === name; + }); + return found; + } + + getMember(id): T { + return this._members[id]; + } + + copyMembers(list: foCollection): foCollection { + list.members.forEach(item => { + this.addMember(item); + }); + return this; + } + + isMember(item: T) { + const loc = this._members.indexOf(item); + return loc !== -1; + } + + push(obj: any) { + this._members.push(obj); + } + shift(): any { + return this._members.shift(); + } + + addMember(obj: T): T { + this._members.push(obj); + return obj; + } + + removeMembers(list: foCollection): foCollection { + list.members.forEach(item => { + this.removeMember(item); + }); + return this; + } + + removeMember(obj: T): T { + const index = this._members.indexOf(obj); + if (index > -1) { + this._members.splice(index, 1); + } + return obj; + } + + get members() { + return this._members; + } + + get publicMembers() { + return this.members.filter(item => item.isPublic); + } + + moveToTop(item: T) { + const loc = this._members.indexOf(item); + if (loc !== -1) { + this._members.splice(loc, 1); + this._members.push(item); + } + return this._members; + } + + protected toJson(): any { + const list = !this.hasMembers ? [] : this._members.map(item => item.asJson); + return Tools.mixin(super.toJson(), list); + } + + public isEqualTo(obj: foCollection, deep: boolean = true) { + const result = true; + return result; + } +} diff --git a/src/app/foundry/foComponent.model.ts b/src/app/foundry/foComponent.model.ts index 8722f54..ec8b4fc 100644 --- a/src/app/foundry/foComponent.model.ts +++ b/src/app/foundry/foComponent.model.ts @@ -1,44 +1,48 @@ -import { Tools } from './foTools' +import { Tools } from './foTools'; -import { foObject } from './foObject.model' -import { foInstance } from './foInstance.model' +import { foObject } from './foObject.model'; +import { foInstance } from './foInstance.model'; -import { foCollection } from './foCollection.model' +import { foCollection } from './foCollection.model'; export class foComponent extends foInstance { - - - constructor(properties?: any, subcomponents?: Array, parent?: foObject) { - super(properties, subcomponents, parent); - } - - - init(properties?: any, subcomponents?: Array, parent?: foObject) { - - this.myName = properties && properties['myName'] ? properties['myName'] : 'unknown'; - - //create a different behaviour - this.override(properties); - - this._subcomponents = new foCollection(); - subcomponents && subcomponents.forEach(item => this.addSubcomponent(item)); - return this; - } - - - //return a new collection that could be destroyed - subcomponents(): Array { - let result = new foCollection(this._subcomponents.members as Array); - return result.members; - } - - protected toJson(): any { - let concept = this.createdFrom && this.createdFrom(); - let members = concept && concept.extract(this) || {} - return Tools.mixin(super.toJson(), members ); - } - + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, subcomponents, parent); + } + + init(properties?: any, subcomponents?: Array, parent?: foObject) { + this.myName = + properties && properties['myName'] ? properties['myName'] : 'unknown'; + + //create a different behaviour + this.override(properties); + + this._subcomponents = new foCollection(); + subcomponents && subcomponents.forEach(item => this.addSubcomponent(item)); + return this; + } + + //return a new collection that could be destroyed + subcomponents(): Array { + const result = new foCollection(this._subcomponents + .members as Array); + return result.members; + } + + protected toJson(): any { + const concept = this.createdFrom && this.createdFrom(); + const members = (concept && concept.extract(this)) || {}; + return Tools.mixin(super.toJson(), members); + } + + clearAll() { + this.nodes.clearAll(); + } } import { RuntimeType } from './foRuntimeType'; -RuntimeType.define(foComponent); \ No newline at end of file +RuntimeType.define(foComponent); diff --git a/src/app/foundry/foConcept.model.ts b/src/app/foundry/foConcept.model.ts index 86504e4..82a6da1 100644 --- a/src/app/foundry/foConcept.model.ts +++ b/src/app/foundry/foConcept.model.ts @@ -1,260 +1,297 @@ -import { Tools } from './foTools' -import { PubSub } from './foPubSub' +import { Tools, foNames } from './foTools'; +import { PubSub } from './foPubSub'; -import { foKnowledge } from './foKnowledge.model' -import { foDictionary } from './foDictionary.model' -import { foAttribute, foViewAttribute } from './foAttribute.model' -import { Action } from "./foInterface"; +import { foKnowledge } from './foKnowledge.model'; +import { foDictionary } from './foDictionary.model'; +import { foAttribute, foViewAttribute } from './foAttribute.model'; +import { Action } from './foInterface'; -import { foObject } from './foObject.model' -import { foComponent } from './foComponent.model' -import { foNode } from './foNode.model' +import { foObject } from './foObject.model'; +import { foInstance } from './foInstance.model'; +import { foNode } from './foNode.model'; import { RuntimeType } from './foRuntimeType'; import { Lifecycle } from './foLifecycle'; - -class foSubComponentSpec extends foKnowledge { - concept: foKnowledge; - name: string; - order: number = 0; - spec: any = {} +export class foSubComponentSpec extends foKnowledge { + concept: foKnowledge; + name: string; + order: number = 0; + spec: any = {}; } export class foConcept extends foKnowledge { - - - private _create = (properties?: any, subcomponents?: Array, parent?: foObject): T => { - return new foNode(properties, subcomponents, parent); - } - - private _commands: Array = new Array(); - addCommands(...cmds: string[]) { - this._commands && this._commands.push(...cmds) - return this; - } - - get commands(): Array { - return this._commands; - } - - private _primitive: string; - get primitive(): string { return this._primitive; } - set primitive(value: string) { this._primitive = value; } - - private _specification: any; - get specification(): any { return this._specification; } - set specification(value: any) { this._specification = value; } - - - private _attributes: foDictionary; - get attributes() { - if (!this._attributes) { - this._attributes = new foDictionary({ myName: 'attributes' }); - } - return this._attributes; - } - set attributes(value: any) { this._attributes = value; } - - - private _structures: foDictionary; - private addSubComponentSpec(name: string, concept: foKnowledge, properties?: any): foSubComponentSpec { - if (!this._structures) { - this._structures = new foDictionary(); - } - let subSpec = new foSubComponentSpec({ - name, - concept, - order: this._structures.count + 1, - spec: properties || {} - }); - this._structures.addItem(name, subSpec); - return subSpec; + private _create = ( + properties?: any, + subcomponents?: Array, + parent?: foObject + ): T => { + return new foNode(properties, subcomponents, parent); + } + + protected _superclass: Array> = new Array>(); + protected _subclass: Array> = new Array>(); + inheritsFrom(...concepts) { + concepts.forEach(concept => { + this._superclass.push(concept); + concept._subclass.push(this); + }); + return this; + } + + private _commands: Array = new Array(); + addCommands(...cmds: string[]) { + this._commands && this._commands.push(...cmds); + return this; + } + + get commands(): Array { + return this._commands; + } + + private _primitive: string; + get primitive(): string { + return this._primitive; + } + set primitive(value: string) { + this._primitive = value; + } + + private _specification: any; + get specification(): any { + return this._specification; + } + set specification(value: any) { + this._specification = value; + } + + specReadWriteKeys(): string[] { + const keys: string[] = Tools.extractReadWriteKeys(this._specification); + return keys || []; + } + + private _attributes: foDictionary; + get attributes() { + if (!this._attributes) { + this._attributes = new foDictionary({ + myName: 'attributes' + }); } - subComponent(name: string, spec?: any | foKnowledge, properties?: any) { - let structure = spec instanceof foKnowledge ? spec : new foConcept(spec, this); - this.addSubComponentSpec(name, structure, properties); - return this; + return this._attributes; + } + set attributes(value: any) { + this._attributes = value; + } + + private _structures: foDictionary; + private addSubComponentSpec( + name: string, + concept: foKnowledge, + properties?: any + ): foSubComponentSpec { + if (!this._structures) { + this._structures = new foDictionary(); } - get structures(): Array { - if (this._structures) { - return this._structures.members.sort((a, b) => a.order - b.order); - } + const subSpec = new foSubComponentSpec({ + name, + concept, + order: this._structures.count + 1, + spec: properties || {} + }); + this._structures.addItem(name, subSpec); + return subSpec; + } + subComponent(name: string, spec?: any | foKnowledge, properties?: any) { + const structure = + spec instanceof foKnowledge ? spec : new foConcept(spec, this); + this.addSubComponentSpec(name, structure, properties); + return this; + } + get structures(): Array { + if (this._structures) { + return this._structures.members.sort((a, b) => a.order - b.order); } - - private _projections: foDictionary>; - get projections() { - if (!this._projections) { - this._projections = new foDictionary>({ myName: 'projections' }); - } - return this._projections; + } + + private _projections: foDictionary>; + get projections() { + if (!this._projections) { + this._projections = new foDictionary>({ + myName: 'projections' + }); } - set projections(value: any) { this._projections = value; } - - private _onCreation: (obj) => void; - - constructor(properties?: any, parent?: foKnowledge) { - super(properties, parent); + return this._projections; + } + set projections(value: any) { + this._projections = value; + } + + private _onCreation: (obj) => void; + + constructor(properties?: any, parent?: foKnowledge) { + super(properties, parent); + } + + get nameSpace(): string { + return ''; + } + + get classAndNamespace(): string { + if (!Tools.matches(this.myName, foNames.UNKNOWN)) { + const name = this.nameSpace; + if (name) { + return `${name}::${this.myName}`; + } + return this.myName; } - - - definePrimitive(type: { new(p?: any, s?: Array, r?: T): T; }) { - RuntimeType.define(type); - this.primitive = type.name; - this._create = (properties?: any, subcomponents?: Array, parent?: T) => { - return new type(properties, subcomponents, parent); - } - return this; + } + + definePrimitive(type: { new (p?: any, s?: Array, r?: T): T }) { + RuntimeType.define(type); + this.primitive = type.name; + this._create = (properties?: any, subcomponents?: Array, parent?: T) => { + return new type(properties, subcomponents, parent); + }; + return this; + } + + usingRuntimeType(type: string, action: Action) { + const found = RuntimeType.find(type); + const tempHold = this._create; + this._create = (properties?: any, subcomponents?: Array, parent?: T) => { + return new found(properties, subcomponents, parent); + }; + action(this); + this._create = tempHold; + return this; + } + + mixin(obj: any) { + Tools.mixin(this.specification, obj); + return this; + } + + establishAttribute(key: string, spec?: any) { + let attribute = this.attributes.getItem(key); + if (!attribute) { + attribute = new foAttribute(spec, this); + attribute = this.attributes.addItem(key, attribute); + attribute.myName = key; + + PubSub.Pub('attribute', ['added', this, attribute]); } - - usingRuntimeType(type: string, action: Action) { - let found = RuntimeType.find(type); - let tempHold = this._create; - this._create = (properties?: any, subcomponents?: Array, parent?: T) => { - return new found(properties, subcomponents, parent); - } - action(this); - this._create = tempHold; - return this; - } - - mixin(obj:any){ - Tools.mixin(this.specification,obj); - return this; - } - - - establishAttribute(key: string, spec?: any) { - let attributes = this.attributes; - let attribute = attributes.getItem(key); - if (!attribute) { - attribute = new foAttribute(spec, this); - attribute = attributes.addItem(key, attribute); - attribute.myName = key; - - PubSub.Pub("attribute", ["added", this, attribute]); - } - return attribute; + return attribute; + } + + establishProjection(key: string, spec?: any) { + let projection = this.projections.getItem(key); + if (!projection) { + projection = new foProjection(this, spec); + this.projections.addItem(key, projection); + projection.myName = key; } - - - establishProjection(key: string, spec?: any) { - let projections = this.projections; - let projection = projections.getItem(key); - if (!projection) { - projection = new foProjection(this, spec); - projections.addItem(key, projection); - projection.myName = key; - } - return projection; + return projection; + } + + get debug() { + const result = { + base: this, + specification: this._specification, + primitive: this._primitive, + attributes: this._attributes, + projections: this._projections + }; + return Tools.stringify(result); + } + + protected toJson(): any { + return Tools.mixin(super.toJson(), { + primitive: this.primitive, + specification: this._specification, + attributes: Tools.asArray(this.attributes.asJson), + projections: Tools.asArray(this.projections.asJson) + }); + } + + extractReadWriteKeys(target: any, spec?: any) { + const result = spec || {}; + this.specReadWriteKeys().forEach(key => { + result[key] = target[key]; + }); + return result; + } + + makeComponent(parent?: any, properties?: any, onComplete?: Action): any { + const spec = Tools.union(this.specification, properties); + + const result = this.newInstance(spec, [], parent) as T; + if (result instanceof foInstance) { + result.setCreatedFrom(this); } + parent && parent.addSubcomponent(result); - get debug() { - let result = { - base: this, - specification: this._specification, - primitive: this._primitive, - attributes: this._attributes, - projections: this._projections, - } - return Tools.stringify(result); - } + result && onComplete && onComplete(result); + return result; + } - protected toJson(): any { - return Tools.mixin(super.toJson(), { - primitive: this.primitive, - specification: this._specification, - attributes: Tools.asArray(this.attributes.asJson), - projections: Tools.asArray(this.projections.asJson), - }); - } + //newInstance(properties?: any, subcomponents?: Array, parent?: T): T { + newInstance(properties?: any, subcomponents?: any, parent?: any): T { + const spec = Tools.union(this.specification, properties); + const result = this._create(spec, subcomponents, parent) as T; - extract(target: any) { - let result = {}; - Object.keys(this.specification).forEach(key => { - result[key] = target[key] - }) - return result; + if (result instanceof foInstance) { + result.setCreatedFrom(this); } + result.myClass = this.classAndNamespace; - makeComponent(parent?: any, properties?: any, onComplete?: Action): any { - let spec = Tools.union(this.specification, properties); - - let result = this.newInstance(spec, [], parent) as T; - if (result instanceof foComponent) { - result.setCreatedFrom(this); - } - parent && parent.addSubcomponent(result); + result.initialize(); + this._onCreation && this._onCreation(result); + Lifecycle.created(result, this); - result && onComplete && onComplete(result); - return result; - } - - //newInstance(properties?: any, subcomponents?: Array, parent?: T): T { - newInstance(properties?: any, subcomponents?: any, parent?: any): T { - let spec = Tools.union(this.specification, properties); - let result = this._create(spec, subcomponents, parent) as T; - result.myClass = this.myName; - - result.initialize(); - this._onCreation && this._onCreation(result); - Lifecycle.created(result, this); - - this.structures && this.structures.forEach(item => { - let concept = item.concept; - concept.makeComponent(result, item.spec, child => { - child.defaultName(item.name); - }); + this.structures && + this.structures.forEach(item => { + const concept = item.concept; + concept.makeComponent(result, item.spec, child => { + child.defaultName(item.name); }); + }); - return result; - } - - onCreation(func: (obj) => void) { - this._onCreation = func; - return this; - } - + return result; + } + onCreation(func: (obj) => void) { + this._onCreation = func; + return this; + } } - RuntimeType.knowledge(foConcept); - - - - export class foProjection extends foConcept { - - private _mySource: foConcept = undefined; - - constructor(source: foConcept, properties?: any) { - super(properties); - this._mySource = source; - - PubSub.Sub("attribute", (action, source, attribute) => { - if (this._mySource === source) { - // let view = this.establishViewAttribute(attribute) - } - }); - } - - establishViewAttribute(attribute: foAttribute, spec: any = undefined) { - let attributes = this.attributes; - let key = attribute.myName; - let view = attributes.getItem(key); - if (!view) { - view = new foViewAttribute(attribute, spec); - this.attributes.addItem(key, view); - view.myName = key; - - } - return view; + private _mySource: foConcept = undefined; + + constructor(source: foConcept, properties?: any) { + super(properties); + this._mySource = source; + + PubSub.Sub('attribute', (action, obj, attribute) => { + if (this._mySource === obj) { + // let view = this.establishViewAttribute(attribute) + } + }); + } + + establishViewAttribute(attribute: foAttribute, spec: any = undefined) { + const attributes = this.attributes; + const key = attribute.myName; + let view = attributes.getItem(key); + if (!view) { + view = new foViewAttribute(attribute, spec); + this.attributes.addItem(key, view); + view.myName = key; } + return view; + } } RuntimeType.knowledge(foProjection); - - - diff --git a/src/app/foundry/foController.ts b/src/app/foundry/foController.ts new file mode 100644 index 0000000..009107b --- /dev/null +++ b/src/app/foundry/foController.ts @@ -0,0 +1,62 @@ +import { foObject } from './foObject.model'; + +//SRS integrate mYName , DisplayName and isVisible into command rendering + +export class foCommand extends foObject { + doAction: () => void; + getLabel: () => string; + + constructor(myName: string, doAction: () => void, getLabel?: () => string) { + super(); + this.myName = myName; + this.doAction = doAction; + this.getLabel = getLabel ? getLabel : () => { return this.myName; }; + } +} + +export class foToggle extends foObject { + doToggle: () => void; + getState: () => any; + getLabel: () => string; + + constructor( + myName: string, + doToggle: () => void, + getState: () => any, + getLabel?: () => string + ) { + super(); + this.myName = myName; + this.doToggle = doToggle; + this.getState = getState; + this.getLabel = getLabel ? getLabel : () => { return this.myName; }; + } +} + +export class foController extends foObject { + constructor() { + super(); + } + + private _commands: Array = new Array(); + addCommands(...cmds: foCommand[]) { + this._commands.push(...cmds); + this._toggle.forEach(item => !item.hasParent && item.setParent(this)); + return this; + } + + get commands(): Array { + return this._commands; + } + + private _toggle: Array = new Array(); + addToggle(...cmds: foToggle[]) { + this._toggle.push(...cmds); + this._toggle.forEach(item => !item.hasParent && item.setParent(this)); + return this; + } + + get toggles(): Array { + return this._toggle; + } +} diff --git a/src/app/foundry/foDictionaries.ts b/src/app/foundry/foDictionaries.ts index 1867505..fb1196f 100644 --- a/src/app/foundry/foDictionaries.ts +++ b/src/app/foundry/foDictionaries.ts @@ -2,30 +2,30 @@ import { Action, Spec } from '../foundry/foInterface'; -import { foKnowledge } from './foKnowledge.model' -import { foDictionary } from './foDictionary.model' -import { foConcept } from './foConcept.model' -import { foModel, foContext } from './foModel.model' -import { foComponent } from './foComponent.model' -import { foStructure } from './foStructure.model' -import { foSolution } from './foSolution.model' -import { foProperty } from './foProperty.model' +import { foKnowledge } from './foKnowledge.model'; +import { foDictionary } from './foDictionary.model'; +import { foConcept } from './foConcept.model'; +import { foModel, foContext } from './foModel.model'; +import { foComponent } from './foComponent.model'; +import { foStructure } from './foStructure.model'; +import { foSolution } from './foSolution.model'; +import { foProperty } from './foProperty.model'; import { foMethod, foFactory } from './foMethod.model'; -import { foNode } from './foNode.model' +import { foNode } from './foNode.model'; import { Knowcycle } from './foLifecycle'; import { RuntimeType } from './foRuntimeType'; -export class SolutionDictionary extends foDictionary{ +export class SolutionDictionary extends foDictionary { public establish = (name: string): foKnowledge => { this.findItem(name, () => { - this.addItem(name, new foSolution({ myName: name })) - }) + this.addItem(name, new foSolution({ myName: name })); + }); return this.getItem(name); } public define(key: string, properties?: any): foSolution { - let parent = this.myParent() as foKnowledge; + const parent = this.myParent() as foKnowledge; let solution = this.getItem(key) as foSolution; if (!solution) { solution = new foSolution(properties, parent); @@ -39,16 +39,16 @@ export class SolutionDictionary extends foDictionary{ } } -export class StructureDictionary extends foDictionary{ +export class StructureDictionary extends foDictionary { public establish = (name: string): foKnowledge => { this.findItem(name, () => { - this.addItem(name, new foStructure({ myName: name })) - }) + this.addItem(name, new foStructure({ myName: name })); + }); return this.getItem(name); } public define(key: string, properties?: any): foStructure { - let parent = this.myParent() as foKnowledge; + const parent = this.myParent() as foKnowledge; let structure = this.getItem(key) as foStructure; if (!structure) { structure = new foStructure(properties, parent); @@ -62,18 +62,18 @@ export class StructureDictionary extends foDictionary{ } } -export class ConceptDictionary extends foDictionary{ +export class ConceptDictionary extends foDictionary { public establish = (name: string): foKnowledge => { this.findItem(name, () => { - this.addItem(name, new foConcept({ myName: name })) - }) + this.addItem(name, new foConcept({ myName: name })); + }); return this.getItem(name); } public define(key: string, type: { new(p?: any, s?: Array, r?: foComponent): foComponent; }, specification?: any): foConcept { let concept = this.getItem(key) as foConcept; if (!concept) { - let parent = this.myParent() as foKnowledge; + const parent = this.myParent() as foKnowledge; RuntimeType.define(type); concept = new foConcept({}, parent); concept.definePrimitive(type); @@ -89,18 +89,18 @@ export class ConceptDictionary extends foDictionary{ } } -export class ContextDictionary extends foDictionary{ +export class ContextDictionary extends foDictionary { public establish = (name: string): foKnowledge => { this.findItem(name, () => { - this.addItem(name, new foContext({ myName: name })) - }) + this.addItem(name, new foContext({ myName: name })); + }); return this.getItem(name); } public define(key: string, type: { new(p?: any, s?: Array, r?: foComponent): foComponent; }, specification?: any): foContext { let context = this.getItem(key) as foContext; if (!context) { - let parent = this.myParent() as foKnowledge; + const parent = this.myParent() as foKnowledge; RuntimeType.define(type); context = new foContext({}, parent); context.definePrimitive(type); @@ -116,19 +116,19 @@ export class ContextDictionary extends foDictionary{ } } -export class PropertyDictionary extends foDictionary{ +export class PropertyDictionary extends foDictionary { public establish = (name: string): foProperty => { this.findItem(name, () => { - this.addItem(name, new foProperty({ myName: name })) - }) + this.addItem(name, new foProperty({ myName: name })); + }); return this.getItem(name); } public define(key: string, properties: any): foProperty { let property = this.getItem(key); if (!property) { - let parent = this.myParent() as foKnowledge; - property = new foProperty(properties, parent) + const parent = this.myParent() as foKnowledge; + property = new foProperty(properties, parent); this.add(property, key); Knowcycle.defined(property); } @@ -139,11 +139,11 @@ export class PropertyDictionary extends foDictionary{ } } -export class ActionDictionary extends foDictionary>{ +export class ActionDictionary extends foDictionary> { public establish = (myName: string, funct: Action): foMethod => { this.findItem(myName, () => { this.addItem(myName, new foMethod(funct, { myName })); - }) + }); return this.getItem(myName); } @@ -152,11 +152,11 @@ export class ActionDictionary extends foDictionary } } -export class FactoryDictionary extends foDictionary>{ +export class FactoryDictionary extends foDictionary> { public establish = (myName: string, funct: Spec): foFactory => { this.findItem(myName, () => { - this.addItem(myName, new foFactory(funct, { myName })) - }) + this.addItem(myName, new foFactory(funct, { myName })); + }); return this.getItem(myName); } diff --git a/src/app/foundry/foDictionary.model.ts b/src/app/foundry/foDictionary.model.ts index 3108358..3392a22 100644 --- a/src/app/foundry/foDictionary.model.ts +++ b/src/app/foundry/foDictionary.model.ts @@ -1,7 +1,7 @@ -import { Tools } from './foTools' +import { Tools } from './foTools'; -import { foObject } from './foObject.model' -import { iObject } from './foInterface' +import { foObject } from './foObject.model'; +import { iObject } from './foInterface'; export class foDictionary extends foObject { @@ -12,11 +12,11 @@ export class foDictionary extends foObject { } find(key: string): T { - let result: T = this._lookup[key]; + const result: T = this._lookup[key]; return result; } - add(obj: T, key?:string): T { + add(obj: T, key?: string): T { if ( key ) obj.myName = key; return this.addItem(obj.myName, obj); } @@ -31,13 +31,13 @@ export class foDictionary extends foObject { } removeItem(key: string): T { - let obj = this._lookup[key]; + const obj = this._lookup[key]; delete this._lookup[key]; return obj; } getItem(key: string): T { - let result: T = this._lookup[key]; + const result: T = this._lookup[key]; return result; } @@ -53,7 +53,7 @@ export class foDictionary extends foObject { } found(key: string, onFound?, onMissing?): T { - let found = this.findItem(key, onMissing, onFound); + const found = this.findItem(key, onMissing, onFound); return found; } @@ -70,45 +70,69 @@ export class foDictionary extends foObject { } get members(): Array { - let keys = this.keys; - let list = keys.map(key => this._lookup[key]); + const keys = this.keys; + const list = keys.map(key => this._lookup[key]); return list; } get publicMembers(): Array { - let list = this.members.filter(item => item.isPublic) + const list = this.members.filter(item => item.isPublic); return list; } get values() { - let result = this._lookup; + const result = this._lookup; return result; } mapMembers(mapFunc) { //funct has 2 args.. key,value - let keys = this.keys; - let list = keys.map(key => mapFunc(this._lookup[key])); + const keys = this.keys; + const list = keys.map(key => mapFunc(this._lookup[key])); return list; - }; + } forEachKeyValue(mapFunc) { //funct has 2 args.. key,value - let keys = this.keys; + const keys = this.keys; keys.forEach(key => { - let value = this._lookup[key]; + const value = this._lookup[key]; mapFunc(key, value); }); - }; + } + + mapKeyValue(mapFunc) { //funct has 2 args.. key,value + const result = []; + const keys = this.keys; + keys.forEach(key => { + const value = this._lookup[key]; + result.push(mapFunc(key, value)); + }); + return result; + } applyTo(mapFunc) { //funct has 1 args.. value - for (let key in this._lookup) { - let value = this._lookup[key]; + for (const key in this._lookup) { + const value = this._lookup[key]; mapFunc(value); - }; - }; + } + } protected toJson(): any { return Tools.mixin(super.toJson(), this.jsonMerge(this._lookup)); } + public deHydrate(context?: any, deep: boolean = true) { + const data = { + subcomponents: [] + }; + + if (deep ) { + data.subcomponents = this.mapKeyValue((key, item) => { + const child = item.deHydrate(context, deep); + return child; + }); + } + return data; + } + } diff --git a/src/app/foundry/foFileManager.ts b/src/app/foundry/foFileManager.ts new file mode 100644 index 0000000..f2bbbf4 --- /dev/null +++ b/src/app/foundry/foFileManager.ts @@ -0,0 +1,225 @@ +import { Tools } from './foTools' +import { PubSub } from './foPubSub' +import { foInstance } from './foInstance.model' + +// ES2015+ https://www.npmjs.com/package/savery +import savery from 'savery'; + +// Feature detect + local reference +export let clientStorage = (function () { + let uid = (new Date()).toISOString(); + try { + localStorage.setItem(uid, uid); + let result = localStorage.getItem(uid) == uid; + localStorage.removeItem(uid); + return result && localStorage; + } catch (exception) { } +}()); + +export class fileSpec { + payload: string; + name: string; + ext: string; + + constructor(payload: string, name: string, ext: string) { + this.payload = payload; + this.name = name; + this.ext = ext; + } + + get filename() { + return `${this.name}${this.ext}`; + } + + static setFilenameExt(filenameExt:string, defaultExt?:string){ + let list = filenameExt.split('.'); + let name:string; + let ext:string; + + if ( list.length == 1){ + name = filenameExt; + ext = defaultExt; + } else { + ext = list[list.length-1]; + name = filenameExt.replace(ext,''); + } + return new fileSpec('', name, ext) + } +} + +export class foFileManager { + isTesting: boolean = false; + files: any = {} + + constructor(test: boolean = false) { + this.isTesting = test; + } + + private writeBlobFile(blob, filenameExt: string, onSuccess?, onFail?) { + savery.save(blob, filenameExt) + .then(obj => { + onSuccess && onSuccess(); + }) + .catch(obj => { + onFail && onFail(obj.error); + }); + }; + + private readBlobFile(file, onComplete: (item: string) => void) { + let reader = new FileReader(); + reader.onload = (evt) => { + let payload = evt.target['result']; + if (onComplete) { + onComplete(payload); + } + } + reader.readAsText(file); + }; + + private writeBlobLocal(blob, filenameExt: string, onSuccess?, onFail?) { + this.files[filenameExt] = blob; + onSuccess && onSuccess(); + }; + + private readBlobLocal(filenameExt: string, onSuccess?: (item: string) => void, onFail?) { + let reader = new FileReader(); + let blob = this.files[filenameExt]; + + if (blob) { + reader.readAsText(blob) + reader.onload = (evt) => { + let result = evt.target['result']; + onSuccess && onSuccess(result); + } + } else { + onFail && onFail(); + } + }; + + writeTextAsBlob(payload, name: string, ext: string = '.json', onSuccess?: (item: string) => void) { + let filenameExt = `${name}${ext}`; + let data = Tools.isString(payload) ? payload : JSON.stringify(payload, undefined, 3) + let blob = new Blob([data], { type: "text/plain;charset=utf-8" }); + if (this.isTesting) { + this.writeBlobLocal(blob, filenameExt, onSuccess); + } else { + this.writeBlobFile(blob, filenameExt, onSuccess); + } + }; + + readTextAsBlob(name: string | File, ext: string = '.json', onSuccess?) { + let filenameExt = `${name}${ext}`; + if (this.isTesting) { + this.readBlobLocal(filenameExt, onSuccess); + } else { + this.readBlobFile(name, onSuccess); + } + }; + + rehydrationTest(instance: foInstance, deep: boolean = true, done: (obj: any) => void) { + let source = instance.createdFrom(); + let body = instance.deHydrate(); + + let data = JSON.stringify(body) + let json = JSON.parse(data); + let result = source.makeComponent(undefined, json); + done(result) + + return instance.isEqualTo(result, deep) + } + + integretyTest(instance: foInstance, deep: boolean = true, done: (obj: any) => void) { + this.isTesting = true; + let ext = '.json' + let fileName = instance.myGuid; + + let source = instance.createdFrom(); + let body = instance.deHydrate(); + let data = JSON.stringify(body) + + this.writeTextAsBlob(data, fileName, ext, () => { + this.readTextAsBlob(fileName, ext, item => { + let json = JSON.parse(item); + let result = source.makeComponent(undefined, json); + done(result) + }) + }); + } + + writeTextFileAsync(payload, name, ext, onComplete: (item: fileSpec) => void) { + this.writeTextAsBlob(payload, name, ext); + let result = new fileSpec(payload, name, ext) + onComplete && onComplete(result) + + PubSub.Pub('textFileSaved', [result]); + }; + + readTextFileAsync(file, ext, onComplete: (item: fileSpec) => void) { + this.readTextAsBlob(file, ext, (payload) => { + + let filename = file.name; + let name = filename.replace(ext, ''); + + let result = new fileSpec(payload, name, ext) + + onComplete && onComplete(result) + PubSub.Pub('textFileDropped', [result]); + }) + }; + + readImageFileAsync(file, ext, onComplete: (item: fileSpec) => void) { + let reader = new FileReader(); + reader.onload = (evt) => { + let filename = file.name; + let name = filename.replace(ext, ''); + let payload = evt.target['result']; + let result = new fileSpec(payload, name, ext) + onComplete && onComplete(result) + PubSub.Pub('imageFileDropped', [result]); + } + reader.readAsDataURL(file); + } + + + userOpenFileDialog(onComplete: (item: fileSpec) => void, defaultExt: string, defaultValue: string) { + + //http://stackoverflow.com/questions/181214/file-input-accept-attribute-is-it-useful + //accept='image/*|audio/*|video/*' + let accept = defaultExt || '.knt,.csv'; + + let fileSelector = document.createElement('input'); + fileSelector.setAttribute('type', 'file'); + fileSelector.setAttribute('accept', accept); + fileSelector.setAttribute('value', defaultValue); + fileSelector.setAttribute('style', 'visibility: hidden; width: 0px; height: 0px'); + //fileSelector.setAttribute('multiple', 'multiple'); + document.body.appendChild(fileSelector); + + fileSelector.onchange = (event) => { + let extensionExtract = /\.[0-9a-z]+$/i; + + let files = fileSelector.files; + let count = files.length; + let file = count > 0 && files[0]; + let extension = file ? file.name.match(extensionExtract) : ['']; + let ext = extension[0]; + document.body.removeChild(fileSelector); + if (!file) { + + } + else if (file.type.startsWith('image')) { + this.readImageFileAsync(file, ext, onComplete); + } + else if ( + Tools.matches(ext, '.knt') || + Tools.matches(ext, '.csv') || + Tools.matches(ext, '.json') || + Tools.matches(ext, '.txt')) { + this.readTextFileAsync(file, ext, onComplete); + } + } + + fileSelector.click && fileSelector.click(); + } +} + diff --git a/src/app/foundry/foGlyph.model.ts b/src/app/foundry/foGlyph.model.ts index 1c4b39d..2b8b4d2 100644 --- a/src/app/foundry/foGlyph.model.ts +++ b/src/app/foundry/foGlyph.model.ts @@ -2,208 +2,269 @@ import { Tools } from './foTools'; import { foObject } from './foObject.model'; import { foCollection } from './foCollection.model'; +import { foDictionary } from './foDictionary.model'; import { foNode } from './foNode.model'; import { foInstance } from './foInstance.model'; import { foHandle } from './foHandle'; import { Lifecycle } from './foLifecycle'; +export class GlyphDictionary extends foDictionary { + public establish = (name: string): foNode => { + this.findItem(name, () => { + this.addItem(name, new foGlyph({ myName: name })); + }); + return this.getItem(name); + } + + constructor(properties?: any, parent?: foObject) { + super(properties, parent); + } + + selectGlyph( + where: WhereClause, + list?: foCollection, + deep: boolean = true + ): foCollection { + const result = list ? list : new foCollection(); + + this.forEachKeyValue((key, value) => { + if (where(value)) { result.addMember(value); } + deep && value.selectGlyph(where, result, deep); + }); + + return result; + } +} //a Glyph is a graphic designed to draw on a canvas in absolute coordinates -export class foGlyph extends foInstance { //foNode { - - static DEG_TO_RAD = Math.PI / 180; - static RAD_TO_DEG = 180 / Math.PI; - - protected _subcomponents: foCollection; - get nodes(): foCollection { - return this._subcomponents; - } - protected _handles: foCollection; - get handles(): foCollection { - this._handles || this.createHandles(); - return this._handles; - } - - protected _isSelected: boolean = false; - protected _opacity: number; - protected _color: string; - - public context: any; - - - get opacity(): number { return this._opacity || 1; } - set opacity(value: number) { this._opacity = value; } - - get color(): string { - return this._color || 'black'; +export class foGlyph extends foInstance { + static DEG_TO_RAD = Math.PI / 180; + static RAD_TO_DEG = 180 / Math.PI; + + protected _subcomponents: foCollection; + get nodes(): foCollection { + return this._subcomponents; + } + protected _handles: foCollection; + get handles(): foCollection { + this._handles || this.createHandles(); + return this._handles; + } + + protected _isSelected: boolean = false; + protected _opacity: number; + protected _color: string; + + public context: any; + + get opacity(): number { + return this._opacity || 1; + } + set opacity(value: number) { + this._opacity = value; + } + + get color(): string { + return this._color || 'black'; + } + set color(value: string) { + this._color = value; + } + + get isSelected(): boolean { + return this._isSelected; + } + set isSelected(value: boolean) { + if (this._isSelected !== value) { + this._isSelected = value; + Lifecycle.selected(this, value); } - set color(value: string) { - this._color = value; - } - - get isSelected(): boolean { return this._isSelected; } - set isSelected(value: boolean) { - if (this._isSelected != value) { - this._isSelected = value; - Lifecycle.selected(this, value); - }; + } + + protected _layout: () => void; + public setLayout(func: () => void) { + this._layout = func; + return this; + } + public doLayout(deep: boolean = true) { + if (deep) { + this.nodes.forEach(item => item.doLayout()); } - - - protected _layout: () => void; - public setLayout(func: () => void) { - this._layout = func; - return this; + this._layout && this.wait(1000, this._layout); + return this; + } + + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, subcomponents, parent); + } + + is2D() { + return false; + } + is3D() { + return false; + } + + protected toJson(): any { + return Tools.mixin(super.toJson(), { + opacity: this.opacity, + color: this.color + }); + } + + public initialize( + x: number = Number.NaN, + y: number = Number.NaN, + ang: number = Number.NaN + ) { + return this; + } + + public LifecycleCreated() { + Lifecycle.created(this); + return this; + } + + public LifecycleDestroyed() { + Lifecycle.destroyed(this); + return this; + } + + public LifecycleCommand(method: string) { + Lifecycle.command(this, method); + return this; + } + + public LifecycleAction(method: string, params?: any) { + Lifecycle.action(this, method, params); + return this; + } + + public didLocationChange( + x: number = Number.NaN, + y: number = Number.NaN, + angle: number = Number.NaN + ): boolean { + return false; + } + + destroyed(obj: foNode) { + this.removeSubcomponent(obj); + Lifecycle.destroyed(obj); + return obj; + } + + removeSubcomponent(obj: foNode) { + super.removeSubcomponent(obj); + Lifecycle.unparent(obj); + return obj; + } + + addSubcomponent(obj: foNode, properties?: any) { + super.addSubcomponent(obj, properties); + Lifecycle.reparent(obj); + return obj; + } + + public getLocation = (): any => { + return { + x: 0, + y: 0, + z: 0 }; - public doLayout(deep: boolean = true) { - if (deep) { - this.nodes.forEach(item => item.doLayout()); - } + } - this._layout && this.wait(1000, this._layout); - return this; + public pinLocation(): any { + return { + x: 0, + y: 0, + z: 0 }; - - - constructor(properties?: any, subcomponents?: Array, parent?: foObject) { - super(properties, subcomponents, parent); + } + + public dropAt( + x: number = Number.NaN, + y: number = Number.NaN, + angle: number = Number.NaN + ) { + if (this.didLocationChange(x, y, angle)) { + Lifecycle.dropped(this, this.getLocation()); } - - is2D() { return false; } - is3D() { return false; } - - - - protected toJson(): any { - return Tools.mixin(super.toJson(), { - opacity: this.opacity, - color: this.color, + return this; + } + + unSelect(deep: boolean = true, exclude: foGlyph = null) { + this.isSelected = this === exclude ? this.isSelected : false; + this._handles && this._handles.forEach(item => (item.color = 'black')); + deep && + this.Subcomponents.forEach(item => { + (item).unSelect(deep, exclude); + }); + } + + selectGlyph( + where: WhereClause, + list?: foCollection, + deep: boolean = true + ): foCollection { + const result = list ? list : new foCollection(); + + this.nodes.forEach(value => { + if (where(value)) { result.addMember(value); } + deep && value.selectGlyph(where, result, deep); + }); + + return result; + } + + protected generateHandles( + spec?: Array, + proxy?: Array + ): foCollection { + let i = 0; + if (!this._handles) { + this._handles = new foCollection(); + spec && + spec.forEach(item => { + const type = item.myType ? item.myType : RuntimeType.define(foHandle); + const handle = new type(item, undefined, this); + handle.doMoveProxy = proxy && proxy[i]; + this._handles.addMember(handle); + i++; + }); + } else { + spec && + spec.forEach(item => { + const handle = this._handles.getChildAt(i); + handle.override(item); + handle.doMoveProxy = proxy && proxy[i]; + i++; }); } + return this._handles; + } - public initialize(x: number = Number.NaN, y: number = Number.NaN, ang: number = Number.NaN) { - return this; - } - - public LifecycleCreated() { - Lifecycle.created(this) - return this; - } - - public LifecycleDestroyed() { - Lifecycle.destroyed(this) - return this; - } - - public LifecycleCommand(method: string) { - Lifecycle.command(this, method); - return this; - } - - public LifecycleAction(method: string, params?: any) { - Lifecycle.action(this, method, params) - return this; - } - - public didLocationChange(x: number = Number.NaN, y: number = Number.NaN, angle: number = Number.NaN): boolean { - return false; - } - - destroyed(obj: foNode) { - this.removeSubcomponent(obj); - Lifecycle.destroyed(obj); - return obj; - } - - removeSubcomponent(obj: foNode) { - super.removeSubcomponent(obj); - Lifecycle.unparent(obj); - return obj; - } - - addSubcomponent(obj: foNode, properties?: any) { - super.addSubcomponent(obj, properties); - Lifecycle.reparent(obj); - return obj; - } - - - - public getLocation = ():any => { - return { - x: 0, - y: 0, - z: 0, - } - } - - public pinLocation():any { - return { - x: 0, - y: 0, - z: 0, - } - } - - unSelect(deep: boolean = true, exclude: foGlyph = null) { - this.isSelected = this == exclude ? this.isSelected : false; - this._handles && this._handles.forEach(item => item.color = 'black') - deep && this.Subcomponents.forEach(item => { - (item).unSelect(deep, exclude); - }) - } - - - - - - protected generateHandles(spec?: Array, proxy?: Array): foCollection { - - let i = 0; - if (!this._handles) { - this._handles = new foCollection() - spec && spec.forEach(item => { - let type = item.myType ? item.myType : RuntimeType.define(foHandle) - let handle = new type(item, undefined, this); - handle.doMoveProxy = proxy && proxy[i] - this._handles.addMember(handle); - i++; - }); - } else { - spec && spec.forEach(item => { - let handle = this._handles.getChildAt(i) - handle.override(item); - handle.doMoveProxy = proxy && proxy[i]; - i++; - }); - } - return this._handles; - } - - public createHandles(): foCollection { - - let spec = [ - ]; - - return this.generateHandles(spec); - } - - public getHandle(name: string): foHandle { - if (!this._handles) return; - return this._handles.findMember(name); - } + public createHandles(): foCollection { + const spec = []; + return this.generateHandles(spec); + } + public getHandle(name: string): foHandle { + if (!this._handles) { return; } + return this._handles.findMember(name); + } - toggleSelected() { - this.isSelected = !this.isSelected; - } + toggleSelected() { + this.isSelected = !this.isSelected; + } } import { RuntimeType } from './foRuntimeType'; +import { WhereClause } from './foInterface'; RuntimeType.define(foGlyph); - - - - diff --git a/src/app/foundry/foHandle.ts b/src/app/foundry/foHandle.ts index 58470d7..9a10764 100644 --- a/src/app/foundry/foHandle.ts +++ b/src/app/foundry/foHandle.ts @@ -1,56 +1,51 @@ - -import { Tools } from './foTools'; - - -import { iName, iFrame } from './foInterface'; -import { cFrame } from './shapes/foGeometry2D'; - import { foObject } from './foObject.model'; -import { foCollection } from './foCollection.model'; -import { foNode } from './foNode.model'; - -import { Lifecycle } from './foLifecycle'; - -export class foHandle extends foNode { - doMoveProxy: (loc: any) => void; - - protected _size: number; - protected _opacity: number; - protected _color: string; - - get size(): number { return this._size || 10.0; } - set size(value: number) { this._size = value; } - - get opacity(): number { return this._opacity || 1; } - set opacity(value: number) { this._opacity = value; } - - get color(): string { - return this._color || 'black'; - } - set color(value: string) { - this._color = value; - } - - constructor(properties?: any, subcomponents?: Array, parent?: foObject) { - super(properties, subcomponents, parent); - } - - public pinLocation() { - let loc = this.size / 2 - return { - x: loc, - y: loc, - z: loc, - } - } - +import { foInstance } from './foInstance.model'; + +export class foHandle extends foInstance { + doMoveProxy: (loc: any) => void; + + protected _size: number; + protected _opacity: number; + protected _color: string; + + get size(): number { + return this._size || 10.0; + } + set size(value: number) { + this._size = value; + } + + get opacity(): number { + return this._opacity || 1; + } + set opacity(value: number) { + this._opacity = value; + } + + get color(): string { + return this._color || 'black'; + } + set color(value: string) { + this._color = value; + } + + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, subcomponents, parent); + } + + public pinLocation() { + const loc = this.size / 2; + return { + x: loc, + y: loc, + z: loc + }; + } } - - import { RuntimeType } from './foRuntimeType'; RuntimeType.define(foHandle); - - - - diff --git a/src/app/foundry/foHydrationManager.ts b/src/app/foundry/foHydrationManager.ts new file mode 100644 index 0000000..3dc82e2 --- /dev/null +++ b/src/app/foundry/foHydrationManager.ts @@ -0,0 +1,133 @@ +import { Tools } from './foTools'; + +import { IDisposable } from './foObject.model'; +import { foInstance } from './foInstance.model'; +import { foKnowledge } from './foKnowledge.model'; + +import { RuntimeType } from './foRuntimeType'; +import { foPage } from './shapes/foPage.model'; +import { foModel } from './foModel.model'; +import { foWorkspace } from './foWorkspace.model'; + +export class foHydrationManager implements IDisposable { + workspace: foWorkspace; + isTesting: boolean = false; + files: any = {}; + + constructor(context: foWorkspace, test: boolean = false) { + this.workspace = context; + this.isTesting = test; + } + + dispose() { + delete this.workspace; + } + + public deHydrate(source: foInstance | foKnowledge): any { + const result: any = { + author: '', + version: 'xxx', + sessionId: '', + creationDate: new Date().toISOString() + }; + + const { myType, myGuid, myName } = source; + + result['myGuid'] = myGuid; + result['myType'] = myType; + result['myName'] = myName; + result[myType] = source.deHydrate(); + + return result; + } + + public reHydrate(json: any) { + const { myType, myName } = json; + + const type = RuntimeType.find(myType); + const payload = json[myType]; + const data = this.extractSpec(payload); + + if (type === foPage) { + const page = this.workspace.document.findPage(myName); + page && this.hydrateInstance(page, data); + this.reHydrateModel(page, payload.subcomponents, true); + } + + if (type === foModel) { + const model = this.workspace.model.establish(myName); + model && this.hydrateInstance(model, data); + this.reHydrateModel(model, payload.subcomponents, true); + } + } + + private extractSpec(json: any) { + const spec = {}; + Tools.forEachKeyValue(json, (key, value) => { + if (!Tools.matches(key, 'subcomponents')) { + spec[key] = value; + } + }); + return spec; + } + + private reHydrateModel( + parent: foInstance, + json: any, + rename: boolean = false + ) { + const list = []; + json && + json.forEach(spec => { + const data = this.extractSpec(spec); + const { subcomponents, myName, myGuid } = spec; + + let found = parent.nodes.find( + child => child.myName === myName || child.myName === myGuid + ); + + if (found) { + found.reHydrate(data); + } else { + found = this.establishInstance(data); + list.push(found); + } + + rename && found.generateName(); + subcomponents && this.reHydrateModel(found, subcomponents, false); + }); + + list.forEach(found => { + found.addAsSubcomponent(parent); + }); + } + + private establishInstance(spec: any): foInstance { + const { myClass, myType } = spec; + + const concept = this.workspace + .select(item => Tools.matches(item.myName, myClass)) + .first(); + + let obj = concept && concept.newInstance(spec); + if (obj) { return obj; } + + const type = RuntimeType.find(myType); + obj = RuntimeType.create(type, spec); + + return obj; + } + + private hydrateInstance(obj: foInstance, json: any) { + if (!obj) { return false; } + + const { myClass, myName, myType } = json; + + if (obj.myClass !== myClass) { return false; } + if (obj.myName !== myName) { return false; } + if (obj.myType !== myType) { return false; } + + const data = this.extractSpec(json); + obj.reHydrate(data); + } +} diff --git a/src/app/foundry/foInstance.model.ts b/src/app/foundry/foInstance.model.ts index a86723b..667aef3 100644 --- a/src/app/foundry/foInstance.model.ts +++ b/src/app/foundry/foInstance.model.ts @@ -1,39 +1,119 @@ -import { Tools, foNames } from './foTools' -import { iObject, iNode, Action } from './foInterface' +import { Tools } from './foTools'; -import { foObject } from './foObject.model' -import { foNode } from './foNode.model' -import { foCollection } from './foCollection.model' -import { foKnowledge } from './foKnowledge.model' +import { foObject } from './foObject.model'; +import { foNode } from './foNode.model'; + +import { foCollection } from './foCollection.model'; +import { foKnowledge } from './foKnowledge.model'; export class foInstance extends foNode { + public createdFrom: () => foKnowledge; + setCreatedFrom(source: any) { + this.createdFrom = () => { + return source; + }; + } - public createdFrom: () => foKnowledge; - setCreatedFrom(source:any) { - this.createdFrom = () => { return source; }; - this.myClass = source.myName; - } + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, subcomponents, parent); + this.createdFrom = undefined; + } - constructor(properties?: any, subcomponents?: Array, parent?: foObject) { - super(properties, subcomponents, parent); - this.createdFrom = undefined; - } + protected _subcomponents: foCollection; + get nodes(): foCollection { + return this._subcomponents; + } - protected _subcomponents: foCollection; - get nodes(): foCollection { - return this._subcomponents; - } + protected toJson(): any { + const concept = this.createdFrom && this.createdFrom(); + const keys = concept ? concept.specReadWriteKeys() : []; + return Tools.mixin(super.toJson(), this.extract(keys)); + } + + createCopy(keys?: string[]) { + const data = this.extractCopySpec(keys); + + const concept = this.createdFrom && this.createdFrom(); + let copy = concept && concept.newInstance(data); + if (copy) { return copy; } + + const { myType } = data; + const type = RuntimeType.find(myType); + copy = RuntimeType.create(type, data); + + return copy; + } + + createDeepCopy(): foInstance { + const copy = this.createCopy(); + + this.nodes.forEach(item => { + const child = item.createDeepCopy(); + copy.addSubcomponent(child); + }); + return copy; + } - protected toJson(): any { - return Tools.mixin(super.toJson(), { - //subcomponents: this._subcomponents && this._subcomponents.asJson() - }); + public isEqualTo(obj: foInstance, deep: boolean = true) { + let result = true; + + Object.keys(this).forEach(key => { + const local: any = this[key]; + const other: any = obj[key]; + + const isLocal = local instanceof foInstance; + const isOther = other instanceof foInstance; + + const isLocalCol = local instanceof foCollection; + const isOtherCol = other instanceof foCollection; + + const isLocalFn = Tools.isFunction(local); + const isOtherFn = Tools.isFunction(other); + + if ((isLocal && isOther) || (isLocalCol && isOtherCol)) { + result = local.isEqualTo(other) ? result : false; + } else if (isLocalFn && isOtherFn) { + } else if (key === 'myGuid' || key.startsWith('_') || key === 'UnDo') { + //skip over myGuid + } else { + result = local === other ? result : false; + } + + if (!result) { + return false; + } + }); + return result; + } + + public reHydrate(json: any) { + this.override(json); + return this; + } + + public deHydrate(context?: any, deep: boolean = true) { + const concept = this.createdFrom && this.createdFrom(); + const keys = concept ? concept.specReadWriteKeys() : []; + const data = this.extractCopySpec(keys); + + if (deep && this.nodes.count) { + data.subcomponents = this.nodes.map(item => { + const child = item.deHydrate(context, deep); + return child; + }); } + return data; + } } import { RuntimeType } from './foRuntimeType'; + RuntimeType.define(foInstance); -Tools['isaInstance'] = function (obj) { - return obj && obj.isInstanceOf(foInstance); -}; \ No newline at end of file +Tools['isaInstance'] = function(obj) { + return obj && obj.isInstanceOf(foInstance); +}; diff --git a/src/app/foundry/foInterface.ts b/src/app/foundry/foInterface.ts index 620c9c4..e7a49d7 100644 --- a/src/app/foundry/foInterface.ts +++ b/src/app/foundry/foInterface.ts @@ -1,181 +1,189 @@ //https://www.typescriptlang.org/docs/handbook/decorators.html export interface Action { - (item: T): void; + (item: T): void; } export interface ModelRef { - (): T; + (): T; } export interface Func { - (item: T): R; + (item: T): R; } export interface WhereClause { - (item: T): boolean; + (item: T): boolean; } export interface Spec { - (spec?: any): Array; + (spec?: any): Array; } export interface iObject { - myName: string; - myParent: ModelRef; - myGuid: string; - asReference(): string; - getChildAt(i: number): iObject; - override(properties?: any); - hasAncestor(member?: iObject): boolean; - asJson: string; - isPublic: boolean + myName: string; + myParent: ModelRef; + myGuid: string; + asReference(): string; + getChildAt(i: number): iObject; + override(properties?: any); + hasAncestor(member?: iObject): boolean; + defaultName(name?: string); + asJson: string; + isPublic: boolean; } export interface iNode { - addAsSubcomponent(obj: iNode); - addSubcomponent(obj: iNode); - removeSubcomponent(obj: iNode); -} + addAsSubcomponent(obj: iNode); + addSubcomponent(obj: iNode); + removeSubcomponent(obj: iNode); -export interface iKnowledge extends iObject { + // canCaptureSubcomponent(obj:iNode):boolean; + // captureSubcomponent(obj:iNode); } +export interface iKnowledge extends iObject {} + // export interface iConnectionPoint extends iObject { // doMoveProxy: (loc: any) => void; -// hitTest: (hit: iPoint2D) => boolean +// hitTest: (hit: iPoint2D) => boolean // render(ctx: CanvasRenderingContext2D); // } //FOR GLYPHS and SHAPES export interface iName { - myName: string; + myName: string; } export interface iPoint2D extends iName { - x: number; - y: number; - - //set(x: number, y: number): iPoint2D - //add(x: number, y: number): iPoint2D + x: number; + y: number; } export interface iPoint3D extends iPoint2D { - z: number; - - //set(x: number, y: number, z: number): iPoint3D - //add(x: number, y: number, z: number): iPoint3D + z: number; } export interface iMargin { - left: number; - top: number; - right: number; - bottom: number; + left: number; + top: number; + right: number; + bottom: number; } export interface iSize { - width: number; - height: number; + width: number; + height: number; } export interface iRect { - x: number; - y: number; - width: number; - height: number; - myName: string; + x: number; + y: number; + width: number; + height: number; + myName: string; - set(x: number, y: number, width: number, height: number): iRect - contains(x: number, y: number): boolean; - localContains(x: number, y: number): boolean; + set(x: number, y: number, width: number, height: number): iRect; + contains(x: number, y: number): boolean; + localContains(x: number, y: number): boolean; } export interface iFrame { - x1: number; - y1: number; - x2: number; - y2: number; + x1: number; + y1: number; + x2: number; + y2: number; - set(x1: number, y1: number, x2: number, y2: number): iFrame; - contains(x: number, y: number): boolean; - merge(obj: iFrame): iFrame; - minmax(obj: iPoint2D): iFrame; + set(x1: number, y1: number, x2: number, y2: number): iFrame; + contains(x: number, y: number): boolean; + merge(obj: iFrame): iFrame; + minmax(obj: iPoint2D): iFrame; } export interface iBox extends iRect { - x: number; - y: number; - width: number; - height: number; + x: number; + y: number; + width: number; + height: number; - pinX(): number; - pinY(): number; + pinX(): number; + pinY(): number; - set(x: number, y: number, width: number, height: number): iRect + set(x: number, y: number, width: number, height: number): iRect; } export interface iFence { - x1: number; - y1: number; - z1: number; - x2: number; - y2: number; - z2: number; - - set(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): iFence; - contains(x: number, y: number, z: number): boolean; - minmax(obj: iPoint3D): iFrame; + x1: number; + y1: number; + z1: number; + x2: number; + y2: number; + z2: number; + + set( + x1: number, + y1: number, + z1: number, + x2: number, + y2: number, + z2: number + ): iFence; + contains(x: number, y: number, z: number): boolean; + minmax(obj: iPoint3D): iFrame; } export interface iCube { - x: number; - y: number; - z: number; - width: number; - height: number; - depth: number; - myName: string; - - set(x: number, y: number, z: number, width: number, height: number, depth: number): iCube - contains(x: number, y: number, z: number): boolean; - localContains(x: number, y: number, z: number): boolean; + x: number; + y: number; + z: number; + width: number; + height: number; + depth: number; + myName: string; + + set( + x: number, + y: number, + z: number, + width: number, + height: number, + depth: number + ): iCube; + contains(x: number, y: number, z: number): boolean; + localContains(x: number, y: number, z: number): boolean; } export interface iGlueSignature { - sourceGuid: string, - sourceName: string, - targetGuid: string, - targetName: string + sourceGuid: string; + sourceName: string; + targetGuid: string; + targetName: string; } export interface iShape extends iRect, iNode { - isSelected: boolean; + isSelected: boolean; - render(ctx: CanvasRenderingContext2D, deep: boolean): void; - draw(ctx: CanvasRenderingContext2D): void; - drawHover(ctx: CanvasRenderingContext2D): void; + render(ctx: CanvasRenderingContext2D, deep: boolean): void; + draw(ctx: CanvasRenderingContext2D): void; + drawHover(ctx: CanvasRenderingContext2D): void; - hitTest: (hit: iPoint2D) => boolean; - overlapTest: (hit: iFrame) => boolean + hitTest: (hit: iPoint2D) => boolean; + overlapTest: (hit: iFrame) => boolean; - // getOffset(loc: iPoint2D): iPoint2D; - // getLocation(): any; - // moveTo(loc: iPoint2D, offset?: iPoint2D); - // moveBy(loc: iPoint2D, offset?: iPoint2D) + // getOffset(loc: iPoint2D): iPoint2D; + // getLocation(): any; + // moveTo(loc: iPoint2D, offset?: iPoint2D); + // moveBy(loc: iPoint2D, offset?: iPoint2D) } export interface iSolid extends iCube, iNode { - isSelected: boolean; + isSelected: boolean; + hitTest: (hit: iPoint3D) => boolean; + overlapTest: (hit: iFence) => boolean; - hitTest: (hit: iPoint3D) => boolean; - overlapTest: (hit: iFence) => boolean - - - // getOffset(loc: iPoint2D): iPoint2D; - // getLocation(): any; - // moveTo(loc: iPoint2D, offset?: iPoint2D); - // moveBy(loc: iPoint2D, offset?: iPoint2D) + // getOffset(loc: iPoint2D): iPoint2D; + // getLocation(): any; + // moveTo(loc: iPoint2D, offset?: iPoint2D); + // moveBy(loc: iPoint2D, offset?: iPoint2D) } - diff --git a/src/app/foundry/foKnowledge.model.ts b/src/app/foundry/foKnowledge.model.ts index 249b184..fe01777 100644 --- a/src/app/foundry/foKnowledge.model.ts +++ b/src/app/foundry/foKnowledge.model.ts @@ -1,79 +1,116 @@ -import { Tools, foNames } from './foTools' +import { Tools, foNames } from './foTools'; -import { WhereClause, Action } from "./foInterface"; - -import { foObject } from './foObject.model' +import { WhereClause, Action } from './foInterface'; +import { foObject } from './foObject.model'; export class foKnowledge extends foObject { - private static _counter: number = 0; - - constructor(properties?: any, parent?: foKnowledge) { - super(properties, parent); - } - - public initialize(x: number = Number.NaN, y: number = Number.NaN, ang: number = Number.NaN) { - return this; - } - - usingRuntimeType(type: string, action: Action) { - action(this); - return this; - } - - makeComponent(parent?: any, properties?: any, onComplete?:Action): any { - return undefined; - } - - newInstance(properties?: any, subcomponents?: any, parent?: any): any { - return undefined; - } - - extract(target: any) { - let result = {}; - return result; + private static _counter: number = 0; + + constructor(properties?: any, parent?: foKnowledge) { + super(properties, parent); + } + + public initialize( + x: number = Number.NaN, + y: number = Number.NaN, + ang: number = Number.NaN + ) { + return this; + } + + usingRuntimeType(type: string, action: Action) { + action(this); + return this; + } + + makeComponent(parent?: any, properties?: any, onComplete?: Action): any { + return undefined; + } + + newInstance(properties?: any, subcomponents?: any, parent?: any): any { + return undefined; + } + + extract(target: any) { + const result = {}; + return result; + } + + get commands(): Array { + return []; + } + + specReadWriteKeys(): string[] { + return []; + } + + defaultName(name?: string) { + if (name) { + this.myName = name; + } else if (Tools.matches(this.myName, foNames.UNKNOWN)) { + foKnowledge._counter += 1; + const count = ('0000' + foKnowledge._counter).slice(-4); + this.myName = `${this.myType}_${count}`; } + return this; + } - get commands(): Array { - return []; + get displayName() { + if (this._displayName) { return this._displayName; } + if (Tools.matches(this.myName, foNames.UNKNOWN)) { + return this.defaultName().myName; } - - - defaultName(name?: string) { - if (name) { - this.myName = name; - } - else if (Tools.matches(this.myName, foNames.UNKNOWN)) { - foKnowledge._counter += 1; - let count = ("0000" + foKnowledge._counter).slice(-4); - this.myName = `${this.myType}_${count}`; - } - return this; + return this.myName; + } + set displayName(value: string) { + this._displayName = value; + } + + select( + where: WhereClause, + list?: foCollection, + deep: boolean = true + ): foCollection { + const result = list ? list : new foCollection(); + const self = this; + if (where(self)) { + result.addMember(self); } - - get displayName() { - if (this._displayName) return this._displayName; - if (Tools.matches(this.myName, foNames.UNKNOWN)) { - return this.defaultName().myName; - } - return this.myName; - } - set displayName(value: string) { - this._displayName = value; - } - - select(where: WhereClause, list?: foCollection, deep: boolean = true): foCollection { - let result = list ? list : new foCollection(); - let self = this; - if (where(self)) { - result.addMember(self) - } - return result; + return result; + } + + extractCopySpec(keys?: string[]) { + const spec = this.asJson; + keys && + keys.forEach(key => { + spec[key] = this[key]; + }); + return spec; + } + + createCopy(keys?: string[]) { + const data = this.extractCopySpec(keys); + const { myType } = data; + + const type = RuntimeType.find(myType); + if (type) { + const copy = RuntimeType.construct(type, data); + return copy; } + } + public reHydrate(json: any) { + this.override(json); + return this; + } + public deHydrate(context?: any, deep: boolean = true) { + const data = this.extractCopySpec(); + return data; + } } import { RuntimeType } from './foRuntimeType'; -import { foCollection } from 'app/foundry/foCollection.model'; -RuntimeType.knowledge(foKnowledge); \ No newline at end of file +import { foCollection } from './foCollection.model'; +RuntimeType.knowledge(foKnowledge); diff --git a/src/app/foundry/foLibrary.model.ts b/src/app/foundry/foLibrary.model.ts index 088212a..f3bb708 100644 --- a/src/app/foundry/foLibrary.model.ts +++ b/src/app/foundry/foLibrary.model.ts @@ -1,125 +1,143 @@ -import { Tools } from './foTools' +import { Tools } from './foTools'; -import { foKnowledge } from './foKnowledge.model' +import { foKnowledge } from './foKnowledge.model'; //import { Knowcycle } from './foLifecycle'; -import { foCollection } from './foCollection.model' +import { foCollection } from './foCollection.model'; //import { foComponent } from './foComponent.model' //import { foConcept } from './foConcept.model' //import { foStructure } from './foStructure.model' //import { foProperty } from './foProperty.model' -import { foNode } from './foNode.model' - -import { FactoryDictionary, ActionDictionary, PropertyDictionary, ConceptDictionary, StructureDictionary, SolutionDictionary } from './foDictionaries' - -import { WhereClause } from "./foInterface"; +import { foNode } from './foNode.model'; +import { + FactoryDictionary, + ActionDictionary, + PropertyDictionary, + ConceptDictionary, + StructureDictionary, + SolutionDictionary +} from './foDictionaries'; +import { WhereClause } from './foInterface'; export class foLibrary extends foKnowledge { - - private _mixins:any = {}; - - private _solutions: SolutionDictionary = new SolutionDictionary({ - myName: 'solutions' - }, this); - - private _structures: StructureDictionary = new StructureDictionary({ - myName: 'structures', - concepts: this.concepts - }, this); - - private _concepts: ConceptDictionary = new ConceptDictionary({ - myName: 'concepts' - }, this); - - private _properties: PropertyDictionary = new PropertyDictionary({ - myName: 'properties' - }, this); - - private _actions: ActionDictionary = new ActionDictionary({ - myName: 'actions' - }, this); - - private _factory: FactoryDictionary = new FactoryDictionary({ - myName: 'factories' - }, this); - - constructor(properties?: any, parent?: foKnowledge) { - super(properties, parent); + private _mixins: any = {}; + + private _solutions: SolutionDictionary = new SolutionDictionary( + { + myName: 'solutions' + }, + this + ); + + private _structures: StructureDictionary = new StructureDictionary( + { + myName: 'structures', + concepts: this.concepts + }, + this + ); + + private _concepts: ConceptDictionary = new ConceptDictionary( + { + myName: 'concepts' + }, + this + ); + + private _properties: PropertyDictionary = new PropertyDictionary( + { + myName: 'properties' + }, + this + ); + + private _actions: ActionDictionary = new ActionDictionary( + { + myName: 'actions' + }, + this + ); + + private _factory: FactoryDictionary = new FactoryDictionary( + { + myName: 'factories' + }, + this + ); + + constructor(properties?: any, parent?: foKnowledge) { + super(properties, parent); + } + + get debug() { + const result = { + base: this, + concepts: this.concepts, + properties: this.properties + }; + return Tools.stringify(result); + } + + protected toJson(): any { + return Tools.mixin(super.toJson(), { + concepts: Tools.asArray(this.concepts.asJson), + properties: Tools.asArray(this.properties.asJson) + }); + } + + public mixin(key: string, specification?: any): any { + let found = specification; + if (found) { + this._mixins[key] = found; + } else { + found = this._mixins[key]; } - get debug() { - let result = { - base: this, - concepts: this.concepts, - properties: this.properties, - } - return Tools.stringify(result); - } + return found; + } - protected toJson(): any { - return Tools.mixin(super.toJson(), { - concepts: Tools.asArray(this.concepts.asJson), - properties: Tools.asArray(this.properties.asJson) - }); - } + get actions() { + return this._actions; + } - public mixin(key: string, specification?: any): any { - let found = specification; - if (found ) { - this._mixins[key] = found; - } else { - found = this._mixins[key]; - } - - return found; - } + get factories() { + return this._factory; + } + get structures() { + return this._structures; + } - get actions() { - return this._actions; - } + get solutions() { + return this._solutions; + } - get factories() { - return this._factory; - } + get concepts() { + return this._concepts; + } - get structures() { - return this._structures; - } - - get solutions() { - return this._solutions; - } - - - get concepts() { - return this._concepts; - } - - - get properties() { - return this._properties; - } - - - select(where: WhereClause, list?: foCollection, deep: boolean = true): foCollection { - let result = super.select(where, list, deep); - - this.concepts.forEachKeyValue((key, value) => { - value.select(where, result, deep); - }) - - return result; - } + get properties() { + return this._properties; + } + select( + where: WhereClause, + list?: foCollection, + deep: boolean = true + ): foCollection { + const result = super.select(where, list, deep); + this.concepts.forEachKeyValue((key, value) => { + value.select(where, result, deep); + }); + return result; + } } import { RuntimeType } from './foRuntimeType'; -import { foDictionary } from './foDictionary.model'; -RuntimeType.knowledge(foLibrary); \ No newline at end of file +RuntimeType.knowledge(foLibrary); diff --git a/src/app/foundry/foLifecycle.ts b/src/app/foundry/foLifecycle.ts index f9522c3..ee45ea0 100644 --- a/src/app/foundry/foLifecycle.ts +++ b/src/app/foundry/foLifecycle.ts @@ -1,6 +1,4 @@ - - -import { Action } from './foInterface' +import { Action } from './foInterface'; import { foObject } from './foObject.model'; import { Tools } from './foTools'; @@ -8,233 +6,228 @@ import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; import { debounceTime, filter } from 'rxjs/operators'; - let counter = 0; export class foLifecycleEvent { - id: number = 0; - cmd: string = ''; - object: foObject; - value: any; - - get guid() { - return this.object.myGuid; - } - get simpleGuid() { - return this.object.myGuid.slice(-8); - } - get myGuid() { - return this.object.myGuid; - } - get myType() { - return this.object.myType; - } - - get myClass() { - return this.object['myClass']; - } - - get myName() { - return this.object.myName; - } - - isNamed(name: string) { - return Tools.matches(name, this.myName) - } - - isCmd(cmd: string) { - return Tools.matches(cmd, this.cmd) - } - - constructor(cmd: string, obj: foObject, count: number = 0, value?: any) { - this.id = count; - this.cmd = cmd; - this.object = obj; - this.value = value; - } + id: number = 0; + cmd: string = ''; + object: foObject; + value: any; + + get guid() { + return this.object.myGuid; + } + get simpleGuid() { + return this.object.myGuid.slice(-8); + } + get myGuid() { + return this.object.myGuid; + } + get myType() { + return this.object.myType; + } + + get myClass() { + return this.object['myClass']; + } + + get myName() { + return this.object.myName; + } + + isNamed(name: string) { + return Tools.matches(name, this.myName); + } + + isCmd(cmd: string) { + return Tools.matches(cmd, this.cmd); + } + + constructor(cmd: string, obj: foObject, count: number = 0, value?: any) { + this.id = count; + this.cmd = cmd; + this.object = obj; + this.value = value; + } } //this is needed to prevent circular communiation // create => create => create across browsers export class foLifecycleEventLock { - private _processLock = {}; - - isLocked(guid: string) { - return this._processLock[guid] ? true : false; - } - - addLock(guid: string) { - if (!this.isLocked(guid)) { - this._processLock[guid] = 0; - } - this._processLock[guid] += 1; - } - - unLock(guid: string) { - if (this.isLocked(guid)) { - this._processLock[guid] -= 1; - if (this._processLock[guid] <= 0) { - delete this._processLock[guid]; - } - } - } - - protected(guid: string, context: any, func: Action) { - this.addLock(guid) - try { - func(context); - } catch (ex) { - console.error('protected', ex); - } - this.unLock(guid); - } - - whenUnprotected(guid: string, context: any, func: Action) { - if (!this.isLocked(guid)) { - try { - func(context); - } catch (ex) { - console.error('whenUnprotected ', ex); - } - } - } - + private _processLock = {}; + + isLocked(guid: string) { + return this._processLock[guid] ? true : false; + } + + addLock(guid: string) { + if (!this.isLocked(guid)) { + this._processLock[guid] = 0; + } + this._processLock[guid] += 1; + } + + unLock(guid: string) { + if (this.isLocked(guid)) { + this._processLock[guid] -= 1; + if (this._processLock[guid] <= 0) { + delete this._processLock[guid]; + } + } + } + + protected(guid: string, context: any, func: Action) { + this.addLock(guid); + try { + func(context); + } catch (ex) { + console.error('protected', ex); + } + this.unLock(guid); + } + + whenUnprotected(guid: string, context: any, func: Action) { + if (!this.isLocked(guid)) { + try { + func(context); + } catch (ex) { + console.error('whenUnprotected ', ex); + } + } + } } export let LifecycleLock: foLifecycleEventLock = new foLifecycleEventLock(); export let KnowcycleLock: foLifecycleEventLock = new foLifecycleEventLock(); - export class foLifecycle { - - mute: boolean = false; - - public observable: Observable; - public emit: Subject; - - private debounced: Subject; - - constructor(debouce: number = 500) { - this.emit = new Subject(); - this.observable = this.emit.asObservable(); - - this.debounced = new Subject(); - - this.debounced.asObservable().pipe(debounceTime(debouce)).subscribe(event => { - event.id = counter++; - this.broadcast(event); - }); - - } - - broadcast(obj: foLifecycleEvent) { - !this.mute && this.emit.next(obj) - return this; - } - - primitive(obj: foObject, value?: any) { - this.broadcast(new foLifecycleEvent('primitive', obj, counter++, value)) - return this; - } - - defined(obj?: foObject) { - this.broadcast(new foLifecycleEvent('defined', obj, counter++)) - return this; - } - - event(eventName: string, obj: foObject, value?: any) { - this.broadcast(new foLifecycleEvent(eventName, obj, counter++, value)) - return this; - } - - created(obj: foObject, value?: any) { - this.broadcast(new foLifecycleEvent('created', obj, counter++, value)) - return this; - } - - destroyed(obj: foObject) { - this.broadcast(new foLifecycleEvent('destroyed', obj, counter++)) - return this; - } - - unparent(obj: foObject) { - this.broadcast(new foLifecycleEvent('unparent', obj, counter++)) - return this; - } - - reparent(obj: foObject) { - this.broadcast(new foLifecycleEvent('reparent', obj, counter++)) - return this; - } - - action(obj: foObject, action: string, params?: any) { - this.broadcast(new foLifecycleEvent('run', obj, counter++, { - action: action, - params: params - })); - return this; - } - - command(obj: foObject, method: string) { - this.broadcast(new foLifecycleEvent('command', obj, counter++, method)); - return this; - } - - selected(obj: foObject, value: any) { - this.broadcast(new foLifecycleEvent('selected', obj, counter++, value)) - return this; - } - - layout(obj: foObject, value: any) { - this.broadcast(new foLifecycleEvent('layout', obj, counter++, value)) - return this; - } - - changed(obj: foObject, value?: any) { - this.broadcast(new foLifecycleEvent('changed', obj, counter++, value)) - return this; - } - - - glued(obj: foObject, value: any) { - this.broadcast(new foLifecycleEvent('glued', obj, counter++, value)) - return this; - } - - unglued(obj: foObject, value: any) { - this.broadcast(new foLifecycleEvent('unglued', obj, counter++, value)) - return this; - } - - dropped(obj: foObject, value?: any) { - this.broadcast(new foLifecycleEvent('dropped', obj, counter++, value)) - return this; - } - - handle(obj: foObject, value?: any) { - this.debounced.next(new foLifecycleEvent('handle', obj, counter++, value)) - return this; - } - - moved(obj: foObject, value?: any) { - this.debounced.next(new foLifecycleEvent('moved', obj, counter++, value)) - return this; - } - - easeTo(obj: foObject, value?: any) { - this.broadcast(new foLifecycleEvent('easeTo', obj, counter++, value)) - return this; - } - - easeTween(obj: foObject, value?: any) { - this.broadcast(new foLifecycleEvent('easeTween', obj, counter++, value)) - return this; - } - - + mute: boolean = false; + + public observable: Observable; + public emit: Subject; + + private debounced: Subject; + + constructor(debouce: number = 500) { + this.emit = new Subject(); + this.observable = this.emit.asObservable(); + + this.debounced = new Subject(); + + this.debounced + .asObservable() + .pipe(debounceTime(debouce)) + .subscribe(event => { + event.id = counter++; + this.broadcast(event); + }); + } + + broadcast(obj: foLifecycleEvent) { + !this.mute && this.emit.next(obj); + return this; + } + + primitive(obj: foObject, value?: any) { + this.broadcast(new foLifecycleEvent('primitive', obj, counter++, value)); + return this; + } + + defined(obj?: foObject) { + this.broadcast(new foLifecycleEvent('defined', obj, counter++)); + return this; + } + + event(eventName: string, obj: foObject, value?: any) { + this.broadcast(new foLifecycleEvent(eventName, obj, counter++, value)); + return this; + } + + created(obj: foObject, value?: any) { + this.broadcast(new foLifecycleEvent('created', obj, counter++, value)); + return this; + } + + destroyed(obj: foObject) { + this.broadcast(new foLifecycleEvent('destroyed', obj, counter++)); + return this; + } + + unparent(obj: foObject) { + this.broadcast(new foLifecycleEvent('unparent', obj, counter++)); + return this; + } + + reparent(obj: foObject) { + this.broadcast(new foLifecycleEvent('reparent', obj, counter++)); + return this; + } + + action(obj: foObject, action: string, params?: any) { + this.broadcast( + new foLifecycleEvent('run', obj, counter++, { + action: action, + params: params + }) + ); + return this; + } + + command(obj: foObject, method: string) { + this.broadcast(new foLifecycleEvent('command', obj, counter++, method)); + return this; + } + + selected(obj: foObject, value: any) { + this.broadcast(new foLifecycleEvent('selected', obj, counter++, value)); + return this; + } + + layout(obj: foObject, value: any) { + this.broadcast(new foLifecycleEvent('layout', obj, counter++, value)); + return this; + } + + changed(obj: foObject, value?: any) { + this.broadcast(new foLifecycleEvent('changed', obj, counter++, value)); + return this; + } + + glued(obj: foObject, value: any) { + this.broadcast(new foLifecycleEvent('glued', obj, counter++, value)); + return this; + } + + unglued(obj: foObject, value: any) { + this.broadcast(new foLifecycleEvent('unglued', obj, counter++, value)); + return this; + } + + dropped(obj: foObject, value?: any) { + this.broadcast(new foLifecycleEvent('dropped', obj, counter++, value)); + return this; + } + + handle(obj: foObject, value?: any) { + this.debounced.next(new foLifecycleEvent('handle', obj, counter++, value)); + return this; + } + + moved(obj: foObject, value?: any) { + this.debounced.next(new foLifecycleEvent('moved', obj, counter++, value)); + return this; + } + + easeTo(obj: foObject, value?: any) { + this.broadcast(new foLifecycleEvent('easeTo', obj, counter++, value)); + return this; + } + + easeTween(obj: foObject, value?: any) { + this.broadcast(new foLifecycleEvent('easeTween', obj, counter++, value)); + return this; + } } export let Lifecycle: foLifecycle = new foLifecycle(300); export let Knowcycle: foLifecycle = new foLifecycle(); - - diff --git a/src/app/foundry/foMethod.model.ts b/src/app/foundry/foMethod.model.ts index 9988da7..9958518 100644 --- a/src/app/foundry/foMethod.model.ts +++ b/src/app/foundry/foMethod.model.ts @@ -1,11 +1,9 @@ - -import { foKnowledge } from './foKnowledge.model' -import { foNode } from './foNode.model' +import { foKnowledge } from './foKnowledge.model'; +import { foNode } from './foNode.model'; import { Action, Spec } from '../foundry/foInterface'; export class foMethod extends foKnowledge { - - funct: Action + funct: Action; constructor(funct: Action, spec?: any) { super(spec); @@ -15,12 +13,10 @@ export class foMethod extends foKnowledge { run(context?: any) { return this.funct(context); } - } export class foFactory extends foKnowledge { - - funct: Spec + funct: Spec; constructor(funct: Spec, spec?: any) { super(spec); @@ -30,5 +26,4 @@ export class foFactory extends foKnowledge { run(context?: any) { return this.funct(context); } - -} \ No newline at end of file +} diff --git a/src/app/foundry/foModel.model.ts b/src/app/foundry/foModel.model.ts index 702dd46..8bd08fb 100644 --- a/src/app/foundry/foModel.model.ts +++ b/src/app/foundry/foModel.model.ts @@ -1,21 +1,18 @@ -import { foObject } from './foObject.model' -import { foComponent } from './foComponent.model' +import { foObject } from './foObject.model'; +import { foComponent } from './foComponent.model'; import { foConcept } from './foConcept.model'; export class foModel extends foComponent { - //title: string = 'No Title'; - //subtitle: string = 'No Subtitle'; - - constructor(properties?: any, subcomponents?: Array, parent?: foObject) { - super(properties, subcomponents, parent); - } + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, subcomponents, parent); + } } import { RuntimeType } from './foRuntimeType'; RuntimeType.define(foModel); - -export class foContext extends foConcept { - - -} \ No newline at end of file +export class foContext extends foConcept {} diff --git a/src/app/foundry/foNode.model.ts b/src/app/foundry/foNode.model.ts index 44f933c..04d6c05 100644 --- a/src/app/foundry/foNode.model.ts +++ b/src/app/foundry/foNode.model.ts @@ -1,200 +1,310 @@ +import { Tools, foNames } from './foTools'; +import { iObject, iNode, WhereClause } from './foInterface'; -import { Tools, foNames } from './foTools' -import { iObject, iNode, WhereClause } from './foInterface' - -import { foObject } from './foObject.model' -import { foCollection } from './foCollection.model' - +import { foObject } from './foObject.model'; +import { foCollection } from './foCollection.model'; export class foNode extends foObject implements iNode { - private static _counter: number = 0; - private _index: number = 0; - private _childDepth: number = 0; - - - - protected _subcomponents: foCollection; - - - private _class: string; - get myClass(): string { - //let comp: any = this.constructor; - return this._class; // || comp.name; + private static _counter: number = 0; + private _index: number = 0; + private _childDepth: number = 0; + + protected _subcomponents: foCollection; + + private _class: string; + get myClass(): string { + return this._class; + } + set myClass(value: string) { + this._class = value; + } + + get displayName() { + if (this._displayName) { + return this._displayName; } - set myClass(value: string) { - this._class = value; + if (this._class) { + return `${this.myName}:${this.myClass} - ${this.myType}`; } - - get displayName() { - if (this._displayName) return this._displayName; - if (this._class) { - return `${this.myName}:${this.myClass} - ${this.myType}`; - } - return `${this.myName} - ${this.myType}`; + return `${this.myName} - ${this.myType}`; + } + set displayName(value: string) { + this._displayName = value; + } + + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, parent); + + this._subcomponents = new foCollection(); + this._subcomponents.myName = 'Subparts'; + subcomponents && + subcomponents.forEach(item => this.captureSubcomponent(item)); + return this; + } + + //get asJson() { return this.toJson() } + protected toJson(): any { + return Tools.mixin(super.toJson(), { + myClass: this.myClass + }); + } + + public pushTo(list) { + list.push(this); + return this; + } + + //deep hook for syncing matrix2d with geometry + public initialize( + x: number = Number.NaN, + y: number = Number.NaN, + ang: number = Number.NaN + ) { + return this; + } + + findParent(where: WhereClause) { + const parent = this.myParent(); + // tslint:disable-next-line:curly + if (!parent) return; + + if (where(parent)) { + return parent; } - set displayName(value: string) { - this._displayName = value; + return parent.findParent(where); + } + + reParent(newParent: foNode) { + const parent = this.myParent && this.myParent(); + if (parent !== newParent) { + this.removeFromParent(); + newParent.addSubcomponent(this); } - - constructor(properties?: any, subcomponents?: Array, parent?: foObject) { - super(properties, parent); - - this._subcomponents = new foCollection(); - this._subcomponents.myName = 'Subparts'; - subcomponents && subcomponents.forEach(item => this.addSubcomponent(item)); + return this; + } + + addAsSubcomponent(parent: foNode, properties?: any) { + parent.addSubcomponent(this, properties); + return this; + } + + removeFromParent() { + const parent: foNode = (this.myParent && this.myParent()); + parent && parent.removeSubcomponent(this); + this.myParent = undefined; + return this; + } + + //todo modify api to take both item and array + addSubcomponent(obj: foNode, properties?: any) { + if (!obj) { return; } + const parent = obj.myParent && obj.myParent(); + if (!parent) { + obj.myParent = () => { return this; + }; + properties && obj.override(properties); } - - //get asJson() { return this.toJson() } - protected toJson(): any { - return Tools.mixin(super.toJson(), { - myClass: this.myClass - }); + obj._index = this._subcomponents.length; + obj._childDepth = this._childDepth + 1; + this._subcomponents.addMember(obj); + return obj; + } + + removeSubcomponent(obj: foNode) { + if (!obj) { return; } + const parent = obj.myParent && obj.myParent(); + if (parent === this) { + obj.myParent = undefined; } - - public pushTo(list) { - list.push(this); - return this; + obj._index = -1; + obj._childDepth = 0; + this._subcomponents.removeMember(obj); + return obj; + } + + public incrementNameCounter() { + foNode._counter += 1; + return foNode._counter; + } + + public generateName() { + const counter = this.incrementNameCounter(); + const count = ('0000' + counter).slice(-4); + this.myName = `${this.myType}_${count}`; + return this; + } + + public defaultName(name?: string) { + if (name) { + this.myName = name; + } else if (Tools.matches(this.myName, foNames.UNKNOWN)) { + this.generateName(); } - - //deep hook for syncing matrix2d with geometry - public initialize(x: number = Number.NaN, y: number = Number.NaN, ang: number = Number.NaN) { - return this; + return this; + } + + get index(): number { + return this._index; + } + + get childDepth(): number { + return this._childDepth; + } + + getChildAt(i: number): iObject { + return this.hasSubcomponents && this._subcomponents.getMember(i); + } + + get prevChild() { + const prev: number = this.index - 1; + const parent = this.myParent && this.myParent(); + if (parent && prev > -1) { + const found = parent.getChildAt(prev); + return found; } - - findParent(where: WhereClause) { - let parent = this.myParent(); - if (!parent) return; - if (where(parent)) { - return parent; - } - return parent.findParent(where); + } + + get nextChild() { + const next: number = this.index + 1; + const parent = this.myParent && this.myParent(); + if (parent && next < this._subcomponents.length) { + const found = parent.getChildAt(next); + return found; } + } - reParent(newParent: foNode) { - let parent = this.myParent && this.myParent(); - if (parent != newParent) { - this.removeFromParent() - newParent.addSubcomponent(this); - } - return this; - } + get Subcomponents() { + return this.nodes.members; + } - addAsSubcomponent(parent: foNode, properties?: any) { - parent.addSubcomponent(this, properties); - return this; - } + get nodes(): foCollection { + return this._subcomponents; + } - removeFromParent() { - let parent: foNode = (this.myParent && this.myParent()); - parent && parent.removeSubcomponent(this); - this.myParent = undefined; - return this; - } + get hasSubcomponents(): boolean { + const list = this.nodes; + return list && list.hasMembers; + } - //todo modify api to take both item and array - addSubcomponent(obj: foNode, properties?: any) { - if (!obj) return; - let parent = obj.myParent && obj.myParent(); - if (!parent) { - obj.myParent = () => { return this; }; - properties && obj.override(properties); - } - obj._index = this._subcomponents.length; - obj._childDepth = this._childDepth + 1; - this._subcomponents.addMember(obj); - return obj; + canCaptureSubcomponent(obj: foNode): boolean { + if (!obj || !obj.isInstanceOf(foNode)) { + return false; } - - removeSubcomponent(obj: foNode) { - if (!obj) return; - let parent = this.myParent && this.myParent(); - if (parent == this) { - obj.myParent = undefined; + //this should look up the complete chain to prevent cycles + return this !== obj && this !== obj.myParent(); + } + + captureSubcomponent(obj: foNode, name?: string, join: boolean = false) { + const newParent = this; + const oldParent = obj.myParent() as foNode; + if (newParent.canCaptureSubcomponent(obj)) { + if (name) { + obj.myName = name; + if (join) { + newParent[name] = obj; } - obj._index = -1; - obj._childDepth = 0; - this._subcomponents.removeMember(obj); - return obj; - } - - public defaultName(name?: string) { - if (name) { - this.myName = name; + } + if (oldParent && oldParent !== newParent) { + oldParent.removeSubcomponent(obj); + if (join) { + delete oldParent[name]; } - else if (Tools.matches(this.myName, foNames.UNKNOWN)) { - foNode._counter += 1; - let count = ("0000" + foNode._counter).slice(-4); - this.myName = `${this.myType}_${count}`; - } - return this; - } - - get index(): number { - return this._index; - } - - get childDepth(): number { - return this._childDepth; + } + newParent.addSubcomponent(obj); + return oldParent; } - - getChildAt(i: number): iObject { - return this.hasSubcomponents && this._subcomponents.getMember(i); + } + + // insertSubcomponent(index:number, obj:foNode, name?:string) { + // if (ns.utils.isaComponent(obj)) { + // component.myParent = this; + // if (name) component.myName = name; + // this.Subcomponents.insertNoDupe(index, component); + // return obj; + // } + // }, + + // captureInsertSubcomponent:(index, component, name) { + // var newParent = this; + // var oldParent = component.myParent; + // if (newParent.canCaptureSubcomponent(component)) { + // ns.runWithUIRefreshLock(function () { + // if (name) component.myName = name; + // if (oldParent) oldParent.removeSubcomponent(component) + // newParent.insertSubcomponent(index, component); + // }); + // return oldParent; + // } + // } + + extractCopySpec(keys?: string[]) { + let spec = this.asJson; + delete spec.myGuid; + spec = this.extract(keys, spec); + return spec; + } + + createCopy(keys?: string[]) { + const data = this.extractCopySpec(keys); + const { myType } = data; + + const type = RuntimeType.find(myType); + if (type) { + const copy = RuntimeType.create(type, data); + return copy; } + } - get prevChild() { - let prev: number = this.index - 1; - let parent = this.myParent && this.myParent(); - if (parent && prev > -1) { - let found = parent.getChildAt(prev); - return found; - } - } + public reHydrate(json: any) { + this.override(json); + return this; + } - get nextChild() { - let next: number = this.index + 1; - let parent = this.myParent && this.myParent(); - if (parent && next < this._subcomponents.length) { - let found = parent.getChildAt(next); - return found; - } - } + public deHydrate(context?: any, deep: boolean = true) { + const data = this.extractCopySpec(); - get Subcomponents() { - return this.nodes.members; + if (deep && this.nodes.count) { + data.subcomponents = this.nodes.map(item => { + const child = item.deHydrate(context, deep); + return child; + }); } + return data; + } - get nodes(): foCollection { - return this._subcomponents; - } + isInstanceOf(type) { + return this instanceof type ? true : false; + } - get hasSubcomponents(): boolean { - let list = this.nodes; - return list && list.hasMembers; + isType(type) { + if (type === this.myType) { + return true; } - - isInstanceOf(type) { - return this instanceof type ? true : false; + if (!this.myType) { + return false; } - - isType(type) { - if (type === this.myType) return true; - if (!this.myType) return false; - //remember a type may be preceeded with a namespace knowtshare::note - return type && Tools.matches(type, this.myType); - } - - isOfType(type) { - var found = this.isType(type); - if (found) return true; - //var myType = Tools.getType(this); - return type && Tools.matches(type, this.myType); + //remember a type may be preceeded with a namespace knowtshare::note + return type && Tools.matches(type, this.myType); + } + + isOfType(type) { + const found = this.isType(type); + if (found) { + return true; } + //var myType = Tools.getType(this); + return type && Tools.matches(type, this.myType); + } } import { RuntimeType } from './foRuntimeType'; RuntimeType.define(foNode); -Tools['isaNode'] = function (obj) { - return obj && obj.isInstanceOf(foNode); -}; \ No newline at end of file +Tools['isaNode'] = function(obj) { + return obj && obj.isInstanceOf(foNode); +}; diff --git a/src/app/foundry/foObject.model.ts b/src/app/foundry/foObject.model.ts index 926f6f1..6f1a499 100644 --- a/src/app/foundry/foObject.model.ts +++ b/src/app/foundry/foObject.model.ts @@ -1,197 +1,281 @@ -import { Tools, foNames } from './foTools' -import { iObject, ModelRef } from './foInterface' +import { Tools, foNames } from './foTools'; +import { iObject, ModelRef } from './foInterface'; //import { setTimeout } from 'timers'; +export interface IDisposable { + dispose(); +} +export function using( + resource: T, + func: (resource: T) => any +) { + let result: any; + try { + result = func(resource); + } finally { + resource.dispose(); + } + return result; +} -export class foObject implements iObject { - private _myGuid: string; - myName: string = foNames.UNKNOWN; - myParent: ModelRef; - - private _isVisible: boolean = true; - get isVisible(): boolean { return this._isVisible; } - set isVisible(value: boolean) { this._isVisible = value; } - get isInvisible(): boolean { return !this._isVisible; } - set isInvisible(value: boolean) { this._isVisible = !value; } - - show(value?: boolean) { - this._isVisible = value ? true: false; - return this; - } - hide() { - this._isVisible = false; - return this; - } - - get isPublic() { - return this._isVisible; - } - - constructor(properties?: any, parent?: foObject) { - if (parent) { - this.myParent = () => { return parent }; - } - - this.override(properties); - } +// // Example use: +// class Camera implements IDisposable { +// takePicture() { /* omitted */ } +// // etc... +// dispose() { +// navigator.camera.cleanup(); +// } +// } +// using(new Camera(), (camera) => { +// camera.takePicture(); +// }); - static beep() { - var snd = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACiDgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhEBcZ6joQBxS76AgccrFlczBvKLC0QI2cBoCFvfTDAo7eoOQInqDPBtvrDEZBNYN5xwNwxQRfw8ZQ5wQVLvO8OYU+mHvFLlDh05Mdg7BT6YrRPpCBznMB2r//xKJjyyOh+cImr2/4doscwD6neZjuZR4AgAABYAAAABy1xcdQtxYBYYZdifkUDgzzXaXn98Z0oi9ILU5mBjFANmRwlVJ3/6jYDAmxaiDG3/6xjQQCCKkRb/6kg/wW+kSJ5//rLobkLSiKmqP/0ikJuDaSaSf/6JiLYLEYnW/+kXg1WRVJL/9EmQ1YZIsv/6Qzwy5qk7/+tEU0nkls3/zIUMPKNX/6yZLf+kFgAfgGyLFAUwY//uQZAUABcd5UiNPVXAAAApAAAAAE0VZQKw9ISAAACgAAAAAVQIygIElVrFkBS+Jhi+EAuu+lKAkYUEIsmEAEoMeDmCETMvfSHTGkF5RWH7kz/ESHWPAq/kcCRhqBtMdokPdM7vil7RG98A2sc7zO6ZvTdM7pmOUAZTnJW+NXxqmd41dqJ6mLTXxrPpnV8avaIf5SvL7pndPvPpndJR9Kuu8fePvuiuhorgWjp7Mf/PRjxcFCPDkW31srioCExivv9lcwKEaHsf/7ow2Fl1T/9RkXgEhYElAoCLFtMArxwivDJJ+bR1HTKJdlEoTELCIqgEwVGSQ+hIm0NbK8WXcTEI0UPoa2NbG4y2K00JEWbZavJXkYaqo9CRHS55FcZTjKEk3NKoCYUnSQ0rWxrZbFKbKIhOKPZe1cJKzZSaQrIyULHDZmV5K4xySsDRKWOruanGtjLJXFEmwaIbDLX0hIPBUQPVFVkQkDoUNfSoDgQGKPekoxeGzA4DUvnn4bxzcZrtJyipKfPNy5w+9lnXwgqsiyHNeSVpemw4bWb9psYeq//uQZBoABQt4yMVxYAIAAAkQoAAAHvYpL5m6AAgAACXDAAAAD59jblTirQe9upFsmZbpMudy7Lz1X1DYsxOOSWpfPqNX2WqktK0DMvuGwlbNj44TleLPQ+Gsfb+GOWOKJoIrWb3cIMeeON6lz2umTqMXV8Mj30yWPpjoSa9ujK8SyeJP5y5mOW1D6hvLepeveEAEDo0mgCRClOEgANv3B9a6fikgUSu/DmAMATrGx7nng5p5iimPNZsfQLYB2sDLIkzRKZOHGAaUyDcpFBSLG9MCQALgAIgQs2YunOszLSAyQYPVC2YdGGeHD2dTdJk1pAHGAWDjnkcLKFymS3RQZTInzySoBwMG0QueC3gMsCEYxUqlrcxK6k1LQQcsmyYeQPdC2YfuGPASCBkcVMQQqpVJshui1tkXQJQV0OXGAZMXSOEEBRirXbVRQW7ugq7IM7rPWSZyDlM3IuNEkxzCOJ0ny2ThNkyRai1b6ev//3dzNGzNb//4uAvHT5sURcZCFcuKLhOFs8mLAAEAt4UWAAIABAAAAAB4qbHo0tIjVkUU//uQZAwABfSFz3ZqQAAAAAngwAAAE1HjMp2qAAAAACZDgAAAD5UkTE1UgZEUExqYynN1qZvqIOREEFmBcJQkwdxiFtw0qEOkGYfRDifBui9MQg4QAHAqWtAWHoCxu1Yf4VfWLPIM2mHDFsbQEVGwyqQoQcwnfHeIkNt9YnkiaS1oizycqJrx4KOQjahZxWbcZgztj2c49nKmkId44S71j0c8eV9yDK6uPRzx5X18eDvjvQ6yKo9ZSS6l//8elePK/Lf//IInrOF/FvDoADYAGBMGb7FtErm5MXMlmPAJQVgWta7Zx2go+8xJ0UiCb8LHHdftWyLJE0QIAIsI+UbXu67dZMjmgDGCGl1H+vpF4NSDckSIkk7Vd+sxEhBQMRU8j/12UIRhzSaUdQ+rQU5kGeFxm+hb1oh6pWWmv3uvmReDl0UnvtapVaIzo1jZbf/pD6ElLqSX+rUmOQNpJFa/r+sa4e/pBlAABoAAAAA3CUgShLdGIxsY7AUABPRrgCABdDuQ5GC7DqPQCgbbJUAoRSUj+NIEig0YfyWUho1VBBBA//uQZB4ABZx5zfMakeAAAAmwAAAAF5F3P0w9GtAAACfAAAAAwLhMDmAYWMgVEG1U0FIGCBgXBXAtfMH10000EEEEEECUBYln03TTTdNBDZopopYvrTTdNa325mImNg3TTPV9q3pmY0xoO6bv3r00y+IDGid/9aaaZTGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU="); - snd.play(); +export class foObject implements iObject { + static beep() { + const snd = new Audio( + // tslint:disable-next-line:max-line-length + 'data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACiDgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhEBcZ6joQBxS76AgccrFlczBvKLC0QI2cBoCFvfTDAo7eoOQInqDPBtvrDEZBNYN5xwNwxQRfw8ZQ5wQVLvO8OYU+mHvFLlDh05Mdg7BT6YrRPpCBznMB2r//xKJjyyOh+cImr2/4doscwD6neZjuZR4AgAABYAAAABy1xcdQtxYBYYZdifkUDgzzXaXn98Z0oi9ILU5mBjFANmRwlVJ3/6jYDAmxaiDG3/6xjQQCCKkRb/6kg/wW+kSJ5//rLobkLSiKmqP/0ikJuDaSaSf/6JiLYLEYnW/+kXg1WRVJL/9EmQ1YZIsv/6Qzwy5qk7/+tEU0nkls3/zIUMPKNX/6yZLf+kFgAfgGyLFAUwY//uQZAUABcd5UiNPVXAAAApAAAAAE0VZQKw9ISAAACgAAAAAVQIygIElVrFkBS+Jhi+EAuu+lKAkYUEIsmEAEoMeDmCETMvfSHTGkF5RWH7kz/ESHWPAq/kcCRhqBtMdokPdM7vil7RG98A2sc7zO6ZvTdM7pmOUAZTnJW+NXxqmd41dqJ6mLTXxrPpnV8avaIf5SvL7pndPvPpndJR9Kuu8fePvuiuhorgWjp7Mf/PRjxcFCPDkW31srioCExivv9lcwKEaHsf/7ow2Fl1T/9RkXgEhYElAoCLFtMArxwivDJJ+bR1HTKJdlEoTELCIqgEwVGSQ+hIm0NbK8WXcTEI0UPoa2NbG4y2K00JEWbZavJXkYaqo9CRHS55FcZTjKEk3NKoCYUnSQ0rWxrZbFKbKIhOKPZe1cJKzZSaQrIyULHDZmV5K4xySsDRKWOruanGtjLJXFEmwaIbDLX0hIPBUQPVFVkQkDoUNfSoDgQGKPekoxeGzA4DUvnn4bxzcZrtJyipKfPNy5w+9lnXwgqsiyHNeSVpemw4bWb9psYeq//uQZBoABQt4yMVxYAIAAAkQoAAAHvYpL5m6AAgAACXDAAAAD59jblTirQe9upFsmZbpMudy7Lz1X1DYsxOOSWpfPqNX2WqktK0DMvuGwlbNj44TleLPQ+Gsfb+GOWOKJoIrWb3cIMeeON6lz2umTqMXV8Mj30yWPpjoSa9ujK8SyeJP5y5mOW1D6hvLepeveEAEDo0mgCRClOEgANv3B9a6fikgUSu/DmAMATrGx7nng5p5iimPNZsfQLYB2sDLIkzRKZOHGAaUyDcpFBSLG9MCQALgAIgQs2YunOszLSAyQYPVC2YdGGeHD2dTdJk1pAHGAWDjnkcLKFymS3RQZTInzySoBwMG0QueC3gMsCEYxUqlrcxK6k1LQQcsmyYeQPdC2YfuGPASCBkcVMQQqpVJshui1tkXQJQV0OXGAZMXSOEEBRirXbVRQW7ugq7IM7rPWSZyDlM3IuNEkxzCOJ0ny2ThNkyRai1b6ev//3dzNGzNb//4uAvHT5sURcZCFcuKLhOFs8mLAAEAt4UWAAIABAAAAAB4qbHo0tIjVkUU//uQZAwABfSFz3ZqQAAAAAngwAAAE1HjMp2qAAAAACZDgAAAD5UkTE1UgZEUExqYynN1qZvqIOREEFmBcJQkwdxiFtw0qEOkGYfRDifBui9MQg4QAHAqWtAWHoCxu1Yf4VfWLPIM2mHDFsbQEVGwyqQoQcwnfHeIkNt9YnkiaS1oizycqJrx4KOQjahZxWbcZgztj2c49nKmkId44S71j0c8eV9yDK6uPRzx5X18eDvjvQ6yKo9ZSS6l//8elePK/Lf//IInrOF/FvDoADYAGBMGb7FtErm5MXMlmPAJQVgWta7Zx2go+8xJ0UiCb8LHHdftWyLJE0QIAIsI+UbXu67dZMjmgDGCGl1H+vpF4NSDckSIkk7Vd+sxEhBQMRU8j/12UIRhzSaUdQ+rQU5kGeFxm+hb1oh6pWWmv3uvmReDl0UnvtapVaIzo1jZbf/pD6ElLqSX+rUmOQNpJFa/r+sa4e/pBlAABoAAAAA3CUgShLdGIxsY7AUABPRrgCABdDuQ5GC7DqPQCgbbJUAoRSUj+NIEig0YfyWUho1VBBBA//uQZB4ABZx5zfMakeAAAAmwAAAAF5F3P0w9GtAAACfAAAAAwLhMDmAYWMgVEG1U0FIGCBgXBXAtfMH10000EEEEEECUBYln03TTTdNBDZopopYvrTTdNa325mImNg3TTPV9q3pmY0xoO6bv3r00y+IDGid/9aaaZTGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=' + ); + snd.play(); + } + + static jsonAlert(obj: any, title: string = 'JSON Alert') { + try { + alert(title + '\r' + JSON.stringify(obj, undefined, 3)); + } catch (ex) { + alert(title + '\r' + JSON.stringify(obj.asJson, undefined, 3)); + alert(ex); } - - static jsonAlert(obj: any, title: string = 'JSON Alert') { - try { - alert(title + '\r' + JSON.stringify(obj, undefined, 3)); - } catch (ex) { - alert(title + '\r' + JSON.stringify(obj.asJson, undefined, 3)); - alert(ex); - } + } + + private _myGuid: string; + myName: string = foNames.UNKNOWN; + myParent: ModelRef; + + private _isVisible: boolean = true; + get isVisible(): boolean { + return this._isVisible; + } + set isVisible(value: boolean) { + this._isVisible = value; + } + get isInvisible(): boolean { + return !this._isVisible; + } + set isInvisible(value: boolean) { + this._isVisible = !value; + } + + show(value: boolean = true) { + this._isVisible = value ? true : false; + return this; + } + hide() { + this._isVisible = false; + return this; + } + + get isPublic() { + return this._isVisible; + } + + constructor(properties?: any, parent?: foObject) { + if (parent) { + this.myParent = () => { + return parent; + }; } + this.override(properties); + } + //https://www.npmjs.com/package/reflect-metadata + //https://stackoverflow.com/questions/13613524/get-an-objects-class-name-at-runtime-in-typescript - //https://www.npmjs.com/package/reflect-metadata - //https://stackoverflow.com/questions/13613524/get-an-objects-class-name-at-runtime-in-typescript + get myType(): string { + const comp: any = this.constructor; + return comp.name; + } + set myType(ignore: string) {} - get myType(): string { - let comp: any = this.constructor; - return comp.name; - } - set myType(ignore: string) { + get myGuid(): string { + if (!this._myGuid) { + this._myGuid = Tools.generateUUID(); } + return this._myGuid; + } - get myGuid(): string { - if (!this._myGuid) { - this._myGuid = Tools.generateUUID(); - } - return this._myGuid; + set myGuid(value) { + if (!this._myGuid) { + this._myGuid = value; } - - set myGuid(value) { - if (!this._myGuid) { - this._myGuid = value; - } + } + + public generateName() { + const short = this.myGuid.slice(-6); + this.myName = `${this.myType}_${short}`; + return this; + } + + public defaultName(name?: string) { + if (name) { + this.myName = name; + } else if (Tools.matches(this.myName, foNames.UNKNOWN)) { + this.generateName(); } + return this; + } - protected _displayName: string; - get displayName() { - if (this._displayName) return this._displayName; - return `${this.myName} - ${this.myType}`; + protected _displayName: string; + get displayName() { + if (this._displayName) { + return this._displayName; } - set displayName(value: string) { - this._displayName = value; + return `${this.myName} - ${this.myType}`; + } + set displayName(value: string) { + this._displayName = value; + } + + setName(name) { + this.myName = name; + return this; + } + + is2D() { + return false; + } + is3D() { + return false; + } + + asReference(): string { + const parent = this.myParent && this.myParent(); + if (!parent) { + return foNames.ROOT; } + return `${this.myName}.${parent.asReference()}`; + } - is2D() { return false; } - is3D() { return false; } + then(next: (obj) => void) { + next(this); + return this; + } - asReference(): string { - let parent = this.myParent && this.myParent(); - if (!parent) { - return foNames.ROOT; - } - return `${this.myName}.${parent.asReference()}`; + hasAncestor(member: iObject): boolean { + if (member === this) { + return true; } - then(next: (obj) => void) { - next(this); - return this; + const parent = this.myParent && this.myParent(); + if (member === parent) { + return true; } + return parent && parent.hasAncestor(member); + } - hasAncestor(member: iObject): boolean { - if (member === this) return true; + get hasParent() { + const parent = this.myParent && this.myParent(); + return parent ? true : false; + } - let parent = this.myParent && this.myParent(); - if (member === parent) return true; - return parent && parent.hasAncestor(member) + removeParent(parent: foObject) { + if (this.hasParent && this.myParent() === parent) { + this.myParent = undefined; } - - get hasParent() { - let parent = this.myParent && this.myParent(); - return parent ? true : false; + return this.hasParent; + } + + setParent(newParent: foObject) { + const parent = this.myParent && this.myParent(); + if (parent !== newParent) { + this.myParent = () => { + return newParent; + }; } - - removeParent(parent: foObject) { - if (this.hasParent && this.myParent() == parent) { - this.myParent = undefined; - } - return this.hasParent; + return this; + } + + public wait(time: number, func: () => void) { + setTimeout(func, time); + return this; + } + + public getChildAt(i: number): iObject { + return undefined; + } + + public extract(keys?: string[], target?) { + const spec = target ? target : {}; + keys && + keys.forEach(key => { + spec[key] = this[key]; + }); + return spec; + } + + public override(properties?: any) { + properties && Tools.overrideComputed(this, properties); + return this; + } + + public extend(properties?: any) { + properties && Tools.extendComputed(this, properties); + return this; + } + + getMethodList() { + //consider moveing this code to baseobject + function getAllMethods(object) { + return Object.getOwnPropertyNames(object).filter(function(property) { + return typeof object[property] === 'function'; + }); } - - public wait(time: number, func: () => void) { - setTimeout(func, time); - return this; - } - - public getChildAt(i: number): iObject { - return undefined; - } - - public override(properties?: any) { - properties && Tools.overrideComputed(this, properties); - return this; - } - - public extend(properties?: any) { - properties && Tools.extendComputed(this, properties); - return this; - } - - getMethodList() { - - //consider moveing this code to baseobject - function getAllMethods(object) { - return Object.getOwnPropertyNames(object).filter(function (property) { - return typeof object[property] == 'function'; - }); + const names = getAllMethods(this); + + const self = this; + const obj1 = {}; + names.forEach(item => { + obj1[item] = self[item](); //evaluate all methods + }); + + return names; + } + + get debug() { + return Tools.stringify(this); + //return JSON.stringify(this,undefined,3); + } + + get asJsonRaw() { + const data = Tools.stringify(this); + return JSON.parse(data); + } + + get asJson() { + return this.toJson(); + } + protected toJson(): any { + return { + myName: this.myName, + myGuid: this.myGuid, + myType: this.myType + }; + } + + protected jsonMerge(source: any) { + const result = Tools.asJson(this); + if (!Tools.isEmpty(source)) { + Tools.forEachKeyValue(source, (key, value) => { + if (!result[key] && !Tools.isEmpty(value)) { + const json = value && value.asJson; + result[key] = json ? json : value; } - - let names = getAllMethods(this); - - let self = this; - let obj1 = {}; - names.forEach(item => { - obj1[item] = self[item](); //evaluate all methods - }) - - return names; - } - - get debug() { - return Tools.stringify(this); - //return JSON.stringify(this,undefined,3); - } - - get asJsonRaw() { - let data = Tools.stringify(this); - return JSON.parse(data); - } - - get asJson() { return this.toJson(); } - protected toJson(): any { - return { - myName: this.myName, - myGuid: this.myGuid, - myType: this.myType, - } - } - - protected jsonMerge(source: any) { - let result = Tools.asJson(this); - if (!Tools.isEmpty(source)) { - Tools.forEachKeyValue(source, (key, value) => { - if (!result[key] && !Tools.isEmpty(value)) { - let json = value && value.asJson; - result[key] = json ? json : value; - } - }); - } - return result; + }); } + return result; + } } - - diff --git a/src/app/foundry/foProperty.model.ts b/src/app/foundry/foProperty.model.ts index 751eaf0..08d9845 100644 --- a/src/app/foundry/foProperty.model.ts +++ b/src/app/foundry/foProperty.model.ts @@ -1,11 +1,7 @@ - - -import { foKnowledge } from './foKnowledge.model' +import { foKnowledge } from './foKnowledge.model'; export class foProperty extends foKnowledge { - constructor(properties?: any, parent?: foKnowledge) { - super(properties, parent); + super(properties, parent); + } } - -} \ No newline at end of file diff --git a/src/app/foundry/foPubSub.ts b/src/app/foundry/foPubSub.ts index ecdb500..f54da6a 100644 --- a/src/app/foundry/foPubSub.ts +++ b/src/app/foundry/foPubSub.ts @@ -1,46 +1,40 @@ -"use strict"; -interface ISubscription { - (...args: any[]): void; -} +export type ISubscription = (...args: any[]) => void; -interface IDictionary { - [name: string]: ISubscription[]; +export interface IDictionary { + [name: string]: ISubscription[]; } +export class foPubSub { + private registry: IDictionary = {}; + Pub(name: string, ...args: any[]) { + if (!this.registry[name]) { return; } + this.registry[name].forEach(fn => { + fn.apply(null, args); + }); + return this; + } - -class foPubSub { - private registry: IDictionary = {} - - Pub(name: string, ...args: any[]) { - if (!this.registry[name]) return; - this.registry[name].forEach(fn => { - fn.apply(null, args); - }); - return this; + Sub(name: string, fn: ISubscription) { + if (!this.registry[name]) { + this.registry[name] = []; } + this.registry[name].push(fn); + return this; + } - Sub(name: string, fn: ISubscription) { - if (!this.registry[name]) { - this.registry[name] = []; - } - this.registry[name].push(fn); - return this; + Unsub(name: string, fn: ISubscription) { + if (this.registry[name]) { + delete this.registry[name]; } + return this; + } - Unsub(name: string, fn: ISubscription) { - if (this.registry[name]) { - delete this.registry[name]; - } - return this; - } - - Clear() { - this.registry = {}; - return this; - } + Clear() { + this.registry = {}; + return this; + } } -export let PubSub: foPubSub = new foPubSub(); \ No newline at end of file +export let PubSub: foPubSub = new foPubSub(); diff --git a/src/app/foundry/foRuntimeType.ts b/src/app/foundry/foRuntimeType.ts index 8cc19a3..3dd69d8 100644 --- a/src/app/foundry/foRuntimeType.ts +++ b/src/app/foundry/foRuntimeType.ts @@ -1,91 +1,93 @@ - import { foObject } from './foObject.model'; import { foNode } from './foNode.model'; import { foKnowledge } from './foKnowledge.model'; -import { Knowcycle, Lifecycle } from "./foLifecycle"; - -export class foRuntimeType extends foObject{ - public modelPrimitives = {} - public knowledgePrimitives = {} - - public primitives(): Array { - return Object.keys(this.modelPrimitives); - } - - public metaPrimitives(): Array { - return Object.keys(this.knowledgePrimitives); - } - - public find(type: string):any { - let found = this.modelPrimitives[type]; - found = found ? found : this.knowledgePrimitives[type]; - return found; - } - - public make(name: string, properties?:any):any { - let type = this.find(name); - if ( type ) { - let instance = new type(properties); - instance.initialize(); - Lifecycle.created(instance); - return instance; - } - } - - public define(type: { new(p?: any, s?: Array, r?: T): T; }) { - let name = type.name; - if ( !this.modelPrimitives[name]) { - this.myName = name; - this.modelPrimitives[name] = type; - Knowcycle.primitive(this,name); - } - return type; - } - - public create(type: { new(p?: any, s?: Array, r?: T): T; }, properties?: any) { - let instance = new type(properties) as T; - instance.initialize(); - Lifecycle.created(instance); - return instance; - } - - public newInstance(type: string, properties?: any) { - let create = this.modelPrimitives[type]; - let instance = this.create(create,properties); - return instance; - } - - - public knowledge(type: { new(p?: any): T; }) { - let name = type.name; - if ( !this.knowledgePrimitives[name]) { - this.myName = name; - this.knowledgePrimitives[name] = type; - Knowcycle.primitive(this,name); - } - return type; +import { Knowcycle, Lifecycle } from './foLifecycle'; + +export class foRuntimeType extends foObject { + public modelPrimitives = {}; + public knowledgePrimitives = {}; + + public primitives(): Array { + return Object.keys(this.modelPrimitives); + } + + public metaPrimitives(): Array { + return Object.keys(this.knowledgePrimitives); + } + + public find(type: string): any { + let found = this.modelPrimitives[type]; + found = found ? found : this.knowledgePrimitives[type]; + return found; + } + + public make(name: string, properties?: any): any { + const type = this.find(name); + if (type) { + const instance = new type(properties); + instance.initialize(); + Lifecycle.created(instance); + return instance; } - - public construct(type: { new(p?: any): T; }, properties?: any) { - let instance = new type(properties); - instance.initialize(); - Knowcycle.created(instance); - return instance; + } + + public define(type: { + new (p?: any, s?: Array, r?: T): T; + }) { + const name = type.name; + if (!this.modelPrimitives[name]) { + this.myName = name; + this.modelPrimitives[name] = type; + Knowcycle.primitive(this, name); } - - //https://www.typescriptlang.org/docs/handbook/mixins.html - public applyMixins(derivedCtor: any, baseCtors: any[]) { - baseCtors.forEach(baseCtor => { - Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => { - derivedCtor.prototype[name] = baseCtor.prototype[name]; - }); - }); + return type; + } + + public create( + type: { new (p?: any, s?: Array, r?: T): T }, + properties?: any + ) { + const instance = new type(properties) as T; + instance.initialize(); + Lifecycle.created(instance); + return instance; + } + + public newInstance(type: string, properties?: any) { + const create = this.modelPrimitives[type]; + const instance = this.create(create, properties); + return instance; + } + + public knowledge(type: { new (p?: any): T }) { + const name = type.name; + if (!this.knowledgePrimitives[name]) { + this.myName = name; + this.knowledgePrimitives[name] = type; + Knowcycle.primitive(this, name); } - + return type; + } + + public construct( + type: { new (p?: any): T }, + properties?: any + ) { + const instance = new type(properties); + instance.initialize(); + Knowcycle.created(instance); + return instance; + } + + //https://www.typescriptlang.org/docs/handbook/mixins.html + public applyMixins(derivedCtor: any, baseCtors: any[]) { + baseCtors.forEach(baseCtor => { + Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => { + derivedCtor.prototype[name] = baseCtor.prototype[name]; + }); + }); + } } export let RuntimeType: foRuntimeType = new foRuntimeType(); - - - diff --git a/src/app/foundry/foSolution.model.ts b/src/app/foundry/foSolution.model.ts index d885994..e4ef81d 100644 --- a/src/app/foundry/foSolution.model.ts +++ b/src/app/foundry/foSolution.model.ts @@ -1,134 +1,143 @@ -import { WhereClause, Action } from './foInterface' +import { WhereClause, Action } from './foInterface'; -import { foKnowledge } from './foKnowledge.model' -import { foAttribute } from './foAttribute.model' -import { foComponent } from './foComponent.model' +import { foKnowledge } from './foKnowledge.model'; +import { foAttribute } from './foAttribute.model'; +import { foComponent } from './foComponent.model'; -import { foDictionary } from './foDictionary.model' -import { foStructure } from './foStructure.model' +import { foDictionary } from './foDictionary.model'; +import { foStructure } from './foStructure.model'; import { RuntimeType } from './foRuntimeType'; -class foAltStructureSpec extends foKnowledge { - structure: foStructure; - exist: WhereClause; - priority: number = 100; - - isValid(context: any):boolean { - if (!this.exist) return true; - try { - let result = this.exist(context); - return result; - } catch(ex) { - return false; - } - +export class foAltStructureSpec extends foKnowledge { + structure: foStructure; + exist: WhereClause; + priority: number = 100; + + isValid(context: any): boolean { + if (!this.exist) { return true; } + try { + const result = this.exist(context); + return result; + } catch (ex) { + return false; } + } } -class foSubSolutionSpec extends foKnowledge { - solution: foSolution; - name: string; - order: number = 0; - spec:any={} +export class foSubSolutionSpec extends foKnowledge { + solution: foSolution; + name: string; + order: number = 0; + spec: any = {}; } - export class foSolution extends foKnowledge { + private _structures: foDictionary; + private _solutions: foDictionary; - private _structures: foDictionary; - private _solutions: foDictionary; + private _attributes: foDictionary; - private _attributes: foDictionary; - + constructor(properties?: any, parent?: foKnowledge) { + super(properties, parent); + } - constructor(properties?: any, parent?: foKnowledge) { - super(properties, parent); + attribute(name: string, spec?: any | foAttribute) { + if (!this._attributes) { + this._attributes = new foDictionary(); } - - attribute(name: string, spec?: any | foAttribute) { - if (!this._attributes) { - this._attributes = new foDictionary(); - } - return this; + return this; + } + + private addAltStructureSpec( + structure: foStructure, + exist: WhereClause, + priority?: number + ): foAltStructureSpec { + if (!this._structures) { + this._structures = new foDictionary(); } - - private addAltStructureSpec(structure: foStructure, exist: WhereClause, priority?: number): foAltStructureSpec { - if (!this._structures) { - this._structures = new foDictionary(); - } - let altSpec = new foAltStructureSpec({ - exist, - structure, - priority: priority - }); - this._structures.addItem(structure.myName, altSpec); - return altSpec; + const altSpec = new foAltStructureSpec({ + exist, + structure, + priority: priority + }); + this._structures.addItem(structure.myName, altSpec); + return altSpec; + } + + useStructure( + spec?: any | foStructure, + exist?: WhereClause, + priority?: number + ) { + const structure = + spec instanceof foStructure ? spec : new foStructure(spec, this); + this.addAltStructureSpec(structure, exist, priority); + return this; + } + + get altStructures(): Array { + if (this._structures) { + return this._structures.members.sort((a, b) => a.priority - b.priority); } - - useStructure(spec?: any | foStructure, exist?: WhereClause, priority?: number) { - let structure = spec instanceof foStructure ? spec : new foStructure(spec, this); - this.addAltStructureSpec(structure, exist, priority); - return this; + } + + private addSubStructureSpec( + name: string, + solution: foSolution, + properties?: any + ): foSubSolutionSpec { + if (!this._solutions) { + this._solutions = new foDictionary(); } - - get altStructures(): Array { - if (this._structures) { - return this._structures.members.sort((a, b) => a.priority - b.priority); - } + const subSpec = new foSubSolutionSpec({ + name, + solution, + order: this._solutions.count + 1, + spec: properties || {} + }); + this._solutions.addItem(name, subSpec); + return subSpec; + } + + subSolution(name: string, spec?: any | foSolution, properties?: any) { + const structure = + spec instanceof foSolution ? spec : new foSolution(spec, this); + this.addSubStructureSpec(name, structure, properties); + return this; + } + + get solutions(): Array { + if (this._solutions) { + return this._solutions.members.sort((a, b) => a.order - b.order); } - - - private addSubStructureSpec(name: string, solution: foSolution, properties?:any): foSubSolutionSpec { - if (!this._solutions) { - this._solutions = new foDictionary(); + } + + makeComponent(parent?: any, properties?: any, onComplete?: Action): any { + let result; + this.altStructures && + this.altStructures.forEach(item => { + if (!result && item.isValid(parent)) { + const structure = item.structure; + result = structure.makeComponent(parent, properties, child => { + child.defaultName(); + }); } - let subSpec = new foSubSolutionSpec({ - name, - solution, - order: this._solutions.count + 1, - spec: properties || {} + }); + + result && + this.solutions && + this.solutions.forEach(item => { + const solution = item.solution; + solution.makeComponent(result, item.spec, child => { + child.defaultName(item.name); }); - this._solutions.addItem(name, subSpec); - return subSpec; - } - - subSolution(name: string, spec?: any | foSolution, properties?:any) { - let structure = spec instanceof foSolution ? spec : new foSolution(spec, this); - this.addSubStructureSpec(name, structure, properties); - return this; - } - - get solutions(): Array { - if (this._solutions) { - return this._solutions.members.sort((a, b) => a.order - b.order); - } - } - - makeComponent(parent?: any, properties?: any, onComplete?: Action): any { - - let result; - this.altStructures && this.altStructures.forEach(item => { - - if (!result && item.isValid(parent)) { - let structure = item.structure; - result = structure.makeComponent(parent, properties, (child) => { - child.defaultName(); - }); - } - }); - - result && this.solutions && this.solutions.forEach(item => { - let solution = item.solution; - solution.makeComponent(result, item.spec, child => { - child.defaultName(item.name); - }); - }); - - result && onComplete && onComplete(result); - return result; - } + }); + result && onComplete && onComplete(result); + return result; + } } -RuntimeType.knowledge(foSolution); \ No newline at end of file +RuntimeType.knowledge(foSolution); diff --git a/src/app/foundry/foStencil.ts b/src/app/foundry/foStencil.ts index 52a17a0..393b5cd 100644 --- a/src/app/foundry/foStencil.ts +++ b/src/app/foundry/foStencil.ts @@ -1,97 +1,99 @@ -import { Tools } from '../foundry/foTools' +import { Tools } from '../foundry/foTools'; import { Action, Spec } from '../foundry/foInterface'; -import { foNode } from './foNode.model' -import { foConcept } from 'app/foundry/foConcept.model'; -import { foMethod, foFactory } from 'app/foundry/foMethod.model'; -import { foLibrary } from 'app/foundry/foLibrary.model'; - +import { foNode } from './foNode.model'; +import { foConcept } from './foConcept.model'; +import { foMethod, foFactory } from './foMethod.model'; +import { foLibrary } from './foLibrary.model'; import { RuntimeType } from './foRuntimeType'; import { Knowcycle } from './foLifecycle'; - - export class foStencilLibrary extends foLibrary { - - public namespaces(): Array { - let lookup = {} - this.concepts.members.forEach( concept => { - let { namespace } = Tools.splitNamespaceType(concept.myName); - lookup[namespace] = concept; - }) - return Object.keys(lookup); - } - - - - public find(id: string): foConcept { - let concept = this.concepts.getItem(id) as foConcept; - return concept; - } - - public impermanent(myName: string, type: { new(p?: any, s?: Array, r?: T): T; }, specification?: any): foConcept { - RuntimeType.define(type); - - let concept = new foConcept({ myName }); - - concept.definePrimitive(type); - concept.specification = specification || {}; - return concept; + public namespaces(): Array { + const lookup = {}; + this.concepts.members.forEach(concept => { + const { namespace } = Tools.splitNamespaceType(concept.myName); + lookup[namespace] = concept; + }); + return Object.keys(lookup); + } + + public find(id: string): foConcept { + const concept = this.concepts.getItem(id) as foConcept; + return concept; + } + + public impermanent( + myName: string, + type: { new (p?: any, s?: Array, r?: T): T }, + specification?: any + ): foConcept { + RuntimeType.define(type); + + const concept = new foConcept({ myName }); + + concept.definePrimitive(type); + concept.specification = specification || {}; + return concept; + } + + public define( + myName: string, + type: { new (p?: any, s?: Array, r?: T): T }, + specification?: any + ): foConcept { + RuntimeType.define(type); + + const concept = new foConcept({ myName }); + + concept.definePrimitive(type); + concept.specification = specification || {}; + + this.concepts.addItem(myName, concept); + Knowcycle.defined(concept); + return concept; + } + + public hydrate(json: any): foConcept { + const { specification, primitive } = json; + + const concept = new foConcept(json); + //foObject.jsonAlert(data); + + const type = RuntimeType.modelPrimitives[primitive]; + if (!type) { + throw Error('runtimeType not found ' + type); } - - public define(myName: string, type: { new(p?: any, s?: Array, r?: T): T; }, specification?: any): foConcept { - RuntimeType.define(type); - - let concept = new foConcept({ myName }); - - concept.definePrimitive(type); - concept.specification = specification || {}; - - this.concepts.addItem(myName, concept); - Knowcycle.defined(concept); - return concept; - } - - public hydrate(json: any): foConcept { - let { specification, primitive } = json; - - let concept = new foConcept(json); - //foObject.jsonAlert(data); - - let type = RuntimeType.modelPrimitives[primitive]; - if (!type) { - throw Error('runtimeType not found ' + type) - } - concept.definePrimitive(type); - concept.specification = specification; - - this.concepts.addItem(concept.myName, concept); - Knowcycle.defined(concept); - return concept; - } - - public action(myName: string, funct:Action): foMethod { - - let method = new foMethod(funct, { myName }); - - this.actions.addItem(myName, method); - Knowcycle.defined(method); - return method; - } - - public factory(myName: string, funct:Spec): foFactory { - - let method = new foFactory(funct, { myName }); - - this.factories.addItem(myName, method); - Knowcycle.defined(method); - return method; - } - + concept.definePrimitive(type); + concept.specification = specification; + + this.concepts.addItem(concept.myName, concept); + Knowcycle.defined(concept); + return concept; + } + + public action( + myName: string, + funct: Action + ): foMethod { + const method = new foMethod(funct, { myName }); + + this.actions.addItem(myName, method); + Knowcycle.defined(method); + return method; + } + + public factory( + myName: string, + funct: Spec + ): foFactory { + const method = new foFactory(funct, { myName }); + + this.factories.addItem(myName, method); + Knowcycle.defined(method); + return method; + } } - export let Stencil: foStencilLibrary = new foStencilLibrary(); - - diff --git a/src/app/foundry/foStructure.model.ts b/src/app/foundry/foStructure.model.ts index 748bbaa..64ecce0 100644 --- a/src/app/foundry/foStructure.model.ts +++ b/src/app/foundry/foStructure.model.ts @@ -1,108 +1,106 @@ -import { WhereClause, Action } from './foInterface' +import { WhereClause, Action } from './foInterface'; -import { foKnowledge } from './foKnowledge.model' -import { foConcept } from './foConcept.model' -import { foAttribute } from './foAttribute.model' -import { foComponent } from './foComponent.model' +import { foKnowledge } from './foKnowledge.model'; +import { foConcept } from './foConcept.model'; +import { foAttribute } from './foAttribute.model'; +import { foComponent } from './foComponent.model'; -import { foDictionary } from './foDictionary.model' +import { foDictionary } from './foDictionary.model'; import { RuntimeType } from './foRuntimeType'; -class foSubStructureSpec extends foKnowledge { - structure: foStructure; - name: string; - order: number = 0; - spec:any = {} +export class foSubStructureSpec extends foKnowledge { + structure: foStructure; + name: string; + order: number = 0; + spec: any = {}; } - - - export class foStructure extends foKnowledge { + private _concept: foConcept; + private _attributes: foDictionary; - private _concept: foConcept; - private _attributes: foDictionary; + private _structures: foDictionary; + private _existWhen: Array>; - private _structures: foDictionary; - private _existWhen: Array>; + //return a new collection that could be destroyed - //return a new collection that could be destroyed + constructor(properties?: any, parent?: foKnowledge) { + super(properties, parent); + } - - constructor(properties?: any, parent?: foKnowledge) { - super(properties, parent); + private addSubStructureSpec( + name: string, + structure: foStructure, + properties?: any + ): foSubStructureSpec { + if (!this._structures) { + this._structures = new foDictionary(); } - - private addSubStructureSpec(name: string, structure: foStructure, properties?:any): foSubStructureSpec { - if (!this._structures) { - this._structures = new foDictionary(); - } - let subSpec = new foSubStructureSpec({ - name, - structure, - order: this._structures.count + 1, - spec: properties || {} - }); - this._structures.addItem(name, subSpec); - return subSpec; + const subSpec = new foSubStructureSpec({ + name, + structure, + order: this._structures.count + 1, + spec: properties || {} + }); + this._structures.addItem(name, subSpec); + return subSpec; + } + + subComponent(name: string, spec?: any | foStructure, properties?: any) { + const structure = + spec instanceof foStructure ? spec : new foStructure(spec, this); + this.addSubStructureSpec(name, structure, properties); + return this; + } + get structures(): Array { + if (this._structures) { + return this._structures.members.sort((a, b) => a.order - b.order); } + } - subComponent(name: string, spec?: any | foStructure, properties?:any) { - let structure = spec instanceof foStructure ? spec : new foStructure(spec, this); - this.addSubStructureSpec(name, structure, properties); - return this; + attribute(name: string, spec?: any | foAttribute) { + if (!this._attributes) { + this._attributes = new foDictionary(); } - get structures(): Array { - if (this._structures) { - return this._structures.members.sort((a, b) => a.order - b.order); - } + return this; + } + + concept(concept?: foConcept) { + this._concept = concept; + //this.select(where, list, deep) + return this; + } + + existWhen(when: WhereClause) { + this._existWhen.push(when); + return this; + } + + private canExist(context?: foComponent): boolean { + const result = true; + return result; + } + + makeComponent(parent?: any, properties?: any, onComplete?: Action): any { + if (!this.canExist(parent)) { + return; } - attribute(name: string, spec?: any | foAttribute) { - if (!this._attributes) { - this._attributes = new foDictionary(); - } - return this; - } - - concept(concept?: foConcept) { - this._concept = concept; - //this.select(where, list, deep) - return this; - } - - existWhen(when: WhereClause) { - this._existWhen.push(when) - return this; - } - - private canExist(context?: foComponent): boolean { - let result = true; - return result; - } - - makeComponent(parent?: any, properties?: any, onComplete?: Action): any { - - if (!this.canExist(parent)) { - return; - } - - let concept = this._concept ? this._concept : new foConcept(); - let result = concept.makeComponent(parent, properties); - - this.structures && this.structures.forEach(item => { - let structure = item.structure; - structure.makeComponent(result, item.spec, child => { - child.defaultName(item.name); - }); + const concept = this._concept ? this._concept : new foConcept(); + const result = concept.makeComponent(parent, properties); + this.structures && + this.structures.forEach(item => { + const structure = item.structure; + structure.makeComponent(result, item.spec, child => { + child.defaultName(item.name); }); + }); - result && onComplete && onComplete(result); - return result; - } - + result && onComplete && onComplete(result); + return result; + } } -RuntimeType.knowledge(foStructure); \ No newline at end of file +RuntimeType.knowledge(foStructure); diff --git a/src/app/foundry/foTemplate.model.ts b/src/app/foundry/foTemplate.model.ts index aceb572..c451c87 100644 --- a/src/app/foundry/foTemplate.model.ts +++ b/src/app/foundry/foTemplate.model.ts @@ -1,13 +1,10 @@ -import { foKnowledge } from './foKnowledge.model' +import { foKnowledge } from './foKnowledge.model'; import { RuntimeType } from './foRuntimeType'; export class foTemplate extends foKnowledge { - - constructor(spec?:any) { + constructor(spec?: any) { super(spec); } - } RuntimeType.knowledge(foTemplate); - diff --git a/src/app/foundry/foTools.ts b/src/app/foundry/foTools.ts index d741693..d3f4da1 100644 --- a/src/app/foundry/foTools.ts +++ b/src/app/foundry/foTools.ts @@ -1,13 +1,10 @@ -"use strict"; - - export enum foNames { - UNKNOWN = "unknown", - AT = '@', - THIS = 'this', - SELF = 'self', - ROOT = 'root' -}; + UNKNOWN = 'unknown', + AT = '@', + THIS = 'this', + SELF = 'self', + ROOT = 'root' +} // Converts numeric degrees to radians // if (typeof (Number.prototype.toRad) === "undefined") { @@ -22,467 +19,578 @@ export enum foNames { // } export class foTools { - - // Speed up calls to hasOwnProperty - private hasOwnProperty = Object.prototype.hasOwnProperty; - - constructor() { + // Speed up calls to hasOwnProperty + private hasOwnProperty = Object.prototype.hasOwnProperty; + + constructor() {} + + /** + * http://stackoverflow.com/questions/6588977/how-to-to-extract-a-javascript-function-from-a-javascript-file + * @param funct + */ + getFunctionName(funct) { + let ret = funct.toString(); //do with regx + ret = ret.substr('function '.length); + ret = ret.substr(0, ret.indexOf('(')); + return ret.trim(); + } + + //http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript + generateUUID() { + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace( + /[xy]/g, + function(c) { + // tslint:disable-next-line:no-bitwise + const r = ((d + Math.random() * 16) % 16) | 0; + d = Math.floor(d / 16); + // tslint:disable-next-line:no-bitwise + return (c === 'x' ? r : (r & 0x7) | 0x8).toString(16); + } + ); + return uuid; + } + + asJson(target: any) { + const result = this.stringify(target); + return JSON.parse(result); + } + + stringify(target: any, func = undefined, deep = 3) { + function resolveReference(value) { + if (value && value.asReference) { + return ( + 'resolveRef(' + + value.asReference() + + ',' + + value.constructor.name + + ')' + ); + } + return value; } - - - /** - * http://stackoverflow.com/questions/6588977/how-to-to-extract-a-javascript-function-from-a-javascript-file - * @param funct - */ - getFunctionName(funct) { - let ret = funct.toString(); //do with regx - ret = ret.substr('function '.length); - ret = ret.substr(0, ret.indexOf('(')); - return ret.trim(); - }; - - //http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript - generateUUID() { - var d = new Date().getTime(); - var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { - var r = (d + Math.random() * 16) % 16 | 0; - d = Math.floor(d / 16); - return (c == 'x' ? r : (r & 0x7 | 0x8)).toString(16); - }); - return uuid; - }; - - asJson(target: any) { - let result = this.stringify(target); - return JSON.parse(result); + function resolveCircular(key, value) { + switch (key) { + case 'myParent': + return resolveReference(value); + case 'myMembers': + return value + ? value.map(function(item) { + return resolveReference(item); + }) + : value; + case '_lookup': + return value; + case '_members': + return value; + } + if (key.startsWith('_')) { + return; + } + //if (this.isCustomLinkName(key)) { + // return resolveReference(value); + //} + + return value; } - stringify(target: any, func = undefined, deep = 3) { - function resolveReference(value) { - if (value && value.asReference) { - return 'resolveRef(' + value.asReference() + ',' + value.constructor.name + ')'; - } - return value; - } - function resolveCircular(key, value) { - - switch (key) { - case 'myParent': - return resolveReference(value); - case 'myMembers': - return value ? value.map(function (item) { return resolveReference(item); }) : value; - case '_lookup': - return value; - case '_members': - return value; - } - if (key.startsWith('_')) return; - //if (this.isCustomLinkName(key)) { - // return resolveReference(value); - //} - - return value; - } - - return JSON.stringify(target, resolveCircular, deep); - }; - - splitNamespaceType(id: string, primitive?: string) { - let typeId = id.split('::'); - let result = { namespace: '', name: id } - if (typeId.length == 2) { - result = { - namespace: typeId[0], - name: typeId[1] - } - } else if (primitive) { - result = { - namespace: typeId[0], - name: primitive - } - } - return result; - }; - - getNamespace(obj) { - var myNamespace = obj.myType ? obj.myType.split('::') : ['']; - myNamespace = myNamespace[0]; - return myNamespace; - }; - - getType(obj): string { - let myType = obj.myType ? obj.myType.split('::') : ['']; - myType = myType.length == 2 ? myType[1] : myType[0]; - return myType; - }; - - namespace(namespace: string, name: string) { - return `${namespace}::${name}`; - }; - - - randomInt(low: number, high: number) { - return low + Math.floor(Math.random() * (high - low + 1)); - }; - - random(low: number, high: number) { - return low + Math.random() * (high - low); - }; - - randomRGBColor() { - var r = 255 * Math.random() | 0, - g = 255 * Math.random() | 0, - b = 255 * Math.random() | 0; - return `rgb(${r},${g},${b})`; + return JSON.stringify(target, resolveCircular, deep); + } + + splitNamespaceType(id: string, primitive?: string) { + const typeId = id.split('::'); + let result = { namespace: '', name: id }; + if (typeId.length === 2) { + result = { + namespace: typeId[0], + name: typeId[1] + }; + } else if (primitive) { + result = { + namespace: typeId[0], + name: primitive + }; } - - matches(str1: string, str2: string) { - if (str1 === str2) return true; - return str1 && str2 && str1.toLocaleLowerCase() == str2.toLocaleLowerCase(); + return result; + } + + getNamespace(obj) { + let myNamespace = obj.myType ? obj.myType.split('::') : ['']; + myNamespace = myNamespace[0]; + return myNamespace; + } + + getType(obj): string { + let myType = obj.myType ? obj.myType.split('::') : ['']; + myType = myType.length === 2 ? myType[1] : myType[0]; + return myType; + } + + namespace(namespace: string, name: string) { + return `${namespace}::${name}`; + } + + randomInt(low: number, high: number) { + return low + Math.floor(Math.random() * (high - low + 1)); + } + + random(low: number, high: number) { + return low + Math.random() * (high - low); + } + + randomRGBColor() { + // tslint:disable-next-line:no-bitwise + const r = (255 * Math.random()) | 0; + // tslint:disable-next-line:no-bitwise + const g = (255 * Math.random()) | 0; + // tslint:disable-next-line:no-bitwise + const b = (255 * Math.random()) | 0; + return `rgb(${r},${g},${b})`; + } + + matches(str1: string, str2: string) { + if (str1 === str2) { + return true; } - - capitalizeFirstLetter(str1: string) { - return str1.charAt(0).toUpperCase() + str1.slice(1); + return ( + str1 && str2 && str1.toLocaleLowerCase() === str2.toLocaleLowerCase() + ); + } + + startsWith(str1: string, str2: string) { + if (str1 === str2) { + return true; + } + return ( + str1 && str2 && str1.toLocaleLowerCase().startsWith(str2.toLocaleLowerCase()) + ); + } + + capitalizeFirstLetter(str1: string) { + return str1.charAt(0).toUpperCase() + str1.slice(1); + } + + isSelf(ref) { + return ( + this.matches(ref, foNames.AT) || + this.matches(ref, foNames.THIS) || + this.matches(ref, foNames.SELF) + ); + } + + isArray(obj) { + if (Array.isArray) { + return Array.isArray(obj); + } + return Object.prototype.toString.call(obj) === '[object Array]' + ? true + : false; + } + + isFunction(obj) { + return typeof obj === 'function'; + } + + isString(obj) { + return typeof obj === 'string'; + } + + isNumber(obj) { + return typeof obj === 'number'; + } + + isDate(obj) { + return obj instanceof Date; + } + + isObject(obj) { + return obj && typeof obj === 'object'; //prevents typeOf null === 'object' + } + + isCustomLinkName(key) { + return false; + } + + isTyped(obj) { + return obj && obj.isInstanceOf; + } + + isEmpty(obj) { + // null and undefined are "empty" + if (obj == null) { + return true; } - isSelf(ref) { - return this.matches(ref, foNames.AT) || this.matches(ref, foNames.THIS) || this.matches(ref, foNames.SELF) - }; - - isArray(obj) { - if (Array.isArray) return Array.isArray(obj); - return (Object.prototype.toString.call(obj) === '[object Array]') ? true : false; - }; - - isFunction(obj) { - return typeof obj === 'function'; - }; + // Assume if it has a length property with a non-zero value + // that that property is correct. + if (obj.length > 0) { + return false; + } + if (obj.length === 0) { + return true; + } - isString(obj) { - return typeof obj === 'string'; - }; + // If it isn't an object at this point + // it is empty, but it can't be anything *but* empty + // Is it empty? Depends on your application. + if (typeof obj !== 'object') { + return true; + } - isNumber(obj) { - return typeof obj === 'number'; - }; + // Otherwise, does it have any properties of its own? + // Note that this doesn't handle + // toString and valueOf enumeration bugs in IE < 9 + // tslint:disable-next-line:prefer-const + for (let key in obj) { + if (this.hasOwnProperty.call(obj, key)) { + return false; + } + } - isDate(obj) { - return obj instanceof Date; - }; + return true; + } - isObject(obj) { - return obj && typeof obj === 'object'; //prevents typeOf null === 'object' - }; + removeDQ(str: string): string { + return str.replace(/^"(.*)"$/, '$1'); + } - isCustomLinkName(key) { - return false; - }; + unwrap(str: string): string { + return str.substring(1, str.length - 1); + } - isTyped(obj) { - return obj && obj.isInstanceOf; - }; + wrapDQ(str: string): string { + return `"${str}"`; + } - isEmpty(obj) { - // null and undefined are "empty" - if (obj == null) return true; - - // Assume if it has a length property with a non-zero value - // that that property is correct. - if (obj.length > 0) return false; - if (obj.length === 0) return true; - - // If it isn't an object at this point - // it is empty, but it can't be anything *but* empty - // Is it empty? Depends on your application. - if (typeof obj !== "object") return true; - - // Otherwise, does it have any properties of its own? - // Note that this doesn't handle - // toString and valueOf enumeration bugs in IE < 9 - for (var key in obj) { - if (this.hasOwnProperty.call(obj, key)) return false; - } + wrapSQ(str: string): string { + return `'${str}'`; + } - return true; + decomposeHostPath(filename) { + let string = filename.toLowerCase(); + string = string.replace('http://', ''); + string = string.replace('https://', ''); + const host = string.split('/')[0]; + const path = string.replace(host, ''); + return { + fullpath: filename, + host: host, + path: path }; + } - removeDQ(str: string): string { - return str.replace(/^"(.*)"$/, '$1'); + extend(target, source) { + if (!source) { + return target; } - - unwrap(str: string): string { - return str.substring(1, str.length - 1) + // tslint:disable-next-line:prefer-const + for (var key in source) { + if (this.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } } + return target; + } - wrapDQ(str: string): string { - return `"${str}"`; + mixin(target, source) { + if (!source) { + return target; } - - wrapSQ(str: string): string { - return `'${str}'`; + if (!target) { + return source; } - decomposeHostPath(filename) { - var string = filename.toLowerCase(); - string = string.replace('http://', "") - string = string.replace('https://', "") - - var host = string.split('/')[0]; - var path = string.replace(host, ''); - return { - fullpath: filename, - host: host, - path: path, - } - }; - - extend(target, source) { - if (!source) return target; - for (var key in source) { - if (this.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - return target; - }; - - mixin(target, source) { - if (!source) return target; - if (!target) return source; - for (var key in source) { - target[key] = source[key]; - } - return target; - }; + for (const key of source) { + target[key] = source[key]; + } + return target; + } - mixExact(target, source) { - if (!source) return target; - if (!target) return source; - for (var key in source) { - if (foTools.hasOwnProperty.call(target, key)) { - target[key] = source[key]; - } - } - return target; - }; + mixExact(target, source) { + if (!source) { + return target; + } + if (!target) { + return source; + } + for (const key in source) { + if (foTools.hasOwnProperty.call(target, key)) { + target[key] = source[key]; + } + } + return target; + } - mixout(target, source) { - if (!source) return target; - if (!target) return source; - for (var key in source) { - if (this.hasOwnProperty.call(target, key)) { - delete target[key]; - } - } - return target; - }; + mixout(target, source) { + if (!source) { + return target; + } + if (!target) { + return source; + } + for (const key in source) { + if (this.hasOwnProperty.call(target, key)) { + delete target[key]; + } + } + return target; + } + + extract(target, keys?: string[]) { + const spec = {}; + keys && + keys.forEach(key => { + spec[key] = target[key]; + }); + return spec; + } + + mixMap(target, source) { + if (!source) { + return target; + } - mixMap(target, source) { - if (!source) return target; - var result = {}; - for (var key in target) { - var keyMap = source[key] || key; - result[keyMap] = target[key]; - } - return result; - }; + let result = {}; + for (let key in target) { + const keyMap = source[key] || key; + result[keyMap] = target[key]; + } + return result; + } - intersect(target, source) { - if (!source) return target; - if (!target) return source; - var intersect = {}; - for (var key in target) { - if (this.hasOwnProperty.call(source, key)) { - intersect[key] = source[key]; - } else { - intersect[key] = target[key]; - } - } - return intersect; - }; + intersect(target, source) { + if (!source) { + return target; + } + if (!target) { + return source; + } + const intersect = {}; + for (const key in target) { + if (this.hasOwnProperty.call(source, key)) { + intersect[key] = source[key]; + } else { + intersect[key] = target[key]; + } + } + return intersect; + } + + union(target, source) { + const result = {}; + if (target) { + for (var key in target) { + result[key] = target[key]; + } + } + if (source) { + for (var key in source) { + result[key] = source[key]; + } + } + return result; + } + + defineComputeOnlyProperty(target, name, func) { + //var self = target; + Object.defineProperty(target, name, { + enumerable: true, + configurable: true, + get: func + }); + return target; + } + + defineCalculatedProperty(target, name, func) { + //var self = target; + Object.defineProperty(target, name, { + enumerable: true, + configurable: true, + get: func, //.call(self, self), + set: function(value) { + this[`_${name}`] = value; + } + }); + return target; + } + + getMethods(obj) { + const list = []; + for (const m in obj.prototype) { + if (typeof obj[m] === 'function') { + list.push(m); + } + } + return list; + } - union(target, source) { - var result = {}; - if (target) { - for (var key in target) { - result[key] = target[key]; - } + asArray(obj, funct?) { + if (this.isArray(obj)) { + return obj; + } + return this.mapOverKeyValue(obj, function(key, value) { + return funct ? funct(key, value) : value; + }); + } + + applyOverKeyValue(obj, mapFunc) { + //funct has 2 args.. key,value + const body = {}; + const keys = obj ? Object.keys(obj) : []; + keys.forEach(key => { + if (this.hasOwnProperty.call(obj, key)) { + const value = obj[key]; + const result = mapFunc(key, value); + if (result) { + body[key] = result; } - if (source) { - for (var key in source) { - result[key] = source[key]; - } + } + }); + return body; + } + + mapOverKeyValue(obj, mapFunc) { + //funct has 2 args.. key,value + const list = []; + const keys = obj ? Object.keys(obj) : []; + keys.forEach(key => { + if (this.hasOwnProperty.call(obj, key)) { + const value = obj[key]; + const result = mapFunc(key, value); + if (result) { + list.push(result); } - return result; - }; - - defineComputeOnlyProperty(target, name, func) { - //var self = target; - Object.defineProperty(target, name, { - enumerable: true, - configurable: true, - get: func - }); - return target; - }; - - defineCalculatedProperty(target, name, func) { - //var self = target; - Object.defineProperty(target, name, { - enumerable: true, - configurable: true, - get: func, //.call(self, self), - set: function(value) { - this[`_${name}`] = value; - } - }); - return target; - }; - - getMethods(obj) { - var list = []; - for (var m in obj.prototype) { - if (typeof obj[m] == "function") { - list.push(m) - } + } + }); + return list; + } + + forEachKeyValue(obj, mapFunc) { + //funct has 2 args.. key,value + const keys = obj ? Object.keys(obj) : []; + keys.forEach(key => { + if (this.hasOwnProperty.call(obj, key)) { + const value = obj[key]; + mapFunc(key, value); + } + }); + } + + findKeyForValue(obj, key) { + for (const name in obj) { + if (this.hasOwnProperty.call(obj, key)) { + if (obj[name].matches(key)) { + return name; } - return list; + } } - - asArray(obj, funct?) { - if (this.isArray(obj)) return obj; - return this.mapOverKeyValue(obj, function (key, value) { return funct ? funct(key, value) : value; }); - }; - - applyOverKeyValue(obj, mapFunc) { //funct has 2 args.. key,value - var body = {}; - var keys = obj ? Object.keys(obj) : []; - keys.forEach(key => { - if (this.hasOwnProperty.call(obj, key)) { - var value = obj[key]; - var result = mapFunc(key, value); - if (result) body[key] = result; - } - }); - return body; - }; - - mapOverKeyValue(obj, mapFunc) { //funct has 2 args.. key,value - var list = []; - var keys = obj ? Object.keys(obj) : []; - keys.forEach(key => { - if (this.hasOwnProperty.call(obj, key)) { - var value = obj[key]; - var result = mapFunc(key, value); - if (result) list.push(result); - } - }); - return list; - }; - - forEachKeyValue(obj, mapFunc) { //funct has 2 args.. key,value - var keys = obj ? Object.keys(obj) : []; - keys.forEach(key => { - if (this.hasOwnProperty.call(obj, key)) { - var value = obj[key]; - mapFunc(key, value); - } - }); - }; - - findKeyForValue(obj, key) { - for (var name in obj) { - if (this.hasOwnProperty.call(obj, key)) { - if (obj[name].matches(key)) return name; - } + return obj; + } + + extractReadWriteKeys(spec) { + const keys: string[] = []; + Tools.forEachKeyValue(spec, (k, v) => { + if (!Tools.isFunction(v)) { + keys.push(k); + } + }); + return keys; + } + + extractComputedKeys(spec) { + const keys: string[] = []; + Tools.forEachKeyValue(spec, (k, v) => { + if (Tools.isFunction(v)) { + keys.push(k); + } + }); + return keys; + } + + overrideComputed(obj: any, properties: any) { + Tools.forEachKeyValue(properties, function(key, value) { + try { + if (Tools.isFunction(value)) { + Tools.defineCalculatedProperty(obj, key, value); + } else { + obj[key] = value; } - return obj; - }; - - overrideComputed(obj: any, properties: any) { - Tools.forEachKeyValue(properties, function (key, value) { - try { - if (Tools.isFunction(value)) { - Tools.defineCalculatedProperty(obj, key, value); - } else { - obj[key] = value; - } - } catch (ex) { - console.log(ex); - } - }); - } - - extendComputed(obj: any, properties: any) { - Tools.forEachKeyValue(properties, function (key, value) { - try { - if (!obj[key]) { - if (Tools.isFunction(value)) { - Tools.defineCalculatedProperty(obj, key, value); - } else { - obj[key] = value; - } - } - } catch (ex) { - console.log(ex); - } - }); - } - - pluck(name) { - return function (x) { return x[name] } - } - - distinctItems(list) { - let distinct = {} - list.forEach(item => { - distinct[item] = item; - }) - return Object.keys(distinct); - } - - groupBy(pluckBy, list) { - let dictionary = {} - list.forEach(item => { - let key = pluckBy(item); - if (!dictionary[key]) { - dictionary[key] = []; - } - dictionary[key].push(item); - }) - return dictionary; - } - - //add this to new service to dynamicaly load javascript, maybe over signalR - - // xmlHttpGet(url:string, onComplete, onFailure) { - // let xmlHttp = new window.XMLHttpRequest(); - // xmlHttp.onload = function () { - // var result = xmlHttp.responseText; - // onComplete && onComplete(result, xmlHttp); - // }; - // try { - // xmlHttp.open("GET", url, false); //this may give chrome some problems - // xmlHttp.send(null); - // } - // catch (ex) { - // onFailure && onFailure(ex, xmlHttp); - // } - // } - // loadAsScript(url:string, onComplete) { - // this.xmlHttpGet(url, function (text, xhr) { - // if (xhr.status == 200 || xhr.status == 304) { - // var head = document.getElementsByTagName("head")[0]; - // var script = document.createElement('script'); - // script.innerHTML = text; - // head.appendChild(script); - // onComplete && onComplete(script); - // } - // }); - //} - + } catch (ex) { + console.log(ex); + } + }); + } + + extendComputed(obj: any, properties: any) { + Tools.forEachKeyValue(properties, function(key, value) { + try { + if (!obj[key]) { + if (Tools.isFunction(value)) { + Tools.defineCalculatedProperty(obj, key, value); + } else { + obj[key] = value; + } + } + } catch (ex) { + console.log(ex); + } + }); + } + + pluck(name) { + return function(x) { + return x[name]; + }; + } + + distinctItems(list) { + const distinct = {}; + list.forEach(item => { + distinct[item] = item; + }); + return Object.keys(distinct); + } + + groupBy(pluckBy, list) { + const dictionary = {}; + list.forEach(item => { + const key = pluckBy(item); + if (!dictionary[key]) { + dictionary[key] = []; + } + dictionary[key].push(item); + }); + return dictionary; + } + + //add this to new service to dynamicaly load javascript, maybe over signalR + + // xmlHttpGet(url:string, onComplete, onFailure) { + // let xmlHttp = new window.XMLHttpRequest(); + // xmlHttp.onload = function () { + // let result = xmlHttp.responseText; + // onComplete && onComplete(result, xmlHttp); + // }; + // try { + // xmlHttp.open("GET", url, false); //this may give chrome some problems + // xmlHttp.send(null); + // } + // catch (ex) { + // onFailure && onFailure(ex, xmlHttp); + // } + // } + // loadAsScript(url:string, onComplete) { + // this.xmlHttpGet(url, function (text, xhr) { + // if (xhr.status == 200 || xhr.status == 304) { + // let head = document.getElementsByTagName("head")[0]; + // let script = document.createElement('script'); + // script.innerHTML = text; + // head.appendChild(script); + // onComplete && onComplete(script); + // } + // }); + //} } - -export let Tools: foTools = new foTools(); \ No newline at end of file +export let Tools: foTools = new foTools(); diff --git a/src/app/foundry/foUnDo.ts b/src/app/foundry/foUnDo.ts new file mode 100644 index 0000000..24a1123 --- /dev/null +++ b/src/app/foundry/foUnDo.ts @@ -0,0 +1,105 @@ +import { PubSub } from './foPubSub'; + +export class foUnDo { + private _undoID: number = 0; + private _isDoing: boolean = false; + private _isUndoing: boolean = false; + private _undoRing: any[] = []; + + clear() { + this._undoRing = []; + return this; + } + + canUndo() { + return this._undoRing.length ? true : false; + } + + isUndoing() { + return this._isUndoing; + } + isDoing() { + return this._isDoing; + } + + private _doActions: any = {}; + private _undoActions: any = {}; + private _verifyKeep: any = {}; + + do(action, item) { + this._isDoing = true; + const func = this._doActions[action]; + const undo = { action: action, payload: item, undoID: this._undoID++ }; + this.addItem(undo); + undo.payload = func ? func.call(undo, item) : item; + + this._isDoing = false; + PubSub.Pub('undoAdded', [undo]); + return undo; + } + + addItem(item: any) { + this._undoRing.push(item); + return this; + } + + removeItem(item: any) { + const index = this._undoRing.indexOf(item); + if (index !== -1) { this._undoRing.splice(index, 1); } + return this; + } + + unDo(myUnDo?: any) { + if (!this.canUndo()) { return; } + + this._isUndoing = true; + let undo = myUnDo; + if (undo) { + this.removeItem(myUnDo); + } else { + const index = this._undoRing.length - 1; + undo = this._undoRing.splice(index, 1)[0]; + } + + const item = undo.payload; + const func = this._undoActions[undo.action]; + const payload = func ? func.call(undo, item) : item; + this._isUndoing = false; + PubSub.Pub('undoRemoved', [undo]); + return payload; + } + + //if the verify function return TRUE then keep the last undo action... + verifyKeep(undo: any, item: any) { + if (!undo) { return true; } + const action = undo.action; + const func = this._verifyKeep[action]; + const keep = func ? func.call(undo, item, undo.payload) : true; + if (!keep) { + //remove Undo from the queue + this.removeItem(undo); //item has been removed.. + } + return keep; + } + + registerActions(action, doFunc?, undoFunc?, verifyKeepFunc?) { + this._doActions[action] = doFunc + ? doFunc + : function(p) { + return p; + }; + this._undoActions[action] = undoFunc + ? undoFunc + : function(p) { + return p; + }; + this._verifyKeep[action] = verifyKeepFunc + ? verifyKeepFunc + : function(p) { + return true; + }; + return this; + } +} + +export let globalUnDo: foUnDo = new foUnDo(); diff --git a/src/app/foundry/foWeakCache.ts b/src/app/foundry/foWeakCache.ts new file mode 100644 index 0000000..b6bc653 --- /dev/null +++ b/src/app/foundry/foWeakCache.ts @@ -0,0 +1,87 @@ +export class foWeakCache { + private readonly cacheItems: foWeakDictionary; + + constructor() { + if (typeof WeakMap !== undefined) + this.cacheItems = new WeakMap(); + else + this.cacheItems = new foWeakMap(); + } + + getOrCreate(key: T, createFunc: () => TCreate) { + let item = this.get(key) as TCreate; + + if (item == null) { + item = createFunc(); + this.set(key, item); + } + + return item; + } + + has(key: T) { + return this.cacheItems.has(key); + } + + get(key: T) { + return this.cacheItems.get(key); + } + + set(key: T, value: U) { + this.cacheItems.set(key, value); + } + + removeByKey(key: T) { + this.cacheItems.delete(key); + } +} + +export interface foWeakDictionary { + get(key: K): V | undefined; + set(key: K, value: V): void; + has(key: K): boolean; + delete(key: K): void; +} + +export class foWeakMap implements foWeakDictionary { + private propSaver = new foPropSaver(); + + get(key: K) { + return this.propSaver.get(key); + } + + set(key: K, value: V) { + this.propSaver.set(key, value); + } + + has(key: K) { + return this.propSaver.get(key) != null; + } + + delete(key: K) { + this.propSaver.remove(key); + } +} + +export class foPropSaver { + private readonly propName = `__key_${foPropSaver.instanceCount++}`; + + private static instanceCount = 0; + + get(obj: TObject) { + return (obj as any)[this.propName] as TValue | undefined; + } + + set(obj: TObject, value: TValue) { + Object.defineProperty(obj, this.propName, { + configurable: true, + enumerable: false, + writable: false, + value + }); + } + + remove(obj: TObject) { + delete (obj as any)[this.propName]; + } +} \ No newline at end of file diff --git a/src/app/foundry/foWorkspace.model.ts b/src/app/foundry/foWorkspace.model.ts index 9b1d76e..75a96fb 100644 --- a/src/app/foundry/foWorkspace.model.ts +++ b/src/app/foundry/foWorkspace.model.ts @@ -1,140 +1,265 @@ -import { Tools } from './foTools' - -import { foDocument } from './shapes/foDocument.model' -import { foStudio } from './solids/foStudio.model' -import { foKnowledge } from "./foKnowledge.model"; -import { foDictionary } from './foDictionary.model' - -import { foLibrary } from './foLibrary.model' -import { foModel } from './foModel.model' -import { foObject } from './foObject.model' - -import { ContextDictionary } from './foDictionaries' - -import { foCollection } from './foCollection.model' -import { WhereClause } from "./foInterface"; - -// Feature detect + local reference -export let storage = (function () { - let uid = (new Date()).toISOString(); - let result; - try { - localStorage.setItem(uid, uid); - result = localStorage.getItem(uid) == uid; - localStorage.removeItem(uid); - return result && localStorage; - } catch (exception) { } -}()); - -export class LibraryDictionary extends foDictionary{ - public establish = (name: string): foLibrary => { - this.findItem(name, () => { - this.addItem(name, new foLibrary({ myName: name })) - }) - return this.getItem(name); - } - - constructor(properties?: any, parent?: foObject) { - super(properties, parent); - } - - select(where: WhereClause, list?: foCollection, deep: boolean = true): foCollection { - let result = list ? list : new foCollection(); - - this.forEachKeyValue((key, value) => { - if (where(value)) result.addMember(value); - value.select(where, result, deep); - }) - - return result; - } +import { Tools } from './foTools'; + +import { foDocument } from './shapes/foDocument.model'; +import { foStudio } from './solids/foStudio.model'; +import { foKnowledge } from './foKnowledge.model'; +import { foDictionary } from './foDictionary.model'; + +import { foLibrary } from './foLibrary.model'; +import { foModel } from './foModel.model'; +import { foObject, using } from './foObject.model'; + +import { foFileManager, fileSpec } from './foFileManager'; +import { foHydrationManager } from './foHydrationManager'; +import { foInstance } from './foInstance.model'; + +import { ContextDictionary } from './foDictionaries'; + +import { foCollection } from './foCollection.model'; +import { WhereClause } from './foInterface'; +import { foController } from './foController'; +import { foPage } from './shapes/foPage.model'; +import { foStage } from './solids/foStage.model'; + +export class LibraryDictionary extends foDictionary { + public establish = (name: string): foLibrary => { + this.findItem(name, () => { + this.addItem(name, new foLibrary({ myName: name })); + }); + return this.getItem(name); + } + + constructor(properties?: any, parent?: foObject) { + super(properties, parent); + } + + select( + where: WhereClause, + list?: foCollection, + deep: boolean = true + ): foCollection { + const result = list ? list : new foCollection(); + + this.forEachKeyValue((key, value) => { + if (where(value)) { result.addMember(value); } + value.select(where, result, deep); + }); + + return result; + } } -export class ModelDictionary extends foDictionary{ - public establish = (name: string): foModel => { - this.findItem(name, () => { - this.addItem(name, new foModel({ myName: name })) - }) - return this.getItem(name); - } - - constructor(properties?: any, parent?: foObject) { - super(properties, parent); - } - - selectComponent(where: WhereClause, list?: foCollection, deep: boolean = true): foCollection { - let result = list ? list : new foCollection(); - - this.forEachKeyValue((key, value) => { - if (where(value)) result.addMember(value); - value.select(where, result, deep); - }) - - return result; - } +export class ModelDictionary extends foDictionary { + public establish = (name: string): foModel => { + this.findItem(name, () => { + this.addItem(name, new foModel({ myName: name })); + }); + return this.getItem(name); + } + + constructor(properties?: any, parent?: foObject) { + super(properties, parent); + } + + selectComponent( + where: WhereClause, + list?: foCollection, + deep: boolean = true + ): foCollection { + const result = list ? list : new foCollection(); + + this.forEachKeyValue((key, value) => { + if (where(value)) { result.addMember(value); } + value.select(where, result, deep); + }); + + return result; + } } export class foWorkspace extends foKnowledge { - - private _library: LibraryDictionary = new LibraryDictionary({ myName: 'library' }, this); - private _stencil: LibraryDictionary = new LibraryDictionary({ myName: 'stencil' }, this); - - private _model: ModelDictionary = new ModelDictionary({ myName: 'model' }, this); - private _context: ContextDictionary = new ContextDictionary({myName: 'context'}, this); - - private _document: foDocument = new foDocument({}, [], this); - private _studio: foStudio = new foStudio({}, [], this); - - constructor(spec?: any) { - super(spec); - } - - get activePage() { - return this._document.currentPage - } - - get activeStage() { - return this._studio.currentStage - } - - select(where: WhereClause, list?: foCollection, deep: boolean = true): foCollection { - let result = super.select(where, list, deep); - - this.library.select(where, result, deep); - - this.stencil.select(where, result, deep); - - return result; - } - - get studio() { - return this._studio; - } - - get document() { - return this._document; - } - - get model() { - return this._model; - } - - get context() { - return this._context; - } - - get library() { - return this._library; - } - - get stencil() { - return this._stencil; - } - + public filenameExt: string; + + private _library: LibraryDictionary = new LibraryDictionary( + { myName: 'library' }, + this + ); + private _stencil: LibraryDictionary = new LibraryDictionary( + { myName: 'stencil' }, + this + ); + + private _model: ModelDictionary = new ModelDictionary( + { myName: 'model' }, + this + ); + private _context: ContextDictionary = new ContextDictionary( + { myName: 'context' }, + this + ); + + private _document: foDocument = new foDocument({}, [], this); + private _studio: foStudio = new foStudio({}, [], this); + + private _controller: foDictionary = new foDictionary< + foController + >({ displayName: 'controls' }, this); + + constructor(spec?: any) { + super(spec); + } + + //special for workspace + public reHydrate(json: any) { + return this; + } + + //special for workspace + public deHydrate(context?: any, deep: boolean = true) { + const data = { + library: this._library.deHydrate(context, deep), + stencil: this._stencil.deHydrate(context, deep), + model: this._model.deHydrate(context, deep), + context: this._context.deHydrate(context, deep), + document: this._document.deHydrate(context, deep), + studio: this._studio.deHydrate(context, deep) + }; + + return data; + } + + get activePage(): foPage { + return this._document.currentPage; + } + + get activeStage(): foStage { + return this._studio.currentStage; + } + + select( + where: WhereClause, + list?: foCollection, + deep: boolean = true + ): foCollection { + const result = super.select(where, list, deep); + + this.library.select(where, result, deep); + + this.stencil.select(where, result, deep); + + return result; + } + + get controller() { + return this._controller; + } + + get studio() { + return this._studio; + } + + get document() { + return this._document; + } + + get model() { + return this._model; + } + + get context() { + return this._context; + } + + get library() { + return this._library; + } + + get stencil() { + return this._stencil; + } + + public openFile(onComplete?: (item: fileSpec) => void) { + const manager = new foFileManager(); + manager.userOpenFileDialog( + result => { + this.filenameExt = result.filename; + onComplete && onComplete(result); + }, + '.json', + this.myName + ); + } + + public SaveInstanceAs( + obj: foInstance, + name: string, + ext: string = '.json', + onComplete?: (item: fileSpec) => void + ) { + const manager = new foFileManager(); + const payload = this.deHydrateInstance(obj); + + manager.writeTextFileAsync(payload, name, ext, result => { + this.filenameExt = result.filename; + onComplete && onComplete(result); + }); + return true; + } + + public SaveFileAs( + name: string, + ext: string = '.json', + onComplete?: (item: fileSpec) => void + ) { + const manager = new foFileManager(); + const payload = this.deHydrateWorkspace(); + + manager.writeTextFileAsync(payload, name, ext, result => { + this.filenameExt = result.filename; + onComplete && onComplete(result); + }); + return true; + } + + public autoSaveFile(onComplete?: (item: fileSpec) => void) { + if (!this.filenameExt) { return false; } + + const filespec = fileSpec.setFilenameExt(this.filenameExt); + const manager = new foFileManager(); + const payload = this.deHydrateWorkspace(); + + manager.writeTextFileAsync(payload, filespec.name, filespec.ext, result => { + onComplete && onComplete(result); + }); + return true; + } + + public clearActivePage() { + this.activePage.clearPage(); + } + + public deHydrateWorkspace() { + return using(new foHydrationManager(this), manager => { + return manager.deHydrate(this); + }); + } + + public deHydrateInstance(obj: foInstance) { + return using(new foHydrationManager(this), manager => { + return manager.deHydrate(obj); + }); + } + + public reHydratePayload(payload: any) { + return using(new foHydrationManager(this), manager => { + const data = Tools.isString(payload) ? JSON.parse(payload) : payload; + return manager.reHydrate(data); + }); + } } export let globalWorkspace: foWorkspace = new foWorkspace(); -Tools['isaWorkspace'] = function (obj) { - return obj && obj.isInstanceOf(foWorkspace); -}; \ No newline at end of file +Tools['isaWorkspace'] = function(obj) { + return obj && obj.isInstanceOf(foWorkspace); +}; diff --git a/src/app/foundry/index.js b/src/app/foundry/index.js new file mode 100644 index 0000000..3cf8071 --- /dev/null +++ b/src/app/foundry/index.js @@ -0,0 +1,3 @@ +export function message() { + console.log("it works"); +} diff --git a/src/app/foundry/index.ts b/src/app/foundry/index.ts new file mode 100644 index 0000000..311a5a8 --- /dev/null +++ b/src/app/foundry/index.ts @@ -0,0 +1,19 @@ + +export * from './foInterface'; + +export * from './foInstance.model'; +export * from './foBitwise'; +export * from './foObject.model'; +export * from './foTools'; +export * from './foWorkspace.model'; +export * from './foSolution.model'; +export * from './foProperty.model'; +export * from './foComponent.model'; +export * from './foConcept.model'; +export * from './foDictionary.model'; +export * from './foCollection.model'; +export * from './foRuntimeType'; +export * from './foNode.model'; + +export * from './foLifecycle'; +export * from './foLibrary.model'; diff --git a/src/app/foundry/package.json b/src/app/foundry/package.json new file mode 100644 index 0000000..0dd7c0d --- /dev/null +++ b/src/app/foundry/package.json @@ -0,0 +1,51 @@ +{ + "name": "ngfoundry", + "version": "1.0.0", + "description": "typescript lib for foundry", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Steve Strong ", + "license": "ISC", + "files": [ + "foAttribute.model.ts", + "foBitwise.ts", + "foBuffer.ts", + "foChange.ts", + "foCollection.model.ts", + "foComponent.model.ts", + "foConcept.model.ts", + "foController.ts", + "foDataType.model.ts", + "foDecorators.ts", + "foDictionaries.ts", + "foDictionary.model.ts", + "foFileManager.ts", + "foGlyph.model.ts", + "foHandle.ts", + "foHydrationManager.ts", + "foInstance.model.ts", + "foInterface.ts", + "foKnowledge.model.ts", + "foLibrary.model.ts", + "foLifecycle.ts", + "foMethod.model.ts", + "foModel.model.ts", + "foNode.model.ts", + "foObject.model.ts", + "foProperty.model.ts", + "foPubSub.ts", + "foRuntimeType.ts", + "foSolution.model.ts", + "foStencil.ts", + "foStructure.model.ts", + "foTemplate.model.ts", + "foTools.ts", + "foUnDo.ts", + "foWeakCache.ts", + "foWorkspace.model.ts", + "shapes", + "solids" + ] +} \ No newline at end of file diff --git a/src/app/foundry/shapes/canvasDriver.ts b/src/app/foundry/shapes/canvasDriver.ts index d3d4094..6880cef 100644 --- a/src/app/foundry/shapes/canvasDriver.ts +++ b/src/app/foundry/shapes/canvasDriver.ts @@ -17,9 +17,6 @@ export class Screen2D { public doAnimate = (): void => { - // if ( NgZone.assertInAngularZone() ) { - // console.log('Screen2D: in the zone') - // } this.render(this.context); this._request = this.requestAnimation(this.doAnimate); } @@ -45,9 +42,9 @@ export class Screen2D { } clear() { - this.context && this.context.clearRect(0,0, this.canvas.width, this.canvas.height); + this.context && this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); } - + setRoot(nativeElement: HTMLCanvasElement, width: number, height: number): HTMLCanvasElement { this.canvas = nativeElement; this.context = this.canvas.getContext("2d"); @@ -101,31 +98,51 @@ export class Screen2D { // return pt.set(x, y); // } - canvas.addEventListener('keypress', (e: KeyboardEvent) => { + function getKeys(e: KeyboardEvent) { + let keys = { code: e.keyCode, shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey, meta: e.metaKey } + return keys; + } + canvas.ownerDocument.addEventListener('keypress', (e: KeyboardEvent) => { e.preventDefault(); - let keys = { code: e.keyCode, shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey } + let keys = getKeys(e); PubSub.Pub('onkeypress', e, keys); }); + canvas.ownerDocument.addEventListener('keydown', (e: KeyboardEvent) => { + e.preventDefault(); + let keys = getKeys(e); + PubSub.Pub('onkeydown', e, keys); + }); + + canvas.ownerDocument.addEventListener('keyup', (e: KeyboardEvent) => { + e.preventDefault(); + let keys = getKeys(e); + PubSub.Pub('onkeyup', e, keys); + }); + + function getButton(e: MouseEvent) { + let keys = { shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey, button: e.button } + return keys; + } canvas.addEventListener('mousedown', (e: MouseEvent) => { e.preventDefault() let loc = getMousePos(e); - let keys = { shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey, button: e.button } + let keys = getButton(e); PubSub.Pub('mousedown', loc, e, keys); }); canvas.addEventListener('mousemove', (e: MouseEvent) => { e.preventDefault() let loc = getMousePos(e); - let keys = { shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey, button: e.button } + let keys = getButton(e); PubSub.Pub('mousemove', loc, e, keys); }); canvas.addEventListener('wheel', (e: WheelEvent) => { e.preventDefault() let loc = getMousePos(e); - let keys = { shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey, button: e.button } + let keys = getButton(e); let scale = 1.1; let zoom = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))) > 0 ? scale : 1 / scale; @@ -138,35 +155,35 @@ export class Screen2D { canvas.addEventListener('dblclick', (e: MouseEvent) => { e.preventDefault() let loc = getMousePos(e); - let keys = { shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey, button: e.button } + let keys = getButton(e); PubSub.Pub('dblclick', loc, e, keys); }); canvas.addEventListener('click', (e: MouseEvent) => { e.preventDefault() let loc = getMousePos(e); - let keys = { shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey, button: e.button } + let keys = getButton(e); PubSub.Pub('click', loc, e, keys); }); canvas.addEventListener('mouseup', (e: MouseEvent) => { e.preventDefault() let loc = getMousePos(e); - let keys = { shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey, button: e.button } + let keys = getButton(e); PubSub.Pub('mouseup', loc, e, keys); }); canvas.addEventListener('mouseover', (e: MouseEvent) => { e.preventDefault() let loc = getMousePos(e); - let keys = { shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey, button: e.button } + let keys = getButton(e); PubSub.Pub('mouseover', loc, e, keys); }); canvas.addEventListener('mouseout', (e: MouseEvent) => { e.preventDefault() let loc = getMousePos(e); - let keys = { shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey, button: e.button } + let keys = getButton(e); PubSub.Pub('mouseout', loc, e, keys); }); diff --git a/src/app/foundry/shapes/canvasKeypress.ts b/src/app/foundry/shapes/canvasKeypress.ts new file mode 100644 index 0000000..6e13f33 --- /dev/null +++ b/src/app/foundry/shapes/canvasKeypress.ts @@ -0,0 +1,1145 @@ +// Generated by CoffeeScript 1.8.0 + +/* +Copyright 2014 David Mauro + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Keypress is a robust keyboard input capturing Javascript utility +focused on input for games. + +version 2.1.5 + */ + + +/* +Combo options available and their defaults: + keys : [] - An array of the keys pressed together to activate combo. + count : 0 - The number of times a counting combo has been pressed. Reset on release. + is_unordered : false - Unless this is set to true, the keys can be pressed down in any order. + is_counting : false - Makes this a counting combo (see documentation). + is_exclusive : false - This combo will replace other exclusive combos when true. + is_solitary : false - This combo will only fire if ONLY it's keys are pressed down. + is_sequence : false - Rather than a key combo, this is an ordered key sequence. + prevent_default : false - Prevent default behavior for all component key keypresses. + prevent_repeat : false - Prevent the combo from repeating when keydown is held. + normalize_caps_lock : false - Do not allow turning caps lock on to prevent combos from being activated. + on_keydown : null - A function that is called when the combo is pressed. + on_keyup : null - A function that is called when the combo is released. + on_release : null - A function that is called when all keys in the combo are released. + this : undefined - Defines the scope for your callback functions. + */ + +function watchKeyPress() { + var Combo, keypress, _change_keycodes_by_browser, _compare_arrays, _compare_arrays_sorted, _convert_key_to_readable, _convert_to_shifted_key, _decide_meta_key, _factory_defaults, _filter_array, _index_of_in_array, _is_array_in_array, _is_array_in_array_sorted, _key_is_valid, _keycode_alternate_names, _keycode_dictionary, _keycode_shifted_keys, _log_error, _metakey, _modifier_event_mapping, _modifier_keys, _validate_combo, + __hasProp = {}.hasOwnProperty, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + _factory_defaults = { + is_unordered: false, + is_counting: false, + is_exclusive: false, + is_solitary: false, + prevent_default: false, + prevent_repeat: false, + normalize_caps_lock: false + }; + + _modifier_keys = ["meta", "alt", "option", "ctrl", "shift", "cmd"]; + + _metakey = "ctrl"; + + keypress = {}; + + keypress.debug = false; + + Combo = (function() { + function Combo(dictionary) { + var property, value; + for (property in dictionary) { + if (!__hasProp.call(dictionary, property)) continue; + value = dictionary[property]; + if (value !== false) { + this[property] = value; + } + } + this.keys = this.keys || []; + this.count = this.count || 0; + } + + Combo.prototype.allows_key_repeat = function() { + return !this.prevent_repeat && typeof this.on_keydown === "function"; + }; + + Combo.prototype.reset = function() { + this.count = 0; + return this.keyup_fired = null; + }; + + return Combo; + + })(); + + keypress.Listener = (function() { + function Listener(element, defaults) { + var attach_handler, property, value; + this.should_suppress_event_defaults = false; + this.should_force_event_defaults = false; + this.sequence_delay = 800; + this._registered_combos = []; + this._keys_down = []; + this._active_combos = []; + this._sequence = []; + this._sequence_timer = null; + this._prevent_capture = false; + this._defaults = defaults || {}; + for (property in _factory_defaults) { + if (!__hasProp.call(_factory_defaults, property)) continue; + value = _factory_defaults[property]; + this._defaults[property] = this._defaults[property] || value; + } + this.element = element || document.body; + attach_handler = function(target, event, handler) { + if (target.addEventListener) { + target.addEventListener(event, handler); + } else if (target.attachEvent) { + target.attachEvent("on" + event, handler); + } + return handler; + }; + this.keydown_event = attach_handler(this.element, "keydown", (function(_this) { + return function(e) { + e = e || window.event; + _this._receive_input(e, true); + return _this._bug_catcher(e); + }; + })(this)); + this.keyup_event = attach_handler(this.element, "keyup", (function(_this) { + return function(e) { + e = e || window.event; + return _this._receive_input(e, false); + }; + })(this)); + this.blur_event = attach_handler(window, "blur", (function(_this) { + return function() { + var key, _i, _len, _ref; + _ref = _this._keys_down; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + key = _ref[_i]; + _this._key_up(key, {}); + } + return _this._keys_down = []; + }; + })(this)); + } + + Listener.prototype.destroy = function() { + var remove_handler; + remove_handler = function(target, event, handler) { + if (target.removeEventListener != null) { + return target.removeEventListener(event, handler); + } else if (target.removeEvent != null) { + return target.removeEvent("on" + event, handler); + } + }; + remove_handler(this.element, "keydown", this.keydown_event); + remove_handler(this.element, "keyup", this.keyup_event); + return remove_handler(window, "blur", this.blur_event); + }; + + Listener.prototype._bug_catcher = function(e) { + var _ref, _ref1; + if (_metakey === "cmd" && __indexOf.call(this._keys_down, "cmd") >= 0 && ((_ref = _convert_key_to_readable((_ref1 = e.keyCode) != null ? _ref1 : e.key)) !== "cmd" && _ref !== "shift" && _ref !== "alt" && _ref !== "caps" && _ref !== "tab")) { + return this._receive_input(e, false); + } + }; + + Listener.prototype._cmd_bug_check = function(combo_keys) { + if (_metakey === "cmd" && __indexOf.call(this._keys_down, "cmd") >= 0 && __indexOf.call(combo_keys, "cmd") < 0) { + return false; + } + return true; + }; + + Listener.prototype._prevent_default = function(e, should_prevent) { + if ((should_prevent || this.should_suppress_event_defaults) && !this.should_force_event_defaults) { + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + if (e.stopPropagation) { + return e.stopPropagation(); + } + } + }; + + Listener.prototype._get_active_combos = function(key) { + var active_combos, keys_down; + active_combos = []; + keys_down = _filter_array(this._keys_down, function(down_key) { + return down_key !== key; + }); + keys_down.push(key); + this._match_combo_arrays(keys_down, (function(_this) { + return function(match) { + if (_this._cmd_bug_check(match.keys)) { + return active_combos.push(match); + } + }; + })(this)); + this._fuzzy_match_combo_arrays(keys_down, (function(_this) { + return function(match) { + if (__indexOf.call(active_combos, match) >= 0) { + return; + } + if (!(match.is_solitary || !_this._cmd_bug_check(match.keys))) { + return active_combos.push(match); + } + }; + })(this)); + return active_combos; + }; + + Listener.prototype._get_potential_combos = function(key) { + var combo, potentials, _i, _len, _ref; + potentials = []; + _ref = this._registered_combos; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + combo = _ref[_i]; + if (combo.is_sequence) { + continue; + } + if (__indexOf.call(combo.keys, key) >= 0 && this._cmd_bug_check(combo.keys)) { + potentials.push(combo); + } + } + return potentials; + }; + + Listener.prototype._add_to_active_combos = function(combo) { + var active_combo, active_key, active_keys, already_replaced, combo_key, i, should_prepend, should_replace, _i, _j, _k, _len, _len1, _ref, _ref1; + should_replace = false; + should_prepend = true; + already_replaced = false; + if (__indexOf.call(this._active_combos, combo) >= 0) { + return true; + } else if (this._active_combos.length) { + for (i = _i = 0, _ref = this._active_combos.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + active_combo = this._active_combos[i]; + if (!(active_combo && active_combo.is_exclusive && combo.is_exclusive)) { + continue; + } + active_keys = active_combo.keys; + if (!should_replace) { + for (_j = 0, _len = active_keys.length; _j < _len; _j++) { + active_key = active_keys[_j]; + should_replace = true; + if (__indexOf.call(combo.keys, active_key) < 0) { + should_replace = false; + break; + } + } + } + if (should_prepend && !should_replace) { + _ref1 = combo.keys; + for (_k = 0, _len1 = _ref1.length; _k < _len1; _k++) { + combo_key = _ref1[_k]; + should_prepend = false; + if (__indexOf.call(active_keys, combo_key) < 0) { + should_prepend = true; + break; + } + } + } + if (should_replace) { + if (already_replaced) { + active_combo = this._active_combos.splice(i, 1)[0]; + if (active_combo != null) { + active_combo.reset(); + } + } else { + active_combo = this._active_combos.splice(i, 1, combo)[0]; + if (active_combo != null) { + active_combo.reset(); + } + already_replaced = true; + } + should_prepend = false; + } + } + } + if (should_prepend) { + this._active_combos.unshift(combo); + } + return should_replace || should_prepend; + }; + + Listener.prototype._remove_from_active_combos = function(combo) { + var active_combo, i, _i, _ref; + for (i = _i = 0, _ref = this._active_combos.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + active_combo = this._active_combos[i]; + if (active_combo === combo) { + combo = this._active_combos.splice(i, 1)[0]; + combo.reset(); + break; + } + } + }; + + Listener.prototype._get_possible_sequences = function() { + var combo, i, j, match, matches, sequence, _i, _j, _k, _len, _ref, _ref1, _ref2; + matches = []; + _ref = this._registered_combos; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + combo = _ref[_i]; + for (j = _j = 1, _ref1 = this._sequence.length; 1 <= _ref1 ? _j <= _ref1 : _j >= _ref1; j = 1 <= _ref1 ? ++_j : --_j) { + sequence = this._sequence.slice(-j); + if (!combo.is_sequence) { + continue; + } + if (__indexOf.call(combo.keys, "shift") < 0) { + sequence = _filter_array(sequence, function(key) { + return key !== "shift"; + }); + if (!sequence.length) { + continue; + } + } + for (i = _k = 0, _ref2 = sequence.length; 0 <= _ref2 ? _k < _ref2 : _k > _ref2; i = 0 <= _ref2 ? ++_k : --_k) { + if (combo.keys[i] === sequence[i]) { + match = true; + } else { + match = false; + break; + } + } + if (match) { + matches.push(combo); + } + } + } + return matches; + }; + + Listener.prototype._add_key_to_sequence = function(key, e) { + var combo, sequence_combos, _i, _len; + this._sequence.push(key); + sequence_combos = this._get_possible_sequences(); + if (sequence_combos.length) { + for (_i = 0, _len = sequence_combos.length; _i < _len; _i++) { + combo = sequence_combos[_i]; + this._prevent_default(e, combo.prevent_default); + } + if (this._sequence_timer) { + clearTimeout(this._sequence_timer); + } + if (this.sequence_delay > -1) { + this._sequence_timer = setTimeout((function(_this) { + return function() { + return _this._sequence = []; + }; + })(this), this.sequence_delay); + } + } else { + this._sequence = []; + } + }; + + Listener.prototype._get_sequence = function(key) { + var combo, i, j, match, seq_key, sequence, _i, _j, _k, _len, _ref, _ref1, _ref2; + _ref = this._registered_combos; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + combo = _ref[_i]; + if (!combo.is_sequence) { + continue; + } + for (j = _j = 1, _ref1 = this._sequence.length; 1 <= _ref1 ? _j <= _ref1 : _j >= _ref1; j = 1 <= _ref1 ? ++_j : --_j) { + sequence = (_filter_array(this._sequence, function(seq_key) { + if (__indexOf.call(combo.keys, "shift") >= 0) { + return true; + } + return seq_key !== "shift"; + })).slice(-j); + if (combo.keys.length !== sequence.length) { + continue; + } + for (i = _k = 0, _ref2 = sequence.length; 0 <= _ref2 ? _k < _ref2 : _k > _ref2; i = 0 <= _ref2 ? ++_k : --_k) { + seq_key = sequence[i]; + if (__indexOf.call(combo.keys, "shift") < 0) { + if (seq_key === "shift") { + continue; + } + } + if (key === "shift" && __indexOf.call(combo.keys, "shift") < 0) { + continue; + } + if (combo.keys[i] === seq_key) { + match = true; + } else { + match = false; + break; + } + } + } + if (match) { + if (combo.is_exclusive) { + this._sequence = []; + } + return combo; + } + } + return false; + }; + + Listener.prototype._receive_input = function(e, is_keydown) { + var key, _ref; + if (this._prevent_capture) { + if (this._keys_down.length) { + this._keys_down = []; + } + return; + } + key = _convert_key_to_readable((_ref = e.keyCode) != null ? _ref : e.key); + if (!is_keydown && !this._keys_down.length && (key === "alt" || key === _metakey)) { + return; + } + if (!key) { + return; + } + if (is_keydown) { + return this._key_down(key, e); + } else { + return this._key_up(key, e); + } + }; + + Listener.prototype._fire = function(event, combo, key_event, is_autorepeat) { + if (typeof combo["on_" + event] === "function") { + this._prevent_default(key_event, combo["on_" + event].call(combo["this"], key_event, combo.count, is_autorepeat) !== true); + } + if (event === "release") { + combo.count = 0; + } + if (event === "keyup") { + return combo.keyup_fired = true; + } + }; + + Listener.prototype._match_combo_arrays = function(potential_match, match_handler) { + var combo_potential_match, source_combo, _i, _len, _ref; + _ref = this._registered_combos; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + source_combo = _ref[_i]; + combo_potential_match = potential_match.slice(0); + if (source_combo.normalize_caps_lock && __indexOf.call(combo_potential_match, "caps") >= 0) { + combo_potential_match.splice(combo_potential_match.indexOf("caps"), 1); + } + if ((!source_combo.is_unordered && _compare_arrays_sorted(combo_potential_match, source_combo.keys)) || (source_combo.is_unordered && _compare_arrays(combo_potential_match, source_combo.keys))) { + match_handler(source_combo); + } + } + }; + + Listener.prototype._fuzzy_match_combo_arrays = function(potential_match, match_handler) { + var source_combo, _i, _len, _ref; + _ref = this._registered_combos; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + source_combo = _ref[_i]; + if ((!source_combo.is_unordered && _is_array_in_array_sorted(source_combo.keys, potential_match)) || (source_combo.is_unordered && _is_array_in_array(source_combo.keys, potential_match))) { + match_handler(source_combo); + } + } + }; + + Listener.prototype._keys_remain = function(combo) { + var key, keys_remain, _i, _len, _ref; + _ref = combo.keys; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + key = _ref[_i]; + if (__indexOf.call(this._keys_down, key) >= 0) { + keys_remain = true; + break; + } + } + return keys_remain; + }; + + Listener.prototype._key_down = function(key, e) { + var combo, combos, event_mod, i, mod, potential, potential_combos, sequence_combo, shifted_key, _i, _j, _k, _len, _len1, _ref; + shifted_key = _convert_to_shifted_key(key, e); + if (shifted_key) { + key = shifted_key; + } + this._add_key_to_sequence(key, e); + sequence_combo = this._get_sequence(key); + if (sequence_combo) { + this._fire("keydown", sequence_combo, e); + } + for (mod in _modifier_event_mapping) { + event_mod = _modifier_event_mapping[mod]; + if (!e[event_mod]) { + continue; + } + if (mod === key || __indexOf.call(this._keys_down, mod) >= 0) { + continue; + } + this._keys_down.push(mod); + } + for (mod in _modifier_event_mapping) { + event_mod = _modifier_event_mapping[mod]; + if (mod === key) { + continue; + } + if (__indexOf.call(this._keys_down, mod) >= 0 && !e[event_mod]) { + if (mod === "cmd" && _metakey !== "cmd") { + continue; + } + for (i = _i = 0, _ref = this._keys_down.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if (this._keys_down[i] === mod) { + this._keys_down.splice(i, 1); + } + } + } + } + combos = this._get_active_combos(key); + potential_combos = this._get_potential_combos(key); + for (_j = 0, _len = combos.length; _j < _len; _j++) { + combo = combos[_j]; + this._handle_combo_down(combo, potential_combos, key, e); + } + if (potential_combos.length) { + for (_k = 0, _len1 = potential_combos.length; _k < _len1; _k++) { + potential = potential_combos[_k]; + this._prevent_default(e, potential.prevent_default); + } + } + if (__indexOf.call(this._keys_down, key) < 0) { + this._keys_down.push(key); + } + }; + + Listener.prototype._handle_combo_down = function(combo, potential_combos, key, e) { + var is_autorepeat, is_other_exclusive, potential_combo, result, _i, _len; + if (__indexOf.call(combo.keys, key) < 0) { + return false; + } + this._prevent_default(e, combo && combo.prevent_default); + is_autorepeat = false; + if (__indexOf.call(this._keys_down, key) >= 0) { + is_autorepeat = true; + if (!combo.allows_key_repeat()) { + return false; + } + } + result = this._add_to_active_combos(combo, key); + combo.keyup_fired = false; + is_other_exclusive = false; + if (combo.is_exclusive) { + for (_i = 0, _len = potential_combos.length; _i < _len; _i++) { + potential_combo = potential_combos[_i]; + if (potential_combo.is_exclusive && potential_combo.keys.length > combo.keys.length) { + is_other_exclusive = true; + break; + } + } + } + if (!is_other_exclusive) { + if (combo.is_counting && typeof combo.on_keydown === "function") { + combo.count += 1; + } + if (result) { + return this._fire("keydown", combo, e, is_autorepeat); + } + } + }; + + Listener.prototype._key_up = function(key, e) { + var active_combo, active_combos_length, combo, combos, i, sequence_combo, shifted_key, unshifted_key, _i, _j, _k, _l, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; + unshifted_key = key; + shifted_key = _convert_to_shifted_key(key, e); + if (shifted_key) { + key = shifted_key; + } + shifted_key = _keycode_shifted_keys[unshifted_key]; + if (e.shiftKey) { + if (!(shifted_key && __indexOf.call(this._keys_down, shifted_key) >= 0)) { + key = unshifted_key; + } + } else { + if (!(unshifted_key && __indexOf.call(this._keys_down, unshifted_key) >= 0)) { + key = shifted_key; + } + } + sequence_combo = this._get_sequence(key); + if (sequence_combo) { + this._fire("keyup", sequence_combo, e); + } + if (__indexOf.call(this._keys_down, key) < 0) { + return false; + } + for (i = _i = 0, _ref = this._keys_down.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if ((_ref1 = this._keys_down[i]) === key || _ref1 === shifted_key || _ref1 === unshifted_key) { + this._keys_down.splice(i, 1); + break; + } + } + active_combos_length = this._active_combos.length; + combos = []; + _ref2 = this._active_combos; + for (_j = 0, _len = _ref2.length; _j < _len; _j++) { + active_combo = _ref2[_j]; + if (__indexOf.call(active_combo.keys, key) >= 0) { + combos.push(active_combo); + } + } + for (_k = 0, _len1 = combos.length; _k < _len1; _k++) { + combo = combos[_k]; + this._handle_combo_up(combo, e, key); + } + if (active_combos_length > 1) { + _ref3 = this._active_combos; + for (_l = 0, _len2 = _ref3.length; _l < _len2; _l++) { + active_combo = _ref3[_l]; + if (active_combo === void 0 || __indexOf.call(combos, active_combo) >= 0) { + continue; + } + if (!this._keys_remain(active_combo)) { + this._remove_from_active_combos(active_combo); + } + } + } + }; + + Listener.prototype._handle_combo_up = function(combo, e, key) { + var keys_down, keys_remaining; + this._prevent_default(e, combo && combo.prevent_default); + keys_remaining = this._keys_remain(combo); + if (!combo.keyup_fired) { + keys_down = this._keys_down.slice(); + keys_down.push(key); + if (!combo.is_solitary || _compare_arrays(keys_down, combo.keys)) { + this._fire("keyup", combo, e); + if (combo.is_counting && typeof combo.on_keyup === "function" && typeof combo.on_keydown !== "function") { + combo.count += 1; + } + } + } + if (!keys_remaining) { + this._fire("release", combo, e); + this._remove_from_active_combos(combo); + } + }; + + Listener.prototype.simple_combo = function(keys, callback) { + return this.register_combo({ + keys: keys, + on_keydown: callback + }); + }; + + Listener.prototype.counting_combo = function(keys, count_callback) { + return this.register_combo({ + keys: keys, + is_counting: true, + is_unordered: false, + on_keydown: count_callback + }); + }; + + Listener.prototype.sequence_combo = function(keys, callback) { + return this.register_combo({ + keys: keys, + on_keydown: callback, + is_sequence: true, + is_exclusive: true + }); + }; + + Listener.prototype.register_combo = function(combo_dictionary) { + var combo, property, value, _ref; + if (typeof combo_dictionary["keys"] === "string") { + combo_dictionary["keys"] = combo_dictionary["keys"].split(" "); + } + _ref = this._defaults; + for (property in _ref) { + if (!__hasProp.call(_ref, property)) continue; + value = _ref[property]; + if (combo_dictionary[property] === void 0) { + combo_dictionary[property] = value; + } + } + combo = new Combo(combo_dictionary); + if (_validate_combo(combo)) { + this._registered_combos.push(combo); + return combo; + } + }; + + Listener.prototype.register_many = function(combo_array) { + var combo, _i, _len, _results; + _results = []; + for (_i = 0, _len = combo_array.length; _i < _len; _i++) { + combo = combo_array[_i]; + _results.push(this.register_combo(combo)); + } + return _results; + }; + + Listener.prototype.unregister_combo = function(keys_or_combo) { + var combo, i, unregister_combo, _i, _j, _len, _ref, _ref1, _results; + if (!keys_or_combo) { + return false; + } + unregister_combo = (function(_this) { + return function(combo) { + var i, _i, _ref, _results; + _results = []; + for (i = _i = 0, _ref = _this._registered_combos.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if (combo === _this._registered_combos[i]) { + _this._registered_combos.splice(i, 1); + break; + } else { + _results.push(void 0); + } + } + return _results; + }; + })(this); + if (keys_or_combo instanceof Combo) { + return unregister_combo(keys_or_combo); + } else { + if (typeof keys_or_combo === "string") { + keys_or_combo = keys_or_combo.split(" "); + for (i = _i = 0, _ref = keys_or_combo.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if (keys_or_combo[i] === "meta") { + keys_or_combo[i] = _metakey; + } + } + } + _ref1 = this._registered_combos; + _results = []; + for (_j = 0, _len = _ref1.length; _j < _len; _j++) { + combo = _ref1[_j]; + if (combo == null) { + continue; + } + if ((combo.is_unordered && _compare_arrays(keys_or_combo, combo.keys)) || (!combo.is_unordered && _compare_arrays_sorted(keys_or_combo, combo.keys))) { + _results.push(unregister_combo(combo)); + } else { + _results.push(void 0); + } + } + return _results; + } + }; + + Listener.prototype.unregister_many = function(combo_array) { + var combo, _i, _len, _results; + _results = []; + for (_i = 0, _len = combo_array.length; _i < _len; _i++) { + combo = combo_array[_i]; + _results.push(this.unregister_combo(combo)); + } + return _results; + }; + + Listener.prototype.get_registered_combos = function() { + return this._registered_combos; + }; + + Listener.prototype.reset = function() { + return this._registered_combos = []; + }; + + Listener.prototype.listen = function() { + return this._prevent_capture = false; + }; + + Listener.prototype.stop_listening = function() { + return this._prevent_capture = true; + }; + + Listener.prototype.get_meta_key = function() { + return _metakey; + }; + + return Listener; + + })(); + + _decide_meta_key = function() { + if (navigator.userAgent.indexOf("Mac OS X") !== -1) { + _metakey = "cmd"; + } + }; + + _change_keycodes_by_browser = function() { + if (navigator.userAgent.indexOf("Opera") !== -1) { + _keycode_dictionary["17"] = "cmd"; + } + }; + + _convert_key_to_readable = function(k) { + return _keycode_dictionary[k]; + }; + + _filter_array = function(array, callback) { + var element; + if (array.filter) { + return array.filter(callback); + } else { + return (function() { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = array.length; _i < _len; _i++) { + element = array[_i]; + if (callback(element)) { + _results.push(element); + } + } + return _results; + })(); + } + }; + + _compare_arrays = function(a1, a2) { + var item, _i, _len; + if (a1.length !== a2.length) { + return false; + } + for (_i = 0, _len = a1.length; _i < _len; _i++) { + item = a1[_i]; + if (__indexOf.call(a2, item) >= 0) { + continue; + } + return false; + } + return true; + }; + + _compare_arrays_sorted = function(a1, a2) { + var i, _i, _ref; + if (a1.length !== a2.length) { + return false; + } + for (i = _i = 0, _ref = a1.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if (a1[i] !== a2[i]) { + return false; + } + } + return true; + }; + + _is_array_in_array = function(a1, a2) { + var item, _i, _len; + for (_i = 0, _len = a1.length; _i < _len; _i++) { + item = a1[_i]; + if (__indexOf.call(a2, item) < 0) { + return false; + } + } + return true; + }; + + _index_of_in_array = Array.prototype.indexOf || function(a, item) { + var i, _i, _ref; + for (i = _i = 0, _ref = a.length; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) { + if (a[i] === item) { + return i; + } + } + return -1; + }; + + _is_array_in_array_sorted = function(a1, a2) { + var index, item, prev, _i, _len; + prev = 0; + for (_i = 0, _len = a1.length; _i < _len; _i++) { + item = a1[_i]; + index = _index_of_in_array.call(a2, item); + if (index >= prev) { + prev = index; + } else { + return false; + } + } + return true; + }; + + _log_error = function() { + if (keypress.debug) { + return console.log.apply(console, arguments); + } + }; + + _key_is_valid = function(key) { + var valid, valid_key, _; + valid = false; + for (_ in _keycode_dictionary) { + valid_key = _keycode_dictionary[_]; + if (key === valid_key) { + valid = true; + break; + } + } + if (!valid) { + for (_ in _keycode_shifted_keys) { + valid_key = _keycode_shifted_keys[_]; + if (key === valid_key) { + valid = true; + break; + } + } + } + return valid; + }; + + _validate_combo = function(combo) { + var alt_name, i, key, mod_key, non_modifier_keys, property, validated, value, _i, _j, _k, _len, _len1, _ref, _ref1; + validated = true; + if (!combo.keys.length) { + _log_error("You're trying to bind a combo with no keys:", combo); + } + for (i = _i = 0, _ref = combo.keys.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + key = combo.keys[i]; + alt_name = _keycode_alternate_names[key]; + if (alt_name) { + key = combo.keys[i] = alt_name; + } + if (key === "meta") { + combo.keys.splice(i, 1, _metakey); + } + if (key === "cmd") { + _log_error("Warning: use the \"meta\" key rather than \"cmd\" for Windows compatibility"); + } + } + _ref1 = combo.keys; + for (_j = 0, _len = _ref1.length; _j < _len; _j++) { + key = _ref1[_j]; + if (!_key_is_valid(key)) { + _log_error("Do not recognize the key \"" + key + "\""); + validated = false; + } + } + if (__indexOf.call(combo.keys, "meta") >= 0 || __indexOf.call(combo.keys, "cmd") >= 0) { + non_modifier_keys = combo.keys.slice(); + for (_k = 0, _len1 = _modifier_keys.length; _k < _len1; _k++) { + mod_key = _modifier_keys[_k]; + if ((i = _index_of_in_array.call(non_modifier_keys, mod_key)) > -1) { + non_modifier_keys.splice(i, 1); + } + } + if (non_modifier_keys.length > 1) { + _log_error("META and CMD key combos cannot have more than 1 non-modifier keys", combo, non_modifier_keys); + validated = false; + } + } + for (property in combo) { + value = combo[property]; + if (_factory_defaults[property] === "undefined") { + _log_error("The property " + property + " is not a valid combo property. Your combo has still been registered."); + } + } + return validated; + }; + + _convert_to_shifted_key = function(key, e) { + var k; + if (!e.shiftKey) { + return false; + } + k = _keycode_shifted_keys[key]; + if (k != null) { + return k; + } + return false; + }; + + _modifier_event_mapping = { + "cmd": "metaKey", + "ctrl": "ctrlKey", + "shift": "shiftKey", + "alt": "altKey" + }; + + _keycode_alternate_names = { + "escape": "esc", + "control": "ctrl", + "command": "cmd", + "break": "pause", + "windows": "cmd", + "option": "alt", + "caps_lock": "caps", + "apostrophe": "\'", + "semicolon": ";", + "tilde": "~", + "accent": "`", + "scroll_lock": "scroll", + "num_lock": "num" + }; + + _keycode_shifted_keys = { + "/": "?", + ".": ">", + ",": "<", + "\'": "\"", + ";": ":", + "[": "{", + "]": "}", + "\\": "|", + "`": "~", + "=": "+", + "-": "_", + "1": "!", + "2": "@", + "3": "#", + "4": "$", + "5": "%", + "6": "^", + "7": "&", + "8": "*", + "9": "(", + "0": ")" + }; + + _keycode_dictionary = { + 0: "\\", + 8: "backspace", + 9: "tab", + 12: "num", + 13: "enter", + 16: "shift", + 17: "ctrl", + 18: "alt", + 19: "pause", + 20: "caps", + 27: "esc", + 32: "space", + 33: "pageup", + 34: "pagedown", + 35: "end", + 36: "home", + 37: "left", + 38: "up", + 39: "right", + 40: "down", + 44: "print", + 45: "insert", + 46: "delete", + 48: "0", + 49: "1", + 50: "2", + 51: "3", + 52: "4", + 53: "5", + 54: "6", + 55: "7", + 56: "8", + 57: "9", + 65: "a", + 66: "b", + 67: "c", + 68: "d", + 69: "e", + 70: "f", + 71: "g", + 72: "h", + 73: "i", + 74: "j", + 75: "k", + 76: "l", + 77: "m", + 78: "n", + 79: "o", + 80: "p", + 81: "q", + 82: "r", + 83: "s", + 84: "t", + 85: "u", + 86: "v", + 87: "w", + 88: "x", + 89: "y", + 90: "z", + 91: "cmd", + 92: "cmd", + 93: "cmd", + 96: "num_0", + 97: "num_1", + 98: "num_2", + 99: "num_3", + 100: "num_4", + 101: "num_5", + 102: "num_6", + 103: "num_7", + 104: "num_8", + 105: "num_9", + 106: "num_multiply", + 107: "num_add", + 108: "num_enter", + 109: "num_subtract", + 110: "num_decimal", + 111: "num_divide", + 112: "f1", + 113: "f2", + 114: "f3", + 115: "f4", + 116: "f5", + 117: "f6", + 118: "f7", + 119: "f8", + 120: "f9", + 121: "f10", + 122: "f11", + 123: "f12", + 124: "print", + 144: "num", + 145: "scroll", + 186: ";", + 187: "=", + 188: ",", + 189: "-", + 190: ".", + 191: "/", + 192: "`", + 219: "[", + 220: "\\", + 221: "]", + 222: "\'", + 223: "`", + 224: "cmd", + 225: "alt", + 57392: "ctrl", + 63289: "num", + 59: ";", + 61: "=", + 173: "-" + }; + + keypress._keycode_dictionary = _keycode_dictionary; + + keypress._is_array_in_array_sorted = _is_array_in_array_sorted; + + _decide_meta_key(); + + _change_keycodes_by_browser(); + + return keypress; + + + }; + + export let WatchKeys = watchKeyPress(); + export let keycode = WatchKeys._keycode_dictionary; \ No newline at end of file diff --git a/src/app/foundry/shapes/foDocument.model.ts b/src/app/foundry/shapes/foDocument.model.ts index 63e42ac..967a18b 100644 --- a/src/app/foundry/shapes/foDocument.model.ts +++ b/src/app/foundry/shapes/foDocument.model.ts @@ -24,11 +24,19 @@ export class foDocument extends foNode { return this._pages; } - findPage(name: string) { + findPage(name: string): foPage { return this._pages.find(name); } - findPageByGuid(guid: string) { + + establishPage(name: string): foPage { + this._pages.findItem(name, () => { + this._pages.addItem(name, this.createPage({ myName: name })) + }) + return this._pages.getItem(name); + } + + findPageByGuid(guid: string): foPage { if (!Object.keys(this._pageByGuid).length) { this.pages.forEachKeyValue((key, page) => { this._pageByGuid[page.myGuid] = page; @@ -37,15 +45,16 @@ export class foDocument extends foNode { return this._pageByGuid[guid]; } - createPage(properties?: any) { + createPage(properties?: any): foPage { this._pageByGuid = {}; let nextPage = `Page-${this.pages.count + 1}`; let spec = Tools.union(properties, { - myName: nextPage, + myName: (properties && properties.myName) || nextPage, width: this.pageWidth || 1000, height: this.pageHeight || 800, }); this.currentPage = new foPage(spec); + this.currentPage.displayName = nextPage; Lifecycle.event('syncPage', this.currentPage); return this.currentPage; @@ -65,6 +74,23 @@ export class foDocument extends foNode { BroadcastChange.changed('currentPage', this); } } + + public reHydrate(json: any) { + this.override(json); + return this; + } + + public deHydrate(context?: any, deep: boolean = true) { + let data = this.extractCopySpec(); + + if (deep && this.pages.count) { + data.subcomponents = this.pages.mapKeyValue((key,item) => { + let child = item.deHydrate(context, deep); + return child; + }) + } + return data; + } } import { RuntimeType } from '../foRuntimeType'; diff --git a/src/app/foundry/shapes/foGeometry2D.ts b/src/app/foundry/shapes/foGeometry2D.ts index cc4ce1f..be7f5ab 100644 --- a/src/app/foundry/shapes/foGeometry2D.ts +++ b/src/app/foundry/shapes/foGeometry2D.ts @@ -13,7 +13,7 @@ export class cPoint2D extends Vector2 implements iPoint2D { } asVector(): Vector2 { - return new Vector2(this.x, this.y) + return new Vector2(this.x, this.y); } setValues(x: number = 0, y: number = 0) { @@ -22,27 +22,93 @@ export class cPoint2D extends Vector2 implements iPoint2D { return this; } - clonePoint() { + clonePoint(): cPoint2D { return new cPoint2D(this.x, this.y, this.myName); } - addPoint(x: number = 0, y: number = 0) { + isEqualTo(p: cPoint2D): boolean { + return this.x === p.x && this.y === p.y; + } + + isNear(p: cPoint2D, radius: number): boolean { + const dx = Math.abs(p.x - this.x); + if (dx > radius) return false; + + const dy = Math.abs(p.y - this.y); + if (dy > radius) return false; + return true; + + } + + addPoint(x: number = 0, y: number = 0): cPoint2D { this.x += x; this.y += y; return this; } - subtractPoint(x: number = 0, y: number = 0) { + + + subtractPoint(x: number = 0, y: number = 0): cPoint2D { this.x -= x; this.y -= y; return this; } - midPoint(pt: cPoint2D) { - let x = (this.x + pt.x) / 2; - let y = (this.y + pt.y) / 2; + midPoint(pt: cPoint2D): cPoint2D { + const x = (this.x + pt.x) / 2; + const y = (this.y + pt.y) / 2; return new cPoint2D(x, y, 'midpoint'); } + + mag(): number { + return Math.sqrt(this.x * this.x + this.y * this.y); + } + + atan(): number { + return Math.atan2(this.y, this.x); + } + + normal(): cPoint2D { + let mag = this.mag(); + mag = mag ? mag : 1.0; //if zero set to 1 you get the same result + return new cPoint2D(this.x / mag, this.y / mag, 'normal'); + } + + sum(p: cPoint2D): cPoint2D { + this.x += p.x; + this.y += p.y; + return this; + } + + sumTo(p: cPoint2D): cPoint2D { + p.x += this.x; + p.y += this.y; + return p; + } + + setTo(p: cPoint2D): cPoint2D { + p.x = this.x; + p.y = this.y; + return p; + } + + subtract(p: cPoint2D): cPoint2D { + this.x -= p.x; + this.y -= p.y; + return this; + } + + deltaBetween(pt: cPoint2D): cPoint2D { + const x = this.x - pt.x; + const y = this.y - pt.y; + return new cPoint2D(x, y, 'delta'); + } + + scale(s: number): cPoint2D { + this.x *= s; + this.y *= s; + return this; + } } export class cRect implements iRect { @@ -132,6 +198,22 @@ export class cFrame implements iFrame { return this; } + width(): number { + return this.x2 - this.x1; + } + + heigth(): number { + return this.y2 - this.y1; + } + + centerX(): number { + return (this.x2 + this.x1) / 2.0; + } + + centerY(): number { + return (this.y2 + this.y1) / 2.0; + } + init(obj: iPoint2D): iFrame { this.x1 = obj.x; this.y1 = obj.y; @@ -161,8 +243,8 @@ export class cFrame implements iFrame { } draw(ctx: CanvasRenderingContext2D, fill?: boolean) { - let width = this.x2 - this.x1; - let height = this.y2 - this.y1; + const width = this.x2 - this.x1; + const height = this.y2 - this.y1; if (fill) { ctx.fillRect(this.x1, this.y1, width, height); } else { @@ -225,4 +307,4 @@ export class cBox extends cRect implements iBox { } return this; } -} \ No newline at end of file +} diff --git a/src/app/foundry/shapes/foGlue2D.ts b/src/app/foundry/shapes/foGlue2D.ts index e081ddd..d4dbadd 100644 --- a/src/app/foundry/shapes/foGlue2D.ts +++ b/src/app/foundry/shapes/foGlue2D.ts @@ -1,6 +1,6 @@ import { Tools } from '../foTools'; -import { ModelRef, iPoint2D, iGlueSignature } from '../foInterface' +import { ModelRef, iPoint2D, iGlueSignature } from '../foInterface'; import { foObject } from '../foObject.model'; import { foNode } from '../foNode.model'; @@ -53,7 +53,7 @@ export class foGlue2D extends foNode { sourceName: this.sourceName, targetGuid: this.myTarget && this.myTarget() && this.myTarget().myGuid, targetName: this.targetName - } + }; } is2D() { return this.mySource && this.mySource() && this.mySource().is2D(); } @@ -86,19 +86,19 @@ export class foGlue2D extends foNode { } isEmpty() { - if (this.myTarget) return false; - if (this.mySource) return false; - if (this.doSourceMoveProxy) return false; - if (this.doTargetMoveProxy) return false; + if (this.myTarget) { return false; } + if (this.mySource) { return false; } + if (this.doSourceMoveProxy) { return false; } + if (this.doTargetMoveProxy) { return false; } return true; } sourceMoved(loc: iPoint2D) { - this.doSourceMoveProxy && this.doSourceMoveProxy(loc); + return this.doSourceMoveProxy && this.doSourceMoveProxy(loc); } targetMoved(loc: iPoint2D) { - let pnt = this.targetHandle ? this.targetHandle.globalCenter() : loc; + const pnt = this.targetHandle ? this.targetHandle.globalCenter() : loc; this.doTargetMoveProxy && this.doTargetMoveProxy(pnt); } diff --git a/src/app/foundry/shapes/foGlyph2D.model.ts b/src/app/foundry/shapes/foGlyph2D.model.ts index d065f1b..59e2f2a 100644 --- a/src/app/foundry/shapes/foGlyph2D.model.ts +++ b/src/app/foundry/shapes/foGlyph2D.model.ts @@ -1,687 +1,764 @@ - import { Tools } from '../foTools'; import { cPoint2D, cFrame } from './foGeometry2D'; import { Matrix2D } from './foMatrix2D'; -import { TweenLite, Back } from "gsap"; - +import { TweenLite, Back } from 'gsap'; -import { iShape, iPoint2D, iRect, iFrame } from '../foInterface'; +import { iShape, iPoint2D, iRect, iFrame } from '../foInterface'; import { foGlyph } from '../foGlyph.model'; import { foHandle2D } from './foHandle2D'; import { foObject } from '../foObject.model'; import { foCollection } from '../foCollection.model'; - import { Lifecycle } from '../foLifecycle'; - - //a Glyph is a graphic designed to draw on a canvas in absolute coordinates -export class foGlyph2D extends foGlyph implements iShape { - - protected _subcomponents: foCollection; - get nodes(): foCollection { - return this._subcomponents; - } - - protected _handles: foCollection; - get handles(): foCollection { - this._handles || this.createHandles(); - return this._handles; - } - - - protected _x: number; - protected _y: number; - protected _width: number; - protected _height: number; - - get x(): number { return this._x || 0.0; } - set x(value: number) { - this.smash(); - this._x = value; - } - get y(): number { return this._y || 0.0 } - set y(value: number) { - this.smash(); - this._y = value; - } - - get width(): number { return this._width || 0.0; } - set width(value: number) { this._width = value; } - - get height(): number { return this._height || 0.0; } - set height(value: number) { this._height = value; } - - - public rotationZ = (): number => { return 0; } - - - - public drawHover: (ctx: CanvasRenderingContext2D) => void; - public preDraw: (ctx: CanvasRenderingContext2D) => void; - public postDraw: (ctx: CanvasRenderingContext2D) => void; - - protected _matrix: Matrix2D; - protected _invMatrix: Matrix2D; - smash() { - //console.log('smash matrix') - this._matrix = undefined; - this._invMatrix = undefined; - } - - - protected _boundry: cFrame = new cFrame(this); - get boundryFrame(): cFrame { - let mtx = this.getGlobalMatrix(); - //this is a buffer so we create less garbage - let pt = this._boundry.point; - this._boundry.init(mtx.transformPoint(0, 0, pt)) - this._boundry.minmax(mtx.transformPoint(0, this.height, pt)); - this._boundry.minmax(mtx.transformPoint(this.width, 0, pt)); - this._boundry.minmax(mtx.transformPoint(this.width, this.height, pt)); - - this.nodes.forEach(item => { - this._boundry.merge(item.boundryFrame); - }); - return this._boundry; - } - - public drawBoundry(ctx: CanvasRenderingContext2D) { - ctx.beginPath() - ctx.setLineDash([5, 5]); - this.boundryFrame.draw(ctx, false); - ctx.stroke(); - } - - constructor(properties?: any, subcomponents?: Array, parent?: foObject) { - super(properties, subcomponents, parent); - } - - is2D() { return true; } - - set(x: number, y: number, width: number, height: number): iRect { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - return this; - } - - contains(x: number, y: number): boolean { - return this.x <= x && x <= this.x + this.width && this.y <= y && y <= this.y + this.height; - } - - localContains(x: number, y: number): boolean { - return 0 <= x && x <= this.width && 0 <= y && y <= this.height; - } - - protected toJson(): any { - return Tools.mixin(super.toJson(), { - x: this.x, - y: this.y, - width: this.width, - height: this.height, - }); - } - - public initialize(x: number = Number.NaN, y: number = Number.NaN, ang: number = Number.NaN) { - return this; - } - - - - - public didLocationChange(x: number = Number.NaN, y: number = Number.NaN, angle: number = Number.NaN): boolean { - let changed = false; - if (!Number.isNaN(x) && this.x != x) { - changed = true; - this.x = x; - }; - - if (!Number.isNaN(y) && this.y != y) { - changed = true; - this.y = y; - }; - - return changed; - } - - - public easeToNoLifecycle(x: number, y: number, time: number = .5, ease: any = Back.ease) { - - TweenLite.to(this, time, { - x: x, - y: y, - ease: ease - // }).eventCallback("onUpdate", () => { - // this.drop(); - }).eventCallback("onComplete", () => { - this.initialize(x, y); - }); - - return this; - } - - public easeTo(x: number, y: number, time: number = .5, ease: any = Back.ease) { - - TweenLite.to(this, time, { - x: x, - y: y, - ease: ease - }).eventCallback("onUpdate", () => { - this.move(); - }).eventCallback("onComplete", () => { - this.dropAt(x, y); - Lifecycle.easeTo(this, this.getLocation()); - }); - - return this; - } - - public easeTween(to: any, time: number = .5, ease: any = 'ease') { - let from = Tools.union(to, { ease: Back[ease] }); - - TweenLite.to(this, time, from).eventCallback("onComplete", () => this.override(to)); - Lifecycle.easeTween(this, { time, ease, to }); - return this; - } - - public dropAt(x: number = Number.NaN, y: number = Number.NaN, angle: number = Number.NaN) { - if (this.didLocationChange(x, y, angle)) { - Lifecycle.dropped(this, this.getLocation()); - } - return this; - } - - public move(x: number = Number.NaN, y: number = Number.NaN, angle: number = Number.NaN) { - if (this.didLocationChange(x, y, angle)) { - Lifecycle.moved(this, this.getLocation()); - } - return this; - } - - public moveTo(loc: iPoint2D, offset?: iPoint2D) { - let x = loc.x + (offset ? offset.x : 0); - let y = loc.y + (offset ? offset.y : 0); - return this.move(x, y); - } - - public moveBy(loc: iPoint2D, offset?: iPoint2D) { - let x = this.x + loc.x + (offset ? offset.x : 0); - let y = this.y + loc.y + (offset ? offset.y : 0); - return this.move(x, y); - } - - updateContext(ctx: CanvasRenderingContext2D) { - let mtx = this.getMatrix(); - ctx.transform(mtx.a, mtx.b, mtx.c, mtx.d, mtx.tx, mtx.ty); - ctx.globalAlpha *= this.opacity; - }; - - getGlobalMatrix() { - let mtx = new Matrix2D(this.getMatrix()); - let parent = this.myParent && this.myParent() - if (parent) { - mtx.prependMatrix(parent.getGlobalMatrix()); - } - return mtx; - }; - - getMatrix() { - if (this._matrix === undefined) { - this._matrix = new Matrix2D(); - this._matrix.appendTransform(this.x, this.y, 1, 1, 0, 0, 0, 0, 0); - } - return this._matrix; - }; - - getInvMatrix() { - if (this._invMatrix === undefined) { - this._invMatrix = this.getMatrix().invertCopy(); - } - return this._invMatrix; - }; - - localToGlobal(x: number, y: number, pt?: cPoint2D) { - let mtx = this.getGlobalMatrix(); - return mtx.transformPoint(x, y, pt); - }; - - localToGlobalPoint(pt: cPoint2D): cPoint2D { - let mtx = this.getGlobalMatrix(); - return mtx.transformPoint(pt.x, pt.y, pt); - }; - - globalToLocal(x: number, y: number, pt?: cPoint2D): cPoint2D { - let inv = this.getGlobalMatrix().invertCopy(); - return inv.transformPoint(x, y, pt); - }; - - globalToLocalPoint(pt: cPoint2D): cPoint2D { - let inv = this.getGlobalMatrix().invertCopy(); - return inv.transformPoint(pt.x, pt.y, pt); - }; - - globalToLocalFrame(x1: number, y1: number, x2: number, y2: number, frame?: cFrame): cFrame { - frame = frame || new cFrame(); - let inv = this.getGlobalMatrix().invertCopy(); - - frame.init(inv.transformPoint(x1, y1, frame.point)); - frame.minmax(inv.transformPoint(x1, y2, frame.point)); - frame.minmax(inv.transformPoint(x2, y1, frame.point)); - frame.minmax(inv.transformPoint(x2, y2, frame.point)) - return frame; +export class +foGlyph2D extends foGlyph implements iShape { + protected _subcomponents: foCollection; + get nodes(): foCollection { + return this._subcomponents; + } + + protected _handles: foCollection; + get handles(): foCollection { + this._handles || this.createHandles(); + return this._handles; + } + + protected _x: number; + protected _y: number; + protected _width: number; + protected _height: number; + + get x(): number { + return this._x || 0.0; + } + set x(value: number) { + this.smash(); + this._x = value; + } + get y(): number { + return this._y || 0.0; + } + set y(value: number) { + this.smash(); + this._y = value; + } + + get width(): number { + return this._width || 0.0; + } + set width(value: number) { + this._width = value; + } + + get height(): number { + return this._height || 0.0; + } + set height(value: number) { + this._height = value; + } + + public rotationZ = (): number => { + return 0; + } + + public openEditor: () => void; + public closeEditor: () => void; + public sendKeys: (e: KeyboardEvent, keys: any) => void; + public drawHover: (ctx: CanvasRenderingContext2D) => void; + public preDraw: (ctx: CanvasRenderingContext2D) => void; + public postDraw: (ctx: CanvasRenderingContext2D) => void; + + protected _matrix: Matrix2D; + protected _invMatrix: Matrix2D; + smash() { + //console.log('smash matrix') + this._matrix = undefined; + this._invMatrix = undefined; + } + + computeBoundry(frame: cFrame): cFrame { + const mtx = this.getGlobalMatrix(); + //this is a buffer so we create less garbage + const pt = frame.point; + frame.init(mtx.transformPoint(0, 0, pt)); + frame.minmax(mtx.transformPoint(0, this.height, pt)); + frame.minmax(mtx.transformPoint(this.width, 0, pt)); + frame.minmax(mtx.transformPoint(this.width, this.height, pt)); + return frame; + } + + protected _boundry: cFrame = new cFrame(this); + get boundryFrame(): cFrame { + this.computeBoundry(this._boundry); + + this.nodes.forEach(item => { + this._boundry.merge(item.boundryFrame); + }); + return this._boundry; + } + + public drawBoundry(ctx: CanvasRenderingContext2D) { + ctx.beginPath(); + ctx.setLineDash([5, 5]); + this.boundryFrame.draw(ctx, false); + ctx.stroke(); + } + + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, subcomponents, parent); + } + + is2D() { + return true; + } + + set(x: number, y: number, width: number, height: number): iRect { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + return this; + } + + contains(x: number, y: number): boolean { + return ( + this.x <= x && + x <= this.x + this.width && + this.y <= y && + y <= this.y + this.height + ); + } + + localContains(x: number, y: number): boolean { + return 0 <= x && x <= this.width && 0 <= y && y <= this.height; + } + + protected toJson(): any { + return Tools.mixin(super.toJson(), { + x: this.x, + y: this.y, + width: this.width, + height: this.height + }); + } + + public initialize( + x: number = Number.NaN, + y: number = Number.NaN, + ang: number = Number.NaN + ) { + return this; + } + + public didLocationChange( + x: number = Number.NaN, + y: number = Number.NaN, + angle: number = Number.NaN + ): boolean { + let changed = false; + if (!Number.isNaN(x) && this.x !== x) { + changed = true; + this.x = x; + } + + if (!Number.isNaN(y) && this.y !== y) { + changed = true; + this.y = y; + } + + return changed; + } + + public easeToNoLifecycle( + x: number, + y: number, + time: number = 0.5, + ease: any = Back.ease + ) { + TweenLite.to(this, time, { + x: x, + y: y, + ease: ease + // }).eventCallback("onUpdate", () => { + // this.drop(); + }).eventCallback('onComplete', () => { + this.initialize(x, y); + }); + + return this; + } + + public easeTo( + x: number, + y: number, + time: number = 0.5, + ease: any = Back.ease + ) { + TweenLite.to(this, time, { + x: x, + y: y, + ease: ease + }) + .eventCallback('onUpdate', () => { + this.move(); + }) + .eventCallback('onComplete', () => { + this.dropAt(x, y); + Lifecycle.easeTo(this, this.getLocation()); + }); + + return this; + } + + public easeTween(to: any, time: number = 0.5, ease: any = 'ease') { + const from = Tools.union(to, { ease: Back[ease] }); + + TweenLite.to(this, time, from).eventCallback('onComplete', () => + this.override(to) + ); + Lifecycle.easeTween(this, { time, ease, to }); + return this; + } + + public dropAt( + x: number = Number.NaN, + y: number = Number.NaN, + angle: number = Number.NaN + ) { + if (this.didLocationChange(x, y, angle)) { + Lifecycle.dropped(this, this.getLocation()); + } + return this; + } + + public move( + x: number = Number.NaN, + y: number = Number.NaN, + angle: number = Number.NaN + ) { + if (this.didLocationChange(x, y, angle)) { + Lifecycle.moved(this, this.getLocation()); + } + return this; + } + + public moveTo(loc: iPoint2D, offset?: iPoint2D) { + const x = loc.x + (offset ? offset.x : 0); + const y = loc.y + (offset ? offset.y : 0); + return this.move(x, y); + } + + public moveBy(loc: iPoint2D, offset?: iPoint2D) { + const x = this.x + loc.x + (offset ? offset.x : 0); + const y = this.y + loc.y + (offset ? offset.y : 0); + return this.move(x, y); + } + + updateContext(ctx: CanvasRenderingContext2D) { + const mtx = this.getMatrix(); + ctx.transform(mtx.a, mtx.b, mtx.c, mtx.d, mtx.tx, mtx.ty); + ctx.globalAlpha *= this.opacity; + } + + getGlobalMatrix() { + const mtx = new Matrix2D(this.getMatrix()); + const parent = this.myParent && this.myParent(); + if (parent) { + mtx.prependMatrix(parent.getGlobalMatrix()); + } + return mtx; + } + + getMatrix() { + if (this._matrix === undefined) { + this._matrix = new Matrix2D(); + this._matrix.appendTransform(this.x, this.y, 1, 1, 0, 0, 0, 0, 0); + } + return this._matrix; + } + + getInvMatrix() { + if (this._invMatrix === undefined) { + this._invMatrix = this.getMatrix().invertCopy(); + } + return this._invMatrix; + } + + localToGlobal(x: number, y: number, pt?: cPoint2D) { + const mtx = this.getGlobalMatrix(); + return mtx.transformPoint(x, y, pt); + } + + localToGlobalPoint(pt: cPoint2D): cPoint2D { + const mtx = this.getGlobalMatrix(); + return mtx.transformPoint(pt.x, pt.y, pt); + } + + globalToLocal(x: number, y: number, pt?: cPoint2D): cPoint2D { + const inv = this.getGlobalMatrix().invertCopy(); + return inv.transformPoint(x, y, pt); + } + + globalToLocalPoint(pt: cPoint2D): cPoint2D { + const inv = this.getGlobalMatrix().invertCopy(); + return inv.transformPoint(pt.x, pt.y, pt); + } + + globalToLocalFrame( + x1: number, + y1: number, + x2: number, + y2: number, + frame?: cFrame + ): cFrame { + frame = frame || new cFrame(); + const inv = this.getGlobalMatrix().invertCopy(); + + frame.init(inv.transformPoint(x1, y1, frame.point)); + frame.minmax(inv.transformPoint(x1, y2, frame.point)); + frame.minmax(inv.transformPoint(x2, y1, frame.point)); + frame.minmax(inv.transformPoint(x2, y2, frame.point)); + return frame; + } + + localToLocal( + x: number, + y: number, + target: foGlyph2D, + pt?: cPoint2D + ): cPoint2D { + pt = this.localToGlobal(x, y, pt); + return target.globalToLocal(pt.x, pt.y, pt); + } + + globalCenter(): cPoint2D { + const { x, y } = this.pinLocation(); + const mtx = this.getGlobalMatrix(); + return mtx.transformPoint(x, y); + } + + public getOffset = (loc: iPoint2D): iPoint2D => { + const x = this.x; + const y = this.y; + return new cPoint2D(x - loc.x, y - loc.y); + } + + public getLocation = (): any => { + return { + x: this.x, + y: this.y, + z: 0 }; + } - localToLocal(x: number, y: number, target: foGlyph2D, pt?: cPoint2D): cPoint2D { - pt = this.localToGlobal(x, y, pt); - return target.globalToLocal(pt.x, pt.y, pt); + public pinLocation(): any { + return { + x: 0, + y: 0, + z: 0 }; - - globalCenter(): cPoint2D { - let { x, y } = this.pinLocation(); - let mtx = this.getGlobalMatrix(); - return mtx.transformPoint(x, y); - }; - - public getOffset = (loc: iPoint2D): iPoint2D => { - let x = this.x; - let y = this.y; - return new cPoint2D(x - loc.x, y - loc.y); - } - - public getLocation = ():any => { - return { - x: this.x, - y: this.y, - z: 0, - } - } - - public pinLocation():any { - return { - x: 0, - y: 0, - z: 0, - } - } - - - public setLocation = (loc?: iPoint2D) => { - this.x = loc ? loc.x : 0; - this.y = loc ? loc.y : 0; - } - - - protected localHitTest = (hit: iPoint2D): boolean => { - let { x, y } = hit; - let loc = this.globalToLocal(x, y); - - if (loc.x < 0) return false; - if (loc.x > this.width) return false; - - if (loc.y < 0) return false; - if (loc.y > this.height) return false; - return true; - } - - public hitTest = (hit: iPoint2D): boolean => { - return this.localHitTest(hit); - } - - public overlapTest = (hit: iFrame): boolean => { - let frame = this.globalToLocalFrame(hit.x1, hit.y1, hit.x2, hit.y2); - - if (this.localContains(frame.x1, frame.y1)) return true; - if (this.localContains(frame.x1, frame.y2)) return true; - if (this.localContains(frame.x2, frame.y1)) return true; - if (this.localContains(frame.x2, frame.y2)) return true; - return false; - } - - - findObjectUnderPoint(hit: iPoint2D, deep: boolean): foGlyph2D { - let found: foGlyph2D = this.hitTest(hit) ? this : undefined; - - if (deep) { - let child = this.findChildObjectUnderPoint(hit); - found = child ? child : found; - } - return found; - } - - protected findChildObjectUnderPoint(hit: iPoint2D): foGlyph2D { - let children = this.nodes; - if (children.isSelectable) { - for (let i: number = 0; i < children.length; i++) { - let child: foGlyph2D = children.getMember(i); - let found = child.findChildObjectUnderPoint(hit); - if (found) return found; - } - } - - if (this.hitTest(hit)) { - return this; - } - } - - - findObjectUnderFrame(source: foGlyph2D, hit: iFrame, deep: boolean): foGlyph2D { - let found: foGlyph2D = this.overlapTest(hit) ? this : undefined; - - if (deep) { - let child = this.findChildObjectUnderFrame(source, hit); - found = child ? child : found; - } - return found; - } - - protected findChildObjectUnderFrame(source: foGlyph2D, hit: iFrame): foGlyph2D { - let children = this.nodes; - if (children.isSelectable) { - for (let i: number = 0; i < children.length; i++) { - let child: foGlyph2D = children.getMember(i); - if (source.hasAncestor(child)) continue; - let found = child.findChildObjectUnderFrame(source, hit); - if (found) return found; - } - } - if (this.overlapTest(hit)) { - return this; - } - } - - public afterRender = (ctx: CanvasRenderingContext2D, deep: boolean = true) => { - ctx.save(); - ctx.lineWidth = 4; - ctx.strokeStyle = 'pink'; - this.drawBoundry(ctx); - ctx.restore(); - - deep && this.nodes.forEach(item => { - item.afterRender(ctx, deep); - }); - } - - public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { - ctx.save(); - - //this.drawOrigin(ctx); - this.updateContext(ctx); - //this.drawOriginX(ctx); - - this.preDraw && this.preDraw(ctx); - this.draw(ctx); - this.drawHover && this.drawHover(ctx); - this.postDraw && this.postDraw(ctx); - - this.isSelected && this.drawSelected(ctx); - - deep && this.nodes.forEach(item => { - item.render(ctx, deep); - }); - - ctx.restore(); - } - - drawText(ctx: CanvasRenderingContext2D, text: string) { - //http://junerockwell.com/end-of-line-or-line-break-in-html5-canvas/ - let fontsize = 20; - let array = text.split('|'); - let dx = 10; - let dy = 20; - for (var i = 0; i < array.length; i++) { - ctx.fillText(array[i], dx, dy); - dy += (fontsize + 4); - } - }; - - - public drawPin(ctx: CanvasRenderingContext2D) { - let { x, y } = this.pinLocation(); - - ctx.save(); - ctx.beginPath(); - - ctx.arc(x, y, 6, 0, 2 * Math.PI, false); - ctx.fillStyle = 'pink'; - ctx.fill(); - ctx.lineWidth = 1; - ctx.strokeStyle = '#003300'; - ctx.stroke(); - ctx.restore(); - } - - public drawOrigin(ctx: CanvasRenderingContext2D) { - let { x, y } = this.pinLocation(); - - ctx.save(); - ctx.beginPath(); - ctx.setLineDash([5, 5]); - ctx.moveTo(x - 50, y); - ctx.lineTo(x + 50, y); - ctx.moveTo(x, y - 50); - ctx.lineTo(x, y + 50); - ctx.lineWidth = 1; - ctx.strokeStyle = '#003300'; - ctx.stroke(); - ctx.restore(); - } - - public drawOriginX(ctx: CanvasRenderingContext2D) { - let { x, y } = this.pinLocation(); - - ctx.save(); - ctx.beginPath(); - ctx.setLineDash([5, 5]); - ctx.moveTo(x - 50, y - 50); - ctx.lineTo(x + 50, y + 50); - ctx.moveTo(x + 50, y - 50); - ctx.lineTo(x - 50, y + 50); - ctx.lineWidth = 1; - ctx.strokeStyle = '#003300'; - ctx.stroke(); - ctx.restore(); - } - - public drawOutline(ctx: CanvasRenderingContext2D) { - ctx.beginPath() - ctx.setLineDash([15, 5]); - ctx.rect(0, 0, this.width, this.height); - ctx.stroke(); - } - - - protected generateHandles(spec: Array, proxy?: Array): foCollection { - - let i = 0; - if (!this._handles) { - this._handles = new foCollection() - spec.forEach(item => { - let type = item.myType ? item.myType : RuntimeType.define(foHandle2D) - let handle = new type(item, undefined, this); - handle.doMoveProxy = proxy && proxy[i] - this._handles.addMember(handle); - i++; - }); - } else { - spec.forEach(item => { - let handle = this._handles.getChildAt(i) - handle.override(item); - handle.doMoveProxy = proxy && proxy[i]; - i++; - }); - } - return this._handles; - } - - public createHandles(): foCollection { - - let spec = [ - { x: 0, y: 0, myName: "0:0", myType: RuntimeType.define(foHandle2D) }, - { x: this.width, y: 0, myName: "W:0" }, - { x: this.width, y: this.height, myName: "W:H" }, - { x: 0, y: this.height, myName: "0:H" }, - ]; - - return this.generateHandles(spec); - } - - public getHandle(name: string): foHandle2D { - if (!this._handles) return; - return this._handles.findMember(name); - } - - public findHandle(loc: cPoint2D, e): foHandle2D { - if (!this._handles) return; - - for (var i: number = 0; i < this.handles.length; i++) { - let handle: foHandle2D = this.handles.getChildAt(i); - if (handle.hitTest(loc)) { - return handle; - } - } - } - - public drawHandles(ctx: CanvasRenderingContext2D) { - this.handles.forEach(item => { - item.render(ctx); - }) - } - - - public drawSelected = (ctx: CanvasRenderingContext2D): void => { - ctx.strokeStyle = "red"; - ctx.lineWidth = 4; - this.drawOutline(ctx); - this.drawHandles(ctx) - this.drawPin(ctx); - } - - - - public draw = (ctx: CanvasRenderingContext2D): void => { - ctx.fillStyle = this.color; - ctx.lineWidth = 1; - ctx.fillRect(0, 0, this.width, this.height); - } - - toggleSelected() { - this.isSelected = !this.isSelected; - } - - layoutSubcomponentsVertical(resize: boolean = true, space: number = 0) { - let loc = this.getLocation() as cPoint2D; - let self = this; - - if (resize) { - self.height = self.width = 0; - loc.x = loc.y = 0; - } else { - loc = this.nodes.first().getLocation() as cPoint2D;; - } - - this.nodes.forEach(item => { - item.setLocation(loc); - }); - - this.nodes.forEach(item => { - let { x: pinX, y: pinY } = item.pinLocation(); - loc.x = resize ? pinX : loc.x; - loc.y += pinY; - item.easeToNoLifecycle(loc.x, loc.y); - loc.y += (space + item.height) - pinY; - - if (resize) { - self.width = Math.max(self.width, item.width); - self.height = loc.y; - } - }); - - Lifecycle.layout(this, { method: 'layoutSubcomponentsVertical', resize, space }) - return this; - } - - layoutSubcomponentsHorizontal(resize: boolean = true, space: number = 0) { - let loc = this.getLocation() as cPoint2D; - let self = this; - - if (resize) { - self.height = self.width = 0; - loc.x = loc.y = 0; - } else { - loc = this.nodes.first().getLocation() as cPoint2D; - } - - this.nodes.forEach(item => { - item.setLocation(loc); - }); - - this.nodes.forEach(item => { - let { x: pinX, y: pinY } = item.pinLocation(); - loc.x += pinX; - loc.y = resize ? pinY : loc.y; - item.easeToNoLifecycle(loc.x, loc.y); - loc.x += (space + item.width) - pinX; - - if (resize) { - self.width = loc.x; - self.height = Math.max(self.height, item.height); - } - }); - - Lifecycle.layout(this, { method: 'layoutSubcomponentsHorizontal', resize, space }) - return this; - } - - layoutMarginRight(resize: boolean = false, space: number = 0) { - let loc = this.getLocation() as cPoint2D; - let self = this; - - loc.x = (space + this.width); - loc.y = 0; - - this.nodes.forEach(item => { - let { x: pinX, y: pinY } = item.pinLocation(); - loc.x += pinX; - item.easeToNoLifecycle(loc.x, loc.y + pinY); - loc.x += (space + item.width) - pinX; - - if (resize) { - self.width = loc.x; - self.height = Math.max(self.height, item.height); - } - }); - Lifecycle.layout(this, { method: 'layoutMarginRight', resize, space }) - return this; - } - - layoutMarginTop(resize: boolean = false, space: number = 0) { - let loc = this.getLocation() as cPoint2D; - let self = this; - - loc.x = 10; - loc.y = (space + this.height); - - this.nodes.forEach(item => { - let { x: pinX, y: pinY } = item.pinLocation(); - loc.y += pinY; - item.easeToNoLifecycle(loc.x + pinX, loc.y); - loc.y += (space + item.height) - pinY; - - if (resize) { - self.width = Math.max(self.width, item.width); - self.height = loc.y; - } - }); - Lifecycle.layout(this, { method: 'layoutMarginTop', resize, space }) - return this; - } + } + + public setLocation = (loc?: iPoint2D) => { + this.x = loc ? loc.x : 0; + this.y = loc ? loc.y : 0; + } + + protected localHitTest = (hit: iPoint2D): boolean => { + const { x, y } = hit; + const loc = this.globalToLocal(x, y); + + if (loc.x < 0) return false; + if (loc.x > this.width) return false; + + if (loc.y < 0) return false; + if (loc.y > this.height) return false; + return true; + } + + public hitTest = (hit: iPoint2D): boolean => { + return this.localHitTest(hit); + } + + public overlapTest = (hit: iFrame): boolean => { + const frame = this.globalToLocalFrame(hit.x1, hit.y1, hit.x2, hit.y2); + + if (this.localContains(frame.x1, frame.y1)) return true; + if (this.localContains(frame.x1, frame.y2)) return true; + if (this.localContains(frame.x2, frame.y1)) return true; + if (this.localContains(frame.x2, frame.y2)) return true; + return false; + } + + findObjectUnderPoint(hit: iPoint2D, deep: boolean): foGlyph2D { + let found: foGlyph2D = this.hitTest(hit) ? this : undefined; + + if (deep) { + const child = this.findChildObjectUnderPoint(hit); + found = child ? child : found; + } + return found; + } + + protected findChildObjectUnderPoint(hit: iPoint2D): foGlyph2D { + const children = this.nodes; + if (children.isSelectable) { + for (let i = 0; i < children.length; i++) { + const child: foGlyph2D = children.getMember(i); + const found = child.findChildObjectUnderPoint(hit); + if (found) return found; + } + } + + if (this.hitTest(hit)) { + return this; + } + } + + findObjectUnderFrame( + source: foGlyph2D, + hit: iFrame, + deep: boolean + ): foGlyph2D { + let found: foGlyph2D = this.overlapTest(hit) ? this : undefined; + + if (deep) { + const child = this.findChildObjectUnderFrame(source, hit); + found = child ? child : found; + } + return found; + } + + protected findChildObjectUnderFrame( + source: foGlyph2D, + hit: iFrame + ): foGlyph2D { + const children = this.nodes; + if (children.isSelectable) { + for (let i = 0; i < children.length; i++) { + const child: foGlyph2D = children.getMember(i); + if (source.hasAncestor(child)) continue; + const found = child.findChildObjectUnderFrame(source, hit); + if (found) return found; + } + } + if (this.overlapTest(hit)) { + return this; + } + } + + public afterRender = ( + ctx: CanvasRenderingContext2D, + deep: boolean = true + ) => { + ctx.save(); + ctx.lineWidth = 4; + ctx.strokeStyle = 'pink'; + this.drawBoundry(ctx); + ctx.restore(); + + deep && + this.nodes.forEach(item => { + item.afterRender(ctx, deep); + }); + } + + public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { + ctx.save(); + + //this.drawOrigin(ctx); + this.updateContext(ctx); + //this.drawOriginX(ctx); + + this.preDraw && this.preDraw(ctx); + this.draw(ctx); + this.drawHover && this.drawHover(ctx); + this.postDraw && this.postDraw(ctx); + + this.isSelected && this.drawSelected(ctx); + + deep && + this.nodes.forEach(item => { + item.render(ctx, deep); + }); + + ctx.restore(); + } + + renderFont( + ctx: CanvasRenderingContext2D, + size: number = 20, + fontFamily: string = 'Arial', + align: string = 'center', + base: string = 'middle' + ) { + ctx.textAlign = align; + ctx.textBaseline = base; + ctx.font = `${size}px ${fontFamily}`; + } + + public renderText = ( + ctx: CanvasRenderingContext2D, + text: string, + x: number = 0, + y: number = 0 + ): void => { + ctx.fillText(text, x, y); + } + + public drawPin(ctx: CanvasRenderingContext2D) { + const { x, y } = this.pinLocation(); + + ctx.save(); + ctx.beginPath(); + + ctx.arc(x, y, 6, 0, 2 * Math.PI, false); + ctx.fillStyle = 'pink'; + ctx.fill(); + ctx.lineWidth = 1; + ctx.strokeStyle = '#003300'; + ctx.stroke(); + ctx.restore(); + } + + public drawOrigin(ctx: CanvasRenderingContext2D) { + const { x, y } = this.pinLocation(); + + ctx.save(); + ctx.beginPath(); + ctx.setLineDash([5, 5]); + ctx.moveTo(x - 50, y); + ctx.lineTo(x + 50, y); + ctx.moveTo(x, y - 50); + ctx.lineTo(x, y + 50); + ctx.lineWidth = 1; + ctx.strokeStyle = '#003300'; + ctx.stroke(); + ctx.restore(); + } + + public drawOriginX(ctx: CanvasRenderingContext2D) { + const { x, y } = this.pinLocation(); + + ctx.save(); + ctx.beginPath(); + ctx.setLineDash([5, 5]); + ctx.moveTo(x - 50, y - 50); + ctx.lineTo(x + 50, y + 50); + ctx.moveTo(x + 50, y - 50); + ctx.lineTo(x - 50, y + 50); + ctx.lineWidth = 1; + ctx.strokeStyle = '#003300'; + ctx.stroke(); + ctx.restore(); + } + + public drawOutline(ctx: CanvasRenderingContext2D) { + ctx.beginPath(); + ctx.setLineDash([15, 5]); + ctx.rect(0, 0, this.width, this.height); + ctx.stroke(); + } + + protected generateHandles( + spec: Array, + proxy?: Array + ): foCollection { + let i = 0; + if (!this._handles) { + this._handles = new foCollection(); + spec.forEach(item => { + const type = item.myType ? item.myType : RuntimeType.define(foHandle2D); + const handle = new type(item, undefined, this); + handle.doMoveProxy = proxy && proxy[i]; + this._handles.addMember(handle); + i++; + }); + } else { + spec.forEach(item => { + const handle = this._handles.getChildAt(i); + handle.override(item); + handle.doMoveProxy = proxy && proxy[i]; + i++; + }); + } + return this._handles; + } + + public createHandles(): foCollection { + const spec = [ + { x: 0, y: 0, myName: '0:0', myType: RuntimeType.define(foHandle2D) }, + { x: this.width, y: 0, myName: 'W:0' }, + { x: this.width, y: this.height, myName: 'W:H' }, + { x: 0, y: this.height, myName: '0:H' } + ]; + + return this.generateHandles(spec); + } + + public getHandle(name: string): foHandle2D { + if (!this._handles) return; + return this._handles.findMember(name); + } + + public findHandle(loc: cPoint2D, e): foHandle2D { + if (!this._handles) return; + + for (var i = 0; i < this.handles.length; i++) { + const handle: foHandle2D = this.handles.getChildAt(i); + if (handle.hitTest(loc)) { + return handle; + } + } + } + + public drawHandles(ctx: CanvasRenderingContext2D) { + this.handles.forEach(item => { + item.render(ctx); + }); + } + + public drawSelected = (ctx: CanvasRenderingContext2D): void => { + ctx.strokeStyle = 'red'; + ctx.lineWidth = 4; + this.drawOutline(ctx); + this.drawHandles(ctx); + this.drawPin(ctx); + } + + public draw = (ctx: CanvasRenderingContext2D): void => { + ctx.fillStyle = this.color; + ctx.lineWidth = 1; + ctx.fillRect(0, 0, this.width, this.height); + } + + toggleSelected() { + this.isSelected = !this.isSelected; + } + + layoutSubcomponentsVertical(resize: boolean = true, space: number = 0) { + let loc = this.getLocation() as cPoint2D; + const self = this; + + if (resize) { + self.height = self.width = 0; + loc.x = loc.y = 0; + } else { + loc = this.nodes.first().getLocation() as cPoint2D; + } + + this.nodes.forEach(item => { + item.setLocation(loc); + }); + + this.nodes.forEach(item => { + const { x: pinX, y: pinY } = item.pinLocation(); + loc.x = resize ? pinX : loc.x; + loc.y += pinY; + item.easeToNoLifecycle(loc.x, loc.y); + loc.y += space + item.height - pinY; + + if (resize) { + self.width = Math.max(self.width, item.width); + self.height = loc.y; + } + }); + + Lifecycle.layout(this, { + method: 'layoutSubcomponentsVertical', + resize, + space + }); + return this; + } + + layoutSubcomponentsHorizontal(resize: boolean = true, space: number = 0) { + let loc = this.getLocation() as cPoint2D; + const self = this; + + if (resize) { + self.height = self.width = 0; + loc.x = loc.y = 0; + } else { + loc = this.nodes.first().getLocation() as cPoint2D; + } + + this.nodes.forEach(item => { + item.setLocation(loc); + }); + + this.nodes.forEach(item => { + const { x: pinX, y: pinY } = item.pinLocation(); + loc.x += pinX; + loc.y = resize ? pinY : loc.y; + item.easeToNoLifecycle(loc.x, loc.y); + loc.x += space + item.width - pinX; + + if (resize) { + self.width = loc.x; + self.height = Math.max(self.height, item.height); + } + }); + + Lifecycle.layout(this, { + method: 'layoutSubcomponentsHorizontal', + resize, + space + }); + return this; + } + + layoutMarginRight(resize: boolean = false, space: number = 0) { + const loc = this.getLocation() as cPoint2D; + const self = this; + + loc.x = space + this.width; + loc.y = 0; + + this.nodes.forEach(item => { + const { x: pinX, y: pinY } = item.pinLocation(); + loc.x += pinX; + item.easeToNoLifecycle(loc.x, loc.y + pinY); + loc.x += space + item.width - pinX; + + if (resize) { + self.width = loc.x; + self.height = Math.max(self.height, item.height); + } + }); + Lifecycle.layout(this, { method: 'layoutMarginRight', resize, space }); + return this; + } + + layoutMarginTop(resize: boolean = false, space: number = 0) { + const loc = this.getLocation() as cPoint2D; + const self = this; + + loc.x = 10; + loc.y = space + this.height; + + this.nodes.forEach(item => { + const { x: pinX, y: pinY } = item.pinLocation(); + loc.y += pinY; + item.easeToNoLifecycle(loc.x + pinX, loc.y); + loc.y += space + item.height - pinY; + + if (resize) { + self.width = Math.max(self.width, item.width); + self.height = loc.y; + } + }); + Lifecycle.layout(this, { method: 'layoutMarginTop', resize, space }); + return this; + } } import { RuntimeType } from '../foRuntimeType'; RuntimeType.define(foGlyph2D); - - diff --git a/src/app/foundry/shapes/foHandle2D.ts b/src/app/foundry/shapes/foHandle2D.ts index d33b70e..f435440 100644 --- a/src/app/foundry/shapes/foHandle2D.ts +++ b/src/app/foundry/shapes/foHandle2D.ts @@ -6,8 +6,6 @@ import { Matrix2D } from './foMatrix2D'; import { iPoint2D } from '../foInterface'; import { foObject } from '../foObject.model'; -import { foNode } from '../foNode.model'; -import { foComponent } from '../foComponent.model'; import { foGlyph2D } from './foGlyph2D.model'; import { Lifecycle } from '../foLifecycle'; @@ -31,7 +29,7 @@ export class foHandle2D extends foHandle { this.smash(); this._x = value; } - get y(): number { return this._y || 0.0 } + get y(): number { return this._y || 0.0; } set y(value: number) { this.smash(); this._y = value; @@ -82,68 +80,68 @@ export class foHandle2D extends foHandle { updateContext(ctx: CanvasRenderingContext2D) { - let mtx = this.getMatrix(); + const mtx = this.getMatrix(); ctx.transform(mtx.a, mtx.b, mtx.c, mtx.d, mtx.tx, mtx.ty); ctx.globalAlpha *= this.opacity; }; getGlobalMatrix() { - let mtx = new Matrix2D(this.getMatrix()); - let parent = this.myParent() + const mtx = new Matrix2D(this.getMatrix()); + const parent = this.myParent(); if (parent) { mtx.prependMatrix(parent.getGlobalMatrix()); } return mtx; - }; + } getMatrix() { if (this._matrix === undefined) { this._matrix = new Matrix2D(); - let delta = this.size / 2; + const delta = this.size / 2; this._matrix.appendTransform(this.x, this.y, 1, 1, this.rotation(), 0, 0, delta, delta); } return this._matrix; - }; + } getInvMatrix() { if (this._invMatrix === undefined) { this._invMatrix = this.getMatrix().invertCopy(); } return this._invMatrix; - }; + } localToGlobal(x: number, y: number, pt?: cPoint2D) { - let mtx = this.getGlobalMatrix(); + const mtx = this.getGlobalMatrix(); return mtx.transformPoint(x, y, pt); - }; + } globalToLocal(x: number, y: number, pt?: cPoint2D) { - let inv = this.getGlobalMatrix().invertCopy(); + const inv = this.getGlobalMatrix().invertCopy(); return inv.transformPoint(x, y, pt); - }; + } localToGlobalPoint(pt: cPoint2D): cPoint2D { - let mtx = this.getGlobalMatrix(); + const mtx = this.getGlobalMatrix(); return mtx.transformPoint(pt.x, pt.y, pt); - }; + } globalCenter(): cPoint2D { - let { x, y } = this.pinLocation(); - let mtx = this.getGlobalMatrix(); + const { x, y } = this.pinLocation(); + const mtx = this.getGlobalMatrix(); return mtx.transformPoint(x, y); - }; + } public getOffset = (loc: iPoint2D): iPoint2D => { - let x = this.x; - let y = this.y; + const x = this.x; + const y = this.y; return new cPoint2D(x - loc.x, y - loc.y); } protected localHitTest = (hit: any): boolean => { - let { x, y } = hit as iPoint2D - let loc = this.globalToLocal(x, y); + const { x, y } = hit as iPoint2D; + const loc = this.globalToLocal(x, y); if (loc.x < 0) return false; if (loc.x > this.size) return false; diff --git a/src/app/foundry/shapes/foImage2D.model.ts b/src/app/foundry/shapes/foImage2D.model.ts index 4e1d318..7289243 100644 --- a/src/app/foundry/shapes/foImage2D.model.ts +++ b/src/app/foundry/shapes/foImage2D.model.ts @@ -1,129 +1,133 @@ +import { Tools } from "../foTools"; +import { cPoint2D, cMargin } from "./foGeometry2D"; +import { iShape, iPoint2D, iSize, Action } from "../foInterface"; -import { Tools } from '../foTools' -import { cPoint2D, cMargin } from './foGeometry2D'; -import { iShape, iPoint2D, iSize, Action } from '../foInterface' - -import { foObject } from '../foObject.model' -import { Matrix2D } from './foMatrix2D' -import { foHandle2D } from './foHandle2D' -import { foGlue2D } from './foGlue2D' -import { foCollection } from '../foCollection.model' -import { foGlyph2D } from './foGlyph2D.model' - - -import { foShape2D } from './foShape2D.model' +import { foObject } from "../foObject.model"; +import { Matrix2D } from "./foMatrix2D"; +import { foHandle2D } from "./foHandle2D"; +import { foGlue2D } from "./foGlue2D"; +import { foCollection } from "../foCollection.model"; +import { foGlyph2D } from "./foGlyph2D.model"; +import { foShape2D } from "./foShape2D.model"; export class foImage2D extends foShape2D { - protected _loaded: boolean = false; - - public margin: cMargin; - - protected _image: HTMLImageElement; - protected _imageURL: string; - get imageURL(): string { return this._imageURL; } - set imageURL(value: string) { - this._loaded = false; - - this._imageURL = value; - this._image = new Image(); - this._image.onload = () => { - this._loaded = true; - }; - this._image.src = this._imageURL; - - } - protected _background: string; - get background(): string { - return this._background; + protected _loaded: boolean = false; + + public margin: cMargin; + + protected _image: HTMLImageElement; + protected _imageURL: string; + get imageURL(): string { + return this._imageURL; + } + set imageURL(value: string) { + this._loaded = false; + + this._imageURL = value; + this._image = new Image(); + this._image.onload = () => { + this._loaded = true; + }; + this._image.src = this._imageURL; + } + protected _background: string; + get background(): string { + return this._background; + } + set background(value: string) { + this._background = value; + } + + //"http://backyardnaturalist.ca/wp-content/uploads/2011/06/goldfinch-feeder.jpg"; + public pinX = (): number => { + return 0.5 * this.width; + }; + public pinY = (): number => { + return 0.5 * this.height; + }; + + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, subcomponents, parent); + } + + protected toJson(): any { + return Tools.mixin(super.toJson(), { + background: this.background, + imageURL: this.imageURL, + margin: this.margin + }); + } + public override(properties?: any) { + if (properties && properties.margin) { + let m = properties.margin; + properties.margin = new cMargin(m.left, m.top, m.right, m.bottom); } - set background(value: string) { - this._background = value; + return super.override(properties); + } + + public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { + ctx.save(); + + //this.drawOrigin(ctx); + this.updateContext(ctx); + //this.drawOriginX(ctx); + + this.preDraw && this.preDraw(ctx); + this.draw(ctx); + this.drawHover && this.drawHover(ctx); + this.postDraw && this.postDraw(ctx); + + this.isSelected && this.drawSelected(ctx); + + deep && + this._subcomponents.forEach(item => { + item.render(ctx, deep); + }); + ctx.restore(); + } + + public drawOutline(ctx: CanvasRenderingContext2D) { + let width = this.width + ((this.margin && this.margin.width) || 0); + let height = this.height + ((this.margin && this.margin.height) || 0); + + ctx.beginPath(); + ctx.setLineDash([15, 5]); + ctx.rect(0, 0, width, height); + ctx.stroke(); + } + + public drawSelected = (ctx: CanvasRenderingContext2D): void => { + ctx.strokeStyle = "red"; + ctx.lineWidth = 1; + this.drawOutline(ctx); + //this.drawHandles(ctx); + this.drawPin(ctx); + }; + + public draw = (ctx: CanvasRenderingContext2D): void => { + let left = (this.margin && this.margin.left) || 0; + let top = (this.margin && this.margin.top) || 0; + + ctx.save(); + if (this.background) { + let width = this.width + ((this.margin && this.margin.width) || 0); + let height = this.height + ((this.margin && this.margin.height) || 0); + + ctx.fillStyle = this.background; + ctx.fillRect(0, 0, width, height); } + ctx.restore(); - //"http://backyardnaturalist.ca/wp-content/uploads/2011/06/goldfinch-feeder.jpg"; - public pinX = (): number => { return 0.5 * this.width; } - public pinY = (): number => { return 0.5 * this.height; } - - constructor(properties?: any, subcomponents?: Array, parent?: foObject) { - super(properties, subcomponents, parent); - } - - protected toJson(): any { - return Tools.mixin(super.toJson(), { - background: this.background, - imageURL: this.imageURL, - margin: this.margin, - }) - } - public override(properties?: any) { - if (properties && properties.margin) { - let m = properties.margin; - properties.margin = new cMargin(m.left, m.top, m.right, m.bottom); - } - return super.override(properties); + if (this._loaded) { + ctx.drawImage(this._image, left, top, this.width, this.height); } - - - public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { - ctx.save(); - - //this.drawOrigin(ctx); - this.updateContext(ctx); - //this.drawOriginX(ctx); - - this.preDraw && this.preDraw(ctx); - this.draw(ctx); - this.drawHover && this.drawHover(ctx); - this.postDraw && this.postDraw(ctx); - - this.isSelected && this.drawSelected(ctx); - - deep && this._subcomponents.forEach(item => { - item.render(ctx, deep); - }); - ctx.restore(); - } - - public drawOutline(ctx: CanvasRenderingContext2D) { - let width = this.width + ((this.margin && this.margin.width) || 0); - let height = this.height + ((this.margin && this.margin.height) || 0); - - ctx.beginPath() - ctx.setLineDash([15, 5]); - ctx.rect(0, 0, width, height); - ctx.stroke(); - } - - public drawSelected = (ctx: CanvasRenderingContext2D): void => { - ctx.strokeStyle = "red"; - ctx.lineWidth = 1; - this.drawOutline(ctx); - //this.drawHandles(ctx); - this.drawPin(ctx); - } - - public draw = (ctx: CanvasRenderingContext2D): void => { - let left = ((this.margin && this.margin.left) || 0); - let top = ((this.margin && this.margin.top) || 0); - - ctx.save(); - if (this.background) { - let width = this.width + ((this.margin && this.margin.width) || 0); - let height = this.height + ((this.margin && this.margin.height) || 0); - - ctx.fillStyle = this.background; - ctx.fillRect(0, 0, width, height); - } - ctx.restore(); - - if (this._loaded) { - ctx.drawImage(this._image, left, top, this.width, this.height); - } - } - + }; } - -import { RuntimeType } from '../foRuntimeType'; +import { RuntimeType } from "../foRuntimeType"; RuntimeType.define(foImage2D); diff --git a/src/app/foundry/shapes/foLayout2D.ts b/src/app/foundry/shapes/foLayout2D.ts new file mode 100644 index 0000000..1c75bbc --- /dev/null +++ b/src/app/foundry/shapes/foLayout2D.ts @@ -0,0 +1,194 @@ +import { Tools, foObject, Action } from '../../foundry'; + +import { foGlyph2D } from '../shapes/foGlyph2D.model'; +import { foShape2D } from '../shapes/foShape2D.model'; +import { cPoint2D } from '../shapes/foGeometry2D'; + +export interface iXY { + x: number; + y: number; +} + +//and easy way to create a set of layout geometry +export class foLayout2D extends foShape2D { + private _cursor: cPoint2D = new cPoint2D(); + private _direction: cPoint2D = new cPoint2D(1, 0); + private _points: Map = new Map(); + + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, subcomponents, parent); + this._direction.normal(); + } + + protected toJson(): any { + return Tools.mixin(super.toJson(), { + // glue: this._glue && Tools.asArray(this.glue.asJson) + }); + } + + generateGrid( + key: string, + xStart: number = 100, + xStep: number = 100, + xCount = 5, + yStart: number = 100, + yStep: number = 100, + yCount = 5 + ) { + for (let i = 0; i < xCount; i++) { + for (let j = 0; j < yCount; j++) { + const point = new cPoint2D( + xStart + i * xStep, + yStart + j * yStep, + `${key}:${i}:${j}` + ); + this._points.set(point.myName, point); + } + } + + return this; + } + + public fitSizeToPoints() { + this._points.forEach(pt => { + this.width = pt.x > this.width ? pt.x : this.width; + this.height = pt.y > this.height ? pt.y : this.height; + }); + } + + public drawCursor(ctx: CanvasRenderingContext2D) { + const { x, y } = this._cursor; + + ctx.save(); + ctx.beginPath(); + ctx.setLineDash([5, 5]); + ctx.moveTo(x - 50, y); + ctx.lineTo(x + 50, y); + ctx.moveTo(x, y - 50); + ctx.lineTo(x, y + 50); + ctx.lineWidth = 1; + ctx.strokeStyle = '#003300'; + ctx.stroke(); + ctx.restore(); + } + + public drawSelected = (ctx: CanvasRenderingContext2D): void => { + ctx.strokeStyle = 'red'; + ctx.lineWidth = 4; + this.drawOutline(ctx); + this.drawHandles(ctx); + this.drawLabels(ctx); + this.drawPin(ctx); + this.drawCursor(ctx); + } + + public drawLabels = (ctx: CanvasRenderingContext2D): void => { + ctx.save(); + ctx.fillStyle = 'black'; + this._points.forEach(pt => { + ctx.fillText(pt.myName, pt.x + 5, pt.y - 10); + }); + ctx.restore(); + } + + public draw = (ctx: CanvasRenderingContext2D): void => { + ctx.fillStyle = 'black'; + ctx.lineWidth = 1; + ctx.beginPath(); + ctx.setLineDash([10, 10]); + ctx.rect(0, 0, this.width, this.height); + ctx.stroke(); + + ctx.save(); + ctx.fillStyle = 'blue'; + ctx.lineWidth = 1; + ctx.strokeStyle = '#003300'; + this._points.forEach(pt => { + ctx.beginPath(); + ctx.arc(pt.x, pt.y, 6, 0, 2 * Math.PI, false); + ctx.fill(); + ctx.stroke(); + }); + ctx.restore(); + } + + findPoint(key: string, onFound?: Action, onMissing?): cPoint2D { + if (this._points.has(key)) { + const pnt = this._points.get(key); + onFound && onFound(pnt); + return pnt; + } else if (onMissing) { + onMissing(); + return this._points.get(key); + } + } + + getPointsByKey(key?: string): Array { + const list = new Array(); + this._points.forEach(pt => { + if (!key || Tools.startsWith(pt.myName, key)) { + list.push(pt); + } + }); + return list; + } + + getPointsXY(points?: Array): Array { + const list = new Array(); + const mtx = this.getGlobalMatrix(); + let point = new cPoint2D(); + + if (points) { + points.forEach(pt => { + point = mtx.transformPoint(pt.x, pt.y, point); + list.push({ x: point.x, y: point.y }); + }); + } else { + this._points.forEach(pt => { + point = mtx.transformPoint(pt.x, pt.y, point); + list.push({ x: point.x, y: point.y }); + }); + } + return list; + } + + + newPoint(x: number, y: number, name: string): cPoint2D { + const point = new cPoint2D(x, y, name); + this._points.set(point.myName, point); + return point; + } + + setCursor(point: cPoint2D) { + this._cursor.setValues(point.x, point.y); + } + + setCursorXY(x: number, y: number) { + this._cursor.setValues(x, y); + } + + moveCursor(d: number) { + this._cursor.addPoint(d * this._direction.x, d * this._direction.y); + } + + moveCursorXY(dx: number, dy: number) { + this._cursor.addPoint(dx, dy); + } + + setDirection(angle: number) { + const rads = angle * foGlyph2D.DEG_TO_RAD; + this._direction.setValues(Math.cos(rads), Math.sin(rads)); + } + + setDirectionXY(x: number, y: number) { + this._cursor.setValues(x, y).normal(); + } + + addPoint(name: string): cPoint2D { + return this.newPoint(this._cursor.x, this._cursor.y, name); + } +} diff --git a/src/app/foundry/shapes/foMatrix2D.ts b/src/app/foundry/shapes/foMatrix2D.ts index cda4f14..6b5df21 100644 --- a/src/app/foundry/shapes/foMatrix2D.ts +++ b/src/app/foundry/shapes/foMatrix2D.ts @@ -143,12 +143,7 @@ export class Matrix2D { return this; }; - /** - * Applies a clockwise rotation transformation to the matrix. - * @method rotate - * @param {Number} angle The angle to rotate by, in degrees. To use a value in radians, multiply it by `180/Math.PI`. - * @return {Matrix2D} This matrix. Useful for chaining method calls. - **/ + rotate(angle: number) { angle = angle * Matrix2D.DEG_TO_RAD; var cos = Math.cos(angle); @@ -222,14 +217,7 @@ export class Matrix2D { return this.tx === matrix.tx && this.ty === matrix.ty && this.a === matrix.a && this.b === matrix.b && this.c === matrix.c && this.d === matrix.d; }; - /** - * Transforms a point according to this matrix. - * @method transformPoint - * @param {Number} x The x component of the point to transform. - * @param {Number} y The y component of the point to transform. - * @param {Point | Object} [pt] An object to copy the result into. If omitted a generic object with x/y properties will be returned. - * @return {Point} This matrix. Useful for chaining method calls. - **/ + transformPoint(x: number, y: number, pt?: cPoint2D): cPoint2D { pt = pt || new cPoint2D(); pt.x = x * this.a + y * this.c + this.tx; diff --git a/src/app/foundry/shapes/foPage.model.ts b/src/app/foundry/shapes/foPage.model.ts index 736871f..f8ef167 100644 --- a/src/app/foundry/shapes/foPage.model.ts +++ b/src/app/foundry/shapes/foPage.model.ts @@ -1,582 +1,878 @@ - -import { PubSub } from "../foPubSub"; +import { PubSub } from '../foPubSub'; import { cPoint2D, cFrame } from './foGeometry2D'; -import { iPoint2D, Action } from '../foInterface' +import { iPoint2D, Action } from '../foInterface'; + +import { foObject } from '../foObject.model'; +import { foCollection } from '../foCollection.model'; +import { foGlyph } from '../foGlyph.model'; +import { WhereClause } from '../foInterface'; -import { foObject } from '../foObject.model' -import { foCollection } from '../foCollection.model' -import { foDictionary } from "../foDictionary.model"; +import { foSelectionBuffer, foCopyPasteBuffer } from '../foBuffer'; -import { foNode } from '../foNode.model' -import { Matrix2D } from './foMatrix2D' -import { foComponent } from '../foComponent.model' +import { foNode } from '../foNode.model'; +import { foInstance } from '../foInstance.model'; +import { Matrix2D } from './foMatrix2D'; -import { foGlyph2D } from './foGlyph2D.model' -import { foShape2D } from './foShape2D.model' +import { foGlyph2D } from './foGlyph2D.model'; +import { foShape2D } from './foShape2D.model'; import { foHandle2D } from './foHandle2D'; import { Lifecycle } from '../foLifecycle'; +import { RuntimeType } from '../foRuntimeType'; +import { foShape1D } from './foShape1D.model'; - - +import { foFileManager } from '../foFileManager'; +import { GlyphDictionary } from '../foGlyph.model'; //a Shape is a graphic designed to behave like a visio shape //and have all the same properties export class foPage extends foShape2D { - - gridSizeX: number = 50; - gridSizeY: number = 50; - showBoundry: boolean = false; - - protected _marginX: number; - get marginX(): number { return this._marginX || 0.0; } - set marginX(value: number) { - this.smash(); - this._marginX = value; - } - - protected _marginY: number; - get marginY(): number { return this._marginY || 0.0; } - set marginY(value: number) { - this.smash(); - this._marginY = value; - } - - protected _scaleX: number; - get scaleX(): number { return this._scaleX || 1.0; } - set scaleX(value: number) { - this.smash(); - this._scaleX = value; - } - - protected _scaleY: number; - get scaleY(): number { return this._scaleY || 1.0; } - set scaleY(value: number) { - this.smash(); - this._scaleY = value; - } - - public pinX = (): number => { return 0 * this.width; } - public pinY = (): number => { return 0 * this.height; } - public rotationZ = (): number => { return this.angle; } - - mouseLoc: any = {}; - - _dictionary: foDictionary = new foDictionary(); - _ctx: CanvasRenderingContext2D; - - constructor(properties?: any, subcomponents?: Array, parent?: foObject) { - super(properties, subcomponents, parent); - this.color = 'Linen'; - //setting x,y to something other than zero will break - //the rendering of 1D shapes - //this.x = this.y = 0; - this.setupMouseEvents(); - } - - //this is used to drop shapes - get centerX(): number { return this.width / 2; } - get centerY(): number { return this.height / 2; } - get centerZ(): number { return 0; } - - findItem(key: string, onMissing?: Action, onFound?: Action): T { - return this._dictionary.findItem(key, onMissing, onFound) as T; - } - - found(key: string, onFound?: Action, onMissing?: Action): T { - return this._dictionary.found(key, onFound, onMissing) as T; - } - - getMatrix() { - if (this._matrix === undefined) { - this._matrix = new Matrix2D(); - this._matrix.appendTransform(this.marginX + this.x, this.marginY + this.y, this.scaleX, this.scaleY, this.rotationZ(), 0, 0, this.pinX(), this.pinY()); + gridSizeX: number = 50; + gridSizeY: number = 50; + showBoundry: boolean = false; + canvas: HTMLCanvasElement = null; + + defaultGroupType = RuntimeType.find('foGroup2D'); + defaultConnectType = RuntimeType.find('foConnect1D'); + + protected selections: foSelectionBuffer = new foSelectionBuffer(); + protected copyPasteBuffer: foCopyPasteBuffer = new foCopyPasteBuffer(); + + protected _marginX: number; + get marginX(): number { + return this._marginX || 0.0; + } + set marginX(value: number) { + this.smash(); + this._marginX = value; + } + + protected _marginY: number; + get marginY(): number { + return this._marginY || 0.0; + } + set marginY(value: number) { + this.smash(); + this._marginY = value; + } + + protected _scaleX: number; + get scaleX(): number { + return this._scaleX || 1.0; + } + set scaleX(value: number) { + this.smash(); + this._scaleX = value; + } + + protected _scaleY: number; + get scaleY(): number { + return this._scaleY || 1.0; + } + set scaleY(value: number) { + this.smash(); + this._scaleY = value; + } + + public pinX = (): number => { + return 0 * this.width; + }; + public pinY = (): number => { + return 0 * this.height; + }; + public rotationZ = (): number => { + return this.angle; + }; + + mouseLoc: any = {}; + + _dictionary: GlyphDictionary = new GlyphDictionary(); + selectGlyph( + where: WhereClause, + list?: foCollection, + deep: boolean = true + ): foCollection { + return this._dictionary.selectGlyph(where, list, deep); + } + + _ctx: CanvasRenderingContext2D; + + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, subcomponents, parent); + this.color = 'Linen'; + //setting x,y to something other than zero will break + //the rendering of 1D shapes + //this.x = this.y = 0; + this.setupMouseEvents(); + } + + //this is used to drop shapes + get centerX(): number { + return this.width / 2; + } + get centerY(): number { + return this.height / 2; + } + get centerZ(): number { + return 0; + } + + findItem( + key: string, + onMissing?: Action, + onFound?: Action + ): T { + return this._dictionary.findItem(key, onMissing, onFound) as T; + } + + found( + key: string, + onFound?: Action, + onMissing?: Action + ): T { + return this._dictionary.found(key, onFound, onMissing) as T; + } + + getMatrix() { + if (this._matrix === undefined) { + this._matrix = new Matrix2D(); + this._matrix.appendTransform( + this.marginX + this.x, + this.marginY + this.y, + this.scaleX, + this.scaleY, + this.rotationZ(), + 0, + 0, + this.pinX(), + this.pinY() + ); + } + return this._matrix; + } + + findHitShape( + hit: iPoint2D, + deep: boolean = true, + exclude: foGlyph2D = null + ): foGlyph2D { + let found: foGlyph2D = undefined; + for (var i: number = 0; i < this.nodes.length; i++) { + const shape = this.nodes.getMember(i); + if (shape === exclude) continue; + found = shape.findObjectUnderPoint(hit, deep); + if (found) return found; + } + } + + findShapeUnder( + source: foGlyph2D, + deep: boolean = true, + exclude: foGlyph2D = null + ): foGlyph2D { + const frame = source.boundryFrame; + for (var i: number = 0; i < this.nodes.length; i++) { + let shape: foGlyph2D = this._subcomponents.getMember(i); + if (source.hasAncestor(shape) || shape === exclude) continue; + if (shape.findObjectUnderFrame(source, frame, deep)) { + return shape; + } + } + } + + establishInDictionary(obj: foNode) { + const guid = obj.myGuid; + this._dictionary.findItem(guid, () => { + this._dictionary.addItem(guid, obj); + }); + return obj; + } + + removeFromDictionary(obj: foNode) { + let guid = obj.myGuid; + this._dictionary.found(guid, () => { + this._dictionary.removeItem(guid); + }); + return obj; + } + + centerShape(shape: foGlyph, angle?: number) { + shape.dropAt(this.centerX, this.centerY, angle); + } + addSubcomponent(obj: foNode, properties?: any) { + const guid = obj.myGuid; + this._dictionary.findItem( + guid, + () => { + this._dictionary.addItem(guid, obj); + super.addSubcomponent(obj, properties); + }, + child => { + super.addSubcomponent(obj, properties); + } + ); + return obj; + } + + removeSubcomponent(obj: foNode) { + const guid = obj.myGuid; + this._dictionary.found( + guid, + () => { + (obj).isSelected = false; + this._dictionary.removeItem(guid); + super.removeSubcomponent(obj); + }, + child => { + super.removeSubcomponent(obj); + } + ); + return obj; + } + + clearPage() { + //simulate delete lifecycle in bulk via events + this.nodes.forEach(item => { + Lifecycle.unparent(item); + Lifecycle.destroyed(item); + }); + this._subcomponents.clearAll(); + this._dictionary.clearAll(); + } + + deleteSelected(onComplete?: Action) { + const found = this.selections.findSelected(); + if (found) { + this.selections.clear(); + this.destroyed(found); + + onComplete && onComplete(found); + } + } + + savePage(onComplete?: Action) { + //https://github.com/rapid7/savery + const manager = new foFileManager(); + const payload = this.deHydrate(); + manager.writeTextAsBlob(payload, 'stevetest', '.json'); + } + + openPage(onComplete?: Action) { + //https://github.com/rapid7/savery + const manager = new foFileManager(); + manager.userOpenFileDialog( + result => { + onComplete && onComplete(this); + }, + 'stevetest', + '.txt' + ); + } + + selectAll(onComplete?: Action) { + this.selections.clear(); + this.nodes.forEach(item => { + this.selections.addSelection(item, false); + }); + } + + connectSelected(onComplete?: Action>) { + const total = this.selections.count; + const list = new Array(); + + if (total > 1) { + let previous: foShape2D; + this.selections.forEach(item => { + const next = item as foShape2D; + if (!previous) { + previous = item as foShape2D; + } else { + const line = new this.defaultConnectType() as foShape1D; + line.addAsSubcomponent(this); + this.nodes.moveToTop(line); + line.glueStartTo(previous); + line.glueFinishTo(next); + previous = next; + + list.push(line); } - return this._matrix; + }); + + onComplete && onComplete(list); + } + } + + groupSelected(onComplete?: Action) { + const total = this.selections.count; + if (total > 1) { + const found = this.selections.findSelected(); + const boundry: cFrame = new cFrame(found); + found.computeBoundry(boundry); + + this.selections.forEach(item => { + boundry.merge(item.boundryFrame); + }); + + const list = this.selections.map(item => { + item.x -= boundry.x1; + item.y -= boundry.y1; + return item; + }) as Array; + + const copy = new this.defaultGroupType( + { + color: 'white', + x: boundry.centerX(), + y: boundry.centerY(), + width: boundry.width(), + height: boundry.heigth() + }, + list, + this + ).addAsSubcomponent(this); + + this.selections.clear(); + this.selections.addSelection(copy); + onComplete && onComplete(copy); + } + } + + unGroupSelected(onComplete?: Action) { + const found = this.selections.findSelected(); + if (found) { + const boundry: cFrame = new cFrame(found); + found.computeBoundry(boundry); + + this.selections.forEach(item => { + boundry.merge(item.boundryFrame); + }); + + const list = this.selections.map(item => { + item.x -= boundry.x1; + item.y -= boundry.y1; + return item; + }) as Array; + + const copy = new foShape2D( + { + color: 'white', + x: boundry.centerX(), + y: boundry.centerY(), + width: boundry.width(), + height: boundry.heigth() + }, + list, + this + ).addAsSubcomponent(this); + + this.selections.clear(); + this.selections.addSelection(copy); + onComplete && onComplete(copy); + } + } + + duplicateSelected(onComplete?: Action) { + const found = this.selections.findSelected(); + if (found) { + const parent = found.myParent && (found.myParent() as foNode); + this.selections.clear(); + const copy = found.createDeepCopy().generateName() as foGlyph2D; + + parent.addSubcomponent(copy, { + x: found.x + 0.3 * found.width, + y: found.y + found.height + }); + this.selections.addSelection(copy); + onComplete && onComplete(copy); + } + } + + cutSelected(onComplete?: Action) { + const found = this.selections.findSelected(); + if (found) { + this.selections.clear(); + found.removeFromParent(); + this.copyPasteBuffer.addSelection(found); + onComplete && onComplete(found); + } + } + + copySelected(onComplete?: Action) { + const found = this.selections.findSelected(); + if (found) { + this.selections.clear(); + const copy = found.createDeepCopy().generateName() as foGlyph2D; + this.copyPasteBuffer.addSelection(copy); + onComplete && onComplete(copy); + } + } + + pasteFromBuffer(onComplete?: Action) { + const found = this.copyPasteBuffer.first() as foGlyph2D; + if (found) { + const reference = (this.selections.findSelected() || found) as foGlyph2D; + this.selections.clear(); + const copy = found.createDeepCopy().generateName() as foGlyph2D; + this.addSubcomponent(copy, { + x: reference.x + 0.3 * reference.width, + y: reference.y + reference.height + }); + this.selections.addSelection(copy); + onComplete && onComplete(copy); + } + } + + zoomBy(zoom: number) { + this.scaleX *= zoom; + this.scaleY *= zoom; + } + + zoomToCenter(g: cPoint2D, zoom: number, e: WheelEvent) { + //you need to track this position in global space + //so you can return it to the same location on the screen + var pt1 = this.globalToLocalPoint(g); + + this.zoomBy(zoom); + //page.updatePIP(); + + //once the zoom is applied, measure where the global point has moved to + //then pan back so it is in the center... + const pt2 = this.localToGlobal(pt1.x, pt1.y); + + this.x += pt1.x - pt2.x; + this.y += pt1.y - pt2.y; + //console.log(pt2.x, pt2.y) + + //page.updatePIP(); + } + + setupMouseEvents() { + let shape: foGlyph2D = null; + let shapeUnder: foGlyph2D = null; + let hovershape: foGlyph2D = null; + let offset: iPoint2D = null; + + let grab: foHandle2D = null; + let float: foHandle2D = null; + + function debounce( + func: (loc: cPoint2D, e: MouseEvent, keys) => void, + wait = 50 + ) { + let h: any; + return (loc: cPoint2D, e: MouseEvent, keys) => { + clearTimeout(h); + h = setTimeout(() => func(loc, e, keys), wait); + }; + } + + const command = { + d: this.duplicateSelected, + c: this.copySelected, + x: this.deleteSelected, + v: this.pasteFromBuffer }; - findHitShape(hit: iPoint2D, deep: boolean = true, exclude: foGlyph2D = null): foGlyph2D { - let found: foGlyph2D = undefined; - for (var i: number = 0; i < this.nodes.length; i++) { - let shape = this.nodes.getMember(i); - if (shape === exclude) continue; - found = shape.findObjectUnderPoint(hit, deep); - if (found) return found; - } - } - - findShapeUnder(source: foGlyph2D, deep: boolean = true, exclude: foGlyph2D = null): foGlyph2D { - let frame = source.boundryFrame; - for (var i: number = 0; i < this.nodes.length; i++) { - let shape: foGlyph2D = this._subcomponents.getMember(i); - if (source.hasAncestor(shape) || shape === exclude) continue; - if (shape.findObjectUnderFrame(source, frame, deep)) { - return shape; - } - } - } - - establishInDictionary(obj: foNode) { - let guid = obj.myGuid; - this._dictionary.findItem(guid, () => { - this._dictionary.addItem(guid, obj); - }); - return obj; - } - - removeFromDictionary(obj: foNode) { - let guid = obj.myGuid; - this._dictionary.found(guid, () => { - this._dictionary.removeItem(guid); - }); - return obj; - } - - addSubcomponent(obj: foNode, properties?: any) { - let guid = obj.myGuid; - this._dictionary.findItem(guid, () => { - this._dictionary.addItem(guid, obj); - super.addSubcomponent(obj, properties); - }, child => { - super.addSubcomponent(obj, properties) - }); - return obj; - } - - - removeSubcomponent(obj: foNode) { - let guid = obj.myGuid; - this._dictionary.found(guid, () => { - (obj).isSelected = false; - this._dictionary.removeItem(guid); - super.removeSubcomponent(obj); - }); - return obj; - } - - - clearPage() { - //simulate delete lifecycle in bulk via events - this.nodes.forEach(item => { - Lifecycle.unparent(item); - Lifecycle.destroyed(item); - }) - this._subcomponents.clearAll(); - this._dictionary.clearAll(); - } - - deleteSelected(onComplete?: Action) { - let found = this._subcomponents.filter(item => { return item.isSelected; })[0]; - if (found) { - this.destroyed(found); - onComplete && onComplete(found); - } - } - - zoomBy(zoom: number) { - this.scaleX *= zoom; - this.scaleY *= zoom; - } - - zoomToCenter(g: cPoint2D, zoom: number, e: WheelEvent) { - - //you need to track this position in global space - //so you can return it to the same location on the screen - var pt1 = this.globalToLocalPoint(g); - - this.zoomBy(zoom); - //page.updatePIP(); - - //once the zoom is applied, measure where the global point has moved to - //then pan back so it is in the center... - let pt2 = this.localToGlobal(pt1.x, pt1.y); - - this.x += pt1.x - pt2.x; - this.y += pt1.y - pt2.y; - //console.log(pt2.x, pt2.y) - - //page.updatePIP(); - } - - setupMouseEvents() { - let shape: foGlyph2D = null; - let shapeUnder: foGlyph2D = null; - let hovershape: foGlyph2D = null; - let offset: iPoint2D = null; - let handles: foCollection = new foCollection() - let grab: foHandle2D = null; - let float: foHandle2D = null; - - function findHandle(loc: cPoint2D): foHandle2D { - for (var i: number = 0; i < handles.length; i++) { - let handle: foHandle2D = handles.getChildAt(i); - if (handle.hitTest(loc)) { - return handle; - } - } - } - - function debounce(func: (loc: cPoint2D, e: MouseEvent, keys) => void, wait = 50) { - let h: number; - return (loc: cPoint2D, e: MouseEvent, keys) => { - clearTimeout(h); - h = setTimeout(() => func(loc, e, keys), wait); - }; - } - - PubSub.Sub('onkeypress', (e: KeyboardEvent, keys) => { - alert('code:' + keys.code) - }); - - let mousedown = (loc: cPoint2D, e: MouseEvent, keys) => { - this.onMouseLocationChanged(loc, "down", keys); - - grab = findHandle(loc); - if (grab) { - offset = grab.getOffset(loc); - return; - } - - let found = this.findHitShape(loc) as foGlyph2D; - - if (!keys.shift) { - grab = null; - handles.clearAll(); - this.nodes.forEach(item => { - item.unSelect(true, found); - }); - } - - if (found) { - shape = found; - this.nodes.moveToTop(shape); - shape.isSelected = true; - offset = shape.getOffset(loc); - handles.copyMembers(shape.handles); - } - - }; - - PubSub.Sub('mousedown', mousedown); - - - - let mousemove = (loc: cPoint2D, e: MouseEvent, keys) => { - - if (findHandle(loc) && handles.length) { - //this.onHandleMoving(loc, handles.first(), keys); - this.onTrackHandles(loc, handles, keys); - } - - handles.forEach(handle => { - handle.color = handle.hitTest(loc) ? 'yellow' : 'black' - }) - - - if (grab) { - this.onHandleMoving(loc, grab, keys) - grab.moveTo(loc, offset); - } else if (shape) { - this.onMouseLocationChanged(loc, "move", keys); - shape.moveTo(loc, offset); - - if (keys.ctrl) { - let found = this.findShapeUnder(shape); - if (found && found == shapeUnder) { - this.onItemOverlapEnter(loc, shape, shapeUnder, keys); - } else if (found) { - shapeUnder && this.onItemOverlapExit(loc, shape, shapeUnder, keys); - shapeUnder = found; - this.onItemOverlapEnter(loc, shape, shapeUnder, keys); - } else if (shapeUnder) { - this.onItemOverlapExit(loc, shape, shapeUnder, keys); - shapeUnder = null; - } - } else { - shapeUnder && this.onItemOverlapExit(loc, shape, shapeUnder, keys); - shapeUnder = null; - } - - - } else { - this.onMouseLocationChanged(loc, "hover", keys); - - let found = this.findHitShape(loc) as foGlyph2D; - if (found && found == hovershape) { - this.onItemHoverEnter(loc, hovershape); - } else if (found) { - hovershape && this.onItemHoverExit(loc, hovershape); - hovershape = found; - this.onItemHoverEnter(loc, hovershape); - } else if (hovershape) { - this.onItemHoverExit(loc, hovershape); - grab && this.onHandleHoverExit(loc, grab, keys) - hovershape = undefined; - grab = undefined; - } - - - let handle = findHandle(loc); - if (handle && handle == float) { - float = handle; - this.onHandleHoverEnter(loc, handle, keys) - } else if (handle) { - float && this.onHandleHoverExit(loc, float, keys) - float = handle; - this.onHandleHoverEnter(loc, float, keys) - } else if (float) { - this.onHandleHoverExit(loc, handle, keys) - float = null; - } - } - - }; - - let debounceMouseMove = debounce(mousemove,10) - - PubSub.Sub('mousemove', debounceMouseMove); - - - - let mouseup = (loc: cPoint2D, e: MouseEvent, keys) => { - grab = null; - this.onMouseLocationChanged(loc, "up", keys); - if (!shape) return; - - this._subcomponents.moveToTop(shape); - - if (shapeUnder && keys.ctrl) { - //foObject.beep(); - let { x, y } = shape.getLocation() as cPoint2D; - let drop = shapeUnder.globalToLocal(x, y); - shapeUnder.addSubcomponent(shape.removeFromParent()); - shape.easeTo(drop.x, drop.y); - //shape.easeTo(0, 0); - shapeUnder = null; - this.onItemChangedParent(shape) - } else { - this.onItemChangedPosition(shape) - } - - if (shape.myParent() != this && keys.ctrl) { - //foObject.beep(); - let { x, y } = shape.pinLocation(); - let drop = shape.localToGlobal(x, y); - this.addSubcomponent(shape.removeFromParent()); - shape.easeTo(drop.x, drop.y); - this.onItemChangedParent(shape) - } - - shape = shapeUnder = null; - }; - - PubSub.Sub('mouseup', mouseup); - - PubSub.Sub('wheel', (loc: cPoint2D, g: cPoint2D, zoom: number, e: WheelEvent, keys) => { - this.onMouseLocationChanged(loc, "wheel", keys); - if (keys.shift && keys.ctrl) { - this.zoomToCenter(g, zoom, e); - } - }); - } - - public onMouseLocationChanged = (loc: cPoint2D, state: string, keys?: any): void => { - this.mouseLoc = loc; - this.mouseLoc.state = state; - this.mouseLoc.keys = keys; - } - - public onItemChangedParent = (shape: foGlyph2D): void => { - } - - public onItemChangedPosition = (shape: foGlyph2D): void => { - } - - public onItemOverlapEnter = (loc: cPoint2D, shape: foGlyph2D, shapeUnder: foGlyph2D, keys?: any): void => { - } - - public onItemOverlapExit = (loc: cPoint2D, shape: foGlyph2D, shapeUnder: foGlyph2D, keys?: any): void => { - } - - public onItemHoverEnter = (loc: cPoint2D, shape: foGlyph2D, keys?: any): void => { - } - - public onItemHoverExit = (loc: cPoint2D, shape: foGlyph2D, keys?: any): void => { - } - - public onHandleHoverEnter = (loc: cPoint2D, handle: foHandle2D, keys?: any): void => { - } - - public onHandleMoving = (loc: cPoint2D, handle: foHandle2D, keys?: any): void => { - } - - public onHandleHoverExit = (loc: cPoint2D, handle: foHandle2D, keys?: any): void => { - } - - public onTrackHandles = (loc: cPoint2D, handles: foCollection, keys?: any): void => { - } - - drawGrid(ctx: CanvasRenderingContext2D) { - ctx.save(); - ctx.beginPath(); - - ctx.setLineDash([5, 1]); - ctx.strokeStyle = 'gray'; - - let left = this.marginX - this.x; - let top = this.marginY - this.y; - let width = this.width / this.scaleX; - let height = this.height / this.scaleY; - let right = left + width; - let bottom = top + height; - - //ctx.fillStyle = 'yellow'; - //ctx.fillRect(left,top, width, height); - - //draw vertical... - let x = this.gridSizeX; //left; - while (x < right) { - ctx.moveTo(x, top); - ctx.lineTo(x, bottom); - x += this.gridSizeX + PubSub.Sub('onkeydown', (e: KeyboardEvent, keys) => { + if (keys.ctrl && e.key === 'd') { + //duplicate + this.duplicateSelected(); + } else if (keys.ctrl && e.key === 'c') { + //copy + this.copySelected(); + } else if (keys.ctrl && e.key === 'x') { + //cut + this.deleteSelected(); + } else if (keys.ctrl && e.key === 'v') { + //paste + this.pasteFromBuffer(); + } else if (keys.ctrl && e.key === 'l') { + //connect + this.connectSelected(); + } else if (keys.ctrl && e.key === 'g') { + //group + this.groupSelected(); + } else if (keys.ctrl && e.key === 'u') { + //un-group + this.unGroupSelected(); + } else if (keys.ctrl && e.key === 'a') { + //select all + this.selectAll(); + } else if (keys.ctrl && e.key === 's') { + //save + this.savePage(); + } else if (keys.ctrl && e.key === 'o') { + //open + this.openPage(); + } else { + this.selections.sendKeysToShape(e, keys); + } + }); + + const mousedown = (loc: cPoint2D, e: MouseEvent, keys) => { + this.onMouseLocationChanged(loc, 'down', keys); + + grab = this.selections.findHandle(loc); + if (grab) { + offset = grab.getOffset(loc); + return; + } + + const found = this.findHitShape(loc) as foGlyph2D; + + if (found) { + shape = found; + offset = shape.getOffset(loc); + this.nodes.moveToTop(shape); + this.selections.addSelection(shape, !keys.shift); + } else { + grab = null; + this.selections.clear(); + } + }; + PubSub.Sub('mousedown', mousedown); + + const mousemove = (loc: cPoint2D, e: MouseEvent, keys) => { + const handles = this.selections.handles; + if (this.selections.findHandle(loc) && handles.length) { + //this.onHandleMoving(loc, handles.first(), keys); + this.onTrackHandles(loc, handles, keys); + } + + handles.forEach(handle => { + handle.color = handle.hitTest(loc) ? 'yellow' : 'black'; + }); + + if (grab) { + this.onHandleMoving(loc, grab, keys); + grab.moveTo(loc, offset); + } else if (shape) { + this.onMouseLocationChanged(loc, 'move', keys); + shape.moveTo(loc, offset); + + if (keys.ctrl) { + const found = this.findShapeUnder(shape); + if (found && found === shapeUnder) { + this.onItemOverlapEnter(loc, shape, shapeUnder, keys); + } else if (found) { + shapeUnder && this.onItemOverlapExit(loc, shape, shapeUnder, keys); + shapeUnder = found; + this.onItemOverlapEnter(loc, shape, shapeUnder, keys); + } else if (shapeUnder) { + this.onItemOverlapExit(loc, shape, shapeUnder, keys); + shapeUnder = null; + } + } else { + shapeUnder && this.onItemOverlapExit(loc, shape, shapeUnder, keys); + shapeUnder = null; } - x = -this.gridSizeX; //left; - while (x > left) { - ctx.moveTo(x, top); - ctx.lineTo(x, bottom); - x -= this.gridSizeX; + } else { + this.onMouseLocationChanged(loc, 'hover', keys); + + const found = this.findHitShape(loc) as foGlyph2D; + if (found && found === hovershape) { + this.onItemHoverEnter(loc, hovershape); + } else if (found) { + hovershape && this.onItemHoverExit(loc, hovershape); + hovershape = found; + this.onItemHoverEnter(loc, hovershape); + } else if (hovershape) { + this.onItemHoverExit(loc, hovershape); + grab && this.onHandleHoverExit(loc, grab, keys); + hovershape = undefined; + grab = undefined; } - - //draw horizontal... - let y = this.gridSizeY; //top; - while (y < bottom) { - ctx.moveTo(left, y); - ctx.lineTo(right, y); - y += this.gridSizeY; + const handle = this.selections.findHandle(loc); + if (handle && handle === float) { + float = handle; + this.onHandleHoverEnter(loc, handle, keys); + } else if (handle) { + float && this.onHandleHoverExit(loc, float, keys); + float = handle; + this.onHandleHoverEnter(loc, float, keys); + } else if (float) { + this.onHandleHoverExit(loc, handle, keys); + float = null; } + } + }; - y = -this.gridSizeY; //top; - while (y > top) { - ctx.moveTo(left, y); - ctx.lineTo(right, y); - y -= this.gridSizeY; + const debounceMouseMove = debounce(mousemove, 10); + PubSub.Sub('mousemove', debounceMouseMove); + + const mouseup = (loc: cPoint2D, e: MouseEvent, keys) => { + grab = null; + this.onMouseLocationChanged(loc, 'up', keys); + if (!shape) return; + + this._subcomponents.moveToTop(shape); + + if (shapeUnder && keys.ctrl) { + //foObject.beep(); + const { x, y } = shape.getLocation() as cPoint2D; + const drop = shapeUnder.globalToLocal(x, y); + shapeUnder.addSubcomponent(shape.removeFromParent()); + shape.easeTo(drop.x, drop.y); + //shape.easeTo(0, 0); + shapeUnder = null; + this.onItemChangedParent(shape); + } else { + this.onItemChangedPosition(shape); + } + + if (shape.myParent() !== this && keys.ctrl) { + //foObject.beep(); + const { x, y } = shape.pinLocation(); + const drop = shape.localToGlobal(x, y); + this.addSubcomponent(shape.removeFromParent()); + shape.easeTo(drop.x, drop.y); + this.onItemChangedParent(shape); + } + + shape = shapeUnder = null; + }; + PubSub.Sub('mouseup', mouseup); + + PubSub.Sub( + 'wheel', + (loc: cPoint2D, g: cPoint2D, zoom: number, e: WheelEvent, keys) => { + this.onMouseLocationChanged(loc, 'wheel', keys); + if (keys.shift && keys.ctrl) { + this.zoomToCenter(g, zoom, e); } - - ctx.stroke(); - ctx.restore(); - } - - drawAxis(ctx: CanvasRenderingContext2D) { - ctx.save(); - ctx.beginPath(); - - ctx.strokeStyle = 'black'; - ctx.lineWidth = 3; - - let left = this.marginX - this.x; - let top = this.marginY - this.y; - let width = this.width / this.scaleX; - let height = this.height / this.scaleY; - let right = left + width; - let bottom = top + height; - - //draw vertical... - ctx.moveTo(0, top); - ctx.lineTo(0, bottom); - - - //draw horizontal... - - ctx.moveTo(left, 0); - ctx.lineTo(right, 0); - - ctx.stroke(); - ctx.restore(); - } - - drawPage(ctx: CanvasRenderingContext2D) { - ctx.save(); - ctx.beginPath(); - - ctx.strokeStyle = 'black'; - ctx.lineWidth = 5; - - //let left = this.marginX - this.x; - //let top = this.marginY - this.y; - //let width = this.width / this.scaleX; - //let height = this.height / this.scaleY; - //let right = left + width; - //let bottom = top + height; - - //draw vertical... - ctx.rect(0, 0, this.width, this.height); - - ctx.stroke(); - ctx.restore(); - } - - drawName(ctx: CanvasRenderingContext2D) { - ctx.save(); - ctx.font = '50pt Calibri'; - ctx.lineWidth = 3; - ctx.strokeStyle = 'blue'; - ctx.strokeText(this.myName, 10, 50); - ctx.restore(); - } - - get boundryFrame(): cFrame { - let frame = this.nodes.first().boundryFrame; - this.nodes.forEach(item => { - frame.merge(item.boundryFrame); - }); - return frame; - } - - public afterRender = (ctx: CanvasRenderingContext2D, deep: boolean = true) => { - ctx.save(); - deep && this.nodes.forEach(item => { - item.afterRender(ctx, deep); - }); - ctx.restore(); - } - - public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { - this._ctx = ctx; - ctx.clearRect(0, 0, this.width, this.height); - - ctx.save(); - this.updateContext(ctx); - - this.drawName(ctx); - - this.preDraw && this.preDraw(ctx); - this.draw(ctx); - //this.drawHover && this.drawHover(ctx); - this.postDraw && this.postDraw(ctx); - - deep && this._subcomponents.forEach(item => { - item.render(ctx, deep); - }); - ctx.restore(); - - this.showBoundry && this.afterRender(ctx); - } - - - public preDraw = (ctx: CanvasRenderingContext2D): void => { - //ctx.fillStyle = this.color; - //ctx.fillRect(0, 0, this.pageWidth, this.pageHeight); - } - - public draw = (ctx: CanvasRenderingContext2D): void => { - this.drawGrid(ctx); - this.drawAxis(ctx); - this.drawPage(ctx); - this.drawPin(ctx); - } + } + ); + } + + public onMouseLocationChanged = ( + loc: cPoint2D, + state: string, + keys?: any + ): void => { + this.mouseLoc = loc; + this.mouseLoc.state = state; + this.mouseLoc.keys = keys; + }; + + public onItemChangedParent = (shape: foGlyph2D): void => {}; + + public onItemChangedPosition = (shape: foGlyph2D): void => {}; + + public onItemOverlapEnter = ( + loc: cPoint2D, + shape: foGlyph2D, + shapeUnder: foGlyph2D, + keys?: any + ): void => {}; + + public onItemOverlapExit = ( + loc: cPoint2D, + shape: foGlyph2D, + shapeUnder: foGlyph2D, + keys?: any + ): void => {}; + + public onItemHoverEnter = ( + loc: cPoint2D, + shape: foGlyph2D, + keys?: any + ): void => {}; + + public onItemHoverExit = ( + loc: cPoint2D, + shape: foGlyph2D, + keys?: any + ): void => {}; + + public onHandleHoverEnter = ( + loc: cPoint2D, + handle: foHandle2D, + keys?: any + ): void => {}; + + public onHandleMoving = ( + loc: cPoint2D, + handle: foHandle2D, + keys?: any + ): void => {}; + + public onHandleHoverExit = ( + loc: cPoint2D, + handle: foHandle2D, + keys?: any + ): void => {}; + + public onTrackHandles = ( + loc: cPoint2D, + handles: foCollection, + keys?: any + ): void => {}; + + drawGrid(ctx: CanvasRenderingContext2D) { + ctx.save(); + ctx.beginPath(); + + ctx.setLineDash([5, 1]); + ctx.strokeStyle = 'gray'; + + const left = this.marginX - this.x; + const top = this.marginY - this.y; + const width = this.width / this.scaleX; + const height = this.height / this.scaleY; + const right = left + width; + const bottom = top + height; + + //ctx.fillStyle = 'yellow'; + //ctx.fillRect(left,top, width, height); + + //draw vertical... + let x = this.gridSizeX; //left; + while (x < right) { + ctx.moveTo(x, top); + ctx.lineTo(x, bottom); + x += this.gridSizeX; + } + x = -this.gridSizeX; //left; + while (x > left) { + ctx.moveTo(x, top); + ctx.lineTo(x, bottom); + x -= this.gridSizeX; + } + + //draw horizontal... + let y = this.gridSizeY; //top; + while (y < bottom) { + ctx.moveTo(left, y); + ctx.lineTo(right, y); + y += this.gridSizeY; + } + + y = -this.gridSizeY; //top; + while (y > top) { + ctx.moveTo(left, y); + ctx.lineTo(right, y); + y -= this.gridSizeY; + } + + ctx.stroke(); + ctx.restore(); + } + + drawAxis(ctx: CanvasRenderingContext2D) { + ctx.save(); + ctx.beginPath(); + + ctx.strokeStyle = 'black'; + ctx.lineWidth = 3; + + const left = this.marginX - this.x; + const top = this.marginY - this.y; + const width = this.width / this.scaleX; + const height = this.height / this.scaleY; + const right = left + width; + const bottom = top + height; + + //draw vertical... + ctx.moveTo(0, top); + ctx.lineTo(0, bottom); + + //draw horizontal... + + ctx.moveTo(left, 0); + ctx.lineTo(right, 0); + + ctx.stroke(); + ctx.restore(); + } + + drawPage(ctx: CanvasRenderingContext2D) { + ctx.save(); + ctx.beginPath(); + + ctx.strokeStyle = 'black'; + ctx.lineWidth = 5; + + //let left = this.marginX - this.x; + //let top = this.marginY - this.y; + //let width = this.width / this.scaleX; + //let height = this.height / this.scaleY; + //let right = left + width; + //let bottom = top + height; + + //draw vertical... + ctx.rect(0, 0, this.width, this.height); + + ctx.stroke(); + ctx.restore(); + } + + drawName(ctx: CanvasRenderingContext2D) { + ctx.save(); + ctx.font = '50pt Calibri'; + ctx.lineWidth = 3; + ctx.strokeStyle = 'blue'; + ctx.strokeText(this.myName, 10, 50); + ctx.restore(); + } + + get boundryFrame(): cFrame { + const frame = this.nodes.first().boundryFrame; + this.nodes.forEach(item => { + frame.merge(item.boundryFrame); + }); + return frame; + } + + public afterRender = ( + ctx: CanvasRenderingContext2D, + deep: boolean = true + ) => { + ctx.save(); + deep && + this.nodes.forEach(item => { + item.afterRender(ctx, deep); + }); + ctx.restore(); + }; + + public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { + this._ctx = ctx; + ctx.clearRect(0, 0, this.width, this.height); + + ctx.save(); + this.updateContext(ctx); + + this.drawName(ctx); + + this.preDraw && this.preDraw(ctx); + this.draw(ctx); + //this.drawHover && this.drawHover(ctx); + this.postDraw && this.postDraw(ctx); + + deep && + this._subcomponents.forEach(item => { + item.render(ctx, deep); + }); + ctx.restore(); + + this.showBoundry && this.afterRender(ctx); + } + + public preDraw = (ctx: CanvasRenderingContext2D): void => { + ctx.fillStyle = this.color; + ctx.fillRect(0, 0, this.width, this.height); + }; + + public draw = (ctx: CanvasRenderingContext2D): void => { + this.drawGrid(ctx); + this.drawAxis(ctx); + this.drawPage(ctx); + this.drawPin(ctx); + }; } - - - - +RuntimeType.define(foPage); diff --git a/src/app/foundry/shapes/foPath2D.model.ts b/src/app/foundry/shapes/foPath2D.model.ts index 3ea8a15..4908c69 100644 --- a/src/app/foundry/shapes/foPath2D.model.ts +++ b/src/app/foundry/shapes/foPath2D.model.ts @@ -20,6 +20,9 @@ let star = "M 262.6 182.4 C 261.7 179.7 259.3 177.7 256.4 177.2 C 245.3 175.7 23 let rocket = "M 201.2 222.1 C 210 216.5 218.6 210.1 225.7 203 C 249.9 178.8 252.6 157.5 250.1 149.9 C 253.7 146.3 257.3 142.7 260.9 139.1 C 261.9 138.1 261.9 136.5 260.9 135.5 C 259.9 134.5 258.3 134.5 257.3 135.5 C 253.7 139.1 250.1 142.7 246.5 146.3 C 238.9 143.8 217.6 146.5 193.4 170.7 C 186.3 177.8 179.9 186.4 174.3 195.2 C 166.2 193.2 152.1 193.2 142.3 204.1 C 131.1 216.4 137.7 228.1 140.2 225.7 C 142.2 223.6 145.6 211.3 160.4 220.8 C 158 225.8 158.1 228.9 159.7 230.4 C 161.8 232.5 163.9 234.6 166 236.7 C 167.6 238.3 170.6 238.5 175.7 236 C 185.1 250.8 172.8 254.2 170.8 256.3 C 168.3 258.7 180 265.3 192.3 254.1 C 203.2 244.3 203.2 230.2 201.2 222.1M 216.5 179.9 C 212.9 176.3 212.9 170.3 216.5 166.7 C 220.2 163 226.1 163 229.7 166.7 C 233.4 170.4 233.4 176.2 229.7 179.9 C 226.1 183.5 220.2 183.5 216.5 179.9M 156.4 233.5 C 156.4 233.5 146.4 235.3 142.7 253.7 C 161.1 250.1 162.9 240 162.9 240 C 160.8 237.8 158.6 235.7 156.4 233.5z"; +let body = "M13.38,201.93a101.41,101.41,0,0,1,2-19.62,99.45,99.45,0,0,1,27-50.85,96.1,96.1,0,0,1,21.5-16.3c1.32-.74,2-.19,2.86.56a64,64,0,0,0,82.22.46l2-1.62c34.2,17.57,52.4,55.17,51.68,87.36Z"; +let head = "M55.62,66.49c-.22-28.7,23.73-52.88,53.65-52.41,28,.44,51.48,24.15,51.41,52.53a52.53,52.53,0,1,1-105.06-.13Z"; + //https://codepen.io/osublake/pen/pRNYRM @@ -36,9 +39,23 @@ declare var Path2D: Path2DConstructor; export class foPath2D extends foShape2D { path: string; scale: number; + tx: number = 0; + ty: number = 0; + + symbol: Path2D; constructor(properties?: any, subcomponents?: Array, parent?: foObject) { super(properties, subcomponents, parent); + + this.setupPreDraw(); + } + + + protected toJson(): any { + return Tools.mixin(super.toJson(), { + path: this.path, + scale: this.scale, + }); } drawBox(ctx: CanvasRenderingContext2D) { @@ -47,30 +64,60 @@ export class foPath2D extends foShape2D { ctx.fill(p); } - public draw = (ctx: CanvasRenderingContext2D): void => { - let scale = this.scale ? this.scale : 1; + setupPreDraw() { + + let preDraw = (ctx: CanvasRenderingContext2D): void => { + let scale = this.scale ? this.scale : 1; + let data = this.path ? this.path : heart; - let data = this.path ? this.path : heart; - let [left, top, right, bottom] = PathSVG.pathBounds(data); - this.width = scale * (right - left); - this.height = scale * (bottom - top); + let result = PathSVG.pathBounds(data); + this.symbol = new Path2D(result.normal); - this.drawBox(ctx); + let [left, top, right, bottom] = result.bounds + this.width = scale * (right - left); + this.height = scale * (bottom - top); - //https://github.com/jkroso/normalize-svg-path - let norm = PathSVG.convert(data); + this.tx = -scale * left; + this.ty = -scale * top; + //https://github.com/jkroso/normalize-svg-path + + this.preDraw = undefined; + }; + + this.preDraw = preDraw; + } + + + public draw = (ctx: CanvasRenderingContext2D): void => { + let scale = this.scale ? this.scale : 1; + //this.drawBox(ctx); - //console.log (left, top, right, bottom); ctx.save(); - ctx.translate(-scale * left, -scale * top); + ctx.translate(this.tx, this.ty); ctx.scale(scale, scale); ctx.fillStyle = this.color; - let path = new Path2D(norm); - ctx.fill(path); + + ctx.fill(this.symbol); ctx.restore(); } + public drawOutline(ctx: CanvasRenderingContext2D) { + ctx.beginPath() + ctx.setLineDash([15, 5]); + ctx.rect(0, 0, this.width, this.height); + ctx.stroke(); + } + + public drawSelected = (ctx: CanvasRenderingContext2D): void => { + ctx.strokeStyle = "red"; + ctx.lineWidth = 1; + this.drawOutline(ctx); + this.drawHandles(ctx); + //this.drawConnectionPoints(ctx); + this.drawPin(ctx); + } + } import { RuntimeType } from '../foRuntimeType'; diff --git a/src/app/foundry/shapes/foPathSVG.ts b/src/app/foundry/shapes/foPathSVG.ts index c4f72db..ea946e8 100644 --- a/src/app/foundry/shapes/foPathSVG.ts +++ b/src/app/foundry/shapes/foPathSVG.ts @@ -407,6 +407,7 @@ export class foPathSVG { let a = this.parse(path); let b = this.absolutize(a); let c = this.normalize(b); + let normal = c.map(seg => seg.join(' ')).join(''); var bounds = [Infinity, Infinity, -Infinity, -Infinity] @@ -421,7 +422,10 @@ export class foPathSVG { } } - return bounds + return { + normal, + bounds + } } } diff --git a/src/app/foundry/shapes/foShape1D.model.ts b/src/app/foundry/shapes/foShape1D.model.ts index 64bdf2c..18baf44 100644 --- a/src/app/foundry/shapes/foShape1D.model.ts +++ b/src/app/foundry/shapes/foShape1D.model.ts @@ -132,7 +132,7 @@ export class foShape1D extends foShape2D { }; } - public establishGlue(name: string, target: foShape2D, handleName?: string) { + public establishGlue(name: string, target: foShape2D, handleName?: string): foGlue2D { let binding = {} binding[shape1DNames.start] = this.setStart.bind(this); binding[shape1DNames.finish] = this.setFinish.bind(this); @@ -143,22 +143,22 @@ export class foShape1D extends foShape2D { return glue; } - public glueStartTo(target: foShape2D, handleName?: string) { + public glueStartTo(target: foShape2D, handleName?: string): foGlue2D { let glue = this.establishGlue(shape1DNames.start, target, handleName); return glue; } - public glueFinishTo(target: foShape2D, handleName?: string) { + public glueFinishTo(target: foShape2D, handleName?: string): foGlue2D { let glue = this.establishGlue(shape1DNames.finish, target, handleName); return glue; } - public unglueStart() { + public unglueStart():foGlue2D { let glue = this.dissolveGlue(shape1DNames.start); return glue; } - public unglueFinish() { + public unglueFinish():foGlue2D { let glue = this.dissolveGlue(shape1DNames.finish); return glue; } @@ -385,7 +385,12 @@ export class foShape1D extends foShape2D { import { RuntimeType } from '../foRuntimeType'; +import { foGlue2D } from './foGlue2D'; RuntimeType.define(foShape1D); +export class foConnect1D extends foShape1D { +} + +RuntimeType.define(foConnect1D); diff --git a/src/app/foundry/shapes/foShape2D.model.ts b/src/app/foundry/shapes/foShape2D.model.ts index 1d2b838..a6f6974 100644 --- a/src/app/foundry/shapes/foShape2D.model.ts +++ b/src/app/foundry/shapes/foShape2D.model.ts @@ -1,27 +1,27 @@ -import { Tools } from '../foTools' +import { Tools } from '../foTools'; import { cPoint2D } from './foGeometry2D'; import { Vector2, Vector3 } from 'three'; -import { iPoint2D, iFrame } from '../foInterface' +import { iPoint2D, iFrame } from '../foInterface'; -import { foObject } from '../foObject.model' -import { Matrix2D } from './foMatrix2D' -import { foGlue2D } from './foGlue2D' -import { foConnectionPoint2D } from './foConnectionPoint2D' -import { foCollection } from '../foCollection.model' -import { foNode } from '../foNode.model' +import { foObject } from '../foObject.model'; +import { Matrix2D } from './foMatrix2D'; +import { foGlue2D } from './foGlue2D'; +import { foConnectionPoint2D } from './foConnectionPoint2D'; +import { foCollection } from '../foCollection.model'; -import { foGlyph2D } from './foGlyph2D.model' + +import { foGlyph2D } from './foGlyph2D.model'; import { Lifecycle } from '../foLifecycle'; export enum shape2DNames { - left = "left", - right = "right", - top = "top", - bottom = "bottom", - center = "center" -}; + left = 'left', + right = 'right', + top = 'top', + bottom = 'bottom', + center = 'center' +} //a Shape is a graphic designed to behave like a visio shape //and have all the same properties @@ -37,7 +37,7 @@ export class foShape2D extends foGlyph2D { protected _glue: foCollection; get glue(): foCollection { if (!this._glue) { - this._glue = new foCollection() + this._glue = new foCollection(); } return this._glue; } @@ -48,25 +48,51 @@ export class foShape2D extends foGlyph2D { return this._connectionPoints; } - public pinX = (): number => { return 0.5 * this.width; } - public pinY = (): number => { return 0.5 * this.height; } - public rotationZ = (): number => { return this.angle; } + public pinX = (): number => { return 0.5 * this.width; }; + public pinY = (): number => { return 0.5 * this.height; }; + public rotationZ = (): number => { return this.angle; }; + + public setPinLeft() { + this.pinX = (): number => { return 0.0 * this.width; }; + return this; + } + public setPinRight() { + this.pinX = (): number => { return 1.0 * this.width; }; + return this; + } + public setPinCenter() { + this.pinX = (): number => { return 0.5 * this.width; }; + return this; + } + + public setPinTop() { + this.pinY = (): number => { return 0.0 * this.height; }; + return this; + } + public setPinMiddle() { + this.pinY = (): number => { return 0.5 * this.height; }; + return this; + } + public setPinBottom() { + this.pinY = (): number => { return 1.0 * this.height; }; + return this; + } pinVector(): Vector3 { return new Vector3( this.pinX(), this.pinY(), 0, - ) - } - + ); + } + protected originPosition(): Vector3 { - let pin = this.pinVector(); + const pin = this.pinVector(); return new Vector3( this.x - pin.x, this.y - pin.y, 0, - ) + ); } public pinLocation() { @@ -74,7 +100,7 @@ export class foShape2D extends foGlyph2D { x: this.pinX(), y: this.pinY(), z: 0, - } + }; } @@ -94,20 +120,20 @@ export class foShape2D extends foGlyph2D { public didLocationChange(x: number = Number.NaN, y: number = Number.NaN, angle: number = Number.NaN): boolean { let changed = super.didLocationChange(x, y, angle); - if (!Number.isNaN(angle) && this.angle != angle) { + if (!Number.isNaN(angle) && this.angle !== angle) { changed = true; this.angle = angle; - }; + } return changed; } public dropAt(x: number = Number.NaN, y: number = Number.NaN, angle: number = Number.NaN) { if (this.didLocationChange(x, y, angle)) { - let point = this.getLocation(); + const point = this.getLocation(); this._glue && this.glue.forEach(item => { item.targetMoved(point); - }) + }); Lifecycle.dropped(this, point); } return this; @@ -115,20 +141,20 @@ export class foShape2D extends foGlyph2D { public move(x: number = Number.NaN, y: number = Number.NaN, angle: number = Number.NaN) { if (this.didLocationChange(x, y, angle)) { - let point = this.getLocation(); + const point = this.getLocation(); this._glue && this.glue.forEach(item => { item.targetMoved(point); - }) + }); Lifecycle.moved(this, point); } return this; } updateContext(ctx: CanvasRenderingContext2D) { - let mtx = this.getMatrix(); + const mtx = this.getMatrix(); ctx.transform(mtx.a, mtx.b, mtx.c, mtx.d, mtx.tx, mtx.ty); ctx.globalAlpha *= this.opacity; - }; + } getMatrix() { if (this._matrix === undefined) { @@ -136,12 +162,12 @@ export class foShape2D extends foGlyph2D { this._matrix.appendTransform(this.x, this.y, 1, 1, this.rotationZ(), 0, 0, this.pinX(), this.pinY()); } return this._matrix; - }; + } protected localHitTest = (hit: any): boolean => { - let { x, y } = hit as iPoint2D - let loc = this.globalToLocal(x, y);; + const { x, y } = hit as iPoint2D; + const loc = this.globalToLocal(x, y); if (loc.x < 0) return false; if (loc.x > this.width) return false; @@ -159,7 +185,7 @@ export class foShape2D extends foGlyph2D { public overlapTest = (hit: iFrame): boolean => { - let frame = this.globalToLocalFrame(hit.x1, hit.y1, hit.x2, hit.y2); + const frame = this.globalToLocalFrame(hit.x1, hit.y1, hit.x2, hit.y2); if (this.localContains(frame.x1, frame.y1)) return true; if (this.localContains(frame.x1, frame.y2)) return true; @@ -180,19 +206,19 @@ export class foShape2D extends foGlyph2D { } public establishGlue(sourceName: string, target: foShape2D, targetName?: string) { - let glue = this.getGlue(`${this.myGuid}:${sourceName}->${target.myGuid}:${targetName}`); + const glue = this.getGlue(`${this.myGuid}:${sourceName}->${target.myGuid}:${targetName}`); glue.glueTo(sourceName, target, targetName); return glue; } public glueConnectionPoints(target: foShape2D, sourceHandle?: string, targetHandle?: string) { - let glue = this.establishGlue(sourceHandle ? sourceHandle: shape2DNames.center, target, targetHandle ? targetHandle: shape2DNames.center); + const glue = this.establishGlue(sourceHandle ? sourceHandle : shape2DNames.center, target, targetHandle ? targetHandle : shape2DNames.center); return glue; } public dissolveGlue(name: string) { if (this._glue) { - let glue = this.glue.findMember(name); + const glue = this.glue.findMember(name); glue && glue.unglue(); return glue; } @@ -215,17 +241,17 @@ export class foShape2D extends foGlyph2D { let i = 0; if (!this._connectionPoints) { - this._connectionPoints = new foCollection() + this._connectionPoints = new foCollection(); spec.forEach(item => { - let type = item.myType ? item.myType : RuntimeType.define(foConnectionPoint2D); - let point = new type(item, undefined, this); + const type = item.myType ? item.myType : RuntimeType.define(foConnectionPoint2D); + const point = new type(item, undefined, this); point.doMoveProxy = proxy && proxy[i]; this._connectionPoints.addMember(point); i++; }); } else { spec.forEach(item => { - let point = this._connectionPoints.getChildAt(i) + const point = this._connectionPoints.getChildAt(i); point.override(item); point.doMoveProxy = proxy && proxy[i]; i++; @@ -235,9 +261,9 @@ export class foShape2D extends foGlyph2D { } public createConnectionPoints(): foCollection { - let w = this.width; - let h = this.height; - let spec = [ + const w = this.width; + const h = this.height; + const spec = [ { x: w / 2, y: 0, myName: shape2DNames.top, myType: RuntimeType.define(foConnectionPoint2D) }, { x: w / 2, y: h, myName: shape2DNames.bottom, angle: 45 }, { x: 0, y: h / 2, myName: shape2DNames.left }, @@ -254,8 +280,8 @@ export class foShape2D extends foGlyph2D { public findConnectionPoint(loc: cPoint2D, e): foConnectionPoint2D { if (!this._connectionPoints) return; - for (var i: number = 0; i < this.connectionPoints.length; i++) { - let point: foConnectionPoint2D = this.connectionPoints.getChildAt(i); + for (var i = 0; i < this.connectionPoints.length; i++) { + const point: foConnectionPoint2D = this.connectionPoints.getChildAt(i); if (point.hitTest(loc)) { return point; } @@ -266,7 +292,7 @@ export class foShape2D extends foGlyph2D { public drawConnectionPoints(ctx: CanvasRenderingContext2D) { this.connectionPoints.forEach(item => { item.render(ctx); - }) + }); } public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { @@ -291,14 +317,14 @@ export class foShape2D extends foGlyph2D { public drawOutline(ctx: CanvasRenderingContext2D) { - ctx.beginPath() + ctx.beginPath(); ctx.setLineDash([15, 5]); ctx.rect(0, 0, this.width, this.height); ctx.stroke(); } public drawSelected = (ctx: CanvasRenderingContext2D): void => { - ctx.strokeStyle = "red"; + ctx.strokeStyle = 'red'; ctx.lineWidth = 4; this.drawOutline(ctx); this.drawHandles(ctx); @@ -315,6 +341,12 @@ export class foShape2D extends foGlyph2D { } + import { RuntimeType } from '../foRuntimeType'; RuntimeType.define(foShape2D); +export class foGroup2D extends foShape2D { +} + +RuntimeType.define(foGroup2D); + diff --git a/src/app/foundry/shapes/foText2D.model.ts b/src/app/foundry/shapes/foText2D.model.ts index 103d766..7de3d21 100644 --- a/src/app/foundry/shapes/foText2D.model.ts +++ b/src/app/foundry/shapes/foText2D.model.ts @@ -1,13 +1,12 @@ - -import { Tools } from '../foTools' +import { Tools } from '../foTools'; import { cMargin } from './foGeometry2D'; +import { foObject } from '../foObject.model'; +import { foGlyph2D } from './foGlyph2D.model'; -import { foObject } from '../foObject.model' -import { foGlyph2D } from './foGlyph2D.model' - -import { foShape2D } from './foShape2D.model' +import { foShape2D } from './foShape2D.model'; +import { foUnDo } from '../foUnDo'; // ctx.textAlign = "left" || "right" || "center" || "start" || "end"; @@ -22,194 +21,339 @@ import { foShape2D } from './foShape2D.model' //a Shape is a graphic designed to behave like a visio shape //and have all the same properties export class foText2D extends foShape2D { - public text: string; - public textAlign: string; - public textBaseline: string; - - - public margin: cMargin; - public fontSize: number; - public font: string; - - protected _background: string; - get background(): string { - return this._background; - } - set background(value: string) { - this._background = value; - } - - public pinX = (): number => { return 0.5 * this.width; } - public pinY = (): number => { return 0.5 * this.height; } - - constructor(properties?: any, subcomponents?: Array, parent?: foObject) { - super(properties, subcomponents, parent); - - this.setupPreDraw(); - } - - protected toJson(): any { - return Tools.mixin(super.toJson(), { - text: this.text, - background:this.background, - fontSize:this.fontSize, - margin:this.margin - }); - } - - get size():number { - return (this.fontSize || 12); - } - - updateContext(ctx: CanvasRenderingContext2D) { - super.updateContext(ctx); - - ctx.textAlign = this.textAlign || 'center'; - ctx.textBaseline = this.textBaseline || 'middle'; - ctx.font = this.font || this.size + "px Georgia"; + public text: string; + public textAlign: string; + public textBaseline: string; + + public margin: cMargin; + public fontSize: number; + public font: string; + public resize: boolean = false; + + protected _background: string; + get background(): string { + return this._background; + } + set background(value: string) { + this._background = value; + } + + public pinX = (): number => { + return 0.5 * this.width; + } + public pinY = (): number => { + return 0.5 * this.height; + } + + constructor( + properties?: any, + subcomponents?: Array, + parent?: foObject + ) { + super(properties, subcomponents, parent); + + this.setupPreDraw(); + } + + protected toJson(): any { + return Tools.mixin(super.toJson(), { + text: this.text, + background: this.background, + fontSize: this.fontSize, + margin: this.margin + }); + } + + get size(): number { + return this.fontSize || 12; + } + + updateContext(ctx: CanvasRenderingContext2D) { + super.updateContext(ctx); + + this.renderFont(ctx, this.size, this.font, this.textAlign, this.textBaseline); + } + + setupPreDraw() { + const preDraw = (ctx: CanvasRenderingContext2D): void => { + if ( this.resize) { + const textMetrics = ctx.measureText(this.text); + this.width = textMetrics.width + ((this.margin && this.margin.width) || 0); + this.height = this.size + ((this.margin && this.margin.height) || 0); + } + this.createConnectionPoints(); + this.createHandles(); + this.preDraw = undefined; }; - setupPreDraw() { - - let preDraw = (ctx: CanvasRenderingContext2D): void => { - let textMetrics = ctx.measureText(this.text); - this.width = textMetrics.width + ((this.margin && this.margin.width) || 0); - this.height = this.size + ((this.margin && this.margin.height) || 0); - this.createConnectionPoints(); - this.preDraw = undefined; - }; - - this.preDraw = preDraw; + this.preDraw = preDraw; + } + + public drawOutline(ctx: CanvasRenderingContext2D) { + ctx.beginPath(); + ctx.setLineDash([15, 5]); + ctx.rect(0, 0, this.width, this.height); + ctx.stroke(); + } + + public drawDefaultSelected(ctx: CanvasRenderingContext2D) { + ctx.strokeStyle = 'red'; + ctx.lineWidth = 1; + this.drawOutline(ctx); + this.drawHandles(ctx); + this.drawConnectionPoints(ctx); + this.drawPin(ctx); + } + + public drawSelected = this.drawDefaultSelected; + + public drawText = (ctx: CanvasRenderingContext2D): void => { + const left = (this.margin && this.margin.left) || 0; + const top = (this.margin && this.margin.top) || 0; + + ctx.save(); + if (this.background) { + ctx.fillStyle = this.background; + ctx.fillRect(0, 0, this.width, this.height); } - public render(ctx: CanvasRenderingContext2D, deep: boolean = true) { - ctx.save(); + ctx.fillStyle = this.color; + this.renderText(ctx, this.text, this.pinX() + left, this.pinY() + top); - //this.drawOrigin(ctx); - this.updateContext(ctx); - //this.drawOriginX(ctx); + ctx.restore(); + } - this.preDraw && this.preDraw(ctx); - this.draw(ctx); - this.drawHover && this.drawHover(ctx); - this.postDraw && this.postDraw(ctx); - - this.isSelected && this.drawSelected(ctx); + public draw: (ctx: CanvasRenderingContext2D) => void = this.drawText; +} - deep && this._subcomponents.forEach(item => { - item.render(ctx, deep); - }); - ctx.restore(); +export class foInputText2D extends foText2D { + private UnDo: foUnDo = new foUnDo(); + private isEditing: boolean = false; + private showCursor: boolean = false; + private cursorStart: number; + private cursorEnd: number; + + private timer: any; + private undoRoot: any; + private initState: any; + + private setState(state: any) { + this.text = state.text; + this.cursorStart = state.start; + this.cursorEnd = state.end; + } + + private getState() { + return { text: this.text, start: this.cursorStart, end: this.cursorEnd }; + } + + public openEditor = () => { + this.isEditing = true; + this.drawSelected = this.drawIsEditing; + this.timer = setInterval(() => { + this.showCursor = !this.showCursor; + }, 600); + this.cursorStart = this.cursorEnd = this.text.length; + this.initState = this.getState(); + + this.UnDo.registerActions( + 'shapeTextChanged', + p => { + return p; + }, + p => { + return p; + }, + (o, n) => { + return o !== n; + } + ); + } + + public closeEditor = () => { + this.isEditing = false; + this.drawSelected = this.drawDefaultSelected; + clearInterval(this.timer); + this.UnDo.clear(); + } + + public addCharacter(char) { + const state = this.getState(); + if (this.UnDo.verifyKeep(this.undoRoot, state)) { + this.undoRoot = this.UnDo.do('shapeTextChanged', state); } - public drawOutline(ctx: CanvasRenderingContext2D) { - ctx.beginPath() - ctx.setLineDash([15, 5]); - ctx.rect(0, 0, this.width, this.height); - ctx.stroke(); + const text = + this.text.slice(0, this.cursorStart) + + char + + this.text.slice(this.cursorEnd); + this.text = text; + this.cursorStart += 1; + this.cursorEnd = this.cursorStart; + } + + public delCharacter() { + if (this.cursorStart === 0) return; + + const state = this.getState(); + if (this.UnDo.verifyKeep(this.undoRoot, state)) { + this.undoRoot = this.UnDo.do('shapeTextChanged', state); } - public drawSelected = (ctx: CanvasRenderingContext2D): void => { - ctx.strokeStyle = "red"; - ctx.lineWidth = 1; - this.drawOutline(ctx); - this.drawHandles(ctx); - this.drawConnectionPoints(ctx); - this.drawPin(ctx); + const text = + this.text.slice(0, this.cursorStart - 1) + + this.text.slice(this.cursorEnd); + this.text = text; + this.cursorStart -= 1; + this.cursorEnd = this.cursorStart; + } + + public sendKeys = (e: KeyboardEvent, keys: any) => { + if (keys.ctrl && e.key === 'e') { + this.isEditing ? this.closeEditor() : this.openEditor(); + } else if (keys.ctrl && e.key === 'z') { + this.UnDo.canUndo() && this.setState(this.UnDo.unDo()); + } else if (this.isEditing) { + this.editText(e, keys); } - - public draw = (ctx: CanvasRenderingContext2D): void => { - - let left = ((this.margin && this.margin.left) || 0); - let top = ((this.margin && this.margin.top) || 0); - - ctx.save(); - if (this.background) { - ctx.fillStyle = this.background; - ctx.fillRect(0, 0, this.width, this.height); + this.setupPreDraw(); + } + + editText(e: KeyboardEvent, keys: any) { + if (keys.ctrl && e.key === 'a') { + this.cursorStart = 0; + this.cursorEnd = this.text.length; + } else if (keys.ctrl) { + return; + } else if (e.keyCode >= 48 && e.keyCode <= 90) { + this.addCharacter(e.key); + } else if (e.keyCode === 32) { + //space + this.addCharacter(e.key); + } else if (e.keyCode === 46) { + //del + this.delCharacter(); + } else if (e.keyCode === 8) { + //backspace + this.delCharacter(); + } else { + this.processKeys(e, keys); + } + } + + // 27: "esc", + // 32: "space", + // 33: "pageup", + // 34: "pagedown", + // 35: "end", + // 36: "home", + // 37: "left", + // 38: "up", + // 39: "right", + // 45: "insert", + // 46: "delete", + + processKeys(e: KeyboardEvent, keys: any) { + const select = keys.shift; + switch (e.keyCode) { + case 36: // home + this.cursorStart = 0; + if (!select) this.cursorEnd = this.cursorStart; + break; + case 35: // end + this.cursorEnd = this.text.length; + if (!select) this.cursorStart = this.cursorEnd; + break; + case 37: // left + if (this.cursorStart > 0) { + this.cursorStart -= 1; + if (!select) this.cursorEnd = this.cursorStart; } - ctx.restore(); - - ctx.fillStyle = this.color; - - ctx.fillText(this.text, this.pinX() + left, this.pinY() + top); + break; + case 39: // right + if (this.cursorEnd < this.text.length) { + this.cursorEnd += 1; + if (!select) this.cursorStart = this.cursorEnd; + } + break; + case 13: // return + this.closeEditor(); + break; + case 27: // esc + this.setState(this.initState); + this.closeEditor(); + break; + default: + if (e.key.length === 1) { + this.addCharacter(e.key); + } + break; } + } - // drawSample(ctx) { - // ctx.translate(-10, 25); - // ctx.scale(1.2, 0.8); - // ctx.rotate(5 * Math.PI / 180); - - // var fillText = "fillText"; - // var strokeText = "strokeText"; - - // ctx.textBaseline = "top"; - // ctx.font = "32pt Arial"; - - // ctx.fillStyle = "orange"; // shadow color - // ctx.fillText(fillText, 22, 22); - // ctx.fillStyle = "red"; - // ctx.fillText(fillText, 20, 20); - - // ctx.strokeStyle = "blue"; - // ctx.strokeText(strokeText, 20, 80); - // } - - // //http://tutorials.jenkov.com/html5-canvas/text.html - // /// expand with color, background etc. - // drawTextBG(ctx: CanvasRenderingContext2D, txt: string, font: string, x: number, y: number) { - - // ctx.save(); - - // ctx.font = font; - - // /// draw text from top - makes life easier at the moment - // ctx.textBaseline = 'top'; + public drawIsEditing(ctx: CanvasRenderingContext2D) { + ctx.strokeStyle = 'green'; + ctx.lineWidth = 1; + ctx.beginPath(); + ctx.rect(0, 0, this.width, this.height); + ctx.stroke(); - // /// color for background - // ctx.fillStyle = '#f50'; + this.drawSelect(ctx); + this.showCursor && this.drawCursor(ctx); + this.draw(ctx); + } - // /// get width of text - // var width = ctx.measureText(txt).width; + public drawSelect(ctx: CanvasRenderingContext2D) { + if (this.cursorStart === this.cursorEnd) return; - // /// draw background rect assuming height of font - // ctx.fillRect(x, y, width, parseInt(font, 10)); + const textStart = this.text.substr(0, this.cursorStart); + const start = ctx.measureText(textStart); + const startPos = start.width + ((this.margin && this.margin.width) || 0); - // ctx.fillStyle = '#000'; + const textEnd = this.text.substr(0, this.cursorEnd); + const end = ctx.measureText(textEnd); + const endPos = end.width + ((this.margin && this.margin.width) || 0); - // /// draw text on top - // ctx.fillText(txt, x, y); + ctx.fillStyle = 'yellow'; + ctx.fillRect(startPos, 0, endPos - startPos, this.height); + } - // ctx.restore(); - // } + public drawCursor(ctx: CanvasRenderingContext2D) { + const textStart = this.text.substr(0, this.cursorStart); + const start = ctx.measureText(textStart); + const startPos = start.width + ((this.margin && this.margin.width) || 0); + ctx.fillStyle = 'red'; + ctx.fillRect(startPos, 0, 2, this.height); + } - // drawMultiLineText(ctx: CanvasRenderingContext2D, text: string) { + // drawMultiLineText(ctx: CanvasRenderingContext2D, text: string) { - // //let textMetrics = ctx.measureText(text); + // //let textMetrics = ctx.measureText(text); - // ctx.textAlign = "left" || "right" || "center" || "start" || "end"; + // ctx.textAlign = "left" || "right" || "center" || "start" || "end"; - // ctx.textBaseline = "top" || "hanging" || "middle" || "alphabetic" || "ideographic" || "bottom"; + // ctx.textBaseline = "top" || "hanging" || "middle" || "alphabetic" || "ideographic" || "bottom"; - // ctx.font = '48px serif'; - // ctx.font = "20px Georgia"; - // ctx.font = "italic 10pt Courier"; - // ctx.font = "bold 10pt Courier"; - // ctx.font = "italic bold 10pt Courier"; + // ctx.font = '48px serif'; + // ctx.font = "20px Georgia"; + // ctx.font = "italic 10pt Courier"; + // ctx.font = "bold 10pt Courier"; + // ctx.font = "italic bold 10pt Courier"; - // //http://junerockwell.com/end-of-line-or-line-break-in-html5-canvas/ - // let fontsize = 60; - // let array = text.split('|'); - // let dx = 10; - // let dy = 20; - // for (var i = 0; i < array.length; i++) { - // ctx.fillText(array[i], dx, dy); - // dy += (fontsize + 4); - // } + // //http://junerockwell.com/end-of-line-or-line-break-in-html5-canvas/ + // let fontsize = 60; + // let array = text.split('|'); + // let dx = 10; + // let dy = 20; + // for (var i = 0; i < array.length; i++) { + // ctx.fillText(array[i], dx, dy); + // dy += (fontsize + 4); + // } - // } + // } } import { RuntimeType } from '../foRuntimeType'; RuntimeType.define(foText2D); +RuntimeType.define(foInputText2D); diff --git a/src/app/foundry/shapes/index.ts b/src/app/foundry/shapes/index.ts new file mode 100644 index 0000000..54c1fae --- /dev/null +++ b/src/app/foundry/shapes/index.ts @@ -0,0 +1,20 @@ + +export * from './canvasDriver'; + +export * from './foConnectionPoint2D'; +export * from './foDisplay2D.model'; +export * from './foDocument.model'; +export * from './foGeometry2D'; +export * from './foGlue2D'; +export * from './foLayout2D'; +export * from './foGlyph2D.model'; +export * from './foHandle2D'; +export * from './foImage2D.model'; +export * from './foMatrix2D'; +export * from './foPage.model'; +export * from './foPath2D.model'; +export * from './foPathSVG'; +export * from './foShape1D.model'; +export * from './foShape2D.model'; +export * from './foText2D.model'; + diff --git a/src/app/foundry/solids/foGeometry3D.ts b/src/app/foundry/solids/foGeometry3D.ts index 1ba439e..7b69dba 100644 --- a/src/app/foundry/solids/foGeometry3D.ts +++ b/src/app/foundry/solids/foGeometry3D.ts @@ -47,5 +47,12 @@ export class cPoint3D extends Vector3 implements iPoint3D { let z = (this.z + pt.z) / 2; return new cPoint3D(x, y, z, 'midPoint'); } + + deltaBetween(p: cPoint3D) { + let x = this.x - p.x; + let y = this.y - p.y; + let z = this.z - p.z; + return new cPoint3D(x, y, z, 'delta'); + } } diff --git a/src/app/foundry/solids/foGlyph3D.model.ts b/src/app/foundry/solids/foGlyph3D.model.ts index 3e56389..0403468 100644 --- a/src/app/foundry/solids/foGlyph3D.model.ts +++ b/src/app/foundry/solids/foGlyph3D.model.ts @@ -18,7 +18,7 @@ import { Screen3D } from "./threeDriver"; import { Lifecycle } from '../foLifecycle'; - +export { GlyphDictionary } from '../foGlyph.model' //a Shape is a graphic designed to behave like a visio shape //and have all the same properties diff --git a/src/app/foundry/solids/foHandle3D.ts b/src/app/foundry/solids/foHandle3D.ts index 5c00beb..7b7c702 100644 --- a/src/app/foundry/solids/foHandle3D.ts +++ b/src/app/foundry/solids/foHandle3D.ts @@ -130,7 +130,7 @@ export class foHandle3D extends foHandle { let point = target.getGlobalPosition(); let center = this.getGlobalPosition(); - let distance = point.distanceTo(center); + let distance = Math.sqrt(point.distanceToSquared(center)); let dist = point.add(center.negate()); if (distance > 1) { parent.setGlobalPosition(dist); diff --git a/src/app/foundry/solids/foStage.model.ts b/src/app/foundry/solids/foStage.model.ts index 52aeeb6..25d1658 100644 --- a/src/app/foundry/solids/foStage.model.ts +++ b/src/app/foundry/solids/foStage.model.ts @@ -6,13 +6,14 @@ import { Screen3D } from "./threeDriver"; import { foObject } from '../foObject.model' import { foCollection } from '../foCollection.model' -import { foDictionary } from "../foDictionary.model"; +import { foGlyph } from "../foGlyph.model"; +import { WhereClause } from "../foInterface"; import { foNode } from '../foNode.model' import { foComponent } from '../foComponent.model' -import { foGlyph3D } from './foGlyph3D.model' +import { foGlyph3D, GlyphDictionary } from './foGlyph3D.model' import { Lifecycle } from '../foLifecycle'; @@ -73,8 +74,10 @@ export class foStage extends foGlyph3D { - _dictionary: foDictionary = new foDictionary(); - + _dictionary: GlyphDictionary = new GlyphDictionary(); + selectGlyph(where: WhereClause, list?: foCollection, deep: boolean = true): foCollection { + return this._dictionary.selectGlyph(where,list,deep); + } constructor(properties?: any, subcomponents?: Array, parent?: foObject) { super(properties, subcomponents, parent); diff --git a/src/app/foundry/solids/foStudio.model.ts b/src/app/foundry/solids/foStudio.model.ts index 1f5cdb1..99230e8 100644 --- a/src/app/foundry/solids/foStudio.model.ts +++ b/src/app/foundry/solids/foStudio.model.ts @@ -69,5 +69,5 @@ export class foStudio extends foNode { } import { RuntimeType } from '../foRuntimeType'; -import { Lifecycle } from 'app/foundry/foLifecycle'; +import { Lifecycle } from '../foLifecycle'; RuntimeType.define(foStudio); \ No newline at end of file diff --git a/src/app/foundry/solids/index.ts b/src/app/foundry/solids/index.ts new file mode 100644 index 0000000..bde737b --- /dev/null +++ b/src/app/foundry/solids/index.ts @@ -0,0 +1,17 @@ + +export * from './threeDriver'; + +export * from './foConnectionPoint3D'; +export * from './foBody.model'; +export * from './foPin3D'; +export * from './foGeometry3D'; +export * from './foGlue3D'; +export * from './foGlyph3D.model'; +export * from './foHandle3D'; +export * from './foImage3D.model'; +export * from './foStudio.model'; +export * from './foStage.model'; +export * from './foPipe3D.model'; +export * from './foShape3D.model'; +export * from './foText3D.model'; + diff --git a/src/app/foundryDrivers/keypress.js b/src/app/foundryDrivers/keypress.js new file mode 100644 index 0000000..0ba60ea --- /dev/null +++ b/src/app/foundryDrivers/keypress.js @@ -0,0 +1,1155 @@ +// Generated by CoffeeScript 1.8.0 + +/* +Copyright 2014 David Mauro + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Keypress is a robust keyboard input capturing Javascript utility +focused on input for games. + +version 2.1.5 + */ + + +/* +Combo options available and their defaults: + keys : [] - An array of the keys pressed together to activate combo. + count : 0 - The number of times a counting combo has been pressed. Reset on release. + is_unordered : false - Unless this is set to true, the keys can be pressed down in any order. + is_counting : false - Makes this a counting combo (see documentation). + is_exclusive : false - This combo will replace other exclusive combos when true. + is_solitary : false - This combo will only fire if ONLY it's keys are pressed down. + is_sequence : false - Rather than a key combo, this is an ordered key sequence. + prevent_default : false - Prevent default behavior for all component key keypresses. + prevent_repeat : false - Prevent the combo from repeating when keydown is held. + normalize_caps_lock : false - Do not allow turning caps lock on to prevent combos from being activated. + on_keydown : null - A function that is called when the combo is pressed. + on_keyup : null - A function that is called when the combo is released. + on_release : null - A function that is called when all keys in the combo are released. + this : undefined - Defines the scope for your callback functions. + */ + +(function() { + var Combo, keypress, _change_keycodes_by_browser, _compare_arrays, _compare_arrays_sorted, _convert_key_to_readable, _convert_to_shifted_key, _decide_meta_key, _factory_defaults, _filter_array, _index_of_in_array, _is_array_in_array, _is_array_in_array_sorted, _key_is_valid, _keycode_alternate_names, _keycode_dictionary, _keycode_shifted_keys, _log_error, _metakey, _modifier_event_mapping, _modifier_keys, _validate_combo, + __hasProp = {}.hasOwnProperty, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + _factory_defaults = { + is_unordered: false, + is_counting: false, + is_exclusive: false, + is_solitary: false, + prevent_default: false, + prevent_repeat: false, + normalize_caps_lock: false + }; + + _modifier_keys = ["meta", "alt", "option", "ctrl", "shift", "cmd"]; + + _metakey = "ctrl"; + + keypress = {}; + + keypress.debug = false; + + Combo = (function() { + function Combo(dictionary) { + var property, value; + for (property in dictionary) { + if (!__hasProp.call(dictionary, property)) continue; + value = dictionary[property]; + if (value !== false) { + this[property] = value; + } + } + this.keys = this.keys || []; + this.count = this.count || 0; + } + + Combo.prototype.allows_key_repeat = function() { + return !this.prevent_repeat && typeof this.on_keydown === "function"; + }; + + Combo.prototype.reset = function() { + this.count = 0; + return this.keyup_fired = null; + }; + + return Combo; + + })(); + + keypress.Listener = (function() { + function Listener(element, defaults) { + var attach_handler, property, value; + if ((typeof jQuery !== "undefined" && jQuery !== null) && element instanceof jQuery) { + if (element.length !== 1) { + _log_error("Warning: your jQuery selector should have exactly one object."); + } + element = element[0]; + } + this.should_suppress_event_defaults = false; + this.should_force_event_defaults = false; + this.sequence_delay = 800; + this._registered_combos = []; + this._keys_down = []; + this._active_combos = []; + this._sequence = []; + this._sequence_timer = null; + this._prevent_capture = false; + this._defaults = defaults || {}; + for (property in _factory_defaults) { + if (!__hasProp.call(_factory_defaults, property)) continue; + value = _factory_defaults[property]; + this._defaults[property] = this._defaults[property] || value; + } + this.element = element || document.body; + attach_handler = function(target, event, handler) { + if (target.addEventListener) { + target.addEventListener(event, handler); + } else if (target.attachEvent) { + target.attachEvent("on" + event, handler); + } + return handler; + }; + this.keydown_event = attach_handler(this.element, "keydown", (function(_this) { + return function(e) { + e = e || window.event; + _this._receive_input(e, true); + return _this._bug_catcher(e); + }; + })(this)); + this.keyup_event = attach_handler(this.element, "keyup", (function(_this) { + return function(e) { + e = e || window.event; + return _this._receive_input(e, false); + }; + })(this)); + this.blur_event = attach_handler(window, "blur", (function(_this) { + return function() { + var key, _i, _len, _ref; + _ref = _this._keys_down; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + key = _ref[_i]; + _this._key_up(key, {}); + } + return _this._keys_down = []; + }; + })(this)); + } + + Listener.prototype.destroy = function() { + var remove_handler; + remove_handler = function(target, event, handler) { + if (target.removeEventListener != null) { + return target.removeEventListener(event, handler); + } else if (target.removeEvent != null) { + return target.removeEvent("on" + event, handler); + } + }; + remove_handler(this.element, "keydown", this.keydown_event); + remove_handler(this.element, "keyup", this.keyup_event); + return remove_handler(window, "blur", this.blur_event); + }; + + Listener.prototype._bug_catcher = function(e) { + var _ref, _ref1; + if (_metakey === "cmd" && __indexOf.call(this._keys_down, "cmd") >= 0 && ((_ref = _convert_key_to_readable((_ref1 = e.keyCode) != null ? _ref1 : e.key)) !== "cmd" && _ref !== "shift" && _ref !== "alt" && _ref !== "caps" && _ref !== "tab")) { + return this._receive_input(e, false); + } + }; + + Listener.prototype._cmd_bug_check = function(combo_keys) { + if (_metakey === "cmd" && __indexOf.call(this._keys_down, "cmd") >= 0 && __indexOf.call(combo_keys, "cmd") < 0) { + return false; + } + return true; + }; + + Listener.prototype._prevent_default = function(e, should_prevent) { + if ((should_prevent || this.should_suppress_event_defaults) && !this.should_force_event_defaults) { + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + if (e.stopPropagation) { + return e.stopPropagation(); + } + } + }; + + Listener.prototype._get_active_combos = function(key) { + var active_combos, keys_down; + active_combos = []; + keys_down = _filter_array(this._keys_down, function(down_key) { + return down_key !== key; + }); + keys_down.push(key); + this._match_combo_arrays(keys_down, (function(_this) { + return function(match) { + if (_this._cmd_bug_check(match.keys)) { + return active_combos.push(match); + } + }; + })(this)); + this._fuzzy_match_combo_arrays(keys_down, (function(_this) { + return function(match) { + if (__indexOf.call(active_combos, match) >= 0) { + return; + } + if (!(match.is_solitary || !_this._cmd_bug_check(match.keys))) { + return active_combos.push(match); + } + }; + })(this)); + return active_combos; + }; + + Listener.prototype._get_potential_combos = function(key) { + var combo, potentials, _i, _len, _ref; + potentials = []; + _ref = this._registered_combos; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + combo = _ref[_i]; + if (combo.is_sequence) { + continue; + } + if (__indexOf.call(combo.keys, key) >= 0 && this._cmd_bug_check(combo.keys)) { + potentials.push(combo); + } + } + return potentials; + }; + + Listener.prototype._add_to_active_combos = function(combo) { + var active_combo, active_key, active_keys, already_replaced, combo_key, i, should_prepend, should_replace, _i, _j, _k, _len, _len1, _ref, _ref1; + should_replace = false; + should_prepend = true; + already_replaced = false; + if (__indexOf.call(this._active_combos, combo) >= 0) { + return true; + } else if (this._active_combos.length) { + for (i = _i = 0, _ref = this._active_combos.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + active_combo = this._active_combos[i]; + if (!(active_combo && active_combo.is_exclusive && combo.is_exclusive)) { + continue; + } + active_keys = active_combo.keys; + if (!should_replace) { + for (_j = 0, _len = active_keys.length; _j < _len; _j++) { + active_key = active_keys[_j]; + should_replace = true; + if (__indexOf.call(combo.keys, active_key) < 0) { + should_replace = false; + break; + } + } + } + if (should_prepend && !should_replace) { + _ref1 = combo.keys; + for (_k = 0, _len1 = _ref1.length; _k < _len1; _k++) { + combo_key = _ref1[_k]; + should_prepend = false; + if (__indexOf.call(active_keys, combo_key) < 0) { + should_prepend = true; + break; + } + } + } + if (should_replace) { + if (already_replaced) { + active_combo = this._active_combos.splice(i, 1)[0]; + if (active_combo != null) { + active_combo.reset(); + } + } else { + active_combo = this._active_combos.splice(i, 1, combo)[0]; + if (active_combo != null) { + active_combo.reset(); + } + already_replaced = true; + } + should_prepend = false; + } + } + } + if (should_prepend) { + this._active_combos.unshift(combo); + } + return should_replace || should_prepend; + }; + + Listener.prototype._remove_from_active_combos = function(combo) { + var active_combo, i, _i, _ref; + for (i = _i = 0, _ref = this._active_combos.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + active_combo = this._active_combos[i]; + if (active_combo === combo) { + combo = this._active_combos.splice(i, 1)[0]; + combo.reset(); + break; + } + } + }; + + Listener.prototype._get_possible_sequences = function() { + var combo, i, j, match, matches, sequence, _i, _j, _k, _len, _ref, _ref1, _ref2; + matches = []; + _ref = this._registered_combos; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + combo = _ref[_i]; + for (j = _j = 1, _ref1 = this._sequence.length; 1 <= _ref1 ? _j <= _ref1 : _j >= _ref1; j = 1 <= _ref1 ? ++_j : --_j) { + sequence = this._sequence.slice(-j); + if (!combo.is_sequence) { + continue; + } + if (__indexOf.call(combo.keys, "shift") < 0) { + sequence = _filter_array(sequence, function(key) { + return key !== "shift"; + }); + if (!sequence.length) { + continue; + } + } + for (i = _k = 0, _ref2 = sequence.length; 0 <= _ref2 ? _k < _ref2 : _k > _ref2; i = 0 <= _ref2 ? ++_k : --_k) { + if (combo.keys[i] === sequence[i]) { + match = true; + } else { + match = false; + break; + } + } + if (match) { + matches.push(combo); + } + } + } + return matches; + }; + + Listener.prototype._add_key_to_sequence = function(key, e) { + var combo, sequence_combos, _i, _len; + this._sequence.push(key); + sequence_combos = this._get_possible_sequences(); + if (sequence_combos.length) { + for (_i = 0, _len = sequence_combos.length; _i < _len; _i++) { + combo = sequence_combos[_i]; + this._prevent_default(e, combo.prevent_default); + } + if (this._sequence_timer) { + clearTimeout(this._sequence_timer); + } + if (this.sequence_delay > -1) { + this._sequence_timer = setTimeout((function(_this) { + return function() { + return _this._sequence = []; + }; + })(this), this.sequence_delay); + } + } else { + this._sequence = []; + } + }; + + Listener.prototype._get_sequence = function(key) { + var combo, i, j, match, seq_key, sequence, _i, _j, _k, _len, _ref, _ref1, _ref2; + _ref = this._registered_combos; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + combo = _ref[_i]; + if (!combo.is_sequence) { + continue; + } + for (j = _j = 1, _ref1 = this._sequence.length; 1 <= _ref1 ? _j <= _ref1 : _j >= _ref1; j = 1 <= _ref1 ? ++_j : --_j) { + sequence = (_filter_array(this._sequence, function(seq_key) { + if (__indexOf.call(combo.keys, "shift") >= 0) { + return true; + } + return seq_key !== "shift"; + })).slice(-j); + if (combo.keys.length !== sequence.length) { + continue; + } + for (i = _k = 0, _ref2 = sequence.length; 0 <= _ref2 ? _k < _ref2 : _k > _ref2; i = 0 <= _ref2 ? ++_k : --_k) { + seq_key = sequence[i]; + if (__indexOf.call(combo.keys, "shift") < 0) { + if (seq_key === "shift") { + continue; + } + } + if (key === "shift" && __indexOf.call(combo.keys, "shift") < 0) { + continue; + } + if (combo.keys[i] === seq_key) { + match = true; + } else { + match = false; + break; + } + } + } + if (match) { + if (combo.is_exclusive) { + this._sequence = []; + } + return combo; + } + } + return false; + }; + + Listener.prototype._receive_input = function(e, is_keydown) { + var key, _ref; + if (this._prevent_capture) { + if (this._keys_down.length) { + this._keys_down = []; + } + return; + } + key = _convert_key_to_readable((_ref = e.keyCode) != null ? _ref : e.key); + if (!is_keydown && !this._keys_down.length && (key === "alt" || key === _metakey)) { + return; + } + if (!key) { + return; + } + if (is_keydown) { + return this._key_down(key, e); + } else { + return this._key_up(key, e); + } + }; + + Listener.prototype._fire = function(event, combo, key_event, is_autorepeat) { + if (typeof combo["on_" + event] === "function") { + this._prevent_default(key_event, combo["on_" + event].call(combo["this"], key_event, combo.count, is_autorepeat) !== true); + } + if (event === "release") { + combo.count = 0; + } + if (event === "keyup") { + return combo.keyup_fired = true; + } + }; + + Listener.prototype._match_combo_arrays = function(potential_match, match_handler) { + var combo_potential_match, source_combo, _i, _len, _ref; + _ref = this._registered_combos; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + source_combo = _ref[_i]; + combo_potential_match = potential_match.slice(0); + if (source_combo.normalize_caps_lock && __indexOf.call(combo_potential_match, "caps") >= 0) { + combo_potential_match.splice(combo_potential_match.indexOf("caps"), 1); + } + if ((!source_combo.is_unordered && _compare_arrays_sorted(combo_potential_match, source_combo.keys)) || (source_combo.is_unordered && _compare_arrays(combo_potential_match, source_combo.keys))) { + match_handler(source_combo); + } + } + }; + + Listener.prototype._fuzzy_match_combo_arrays = function(potential_match, match_handler) { + var source_combo, _i, _len, _ref; + _ref = this._registered_combos; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + source_combo = _ref[_i]; + if ((!source_combo.is_unordered && _is_array_in_array_sorted(source_combo.keys, potential_match)) || (source_combo.is_unordered && _is_array_in_array(source_combo.keys, potential_match))) { + match_handler(source_combo); + } + } + }; + + Listener.prototype._keys_remain = function(combo) { + var key, keys_remain, _i, _len, _ref; + _ref = combo.keys; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + key = _ref[_i]; + if (__indexOf.call(this._keys_down, key) >= 0) { + keys_remain = true; + break; + } + } + return keys_remain; + }; + + Listener.prototype._key_down = function(key, e) { + var combo, combos, event_mod, i, mod, potential, potential_combos, sequence_combo, shifted_key, _i, _j, _k, _len, _len1, _ref; + shifted_key = _convert_to_shifted_key(key, e); + if (shifted_key) { + key = shifted_key; + } + this._add_key_to_sequence(key, e); + sequence_combo = this._get_sequence(key); + if (sequence_combo) { + this._fire("keydown", sequence_combo, e); + } + for (mod in _modifier_event_mapping) { + event_mod = _modifier_event_mapping[mod]; + if (!e[event_mod]) { + continue; + } + if (mod === key || __indexOf.call(this._keys_down, mod) >= 0) { + continue; + } + this._keys_down.push(mod); + } + for (mod in _modifier_event_mapping) { + event_mod = _modifier_event_mapping[mod]; + if (mod === key) { + continue; + } + if (__indexOf.call(this._keys_down, mod) >= 0 && !e[event_mod]) { + if (mod === "cmd" && _metakey !== "cmd") { + continue; + } + for (i = _i = 0, _ref = this._keys_down.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if (this._keys_down[i] === mod) { + this._keys_down.splice(i, 1); + } + } + } + } + combos = this._get_active_combos(key); + potential_combos = this._get_potential_combos(key); + for (_j = 0, _len = combos.length; _j < _len; _j++) { + combo = combos[_j]; + this._handle_combo_down(combo, potential_combos, key, e); + } + if (potential_combos.length) { + for (_k = 0, _len1 = potential_combos.length; _k < _len1; _k++) { + potential = potential_combos[_k]; + this._prevent_default(e, potential.prevent_default); + } + } + if (__indexOf.call(this._keys_down, key) < 0) { + this._keys_down.push(key); + } + }; + + Listener.prototype._handle_combo_down = function(combo, potential_combos, key, e) { + var is_autorepeat, is_other_exclusive, potential_combo, result, _i, _len; + if (__indexOf.call(combo.keys, key) < 0) { + return false; + } + this._prevent_default(e, combo && combo.prevent_default); + is_autorepeat = false; + if (__indexOf.call(this._keys_down, key) >= 0) { + is_autorepeat = true; + if (!combo.allows_key_repeat()) { + return false; + } + } + result = this._add_to_active_combos(combo, key); + combo.keyup_fired = false; + is_other_exclusive = false; + if (combo.is_exclusive) { + for (_i = 0, _len = potential_combos.length; _i < _len; _i++) { + potential_combo = potential_combos[_i]; + if (potential_combo.is_exclusive && potential_combo.keys.length > combo.keys.length) { + is_other_exclusive = true; + break; + } + } + } + if (!is_other_exclusive) { + if (combo.is_counting && typeof combo.on_keydown === "function") { + combo.count += 1; + } + if (result) { + return this._fire("keydown", combo, e, is_autorepeat); + } + } + }; + + Listener.prototype._key_up = function(key, e) { + var active_combo, active_combos_length, combo, combos, i, sequence_combo, shifted_key, unshifted_key, _i, _j, _k, _l, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; + unshifted_key = key; + shifted_key = _convert_to_shifted_key(key, e); + if (shifted_key) { + key = shifted_key; + } + shifted_key = _keycode_shifted_keys[unshifted_key]; + if (e.shiftKey) { + if (!(shifted_key && __indexOf.call(this._keys_down, shifted_key) >= 0)) { + key = unshifted_key; + } + } else { + if (!(unshifted_key && __indexOf.call(this._keys_down, unshifted_key) >= 0)) { + key = shifted_key; + } + } + sequence_combo = this._get_sequence(key); + if (sequence_combo) { + this._fire("keyup", sequence_combo, e); + } + if (__indexOf.call(this._keys_down, key) < 0) { + return false; + } + for (i = _i = 0, _ref = this._keys_down.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if ((_ref1 = this._keys_down[i]) === key || _ref1 === shifted_key || _ref1 === unshifted_key) { + this._keys_down.splice(i, 1); + break; + } + } + active_combos_length = this._active_combos.length; + combos = []; + _ref2 = this._active_combos; + for (_j = 0, _len = _ref2.length; _j < _len; _j++) { + active_combo = _ref2[_j]; + if (__indexOf.call(active_combo.keys, key) >= 0) { + combos.push(active_combo); + } + } + for (_k = 0, _len1 = combos.length; _k < _len1; _k++) { + combo = combos[_k]; + this._handle_combo_up(combo, e, key); + } + if (active_combos_length > 1) { + _ref3 = this._active_combos; + for (_l = 0, _len2 = _ref3.length; _l < _len2; _l++) { + active_combo = _ref3[_l]; + if (active_combo === void 0 || __indexOf.call(combos, active_combo) >= 0) { + continue; + } + if (!this._keys_remain(active_combo)) { + this._remove_from_active_combos(active_combo); + } + } + } + }; + + Listener.prototype._handle_combo_up = function(combo, e, key) { + var keys_down, keys_remaining; + this._prevent_default(e, combo && combo.prevent_default); + keys_remaining = this._keys_remain(combo); + if (!combo.keyup_fired) { + keys_down = this._keys_down.slice(); + keys_down.push(key); + if (!combo.is_solitary || _compare_arrays(keys_down, combo.keys)) { + this._fire("keyup", combo, e); + if (combo.is_counting && typeof combo.on_keyup === "function" && typeof combo.on_keydown !== "function") { + combo.count += 1; + } + } + } + if (!keys_remaining) { + this._fire("release", combo, e); + this._remove_from_active_combos(combo); + } + }; + + Listener.prototype.simple_combo = function(keys, callback) { + return this.register_combo({ + keys: keys, + on_keydown: callback + }); + }; + + Listener.prototype.counting_combo = function(keys, count_callback) { + return this.register_combo({ + keys: keys, + is_counting: true, + is_unordered: false, + on_keydown: count_callback + }); + }; + + Listener.prototype.sequence_combo = function(keys, callback) { + return this.register_combo({ + keys: keys, + on_keydown: callback, + is_sequence: true, + is_exclusive: true + }); + }; + + Listener.prototype.register_combo = function(combo_dictionary) { + var combo, property, value, _ref; + if (typeof combo_dictionary["keys"] === "string") { + combo_dictionary["keys"] = combo_dictionary["keys"].split(" "); + } + _ref = this._defaults; + for (property in _ref) { + if (!__hasProp.call(_ref, property)) continue; + value = _ref[property]; + if (combo_dictionary[property] === void 0) { + combo_dictionary[property] = value; + } + } + combo = new Combo(combo_dictionary); + if (_validate_combo(combo)) { + this._registered_combos.push(combo); + return combo; + } + }; + + Listener.prototype.register_many = function(combo_array) { + var combo, _i, _len, _results; + _results = []; + for (_i = 0, _len = combo_array.length; _i < _len; _i++) { + combo = combo_array[_i]; + _results.push(this.register_combo(combo)); + } + return _results; + }; + + Listener.prototype.unregister_combo = function(keys_or_combo) { + var combo, i, unregister_combo, _i, _j, _len, _ref, _ref1, _results; + if (!keys_or_combo) { + return false; + } + unregister_combo = (function(_this) { + return function(combo) { + var i, _i, _ref, _results; + _results = []; + for (i = _i = 0, _ref = _this._registered_combos.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if (combo === _this._registered_combos[i]) { + _this._registered_combos.splice(i, 1); + break; + } else { + _results.push(void 0); + } + } + return _results; + }; + })(this); + if (keys_or_combo instanceof Combo) { + return unregister_combo(keys_or_combo); + } else { + if (typeof keys_or_combo === "string") { + keys_or_combo = keys_or_combo.split(" "); + for (i = _i = 0, _ref = keys_or_combo.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if (keys_or_combo[i] === "meta") { + keys_or_combo[i] = _metakey; + } + } + } + _ref1 = this._registered_combos; + _results = []; + for (_j = 0, _len = _ref1.length; _j < _len; _j++) { + combo = _ref1[_j]; + if (combo == null) { + continue; + } + if ((combo.is_unordered && _compare_arrays(keys_or_combo, combo.keys)) || (!combo.is_unordered && _compare_arrays_sorted(keys_or_combo, combo.keys))) { + _results.push(unregister_combo(combo)); + } else { + _results.push(void 0); + } + } + return _results; + } + }; + + Listener.prototype.unregister_many = function(combo_array) { + var combo, _i, _len, _results; + _results = []; + for (_i = 0, _len = combo_array.length; _i < _len; _i++) { + combo = combo_array[_i]; + _results.push(this.unregister_combo(combo)); + } + return _results; + }; + + Listener.prototype.get_registered_combos = function() { + return this._registered_combos; + }; + + Listener.prototype.reset = function() { + return this._registered_combos = []; + }; + + Listener.prototype.listen = function() { + return this._prevent_capture = false; + }; + + Listener.prototype.stop_listening = function() { + return this._prevent_capture = true; + }; + + Listener.prototype.get_meta_key = function() { + return _metakey; + }; + + return Listener; + + })(); + + _decide_meta_key = function() { + if (navigator.userAgent.indexOf("Mac OS X") !== -1) { + _metakey = "cmd"; + } + }; + + _change_keycodes_by_browser = function() { + if (navigator.userAgent.indexOf("Opera") !== -1) { + _keycode_dictionary["17"] = "cmd"; + } + }; + + _convert_key_to_readable = function(k) { + return _keycode_dictionary[k]; + }; + + _filter_array = function(array, callback) { + var element; + if (array.filter) { + return array.filter(callback); + } else { + return (function() { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = array.length; _i < _len; _i++) { + element = array[_i]; + if (callback(element)) { + _results.push(element); + } + } + return _results; + })(); + } + }; + + _compare_arrays = function(a1, a2) { + var item, _i, _len; + if (a1.length !== a2.length) { + return false; + } + for (_i = 0, _len = a1.length; _i < _len; _i++) { + item = a1[_i]; + if (__indexOf.call(a2, item) >= 0) { + continue; + } + return false; + } + return true; + }; + + _compare_arrays_sorted = function(a1, a2) { + var i, _i, _ref; + if (a1.length !== a2.length) { + return false; + } + for (i = _i = 0, _ref = a1.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if (a1[i] !== a2[i]) { + return false; + } + } + return true; + }; + + _is_array_in_array = function(a1, a2) { + var item, _i, _len; + for (_i = 0, _len = a1.length; _i < _len; _i++) { + item = a1[_i]; + if (__indexOf.call(a2, item) < 0) { + return false; + } + } + return true; + }; + + _index_of_in_array = Array.prototype.indexOf || function(a, item) { + var i, _i, _ref; + for (i = _i = 0, _ref = a.length; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) { + if (a[i] === item) { + return i; + } + } + return -1; + }; + + _is_array_in_array_sorted = function(a1, a2) { + var index, item, prev, _i, _len; + prev = 0; + for (_i = 0, _len = a1.length; _i < _len; _i++) { + item = a1[_i]; + index = _index_of_in_array.call(a2, item); + if (index >= prev) { + prev = index; + } else { + return false; + } + } + return true; + }; + + _log_error = function() { + if (keypress.debug) { + return console.log.apply(console, arguments); + } + }; + + _key_is_valid = function(key) { + var valid, valid_key, _; + valid = false; + for (_ in _keycode_dictionary) { + valid_key = _keycode_dictionary[_]; + if (key === valid_key) { + valid = true; + break; + } + } + if (!valid) { + for (_ in _keycode_shifted_keys) { + valid_key = _keycode_shifted_keys[_]; + if (key === valid_key) { + valid = true; + break; + } + } + } + return valid; + }; + + _validate_combo = function(combo) { + var alt_name, i, key, mod_key, non_modifier_keys, property, validated, value, _i, _j, _k, _len, _len1, _ref, _ref1; + validated = true; + if (!combo.keys.length) { + _log_error("You're trying to bind a combo with no keys:", combo); + } + for (i = _i = 0, _ref = combo.keys.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + key = combo.keys[i]; + alt_name = _keycode_alternate_names[key]; + if (alt_name) { + key = combo.keys[i] = alt_name; + } + if (key === "meta") { + combo.keys.splice(i, 1, _metakey); + } + if (key === "cmd") { + _log_error("Warning: use the \"meta\" key rather than \"cmd\" for Windows compatibility"); + } + } + _ref1 = combo.keys; + for (_j = 0, _len = _ref1.length; _j < _len; _j++) { + key = _ref1[_j]; + if (!_key_is_valid(key)) { + _log_error("Do not recognize the key \"" + key + "\""); + validated = false; + } + } + if (__indexOf.call(combo.keys, "meta") >= 0 || __indexOf.call(combo.keys, "cmd") >= 0) { + non_modifier_keys = combo.keys.slice(); + for (_k = 0, _len1 = _modifier_keys.length; _k < _len1; _k++) { + mod_key = _modifier_keys[_k]; + if ((i = _index_of_in_array.call(non_modifier_keys, mod_key)) > -1) { + non_modifier_keys.splice(i, 1); + } + } + if (non_modifier_keys.length > 1) { + _log_error("META and CMD key combos cannot have more than 1 non-modifier keys", combo, non_modifier_keys); + validated = false; + } + } + for (property in combo) { + value = combo[property]; + if (_factory_defaults[property] === "undefined") { + _log_error("The property " + property + " is not a valid combo property. Your combo has still been registered."); + } + } + return validated; + }; + + _convert_to_shifted_key = function(key, e) { + var k; + if (!e.shiftKey) { + return false; + } + k = _keycode_shifted_keys[key]; + if (k != null) { + return k; + } + return false; + }; + + _modifier_event_mapping = { + "cmd": "metaKey", + "ctrl": "ctrlKey", + "shift": "shiftKey", + "alt": "altKey" + }; + + _keycode_alternate_names = { + "escape": "esc", + "control": "ctrl", + "command": "cmd", + "break": "pause", + "windows": "cmd", + "option": "alt", + "caps_lock": "caps", + "apostrophe": "\'", + "semicolon": ";", + "tilde": "~", + "accent": "`", + "scroll_lock": "scroll", + "num_lock": "num" + }; + + _keycode_shifted_keys = { + "/": "?", + ".": ">", + ",": "<", + "\'": "\"", + ";": ":", + "[": "{", + "]": "}", + "\\": "|", + "`": "~", + "=": "+", + "-": "_", + "1": "!", + "2": "@", + "3": "#", + "4": "$", + "5": "%", + "6": "^", + "7": "&", + "8": "*", + "9": "(", + "0": ")" + }; + + _keycode_dictionary = { + 0: "\\", + 8: "backspace", + 9: "tab", + 12: "num", + 13: "enter", + 16: "shift", + 17: "ctrl", + 18: "alt", + 19: "pause", + 20: "caps", + 27: "esc", + 32: "space", + 33: "pageup", + 34: "pagedown", + 35: "end", + 36: "home", + 37: "left", + 38: "up", + 39: "right", + 40: "down", + 44: "print", + 45: "insert", + 46: "delete", + 48: "0", + 49: "1", + 50: "2", + 51: "3", + 52: "4", + 53: "5", + 54: "6", + 55: "7", + 56: "8", + 57: "9", + 65: "a", + 66: "b", + 67: "c", + 68: "d", + 69: "e", + 70: "f", + 71: "g", + 72: "h", + 73: "i", + 74: "j", + 75: "k", + 76: "l", + 77: "m", + 78: "n", + 79: "o", + 80: "p", + 81: "q", + 82: "r", + 83: "s", + 84: "t", + 85: "u", + 86: "v", + 87: "w", + 88: "x", + 89: "y", + 90: "z", + 91: "cmd", + 92: "cmd", + 93: "cmd", + 96: "num_0", + 97: "num_1", + 98: "num_2", + 99: "num_3", + 100: "num_4", + 101: "num_5", + 102: "num_6", + 103: "num_7", + 104: "num_8", + 105: "num_9", + 106: "num_multiply", + 107: "num_add", + 108: "num_enter", + 109: "num_subtract", + 110: "num_decimal", + 111: "num_divide", + 112: "f1", + 113: "f2", + 114: "f3", + 115: "f4", + 116: "f5", + 117: "f6", + 118: "f7", + 119: "f8", + 120: "f9", + 121: "f10", + 122: "f11", + 123: "f12", + 124: "print", + 144: "num", + 145: "scroll", + 186: ";", + 187: "=", + 188: ",", + 189: "-", + 190: ".", + 191: "/", + 192: "`", + 219: "[", + 220: "\\", + 221: "]", + 222: "\'", + 223: "`", + 224: "cmd", + 225: "alt", + 57392: "ctrl", + 63289: "num", + 59: ";", + 61: "=", + 173: "-" + }; + + keypress._keycode_dictionary = _keycode_dictionary; + + keypress._is_array_in_array_sorted = _is_array_in_array_sorted; + + _decide_meta_key(); + + _change_keycodes_by_browser(); + + if (typeof define === "function" && define.amd) { + define([], function() { + return keypress; + }); + } else if (typeof exports !== "undefined" && exports !== null) { + exports.keypress = keypress; + } else { + window.keypress = keypress; + } + + }).call(this); \ No newline at end of file diff --git a/src/app/specs/AATestTemplate.spec.ts b/src/app/specs/AATestTemplate.spec.ts deleted file mode 100644 index 13905cb..0000000 --- a/src/app/specs/AATestTemplate.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ - -import { Tools } from '../foundry/foTools' -import { foComponent } from '../foundry/foComponent.model' - -// describe("Foundry: Test Template", function () { -// var obj; - -// beforeEach(function () { -// obj = fo.makeComponent({}); -// return obj; -// }); - -// it("should be a component", function () { -// expect(fo.utils.isaComponent(obj)).toBe(true); - -// expect(obj.myName).toBeUndefined(); -// expect(obj.myParent).toBeUndefined(); - -// expect(obj.Properties.isEmpty()).toBe(true); -// expect(obj.Properties.count).toEqual(0); - -// expect(obj.Subcomponents.isEmpty()).toBe(true); -// expect(obj.Subcomponents.count).toEqual(0); -// }); - -// }); \ No newline at end of file diff --git a/src/app/specs/ArrayTest.js b/src/app/specs/ArrayTest.js deleted file mode 100644 index 9e9ee76..0000000 --- a/src/app/specs/ArrayTest.js +++ /dev/null @@ -1,91 +0,0 @@ -import { Tools } from '../foundry/foTools'; -import { foComponent } from '../foundry/foComponent.model'; - -describe("Foundry: Array as a property", () => { - let obj; - - beforeEach(function () { - var x = { - items: [1, 2, 3, 4, 5], - stringItems: ['washington', 'bush', 'addams', 'jefferson', 'bush' ] - }; - obj = new foComponent(x); - return obj; - }); - - - it("have managed items list", function () { - expect(obj.items).toBeDefined(); - expect(obj.items.isEmpty()).toBe(false); - expect(obj.items.length).toEqual(5); - - expect(Tools.isArray(obj.items)).toBe(true); - }); - - it("can map", function () { - var list = obj.items.map(function (item) { - return item + 1; - }); - - expect(list.count).toBeUndefined(); - expect(list.length).toEqual(5); - }); - - it("can reduce", function () { - var result = obj.items.reduce(function (a, b) { - return a += b; - }, 0); - - expect(result).toEqual(15); - expect(obj.items.length).toEqual(5); - }); - - it("should be able to compute min", function () { - expect(obj.items.min()).toEqual(1); - }); - - it("should be able to compute max", function () { - expect(obj.items.max()).toEqual(5); - }); - - it("should be able to find index of first", function () { - var index = obj.items.indexOfFirst(function (item) { - return item == 3; - }); - - expect(index).toEqual(2); - - var index = obj.stringItems.indexOfFirst(function (item) { - return item == 'bush'; - }); - - expect(index).toEqual(1); - - }); - - it("should be able to find itemByIndex", function () { - expect(obj.items.itemByIndex(2)).toEqual(3); - expect(obj.stringItems.itemByIndex(2)).toEqual('addams'); - - expect(obj.stringItems.itemByIndex(12)).toBeUndefined(); - expect(obj.stringItems.itemByIndex(-2)).toBeUndefined(); - }); - - it("should be able to compute distinctItems", function () { - expect(obj.items.distinctItems().length).toEqual(5); - expect(obj.stringItems.distinctItems().length).toEqual(4); - }); - - it("should be able to addNoDupe", function () { - expect(obj.items.distinctItems().length).toEqual(5); - - obj.items.addNoDupe(4) - expect(obj.items.length).toEqual(5); - - obj.items.addNoDupe(40) - expect(obj.items.length).toEqual(6); - - obj.items.addNoDupe(3) - expect(obj.items.length).toEqual(6); - }); -}); \ No newline at end of file diff --git a/src/app/specs/ArrayTest.spec.ts b/src/app/specs/ArrayTest.spec.ts new file mode 100644 index 0000000..bbd5b1c --- /dev/null +++ b/src/app/specs/ArrayTest.spec.ts @@ -0,0 +1,92 @@ +import { Tools } from '../foundry/foTools'; +import { foComponent } from '../foundry/foComponent.model'; + +describe("Foundry: Array as a property", () => { + let obj; + + beforeEach(function () { + var x = { + items: [1, 2, 3, 4, 5], + stringItems: ['washington', 'bush', 'addams', 'jefferson', 'bush'] + }; + obj = new foComponent(x); + return obj; + }); + + + it("have managed items list", function () { + expect(obj.items).toBeDefined(); + expect(Tools.isEmpty(obj.items)).toBe(false); + expect(obj.items.length).toEqual(5); + + expect(Tools.isArray(obj.items)).toBe(true); + }); + + it("can map", function () { + var list = obj.items.map(function (item) { + return item + 1; + }); + + expect(list.count).toBeUndefined(); + expect(list.length).toEqual(5); + }); + + it("can reduce", function () { + var result = obj.items.reduce(function (a, b) { + return a += b; + }, 0); + + expect(result).toEqual(15); + expect(obj.items.length).toEqual(5); + }); + + it("should be able to compute min", function () { + expect(Math.min(...obj.items)).toEqual(1); + }); + + it("should be able to compute max", function () { + expect(Math.max(...obj.items)).toEqual(5); + }); + + // it("should be able to find index of first", function () { + // var index = obj.items.indexOfFirst(function (item) { + // return item == 3; + // }); + + // expect(index).toEqual(2); + + // var index = obj.stringItems.indexOfFirst(function (item) { + // return item == 'bush'; + // }); + + // expect(index).toEqual(1); + + // }); + + // it("should be able to find itemByIndex", function () { + // expect(obj.items.itemByIndex(2)).toEqual(3); + // expect(obj.stringItems.itemByIndex(2)).toEqual('addams'); + + // expect(obj.stringItems.itemByIndex(12)).toBeUndefined(); + // expect(obj.stringItems.itemByIndex(-2)).toBeUndefined(); + // }); + + // it("should be able to compute distinctItems", function () { + // expect(obj.items.distinctItems().length).toEqual(5); + // expect(obj.stringItems.distinctItems().length).toEqual(4); + // }); + + // it("should be able to addNoDupe", function () { + // expect(obj.items.distinctItems().length).toEqual(5); + + // obj.items.addNoDupe(4) + // expect(obj.items.length).toEqual(5); + + // obj.items.addNoDupe(40) + // expect(obj.items.length).toEqual(6); + + // obj.items.addNoDupe(3) + // expect(obj.items.length).toEqual(6); + // }); + +}); \ No newline at end of file diff --git a/src/app/specs/block-spec.spec.ts b/src/app/specs/BlockSpec.spec.ts similarity index 97% rename from src/app/specs/block-spec.spec.ts rename to src/app/specs/BlockSpec.spec.ts index e1531ad..582f19f 100644 --- a/src/app/specs/block-spec.spec.ts +++ b/src/app/specs/BlockSpec.spec.ts @@ -5,7 +5,7 @@ import { foComponent } from '../foundry/foComponent.model' -describe("Foundry: Block", function () { +describe("Foundry: Block-spec", function () { var block: any; var blockSpec = { diff --git a/src/app/specs/BoidTest.spec.ts b/src/app/specs/BoidTest.spec.ts new file mode 100644 index 0000000..5b3bff7 --- /dev/null +++ b/src/app/specs/BoidTest.spec.ts @@ -0,0 +1,116 @@ + +import { Tools } from '../foundry/foTools' +import { Boid, boidMixin, boidBehaviour, globalBoidList } from '../canvas/boid.model' +import { cPoint2D } from '../foundry/shapes/foGeometry2D'; + +describe("Boid", function () { + + function makeBoid(p:cPoint2D, v:cPoint2D){ + let result = new boidMixin(); + result.p = p; + result.v = v; + globalBoidList.addMember(result); + return result; + } + + beforeEach(function() { + globalBoidList.clearAll() + }); + + it("should be able to sum points", function() { + let result = new cPoint2D(); + + let pt1 = new cPoint2D(50,50); + let pt2 = new cPoint2D(50,50); + pt1.sumTo(result) + pt2.sumTo(result) + + + + expect(result.x).toEqual(100); + expect(result.y).toEqual(100); + + let copy = result.clone(); + expect(result.isEqualTo(copy)).toBeTruthy(); + + expect(result.isNear(pt1, 60)).toBeTruthy(); + expect(pt1.isNear(pt2, 3)).toBeTruthy(); + + }); + + it("should be able to ave points", function() { + let result = new cPoint2D(); + + let pt1 = new cPoint2D(50,50); + for(let i=0; i< 10; i++){ + pt1.sumTo(result) + } + result.scale(1/10); + + expect(result.x).toEqual(50); + expect(result.y).toEqual(50); + + }); + + it("should be able to subtract points", function() { + let result = new cPoint2D(); + + let pt1 = new cPoint2D(50,50); + let pt2 = new cPoint2D(50,50); + pt1.sumTo(result) + let answer = pt2.deltaBetween(result) + + + expect(answer.x).toEqual(0); + expect(answer.y).toEqual(0); + + }); + + it("should be able create boid mixin", function() { + let result = makeBoid(new cPoint2D(50,55), new cPoint2D(10,5)); + + expect(globalBoidList.length).toEqual(1); + result.doAnimation(); + + + expect(result.p.x).toEqual(60); + expect(result.p.y).toEqual(60); + + expect(result.v.x).toEqual(10); + expect(result.v.y).toEqual(5); + + }); + + it("should be able validate rule1", function() { + let b1 = makeBoid(new cPoint2D(50,50), new cPoint2D(10,10)); + let b2 = makeBoid(new cPoint2D(150,150), new cPoint2D(10,10)); + + expect(globalBoidList.length).toEqual(2); + + //let answer = new cPoint2D(); + let pt1 = new cPoint2D(50,50); + let pt2 = new cPoint2D(150,150); + let answer = pt2.deltaBetween(pt1); + answer.scale(0.01); + + expect(answer.x).toEqual(1); + expect(answer.y).toEqual(1); + + let result = boidBehaviour.rule1(b1); + expect(result.x).toEqual(60); + expect(result.y).toEqual(60); + + + result = boidBehaviour.rule1(b2); + expect(result.x).toEqual(70); + expect(result.y).toEqual(70); + + //b1.doAnimation(); + //b2.doAnimation(); + + + + + }); + +}); \ No newline at end of file diff --git a/src/app/specs/DoUnDoShapeTest.js b/src/app/specs/DoUnDoShapeTest.js deleted file mode 100644 index d5408be..0000000 --- a/src/app/specs/DoUnDoShapeTest.js +++ /dev/null @@ -1,158 +0,0 @@ -/// - -/// -/// -/// -/// - -/// -/// - -/// -/// -/// -/// -/// -/// -/// -/// - -describe("Do UnDo: Shapes", function () { - var root; - var buffer; - - beforeEach(function () { - - root = fo.construct('Page'); - list = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']; - var i = 0; - - list.forEach(function (item) { - var hour = i; i++; - var time = new moment(); - - var comp = fo.construct('Shape2D', { - name: item, - number: hour, - hour: time.add('h', hour), - }); - - root.addSubcomponent(comp); - }); - - //inprovement in keeping geoms around now require we use a shape - //but is should be ok if it does not have a stage.. - buffer = fo.construct('Page'); - - //this shows that a 'generic' component can be a place to store a shape - //no harm in not requiring a root page... - //buffer = fo.construct('Component'); - - - function beforeReparent(payload) { - var newParent = payload.newParent; - var child = payload.child; - - //now do the parenting - var oldParent = newParent.captureSubcomponent(child); - - payload.oldParent = oldParent; - - return payload; - } - function undoReparent(payload) { - //now do the reparenting based on the payload - - var oldParent = payload.oldParent; - var child = payload.child; - var index = payload.index; - oldParent.captureInsertSubcomponent(index, child); - - return payload; - } - - fo.undo.clear(); - fo.undo.registerActions('Reparent', beforeReparent, undoReparent); - - }); - - - it("should be able first verify the model", function () { - expect(root).toBeDefined(); - expect(root.Subcomponents.count).toBe(11); - - expect(buffer).toBeDefined(); - expect(buffer.Subcomponents.count).toBe(0); - - var item = root.Subcomponents.item(3); - expect(item.name).toBe('three'); - expect(item.myParent).toBe(root); - - buffer.captureSubcomponent(item); - - expect(root.Subcomponents.count).toBe(10); - expect(item.myParent).toBe(buffer); - - expect(buffer.Subcomponents.count).toBe(1); - - }); - - - it("should be able undo reparenting", function () { - - expect(root).toBeDefined(); - expect(root.Subcomponents.count).toBe(11); - expect(buffer).toBeDefined(); - expect(buffer.Subcomponents.count).toBe(0); - - var item = root.Subcomponents.item(3); - var payload = { newParent: buffer, child: item, index: item.myIndex() }; - - var undo = fo.undo.do('Reparent', payload); - - expect(item.myParent).toBe(buffer); - expect(root.Subcomponents.count).toBe(10); - - fo.undo.unDo(undo); - - expect(item.myParent).toBe(root); - expect(root.Subcomponents.count).toBe(11); - expect(buffer.Subcomponents.count).toBe(0); - - - }); - - it("should return child to the original result", function () { - - expect(root).toBeDefined(); - expect(root.Subcomponents.count).toBe(11); - expect(buffer).toBeDefined(); - expect(buffer.Subcomponents.count).toBe(0); - - var item = root.Subcomponents.item(3); - var payload = { newParent: buffer, child: item, index: item.myIndex() }; - - var undo = fo.undo.do('Reparent', payload); - - expect(item.myParent).toBe(buffer); - expect(root.Subcomponents.count).toBe(10); - - fo.undo.unDo(undo); - - expect(item.myParent).toBe(root); - expect(root.Subcomponents.count).toBe(11); - expect(buffer.Subcomponents.count).toBe(0); - - //only because the reparent handler forces this.. - var sameItem = root.Subcomponents.item(3); - expect(sameItem).toBe(item); - - - }); - - - - - - -}); \ No newline at end of file diff --git a/src/app/specs/DoUnDoShapeTest.spec.ts b/src/app/specs/DoUnDoShapeTest.spec.ts new file mode 100644 index 0000000..761f8dd --- /dev/null +++ b/src/app/specs/DoUnDoShapeTest.spec.ts @@ -0,0 +1,144 @@ +import { TestBed, async } from '@angular/core/testing'; + +import { foPage } from '../foundry/shapes/foPage.model'; +import { foShape2D } from '../foundry/shapes/foShape2D.model'; +import { globalUnDo } from '../foundry/foUnDo'; +import { foComponent } from '../foundry/foComponent.model'; + +import * as moment from 'moment'; + +describe("Do UnDo: Shapes", function () { + let root:foPage; + let buffer:foComponent; + + beforeEach(function () { + + root = new foPage(); + let list = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']; + var i = 0; + + list.forEach(function (item) { + var hour = i; i++; + var time = moment(); + + var comp = new foShape2D({ + name: item, + number: hour, + hour: time.add('h', hour), + }); + + root.addSubcomponent(comp); + }); + + //inprovement in keeping geoms around now require we use a shape + //but is should be ok if it does not have a stage.. + //buffer = new foPage(); + + //this shows that a 'generic' component can be a place to store a shape + //no harm in not requiring a root page... + buffer = new foComponent(); + + + function beforeReparent(payload) { + var newParent = payload.newParent; + var child = payload.child; + + //now do the parenting + var oldParent = newParent.captureSubcomponent(child); + + payload.oldParent = oldParent; + + return payload; + } + function undoReparent(payload) { + //now do the reparenting based on the payload + + var oldParent = payload.oldParent; + var child = payload.child; + //var index = payload.index; + oldParent.captureSubcomponent(child); + + return payload; + } + + globalUnDo.clear(); + globalUnDo.registerActions('Reparent', beforeReparent, undoReparent); + + }); + + + it("should be able first verify the model", function () { + expect(root).toBeDefined(); + expect(root.nodes.count).toBe(11); + + expect(buffer).toBeDefined(); + expect(buffer.nodes.count).toBe(0); + + var item = root.nodes.getChildAt(3); + expect(item['name']).toBe('three'); + expect(item.myParent()).toBe(root); + + buffer.captureSubcomponent(item); + + expect(root.nodes.length).toBe(10); + expect(item.myParent()).toBe(buffer); + + expect(buffer.nodes.length).toBe(1); + }); + + + it("should be able undo reparenting", function () { + + expect(root).toBeDefined(); + expect(root.nodes.count).toBe(11); + expect(buffer).toBeDefined(); + expect(buffer.nodes.count).toBe(0); + + var item = root.nodes.getChildAt(3); + var payload = { newParent: buffer, child: item, index: item.index }; + + var undo = globalUnDo.do('Reparent', payload); + + expect(item.myParent()).toBe(buffer); + expect(root.nodes.count).toBe(10); + + globalUnDo.unDo(undo); + + expect(item.myParent()).toBe(root); + expect(root.nodes.count).toBe(11); + expect(buffer.nodes.count).toBe(0); + }); + + + // it("should return child to the original result", function () { + + // expect(root).toBeDefined(); + // expect(root.nodes.count).toBe(11); + // expect(buffer).toBeDefined(); + // expect(buffer.nodes.count).toBe(0); + + // var item = root.nodes.getChildAt(3); + // var payload = { newParent: buffer, child: item, index: item.index }; + + // var undo = globalUnDo.do('Reparent', payload); + + // expect(item.myParent()).toBe(buffer); + // expect(root.nodes.count).toBe(10); + + // globalUnDo.unDo(undo); + + // expect(item.myParent()).toBe(root); + // expect(root.nodes.count).toBe(11); + // expect(buffer.nodes.count).toBe(0); + + // //only because the reparent handler forces this.. + // var sameItem = root.nodes.getChildAt(3); + // expect(sameItem).toBe(item); + // }); + + + + + + +}); \ No newline at end of file diff --git a/src/app/specs/DoUnDoTest.js b/src/app/specs/DoUnDoTest.js deleted file mode 100644 index 99bfe54..0000000 --- a/src/app/specs/DoUnDoTest.js +++ /dev/null @@ -1,146 +0,0 @@ -/// - -/// -/// -/// -/// - -/// -/// - - -describe("Do UnDo: state", function () { - var list; - var data; - - beforeEach(function () { - list = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']; - var i = 0; - - data = list.map(function (item) { - var hour = i; i++; - var time = new moment(); - return { - name: item, - number: hour, - hour: time.add('h', hour), - } - }); - - data = fo.filtering.applyFilterAndSort(data, undefined, 'number(a)'); - - - }); - - - - it("should be able to registarActions", function () { - function beforeDelete(payload){ return payload; } - function undoDelete(payload){ return payload; } - function verifyKeepDelete(pOld, pNew) { return pOld != pNew; } - - fo.undo.clear(); - fo.undo.registerActions('delete', beforeDelete, undoDelete, verifyKeepDelete); - expect(fo.undo.canUndo()).toBe(false); - - var undo = fo.undo.do('delete', 'Dave'); - expect(fo.undo.canUndo()).toBe(true); - expect(undo.action).toBe('delete'); - expect(undo.payload).toBe('Dave'); - - var keep = fo.undo.verifyKeep(undo, 'mike'); - expect(keep).toBe(true); - expect(fo.undo.canUndo()).toBe(true); - - var keep = fo.undo.verifyKeep(undo, 'Dave'); - expect(keep).toBe(false); - expect(fo.undo.canUndo()).toBe(false); - }); - - - it("should be able to undo simple string edit", function () { - function beforeDelete(payload) { return payload; } - function verifyKeepDelete(pOld, pNew) { return pOld != pNew; } - function undoDelete(payload) { - return payload; - } - - fo.undo.clear(); - fo.undo.registerActions('edit', beforeDelete, undoDelete, verifyKeepDelete); - expect(fo.undo.canUndo()).toBe(false); - - var target = 'hello'; - - var undo = fo.undo.do('edit', target); - expect(fo.undo.canUndo()).toBe(true); - expect(undo.payload).toEqual(target); - - target = target.toLocaleUpperCase(); - - var keep = fo.undo.verifyKeep(undo, target); - expect(keep).toBe(true); - expect(fo.undo.canUndo()).toBe(true); - - expect(target).toEqual('HELLO'); - - - target = fo.undo.unDo(); - expect(fo.undo.canUndo()).toBe(false); - expect(target).toEqual('hello'); - }); - - - //set up the conditions for removing items in an array - - fo.undo.registerActions('deleteItemInArray', - function (payload) { //do before payload is stored - return payload; - }, - function (payload) { //process undo because noone else will - //implement restore action arr.splice(2, 0, "Lene"); - - payload.source.splice(payload.loc, 0, payload.data); - return payload; - }, - function (pold, pnew) { //write a rule to keep this undo during verify phase - if (pold.source != pnew.source) { - return true; - } - if (pold.loc != pnew.loc) return true; - if (pold.data != pnew.data) return true; - return false; - } - ); - - it("should be able to deleteItemInArray and Undo", function () { - expect(data[0].name).toBe("zero"); - expect(data[data.length - 1].name).toBe("ten"); - - fo.undo.clear(); - - //prepare for undo by deleting item and storing it - var target = data[0]; - var payload = { source: data, loc: 0, data: target }; - - data.removeItem(target); - expect(data[0].name).toBe("one"); - expect(fo.undo.canUndo()).toBe(false); - - - var undo = fo.undo.do('deleteItemInArray', payload); - expect(fo.undo.canUndo()).toBe(true); - - //even the array members have changed, the undo should be kept - var keep = fo.undo.verifyKeep(undo, { source: data }); - expect(keep).toBe(true); - expect(fo.undo.canUndo()).toBe(true); - - fo.undo.unDo(); - expect(fo.undo.canUndo()).toBe(false); - expect(data[0].name).toBe("zero"); - }); - - - - -}); \ No newline at end of file diff --git a/src/app/specs/DoUnDoTest.spec.ts b/src/app/specs/DoUnDoTest.spec.ts new file mode 100644 index 0000000..f946c52 --- /dev/null +++ b/src/app/specs/DoUnDoTest.spec.ts @@ -0,0 +1,141 @@ +import { TestBed, async } from '@angular/core/testing'; + +import { globalUnDo } from '../foundry/foUnDo'; + + + +describe('Do UnDo: state', () => { + let data:any[]; + beforeEach(async(() => { + let list = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']; + let i=0; + + data = list.map(function (item) { + var hour = i; i++; + //var time = new moment(); + return { + name: item, + number: hour, + //hour: time.add('h', hour), + } + }); + })); + + + + it("should be able to registarActions", function () { + function beforeDelete(payload) { return payload; } + function undoDelete(payload) { return payload; } + function verifyKeepDelete(pOld, pNew) { return pOld != pNew; } + + globalUnDo.clear(); + globalUnDo.registerActions('delete', beforeDelete, undoDelete, verifyKeepDelete); + expect(globalUnDo.canUndo()).toBe(false); + + var undo = globalUnDo.do('delete', 'Dave'); + expect(globalUnDo.canUndo()).toBe(true); + expect(undo.action).toBe('delete'); + expect(undo.payload).toBe('Dave'); + + var keep = globalUnDo.verifyKeep(undo, 'mike'); + expect(keep).toBe(true); + expect(globalUnDo.canUndo()).toBe(true); + + var keep = globalUnDo.verifyKeep(undo, 'Dave'); + expect(keep).toBe(false); + expect(globalUnDo.canUndo()).toBe(false); + }); + + + it("should be able to undo simple string edit", () => { + function beforeDelete(payload) { return payload; } + function verifyKeepDelete(pOld, pNew) { return pOld != pNew; } + function undoDelete(payload) { + return payload; + } + + globalUnDo.clear(); + globalUnDo.registerActions('edit', beforeDelete, undoDelete, verifyKeepDelete); + expect(globalUnDo.canUndo()).toBe(false); + + var target = 'hello'; + + var undo = globalUnDo.do('edit', target); + expect(globalUnDo.canUndo()).toBe(true); + expect(undo.payload).toEqual(target); + + target = target.toLocaleUpperCase(); + + var keep = globalUnDo.verifyKeep(undo, target); + expect(keep).toBe(true); + expect(globalUnDo.canUndo()).toBe(true); + + expect(target).toEqual('HELLO'); + + + target = globalUnDo.unDo(); + expect(globalUnDo.canUndo()).toBe(false); + expect(target).toEqual('hello'); + }); + + + //set up the conditions for removing items in an array + + globalUnDo.registerActions('deleteItemInArray', + function (payload) { //do before payload is stored + return payload; + }, + function (payload) { //process undo because noone else will + //implement restore action arr.splice(2, 0, "Lene"); + + payload.source.splice(payload.loc, 0, payload.data); + return payload; + }, + function (pold, pnew) { //write a rule to keep this undo during verify phase + if (pold.source != pnew.source) { + return true; + } + if (pold.loc != pnew.loc) return true; + if (pold.data != pnew.data) return true; + return false; + } + ); + + it("should be able to deleteItemInArray and Undo", () => { + + function removeItem(source:any[], item:any){ + let index = source.indexOf(item); + if (index !== -1)source.splice(index, 1); + } + + expect(data[0].name).toBe("zero"); + expect(data[data.length - 1].name).toBe("ten"); + + globalUnDo.clear(); + + //prepare for undo by deleting item and storing it + var target = data[0]; + var payload = { source: data, loc: 0, data: target }; + + removeItem(data, target); + expect(data[0].name).toBe("one"); + expect(globalUnDo.canUndo()).toBe(false); + + + var undo = globalUnDo.do('deleteItemInArray', payload); + expect(globalUnDo.canUndo()).toBe(true); + + //even the array members have changed, the undo should be kept + var keep = globalUnDo.verifyKeep(undo, { source: data }); + expect(keep).toBe(true); + expect(globalUnDo.canUndo()).toBe(true); + + globalUnDo.unDo(); + expect(globalUnDo.canUndo()).toBe(false); + expect(data[0].name).toBe("zero"); + }); + + + + +}); \ No newline at end of file diff --git a/src/app/specs/Duplicate.spec.ts b/src/app/specs/Duplicate.spec.ts new file mode 100644 index 0000000..217838b --- /dev/null +++ b/src/app/specs/Duplicate.spec.ts @@ -0,0 +1,132 @@ + +import { Tools } from '../foundry/foTools' +import { foLibrary } from "../foundry/foLibrary.model"; +import { foStencilLibrary } from "../foundry/foStencil"; + +import { foComponent } from '../foundry/foComponent.model' +import { foShape2D } from '../foundry/shapes/foShape2D.model' +import { foInputText2D } from '../foundry/shapes/foText2D.model' + + +describe("Foundry: Duplicate testing", function () { + let block: foComponent | any; + let shape: foShape2D | any; + let text: foInputText2D | any; + + let block1: foComponent | any; + let shape1: foShape2D | any; + let text1: foInputText2D | any; + + let specBlock = { + height: 1, + width: 2, + baseArea: function () { return this.width * this.height }, + depth: 3, + side1Area: function () { return this.width * this.depth }, + side2Area: function () { return this.height * this.depth }, + volume: function () { return this.baseArea * this.depth }, + surfaceArea: function () { return 2.0 * this.baseArea + 2.0 * this.side1Area + 2.0 * this.side2Area }, + }; + + let specShape = { + width: 100, + height: 400, + text: 'Hello World' + } + + function justKeys(spec) { + let keys: string[] = Tools.extractReadWriteKeys(spec); + return keys; + } + + let lShapes: foStencilLibrary = new foStencilLibrary().defaultName('shapes'); + + let cText = lShapes.define('Text', foInputText2D, { + text: 'Understand DevSecOps', + fontSize: 30, + moreDate: 50, + }); + + beforeEach(() => { + block = new foComponent(specBlock); + shape = new foShape2D(specShape); + text = new foInputText2D(specShape); + + text1 = cText.makeComponent() + }); + + it("should have block work correctly", () => { + expect(block.height).toEqual(1); + expect(block.width).toEqual(2); + expect(block.depth).toEqual(3); + expect(block.volume).toEqual(1 * 2 * 3); + }); + + it("should have foComponent be able to createCopy", () => { + //this works but on copy computed values end up static + let copy = block.createCopy(justKeys(specBlock)); + + + expect(block.myGuid).not.toEqual(copy.myGuid); + expect(block.width).toEqual(copy.width); + expect(copy.baseArea).not.toBeDefined(); + }); + + it("should have foComponent be able to Extend createCopy", () => { + //this works but on copy computed values end up static + let copy = block.createCopy(justKeys(specBlock)); + + let spec = Tools.extractComputedKeys(specBlock); + let properties = Tools.extract(specBlock,spec); + Tools.overrideComputed(copy, properties); + + expect(copy.myGuid).not.toEqual(block.myGuid); + expect(copy.width).toEqual(block.width); + expect(copy.baseArea).toBeDefined(); + expect(copy.volume).toEqual(1 * 2 * 3); + copy.width = 3; + expect(copy.volume).toEqual(1 * 3 * 3); + }); + + it("should have foShape2D be able to createCopy", () => { + let copy = shape.createCopy(justKeys(specShape)); + + expect(shape.myGuid).not.toEqual(copy.myGuid); + + expect(shape.text).toEqual(specShape.text); + expect(shape.text).toEqual(copy.text); + }); + + it("should have foInputText2D be able to createCopy", () => { + let copy = text.createCopy(justKeys(specShape)); + + expect(text.myGuid).not.toEqual(copy.myGuid); + expect(text.text).toEqual(specShape.text); + expect(text.text).toEqual(copy.text); + }); + + + it("should have cText be able to createCopy", () => { + let copy = text1.createCopy(); + + expect(text1.myGuid).not.toEqual(copy.myGuid); + expect(text1.fontSize).toEqual(copy.fontSize); + expect(text1.text).toEqual(copy.text); + expect(text1.moreDate).toEqual(copy.moreDate); + }); + + it("should be equal to itself ", () => { + let result = text1.isEqualTo(text1); + + expect(result).toEqual(true); + }); + + it("should be equal to copy ", () => { + let copy = text1.createCopy(); + let result = text1.isEqualTo(copy); + + expect(result).toEqual(true); + }); + + +}); \ No newline at end of file diff --git a/src/app/specs/GetSpecAndHydrationTest.tss b/src/app/specs/GetSpecAndHydrationTest.tss new file mode 100644 index 0000000..eab3302 --- /dev/null +++ b/src/app/specs/GetSpecAndHydrationTest.tss @@ -0,0 +1,93 @@ + + +import { Tools } from '../foundry/foTools' +import { foLibrary } from "../foundry/foLibrary.model"; +import { foStencilLibrary } from "../foundry/foStencil"; + +import { foComponent } from '../foundry/foComponent.model' +import { foShape3D } from '../foundry/solids/foShape3D.model' +import { foInputText2D } from '../foundry/shapes/foText2D.model' + +import { foFileManager } from '../foundry/foFileManager' + +describe("Foundry: GetSpec", function () { + var obj; + var testSpec; + + beforeEach(function () { + testSpec = { + uncomputed: 1, + computed: function () { + return 1 + this.uncomputed; + } + }; + + obj = fo.makeComponent(testSpec); + return obj; + }); + + it("export only uncomputed objects by default", function () { + expect(fo.utils.isaComponent(obj)).toBe(true); + + expect(obj.Properties.count).toEqual(2); + var spec = obj.getSpec(); + + var newObj = fo.makeComponent(spec); + + expect(obj.uncomputed).toEqual(newObj.uncomputed); + }); + + it("Should be dehydratable and rehydratable", function () { + var result = obj.dehydrate() ; + + expect(result).toBeDefined(); + + expect(result.myType == 'Component').toBe(true); + expect(result.uncomputed).toEqual(obj.uncomputed); + + //rehydrate as my own child + var root = fo.makeComponent({}); + root.rehydrate(root, [result], {}); + var child = root.Subcomponents.item(0); + + expect(fo.utils.isaComponent(child)).toBe(true); + expect(root).toEqual(child.myParent); + + expect(obj.uncomputed).toEqual(child.uncomputed); + + }); + + it("export default and specified properties", function () { + expect(fo.utils.isaComponent(obj)).toBe(true); + + + var spec = obj.getSpec(); + expect(obj.uncomputed).toBeDefined(); + + var newSpec = fo.utils.mixin(spec, { computed: obj.computed }); + expect(newSpec.computed).toBeDefined(); + + + var newObj = fo.makeComponent(newSpec); + + expect(obj.uncomputed).toEqual(newObj.uncomputed); + }); + + it("export default and properties that OptIn", function () { + expect(fo.utils.isaComponent(obj)).toBe(true); + + obj.makePartOfSpec('computed'); + + var spec = obj.getSpec(); + expect(obj.uncomputed).toBeDefined(); + + var newSpec = fo.utils.mixin(spec); + expect(newSpec.computed).toBeDefined(); + + + var newObj = fo.makeComponent(newSpec); + + expect(obj.uncomputed).toEqual(newObj.uncomputed); + }); + +}); \ No newline at end of file diff --git a/src/app/specs/HydrationSaveRestore.spec.ts b/src/app/specs/HydrationSaveRestore.spec.ts new file mode 100644 index 0000000..6b98482 --- /dev/null +++ b/src/app/specs/HydrationSaveRestore.spec.ts @@ -0,0 +1,147 @@ + +import { Tools } from '../foundry/foTools' +import { foLibrary } from "../foundry/foLibrary.model"; +import { foStencilLibrary } from "../foundry/foStencil"; + +import { foComponent } from '../foundry/foComponent.model' +import { foShape3D } from '../foundry/solids/foShape3D.model' +import { foInputText2D } from '../foundry/shapes/foText2D.model' + +import { foFileManager } from '../foundry/foFileManager' + +describe("Foundry: Hydration Save Restore", function () { + let block: foComponent | any; + let shape: foShape3D | any; + let text: foInputText2D | any; + + let block1: foComponent | any; + let shape1: foShape3D | any; + let text1: foInputText2D | any; + + let specBlock = { + height: 1, + width: 2, + baseArea: function () { return this.width * this.height }, + depth: 3, + side1Area: function () { return this.width * this.depth }, + side2Area: function () { return this.height * this.depth }, + volume: function () { return this.baseArea * this.depth }, + surfaceArea: function () { return 2.0 * this.baseArea + 2.0 * this.side1Area + 2.0 * this.side2Area }, + }; + + let specText = { + text: 'Understand DevSecOps', + fontSize: 30, + moreDate: 50, + } + + let specShape = { + width: 100, + height: 400, + text: 'Hello World' + } + + function justKeys(spec) { + let keys: string[] = Tools.extractReadWriteKeys(spec); + return keys; + } + + let lKnowledge: foLibrary = new foLibrary().defaultName('definitions'); + let lShapes: foStencilLibrary = new foStencilLibrary().defaultName('shapes'); + let lSolids: foStencilLibrary = new foStencilLibrary().defaultName('solids'); + + let cBlock = lKnowledge.concepts.define('Block', foComponent, specBlock); + let cText = lShapes.define('Text', foInputText2D, specText); + let cBox = lSolids.define('Box', foShape3D, specShape); + + beforeEach(() => { + block = new foComponent(specBlock); + shape = new foShape3D(specShape); + text = new foInputText2D(specShape); + + block1 = cBlock.makeComponent() + shape1 = cBox.makeComponent() + text1 = cText.makeComponent() + }); + + it("should be able to use create copy", () => { + //this works but on copy computed values end up static + let copy = block1.createCopy(); + + expect(block1.myGuid).not.toEqual(copy.myGuid); + expect(block1.width).toEqual(copy.width); + }); + + it("should save and restore a block", (done) => { + let ext = '.json' + let fileName = 'test1' + + let manager = new foFileManager(true) + let source = block1.createdFrom(); + let body = block1.deHydrate(); + + + expect(block.width).toEqual(body.width); + + manager.writeTextAsBlob(JSON.stringify(body), fileName, ext, () => { + manager.readTextAsBlob(fileName, ext, item => { + let result = JSON.parse(item); + let block2 = source.makeComponent(undefined, result); + expect(block2.width).toEqual(block.width); + + block2.width = 3; + expect(block2.baseArea).toEqual(1 * 3); + expect(block2.volume).toEqual(1 * 3 * 3); + + done() + }) + }); + + }); + + it("should do integretyTest for block", (done) => { + + let manager = new foFileManager(true); + manager.integretyTest(block1, true, block2 => { + expect(block2.width).toEqual(block.width); + + block2.width = 3; + expect(block2.baseArea).toEqual(1 * 3); + expect(block2.volume).toEqual(1 * 3 * 3); + + done() + }) + }); + + it("should be equal to copy shape", () => { + let copy = shape.createCopy(justKeys(specShape)); + let result = shape.isEqualTo(copy); + + expect(result).toEqual(true); + }); + + it("should be equal to copy shape1", () => { + let copy = shape1.createCopy(); + let result = shape1.isEqualTo(copy); + + expect(result).toEqual(true); + }); + + + it("should be equal to copy text", () => { + let copy = text.createCopy(); + let result = text.isEqualTo(copy); + + expect(result).toEqual(true); + }); + + it("should be equal to copy text1", () => { + let copy = text1.createCopy(); + let result = text1.isEqualTo(copy); + + expect(result).toEqual(true); + }); + + + +}); \ No newline at end of file diff --git a/src/app/specs/ModelDeepPersistTest.js b/src/app/specs/ModelDeepPersistTest.tss similarity index 100% rename from src/app/specs/ModelDeepPersistTest.js rename to src/app/specs/ModelDeepPersistTest.tss diff --git a/src/app/specs/ModelPersistTest.js b/src/app/specs/ModelPersistTest.tss similarity index 100% rename from src/app/specs/ModelPersistTest.js rename to src/app/specs/ModelPersistTest.tss diff --git a/src/app/specs/foMatrix2D.spec.ts b/src/app/specs/foMatrix2D.spec.ts index 14b897b..b2c1600 100644 --- a/src/app/specs/foMatrix2D.spec.ts +++ b/src/app/specs/foMatrix2D.spec.ts @@ -1,7 +1,7 @@ import { TestBed, async } from '@angular/core/testing'; -import { cPoint2D } from '../foundry/foGeometry2D'; -import { Matrix2D, Identity } from '../foundry/foMatrix2D'; +import { cPoint2D } from '../foundry/shapes/foGeometry2D'; +import { Matrix2D, Identity } from '../foundry/shapes/foMatrix2D'; diff --git a/src/app/specs/AdaptorTest.js b/src/app/specs/oldJavaScriptTests/AdaptorTest.js similarity index 100% rename from src/app/specs/AdaptorTest.js rename to src/app/specs/oldJavaScriptTests/AdaptorTest.js diff --git a/src/app/specs/BindingTest.js b/src/app/specs/oldJavaScriptTests/BindingTest.js similarity index 100% rename from src/app/specs/BindingTest.js rename to src/app/specs/oldJavaScriptTests/BindingTest.js diff --git a/src/app/specs/CollectionDynamicTest.js b/src/app/specs/oldJavaScriptTests/CollectionDynamicTest.js similarity index 100% rename from src/app/specs/CollectionDynamicTest.js rename to src/app/specs/oldJavaScriptTests/CollectionDynamicTest.js diff --git a/src/app/specs/CollectionTest.js b/src/app/specs/oldJavaScriptTests/CollectionTest.spec.js similarity index 88% rename from src/app/specs/CollectionTest.js rename to src/app/specs/oldJavaScriptTests/CollectionTest.spec.js index 712cbc3..7134896 100644 --- a/src/app/specs/CollectionTest.js +++ b/src/app/specs/oldJavaScriptTests/CollectionTest.spec.js @@ -1,12 +1,10 @@ -/// +import { Tools } from '../foundry/foTools'; +import { foCollection } from '../foundry/foCollection.model'; +import { foComponent } from '../foundry/foComponent.model'; -/// -/// -/// - -describe("Foundry: Collections", function () { - var obj; +describe("Foundry: Collections", ()=> { + let obj; //if this is where the we define the spec //"should the right count on demand when adding items" will fail @@ -21,11 +19,11 @@ describe("Foundry: Collections", function () { //}); //this works correctly - beforeEach(function () { + beforeEach(() => { var collectionSpec = { - people: fo.makeCollection(), + people: new foCollection(), }; - obj = fo.makeComponent(collectionSpec); + obj = new foComponent(collectionSpec); return obj; }); diff --git a/src/app/specs/ComponentTest.js b/src/app/specs/oldJavaScriptTests/ComponentTest.js similarity index 100% rename from src/app/specs/ComponentTest.js rename to src/app/specs/oldJavaScriptTests/ComponentTest.js diff --git a/src/app/specs/ConstraintTest.js b/src/app/specs/oldJavaScriptTests/ConstraintTest.js similarity index 100% rename from src/app/specs/ConstraintTest.js rename to src/app/specs/oldJavaScriptTests/ConstraintTest.js diff --git a/src/app/specs/DecisionComponentTest.js b/src/app/specs/oldJavaScriptTests/DecisionComponentTest.js similarity index 100% rename from src/app/specs/DecisionComponentTest.js rename to src/app/specs/oldJavaScriptTests/DecisionComponentTest.js diff --git a/src/app/specs/DefineTypeMixingTest.js b/src/app/specs/oldJavaScriptTests/DefineTypeMixingTest.js similarity index 100% rename from src/app/specs/DefineTypeMixingTest.js rename to src/app/specs/oldJavaScriptTests/DefineTypeMixingTest.js diff --git a/src/app/specs/DependencyCollectionTest.js b/src/app/specs/oldJavaScriptTests/DependencyCollectionTest.js similarity index 100% rename from src/app/specs/DependencyCollectionTest.js rename to src/app/specs/oldJavaScriptTests/DependencyCollectionTest.js diff --git a/src/app/specs/DependencyOrderedCollectionTest.js b/src/app/specs/oldJavaScriptTests/DependencyOrderedCollectionTest.js similarity index 100% rename from src/app/specs/DependencyOrderedCollectionTest.js rename to src/app/specs/oldJavaScriptTests/DependencyOrderedCollectionTest.js diff --git a/src/app/specs/DependencyValueTest.js b/src/app/specs/oldJavaScriptTests/DependencyValueTest.js similarity index 100% rename from src/app/specs/DependencyValueTest.js rename to src/app/specs/oldJavaScriptTests/DependencyValueTest.js diff --git a/src/app/specs/DoUnDoComponentTest.js b/src/app/specs/oldJavaScriptTests/DoUnDoComponentTest.js similarity index 89% rename from src/app/specs/DoUnDoComponentTest.js rename to src/app/specs/oldJavaScriptTests/DoUnDoComponentTest.js index 77ebc58..f13615f 100644 --- a/src/app/specs/DoUnDoComponentTest.js +++ b/src/app/specs/oldJavaScriptTests/DoUnDoComponentTest.js @@ -1,12 +1,4 @@ -/// - -/// -/// -/// -/// - -/// -/// + describe("Do UnDo: Component", function () { diff --git a/src/app/specs/DynamicComponentTest.js b/src/app/specs/oldJavaScriptTests/DynamicComponentTest.js similarity index 100% rename from src/app/specs/DynamicComponentTest.js rename to src/app/specs/oldJavaScriptTests/DynamicComponentTest.js diff --git a/src/app/specs/EntityFilterSortTest.js b/src/app/specs/oldJavaScriptTests/EntityFilterSortTest.js similarity index 100% rename from src/app/specs/EntityFilterSortTest.js rename to src/app/specs/oldJavaScriptTests/EntityFilterSortTest.js diff --git a/src/app/specs/EntityInternalFilterTest.js b/src/app/specs/oldJavaScriptTests/EntityInternalFilterTest.js similarity index 100% rename from src/app/specs/EntityInternalFilterTest.js rename to src/app/specs/oldJavaScriptTests/EntityInternalFilterTest.js diff --git a/src/app/specs/EntityTest.js b/src/app/specs/oldJavaScriptTests/EntityTest.js similarity index 100% rename from src/app/specs/EntityTest.js rename to src/app/specs/oldJavaScriptTests/EntityTest.js diff --git a/src/app/specs/ExtendViaPrototype.js b/src/app/specs/oldJavaScriptTests/ExtendViaPrototype.js similarity index 100% rename from src/app/specs/ExtendViaPrototype.js rename to src/app/specs/oldJavaScriptTests/ExtendViaPrototype.js diff --git a/src/app/specs/FilterAndSortTest.js b/src/app/specs/oldJavaScriptTests/FilterAndSortTest.js similarity index 100% rename from src/app/specs/FilterAndSortTest.js rename to src/app/specs/oldJavaScriptTests/FilterAndSortTest.js diff --git a/src/app/specs/FilterNumberTest.js b/src/app/specs/oldJavaScriptTests/FilterNumberTest.js similarity index 100% rename from src/app/specs/FilterNumberTest.js rename to src/app/specs/oldJavaScriptTests/FilterNumberTest.js diff --git a/src/app/specs/FilterStringTest.js b/src/app/specs/oldJavaScriptTests/FilterStringTest.js similarity index 100% rename from src/app/specs/FilterStringTest.js rename to src/app/specs/oldJavaScriptTests/FilterStringTest.js diff --git a/src/app/specs/FiltersAndSortsVM.js b/src/app/specs/oldJavaScriptTests/FiltersAndSortsVM.js similarity index 100% rename from src/app/specs/FiltersAndSortsVM.js rename to src/app/specs/oldJavaScriptTests/FiltersAndSortsVM.js diff --git a/src/app/specs/GetSpecAndHydrationTest.js b/src/app/specs/oldJavaScriptTests/GetSpecAndHydrationTest.js similarity index 100% rename from src/app/specs/GetSpecAndHydrationTest.js rename to src/app/specs/oldJavaScriptTests/GetSpecAndHydrationTest.js diff --git a/src/app/specs/GroupTest.js b/src/app/specs/oldJavaScriptTests/GroupTest.js similarity index 100% rename from src/app/specs/GroupTest.js rename to src/app/specs/oldJavaScriptTests/GroupTest.js diff --git a/src/app/specs/ManagedListTest.js b/src/app/specs/oldJavaScriptTests/ManagedListTest.js similarity index 100% rename from src/app/specs/ManagedListTest.js rename to src/app/specs/oldJavaScriptTests/ManagedListTest.js diff --git a/src/app/specs/oldJavaScriptTests/ModelDeepPersistTest.js b/src/app/specs/oldJavaScriptTests/ModelDeepPersistTest.js new file mode 100644 index 0000000..1721369 --- /dev/null +++ b/src/app/specs/oldJavaScriptTests/ModelDeepPersistTest.js @@ -0,0 +1,797 @@ +/// +/// + +(function (namespace, fo, undefined) { + + function formatNull(text) { + if (text == 'null') return ''; + return text ? text : ''; + } + + function ns(name) { + return "{0}::{1}".format(namespace, name); + } + + fo.establishType(ns('travelDocument'), { + "id": "", + "type": "", + "number": "", + "countryCode": "", + }); + + fo.establishType(ns('itinerary'), { + "id": "", + "airlineCode": "", + "flightNumber": "", + }); + + fo.establishType(ns('conveyance'), { + "id": "", + "type": "", + "bodyStyle": "", + "vin": "", + "plateNumber": "", + "plateState": "", + "plateCountry": "", + }); + + fo.establishType(ns('location'), { + type: "", + address: "
", + position: [0, 0], + resolution: "", + resolutionKey: "", + range: 100000, + isInBox: function () { + var pos = this.position; + if (!pos) return function () { + return false; + } + + return function (UL, LR) { + //goto to do better with the math + if (pos[0] < UL[0]) return false; + if (pos[0] > LR[0]) return false; + + if (pos[1] > UL[1]) return false; + if (pos[1] < LR[1]) return false; + + return true; + } + }, + + + entityHeader1: function () { + return this.type; + }, + entityHeader2: function () { + return this.address && this.address.fullAddress; + }, + + mapIconLabel: function () { + return this.id; + }, + mapIcon: function () { + name = 'HouseBlue'; + return name; + }, + mapIconScale: function () { + return this.isSelected ? 1.7 : 1.0; + }, + + }); + + fo.establishType(ns('address'), { + addressLine: "", + city: "", + state: "", + countryCode: "", + postalCode: "", + + line1: function () { + return formatNull(this.addressLine); + }, + line2: function () { + return "{0},{1} {2} {3}".format(formatNull(this.city), formatNull(this.state), formatNull(this.country), formatNull(this.postalCode)); + }, + + fullAddress: function () { + return this.line1 + ' ' + this.geographic.line2; + }, + }) + + + + fo.establishType(ns('person'), { + id: "", + type: "", + personType: "", + "hashId": "", + + nuinList: "[]", + tscidList: "[]", + travelerIdList: "[]", + + travelDocumentList: "[]", + itineraryList: "[]", + + fullName: function () { + return this.biographic && this.biographic.fullName; + }, + + fullAddress: function () { + return this.geographic && this.geographic.fullAddress; + }, + + biographic: function () { + return this.getSubcomponent('biographic'); + }, + geographic: function () { + return this.getSubcomponent('geographic'); + }, + + entityHeader1: function () { + return this.fullName; + }, + entityHeader2: function () { + return this.fullAddress; + }, + + mapIconLabel: function () { + return this.id; + }, + mapIcon: function () { + var name = 'map_precise'; + return name; + }, + mapIconScale: function () { + return this.isSelected ? 1.7 : 1.0; + }, + }); + + fo.establishType(ns('biographic'), { + + firstName: '', + lastName: '', + + "ssn": "", + + age: '', + genderCode: '', + + + birthCountryCodeList: '[]', + citizenshipCountryCodeList: '[]', + + phoneNumberList: '[]', + emailAddressList: '[]', + + "dobList": "[]", + + fullName: function () { + return this.lastName + ', ' + this.firstName; + }, + gender: function () { + return this.genderCode || 'U'; + }, + + }); + + fo.establishType(ns('geographic'), { + //locationList: '[]', + + fullAddress: function () { + return this.locationList && locationList[0].fullAddress; + }, + isInBox: function () { + var locations = this.locationList; + if (!fo.utils.isArray(locations)) return function () { + return false; + } + + return function (UL, LR) { + //goto to do better with the math + var isInside = true; + locations.forEach(function (location) { + isInside = location.isInBox(UL, LR) && isInside; + }); + return isInside; + } + }, + }); + + + fo.establishType(ns('event'), { + id: "", + type: "", + status: "", + eventType: "", + + createdBy: '', + createDate: "", + createdPort: '', + + requestingPort: '', + priority: '', + direction: "", + modeOfEntry: "", + + assignedUser: '', + assignedPort: '', + assignedUnit: '', + + + //locationList: '[]', + + + entityHeader1: function () { + return this.status; + }, + entityHeader2: function () { + return this.reviewType; + }, + + mapIconLabel: function () { + return this.id; + }, + mapIcon: function () { + var name = 'map_epicenter'; + name = 'StarRed'; + return name; + }, + mapIconScale: function () { + return this.isSelected ? 1.7 : 1.0; + }, + geographic: function () { + return this.getSubcomponent('geographic'); + }, + }); + + fo.establishType(ns('block'), { + height: 1, + width: 2, + baseArea: function () { return this.width * this.height }, + depth: 3, + side1Area: function () { return this.width * this.depth }, + side2Area: function () { return this.height * this.depth }, + volume: function () { return this.baseArea * this.depth }, + surfaceArea: function () { return 2.0 * this.baseArea + 2.0 * this.side1Area + 2.0 * this.side2Area }, + otherPart: {} + }); + +}('ModelDeepPersist', Foundry)); + + +describe("Foundry: Model DEEP Persist", function () { + + + beforeEach(function () { + //should through an exception because we change with is registered + try { + } + catch (ex) { } + }); + + it("should a simple constructor", function () { + var block = fo.ModelDeepPersist.newBlock(); + expect(block.height).toEqual(1); + expect(block.width).toEqual(2); + expect(block.depth).toEqual(3); + expect(block.volume).toEqual(3 * 2 * 1); + }); + + + it("should be able to create a workspace", function () { + var space = fo.ws.makeModelWorkspace('steve') + expect(space).toBeDefined(); + expect(space.rootModel).toBeDefined(); + }) + + it("should be able catch an exception in the tester", function () { + try { + throw new Error('exception catch me') + } + catch (ex) { + expect(ex.message).toEqual('exception catch me'); + } + }) + + + it("should be able to create a simple payload", function () { + + var space = fo.ws.makeModelWorkspace('steve'); + var model = space.rootModel; + expect(model).toBeDefined(); + + var block = fo.ModelDeepPersist.newBlock({ + depth: 5, + }); + + model.capture(block); + expect(block.volume).toEqual(5 * 2 * 1); + + try{ + var payload = space.currentModelToPayload() + expect(payload).toBeDefined(); + } + catch (ex) { + expect(ex).toBeUndefined(); + } + }); + + + it("should be able to create a compound payload", function () { + + var space = fo.ws.makeModelWorkspace('steve'); + var model = space.rootModel; + expect(model).toBeDefined(); + + var make = fo.ModelDeepPersist.newBlock; + + var block = make(); + + model.capture(block); + block.capture(make(), 'subBlock'); + + + try { + var payload = space.currentModelToPayload() + expect(payload).toBeDefined(); + } + catch (ex) { + expect(ex).toBeUndefined(); + } + }); + + it("should be able to create a circular payload", function () { + + var space = fo.ws.makeModelWorkspace('steve'); + var model = space.rootModel; + expect(model).toBeDefined(); + + var make = fo.ModelDeepPersist.newBlock; + + var block = make(); + var subBlock = make(); + + model.capture(block); + block.capture(subBlock, 'subBlock'); + + //circ is not defined so it does not get searialize + block.circ = subBlock; + + + try { + var payload = space.currentModelToPayload() + expect(payload).toBeDefined(); + } + catch (ex) { + expect(ex).toBeUndefined(); + } + }); + + it("should be able to create a relationship payload", function () { + + var space = fo.ws.makeModelWorkspace('steve'); + var model = space.rootModel; + expect(model).toBeDefined(); + + //a relationship is established by matching two key fields + var relation = fo.establishRelationship('toTheLeft|toTheRight'); + + var make = fo.ModelDeepPersist.newBlock; + + var blockLeft = make({ height: 30 }); + var blockRight = make({ width: 30 }); + + model.capture(blockLeft); + model.capture(blockRight); + + //circ is not defined so it does not get searialize + relation(blockLeft,blockRight, true) + + try { + var payload = space.currentModelToPayload() + expect(payload).toBeDefined(); + } + catch (ex) { + expect(ex).toBeUndefined(); + } + }); + + it("should be able to create a circular payload if pointer is set", function () { + + var space = fo.ws.makeModelWorkspace('steve'); + var model = space.rootModel; + expect(model).toBeDefined(); + + var make = fo.ModelDeepPersist.newBlock; + + var block1 = make(); + var block2 = make(); + + model.capture(block1); + model.capture(block2); + + //circ is not defined so it does not get searialize + block1.otherPart = block2; + block2.otherPart = block1; + + + try { + var payload = space.currentModelToPayload() + expect(payload).toBeDefined(); + } + catch (ex) { + expect(ex).toBeUndefined(); + } + }); + + + var eventData = { + "createDate": "2014-07-15 14:35:53.784", + "type": "EVENT", + "locationList": [ + { + "address": { + "addressLine": "24 WHITON CT", + "city": "HANOVER", + "state": "MASSACHUSETTS", + "countryCode": "US", + "postalCode": "02339-3108" + }, + "position": [ + -70.89439796, + 42.15148925 + ], + "type": "U.S. Address", + "id": "415843" + }, + { + "address": { + "addressLine": "55 WOODCREST DR", + "city": "CHICOPEE", + "state": "MASSACHUSETTS", + "countryCode": "US", + "postalCode": "01020-2051" + }, + "position": [ + -72.58256065, + 42.18144338 + ], + "type": "Checkpoint", + "id": "415869" + } + ], + "tfEntityList": [ + { + "nuinList": [ + "4565464" + ], + "lastName": "SMITH", + "firstName": "JIM", + "dobList": [ + "7/16/1966" + ], + "genderCode": "M", + "birthCountryCodeList": [ + "US" + ], + "lookoutList": [ + { + "type": "TSDB", + "matchType": "POSITIVE" + }, + { + "type": "TSDB CARGO", + "matchType": "POSITIVE" + }, + { + "type": "TSDB CIS/ICE", + "matchType": "POSITIVE" + } + ], + "ipAddressList": [ + "4565464" + ], + "maritalStatus": "SEPARATED", + "personType": "CARGO", + "type": "PERSON", + "id": "809813", + "locationList": [ + { + "address": { + "addressLine": "57 CEDAR ST", + "city": "WOBURN", + "state": "MASSACHUSETTS", + "countryCode": "US", + "postalCode": "01801-2148" + }, + "position": [ + -71.122414, + 42.497421 + ], + "type": "Permanent Residence", + "id": "415871" + }, + { + "address": { + "addressLine": "57 CEDAR ST", + "city": "WOBURN", + "state": "MASSACHUSETTS", + "countryCode": "US", + "postalCode": "01801-2148" + }, + "position": [ + -71.122414, + 42.497421 + ], + "type": "Permanent Residence", + "id": "415871" + }, + { + "address": { + "addressLine": "57 CEDAR ST", + "city": "WOBURN", + "state": "MASSACHUSETTS", + "countryCode": "US", + "postalCode": "01801-2148" + }, + "position": [ + -71.122414, + 42.497421 + ], + "type": "Permanent Residence", + "id": "415871" + } + ] + }, + { + "nuinList": [ + "546546544", + "46546654", + "6845155" + ], + "lastName": "SMITH", + "firstName": "JOHNSON", + "middleName": "J", + "dobList": [ + "7/15/1981" + ], + "genderCode": "U", + "birthCountryCodeList": [ + "US" + ], + "travelDocumentList": [ + { + "type": "I-94", + "number": "3287878972", + "countryCode": "US", + "id": "968961" + }, + { + "type": "I-94", + "number": "3287878972", + "countryCode": "US", + "id": "968961" + }, + { + "type": "I-94", + "number": "3287878972", + "countryCode": "US", + "id": "968961" + }, + { + "type": "I-94", + "number": "3287878972", + "countryCode": "US", + "id": "968961" + }, + { + "type": "I-94", + "number": "3287878972", + "countryCode": "US", + "id": "968961" + }, + { + "type": "I-94", + "number": "3287878972", + "countryCode": "US", + "id": "968961" + } + ], + "lookoutList": [ + { + "type": "TSDB", + "matchType": "POSITIVE" + }, + { + "type": "TSDB CARGO", + "matchType": "POSITIVE" + }, + { + "type": "TSDB CIS/ICE", + "matchType": "POSITIVE" + } + ], + "ipAddressList": [ + "546546544", + "46546654", + "6845155" + ], + "maritalStatus": "MARRIED", + "personType": "TSDB", + "type": "PERSON", + "id": "809799", + "locationList": [ + { + "address": { + "addressLine": "886 CENTRE STBLDG 7", + "city": "NEWTON CENTRE", + "state": "MASSACHUSETTS", + "countryCode": "US", + "postalCode": "02459-1234" + }, + "position": [ + -71.19204385, + 42.34165 + ], + "type": "Service", + "id": "415870" + }, + { + "address": { + "addressLine": "96 CONTENT ST", + "city": "SOMERSET", + "state": "MASSACHUSETTS", + "countryCode": "US", + "postalCode": "02725-2109" + }, + "position": [ + -71.166787, + 41.725555 + ], + "type": "Home", + "id": "415844" + }, + { + "address": { + "addressLine": "886 CENTRE STBLDG 7", + "city": "NEWTON CENTRE", + "state": "MASSACHUSETTS", + "countryCode": "US", + "postalCode": "02459-1234" + }, + "position": [ + -71.19204385, + 42.34165 + ], + "type": "Service", + "id": "415870" + }, + { + "address": { + "addressLine": "96 CONTENT ST", + "city": "SOMERSET", + "state": "MASSACHUSETTS", + "countryCode": "US", + "postalCode": "02725-2109" + }, + "position": [ + -71.166787, + 41.725555 + ], + "type": "Home", + "id": "415844" + }, + { + "address": { + "addressLine": "886 CENTRE STBLDG 7", + "city": "NEWTON CENTRE", + "state": "MASSACHUSETTS", + "countryCode": "US", + "postalCode": "02459-1234" + }, + "position": [ + -71.19204385, + 42.34165 + ], + "type": "Service", + "id": "415870" + }, + { + "address": { + "addressLine": "96 CONTENT ST", + "city": "SOMERSET", + "state": "MASSACHUSETTS", + "countryCode": "US", + "postalCode": "02725-2109" + }, + "position": [ + -71.166787, + 41.725555 + ], + "type": "Home", + "id": "415844" + } + ] + } + ], + "status": "OPEN", + "id": "841894", + "createdBy": "kingman", + "createdPort": "9900", + "requestingPort": "0114", + "priority": "MEDIUM", + "modeOfEntry": "IST-Inspections - Truck", + "direction": "INBOUND", + "assignedUser": "kingman", + "assignedPort": "9900", + "internalRemarks": "Test from Visualization team.", + "assignedUnit": "OIT" + } + + it("should be able to create a a payload for an event entity", function () { + + var space = fo.ws.makeModelWorkspace('steve'); + var model = space.rootModel; + expect(model).toBeDefined(); + + var makeEvent = fo.ModelDeepPersist.newEventExtract; + var makePerson = fo.ModelDeepPersist.newPersonExtract; + var makeLocation = fo.ModelDeepPersist.newLocationExtract; + var makeAddress = fo.ModelDeepPersist.newAddressExtract; + + + var event = makeEvent(eventData); + model.capture(event); + + if (eventData.locationList) { + + var geo = fo.ModelDeepPersist.newGeographicExtract(eventData); + event.capture(geo, 'geographic'); + + + var list = eventData.locationList.map(function (item) { + var location = makeLocation(item) + location.address = makeAddress(item.address); + geo.capture(location); + location.address.myParent = geo; + return location; + }); + + geo.locationList = list; + } + + if (eventData.tfEntityList) { + eventData.tfEntityList.forEach(function (entity) { + if (entity.type.matches('person')) { + var person = makePerson(entity); + model.capture(person); + + if (entity.locationList) { + entity.locationList.forEach(function (location) { + person.capture(makeLocation(location)); + }); + } + } + }); + } + + + try { + var payload = space.currentModelToPayload() + expect(payload).toBeDefined(); + + var result = space.payloadToCurrentModel(payload); + expect(result).toBeDefined(); + + var model = space.rootModel; + expect(model).toBeDefined(); + } + catch (ex) { + expect(ex).toBeUndefined(); + } + }); + +}); \ No newline at end of file diff --git a/src/app/specs/oldJavaScriptTests/ModelPersistTest.js b/src/app/specs/oldJavaScriptTests/ModelPersistTest.js new file mode 100644 index 0000000..eedec5c --- /dev/null +++ b/src/app/specs/oldJavaScriptTests/ModelPersistTest.js @@ -0,0 +1,316 @@ +/// + + +/// +/// + +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// + + +describe("Foundry: Model Persist", function () { + + var namespace = 'ModelPersist'; + + var blockSpec = { + //myType: 'block', + height: 1, + width: 2, + baseArea: function () { return this.width * this.height }, + depth: 3, + side1Area: function () { return this.width * this.depth }, + side2Area: function () { return this.height * this.depth }, + volume: function () { return this.baseArea * this.depth }, + surfaceArea: function () { return 2.0 * this.baseArea + 2.0 * this.side1Area + 2.0 * this.side2Area }, + }; + + var blockShapeSpec = { + //myType: 'blockShape', + context: '', + height: 150, + width: 250, + Area: function () { return this.width * this.height }, + }; + + beforeEach(function () { + //should through an exception because we change with is registered + try { + fo.registerSpec(blockShapeSpec, fo.makeComponent); + } + catch (ex) { } + + //fo.registarSpec(namespace, blockShapeSpec.myType, blockShapeSpec); + + //function makeBlockShape(spec, subcomponents, parent) { + // var result = fo.makeComponent(spec, subcomponents, parent); + // return result; + //} + + }); + + it("should a simple constructor", function () { + var block = fo.new(blockSpec); + expect(block.height).toEqual(1); + expect(block.width).toEqual(2); + expect(block.depth).toEqual(3); + expect(block.volume).toEqual(3 * 2 * 1); + }); + + it("should be able to do a simple new with custom constructor", function () { + + fo.establishSpec(blockShapeSpec, function (properties, subcomponents, parent) { + var customSpec = fo.utils.union(properties, { Extra: 'XXX' }); + return fo.makeComponent(customSpec, subcomponents, parent); + }); + + var block = fo.new(blockShapeSpec); + + expect(block.height).toEqual(150); + expect(block.width).toEqual(250); + expect(block.Area).toEqual(250 * 150); + expect(block.Extra).toEqual('XXX'); + + }); + + it("should reg spec and create newInstance", function () { + var specA = { + planet: 'World', + greeting: function () { return 'Hello: ' + this.planet; } + } + fo.defineType('specA', specA); + + var item = fo.newInstance('specA'); + + expect(item.greeting).toEqual('Hello: World'); + }); + + it("should be able to defineType then call new", function () { + + var spec = fo.defineType('xx', blockSpec); + + var block = fo.new(spec); + expect(block.height).toEqual(1); + expect(block.width).toEqual(2); + expect(block.depth).toEqual(3); + expect(block.volume).toEqual(3 * 2 * 1); + }); + + it("should be able to newInstance from ref spec", function () { + + fo.defineType('AnyNameSpec', blockSpec); + + var block = fo.newInstance('AnyNameSpec'); + expect(block.height).toEqual(1); + expect(block.width).toEqual(2); + expect(block.depth).toEqual(3); + expect(block.volume).toEqual(3 * 2 * 1); + }); + + + it("should be able to extract spec from instance", function () { + + var blockSpec = { + height: 10, + width: 20, + Area: function () { return this.width * this.height }, + }; + + var type = fo.getNamespaceKey(namespace, 'steve'); + + fo.defineType(type, blockSpec); + + var block = fo.newInstance(type); + expect(block.Area).toEqual(200); + + block.height = 20; + expect(block.Area).toEqual(400); + + + var spec = block.getSpec(); + expect(spec.height).toEqual(20); + expect(spec.Area).toBeUndefined(); + + var block1 = fo.new(spec); + + expect(block1.height).toEqual(block.height); + expect(block1.width).toEqual(block.width); + expect(block1.Area).toBeUndefined(); // new does not union with existing spec + + + var block2 = fo.make(spec); + expect(block2.height).toEqual(block.height); + expect(block2.width).toEqual(block.width); + expect(block2.Area).toEqual(block.Area); // makeFromSpec does union with existing spec + + + }); + + + it("should be able to simplify duplicate using make", function () { + + var type = fo.getNamespaceKey(namespace, 'block'); + + var blockSpec = fo.defineType(type, { + height: 10, + width: 20, + Area: function () { return this.width * this.height }, + }); + + expect(blockSpec).toBeDefined(); + + var b1 = fo.new(blockSpec); + b1.width = b1.height; + + var dupeSpec = b1.getSpec(); + expect(dupeSpec.Area).toBeUndefined(); // new does not union with existing spec + + var b2 = fo.make(dupeSpec); + + expect(b2.height).toEqual(b1.height); + expect(b2.width).toEqual(b1.width); + expect(b2.Area).toEqual(b1.Area); // makeFromSpec does union with existing spec + + + }); + + + it("should be able to simplify duplicate with make and empty namespace", function () { + + var blockSpec = fo.establishType('block', { + height: 10, + width: 20, + Area: function () { return this.width * this.height }, + }); + + expect(blockSpec).toBeDefined(); + + var b1 = fo.make(blockSpec); + b1.width = b1.height; + + var dupeSpec = b1.getSpec(); + expect(dupeSpec.Area).toBeUndefined(); // new does not union with existing spec + + var b2 = fo.make(dupeSpec); + + expect(b2.height).toEqual(b1.height); + expect(b2.width).toEqual(b1.width); + expect(b2.Area).toEqual(b1.Area); // makeFromSpec does union with existing spec + + var b3 = fo.make(b2.getSpec()); + expect(b2.height).toEqual(b3.height); + expect(b2.width).toEqual(b3.width); + expect(b2.Area).toEqual(b3.Area); // makeFromSpec does union with existing spec + + }); + + + it("should be able to create a workspace", function () { + var space = fo.ws.makeModelWorkspace('steve') + expect(space).toBeDefined(); + expect(space.rootModel).toBeDefined(); + }) + + it("should be able to simplify duplicate shape and model", function () { + + var namespace = 'zoo'; + var animalSpec = fo.defineType('animal', { + headerText: '', + noteText: '', + noteUri: function () { + return "http://a-z-animals.com/animals/" + this.headerText + }, + }); + + expect(animalSpec).toBeDefined(); + + var canvas = document.getElementById('mainCanvas'); + var pip = document.getElementById('PIP'); + var pz = document.getElementById('panZoomCanvas'); + + if (!canvas) { + canvas = document.createElement('canvas'); + document.body.appendChild(canvas); + + pip = document.createElement('div'); + document.body.appendChild(pip); + + pz = document.createElement('canvas'); + pip.appendChild(pz); + } + + + + var space = fo.ws.makeNoteWorkspace('steve', { + canvasId: canvas, + panZoomCanvasId: pz, + pipId: pip, + }); + + var rootModel = space.rootModel; + var rootPage = space.rootPage; + + expect(space).toBeDefined(); + expect(space.rootModel).toBeDefined(); + expect(space.rootPage).toBeDefined(); + + var header = 'hello world'; + var note = fo.makeInstance(animalSpec, { headerText: header }); + rootModel.captureSubcomponent(note, fo.utils.generateUUID()); + + var shape = fo.construct('Shape2D', { context: note }); + rootPage.captureSubcomponent(shape, note.name); + + + }); + + + it("should help with dehydrate and rehydrate", function () { + + var blockSpec = fo.establishType('block', { + height: 10, + width: 20, + Area: function () { return this.width * this.height }, + }); + + expect(blockSpec).toBeDefined(); + + var m1 = fo.makeComponent(); + + var b1 = fo.make(blockSpec); + m1.captureSubcomponent(b1, 'steve'); + + b1.width = b1.height; + + var payload = b1.dehydrate(); + + var m1a = fo.makeComponent(); + var b1a = fo.make(payload, m1a); + + expect(b1a.name).toEqual(b1.name); + expect(b1a.height).toEqual(b1.height); + expect(b1a.width).toEqual(b1.width); + expect(b1a.Area).toEqual(b1.Area); // makeFromSpec does union with existing spec + + + var m2 = fo.makeComponent(); + m2.rehydrate(m2, [payload], {}); + + var b2 = m2.getSubcomponent('steve'); + + expect(b2.height).toEqual(b1.height); + expect(b2.width).toEqual(b1.width); + expect(b2.Area).toEqual(b1.Area); // makeFromSpec does union with existing spec + + + }); + +}); \ No newline at end of file diff --git a/src/app/specs/ModelTypeEstablishTest.js b/src/app/specs/oldJavaScriptTests/ModelTypeEstablishTest.js similarity index 100% rename from src/app/specs/ModelTypeEstablishTest.js rename to src/app/specs/oldJavaScriptTests/ModelTypeEstablishTest.js diff --git a/src/app/specs/ModelTypeTest.js b/src/app/specs/oldJavaScriptTests/ModelTypeTest.js similarity index 100% rename from src/app/specs/ModelTypeTest.js rename to src/app/specs/oldJavaScriptTests/ModelTypeTest.js diff --git a/src/app/specs/MomentTest.js b/src/app/specs/oldJavaScriptTests/MomentTest.js similarity index 100% rename from src/app/specs/MomentTest.js rename to src/app/specs/oldJavaScriptTests/MomentTest.js diff --git a/src/app/specs/OnPropertyChange.js b/src/app/specs/oldJavaScriptTests/OnPropertyChange.js similarity index 100% rename from src/app/specs/OnPropertyChange.js rename to src/app/specs/oldJavaScriptTests/OnPropertyChange.js diff --git a/src/app/specs/OnSmashTest.js b/src/app/specs/oldJavaScriptTests/OnSmashTest.js similarity index 100% rename from src/app/specs/OnSmashTest.js rename to src/app/specs/oldJavaScriptTests/OnSmashTest.js diff --git a/src/app/specs/OrderedCollectionTest.js b/src/app/specs/oldJavaScriptTests/OrderedCollectionTest.js similarity index 100% rename from src/app/specs/OrderedCollectionTest.js rename to src/app/specs/oldJavaScriptTests/OrderedCollectionTest.js diff --git a/src/app/specs/PromiseQTest.js b/src/app/specs/oldJavaScriptTests/PromiseQTest.js similarity index 100% rename from src/app/specs/PromiseQTest.js rename to src/app/specs/oldJavaScriptTests/PromiseQTest.js diff --git a/src/app/specs/PublishSubscribe.js b/src/app/specs/oldJavaScriptTests/PublishSubscribe.js similarity index 100% rename from src/app/specs/PublishSubscribe.js rename to src/app/specs/oldJavaScriptTests/PublishSubscribe.js diff --git a/src/app/specs/ShapeLayoutTest.js b/src/app/specs/oldJavaScriptTests/ShapeLayoutTest.js similarity index 100% rename from src/app/specs/ShapeLayoutTest.js rename to src/app/specs/oldJavaScriptTests/ShapeLayoutTest.js diff --git a/src/app/specs/ShapeTest.js b/src/app/specs/oldJavaScriptTests/ShapeTest.js similarity index 100% rename from src/app/specs/ShapeTest.js rename to src/app/specs/oldJavaScriptTests/ShapeTest.js diff --git a/src/app/specs/SiblingTest.js b/src/app/specs/oldJavaScriptTests/SiblingTest.js similarity index 100% rename from src/app/specs/SiblingTest.js rename to src/app/specs/oldJavaScriptTests/SiblingTest.js diff --git a/src/app/specs/SortForEachTest.js b/src/app/specs/oldJavaScriptTests/SortForEachTest.js similarity index 100% rename from src/app/specs/SortForEachTest.js rename to src/app/specs/oldJavaScriptTests/SortForEachTest.js diff --git a/src/app/specs/SortTest.js b/src/app/specs/oldJavaScriptTests/SortTest.js similarity index 100% rename from src/app/specs/SortTest.js rename to src/app/specs/oldJavaScriptTests/SortTest.js diff --git a/src/app/specs/SortViaParentTest.js b/src/app/specs/oldJavaScriptTests/SortViaParentTest.js similarity index 100% rename from src/app/specs/SortViaParentTest.js rename to src/app/specs/oldJavaScriptTests/SortViaParentTest.js diff --git a/src/app/specs/fo.PropertyTest.js b/src/app/specs/oldJavaScriptTests/fo.PropertyTest.js similarity index 100% rename from src/app/specs/fo.PropertyTest.js rename to src/app/specs/oldJavaScriptTests/fo.PropertyTest.js diff --git a/src/app/specs/fo.utils.Test.js b/src/app/specs/oldJavaScriptTests/fo.utils.Test.js similarity index 100% rename from src/app/specs/fo.utils.Test.js rename to src/app/specs/oldJavaScriptTests/fo.utils.Test.js diff --git a/src/app/specs/shape-testing/shape-testing.component.html b/src/app/specs/shape-testing/shape-testing.component.html new file mode 100644 index 0000000..4c76390 --- /dev/null +++ b/src/app/specs/shape-testing/shape-testing.component.html @@ -0,0 +1,9 @@ +

+ Lets shape testing on canvas +

+ + + +

+ Did Shapes that work? +

diff --git a/src/app/networkview/test-svg.component.spec.ts b/src/app/specs/shape-testing/shape-testing.component.spec.ts similarity index 53% rename from src/app/networkview/test-svg.component.spec.ts rename to src/app/specs/shape-testing/shape-testing.component.spec.ts index 11dc18c..0fff965 100644 --- a/src/app/networkview/test-svg.component.spec.ts +++ b/src/app/specs/shape-testing/shape-testing.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { TestSvgComponent } from './test-svg.component'; +import { ShapeTestingComponent } from './shape-testing.component'; -describe('TestSvgComponent', () => { - let component: TestSvgComponent; - let fixture: ComponentFixture; +describe('ShapeTestingComponent', () => { + let component: ShapeTestingComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ TestSvgComponent ] + declarations: [ ShapeTestingComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(TestSvgComponent); + fixture = TestBed.createComponent(ShapeTestingComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/specs/shape-testing/shape-testing.component.ts b/src/app/specs/shape-testing/shape-testing.component.ts new file mode 100644 index 0000000..4cef5a3 --- /dev/null +++ b/src/app/specs/shape-testing/shape-testing.component.ts @@ -0,0 +1,33 @@ +import { Component, OnInit, Input, ViewChild, ElementRef, AfterViewInit } from '@angular/core'; + +@Component({ + selector: 'fo-shape-testing', + templateUrl: './shape-testing.component.html' +}) +export class ShapeTestingComponent implements OnInit, AfterViewInit { + + @ViewChild('canvas') + public canvasRef: ElementRef; + + @Input() + public pageWidth = 1400; + @Input() + public pageHeight = 800; + + constructor() { } + + ngOnInit() { + let canvas = this.canvasRef.nativeElement; + + var ctx = canvas.getContext("2d"); + ctx.fillStyle = "#FF0000"; + ctx.fillRect(20, 20, 50, 100); + } + + public ngAfterViewInit() { + + + + } + +} diff --git a/src/app/treeview/treeitem.component.html b/src/app/treeview/treeitem.component.html index 846df61..943b016 100644 --- a/src/app/treeview/treeitem.component.html +++ b/src/app/treeview/treeitem.component.html @@ -20,5 +20,5 @@

- Did that work? + Did that SVG work?

\ No newline at end of file diff --git a/src/app/treeview/treeitem.component.spec.ts b/src/app/treeview/treeitem.component.spec.ts deleted file mode 100644 index 8a0d2df..0000000 --- a/src/app/treeview/treeitem.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { TreeitemComponent } from './treeitem.component'; - -describe('TreeitemComponent', () => { - let component: TreeitemComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ TreeitemComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(TreeitemComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/welcome/welcome.component.ts b/src/app/welcome/welcome.component.ts index 5fce425..5f1e999 100644 --- a/src/app/welcome/welcome.component.ts +++ b/src/app/welcome/welcome.component.ts @@ -11,15 +11,17 @@ import { SignalRService } from "../common/signalr.service"; @Component({ selector: 'foundry-welcome', - templateUrl: './welcome.component.html', - styleUrls: ['./welcome.component.css'] + templateUrl: './welcome.component.html' }) export class WelcomeComponent implements OnInit { - @ViewChild('chat') public inputRef: HTMLInputElement; + + @ViewChild('chat') + public inputRef: HTMLInputElement; + typeinText: string = ''; postList: Array = []; model = []; - + def: foConcept = new foConcept(); constructor(private signalR: SignalRService) { @@ -51,7 +53,7 @@ export class WelcomeComponent implements OnInit { ngOnInit(): void { - this.signalR.start().then( () => { + this.signalR.canStart() && this.signalR.start().then( () => { this.signalR.receive(data => { Toast.info(JSON.stringify(data), "receive"); this.postList.push(data); diff --git a/src/assets/3 in a row.knt.json b/src/assets/3 in a row.knt.json new file mode 100644 index 0000000..58ae5d4 --- /dev/null +++ b/src/assets/3 in a row.knt.json @@ -0,0 +1,350 @@ +{ + "model": [ + { + "myType": "note", + "name": "10315a9a-dd55-43ff-af8b-f4305f856c94", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "Launch New Tire", + "lastModified": "2013-08-29T20:01:50.714Z", + "uniqueID": "10315a9a-dd55-43ff-af8b-f4305f856c94", + "Subcomponents": [ + { + "myType": "note", + "name": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "parentHydrateId": "10315a9a-dd55-43ff-af8b-f4305f856c94", + "author": "anonymous", + "userId": "unknown", + "noteText": "Design Tire", + "lastModified": "2013-08-29T19:53:36.732Z", + "uniqueID": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "Subcomponents": [ + { + "myType": "note", + "name": "ec9162c7-297c-4edc-f33f-bf16cd66526b", + "parentHydrateId": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "author": "anonymous", + "userId": "unknown", + "noteText": "Get product specs from customer", + "headerText": "Get Specs", + "lastModified": "2013-08-29T19:59:32.912Z", + "uniqueID": "ec9162c7-297c-4edc-f33f-bf16cd66526b" + }, + { + "myType": "note", + "name": "f8204dab-e732-4a70-97d7-f9e29f73e7d7", + "parentHydrateId": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "author": "anonymous", + "userId": "unknown", + "noteText": "Create three possible designs", + "headerText": "Create Designs", + "lastModified": "2013-08-29T19:59:59.452Z", + "uniqueID": "f8204dab-e732-4a70-97d7-f9e29f73e7d7" + }, + { + "myType": "note", + "name": "6ae10347-f893-436b-abd6-420146658512", + "parentHydrateId": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "author": "anonymous", + "userId": "unknown", + "noteText": "Build test tires and test them", + "headerText": "Test Designs", + "lastModified": "2013-08-29T20:00:32.288Z", + "uniqueID": "6ae10347-f893-436b-abd6-420146658512" + }, + { + "myType": "note", + "name": "a47955f2-28d5-4515-f493-1e09e4dca7ea", + "parentHydrateId": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "author": "anonymous", + "userId": "unknown", + "noteText": "Select and refine best design", + "headerText": "Select Design", + "lastModified": "2013-08-29T20:00:59.812Z", + "uniqueID": "a47955f2-28d5-4515-f493-1e09e4dca7ea" + } + ] + }, + { + "myType": "note", + "name": "59f8dd15-8d18-4876-c545-630e8490231f", + "parentHydrateId": "10315a9a-dd55-43ff-af8b-f4305f856c94", + "author": "anonymous", + "userId": "unknown", + "noteText": "Manufacture Tire", + "lastModified": "2013-08-29T19:54:12.120Z", + "uniqueID": "59f8dd15-8d18-4876-c545-630e8490231f", + "Subcomponents": [ + { + "myType": "note", + "name": "a40f902b-2236-4971-a7c6-2f5e0b1b6d23", + "parentHydrateId": "59f8dd15-8d18-4876-c545-630e8490231f", + "author": "anonymous", + "userId": "unknown", + "noteText": "Make sufficient number of molds", + "headerText": "Make Molds", + "lastModified": "2013-08-29T19:57:39.194Z", + "uniqueID": "a40f902b-2236-4971-a7c6-2f5e0b1b6d23" + }, + { + "myType": "note", + "name": "dc55399b-ecf4-4358-9746-91209ff8120f", + "parentHydrateId": "59f8dd15-8d18-4876-c545-630e8490231f", + "author": "anonymous", + "userId": "unknown", + "noteText": "Buy raw materials", + "headerText": "Buy Materials", + "lastModified": "2013-08-29T19:58:06.822Z", + "uniqueID": "dc55399b-ecf4-4358-9746-91209ff8120f" + }, + { + "myType": "note", + "name": "efa7b6c5-1e10-411c-d8c6-ed6709657143", + "parentHydrateId": "59f8dd15-8d18-4876-c545-630e8490231f", + "author": "anonymous", + "userId": "unknown", + "noteText": "Build components and assemble tires", + "headerText": "Build Tires", + "lastModified": "2013-08-29T19:58:30.066Z", + "uniqueID": "efa7b6c5-1e10-411c-d8c6-ed6709657143" + }, + { + "myType": "note", + "name": "7ec89d6e-41e6-455a-8821-7001ee3c6c15", + "parentHydrateId": "59f8dd15-8d18-4876-c545-630e8490231f", + "author": "anonymous", + "userId": "unknown", + "noteText": "Send tire to distribution centers", + "headerText": "Ship Tires", + "lastModified": "2013-08-29T19:58:53.875Z", + "uniqueID": "7ec89d6e-41e6-455a-8821-7001ee3c6c15" + } + ] + }, + { + "myType": "note", + "name": "93d8c546-fafd-451c-c325-90a43bd9aa32", + "parentHydrateId": "10315a9a-dd55-43ff-af8b-f4305f856c94", + "author": "anonymous", + "userId": "unknown", + "noteText": "Sell Tire", + "lastModified": "2013-08-29T19:54:30.587Z", + "uniqueID": "93d8c546-fafd-451c-c325-90a43bd9aa32", + "Subcomponents": [ + { + "myType": "note", + "name": "5bace7b3-07ec-45c3-e421-1594d209c8da", + "parentHydrateId": "93d8c546-fafd-451c-c325-90a43bd9aa32", + "author": "anonymous", + "userId": "unknown", + "noteText": "Create Literature", + "lastModified": "2013-08-29T19:55:34.587Z", + "uniqueID": "5bace7b3-07ec-45c3-e421-1594d209c8da" + }, + { + "myType": "note", + "name": "1ae49173-c337-494e-e11b-241fce7064e2", + "parentHydrateId": "93d8c546-fafd-451c-c325-90a43bd9aa32", + "author": "anonymous", + "userId": "unknown", + "noteText": "Create TV and Magazine Ads", + "headerText": "Create Ads", + "lastModified": "2013-08-29T19:55:09.383Z", + "uniqueID": "1ae49173-c337-494e-e11b-241fce7064e2" + }, + { + "myType": "note", + "name": "03f337f0-62f6-4a54-ab55-b4454ec843c6", + "parentHydrateId": "93d8c546-fafd-451c-c325-90a43bd9aa32", + "author": "anonymous", + "userId": "unknown", + "noteText": "Buy TV time and magazine space", + "headerText": "Buy Media", + "lastModified": "2013-08-29T19:55:22.146Z", + "uniqueID": "03f337f0-62f6-4a54-ab55-b4454ec843c6" + } + ] + } + ] + } + ], + "drawing": [ + { + "myType": "note", + "name": "10315a9a-dd55-43ff-af8b-f4305f856c94", + "parentHydrateId": "DRAWING", + "pinX": 175.25, + "pinY": 95, + "isSelected": true, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "10315a9a-dd55-43ff-af8b-f4305f856c94", + "Subcomponents": [ + { + "myType": "note", + "name": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "parentHydrateId": "10315a9a-dd55-43ff-af8b-f4305f856c94", + "pinX": 10, + "pinY": 50, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "Subcomponents": [ + { + "myType": "note", + "name": "ec9162c7-297c-4edc-f33f-bf16cd66526b", + "parentHydrateId": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "pinX": 10, + "pinY": 50, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "ec9162c7-297c-4edc-f33f-bf16cd66526b" + }, + { + "myType": "note", + "name": "f8204dab-e732-4a70-97d7-f9e29f73e7d7", + "parentHydrateId": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "pinX": 10, + "pinY": 100, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "f8204dab-e732-4a70-97d7-f9e29f73e7d7" + }, + { + "myType": "note", + "name": "6ae10347-f893-436b-abd6-420146658512", + "parentHydrateId": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "pinX": 10, + "pinY": 150, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "6ae10347-f893-436b-abd6-420146658512" + }, + { + "myType": "note", + "name": "a47955f2-28d5-4515-f493-1e09e4dca7ea", + "parentHydrateId": "f77cdd5a-10dd-427c-9a93-3c1123e7d437", + "pinX": 10, + "pinY": 200, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "a47955f2-28d5-4515-f493-1e09e4dca7ea" + } + ] + }, + { + "myType": "note", + "name": "59f8dd15-8d18-4876-c545-630e8490231f", + "parentHydrateId": "10315a9a-dd55-43ff-af8b-f4305f856c94", + "pinX": 170, + "pinY": 50, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "59f8dd15-8d18-4876-c545-630e8490231f", + "Subcomponents": [ + { + "myType": "note", + "name": "a40f902b-2236-4971-a7c6-2f5e0b1b6d23", + "parentHydrateId": "59f8dd15-8d18-4876-c545-630e8490231f", + "pinX": 10, + "pinY": 50, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "a40f902b-2236-4971-a7c6-2f5e0b1b6d23" + }, + { + "myType": "note", + "name": "dc55399b-ecf4-4358-9746-91209ff8120f", + "parentHydrateId": "59f8dd15-8d18-4876-c545-630e8490231f", + "pinX": 10, + "pinY": 100, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "dc55399b-ecf4-4358-9746-91209ff8120f" + }, + { + "myType": "note", + "name": "efa7b6c5-1e10-411c-d8c6-ed6709657143", + "parentHydrateId": "59f8dd15-8d18-4876-c545-630e8490231f", + "pinX": 10, + "pinY": 150, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "efa7b6c5-1e10-411c-d8c6-ed6709657143" + }, + { + "myType": "note", + "name": "7ec89d6e-41e6-455a-8821-7001ee3c6c15", + "parentHydrateId": "59f8dd15-8d18-4876-c545-630e8490231f", + "pinX": 10, + "pinY": 200, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "7ec89d6e-41e6-455a-8821-7001ee3c6c15" + } + ] + }, + { + "myType": "note", + "name": "93d8c546-fafd-451c-c325-90a43bd9aa32", + "parentHydrateId": "10315a9a-dd55-43ff-af8b-f4305f856c94", + "pinX": 330, + "pinY": 50, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "93d8c546-fafd-451c-c325-90a43bd9aa32", + "Subcomponents": [ + { + "myType": "note", + "name": "5bace7b3-07ec-45c3-e421-1594d209c8da", + "parentHydrateId": "93d8c546-fafd-451c-c325-90a43bd9aa32", + "pinX": 10, + "pinY": 50, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "5bace7b3-07ec-45c3-e421-1594d209c8da" + }, + { + "myType": "note", + "name": "1ae49173-c337-494e-e11b-241fce7064e2", + "parentHydrateId": "93d8c546-fafd-451c-c325-90a43bd9aa32", + "pinX": 10, + "pinY": 100, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "1ae49173-c337-494e-e11b-241fce7064e2" + }, + { + "myType": "note", + "name": "03f337f0-62f6-4a54-ab55-b4454ec843c6", + "parentHydrateId": "93d8c546-fafd-451c-c325-90a43bd9aa32", + "pinX": 10, + "pinY": 150, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "03f337f0-62f6-4a54-ab55-b4454ec843c6" + } + ] + } + ] + } + ], + "sessionID": "NO_SESSION", + "lastModified": "2013-08-31T02:30:36.550Z" +} \ No newline at end of file diff --git a/src/assets/LA the plan.knt.json b/src/assets/LA the plan.knt.json new file mode 100644 index 0000000..3976860 --- /dev/null +++ b/src/assets/LA the plan.knt.json @@ -0,0 +1,875 @@ +{ + "model": [ + { + "myType": "note", + "name": "fbe1240b-b956-4f6a-f0af-a2bea4aec32f", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "We need a partner who has the resources, people and money", + "headerText": "We need a partner", + "lastModified": "2013-08-01T15:30:17.095Z", + "uniqueID": "fbe1240b-b956-4f6a-f0af-a2bea4aec32f" + }, + { + "myType": "note", + "name": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "We have most of what we need to pitch", + "lastModified": "2013-08-01T15:34:13.338Z", + "uniqueID": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "Subcomponents": [ + { + "myType": "note", + "name": "8c2e9eba-bc01-47aa-845d-040762be4fd2", + "parentHydrateId": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "author": "anonymous", + "userId": "unknown", + "noteText": "We have a communication target", + "lastModified": "2013-08-01T15:32:37.691Z", + "uniqueID": "8c2e9eba-bc01-47aa-845d-040762be4fd2" + }, + { + "myType": "note", + "name": "947828af-8794-4685-ca5f-f92d1a436bc4", + "parentHydrateId": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "author": "anonymous", + "userId": "unknown", + "noteText": "We are protecting our IC", + "lastModified": "2013-08-01T15:29:45.881Z", + "uniqueID": "947828af-8794-4685-ca5f-f92d1a436bc4" + }, + { + "myType": "note", + "name": "f6681ae0-a038-43da-d5a2-d678bb50977d", + "parentHydrateId": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "author": "anonymous", + "userId": "unknown", + "noteText": "We have our 'evidence'", + "lastModified": "2013-08-01T15:33:21.133Z", + "uniqueID": "f6681ae0-a038-43da-d5a2-d678bb50977d" + }, + { + "myType": "note", + "name": "9d856d1a-b0f0-431a-ab58-5f8f076b7e35", + "parentHydrateId": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "author": "anonymous", + "userId": "unknown", + "lastModified": "2013-08-01T15:37:08.713Z", + "uniqueID": "9d856d1a-b0f0-431a-ab58-5f8f076b7e35" + } + ] + }, + { + "myType": "note", + "name": "f4aa27bb-0faf-444b-87fd-c8bc34ab3c2d", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "E Discovery companies are our primary targets", + "headerText": "E Discovery companies primary targets", + "lastModified": "2013-08-01T14:43:28.015Z", + "uniqueID": "f4aa27bb-0faf-444b-87fd-c8bc34ab3c2d" + }, + { + "myType": "note", + "name": "ad6e618d-595c-4453-fb96-0945c65d2489", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "Kroll, Kcura, FTI Technologies and other magic quadrant winners are the first targets", + "headerText": "Magic quadrant winners first targets", + "lastModified": "2013-08-01T14:44:24.270Z", + "uniqueID": "ad6e618d-595c-4453-fb96-0945c65d2489" + }, + { + "myType": "note", + "name": "bf8e236c-9642-46f4-ac2f-0309bd16a152", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "TSOK explains the big picture of what we are doing", + "headerText": "TSOK has our vision", + "lastModified": "2013-08-01T14:33:38.865Z", + "uniqueID": "bf8e236c-9642-46f4-ac2f-0309bd16a152" + }, + { + "myType": "note", + "name": "880db6ad-4758-4e2f-9575-ed107537c4c2", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "We have a patent for the Legal Apprentice system", + "headerText": "Legal Apprentice Patent", + "lastModified": "2013-08-01T14:17:16.190Z", + "uniqueID": "880db6ad-4758-4e2f-9575-ed107537c4c2" + }, + { + "myType": "note", + "name": "fd68f5da-7709-4acc-9163-920319e37d05", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "We will get a provisional patent for KnowtShare", + "headerText": "KnowtShare Provisional Patent", + "lastModified": "2013-08-01T14:19:56.202Z", + "uniqueID": "fd68f5da-7709-4acc-9163-920319e37d05" + }, + { + "myType": "note", + "name": "f430d3a3-5039-4eb1-866b-b15e39e4e624", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "Everything doesn't have to be built to pitch the idea!!", + "headerText": "Everything doesn't have to be built", + "lastModified": "2013-08-01T14:38:07.460Z", + "uniqueID": "f430d3a3-5039-4eb1-866b-b15e39e4e624" + }, + { + "myType": "note", + "name": "383fdfbf-de3b-48b7-ec04-9347bc7c31e7", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "We have videos of template building, case editing and analysis", + "headerText": "We have videos of LA capabilities", + "lastModified": "2013-08-01T14:38:55.858Z", + "uniqueID": "383fdfbf-de3b-48b7-ec04-9347bc7c31e7" + }, + { + "myType": "note", + "name": "9a1c5f04-26b2-429d-f069-ad315d804892", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "KnowtShare is live demo-able and shows real time, mobile collaboration", + "headerText": "KnowtShare shows collaboration", + "lastModified": "2013-08-01T14:39:50.698Z", + "uniqueID": "9a1c5f04-26b2-429d-f069-ad315d804892" + }, + { + "myType": "note", + "name": "d2b28ece-f4e3-439e-be98-e026ad99da14", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "We need a story", + "lastModified": "2013-08-01T15:35:31.573Z", + "uniqueID": "d2b28ece-f4e3-439e-be98-e026ad99da14", + "Subcomponents": [ + { + "myType": "note", + "name": "70338d7d-74f4-4eaf-a01e-a14dc8348751", + "parentHydrateId": "d2b28ece-f4e3-439e-be98-e026ad99da14", + "author": "anonymous", + "userId": "unknown", + "noteText": "LA brings new benefits to clients", + "lastModified": "2013-08-01T15:28:38.875Z", + "uniqueID": "70338d7d-74f4-4eaf-a01e-a14dc8348751", + "Subcomponents": [ + { + "myType": "note", + "name": "e4ca73dd-c731-41c4-fa65-8449ef4cda6c", + "parentHydrateId": "70338d7d-74f4-4eaf-a01e-a14dc8348751", + "author": "anonymous", + "userId": "unknown", + "noteText": "Current solutions focus on compliance and efficiency", + "lastModified": "2013-08-01T15:27:35.620Z", + "uniqueID": "e4ca73dd-c731-41c4-fa65-8449ef4cda6c" + }, + { + "myType": "note", + "name": "67a43b24-72ba-4363-9ae4-d05837b9f23a", + "parentHydrateId": "70338d7d-74f4-4eaf-a01e-a14dc8348751", + "author": "anonymous", + "userId": "unknown", + "noteText": "LA is about winning", + "lastModified": "2013-08-01T15:26:40.349Z", + "uniqueID": "67a43b24-72ba-4363-9ae4-d05837b9f23a" + } + ] + } + ] + }, + { + "myType": "note", + "name": "b327f913-237b-4611-c155-beda2ffb95e1", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "Session Share", + "noteText": "We can help before and after E Discovery", + "lastModified": "2013-08-01T15:23:31.885Z", + "uniqueID": "b327f913-237b-4611-c155-beda2ffb95e1", + "Subcomponents": [ + { + "myType": "note", + "name": "2ef9fed9-765e-4e3a-8604-a34ce3a471fc", + "parentHydrateId": "b327f913-237b-4611-c155-beda2ffb95e1", + "author": "anonymous", + "userId": "Session Share", + "noteText": "We can help during E Discovery", + "lastModified": "2013-08-01T15:21:56.111Z", + "uniqueID": "2ef9fed9-765e-4e3a-8604-a34ce3a471fc", + "Subcomponents": [ + { + "myType": "note", + "name": "b5a897e2-973e-43af-abc2-8c322287af1d", + "parentHydrateId": "2ef9fed9-765e-4e3a-8604-a34ce3a471fc", + "author": "anonymous", + "userId": "unknown", + "noteText": "Identification, review and analysis are EDRM steps where we can play a role.", + "headerText": "We can play a role in EDRM", + "lastModified": "2013-08-01T14:51:11.569Z", + "uniqueID": "b5a897e2-973e-43af-abc2-8c322287af1d" + }, + { + "myType": "note", + "name": "17d90315-302e-4472-f730-7dea770a9836", + "parentHydrateId": "2ef9fed9-765e-4e3a-8604-a34ce3a471fc", + "author": "anonymous", + "userId": "unknown", + "noteText": "E Discovery Reference Model lays out the steps of the process", + "headerText": "EDRM lays out the process", + "lastModified": "2013-08-01T14:46:31.151Z", + "uniqueID": "17d90315-302e-4472-f730-7dea770a9836" + } + ] + }, + { + "myType": "note", + "name": "3073ebc9-ed16-4ab6-94a3-ee734d0b73b4", + "parentHydrateId": "b327f913-237b-4611-c155-beda2ffb95e1", + "author": "anonymous", + "userId": "Session Share", + "noteText": "We can help with predictive coding", + "lastModified": "2013-08-01T15:19:06.531Z", + "uniqueID": "3073ebc9-ed16-4ab6-94a3-ee734d0b73b4", + "Subcomponents": [ + { + "myType": "note", + "name": "02bcfac6-c586-4703-f366-0fcd40a24bcd", + "parentHydrateId": "3073ebc9-ed16-4ab6-94a3-ee734d0b73b4", + "author": "anonymous", + "userId": "Session Share", + "noteText": "LA could help Predictive coding score documents for their positive or negative impact on the case", + "headerText": "LA could help predictive coding score impact on case", + "lastModified": "2013-08-01T15:09:41.499Z", + "uniqueID": "02bcfac6-c586-4703-f366-0fcd40a24bcd" + }, + { + "myType": "note", + "name": "9b057619-14f6-4096-c062-cc8ed7605e33", + "parentHydrateId": "3073ebc9-ed16-4ab6-94a3-ee734d0b73b4", + "author": "anonymous", + "userId": "Session Share", + "noteText": "Predictive coding for review enhancement scores documents based on their likelihood of being relevant.", + "headerText": "Predictive coding is for review enhancement", + "lastModified": "2013-08-01T15:08:23.328Z", + "uniqueID": "9b057619-14f6-4096-c062-cc8ed7605e33" + } + ] + }, + { + "myType": "note", + "name": "8226b166-76da-4315-9920-5002a81d82ed", + "parentHydrateId": "b327f913-237b-4611-c155-beda2ffb95e1", + "author": "anonymous", + "userId": "Session Share", + "noteText": "We can help with early case assessment", + "lastModified": "2013-08-01T15:20:33.575Z", + "uniqueID": "8226b166-76da-4315-9920-5002a81d82ed", + "Subcomponents": [ + { + "myType": "note", + "name": "6128a368-dddb-4dce-b439-85e1e6f27d3b", + "parentHydrateId": "8226b166-76da-4315-9920-5002a81d82ed", + "author": "anonymous", + "userId": "unknown", + "noteText": "LA can help ECA by including keywords that relate to the cause of action and patterns of success in arguing them.", + "headerText": "LA will improve ECA keywords and strategy", + "lastModified": "2013-08-01T15:02:39.058Z", + "uniqueID": "6128a368-dddb-4dce-b439-85e1e6f27d3b" + }, + { + "myType": "note", + "name": "7405f621-37d0-4b0a-a0a0-8029dfb75ebc", + "parentHydrateId": "8226b166-76da-4315-9920-5002a81d82ed", + "author": "anonymous", + "userId": "unknown", + "noteText": "\"Identification\" is about early case assessment, case strategy and selecting keywords", + "headerText": "Identification includes Early Case Assessment", + "lastModified": "2013-08-01T15:01:31.131Z", + "uniqueID": "7405f621-37d0-4b0a-a0a0-8029dfb75ebc" + } + ] + } + ] + }, + { + "myType": "note", + "name": "7bbdd6c4-91bb-44fe-fd33-6ecb06873f61", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "Legal Software today is about document management and client management, not winning cases", + "headerText": "Legal Software about documents and clients, not winning", + "lastModified": "2013-08-01T14:54:27.247Z", + "uniqueID": "7bbdd6c4-91bb-44fe-fd33-6ecb06873f61" + }, + { + "myType": "note", + "name": "b7a7a932-df74-4994-8456-2bc7e38a0951", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "E discovery is a means to an end, the 'end' is to win the case.", + "headerText": "E Discovery is a means to win the case", + "lastModified": "2013-08-01T14:53:22.029Z", + "uniqueID": "b7a7a932-df74-4994-8456-2bc7e38a0951" + }, + { + "myType": "note", + "name": "d7265cdb-b903-4719-953a-c32631cd6655", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "LA is about collaborating to prepare the best case possible.", + "headerText": "LA is about collaborating for the best case", + "lastModified": "2013-08-01T14:56:57.639Z", + "uniqueID": "d7265cdb-b903-4719-953a-c32631cd6655" + }, + { + "myType": "note", + "name": "c3c76303-758e-4d98-b63c-c0013a29d2ac", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "There are some things we need to do", + "lastModified": "2013-08-01T15:37:47.476Z", + "uniqueID": "c3c76303-758e-4d98-b63c-c0013a29d2ac" + }, + { + "myType": "note", + "name": "5a19997e-6ee2-40ee-b7ae-17b10b21ae46", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "Session Share", + "noteText": "We need to study predictive coding in-depth and go after the leader or its competitors", + "headerText": "We need to study predictive coding in-depth", + "lastModified": "2013-08-01T15:11:12.810Z", + "uniqueID": "5a19997e-6ee2-40ee-b7ae-17b10b21ae46" + }, + { + "myType": "note", + "name": "c21136fe-d29e-48b6-cee3-9bf72fda9ec7", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "You can build LA Templates collaboratively with KS", + "headerText": "Build LA Templates with KS", + "lastModified": "2013-08-01T14:32:06.430Z", + "uniqueID": "c21136fe-d29e-48b6-cee3-9bf72fda9ec7" + }, + { + "myType": "note", + "name": "c524cf34-612f-40f8-b0ed-60d6086e336c", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "Need to build a dynamic checklist model for KnowtShare", + "headerText": "Dynamic Checklist for KnowtShare", + "lastModified": "2013-08-01T14:22:09.330Z", + "uniqueID": "c524cf34-612f-40f8-b0ed-60d6086e336c" + }, + { + "myType": "note", + "name": "dc0892c5-a88f-48de-febb-f25f91134e05", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "There are things that can wait", + "lastModified": "2013-08-01T15:38:25.385Z", + "uniqueID": "dc0892c5-a88f-48de-febb-f25f91134e05" + }, + { + "myType": "note", + "name": "bc60920a-7371-45c5-89fa-634aeea8c7af", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "Need to rebuild Legal Apprentice using KnowtShare approach", + "headerText": "Rebuild LA a la KnowtShare ", + "lastModified": "2013-08-01T14:28:22.416Z", + "uniqueID": "bc60920a-7371-45c5-89fa-634aeea8c7af" + }, + { + "myType": "note", + "name": "aef8c486-2809-4cec-fafd-4e93a1c736eb", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "KS is not the best environment for creating cases based on templates. We need to create a case editor in JavaScript.", + "headerText": "Need JavaScript case editor", + "lastModified": "2013-08-01T14:35:26.609Z", + "uniqueID": "aef8c486-2809-4cec-fafd-4e93a1c736eb" + }, + { + "myType": "note", + "name": "8a59b183-9801-4680-b94f-1df82f9d0b61", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "LA analysis provides insight into the patterns of winning and losing", + "headerText": "LA analysis provides insight into winning", + "lastModified": "2013-08-01T14:56:57.905Z", + "uniqueID": "8a59b183-9801-4680-b94f-1df82f9d0b61" + }, + { + "myType": "note", + "name": "6b5bde9b-c74b-4586-840b-7055c6d54927", + "parentHydrateId": "MODEL", + "author": "anonymous", + "userId": "unknown", + "noteText": "We play an even bigger role in what happens after E Discovery!", + "headerText": "We play a bigger role after E Discovery", + "lastModified": "2013-08-01T14:52:15.434Z", + "uniqueID": "6b5bde9b-c74b-4586-840b-7055c6d54927" + } + ], + "drawing": [ + { + "myType": "note", + "name": "f4aa27bb-0faf-444b-87fd-c8bc34ab3c2d", + "parentHydrateId": "DRAWING", + "pinX": 10, + "pinY": 50, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "f4aa27bb-0faf-444b-87fd-c8bc34ab3c2d" + }, + { + "myType": "note", + "name": "ad6e618d-595c-4453-fb96-0945c65d2489", + "parentHydrateId": "DRAWING", + "pinX": 10, + "pinY": 100, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "ad6e618d-595c-4453-fb96-0945c65d2489" + }, + { + "myType": "note", + "name": "bf8e236c-9642-46f4-ac2f-0309bd16a152", + "parentHydrateId": "DRAWING", + "pinX": 10, + "pinY": 50, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "bf8e236c-9642-46f4-ac2f-0309bd16a152" + }, + { + "myType": "note", + "name": "880db6ad-4758-4e2f-9575-ed107537c4c2", + "parentHydrateId": "DRAWING", + "pinX": 10, + "pinY": 100, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "880db6ad-4758-4e2f-9575-ed107537c4c2" + }, + { + "myType": "note", + "name": "f430d3a3-5039-4eb1-866b-b15e39e4e624", + "parentHydrateId": "DRAWING", + "pinX": 10, + "pinY": 50, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "f430d3a3-5039-4eb1-866b-b15e39e4e624" + }, + { + "myType": "note", + "name": "383fdfbf-de3b-48b7-ec04-9347bc7c31e7", + "parentHydrateId": "DRAWING", + "pinX": 10, + "pinY": 100, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "383fdfbf-de3b-48b7-ec04-9347bc7c31e7" + }, + { + "myType": "note", + "name": "7bbdd6c4-91bb-44fe-fd33-6ecb06873f61", + "parentHydrateId": "DRAWING", + "pinX": 10, + "pinY": 50, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "7bbdd6c4-91bb-44fe-fd33-6ecb06873f61" + }, + { + "myType": "note", + "name": "d7265cdb-b903-4719-953a-c32631cd6655", + "parentHydrateId": "DRAWING", + "pinX": 10, + "pinY": 50, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "d7265cdb-b903-4719-953a-c32631cd6655" + }, + { + "myType": "note", + "name": "c524cf34-612f-40f8-b0ed-60d6086e336c", + "parentHydrateId": "DRAWING", + "pinX": 26.10510057149844, + "pinY": 428.61823000000015, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "c524cf34-612f-40f8-b0ed-60d6086e336c" + }, + { + "myType": "note", + "name": "b7a7a932-df74-4994-8456-2bc7e38a0951", + "parentHydrateId": "DRAWING", + "pinX": 158.16692525778575, + "pinY": 668.5100300000001, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "b7a7a932-df74-4994-8456-2bc7e38a0951" + }, + { + "myType": "note", + "name": "c21136fe-d29e-48b6-cee3-9bf72fda9ec7", + "parentHydrateId": "DRAWING", + "pinX": 164.60896548638513, + "pinY": 91.94745, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "c21136fe-d29e-48b6-cee3-9bf72fda9ec7" + }, + { + "myType": "note", + "name": "aef8c486-2809-4cec-fafd-4e93a1c736eb", + "parentHydrateId": "DRAWING", + "pinX": 222.58732754377956, + "pinY": 331.91344000000003, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "aef8c486-2809-4cec-fafd-4e93a1c736eb" + }, + { + "myType": "note", + "name": "8a59b183-9801-4680-b94f-1df82f9d0b61", + "parentHydrateId": "DRAWING", + "pinX": 354.9860918871677, + "pinY": 583.3013800000001, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "8a59b183-9801-4680-b94f-1df82f9d0b61" + }, + { + "myType": "note", + "name": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "parentHydrateId": "DRAWING", + "pinX": 382.68250001430016, + "pinY": 837.5627305000003, + "showSubcomponents": true, + "minWidth": 150, + "width": 700, + "minHeight": 150, + "uniqueID": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "Subcomponents": [ + { + "myType": "note", + "name": "8c2e9eba-bc01-47aa-845d-040762be4fd2", + "parentHydrateId": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "8c2e9eba-bc01-47aa-845d-040762be4fd2" + }, + { + "myType": "note", + "name": "947828af-8794-4685-ca5f-f92d1a436bc4", + "parentHydrateId": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "947828af-8794-4685-ca5f-f92d1a436bc4" + }, + { + "myType": "note", + "name": "f6681ae0-a038-43da-d5a2-d678bb50977d", + "parentHydrateId": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "f6681ae0-a038-43da-d5a2-d678bb50977d" + }, + { + "myType": "note", + "name": "9d856d1a-b0f0-431a-ab58-5f8f076b7e35", + "parentHydrateId": "ac68f934-a489-4a24-c53d-a4b46855e0b6", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "9d856d1a-b0f0-431a-ab58-5f8f076b7e35" + } + ] + }, + { + "myType": "note", + "name": "bc60920a-7371-45c5-89fa-634aeea8c7af", + "parentHydrateId": "DRAWING", + "pinX": 390.08037348736343, + "pinY": 37.11592000000002, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "bc60920a-7371-45c5-89fa-634aeea8c7af" + }, + { + "myType": "note", + "name": "fbe1240b-b956-4f6a-f0af-a2bea4aec32f", + "parentHydrateId": "DRAWING", + "pinX": 521.7661543584709, + "pinY": 304.74160210000025, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "fbe1240b-b956-4f6a-f0af-a2bea4aec32f" + }, + { + "myType": "note", + "name": "9a1c5f04-26b2-429d-f069-ad315d804892", + "parentHydrateId": "DRAWING", + "pinX": 609.1097412597425, + "pinY": 539.7434200000001, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "9a1c5f04-26b2-429d-f069-ad315d804892" + }, + { + "myType": "note", + "name": "fd68f5da-7709-4acc-9163-920319e37d05", + "parentHydrateId": "DRAWING", + "pinX": 679.9721837743356, + "pinY": 83.96909, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "fd68f5da-7709-4acc-9163-920319e37d05" + }, + { + "myType": "note", + "name": "5a19997e-6ee2-40ee-b7ae-17b10b21ae46", + "parentHydrateId": "DRAWING", + "pinX": 860.3493101751181, + "pinY": 364.0494500000001, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "5a19997e-6ee2-40ee-b7ae-17b10b21ae46" + }, + { + "myType": "note", + "name": "b327f913-237b-4611-c155-beda2ffb95e1", + "parentHydrateId": "DRAWING", + "pinX": 1151.8516305192404, + "pinY": 201.38794000000004, + "showSubcomponents": true, + "minWidth": 150, + "width": 530, + "minHeight": 150, + "uniqueID": "b327f913-237b-4611-c155-beda2ffb95e1", + "Subcomponents": [ + { + "myType": "note", + "name": "2ef9fed9-765e-4e3a-8604-a34ce3a471fc", + "parentHydrateId": "b327f913-237b-4611-c155-beda2ffb95e1", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "2ef9fed9-765e-4e3a-8604-a34ce3a471fc", + "Subcomponents": [ + { + "myType": "note", + "name": "b5a897e2-973e-43af-abc2-8c322287af1d", + "parentHydrateId": "2ef9fed9-765e-4e3a-8604-a34ce3a471fc", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "b5a897e2-973e-43af-abc2-8c322287af1d" + }, + { + "myType": "note", + "name": "17d90315-302e-4472-f730-7dea770a9836", + "parentHydrateId": "2ef9fed9-765e-4e3a-8604-a34ce3a471fc", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "17d90315-302e-4472-f730-7dea770a9836" + } + ] + }, + { + "myType": "note", + "name": "3073ebc9-ed16-4ab6-94a3-ee734d0b73b4", + "parentHydrateId": "b327f913-237b-4611-c155-beda2ffb95e1", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "3073ebc9-ed16-4ab6-94a3-ee734d0b73b4", + "Subcomponents": [ + { + "myType": "note", + "name": "02bcfac6-c586-4703-f366-0fcd40a24bcd", + "parentHydrateId": "3073ebc9-ed16-4ab6-94a3-ee734d0b73b4", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "02bcfac6-c586-4703-f366-0fcd40a24bcd" + }, + { + "myType": "note", + "name": "9b057619-14f6-4096-c062-cc8ed7605e33", + "parentHydrateId": "3073ebc9-ed16-4ab6-94a3-ee734d0b73b4", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "9b057619-14f6-4096-c062-cc8ed7605e33" + } + ] + }, + { + "myType": "note", + "name": "8226b166-76da-4315-9920-5002a81d82ed", + "parentHydrateId": "b327f913-237b-4611-c155-beda2ffb95e1", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "8226b166-76da-4315-9920-5002a81d82ed", + "Subcomponents": [ + { + "myType": "note", + "name": "6128a368-dddb-4dce-b439-85e1e6f27d3b", + "parentHydrateId": "8226b166-76da-4315-9920-5002a81d82ed", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "6128a368-dddb-4dce-b439-85e1e6f27d3b" + }, + { + "myType": "note", + "name": "7405f621-37d0-4b0a-a0a0-8029dfb75ebc", + "parentHydrateId": "8226b166-76da-4315-9920-5002a81d82ed", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "7405f621-37d0-4b0a-a0a0-8029dfb75ebc" + } + ] + } + ] + }, + { + "myType": "note", + "name": "d2b28ece-f4e3-439e-be98-e026ad99da14", + "parentHydrateId": "DRAWING", + "pinX": 1228.216365687021, + "pinY": 623.2843749999997, + "showSubcomponents": true, + "minWidth": 150, + "width": 910, + "minHeight": 150, + "uniqueID": "d2b28ece-f4e3-439e-be98-e026ad99da14", + "Subcomponents": [ + { + "myType": "note", + "name": "70338d7d-74f4-4eaf-a01e-a14dc8348751", + "parentHydrateId": "d2b28ece-f4e3-439e-be98-e026ad99da14", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "70338d7d-74f4-4eaf-a01e-a14dc8348751", + "Subcomponents": [ + { + "myType": "note", + "name": "e4ca73dd-c731-41c4-fa65-8449ef4cda6c", + "parentHydrateId": "70338d7d-74f4-4eaf-a01e-a14dc8348751", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "e4ca73dd-c731-41c4-fa65-8449ef4cda6c" + }, + { + "myType": "note", + "name": "67a43b24-72ba-4363-9ae4-d05837b9f23a", + "parentHydrateId": "70338d7d-74f4-4eaf-a01e-a14dc8348751", + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "67a43b24-72ba-4363-9ae4-d05837b9f23a" + } + ] + } + ] + }, + { + "myType": "note", + "name": "c3c76303-758e-4d98-b63c-c0013a29d2ac", + "parentHydrateId": "DRAWING", + "pinX": 1695.7146645652346, + "pinY": 915.4376048266979, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "c3c76303-758e-4d98-b63c-c0013a29d2ac" + }, + { + "myType": "note", + "name": "6b5bde9b-c74b-4586-840b-7055c6d54927", + "parentHydrateId": "DRAWING", + "pinX": 1849.6074278915703, + "pinY": 378.6182300000001, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "6b5bde9b-c74b-4586-840b-7055c6d54927" + }, + { + "myType": "note", + "name": "dc0892c5-a88f-48de-febb-f25f91134e05", + "parentHydrateId": "DRAWING", + "pinX": 1952.7707924248757, + "pinY": 1110.809619758198, + "showSubcomponents": true, + "minWidth": 150, + "minHeight": 150, + "uniqueID": "dc0892c5-a88f-48de-febb-f25f91134e05" + } + ], + "sessionID": "NO_SESSION", + "title": "untitled", + "subTitle": "", + "lastModified": "2013-09-01T23:46:56.737Z", + "userNickName": "anonymous", + "userId": "unknown" +} \ No newline at end of file diff --git a/src/assets/azuredeploy.json b/src/assets/azuredeploy.json new file mode 100644 index 0000000..11cb953 --- /dev/null +++ b/src/assets/azuredeploy.json @@ -0,0 +1,603 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmPrefix": { + "type": "string", + "metadata": { + "description": "Base string for naming resources (max length of 8)" + }, + "maxLength": 8 + }, + "MasterVMsku": { + "type": "string", + "defaultValue": "Standard_DS14_v2", + "allowedValues": [ + "Standard_DS1_v2", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2" + ], + "metadata": { + "description": "sku to use for the master VM" + } + }, + "masterImage": { + "type": "string", + "defaultValue": "CentOS_7.4", + "allowedValues": [ + "CentOS_6.7", + "CentOS_7.2", + "CentOS_7.3", + "CentOS_7.4", + "RHEL_7.2" + ], + "metadata": { + "description": "The VM image of the master nodes" + } + }, + "CompNodeVMsku": { + "type": "string", + "defaultValue": "Standard_H16r", + "allowedValues": [ + "Standard_A8", + "Standard_A9", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_F4", + "Standard_F8", + "Standard_F16", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s", + "Standard_H8", + "Standard_H16", + "Standard_H8m", + "Standard_H16m", + "Standard_H16r", + "Standard_H16mr", + "Standard_NC6", + "Standard_NC12", + "Standard_NC24", + "Standard_NC24r" + ], + "metadata": { + "description": "Instance type to use for the compute nodes" + } + }, + "computeNodeImage": { + "type": "string", + "defaultValue": "CentOS-HPC_7.4", + "allowedValues": [ + "CentOS_6.7", + "CentOS_7.4", + "CentOS-HPC_7.1", + "CentOS-HPC_7.3", + "CentOS-HPC_7.4", + "RHEL_7.2" + ], + "metadata": { + "description": "The VM image of the compute nodes" + } + }, + "computeNodeCount": { + "type": "int", + "metadata": { + "description": "Number of VM instances for Compute Node Scaleset (100 or less)." + }, + "defaultValue": 2, + "maxValue": 100 + }, + "adminUserName": { + "type": "string", + "metadata": { + "description": "User name for the Virtual Machine." + } + }, + "authenticationType": { + "type": "string", + "defaultValue": "password", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "metadata": { + "description": "Authentication type for the virtual machines" + } + }, + "adminPassword": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "Admin password for the virtual machines" + } + }, + "sshPublicKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "SSH public key that will be included on all nodes. The OpenSSH public key can be generated with tools like ssh-keygen on Linux or OS X." + } + }, + "dataDiskSize": { + "type": "int", + "defaultValue": 128, + "metadata": { + "description": "The size in GB of each of 16 data disks that are attached to the VM. A RAID-0 volume is created with all data disks that is dataDiskSize * dataDiskCount in size." + } + }, + "nbDataDisks": { + "type": "int", + "defaultValue": 8, + "maxValue": 16, + "metadata": { + "description": "The number of disks to attach to the NFS server." + } + } + }, + "variables": { + "location": "[resourceGroup().location]", + "namingInfix": "[toLower(substring(concat(parameters('vmPrefix'), uniqueString(resourceGroup().id)), 0, 9))]", + "longNamingInfix": "[toLower(parameters('vmPrefix'))]", + "newStorageAccountSuffix": "[concat(variables('longNamingInfix'), 'sa')]", + "virtualNetworkName": "grid-vnet", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", + "addressPrefix": "10.0.0.0/20", + "computeSubnetPrefix": "10.0.0.0/21", + "storageSubnetPrefix": "10.0.10.0/25", + "infraSubnetPrefix": "10.0.8.0/28", + "gatewaySubnetPrefix": "10.0.9.0/29", + "infraSubnetRef": "[concat(variables('vnetID'),'/subnets/infraSubnet/')]", + "computeSubnetRef": "[concat(variables('vnetID'),'/subnets/computeSubnet/')]", + "nsgName": "nsg-master", + "masterBoxName": "[concat(variables('longNamingInfix'), 'master')]", + "DiagSAName": "[concat(uniqueString(concat(resourceGroup().id, variables('newStorageAccountSuffix'), 'masterboxsadiag')), 'diag')]", + "MasterIPConfigName": "[concat(variables('masterBoxName'), 'ipconfig')]", + "MasterNicName": "[concat(variables('masterBoxName'), 'nic')]", + "publicIPAddressName": "[concat(variables('masterBoxName'), 'pip')]", + "publicIPDomainName": "[variables('namingInfix')]", + "osType": "linux", + "MasterimageReference": "[variables('computeImages')[parameters('masterImage')]]", + "sshKeyPath": "[concat('/home/',parameters('adminUserName'),'/.ssh/authorized_keys')]", + "computeImages": { + "CentOS_6.7": { + "publisher": "OpenLogic", + "offer": "CentOS", + "sku": "6.7", + "version": "latest" + }, + "CentOS_7.2": { + "publisher": "OpenLogic", + "offer": "CentOS", + "sku": "7.2", + "version": "latest" + }, + "CentOS_7.3": { + "publisher": "OpenLogic", + "offer": "CentOS", + "sku": "7.2", + "version": "latest" + }, + "CentOS_7.4": { + "publisher": "OpenLogic", + "offer": "CentOS", + "sku": "7.2", + "version": "latest" + }, + "CentOS-HPC_7.1": { + "publisher": "OpenLogic", + "offer": "CentOS-HPC", + "sku": "7.1", + "version": "latest" + }, + "CentOS-HPC_7.3": { + "publisher": "OpenLogic", + "offer": "CentOS-HPC", + "sku": "7.1", + "version": "latest" + }, + "CentOS-HPC_7.4": { + "publisher": "OpenLogic", + "offer": "CentOS-HPC", + "sku": "7.1", + "version": "latest" + }, + "RHEL_7.2": { + "publisher": "RedHat", + "offer": "RHEL", + "sku": "7.2", + "version": "latest" + } + }, + + "linuxConfiguration_sshPublicKey": { + "disablePasswordAuthentication": "true", + "ssh": { + "publicKeys": [ + { + "path": "[variables('sshKeyPath')]", + "keyData": "[parameters('sshPublicKey')]" + } + ] + } + }, + "linuxConfiguration_password": { }, + "linuxConfiguration": "[variables(concat('linuxConfiguration_',parameters('authenticationType')))]", + + + "storageAccountType": "Standard_LRS", + + + "NodeimageReference": "[variables('computeImages')[parameters('computeNodeImage')]]", + "vmssnamingInfix": "[toLower(take(concat(parameters('vmPrefix'), uniqueString(resourceGroup().id)), 9))]", + "NodenicName": "[concat(variables('vmssnamingInfix'), 'nic')]", + "NodeipConfigName": "[concat(variables('vmssnamingInfix'), 'ipconfig')]", + + "dataDiskArray": [ + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "0", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "1", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "2", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "3", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "4", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "5", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "6", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "7", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "8", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "9", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "10", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "11", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "12", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "13", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "14", + "createOption": "Empty" + }, + { + "diskSizeGB": "[parameters('datadiskSize')]", + "lun": "15", + "createOption": "Empty" + } + ], + + "mastervmScripts": { + "scriptsToDownload": [ + "https://raw.githubusercontent.com/grandparoach/simpleMPIPOC/gov/master-setup.sh" + ], + "commandToExecute": "bash master-setup.sh" + }, + + "vmScripts": { + "scriptsToDownload": [ + "https://raw.githubusercontent.com/grandparoach/simpleMPIPOC/gov/cn-setup.sh" + ], + "commandToExecute": "[concat('bash cn-setup.sh ', variables('masterBoxName'))]" + } + }, + + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('virtualNetworkName')]", + "location": "[resourceGroup().location]", + "apiVersion": "2016-03-30", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "computeSubnet", + "properties": { + "addressPrefix": "[variables('computeSubnetPrefix')]" + } + }, + { + "name": "storageSubnet", + "properties": { + "addressPrefix": "[variables('storageSubnetPrefix')]" + } + }, + { + "name": "infraSubnet", + "properties": { + "addressPrefix": "[variables('infraSubnetPrefix')]" + } + }, + { + "name": "GatewaySubnet", + "properties": { + "addressPrefix": "[variables('gatewaySubnetPrefix')]" + } + } + ] + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('DiagSAName')]", + "location": "[variables('location')]", + "apiVersion": "2015-06-15", + "properties": { + "accountType": "Standard_LRS" + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "name": "[variables('publicIPAddressName')]", + "location": "[variables('location')]", + "apiVersion": "2016-03-30", + "properties": { + "publicIPAllocationMethod": "Dynamic" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "name": "[variables('MasterNicName')]", + "location": "[variables('location')]", + "apiVersion": "2016-03-30", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "[variables('MasterIPConfigName')]", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" + }, + "subnet": { + "id": "[variables('infraSubnetRef')]" + } + } + } + ] + } + }, + + { + "type": "Microsoft.Compute/virtualMachines", + "name": "[variables('masterBoxName')]", + "location": "[variables('location')]", + "apiVersion": "2016-04-30-preview", + "dependsOn": [ + "[concat('Microsoft.Network/networkinterfaces/', variables('MasterNicName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('DiagSAName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('MasterVMsku')]" + }, + "osProfile": { + "computerName": "[variables('masterBoxName')]", + "adminUsername": "[parameters('adminUserName')]", + "adminPassword": "[parameters('adminPassword')]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('MasterimageReference')]", + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + }, + "dataDisks": "[take(variables('dataDiskArray'),parameters('nbDataDisks'))]" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('MasterNicName'))]" + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": "true", + "storageUri": "[concat('http://',variables('DiagSAName'),'.blob.core.usgovcloudapi.net')]" + } + } + } + }, + + + { + "type": "Microsoft.Compute/virtualMachines/extensions", + "name": "[concat(variables('masterBoxName'), '/ext')]", + "apiVersion": "2015-06-15", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', variables('masterBoxName'))]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": "[variables('mastervmScripts').scriptsToDownload]" + }, + "protectedSettings": { + "commandToExecute": "[variables('mastervmScripts').commandToExecute]" + } + } + }, + + + { + "type": "Microsoft.Compute/virtualMachineScaleSets", + "name": "[parameters('vmPrefix')]", + "location": "[variables('location')]", + "apiVersion": "2016-04-30-preview", + "sku": { + "name": "[parameters('CompNodeVMsku')]", + "tier": "Standard", + "capacity": "[parameters('computeNodeCount')]" + }, + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[concat('Microsoft.Compute/virtualMachines/', variables('masterBoxName'),'/extensions/ext')]" + ], + "properties": { + "overprovision": "false", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "[variables('NodenicName')]", + "properties": { + "primary": "true", + "ipConfigurations": [ + { + "name": "[variables('NodeipConfigName')]", + "properties": { + "subnet": { + "id": "[variables('computeSubnetRef')]" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "computerNamePrefix": "[variables('vmssnamingInfix')]", + "adminUsername": "[parameters('adminUserName')]", + "adminPassword": "[parameters('adminPassword')]", + "linuxConfiguration": "[variables('linuxConfiguration')]" + }, + "storageProfile": { + "imageReference": "[variables('NodeimageReference')]", + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "installCN", + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": "[variables('vmScripts').scriptsToDownload]", + "commandToExecute": "[variables('vmScripts').commandToExecute]" + } + } + } + ] + } + } + } + } + ] +} + + + + + + + + + + + + + + + diff --git a/src/assets/azuredeployparams.json b/src/assets/azuredeployparams.json new file mode 100644 index 0000000..4ec9c99 --- /dev/null +++ b/src/assets/azuredeployparams.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmPrefix": { "value": "sample" }, + "MasterVMsku": { "value": "Standard_DS4_v2" }, + "masterImage": { "value": "CentOS_7.2" }, + "authenticationType": { "value": "sshPublicKey" }, + "dataDiskSize": { "value": "P10" }, + "nbDataDisks": { "value": 8 }, + "CompNodeVMsku": { "value": "Standard_H16r" }, + "computeNodeImage": { "value": "CentOS-HPC_7.1" }, + "computeNodeCount": { "value": 2 }, + "adminUsername": { "value": "sample" }, + "adminPassword": { "value": "" }, + "sshKeyData": { "value": "" } + } +} diff --git a/dockerecosystem.json b/src/assets/dockerecosystem.json similarity index 100% rename from dockerecosystem.json rename to src/assets/dockerecosystem.json diff --git a/src/assets/svg/drawn scorpion.svg b/src/assets/svg/drawn scorpion.svg new file mode 100644 index 0000000..183d5a7 --- /dev/null +++ b/src/assets/svg/drawn scorpion.svg @@ -0,0 +1 @@ +drawn scorpion \ No newline at end of file diff --git a/src/assets/svg/font curlies.svg b/src/assets/svg/font curlies.svg new file mode 100644 index 0000000..cf03d5b --- /dev/null +++ b/src/assets/svg/font curlies.svg @@ -0,0 +1 @@ +font curlies{ } \ No newline at end of file diff --git a/src/assets/svg/left curlie.svg b/src/assets/svg/left curlie.svg new file mode 100644 index 0000000..ce1b14c --- /dev/null +++ b/src/assets/svg/left curlie.svg @@ -0,0 +1 @@ +left curlie \ No newline at end of file diff --git a/src/assets/svg/person filled.svg b/src/assets/svg/person filled.svg new file mode 100644 index 0000000..3cc7438 --- /dev/null +++ b/src/assets/svg/person filled.svg @@ -0,0 +1 @@ +person filled \ No newline at end of file diff --git a/src/assets/svg/right curlie.svg b/src/assets/svg/right curlie.svg new file mode 100644 index 0000000..d473c58 --- /dev/null +++ b/src/assets/svg/right curlie.svg @@ -0,0 +1 @@ +right curlie \ No newline at end of file diff --git a/src/assets/svg/two curlies.svg b/src/assets/svg/two curlies.svg new file mode 100644 index 0000000..817927b --- /dev/null +++ b/src/assets/svg/two curlies.svg @@ -0,0 +1 @@ +two curlies \ No newline at end of file diff --git a/src/environments/environment.deploy.ts b/src/environments/environment.deploy.ts index 17d39e1..6d0fb24 100644 --- a/src/environments/environment.deploy.ts +++ b/src/environments/environment.deploy.ts @@ -6,6 +6,6 @@ export const environment = { production: false, local: false, - signalRServer: 'http://localhost:5001/chathub', - signalfoundry: '/chathub' + signalRServer: 'http://localhost:5000/chathub', + signalfoundry: 'https://ngfoundrysignal.azurewebsites.net/chathub' }; diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index ec58367..cae72c8 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -2,5 +2,5 @@ export const environment = { production: true, local: false, signalRServer: 'http://localhost:5001/chathub', - signalfoundry: '/chathub' + signalfoundry: 'https://ngfoundrysignal.azurewebsites.net/chathub' }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 29097ee..376692c 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -6,6 +6,6 @@ export const environment = { production: false, local: false, - signalRServer: 'http://localhost:5001/chathub', - signalfoundry: 'http://signalfoundry.azurewebsites.net/chathub' + signalRServer: 'https://localhost:5001/chathub', + signalfoundry: 'https://ngfoundrysignal.azurewebsites.net/chathub' }; diff --git a/src/environments/version.ts b/src/environments/version.ts new file mode 100644 index 0000000..0d27477 --- /dev/null +++ b/src/environments/version.ts @@ -0,0 +1,22 @@ +// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! +/* tslint:disable */ +export const VERSION = { + "dirty": true, + "raw": "v1.0.0-104-g30c2508-dirty", + "hash": "g30c2508", + "distance": 104, + "tag": "v1.0.0", + "semver": { + "raw": "v1.0.0", + "major": 1, + "minor": 0, + "patch": 0, + "prerelease": [], + "build": [], + "version": "1.0.0" + }, + "suffix": "104-g30c2508-dirty", + "semverString": "1.0.0+104.g30c2508", + "version": "1.0.0" +}; +/* tslint:enable */ diff --git a/tslint.json b/tslint.json index 9113f13..4c6ff2f 100644 --- a/tslint.json +++ b/tslint.json @@ -1,61 +1,40 @@ { - "rulesDirectory": [ - "node_modules/codelyzer" - ], + "rulesDirectory": ["node_modules/codelyzer"], "rules": { "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, + "class-name": false, + "comment-format": [false, "check-space"], + "curly": [true, "ignore-same-line"], "eofline": true, - "forin": true, + "forin": false, "import-blacklist": [true, "rxjs"], "import-spacing": true, - "indent": [ - true, - "spaces" - ], + "indent": [true, "spaces"], "interface-over-type-literal": true, "label-position": true, - "max-line-length": [ - true, - 140 - ], + "max-line-length": [true, 180], "member-access": false, - "member-ordering": [ - true, - "static-before-instance", - "variables-before-functions" - ], + "member-ordering": [false, "static-before-instance"], "no-arg": true, "no-bitwise": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], + "no-console": [true, "debug", "info", "time", "timeEnd", "trace"], "no-construct": true, "no-debugger": true, "no-duplicate-variable": true, "no-empty": false, "no-empty-interface": true, "no-eval": true, - "no-inferrable-types": [true, "ignore-params"], + "no-inferrable-types": [true, "ignore-params", "ignore-properties"], "no-shadowed-variable": true, "no-string-literal": false, "no-string-throw": true, "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unused-expression": true, + "no-trailing-whitespace": false, + "no-unused-expression": false, "no-use-before-declare": true, - "no-var-keyword": true, + "no-var-keyword": false, "object-literal-sort-keys": false, + "one-variable-per-declaration": [true, "ignore-for-loop"], "one-line": [ true, "check-open-brace", @@ -64,18 +43,10 @@ "check-whitespace" ], "prefer-const": true, - "quotemark": [ - true, - "single" - ], + "quotemark": [true, "single"], "radix": true, - "semicolon": [ - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], + "semicolon": [true, "always", "ignore-bound-class-methods"], + "triple-equals": [true, "allow-null-check"], "typedef-whitespace": [ true, { @@ -99,7 +70,7 @@ ], "directive-selector": [true, "attribute", "app", "camelCase"], - "component-selector": [true, "element", "app", "kebab-case"], + "component-selector": [false, "element", "app", "kebab-case"], "use-input-property-decorator": true, "use-output-property-decorator": true, "use-host-property-decorator": true, diff --git a/version.js b/version.js new file mode 100644 index 0000000..265be02 --- /dev/null +++ b/version.js @@ -0,0 +1,24 @@ +const {gitDescribeSync} = require('git-describe'); +const {version} = require('./package.json'); +const {resolve,relative} = require('path'); + +const {writeFileSync} = require('fs-extra'); + +const gitInfo = gitDescribeSync({ + dirtyMark: false, + dirtySemver: false +}); + +gitInfo.version = version; + +const file = resolve(__dirname, './', 'src', 'environments', 'version.ts'); +writeFileSync(file, + `// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! +/* tslint:disable */ +export const VERSION = ${JSON.stringify(gitInfo, null, 4)}; +/* tslint:enable */ +`, { + encoding: 'utf-8' + }); + +console.log(`Wrote version info ${gitInfo.raw} to ${relative(resolve(__dirname, './'), file)}`); diff --git a/wa-games-pdf.pdf b/wa-games-pdf.pdf new file mode 100644 index 0000000..67425ff Binary files /dev/null and b/wa-games-pdf.pdf differ diff --git a/yarn-error.log b/yarn-error.log new file mode 100644 index 0000000..28388b0 --- /dev/null +++ b/yarn-error.log @@ -0,0 +1,104 @@ +Arguments: + C:\Program Files (x86)\nodejs\node.exe C:\Users\Steve\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js + +PATH: + C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Python35\Lib\site-packages\PyQt5;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\;C:\Program Files (x86)\Microsoft SDKs\Windows Azure\CLI\wbin;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\PuTTY\;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\dotnet\;C:\Go\bin;C:\Program Files (x86)\nodejs\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Steve\AppData\Local\Microsoft\WindowsApps;C:\Users\Steve\AppData\Roaming\npm;C:\Users\Steve\Documents\ApprenticeNET11\ApprenticeEngineer\packages\squirrel.windows.1.7.9\tools; + +Yarn version: + 1.6.0 + +Node version: + 8.9.1 + +Platform: + win32 x64 + +Trace: + Error: https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.10.tgz: ESOCKETTIMEDOUT + at ClientRequest. (C:\Users\Steve\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:133786:19) + at Object.onceWrapper (events.js:313:30) + at emitNone (events.js:106:13) + at ClientRequest.emit (events.js:208:7) + at TLSSocket.emitTimeout (_http_client.js:708:34) + at Object.onceWrapper (events.js:313:30) + at emitNone (events.js:106:13) + at TLSSocket.emit (events.js:208:7) + at TLSSocket.Socket._onTimeout (net.js:407:8) + at ontimeout (timers.js:475:11) + +npm manifest: + { + "name": "ng-foundry", + "version": "1.0.0", + "license": "MIT", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e", + "postinstall": "node version.js" + }, + "private": true, + "dependencies": { + "@angular/animations": "^5.2.0", + "@angular/common": "^5.2.0", + "@angular/compiler": "^5.2.0", + "@angular/core": "^5.2.0", + "@angular/forms": "^5.2.0", + "@angular/http": "^5.2.0", + "@angular/platform-browser": "^5.2.0", + "@angular/platform-browser-dynamic": "^5.2.0", + "@angular/router": "^5.2.0", + "core-js": "^2.4.1", + "rxjs": "^5.5.6", + "zone.js": "^0.8.19", + "@aspnet/signalr-client": "^1.0.0-alpha2-final", + "@ngrx/store": "^4.1.1", + "@types/three": "^0.89.2", + "angular2-moment": "^1.8.0", + "d3": "^4.12.0", + "font-awesome": "^4.7.0", + "git-describe": "^4.0.2", + "gsap": "^1.20.3", + "immutable": "^3.8.2", + "interactjs": "^1.3.1", + "konva": "^1.7.6", + "mdn-polyfills": "^2.2.0", + "ng2-toastr": "^4.1.2", + "ngrx-core": "^1.2.2", + "ngx-bootstrap": "^2.0.0-rc.0", + "raw-loader": "^0.5.1", + "reflect-metadata": "^0.1.10", + "savery": "^1.2.0", + "three": "^0.84.0", + "webvr-polyfill": "^0.9.40" + }, + "devDependencies": { + "@angular/cli": "~1.7.3", + "@angular/compiler-cli": "^5.2.0", + "@angular/language-service": "^5.2.0", + "@types/jasmine": "~2.8.3", + "@types/jasminewd2": "~2.0.2", + "@types/node": "~6.0.60", + "codelyzer": "^4.0.1", + "jasmine-core": "~2.8.0", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~2.0.0", + "karma-chrome-launcher": "~2.2.0", + "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-jasmine": "~1.1.0", + "karma-jasmine-html-reporter": "^0.2.2", + "protractor": "~5.1.2", + "ts-node": "~4.1.0", + "tslint": "~5.9.1", + "typescript": "~2.5.3" + } + } + +yarn manifest: + No manifest + +Lockfile: + No lockfile