diff --git a/package-lock.json b/package-lock.json index ab082c1..5ed31cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,7 +54,7 @@ "@types/babel-generator": "6.25.1", "@types/babel-template": "6.25.0", "@types/babel-traverse": "6.25.3", - "@types/babel-types": "6.25.2", + "@types/babel-types": "7.0.0", "@types/babylon": "6.16.2" } }, @@ -64,7 +64,7 @@ "integrity": "sha512-nKNz9Ch4WP2TFZjQROhxqqS2SCk0OoDzGazJI6S+2sGgW9P7N4o3vluZAXFuPEnRqtz2A0vrrkK3tjQktxIlRw==", "dev": true, "requires": { - "@types/babel-types": "6.25.2" + "@types/babel-types": "7.0.0" } }, "@types/babel-template": { @@ -73,7 +73,7 @@ "integrity": "sha512-TtyfVlrprX92xSuKa8D//7vFz5kBJODBw5IQ1hQXehqO+me26vt1fyNxOZyXhUq2a7jRyT72V8p68IyH4NEZNA==", "dev": true, "requires": { - "@types/babel-types": "6.25.2", + "@types/babel-types": "7.0.0", "@types/babylon": "6.16.2" } }, @@ -83,13 +83,13 @@ "integrity": "sha512-4FaulWyA7nrXPkzoukL2VmSpxCnBZwc+MgwZqO30gtHCrtaUXnoxymdYfxzf3CZN80zjtrVzKfLlZ7FPYvrhQQ==", "dev": true, "requires": { - "@types/babel-types": "6.25.2" + "@types/babel-types": "7.0.0" } }, "@types/babel-types": { - "version": "6.25.2", - "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-6.25.2.tgz", - "integrity": "sha512-+3bMuktcY4a70a0KZc8aPJlEOArPuAKQYHU5ErjkOqGJdx8xuEEVK6nWogqigBOJ8nKPxRpyCUDTCPmZ3bUxGA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.0.tgz", + "integrity": "sha512-PyWcbX0W4r4GcgXLI0Vu4jyJ/Erueo3PwjgvQcOmWAOBW0ObhzBBciEX+sHvjkNE0umI6nqD192FDKvYZTL91A==", "dev": true }, "@types/babylon": { @@ -98,13 +98,13 @@ "integrity": "sha512-+Jty46mPaWe1VAyZbfvgJM4BAdklLWxrT5tc/RjvCgLrtk6gzRY6AOnoWFv4p6hVxhJshDdr2hGVn56alBp97Q==", "dev": true, "requires": { - "@types/babel-types": "6.25.2" + "@types/babel-types": "7.0.0" } }, "@types/bluebird": { - "version": "3.5.18", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.18.tgz", - "integrity": "sha512-OTPWHmsyW18BhrnG5x8F7PzeZ2nFxmHGb42bZn79P9hl+GI5cMzyPgQTwNjbem0lJhoru/8vtjAFCUOu3+gE2w==", + "version": "3.5.20", + "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.20.tgz", + "integrity": "sha512-Wk41MVdF+cHBfVXj/ufUHJeO3BlIQr1McbHZANErMykaCWeDSZbH5erGjNBw2/3UlRdSxZbLfSuQTzFmPOYFsA==", "dev": true }, "@types/body-parser": { @@ -113,14 +113,14 @@ "integrity": "sha512-BdN2PXxOFnTXFcyONPW6t0fHjz2fvRZHVMFpaS0wYr+Y8fWEaNOs4V8LEu/fpzQlMx+ahdndgTaGTwPC+J/EeA==", "dev": true, "requires": { - "@types/express": "4.0.39", - "@types/node": "8.5.1" + "@types/express": "4.11.1", + "@types/node": "8.9.4" } }, "@types/chai": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.0.10.tgz", - "integrity": "sha512-Ejh1AXTY8lm+x91X/yar3G2z4x9RyKwdTVdyyu7Xj3dNB35fMNCnEWqTO9FgS3zjzlRNqk1MruYhgb8yhRN9rA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.2.tgz", + "integrity": "sha512-D8uQwKYUw2KESkorZ27ykzXgvkDJYXVEihGklgfp5I4HUP8D6IxtcdLTMB1emjQiWzV7WZ5ihm1cxIzVwjoleQ==", "dev": true }, "@types/chai-subset": { @@ -129,7 +129,7 @@ "integrity": "sha512-Aof+FLfWzBPzDgJ2uuBuPNOBHVx9Siyw4vmOcsMgsuxX1nfUWSlzpq4pdvQiaBgGjGS7vP/Oft5dpJbX4krT1A==", "dev": true, "requires": { - "@types/chai": "4.0.10" + "@types/chai": "4.1.2" } }, "@types/chalk": { @@ -150,7 +150,7 @@ "integrity": "sha1-ldxzOiM5qoRjgdfxN3eS0lU9wn0=", "dev": true, "requires": { - "@types/express": "4.0.39" + "@types/express": "4.11.1" } }, "@types/content-type": { @@ -199,23 +199,24 @@ "dev": true }, "@types/express": { - "version": "4.0.39", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.0.39.tgz", - "integrity": "sha512-dBUam7jEjyuEofigUXCtublUHknRZvcRgITlGsTbFgPvnTwtQUt2NgLakbsf+PsGo/Nupqr3IXCYsOpBpofyrA==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.11.1.tgz", + "integrity": "sha512-ttWle8cnPA5rAelauSWeWJimtY2RsUf2aspYZs7xPHiWgOlPn6nnUfBMtrkcnjFJuIHJF4gNOdVvpLK2Zmvh6g==", "dev": true, "requires": { "@types/body-parser": "1.16.8", - "@types/express-serve-static-core": "4.0.57", + "@types/express-serve-static-core": "4.11.1", "@types/serve-static": "1.13.1" } }, "@types/express-serve-static-core": { - "version": "4.0.57", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.0.57.tgz", - "integrity": "sha512-QLAHjdLwEICm3thVbXSKRoisjfgMVI4xJH/HU8F385BR2HI7PmM6ax4ELXf8Du6sLmSpySXMYaI+xc//oQ/IFw==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz", + "integrity": "sha512-EehCl3tpuqiM8RUb+0255M8PhhSwTtLfmO7zBBdv0ay/VTd/zmrqDfQdZFsa5z/PVMbH2yCMZPXsnrImpATyIw==", "dev": true, "requires": { - "@types/node": "8.5.1" + "@types/events": "1.1.0", + "@types/node": "8.9.4" } }, "@types/freeport": { @@ -226,14 +227,14 @@ "optional": true }, "@types/glob": { - "version": "5.0.34", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.34.tgz", - "integrity": "sha512-sUvpieq+HsWTLdkeOI8Mi8u22Ag3AoGuM3sv+XMP1bKtbaIAHpEA2f52K2mz6vK5PVhTa3bFyRZLZMqTxOo2Cw==", + "version": "5.0.35", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.35.tgz", + "integrity": "sha512-wc+VveszMLyMWFvXLkloixT4n0harUIVZjnpzztaZ0nKLuul7Z32iMt2fUFGAaZ4y1XWjFRMtCI5ewvyh4aIeg==", "dev": true, "requires": { "@types/events": "1.1.0", - "@types/minimatch": "3.0.2", - "@types/node": "8.5.1" + "@types/minimatch": "3.0.3", + "@types/node": "8.9.4" } }, "@types/glob-stream": { @@ -242,8 +243,8 @@ "integrity": "sha512-RHv6ZQjcTncXo3thYZrsbAVwoy4vSKosSWhuhuQxLOTv74OJuFQxXkmUuZCr3q9uNBEVCvIzmZL/FeRNbHZGUg==", "dev": true, "requires": { - "@types/glob": "5.0.34", - "@types/node": "8.5.1" + "@types/glob": "5.0.35", + "@types/node": "8.9.4" } }, "@types/launchpad": { @@ -260,9 +261,9 @@ "dev": true }, "@types/minimatch": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.2.tgz", - "integrity": "sha512-tctoxbfuMCxeI2CAsnwoZQfaBA+T7gPzDzDuiiFnyCSSyGYEB92cmRTh6E3tdR1hWsprbJ9IdbvX3PzLmJU/GA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", "dev": true }, "@types/mz": { @@ -271,14 +272,14 @@ "integrity": "sha1-vCRyjGSZc/HHhR6QM/nOUlZowns=", "dev": true, "requires": { - "@types/bluebird": "3.5.18", - "@types/node": "8.5.1" + "@types/bluebird": "3.5.20", + "@types/node": "8.9.4" } }, "@types/node": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.1.tgz", - "integrity": "sha512-SrmAO+NhnsuG/6TychSl2VdxBZiw/d6V+8j+DFo8O3PwFi+QeYXWHhAw+b170aSc6zYab6/PjEWRZHIDN9mNUw==", + "version": "8.9.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.4.tgz", + "integrity": "sha512-dSvD36qnQs78G1BPsrZFdPpvLgMW/dnvr5+nTW2csMs5TiP9MOXrjUbnMZOEwnIuBklXtn7b6TPA2Cuq07bDHA==", "dev": true }, "@types/opn": { @@ -287,7 +288,7 @@ "integrity": "sha1-CX0NHJtXSVc6XZbfEyOHu20CEYo=", "dev": true, "requires": { - "@types/node": "8.5.1" + "@types/node": "8.9.4" } }, "@types/parse5": { @@ -296,7 +297,7 @@ "integrity": "sha1-44cKEOgnNacg9i1x3NGDunjvOp0=", "dev": true, "requires": { - "@types/node": "8.5.1" + "@types/node": "8.9.4" } }, "@types/pem": { @@ -311,7 +312,7 @@ "integrity": "sha512-jDMH+3BQPtvqZVIcsH700Dfi8Q3MIcEx16g/VdxjoqiGR/NntekB10xdBpirMKnPe9z2C5cBmL0vte0YttOr3Q==", "dev": true, "requires": { - "@types/express-serve-static-core": "4.0.57", + "@types/express-serve-static-core": "4.11.1", "@types/mime": "0.0.29" } }, @@ -321,7 +322,7 @@ "integrity": "sha512-N9LBlbVRRYq6HgYpPkqQc3a9HJ/iEtVZToW6xlTtJiMhmRJ7jJdV7TaZQJw/Ve/1ePUsQiCTDc4JMuzzag94GA==", "dev": true, "requires": { - "@types/node": "8.5.1" + "@types/node": "8.9.4" } }, "@types/ua-parser-js": { @@ -331,12 +332,12 @@ "dev": true }, "@types/vinyl": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.1.tgz", - "integrity": "sha512-Joudabfn2ZofU2usW04y8OLmN75u7ZQkW0MCT3AnoBf5oUBp5iQ3Pgfz9+y1RdWkzhCPZo9/wBJ7FMWW2JrY0g==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.2.tgz", + "integrity": "sha512-2iYpNuOl98SrLPBZfEN9Mh2JCJ2EI9HU35SfgBEb51DcmaHkhp8cKMblYeBqMQiwXMgAD3W60DbQ4i/UdLiXhw==", "dev": true, "requires": { - "@types/node": "8.5.1" + "@types/node": "8.9.4" } }, "@types/vinyl-fs": { @@ -346,42 +347,42 @@ "dev": true, "requires": { "@types/glob-stream": "6.1.0", - "@types/node": "8.5.1", - "@types/vinyl": "2.0.1" + "@types/node": "8.9.4", + "@types/vinyl": "2.0.2" } }, "@types/which": { - "version": "1.0.28", - "resolved": "https://registry.npmjs.org/@types/which/-/which-1.0.28.tgz", - "integrity": "sha1-AW44dim4gXvtZT/jLqtdESecjfY=", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@types/which/-/which-1.3.1.tgz", + "integrity": "sha512-ZrJDWpvg75LTGX4XwuneY9s6bF3OeZcGTpoGh3zDV9ytzcHMFsRrMIaLBRJZQMBoGyKs6unBQfVdrLZiYfb1zQ==", "dev": true, "optional": true }, "@types/winston": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/@types/winston/-/winston-2.3.7.tgz", - "integrity": "sha512-jNhbkxPtt9xbzvihfA0OavjJbpCIyTDSmwE03BVXgCKcz9lwNsq4cg2wsNkY4Av5eH35ttBArhYtVJa6CIrg2A==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@types/winston/-/winston-2.3.8.tgz", + "integrity": "sha512-QqR0j08RCS1AQYPMRPHikEpcmK+2aEEbcSzWLwOqyJ4FhLmHUx/WjRrnn7tTQg/y4IKnMhzskh/o7qvGIZZ7iA==", "dev": true, "requires": { - "@types/node": "8.5.1" + "@types/node": "8.9.4" } }, "@webcomponents/custom-elements": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@webcomponents/custom-elements/-/custom-elements-1.0.6.tgz", - "integrity": "sha512-ui44vEHIMkt0tpx+CPU0kRcL7afhdAzqcnglgGrGfIJ7AUcdrJMzLpA54Lcos4tsvEIBsmei26716k5eXbo18w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@webcomponents/custom-elements/-/custom-elements-1.0.8.tgz", + "integrity": "sha512-BPJillR1En1rsbQY3sdHL8o67fRjFqVrbusL395ei4Y5miZEGyQOsVAH9rZR5Vbutkt4lSepdfJFiTl5f6/Lkw==", "dev": true }, "@webcomponents/shadycss": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@webcomponents/shadycss/-/shadycss-1.1.0.tgz", - "integrity": "sha512-BtnVvNBTyB3f519KW/rSSXsYe2Nz6pLhMyLMFTS/t4IsqWRsWd5IZNqmY+Ic0a5XbD1B7anKaIWEaCM5b65W0w==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@webcomponents/shadycss/-/shadycss-1.1.1.tgz", + "integrity": "sha512-7iVMw1HU0e5tTxL1OIqw/RBGmnYuz1HUNd7t1UYq7VmoBOl5Zm4g3spUBSksyd97SiXauFlXAeSpA0/in9k+dw==", "dev": true }, "@webcomponents/template": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webcomponents/template/-/template-1.2.0.tgz", - "integrity": "sha512-ZpdypwSCOMD33XQEeuyiO/BG/VyLq+kC+yozm2e5qHs5j0PSPYdrM0Jpa0QN6yQpcuaX2YBKCbnVYSm2AyiKCg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@webcomponents/template/-/template-1.2.2.tgz", + "integrity": "sha512-UEEZZ3Ex/4oM47KWAl+TxvaqxirXdJ2a/vFtqXXBc9+F3Xjq9BR2NrqeXMv65bDf+dkndPnzYoseWIitUcIlbA==", "dev": true }, "@webcomponents/webcomponents-platform": { @@ -391,9 +392,9 @@ "dev": true }, "@webcomponents/webcomponentsjs": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/@webcomponents/webcomponentsjs/-/webcomponentsjs-1.0.20.tgz", - "integrity": "sha512-Ady8WFcEVcFS/hfMto5EBwqTUViNsVYErbXImD9jH808yjSqELPsRxQ4PlpP0qBObSmKwJyl3jq0C3tZOhbLGQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@webcomponents/webcomponentsjs/-/webcomponentsjs-1.1.0.tgz", + "integrity": "sha512-7toNyVlrl7vJnY3PU0eXIK1KWq8phfnEe1IwOdCMxkIl/BfUkUB2aaVs45R0LSx1qxHRnkqj0vlGtskUvKkNkA==", "dev": true }, "accepts": { @@ -402,7 +403,7 @@ "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", "dev": true, "requires": { - "mime-types": "2.1.17", + "mime-types": "2.1.18", "negotiator": "0.6.1" } }, @@ -491,12 +492,54 @@ "dev": true }, "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "ansi-colors": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-1.1.0.tgz", - "integrity": "sha1-LwwWWIKXOa3V67FeawxuNCPwFro=", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", "dev": true, "requires": { - "string-width": "1.0.2" + "ansi-wrap": "0.1.0" } }, "ansi-escape-sequences": { @@ -526,6 +569,12 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, "any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", @@ -599,6 +648,12 @@ "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-back": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", @@ -660,9 +715,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": { @@ -690,9 +745,15 @@ "dev": true }, "assertion-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz", - "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, "async": { @@ -723,9 +784,9 @@ "dev": true }, "attempt-x": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/attempt-x/-/attempt-x-1.1.1.tgz", - "integrity": "sha512-hIp37ojJRRW8ExWSxxLpkDHUufk/DFfsb7/cUC1cVbBg7JV4gJTkCTRa44dlL9e5jx1P3VNrjL7QOQfi4MyltA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/attempt-x/-/attempt-x-1.1.2.tgz", + "integrity": "sha1-ZFzrg5L2W/N8bkPEq6dnH53ooiQ=", "dev": true }, "aws-sign2": { @@ -758,7 +819,7 @@ "dev": true, "requires": { "babel-code-frame": "6.26.0", - "babel-generator": "6.26.0", + "babel-generator": "6.26.1", "babel-helpers": "6.24.1", "babel-messages": "6.23.0", "babel-register": "6.26.0", @@ -767,7 +828,7 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "convert-source-map": "1.5.0", + "convert-source-map": "1.5.1", "debug": "2.6.8", "json5": "0.5.1", "lodash": "4.17.4", @@ -779,9 +840,9 @@ } }, "babel-generator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", - "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { "babel-messages": "6.23.0", @@ -1187,7 +1248,7 @@ "babylon": "6.18.0", "debug": "2.6.8", "globals": "9.18.0", - "invariant": "2.2.2", + "invariant": "2.2.3", "lodash": "4.17.4" } }, @@ -1289,13 +1350,13 @@ "bytes": "3.0.0", "content-type": "1.0.4", "debug": "2.6.9", - "depd": "1.1.1", + "depd": "1.1.2", "http-errors": "1.6.2", "iconv-lite": "0.4.19", "on-finished": "2.3.0", "qs": "6.5.1", "raw-body": "2.3.2", - "type-is": "1.6.15" + "type-is": "1.6.16" }, "dependencies": { "debug": { @@ -1319,20 +1380,92 @@ } }, "boxen": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-0.6.0.tgz", - "integrity": "sha1-g2TUJIrDT/DvGy8r9JpsYM4NgbY=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "dev": true, "requires": { - "ansi-align": "1.1.0", - "camelcase": "2.1.1", - "chalk": "1.1.3", + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.3.1", "cli-boxes": "1.0.0", - "filled-array": "1.1.0", - "object-assign": "4.1.1", - "repeating": "2.0.1", - "string-width": "1.0.2", - "widest-line": "1.0.0" + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "5.2.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 + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "supports-color": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", + "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } } }, "brace-expansion": { @@ -1357,9 +1490,9 @@ } }, "browser-capabilities": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/browser-capabilities/-/browser-capabilities-0.2.1.tgz", - "integrity": "sha512-huj8A1CGx28XvsgZvbkjWul+sR3NqQHr0FOvq6GcOWFJ7n4eKBOSNzmmPCRbA49bV5W8P7cbN5274fvsTEL7hw==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/browser-capabilities/-/browser-capabilities-0.2.2.tgz", + "integrity": "sha512-iS5g9+yT/T7jr9BTjDi5Hu2soieyce457ad+fdp6uDlYp6pacX7ZG/nYtCZ+KQiMCxRfbd65OhAg7GbVJ3RcBw==", "dev": true, "requires": { "@types/ua-parser-js": "0.7.32", @@ -1506,12 +1639,12 @@ "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", "dev": true, "requires": { - "assertion-error": "1.0.2", + "assertion-error": "1.1.0", "check-error": "1.0.2", "deep-eql": "3.0.1", "get-func-name": "2.0.0", "pathval": "1.1.0", - "type-detect": "4.0.5" + "type-detect": "4.0.8" } }, "chalk": { @@ -1635,9 +1768,9 @@ "dev": true }, "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "dev": true, "requires": { "delayed-stream": "1.0.0" @@ -1708,23 +1841,23 @@ } }, "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" } }, "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": "https://registry.npmjs.org/compression/-/compression-1.7.2.tgz", + "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", "dev": true, "requires": { "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", "safe-buffer": "5.1.1", @@ -1760,20 +1893,17 @@ } }, "configstore": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-2.1.0.tgz", - "integrity": "sha1-c3o6cDbpiGECqmCZ5HuzOrGroaE=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", + "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", "dev": true, "requires": { - "dot-prop": "3.0.0", + "dot-prop": "4.2.0", "graceful-fs": "4.1.11", - "mkdirp": "0.5.1", - "object-assign": "4.1.1", - "os-tmpdir": "1.0.2", - "osenv": "0.1.4", - "uuid": "2.0.3", - "write-file-atomic": "1.3.4", - "xdg-basedir": "2.0.0" + "make-dir": "1.2.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" } }, "content-disposition": { @@ -1789,9 +1919,9 @@ "dev": true }, "convert-source-map": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", - "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", "dev": true }, "cookie": { @@ -1856,7 +1986,6 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, - "optional": true, "requires": { "lru-cache": "4.1.1", "shebang-command": "1.2.0", @@ -1868,7 +1997,6 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", "dev": true, - "optional": true, "requires": { "pseudomap": "1.0.2", "yallist": "2.1.2" @@ -1895,8 +2023,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", - "dev": true, - "optional": true + "dev": true }, "css": { "version": "2.2.1", @@ -1984,36 +2111,24 @@ } }, "debug-fabulous": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-0.1.1.tgz", - "integrity": "sha512-UhD+fzBYnlHjOpUrSeKT+sbZAqxDsqoXAsESKQPAoBm2j/0F9l9IeOEYDST8Lkz1L2zA9KvIxp58h923wCWjDQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-1.0.0.tgz", + "integrity": "sha512-dsd50qQ1atDeurcxL7XOjPp4nZCGZzWIONDujDXzl1atSyC3hMbZD+v6440etw+Vt0Pr8ce4TQzHfX3KZM05Mw==", "dev": true, "requires": { - "debug": "2.3.0", - "memoizee": "0.4.9", - "object-assign": "4.1.0" + "debug": "3.1.0", + "memoizee": "0.4.12", + "object-assign": "4.1.1" }, "dependencies": { "debug": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.0.tgz", - "integrity": "sha1-ORLcVdcWf8OvF9K4XBP5PertqkM=", + "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=", - "dev": true - }, - "object-assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", - "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=", - "dev": true } } }, @@ -2029,7 +2144,7 @@ "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { - "type-detect": "4.0.5" + "type-detect": "4.0.8" } }, "deep-extend": { @@ -2083,9 +2198,9 @@ "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 }, "deprecated": { @@ -2206,7 +2321,7 @@ "integrity": "sha1-AB3fgWKM0ecGElxxdvU8zsVdkY4=", "dev": true, "requires": { - "urijs": "1.19.0" + "urijs": "1.19.1" } }, "dom5": { @@ -2216,16 +2331,16 @@ "dev": true, "requires": { "@types/clone": "0.1.30", - "@types/node": "6.0.94", + "@types/node": "6.0.101", "@types/parse5": "2.2.34", "clone": "2.1.1", "parse5": "2.2.3" }, "dependencies": { "@types/node": { - "version": "6.0.94", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.94.tgz", - "integrity": "sha512-CwopBfOTONzc1bDDTh8/KzW+zssiIPw+nSf27Y1cuGIkZJ7zuhkig6xO5p9pBW/RY99DznOMCIj+FXx8EIy+qw==", + "version": "6.0.101", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.101.tgz", + "integrity": "sha512-IQ7V3D6+kK1DArTqTBrnl3M+YgJZLw8ta8w3Q9xjR79HaJzMAoTbZ8TNzUTztrkCKPTqIstE2exdbs1FzsYLUw==", "dev": true } } @@ -2256,9 +2371,9 @@ } }, "dot-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", - "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "dev": true, "requires": { "is-obj": "1.0.1" @@ -2309,25 +2424,24 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true, - "optional": true + "dev": true }, "duplexify": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", - "integrity": "sha512-j5goxHTwVED1Fpe5hh3q9R93Kip0Bg2KVAt4f8CEYM3UEwYcPSvWbXaUQOzdX/HtiNomipv+gU7ASQPDbV7pGQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.3.tgz", + "integrity": "sha512-g8ID9OroF9hKt2POf8YLayy+9594PzmM3scI00/uBXocX3TWNgoB67hjzkFe9ITAbQOne/lLdBxHXvYUM4ZgGA==", "dev": true, "requires": { - "end-of-stream": "1.4.0", + "end-of-stream": "1.4.1", "inherits": "2.0.3", "readable-stream": "2.3.3", "stream-shift": "1.0.0" }, "dependencies": { "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" @@ -2352,9 +2466,9 @@ "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": { @@ -2378,34 +2492,24 @@ } }, "engine.io": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.4.tgz", - "integrity": "sha1-PQIRtwpVLOhB/8fahiezAamkFi4=", + "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.6.9", - "engine.io-parser": "2.1.1", - "uws": "0.14.5", - "ws": "3.3.2" + "debug": "3.1.0", + "engine.io-parser": "2.1.2", + "uws": "9.14.0", + "ws": "3.3.3" }, "dependencies": { - "accepts": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", - "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=", - "dev": true, - "requires": { - "mime-types": "2.1.17", - "negotiator": "0.6.1" - } - }, "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "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" @@ -2414,28 +2518,28 @@ } }, "engine.io-client": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.4.tgz", - "integrity": "sha1-T88TcLRxY70s6b4nM5ckMDUNTqE=", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.5.tgz", + "integrity": "sha512-Rv9vgb83zrNVhRircUXHi4mtbJhgy2oWtJOCZEbCLFs2HiDSWmh/aOEj8TwoKsn8zXGqTuQuPSoU4v3E10bR6A==", "dev": true, "requires": { "component-emitter": "1.2.1", "component-inherit": "0.0.3", - "debug": "2.6.9", - "engine.io-parser": "2.1.1", + "debug": "3.1.0", + "engine.io-parser": "2.1.2", "has-cors": "1.1.0", "indexof": "0.0.1", "parseqs": "0.0.5", "parseuri": "0.0.5", - "ws": "3.3.2", - "xmlhttprequest-ssl": "1.5.4", + "ws": "3.3.3", + "xmlhttprequest-ssl": "1.5.5", "yeast": "0.1.2" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "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" @@ -2444,13 +2548,13 @@ } }, "engine.io-parser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.1.tgz", - "integrity": "sha1-4Ps/DgRi9/WLt3waUun1p+JuRmg=", + "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-binary2": "1.0.2" @@ -2507,9 +2611,9 @@ } }, "es6-promise": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz", - "integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", + "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==", "dev": true }, "es6-set": { @@ -2718,7 +2822,6 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, - "optional": true, "requires": { "cross-spawn": "5.1.0", "get-stream": "3.0.0", @@ -2776,8 +2879,8 @@ "cookie": "0.3.1", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "1.1.1", - "encodeurl": "1.0.1", + "depd": "1.1.2", + "encodeurl": "1.0.2", "escape-html": "1.0.3", "etag": "1.8.1", "finalhandler": "1.1.0", @@ -2787,7 +2890,7 @@ "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", "safe-buffer": "5.1.1", @@ -2795,7 +2898,7 @@ "serve-static": "1.13.1", "setprototypeof": "1.1.0", "statuses": "1.3.1", - "type-is": "1.6.15", + "type-is": "1.6.16", "utils-merge": "1.0.1", "vary": "1.1.2" }, @@ -2816,9 +2919,9 @@ "dev": true, "requires": { "debug": "2.6.9", - "depd": "1.1.1", + "depd": "1.1.2", "destroy": "1.0.4", - "encodeurl": "1.0.1", + "encodeurl": "1.0.2", "escape-html": "1.0.3", "etag": "1.8.1", "fresh": "0.5.2", @@ -2851,12 +2954,24 @@ "dev": true }, "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "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": { @@ -2954,12 +3069,6 @@ "repeat-string": "1.6.1" } }, - "filled-array": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/filled-array/-/filled-array-1.1.0.tgz", - "integrity": "sha1-w8T2xmO5I0WamqKZEtLQMfFQf4Q=", - "dev": true - }, "finalhandler": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", @@ -2967,7 +3076,7 @@ "dev": true, "requires": { "debug": "2.6.9", - "encodeurl": "1.0.1", + "encodeurl": "1.0.2", "escape-html": "1.0.3", "on-finished": "2.3.0", "parseurl": "1.3.2", @@ -3123,8 +3232,8 @@ "dev": true, "requires": { "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" + "combined-stream": "1.0.6", + "mime-types": "2.1.18" } }, "formatio": { @@ -3353,7 +3462,6 @@ "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "dev": true, - "optional": true, "requires": { "ini": "1.3.4" } @@ -3473,37 +3581,22 @@ } }, "got": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-5.7.1.tgz", - "integrity": "sha1-X4FjWmHkplifGAVp6k44FoClHzU=", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { "create-error-class": "3.0.2", - "duplexer2": "0.1.4", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", "is-redirect": "1.0.0", "is-retry-allowed": "1.1.0", "is-stream": "1.1.0", "lowercase-keys": "1.0.0", - "node-status-codes": "1.0.0", - "object-assign": "4.1.1", - "parse-json": "2.2.0", - "pinkie-promise": "2.0.1", - "read-all-stream": "3.1.0", - "readable-stream": "2.3.3", - "timed-out": "3.1.3", - "unzip-response": "1.0.2", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", "url-parse-lax": "1.0.0" - }, - "dependencies": { - "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.3.3" - } - } } }, "graceful-fs": { @@ -3560,16 +3653,17 @@ "dev": true }, "gulp-rollup": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/gulp-rollup/-/gulp-rollup-2.15.0.tgz", - "integrity": "sha512-CIKB5ce83xBzloMj5Cf17yeXc46BXWhPh8dICtpeLVZvqdKPmLlSAKy0Txf848PO9Ijcr0Jsror7gLi7ZIop/A==", + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/gulp-rollup/-/gulp-rollup-2.16.2.tgz", + "integrity": "sha512-Gs9NYcUl0xXod7qenC1Lm49a/PGllAa5ONyCXu29lXfkP1oJnJzSdPBjopm9RlOVhefadbHlfy9AijovFrqABA==", "dev": true, "requires": { "buffer-from": "0.1.1", - "gulp-util": "3.0.8", + "plugin-error": "1.0.1", "readable-stream": "2.3.3", - "rollup": "0.49.3", - "rollup-plugin-hypothetical": "1.2.1" + "rollup": "0.54.1", + "rollup-plugin-hypothetical": "2.1.0", + "vinyl": "2.1.0" } }, "gulp-size": { @@ -3588,59 +3682,29 @@ } }, "gulp-sourcemaps": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-2.6.1.tgz", - "integrity": "sha512-1qHCI3hdmsMdq/SUotxwUh/L8YzlI6J9zQ5ifNOtx4Y6KV5y5sGuORv1KZzWhuKtz/mXNh5xLESUtwC4EndCjA==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-2.6.4.tgz", + "integrity": "sha1-y7IAhFCxvM5s0jv5gze+dRv24wo=", "dev": true, "requires": { "@gulp-sourcemaps/identity-map": "1.0.1", "@gulp-sourcemaps/map-sources": "1.0.0", - "acorn": "4.0.13", - "convert-source-map": "1.5.0", + "acorn": "5.1.1", + "convert-source-map": "1.5.1", "css": "2.2.1", - "debug-fabulous": "0.1.1", + "debug-fabulous": "1.0.0", "detect-newline": "2.1.0", "graceful-fs": "4.1.11", - "source-map": "0.5.7", + "source-map": "0.6.1", "strip-bom-string": "1.0.0", - "through2": "2.0.3", - "vinyl": "1.2.0" + "through2": "2.0.3" }, "dependencies": { - "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", - "dev": true - }, - "clone": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", - "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "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 - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "dev": true, - "requires": { - "clone": "1.0.2", - "clone-stats": "0.0.1", - "replace-ext": "0.0.1" - } } } }, @@ -3919,6 +3983,14 @@ "inherits": "2.0.3", "setprototypeof": "1.0.3", "statuses": "1.4.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-proxy": { @@ -3999,8 +4071,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true, - "optional": true + "dev": true }, "imurmurhash": { "version": "0.1.4", @@ -4024,9 +4095,9 @@ "dev": true }, "infinity-x": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/infinity-x/-/infinity-x-1.0.0.tgz", - "integrity": "sha512-wjy2TupBtZ+aAniKt+xs/PO0xOkuaL6wBysUKbgD7aL1PMW/qY5xXDG59zXZ7dU+gk3zwXOu4yIEWPCEFBTgHQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/infinity-x/-/infinity-x-1.0.1.tgz", + "integrity": "sha1-aX/QB8UzNLzkXzTXd2RXAuSbI5E=", "dev": true }, "inflight": { @@ -4079,18 +4150,18 @@ "dev": true }, "invariant": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.3.tgz", + "integrity": "sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA==", "dev": true, "requires": { "loose-envify": "1.3.1" } }, "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": { @@ -4109,9 +4180,9 @@ "integrity": "sha512-ufSZRMY2WZX5xyNvk0NOZAG7cgi35B/sGQDGqv8w0X7MoQ2GC9vedanJhuYTPaC4PUCqLQsda1w7NF+dPZmAJw==", "dev": true, "requires": { - "attempt-x": "1.1.1", + "attempt-x": "1.1.2", "has-to-string-tag-x": "1.4.1", - "is-object-like-x": "1.6.0", + "is-object-like-x": "1.7.0", "object-get-own-property-descriptor-x": "3.2.0", "to-string-tag-x": "1.4.2" } @@ -4171,12 +4242,12 @@ "dev": true }, "is-falsey-x": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-falsey-x/-/is-falsey-x-1.0.1.tgz", - "integrity": "sha512-XWNZC4A+3FX1ECoMjspuEFgSdio82IWjqY/suE0gZ10QA7nzHd/KraRq7Tc5VEHtFRgTRyTdY6W+ykPrDnyoAQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-falsey-x/-/is-falsey-x-1.0.2.tgz", + "integrity": "sha1-i6w4KWImfZEvY3cc8pgGAugYeRk=", "dev": true, "requires": { - "to-boolean-x": "1.0.1" + "to-boolean-x": "1.0.2" } }, "is-finite": { @@ -4194,7 +4265,7 @@ "integrity": "sha512-HyFrxJZsgmP5RtR1PVlVvHSP4VslZOqr4uoq4x3rDrSOFaYp4R9tfmiWtAzQxPzixXhac3cYEno3NuVn0OHk2Q==", "dev": true, "requires": { - "infinity-x": "1.0.0", + "infinity-x": "1.0.1", "is-nan-x": "1.0.1" } }, @@ -4213,13 +4284,13 @@ "integrity": "sha512-SreSSU1dlgYaXR5c0mm4qJHKYHIiGiEY+7Cd8/aRLLoMP/VvofD2XcWgBnP833ajpU5XzXbUSpfysnfKZLJFlg==", "dev": true, "requires": { - "attempt-x": "1.1.1", + "attempt-x": "1.1.2", "has-to-string-tag-x": "1.4.1", - "is-falsey-x": "1.0.1", + "is-falsey-x": "1.0.2", "is-primitive": "2.0.0", "normalize-space-x": "3.0.0", "replace-comments-x": "2.0.0", - "to-boolean-x": "1.0.1", + "to-boolean-x": "1.0.2", "to-string-tag-x": "1.4.2" } }, @@ -4250,7 +4321,6 @@ "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "dev": true, - "optional": true, "requires": { "global-dirs": "0.1.1", "is-path-inside": "1.0.0" @@ -4306,13 +4376,21 @@ "dev": true }, "is-object-like-x": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/is-object-like-x/-/is-object-like-x-1.6.0.tgz", - "integrity": "sha512-mc3dBMv1jEOdk0f1i2RkJFsZDux0MuHqGwHOoRo770ShUOf4VE6tWThAW8dAZARr9a5RN+iNX1yzMDA5ad1clQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/is-object-like-x/-/is-object-like-x-1.7.0.tgz", + "integrity": "sha512-B8Bi1F34O1LxZltWAS+V4SHcOphLD1WHRqe800h2bOfQUBE9azkkKlOQUh8OJviT5/f1ZX43k4yi8DW7OOKPxg==", "dev": true, "requires": { "is-function-x": "3.3.0", - "is-primitive": "2.0.0" + "is-primitive": "3.0.0" + }, + "dependencies": { + "is-primitive": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-3.0.0.tgz", + "integrity": "sha512-Qch+MMfMdu7DMY6XElM7LUJKPmkbXdTqNhqyehVflzis2a8Zd9V6U8qZybb32uUSmlO/dNmg3fsA5t0Q9TC0mA==", + "dev": true + } } }, "is-path-cwd": { @@ -4598,18 +4676,18 @@ } }, "latest-version": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-2.0.0.tgz", - "integrity": "sha1-VvjWE5YghHuAF/jx9NeOIRMkFos=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "dev": true, "requires": { - "package-json": "2.4.0" + "package-json": "4.0.1" } }, "launchpad": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/launchpad/-/launchpad-0.6.0.tgz", - "integrity": "sha1-ahIt6qPL17m+3BPnyN0gqQlRqqM=", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/launchpad/-/launchpad-0.7.0.tgz", + "integrity": "sha1-9CfTwOFehp7hVROCi6/vwW+ce8M=", "dev": true, "optional": true, "requires": { @@ -4630,12 +4708,6 @@ } } }, - "lazy-req": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/lazy-req/-/lazy-req-1.1.0.tgz", - "integrity": "sha1-va6+rTD42CQDnODOFJ1Nqge6H6w=", - "dev": true - }, "lazystream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", @@ -4931,11 +5003,10 @@ } }, "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, - "optional": true, "requires": { "pify": "3.0.0" }, @@ -4944,8 +5015,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "optional": true + "dev": true } } }, @@ -5004,9 +5074,9 @@ "dev": true }, "memoizee": { - "version": "0.4.9", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.9.tgz", - "integrity": "sha1-6hwAX1xMMdiaShDiTbg/v2HN1PM=", + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.12.tgz", + "integrity": "sha512-sprBu6nwxBWBvBOh5v2jcsGqiGLlL2xr2dLub3vR8dnE8YB17omwtm/0NSHl8jjNbcsJd5GMWJAnTSVe/O0Wfg==", "dev": true, "requires": { "d": "1.0.0", @@ -5094,18 +5164,18 @@ "dev": true }, "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=", + "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.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "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.30.0" + "mime-db": "1.33.0" } }, "minimalistic-assert": { @@ -5210,7 +5280,7 @@ "mkdirp": "0.5.1", "object-assign": "3.0.0", "on-finished": "2.3.0", - "type-is": "1.6.15", + "type-is": "1.6.16", "xtend": "4.0.1" }, "dependencies": { @@ -5249,9 +5319,9 @@ } }, "nan-x": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/nan-x/-/nan-x-1.0.0.tgz", - "integrity": "sha512-yw4Fhe2/UTzanQ4f0yHWkRnfTuHZFAi4GZDjXS4G+qv5BqXTqPJBbSxpa7MyyW9v4Y4ZySZQik1vcbNkhdnIOg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nan-x/-/nan-x-1.0.1.tgz", + "integrity": "sha1-nm0iqLISAomG9G6cRdxUqsAByTc=", "dev": true }, "native-promise-only": { @@ -5284,12 +5354,6 @@ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, - "node-status-codes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz", - "integrity": "sha1-WuVUHQJGRdMqWPzdyc7s6nrjrC8=", - "dev": true - }, "nodegit-promise": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/nodegit-promise/-/nodegit-promise-4.0.0.tgz", @@ -5371,7 +5435,6 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, - "optional": true, "requires": { "path-key": "2.0.1" } @@ -5406,10 +5469,10 @@ "integrity": "sha512-Z/0fIrptD9YuzN+SNK/1kxAEaBcPQM4gSrtOSMSi9eplnL/AbyQcAyAlreAoAzmBon+DQ1Z+AdhxyQSvav5Fyg==", "dev": true, "requires": { - "attempt-x": "1.1.1", + "attempt-x": "1.1.2", "has-own-property-x": "3.2.0", "has-symbol-support-x": "1.4.1", - "is-falsey-x": "1.0.1", + "is-falsey-x": "1.0.2", "is-index-x": "1.1.0", "is-primitive": "2.0.0", "is-string": "1.0.4", @@ -5562,39 +5625,28 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, - "osenv": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", - "dev": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true, - "optional": true + "dev": true }, "package-json": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-2.4.0.tgz", - "integrity": "sha1-DRW9Z9HLvduyyiIv8u24a8sxqLs=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "dev": true, "requires": { - "got": "5.7.1", - "registry-auth-token": "3.3.1", + "got": "6.7.1", + "registry-auth-token": "3.3.2", "registry-url": "3.1.0", - "semver": "5.4.1" + "semver": "5.5.0" }, "dependencies": { "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true } } @@ -5629,7 +5681,7 @@ "dev": true, "requires": { "cached-constructors-x": "1.0.0", - "nan-x": "1.0.0", + "nan-x": "1.0.1", "to-string-x": "1.4.2", "trim-left-x": "3.0.0" } @@ -5710,8 +5762,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true, - "optional": true + "dev": true }, "path-parse": { "version": "1.0.5", @@ -5809,6 +5860,26 @@ "xmldom": "0.1.27" } }, + "plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "dev": true, + "requires": { + "ansi-colors": "1.1.0", + "arr-diff": "4.0.0", + "arr-union": "3.1.0", + "extend-shallow": "3.0.2" + }, + "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 + } + } + }, "pluralize": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", @@ -5822,7 +5893,7 @@ "dev": true, "requires": { "@types/node": "4.2.23", - "@types/winston": "2.3.7", + "@types/winston": "2.3.8", "winston": "2.4.0" }, "dependencies": { @@ -5848,7 +5919,7 @@ "@types/escodegen": "0.0.2", "@types/estraverse": "0.0.6", "@types/estree": "0.0.37", - "@types/node": "6.0.94", + "@types/node": "6.0.101", "@types/parse5": "2.2.34", "chalk": "1.1.3", "clone": "2.1.1", @@ -5866,9 +5937,9 @@ }, "dependencies": { "@types/node": { - "version": "6.0.94", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.94.tgz", - "integrity": "sha512-CwopBfOTONzc1bDDTh8/KzW+zssiIPw+nSf27Y1cuGIkZJ7zuhkig6xO5p9pBW/RY99DznOMCIj+FXx8EIy+qw==", + "version": "6.0.101", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.101.tgz", + "integrity": "sha512-IQ7V3D6+kK1DArTqTBrnl3M+YgJZLw8ta8w3Q9xjR79HaJzMAoTbZ8TNzUTztrkCKPTqIstE2exdbs1FzsYLUw==", "dev": true } } @@ -5880,9 +5951,9 @@ "dev": true, "requires": { "@types/mz": "0.0.31", - "@types/node": "6.0.94", + "@types/node": "6.0.101", "@types/parse5": "2.2.34", - "@types/vinyl": "2.0.1", + "@types/vinyl": "2.0.2", "@types/vinyl-fs": "0.0.28", "dom5": "2.3.0", "multipipe": "1.0.2", @@ -5891,8 +5962,8 @@ "plylog": "0.5.0", "polymer-analyzer": "2.7.0", "polymer-bundler": "3.1.1", - "polymer-project-config": "3.6.0", - "sw-precache": "5.2.0", + "polymer-project-config": "3.9.0", + "sw-precache": "5.2.1", "vinyl": "1.2.0", "vinyl-fs": "2.4.4" }, @@ -5903,13 +5974,13 @@ "integrity": "sha1-pNgMCC/v5x5Ap8DwfR5lVbu8e1I=", "dev": true, "requires": { - "@types/node": "6.0.94" + "@types/node": "6.0.101" } }, "@types/node": { - "version": "6.0.94", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.94.tgz", - "integrity": "sha512-CwopBfOTONzc1bDDTh8/KzW+zssiIPw+nSf27Y1cuGIkZJ7zuhkig6xO5p9pBW/RY99DznOMCIj+FXx8EIy+qw==", + "version": "6.0.101", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.101.tgz", + "integrity": "sha512-IQ7V3D6+kK1DArTqTBrnl3M+YgJZLw8ta8w3Q9xjR79HaJzMAoTbZ8TNzUTztrkCKPTqIstE2exdbs1FzsYLUw==", "dev": true }, "clone": { @@ -6002,7 +6073,7 @@ "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", "dev": true, "requires": { - "convert-source-map": "1.5.0", + "convert-source-map": "1.5.1", "graceful-fs": "4.1.11", "strip-bom": "2.0.0", "through2": "2.0.3", @@ -6098,7 +6169,7 @@ "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", "dev": true, "requires": { - "duplexify": "3.5.1", + "duplexify": "3.5.3", "glob-stream": "5.3.5", "graceful-fs": "4.1.11", "gulp-sourcemaps": "1.6.0", @@ -6137,21 +6208,21 @@ } }, "polymer-project-config": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/polymer-project-config/-/polymer-project-config-3.6.0.tgz", - "integrity": "sha512-2nS+KJL8Vnb2/skfmBcsjWzV0wZ0QFoHn/mfK0YRtLiGyL3TXDZAX4+rQJRxwHJNCMtxnVUhn6OeFlQoEodujA==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/polymer-project-config/-/polymer-project-config-3.9.0.tgz", + "integrity": "sha512-WPOqlV2W/M4Ni40QIqYSv8PE7H4rjiPm1KEf02QPtjZOGlAC4Rv7e6UJ1Ke1O70WT5bydcsEn3LViFIqYpVOJw==", "dev": true, "requires": { - "@types/node": "6.0.94", + "@types/node": "6.0.101", "jsonschema": "1.2.2", "minimatch-all": "1.1.0", "plylog": "0.5.0" }, "dependencies": { "@types/node": { - "version": "6.0.94", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.94.tgz", - "integrity": "sha512-CwopBfOTONzc1bDDTh8/KzW+zssiIPw+nSf27Y1cuGIkZJ7zuhkig6xO5p9pBW/RY99DznOMCIj+FXx8EIy+qw==", + "version": "6.0.101", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.101.tgz", + "integrity": "sha512-IQ7V3D6+kK1DArTqTBrnl3M+YgJZLw8ta8w3Q9xjR79HaJzMAoTbZ8TNzUTztrkCKPTqIstE2exdbs1FzsYLUw==", "dev": true } } @@ -6167,10 +6238,10 @@ "@types/babylon": "6.16.2", "@types/compression": "0.0.33", "@types/content-type": "1.1.2", - "@types/express": "4.0.39", + "@types/express": "4.11.1", "@types/mime": "0.0.29", "@types/mz": "0.0.29", - "@types/node": "8.5.1", + "@types/node": "8.9.4", "@types/opn": "3.0.28", "@types/parse5": "2.2.34", "@types/pem": "1.9.3", @@ -6199,10 +6270,10 @@ "babel-plugin-transform-es2015-unicode-regex": "6.24.1", "babel-plugin-transform-regenerator": "6.26.0", "babylon": "6.18.0", - "browser-capabilities": "0.2.1", + "browser-capabilities": "0.2.2", "command-line-args": "3.0.5", "command-line-usage": "3.0.8", - "compression": "1.7.1", + "compression": "1.7.2", "content-type": "1.0.4", "dom5": "2.3.0", "express": "4.16.2", @@ -6284,9 +6355,9 @@ "dev": true, "requires": { "debug": "2.2.0", - "depd": "1.1.1", + "depd": "1.1.2", "destroy": "1.0.4", - "encodeurl": "1.0.1", + "encodeurl": "1.0.2", "escape-html": "1.0.3", "etag": "1.7.0", "fresh": "0.3.0", @@ -6392,13 +6463,13 @@ } }, "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.5.2" + "ipaddr.js": "1.6.0" } }, "pseudomap": { @@ -6486,9 +6557,9 @@ } }, "rc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz", - "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.5.tgz", + "integrity": "sha1-J1zWh/bjs2zHVrqibf7oCnkDAf0=", "dev": true, "requires": { "deep-extend": "0.4.2", @@ -6505,16 +6576,6 @@ } } }, - "read-all-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz", - "integrity": "sha1-NcPhd/IHjveJ7kv6+kNzB06u9Po=", - "dev": true, - "requires": { - "pinkie-promise": "2.0.1", - "readable-stream": "2.3.3" - } - }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -6642,12 +6703,12 @@ } }, "registry-auth-token": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", - "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "1.2.2", + "rc": "1.2.5", "safe-buffer": "5.1.1" } }, @@ -6657,7 +6718,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.2" + "rc": "1.2.5" } }, "regjsgen": { @@ -6735,7 +6796,7 @@ "aws-sign2": "0.6.0", "aws4": "1.6.0", "caseless": "0.11.0", - "combined-stream": "1.0.5", + "combined-stream": "1.0.6", "extend": "3.0.1", "forever-agent": "0.6.1", "form-data": "2.1.4", @@ -6745,13 +6806,13 @@ "is-typedarray": "1.0.0", "isstream": "0.1.2", "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", + "mime-types": "2.1.18", "oauth-sign": "0.8.2", "qs": "6.3.2", "stringstream": "0.0.5", "tough-cookie": "2.3.3", "tunnel-agent": "0.4.3", - "uuid": "3.1.0" + "uuid": "3.2.1" }, "dependencies": { "qs": { @@ -6759,12 +6820,6 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", "dev": true - }, - "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", - "dev": true } } }, @@ -6860,15 +6915,15 @@ } }, "rollup": { - "version": "0.49.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.49.3.tgz", - "integrity": "sha512-n/vHRX4GhMIyGZEQRANcSFVtvz99bSRbNMuoC33ar9f4CViqffyF9WklLb2mxIQ6I/uFf7wDEpc66bXBFE7FvA==", + "version": "0.54.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.54.1.tgz", + "integrity": "sha512-ebUUgUQ7K/sLn67CtO8Jj8H3RgKAoVWrpiJA7enOkwZPZzTCl8GC8CZ00g5jowjX80KgBmzs4Z1MV6cgglT86A==", "dev": true }, "rollup-plugin-hypothetical": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-hypothetical/-/rollup-plugin-hypothetical-1.2.1.tgz", - "integrity": "sha1-9CcHe3urWSzCmBl6uaqsT+TvoFU=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-hypothetical/-/rollup-plugin-hypothetical-2.1.0.tgz", + "integrity": "sha512-MlxPQTkMtiRUtyhIJ7FpBvTzWtar8eFBA+V7/J6Deg9fSgIIHwL6bJKK1Wl1uWSWtOrWhOmtsMwb9F6aagP/Pg==", "dev": true }, "run-async": { @@ -6919,105 +6974,50 @@ "dev": true }, "selenium-standalone": { - "version": "5.11.2", - "resolved": "https://registry.npmjs.org/selenium-standalone/-/selenium-standalone-5.11.2.tgz", - "integrity": "sha1-ckzKpy+ybzcR4OIJieR4xBM9+EQ=", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/selenium-standalone/-/selenium-standalone-6.12.0.tgz", + "integrity": "sha1-eJcw2wmhBfHM4SxkJNeV0RxUO9Q=", "dev": true, "optional": true, "requires": { - "async": "1.2.1", - "commander": "2.6.0", - "lodash": "3.9.3", - "minimist": "1.1.0", - "mkdirp": "0.5.0", - "progress": "1.1.8", + "async": "2.6.0", + "commander": "2.9.0", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "lodash": "4.17.4", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "progress": "2.0.0", "request": "2.79.0", "tar-stream": "1.5.2", - "urijs": "1.16.1", - "which": "1.1.1", + "urijs": "1.19.1", + "which": "1.3.0", "yauzl": "2.9.1" }, "dependencies": { - "async": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/async/-/async-1.2.1.tgz", - "integrity": "sha1-pIFqF81f9RbfosdpikUzabl5DeA=", - "dev": true, - "optional": true - }, - "commander": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", - "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=", - "dev": true, - "optional": true - }, - "is-absolute": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.1.7.tgz", - "integrity": "sha1-hHSREZ/MtftDYhfMc39/qtUPYD8=", + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "optional": true, "requires": { - "is-relative": "0.1.3" + "ms": "2.0.0" } }, - "is-relative": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.1.3.tgz", - "integrity": "sha1-kF/uiuhvRbPsYUvDwVyGnfCHboI=", - "dev": true, - "optional": true - }, - "lodash": { - "version": "3.9.3", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.9.3.tgz", - "integrity": "sha1-AVnoaDL+/8bWHYUrEqlTuZSWvTI=", - "dev": true, - "optional": true - }, "minimist": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.0.tgz", - "integrity": "sha1-zfIl6ImPhAolje1E/JF3Z3Cv3JM=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true }, - "mkdirp": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", - "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=", - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true, - "optional": true - } - } - }, - "urijs": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.16.1.tgz", - "integrity": "sha1-hZrTGJD1+VKHJ76J8ZMslPtHMeI=", + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", "dev": true, "optional": true - }, - "which": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.1.1.tgz", - "integrity": "sha1-nOUSRZlGFm4SwIPwjsBzOA/Iy7s=", - "dev": true, - "optional": true, - "requires": { - "is-absolute": "0.1.7" - } } } }, @@ -7033,13 +7033,13 @@ "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { - "semver": "5.4.1" + "semver": "5.5.0" }, "dependencies": { "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true } } @@ -7151,7 +7151,7 @@ "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==", "dev": true, "requires": { - "encodeurl": "1.0.1", + "encodeurl": "1.0.2", "escape-html": "1.0.3", "parseurl": "1.3.2", "send": "0.16.1" @@ -7173,9 +7173,9 @@ "dev": true, "requires": { "debug": "2.6.9", - "depd": "1.1.1", + "depd": "1.1.2", "destroy": "1.0.4", - "encodeurl": "1.0.1", + "encodeurl": "1.0.2", "escape-html": "1.0.3", "etag": "1.8.1", "fresh": "0.5.2", @@ -7224,7 +7224,6 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, - "optional": true, "requires": { "shebang-regex": "1.0.0" } @@ -7233,8 +7232,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true, - "optional": true + "dev": true }, "shelljs": { "version": "0.7.8", @@ -7272,7 +7270,7 @@ "path-to-regexp": "1.7.0", "samsam": "1.3.0", "text-encoding": "0.6.4", - "type-detect": "4.0.5" + "type-detect": "4.0.8" }, "dependencies": { "isarray": { @@ -7310,12 +7308,6 @@ "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", "dev": true }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", - "dev": true - }, "sntp": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", @@ -7332,7 +7324,7 @@ "dev": true, "requires": { "debug": "2.6.8", - "engine.io": "3.1.4", + "engine.io": "3.1.5", "socket.io-adapter": "1.1.1", "socket.io-client": "2.0.4", "socket.io-parser": "3.1.2" @@ -7355,7 +7347,7 @@ "component-bind": "1.0.0", "component-emitter": "1.2.1", "debug": "2.6.8", - "engine.io-client": "3.1.4", + "engine.io-client": "3.1.5", "has-cors": "1.1.0", "indexof": "0.0.1", "object-component": "0.0.3", @@ -7636,8 +7628,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true, - "optional": true + "dev": true }, "strip-indent": { "version": "2.0.0", @@ -7658,13 +7649,13 @@ "dev": true }, "sw-precache": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/sw-precache/-/sw-precache-5.2.0.tgz", - "integrity": "sha512-sKctdX+5hUxkqJ/1DM88ubQ+QRvyw7CnxWdk909N2DgvxMqc1gcQFrwL7zpVc87wFmCA/OvRQd0iMC2XdFopYg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/sw-precache/-/sw-precache-5.2.1.tgz", + "integrity": "sha512-8FAy+BP/FXE+ILfiVTt+GQJ6UEf4CVHD9OfhzH0JX+3zoy2uFk7Vn9EfXASOtVmmIVbL3jE/W8Z66VgPSZcMhw==", "dev": true, "requires": { "dom-urls": "1.1.0", - "es6-promise": "4.1.1", + "es6-promise": "4.2.4", "glob": "7.1.2", "lodash.defaults": "4.2.0", "lodash.template": "4.4.0", @@ -7672,7 +7663,7 @@ "mkdirp": "0.5.1", "pretty-bytes": "4.0.2", "sw-toolbox": "3.6.0", - "update-notifier": "1.0.3" + "update-notifier": "2.3.0" }, "dependencies": { "lodash.template": { @@ -7699,22 +7690,6 @@ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", "dev": true - }, - "update-notifier": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-1.0.3.tgz", - "integrity": "sha1-j5LFFUgr1oMbfJMBPnD4dVLHz1o=", - "dev": true, - "requires": { - "boxen": "0.6.0", - "chalk": "1.1.3", - "configstore": "2.1.0", - "is-npm": "1.0.0", - "latest-version": "2.0.0", - "lazy-req": "1.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "2.0.0" - } } } }, @@ -7813,15 +7788,15 @@ "dev": true, "requires": { "bl": "1.2.1", - "end-of-stream": "1.4.0", + "end-of-stream": "1.4.1", "readable-stream": "2.3.3", "xtend": "4.0.1" }, "dependencies": { "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" @@ -7854,7 +7829,6 @@ "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "dev": true, - "optional": true, "requires": { "execa": "0.7.0" } @@ -7941,9 +7915,9 @@ "dev": true }, "timed-out": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-3.1.3.tgz", - "integrity": "sha1-lYYL/MXHbCd/j4Mm/Q9bLiDrohc=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", "dev": true }, "timers-ext": { @@ -7963,6 +7937,17 @@ "dev": true, "requires": { "extend-shallow": "2.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.1" + } + } } }, "to-array": { @@ -7972,9 +7957,9 @@ "dev": true }, "to-boolean-x": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-boolean-x/-/to-boolean-x-1.0.1.tgz", - "integrity": "sha512-PstxY3K6hVEHnY3FITs8XBoJbt0RI1e4MLIhAL9hWa3BtVLCrb86vU5z6lEKh7uZZjiPiLqIKMmfMro1nNgtXQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/to-boolean-x/-/to-boolean-x-1.0.2.tgz", + "integrity": "sha1-BbH7QerAyH1qtKxKKDDawDbnF+c=", "dev": true }, "to-fast-properties": { @@ -8002,7 +7987,7 @@ "dev": true, "requires": { "cached-constructors-x": "1.0.0", - "nan-x": "1.0.0", + "nan-x": "1.0.1", "parse-int-x": "2.0.0", "to-primitive-x": "1.1.0", "trim-x": "3.0.0" @@ -8157,19 +8142,19 @@ } }, "type-detect": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.5.tgz", - "integrity": "sha512-N9IvkQslUGYGC24RkJk1ba99foK6TkwC2FHAEBlQFBP0RxQZS8ZpJuAZcwiY/w9ZJHFQb1aOXBI60OdxhTrwEQ==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, "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" } }, "typedarray": { @@ -8229,7 +8214,6 @@ "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "dev": true, - "optional": true, "requires": { "crypto-random-string": "1.0.0" } @@ -8241,9 +8225,9 @@ "dev": true }, "unzip-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz", - "integrity": "sha1-uYTwh3/AqJwsdzzB73tbIytbBv4=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", "dev": true }, "update-notifier": { @@ -8251,10 +8235,9 @@ "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", "dev": true, - "optional": true, "requires": { "boxen": "1.3.0", - "chalk": "2.3.0", + "chalk": "2.3.1", "configstore": "3.1.1", "import-lazy": "2.1.0", "is-installed-globally": "0.1.0", @@ -8264,22 +8247,6 @@ "xdg-basedir": "3.0.0" }, "dependencies": { - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", - "dev": true, - "optional": true, - "requires": { - "string-width": "2.1.1" - } - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", @@ -8289,203 +8256,38 @@ "color-convert": "1.9.1" } }, - "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", - "dev": true, - "optional": true, - "requires": { - "ansi-align": "2.0.0", - "camelcase": "4.1.0", - "chalk": "2.3.0", - "cli-boxes": "1.0.0", - "string-width": "2.1.1", - "term-size": "1.2.0", - "widest-line": "2.0.0" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true, - "optional": true - }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", "dev": true, "requires": { "ansi-styles": "3.2.0", "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "configstore": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", - "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", - "dev": true, - "optional": true, - "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.1.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.3.0", - "xdg-basedir": "3.0.0" - } - }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "optional": true, - "requires": { - "is-obj": "1.0.1" - } - }, - "got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", - "dev": true, - "optional": true, - "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", - "safe-buffer": "5.1.1", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" + "supports-color": "5.2.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", - "dev": true, - "optional": true, - "requires": { - "package-json": "4.0.1" - } - }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", - "dev": true, - "optional": true, - "requires": { - "got": "6.7.1", - "registry-auth-token": "3.3.1", - "registry-url": "3.1.0", - "semver": "5.4.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, - "optional": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - }, "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", + "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", "dev": true, "requires": { - "has-flag": "2.0.0" + "has-flag": "3.0.0" } - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true, - "optional": true - }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", - "dev": true, - "optional": true - }, - "widest-line": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", - "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", - "dev": true, - "optional": true, - "requires": { - "string-width": "2.1.1" - } - }, - "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "signal-exit": "3.0.2" - } - }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", - "dev": true } } }, "urijs": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.0.tgz", - "integrity": "sha512-Qs2odXn0hST5VSPVjpi73CMqtbAoanahaqWBujGU+IyMrMqpWcIhDewxQRhCkmqYxuyvICDcSuLdv2O7ncWBGw==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.1.tgz", + "integrity": "sha512-xVrGVi94ueCJNrBSTjWqjvtgvl3cyOTThp2zaMaFNGp3F542TR6sM3f2o8RqZl+AwteClSVmoCyt0ka4RjQOQg==", "dev": true }, "urix": { @@ -8525,15 +8327,15 @@ "dev": true }, "uuid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", - "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", "dev": true }, "uws": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/uws/-/uws-0.14.5.tgz", - "integrity": "sha1-Z6rzPEaypYel9mZtAPdpEyjxSdw=", + "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 }, @@ -8739,40 +8541,78 @@ } }, "wct-local": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/wct-local/-/wct-local-2.0.16.tgz", - "integrity": "sha512-htO30k1yBRkct3ifeFVMxOUgrLeeGwaQ19NT4bGNqiI4mYeCV4uBlzpAkBFJMP+vE67Q9j08xoTGjK/xBaZW7w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wct-local/-/wct-local-2.1.0.tgz", + "integrity": "sha512-OiMSbxp6e5tyvTbUA4VAQbw4we53EXEmekx9BbIgS/HryoQISzap5DSAE/kvpRpJ2Axt0z12d8ChxqwNflApfA==", "dev": true, "optional": true, "requires": { - "@types/chalk": "0.4.31", - "@types/express": "4.0.39", + "@types/express": "4.11.1", "@types/freeport": "1.0.21", "@types/launchpad": "0.6.0", - "@types/node": "6.0.94", - "@types/which": "1.0.28", - "chalk": "1.1.3", + "@types/node": "9.4.6", + "@types/which": "1.3.1", + "chalk": "2.3.1", "cleankill": "2.0.0", "freeport": "1.0.5", - "launchpad": "0.6.0", + "launchpad": "0.7.0", "promisify-node": "0.4.0", - "selenium-standalone": "5.11.2", + "selenium-standalone": "6.12.0", "which": "1.3.0" }, "dependencies": { "@types/node": { - "version": "6.0.94", - "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.94.tgz", - "integrity": "sha512-CwopBfOTONzc1bDDTh8/KzW+zssiIPw+nSf27Y1cuGIkZJ7zuhkig6xO5p9pBW/RY99DznOMCIj+FXx8EIy+qw==", + "version": "9.4.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.4.6.tgz", + "integrity": "sha512-CTUtLb6WqCCgp6P59QintjHWqzf4VL1uPA27bipLAPxFqrtK1gEYllePzTICGqQ8rYsCbpnsNypXjjDzGAAjEQ==", "dev": true, "optional": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "5.2.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, + "optional": true + }, + "supports-color": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", + "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "3.0.0" + } } } }, "wct-sauce": { - "version": "2.0.0-pre.3", - "resolved": "https://registry.npmjs.org/wct-sauce/-/wct-sauce-2.0.0-pre.3.tgz", - "integrity": "sha512-58ANkqyFsbmEE29uBqAKHwxbx+T9fiHT9dfC54Lp7Aix/AAQL2Q2XGfhiZlr3DzphyNgX2STw+qMGyu3QPU8/w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wct-sauce/-/wct-sauce-2.0.0.tgz", + "integrity": "sha512-amICD6iZOVJEJ4uymfdPFdk17CkSIYwHPDzDh4cH/ITYcNskZ3VB/2VPtU9ZIKuWMVdqPwfBovXcjlhn8+8idA==", "dev": true, "optional": true, "requires": { @@ -8791,6 +8631,13 @@ "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", "dev": true, "optional": true + }, + "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, + "optional": true } } }, @@ -8834,14 +8681,14 @@ } }, "web-component-tester": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/web-component-tester/-/web-component-tester-6.4.1.tgz", - "integrity": "sha512-ke9sY2ayW4Ck28vty7aSGpsrUWwl8FqWY6o6ryqsbcIH3AQZDZTdpxo9xT8HSIwj+0C9ooQ4gnBI5VhHyA9+ZA==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/web-component-tester/-/web-component-tester-6.5.0.tgz", + "integrity": "sha512-C8nK7mhLTGzm/3QcjBIzI5Pk3OLrEvup246Pc9stAD+sTvLWtH8tjVL+vU5KCOAdudKVnelGMbE4ICaNrl69+A==", "dev": true, "requires": { "@polymer/sinonjs": "1.17.1", "@polymer/test-fixture": "0.0.3", - "@webcomponents/webcomponentsjs": "1.0.20", + "@webcomponents/webcomponentsjs": "1.1.0", "accessibility-developer-tools": "2.12.0", "async": "2.6.0", "body-parser": "1.18.2", @@ -8858,7 +8705,7 @@ "polyserve": "0.23.0", "promisify-node": "0.4.0", "resolve": "1.4.0", - "semver": "5.4.1", + "semver": "5.5.0", "send": "0.11.1", "server-destroy": "1.0.1", "sinon": "2.4.1", @@ -8866,8 +8713,8 @@ "socket.io": "2.0.4", "stacky": "1.3.1", "update-notifier": "2.3.0", - "wct-local": "2.0.16", - "wct-sauce": "2.0.0-pre.3", + "wct-local": "2.1.0", + "wct-sauce": "2.0.0", "wd": "1.5.0" }, "dependencies": { @@ -8890,9 +8737,9 @@ "dev": true }, "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true } } @@ -8913,12 +8760,45 @@ "dev": true }, "widest-line": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", - "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", + "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", "dev": true, "requires": { - "string-width": "1.0.2" + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } } }, "winston": { @@ -8977,20 +8857,20 @@ } }, "write-file-atomic": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { "graceful-fs": "4.1.11", "imurmurhash": "0.1.4", - "slide": "1.1.6" + "signal-exit": "3.0.2" } }, "ws": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.2.tgz", - "integrity": "sha512-t+WGpsNxhMR4v6EClXS8r8km5ZljKJzyGhJf7goJz9k5Ye3+b5Bvno5rjqPuIBn5mnn5GBb7o8IrIWHxX1qOLQ==", + "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", @@ -8999,13 +8879,10 @@ } }, "xdg-basedir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz", - "integrity": "sha1-7byQPMOF/ARSPZZqM1UEtVBNG9I=", - "dev": true, - "requires": { - "os-homedir": "1.0.2" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true }, "xmlbuilder": { "version": "8.2.2", @@ -9022,9 +8899,9 @@ "optional": true }, "xmlhttprequest-ssl": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.4.tgz", - "integrity": "sha1-BPVgkVcks4kIhxXMDteBPpZ3v1c=", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", + "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", "dev": true }, "xtend": { diff --git a/package.json b/package.json index 25e6dcb..79508f6 100644 --- a/package.json +++ b/package.json @@ -31,19 +31,19 @@ }, "homepage": "https://webcomponents.org/polyfills", "devDependencies": { - "@webcomponents/custom-elements": "^1.0.6", - "@webcomponents/shadycss": "^1.1.0", - "@webcomponents/template": "^1.2.0", + "@webcomponents/custom-elements": "^1.0.8", + "@webcomponents/shadycss": "^1.1.1", + "@webcomponents/template": "^1.2.2", "@webcomponents/webcomponents-platform": "^1.0.0", "eslint": "^3.4.0", "eslint-plugin-html": "^2.0.0", "google-closure-compiler": "^20170806.0.0", "gulp": "^3.8.8", "gulp-rename": "^1.2.2", - "gulp-rollup": "^2.15.0", + "gulp-rollup": "^2.16.2", "gulp-size": "^2.1.0", - "gulp-sourcemaps": "^2.4.1", - "web-component-tester": "^6.4.1" + "gulp-sourcemaps": "^2.6.4", + "web-component-tester": "^6.5.0" }, "publishConfig": { "access": "public" diff --git a/shadydom.min.js b/shadydom.min.js index d58a2c1..27ccb00 100644 --- a/shadydom.min.js +++ b/shadydom.min.js @@ -54,7 +54,7 @@ this.u=this.I=!0}};function xb(a){function b(b,d){b=new a(b,d);b.s=d&&!!d.compos function Bb(a){var b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return d},configurable:!0});for(var c=b.length-1;0<=c;c--){var d=b[c];Ab(a,d,"capture");if(a.u)return}Object.defineProperty(a,"eventPhase",{get:function(){return Event.AT_TARGET}});var e;for(c=0;c '123yyyy'\n//\n// With 1-edit updates, the shortest path would be just to update all seven\n// characters. With 2-edit updates, we delete 4, leave 3, and add 4. This\n// leaves the substring '123' intact.\nfunction calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n // \"Deletion\" columns\n let rowCount = oldEnd - oldStart + 1;\n let columnCount = currentEnd - currentStart + 1;\n let distances = new Array(rowCount);\n\n // \"Addition\" rows. Initialize null column.\n for (let i = 0; i < rowCount; i++) {\n distances[i] = new Array(columnCount);\n distances[i][0] = i;\n }\n\n // Initialize null row\n for (let j = 0; j < columnCount; j++)\n distances[0][j] = j;\n\n for (let i = 1; i < rowCount; i++) {\n for (let j = 1; j < columnCount; j++) {\n if (equals(current[currentStart + j - 1], old[oldStart + i - 1]))\n distances[i][j] = distances[i - 1][j - 1];\n else {\n let north = distances[i - 1][j] + 1;\n let west = distances[i][j - 1] + 1;\n distances[i][j] = north < west ? north : west;\n }\n }\n }\n\n return distances;\n}\n\n// This starts at the final weight, and walks \"backward\" by finding\n// the minimum previous weight recursively until the origin of the weight\n// matrix.\nfunction spliceOperationsFromEditDistances(distances) {\n let i = distances.length - 1;\n let j = distances[0].length - 1;\n let current = distances[i][j];\n let edits = [];\n while (i > 0 || j > 0) {\n if (i == 0) {\n edits.push(EDIT_ADD);\n j--;\n continue;\n }\n if (j == 0) {\n edits.push(EDIT_DELETE);\n i--;\n continue;\n }\n let northWest = distances[i - 1][j - 1];\n let west = distances[i - 1][j];\n let north = distances[i][j - 1];\n\n let min;\n if (west < north)\n min = west < northWest ? west : northWest;\n else\n min = north < northWest ? north : northWest;\n\n if (min == northWest) {\n if (northWest == current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = northWest;\n }\n i--;\n j--;\n } else if (min == west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n return edits;\n}\n\n/**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n * \n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n */\n\n/**\n * Lacking individual splice mutation information, the minimal set of\n * splices can be synthesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortest path through it.\n *\n * Complexity: O(l * p)\n * l: The length of the current array\n * p: The length of the old array\n */\nfunction calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n let prefixCount = 0;\n let suffixCount = 0;\n let splice;\n\n let minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n if (currentStart == 0 && oldStart == 0)\n prefixCount = sharedPrefix(current, old, minLength);\n\n if (currentEnd == current.length && oldEnd == old.length)\n suffixCount = sharedSuffix(current, old, minLength - prefixCount);\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\n if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)\n return [];\n\n if (currentStart == currentEnd) {\n splice = newSplice(currentStart, [], 0);\n while (oldStart < oldEnd)\n splice.removed.push(old[oldStart++]);\n\n return [ splice ];\n } else if (oldStart == oldEnd)\n return [ newSplice(currentStart, [], currentEnd - currentStart) ];\n\n let ops = spliceOperationsFromEditDistances(\n calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd));\n\n splice = undefined;\n let splices = [];\n let index = currentStart;\n let oldIndex = oldStart;\n for (let i = 0; i < ops.length; i++) {\n switch(ops[i]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(splice);\n splice = undefined;\n }\n\n index++;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n break;\n case EDIT_DELETE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (splice) {\n splices.push(splice);\n }\n return splices;\n}\n\nfunction sharedPrefix(current, old, searchLength) {\n for (let i = 0; i < searchLength; i++)\n if (!equals(current[i], old[i]))\n return i;\n return searchLength;\n}\n\nfunction sharedSuffix(current, old, searchLength) {\n let index1 = current.length;\n let index2 = old.length;\n let count = 0;\n while (count < searchLength && equals(current[--index1], old[--index2]))\n count++;\n\n return count;\n}\n\nfunction equals(currentValue, previousValue) {\n return currentValue === previousValue;\n}\n\nexport function calculateSplices(current, previous) {\n return calcSplices(current, 0, current.length, previous, 0,\n previous.length);\n}\n\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport let settings = window['ShadyDOM'] || {};\n\nsettings.hasNativeShadowDOM = Boolean(Element.prototype.attachShadow && Node.prototype.getRootNode);\n\nlet desc = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild');\n\nsettings.hasDescriptors = Boolean(desc && desc.configurable && desc.get);\nsettings.inUse = settings['force'] || !settings.hasNativeShadowDOM;\n\nexport function isTrackingLogicalChildNodes(node) {\n return (node.__shady && node.__shady.firstChild !== undefined);\n}\n\nexport function isShadyRoot(obj) {\n return Boolean(obj.__localName === 'ShadyRoot');\n}\n\nexport function ownerShadyRootForNode(node) {\n let root = node.getRootNode();\n if (isShadyRoot(root)) {\n return root;\n }\n}\n\nlet p = Element.prototype;\nlet matches = p.matches || p.matchesSelector ||\n p.mozMatchesSelector || p.msMatchesSelector ||\n p.oMatchesSelector || p.webkitMatchesSelector;\n\nexport function matchesSelector(element, selector) {\n return matches.call(element, selector);\n}\n\nfunction copyOwnProperty(name, source, target) {\n let pd = Object.getOwnPropertyDescriptor(source, name);\n if (pd) {\n Object.defineProperty(target, name, pd);\n }\n}\n\nexport function extend(target, source) {\n if (target && source) {\n let n$ = Object.getOwnPropertyNames(source);\n for (let i=0, n; (i {\n while (queue.length) {\n // catch errors in user code...\n try {\n queue.shift()();\n } catch(e) {\n // enqueue another record and throw\n twiddle.textContent = content++;\n throw(e);\n }\n }\n}).observe(twiddle, {characterData: true});\n\n// use MutationObserver to get microtask async timing.\nexport function microtask(callback) {\n queue.push(callback);\n twiddle.textContent = content++;\n}\n\nexport const hasDocumentContains = Boolean(document.contains);\n\nexport function contains(container, node) {\n while (node) {\n if (node == container) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n// Cribbed from ShadowDOM polyfill\n// https://github.com/webcomponents/webcomponentsjs/blob/master/src/ShadowDOM/wrappers/HTMLElement.js#L28\n/////////////////////////////////////////////////////////////////////////////\n// innerHTML and outerHTML\n\n// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#escapingString\nlet escapeAttrRegExp = /[&\\u00A0\"]/g;\nlet escapeDataRegExp = /[&\\u00A0<>]/g;\n\nfunction escapeReplace(c) {\n switch (c) {\n case '&':\n return '&';\n case '<':\n return '<';\n case '>':\n return '>';\n case '\"':\n return '"';\n case '\\u00A0':\n return ' ';\n }\n}\n\nfunction escapeAttr(s) {\n return s.replace(escapeAttrRegExp, escapeReplace);\n}\n\nfunction escapeData(s) {\n return s.replace(escapeDataRegExp, escapeReplace);\n}\n\nfunction makeSet(arr) {\n let set = {};\n for (let i = 0; i < arr.length; i++) {\n set[arr[i]] = true;\n }\n return set;\n}\n\n// http://www.whatwg.org/specs/web-apps/current-work/#void-elements\nlet voidElements = makeSet([\n 'area',\n 'base',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n]);\n\nlet plaintextParents = makeSet([\n 'style',\n 'script',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'plaintext',\n 'noscript'\n]);\n\n/**\n * @param {Node} node\n * @param {Node} parentNode\n * @param {Function=} callback\n */\nexport function getOuterHTML(node, parentNode, callback) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE: {\n let tagName = node.localName;\n let s = '<' + tagName;\n let attrs = node.attributes;\n for (let i = 0, attr; (attr = attrs[i]); i++) {\n s += ' ' + attr.name + '=\"' + escapeAttr(attr.value) + '\"';\n }\n s += '>';\n if (voidElements[tagName]) {\n return s;\n }\n return s + getInnerHTML(node, callback) + '';\n }\n case Node.TEXT_NODE: {\n let data = /** @type {Text} */ (node).data;\n if (parentNode && plaintextParents[parentNode.localName]) {\n return data;\n }\n return escapeData(data);\n }\n case Node.COMMENT_NODE: {\n return '';\n }\n default: {\n window.console.error(node);\n throw new Error('not implemented');\n }\n }\n}\n\n/**\n * @param {Node} node\n * @param {Function=} callback\n */\nexport function getInnerHTML(node, callback) {\n if (node.localName === 'template') {\n node = /** @type {HTMLTemplateElement} */ (node).content;\n }\n let s = '';\n let c$ = callback ? callback(node) : node.childNodes;\n for (let i=0, l=c$.length, child; (i childNodes(n));\n}\n\nexport function textContent(node) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_FRAGMENT_NODE:\n let textWalker = document.createTreeWalker(node, NodeFilter.SHOW_TEXT,\n null, false);\n let content = '', n;\n while ( (n = textWalker.nextNode()) ) {\n // TODO(sorvell): can't use textContent since we patch it on Node.prototype!\n // However, should probably patch it only on element.\n content += n.nodeValue;\n }\n return content;\n default:\n return node.nodeValue;\n }\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport let appendChild = Element.prototype.appendChild;\nexport let insertBefore = Element.prototype.insertBefore;\nexport let removeChild = Element.prototype.removeChild;\nexport let setAttribute = Element.prototype.setAttribute;\nexport let removeAttribute = Element.prototype.removeAttribute;\nexport let cloneNode = Element.prototype.cloneNode;\nexport let importNode = Document.prototype.importNode;\nexport let addEventListener = Element.prototype.addEventListener;\nexport let removeEventListener = Element.prototype.removeEventListener;\nexport let windowAddEventListener = Window.prototype.addEventListener;\nexport let windowRemoveEventListener = Window.prototype.removeEventListener;\nexport let dispatchEvent = Element.prototype.dispatchEvent;\nexport let querySelector = Element.prototype.querySelector;\nexport let querySelectorAll = Element.prototype.querySelectorAll;\nexport let contains = Node.prototype.contains || HTMLElement.prototype.contains;\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {getInnerHTML} from './innerHTML.js';\nimport * as nativeTree from './native-tree.js';\nimport {contains as nativeContains} from './native-methods.js';\n\nfunction clearNode(node) {\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n}\n\nconst nativeInnerHTMLDesc = /** @type {ObjectPropertyDescriptor} */(\n Object.getOwnPropertyDescriptor(Element.prototype, 'innerHTML') ||\n Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'innerHTML'));\n\nconst inertDoc = document.implementation.createHTMLDocument('inert');\n\nconst nativeActiveElementDescriptor =\n /** @type {ObjectPropertyDescriptor} */(\n Object.getOwnPropertyDescriptor(Document.prototype, 'activeElement')\n );\nfunction getDocumentActiveElement() {\n if (nativeActiveElementDescriptor && nativeActiveElementDescriptor.get) {\n return nativeActiveElementDescriptor.get.call(document);\n } else if (!utils.settings.hasDescriptors) {\n return document.activeElement;\n }\n}\n\nfunction activeElementForNode(node) {\n let active = getDocumentActiveElement();\n // In IE11, activeElement might be an empty object if the document is\n // contained in an iframe.\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10998788/\n if (!active || !active.nodeType) {\n return null;\n }\n let isShadyRoot = !!(utils.isShadyRoot(node));\n if (node !== document) {\n // If this node isn't a document or shady root, then it doesn't have\n // an active element.\n if (!isShadyRoot) {\n return null;\n }\n // If this shady root's host is the active element or the active\n // element is not a descendant of the host (in the composed tree),\n // then it doesn't have an active element.\n if (node.host === active ||\n !nativeContains.call(node.host, active)) {\n return null;\n }\n }\n // This node is either the document or a shady root of which the active\n // element is a (composed) descendant of its host; iterate upwards to\n // find the active element's most shallow host within it.\n let activeRoot = utils.ownerShadyRootForNode(active);\n while (activeRoot && activeRoot !== node) {\n active = activeRoot.host;\n activeRoot = utils.ownerShadyRootForNode(active);\n }\n if (node === document) {\n // This node is the document, so activeRoot should be null.\n return activeRoot ? null : active;\n } else {\n // This node is a non-document shady root, and it should be\n // activeRoot.\n return activeRoot === node ? active : null;\n }\n}\n\nlet OutsideAccessors = {\n\n parentElement: {\n /** @this {Node} */\n get() {\n let l = this.__shady && this.__shady.parentNode;\n if (l && l.nodeType !== Node.ELEMENT_NODE) {\n l = null;\n }\n return l !== undefined ? l : nativeTree.parentElement(this);\n },\n configurable: true\n },\n\n parentNode: {\n /** @this {Node} */\n get() {\n let l = this.__shady && this.__shady.parentNode;\n return l !== undefined ? l : nativeTree.parentNode(this);\n },\n configurable: true\n },\n\n nextSibling: {\n /** @this {Node} */\n get() {\n let l = this.__shady && this.__shady.nextSibling;\n return l !== undefined ? l : nativeTree.nextSibling(this);\n },\n configurable: true\n },\n\n previousSibling: {\n /** @this {Node} */\n get() {\n let l = this.__shady && this.__shady.previousSibling;\n return l !== undefined ? l : nativeTree.previousSibling(this);\n },\n configurable: true\n },\n\n className: {\n /**\n * @this {HTMLElement}\n */\n get() {\n return this.getAttribute('class') || '';\n },\n /**\n * @this {HTMLElement}\n */\n set(value) {\n this.setAttribute('class', value);\n },\n configurable: true\n },\n\n // fragment, element, document\n nextElementSibling: {\n /**\n * @this {HTMLElement}\n */\n get() {\n if (this.__shady && this.__shady.nextSibling !== undefined) {\n let n = this.nextSibling;\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n.nextSibling;\n }\n return n;\n } else {\n return nativeTree.nextElementSibling(this);\n }\n },\n configurable: true\n },\n\n previousElementSibling: {\n /**\n * @this {HTMLElement}\n */\n get() {\n if (this.__shady && this.__shady.previousSibling !== undefined) {\n let n = this.previousSibling;\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n.previousSibling;\n }\n return n;\n } else {\n return nativeTree.previousElementSibling(this);\n }\n },\n configurable: true\n }\n\n};\n\nlet InsideAccessors = {\n\n childNodes: {\n /**\n * @this {HTMLElement}\n */\n get() {\n let childNodes;\n if (utils.isTrackingLogicalChildNodes(this)) {\n if (!this.__shady.childNodes) {\n this.__shady.childNodes = [];\n for (let n=this.firstChild; n; n=n.nextSibling) {\n this.__shady.childNodes.push(n);\n }\n }\n childNodes = this.__shady.childNodes;\n } else {\n childNodes = nativeTree.childNodes(this);\n }\n childNodes.item = function(index) {\n return childNodes[index];\n }\n return childNodes;\n },\n configurable: true\n },\n\n childElementCount: {\n /** @this {HTMLElement} */\n get() {\n return this.children.length;\n },\n configurable: true\n },\n\n firstChild: {\n /** @this {HTMLElement} */\n get() {\n let l = this.__shady && this.__shady.firstChild;\n return l !== undefined ? l : nativeTree.firstChild(this);\n },\n configurable: true\n },\n\n lastChild: {\n /** @this {HTMLElement} */\n get() {\n let l = this.__shady && this.__shady.lastChild;\n return l !== undefined ? l : nativeTree.lastChild(this);\n },\n configurable: true\n },\n\n textContent: {\n /**\n * @this {HTMLElement}\n */\n get() {\n if (utils.isTrackingLogicalChildNodes(this)) {\n let tc = [];\n for (let i = 0, cn = this.childNodes, c; (c = cn[i]); i++) {\n if (c.nodeType !== Node.COMMENT_NODE) {\n tc.push(c.textContent);\n }\n }\n return tc.join('');\n } else {\n return nativeTree.textContent(this);\n }\n },\n /**\n * @this {HTMLElement}\n * @param {string} text\n */\n set(text) {\n if (typeof text === 'undefined' || text === null) {\n text = ''\n }\n switch (this.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_FRAGMENT_NODE:\n clearNode(this);\n // Document fragments must have no childnodes if setting a blank string\n if (text.length > 0 || this.nodeType === Node.ELEMENT_NODE) {\n this.appendChild(document.createTextNode(text));\n }\n break;\n default:\n // TODO(sorvell): can't do this if patch nodeValue.\n this.nodeValue = text;\n break;\n }\n },\n configurable: true\n },\n\n // fragment, element, document\n firstElementChild: {\n /**\n * @this {HTMLElement}\n */\n get() {\n if (this.__shady && this.__shady.firstChild !== undefined) {\n let n = this.firstChild;\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n.nextSibling;\n }\n return n;\n } else {\n return nativeTree.firstElementChild(this);\n }\n },\n configurable: true\n },\n\n lastElementChild: {\n /**\n * @this {HTMLElement}\n */\n get() {\n if (this.__shady && this.__shady.lastChild !== undefined) {\n let n = this.lastChild;\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n.previousSibling;\n }\n return n;\n } else {\n return nativeTree.lastElementChild(this);\n }\n },\n configurable: true\n },\n\n children: {\n /**\n * @this {HTMLElement}\n */\n get() {\n let children;\n if (utils.isTrackingLogicalChildNodes(this)) {\n children = Array.prototype.filter.call(this.childNodes, function(n) {\n return (n.nodeType === Node.ELEMENT_NODE);\n });\n } else {\n children = nativeTree.children(this);\n }\n children.item = function(index) {\n return children[index];\n }\n return children;\n },\n configurable: true\n },\n\n // element (HTMLElement on IE11)\n innerHTML: {\n /**\n * @this {HTMLElement}\n */\n get() {\n const content = this.localName === 'template' ?\n /** @type {HTMLTemplateElement} */(this).content : this;\n if (utils.isTrackingLogicalChildNodes(this)) {\n return getInnerHTML(content);\n } else {\n return nativeTree.innerHTML(content);\n }\n },\n /**\n * @this {HTMLElement}\n */\n set(text) {\n const content = this.localName === 'template' ?\n /** @type {HTMLTemplateElement} */(this).content : this;\n clearNode(content);\n let containerName = this.localName;\n if (!containerName || containerName === 'template') {\n containerName = 'div';\n }\n const htmlContainer = inertDoc.createElement(containerName);\n if (nativeInnerHTMLDesc && nativeInnerHTMLDesc.set) {\n nativeInnerHTMLDesc.set.call(htmlContainer, text);\n } else {\n htmlContainer.innerHTML = text;\n }\n while (htmlContainer.firstChild) {\n content.appendChild(htmlContainer.firstChild);\n }\n },\n configurable: true\n }\n\n};\n\n// Note: Can be patched on element prototype on all browsers.\n// Must be patched on instance on browsers that support native Shadow DOM\n// but do not have builtin accessors (old Chrome).\nexport let ShadowRootAccessor = {\n\n shadowRoot: {\n /**\n * @this {HTMLElement}\n */\n get() {\n return this.__shady && this.__shady.publicRoot || null;\n },\n configurable: true\n }\n};\n\n// Note: Can be patched on document prototype on browsers with builtin accessors.\n// Must be patched separately on simulated ShadowRoot.\n// Must be patched as `_activeElement` on browsers without builtin accessors.\nexport let ActiveElementAccessor = {\n\n activeElement: {\n /**\n * @this {HTMLElement}\n */\n get() {\n return activeElementForNode(this);\n },\n /**\n * @this {HTMLElement}\n */\n set() {},\n configurable: true\n }\n\n};\n\n// patch a group of descriptors on an object only if it exists or if the `force`\n// argument is true.\n/**\n * @param {!Object} obj\n * @param {!Object} descriptors\n * @param {boolean=} force\n */\nfunction patchAccessorGroup(obj, descriptors, force) {\n for (let p in descriptors) {\n let objDesc = Object.getOwnPropertyDescriptor(obj, p);\n if ((objDesc && objDesc.configurable) ||\n (!objDesc && force)) {\n Object.defineProperty(obj, p, descriptors[p]);\n } else if (force) {\n console.warn('Could not define', p, 'on', obj);\n }\n }\n}\n\n// patch dom accessors on proto where they exist\nexport function patchAccessors(proto) {\n patchAccessorGroup(proto, OutsideAccessors);\n patchAccessorGroup(proto, InsideAccessors);\n patchAccessorGroup(proto, ActiveElementAccessor);\n}\n\n// ensure element descriptors (IE/Edge don't have em)\nexport function patchShadowRootAccessors(proto) {\n patchAccessorGroup(proto, InsideAccessors, true);\n patchAccessorGroup(proto, ActiveElementAccessor, true);\n}\n\n// ensure an element has patched \"outside\" accessors; no-op when not needed\nexport let patchOutsideElementAccessors = utils.settings.hasDescriptors ?\n function() {} : function(element) {\n if (!(element.__shady && element.__shady.__outsideAccessors)) {\n element.__shady = element.__shady || {};\n element.__shady.__outsideAccessors = true;\n patchAccessorGroup(element, OutsideAccessors, true);\n }\n }\n\n// ensure an element has patched \"inside\" accessors; no-op when not needed\nexport let patchInsideElementAccessors = utils.settings.hasDescriptors ?\n function() {} : function(element) {\n if (!(element.__shady && element.__shady.__insideAccessors)) {\n element.__shady = element.__shady || {};\n element.__shady.__insideAccessors = true;\n patchAccessorGroup(element, InsideAccessors, true);\n patchAccessorGroup(element, ShadowRootAccessor, true);\n }\n }\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport {patchInsideElementAccessors, patchOutsideElementAccessors} from './patch-accessors.js';\nimport {firstChild, lastChild, childNodes} from './native-tree.js';\n\nexport function recordInsertBefore(node, container, ref_node) {\n patchInsideElementAccessors(container);\n container.__shady = container.__shady || {};\n if (container.__shady.firstChild !== undefined) {\n container.__shady.childNodes = null;\n }\n // handle document fragments\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n let c$ = node.childNodes;\n for (let i=0; i < c$.length; i++) {\n linkNode(c$[i], container, ref_node);\n }\n // cleanup logical dom in doc fragment.\n node.__shady = node.__shady || {};\n let resetTo = (node.__shady.firstChild !== undefined) ? null : undefined;\n node.__shady.firstChild = node.__shady.lastChild = resetTo;\n node.__shady.childNodes = resetTo;\n } else {\n linkNode(node, container, ref_node);\n }\n}\n\nfunction linkNode(node, container, ref_node) {\n patchOutsideElementAccessors(node);\n ref_node = ref_node || null;\n node.__shady = node.__shady || {};\n container.__shady = container.__shady || {};\n if (ref_node) {\n ref_node.__shady = ref_node.__shady || {};\n }\n // update ref_node.previousSibling <-> node\n node.__shady.previousSibling = ref_node ? ref_node.__shady.previousSibling :\n container.lastChild;\n let ps = node.__shady.previousSibling;\n if (ps && ps.__shady) {\n ps.__shady.nextSibling = node;\n }\n // update node <-> ref_node\n let ns = node.__shady.nextSibling = ref_node;\n if (ns && ns.__shady) {\n ns.__shady.previousSibling = node;\n }\n // update node <-> container\n node.__shady.parentNode = container;\n if (ref_node) {\n if (ref_node === container.__shady.firstChild) {\n container.__shady.firstChild = node;\n }\n } else {\n container.__shady.lastChild = node;\n if (!container.__shady.firstChild) {\n container.__shady.firstChild = node;\n }\n }\n // remove caching of childNodes\n container.__shady.childNodes = null;\n}\n\nexport function recordRemoveChild(node, container) {\n node.__shady = node.__shady || {};\n container.__shady = container.__shady || {};\n if (node === container.__shady.firstChild) {\n container.__shady.firstChild = node.__shady.nextSibling;\n }\n if (node === container.__shady.lastChild) {\n container.__shady.lastChild = node.__shady.previousSibling;\n }\n let p = node.__shady.previousSibling;\n let n = node.__shady.nextSibling;\n if (p) {\n p.__shady = p.__shady || {};\n p.__shady.nextSibling = n;\n }\n if (n) {\n n.__shady = n.__shady || {};\n n.__shady.previousSibling = p;\n }\n // When an element is removed, logical data is no longer tracked.\n // Explicitly set `undefined` here to indicate this. This is disginguished\n // from `null` which is set if info is null.\n node.__shady.parentNode = node.__shady.previousSibling =\n node.__shady.nextSibling = undefined;\n if (container.__shady.childNodes !== undefined) {\n // remove caching of childNodes\n container.__shady.childNodes = null;\n }\n}\n\nexport let recordChildNodes = function(node) {\n if (!node.__shady || node.__shady.firstChild === undefined) {\n node.__shady = node.__shady || {};\n node.__shady.firstChild = firstChild(node);\n node.__shady.lastChild = lastChild(node);\n patchInsideElementAccessors(node);\n let c$ = node.__shady.childNodes = childNodes(node);\n for (let i=0, n; (i is added or a node is added to a host with a shadowRoot\n// with a slot, a standard dom `insert` call is aborted and `_asyncRender`\n// is called on the relevant shadowRoot. In all other cases, a standard dom\n// `insert` can be made, but the location and ref_node may need to be changed.\n/**\n * @param {Node} parent\n * @param {Node} node\n * @param {Node=} ref_node\n */\nexport function insertBefore(parent, node, ref_node) {\n if (node === parent) {\n throw Error(`Failed to execute 'appendChild' on 'Node': The new child element contains the parent.`);\n }\n if (ref_node) {\n let p = ref_node.__shady && ref_node.__shady.parentNode;\n if ((p !== undefined && p !== parent) ||\n (p === undefined && parentNode(ref_node) !== parent)) {\n throw Error(`Failed to execute 'insertBefore' on 'Node': The node ` +\n `before which the new node is to be inserted is not a child of this node.`);\n }\n }\n if (ref_node === node) {\n return node;\n }\n // remove from existing location\n if (node.parentNode) {\n // NOTE: avoid node.removeChild as this *can* trigger another patched\n // method (e.g. custom elements) and we want only the shady method to run.\n removeChild(node.parentNode, node);\n }\n // add to new parent\n let preventNativeInsert;\n let ownerRoot = utils.ownerShadyRootForNode(parent);\n // if a slot is added, must render containing root.\n let slotsAdded = ownerRoot && findContainedSlots(node);\n if (slotsAdded) {\n ownerRoot._addSlots(slotsAdded);\n }\n if (ownerRoot && (parent.localName === 'slot' || slotsAdded)) {\n ownerRoot._asyncRender();\n }\n if (utils.isTrackingLogicalChildNodes(parent)) {\n logicalTree.recordInsertBefore(node, parent, ref_node);\n // when inserting into a host with a shadowRoot with slot, use\n // `shadowRoot._asyncRender()` via `attach-shadow` module\n if (hasShadowRootWithSlot(parent)) {\n parent.__shady.root._asyncRender();\n preventNativeInsert = true;\n // when inserting into a host with shadowRoot with NO slot, do nothing\n // as the node should not be added to composed dome anywhere.\n } else if (parent.__shady.root) {\n preventNativeInsert = true;\n }\n }\n if (!preventNativeInsert) {\n // if adding to a shadyRoot, add to host instead\n let container = utils.isShadyRoot(parent) ?\n /** @type {ShadowRoot} */(parent).host : parent;\n // if ref_node, get the ref_node that's actually in composed dom.\n if (ref_node) {\n ref_node = firstComposedNode(ref_node);\n nativeMethods.insertBefore.call(container, node, ref_node);\n } else {\n nativeMethods.appendChild.call(container, node);\n }\n }\n scheduleObserver(parent, node);\n return node;\n}\n\nfunction findContainedSlots(node) {\n if (!node['__noInsertionPoint']) {\n let slots;\n if (node.localName === 'slot') {\n slots = [node];\n } else if (node.querySelectorAll) {\n slots = node.querySelectorAll('slot');\n }\n if (slots && slots.length) {\n return slots;\n }\n }\n}\n\n/**\n * Patched `removeChild`. Note that all dom \"removals\" are routed here.\n * Removes the given `node` from the element's `children`.\n * This method also performs dom composition.\n * @param {Node} parent\n * @param {Node} node\n*/\nexport function removeChild(parent, node) {\n if (node.parentNode !== parent) {\n throw Error('The node to be removed is not a child of this node: ' +\n node);\n }\n let preventNativeRemove;\n let ownerRoot = utils.ownerShadyRootForNode(node);\n let removingInsertionPoint;\n if (utils.isTrackingLogicalChildNodes(parent)) {\n logicalTree.recordRemoveChild(node, parent);\n if (hasShadowRootWithSlot(parent)) {\n parent.__shady.root._asyncRender();\n preventNativeRemove = true;\n }\n }\n removeOwnerShadyRoot(node);\n // if removing slot, must render containing root\n if (ownerRoot) {\n let changeSlotContent = parent && parent.localName === 'slot';\n if (changeSlotContent) {\n preventNativeRemove = true;\n }\n removingInsertionPoint = ownerRoot._removeContainedSlots(node);\n if (removingInsertionPoint || changeSlotContent) {\n ownerRoot._asyncRender();\n }\n }\n if (!preventNativeRemove) {\n // if removing from a shadyRoot, remove form host instead\n let container = utils.isShadyRoot(parent) ?\n /** @type {ShadowRoot} */(parent).host :\n parent;\n // not guaranteed to physically be in container; e.g.\n // (1) if parent has a shadyRoot, element may or may not at distributed\n // location (could be undistributed)\n // (2) if parent is a slot, element may not ben in composed dom\n if (!(parent.__shady.root || node.localName === 'slot') ||\n (container === parentNode(node))) {\n nativeMethods.removeChild.call(container, node);\n }\n }\n scheduleObserver(parent, null, node);\n return node;\n}\n\nfunction removeOwnerShadyRoot(node) {\n // optimization: only reset the tree if node is actually in a root\n if (hasCachedOwnerRoot(node)) {\n let c$ = node.childNodes;\n for (let i=0, l=c$.length, n; (i` element's `name`\n * attribute changes, updates the root's slot map and renders.\n * @param {Node} node\n * @param {string} name\n */\nfunction distributeAttributeChange(node, name) {\n if (name === 'slot') {\n const parent = node.parentNode;\n if (hasShadowRootWithSlot(parent)) {\n parent.__shady.root._asyncRender();\n }\n } else if (node.localName === 'slot' && name === 'name') {\n let root = utils.ownerShadyRootForNode(node);\n if (root) {\n root._updateSlotName(node);\n root._asyncRender();\n }\n }\n}\n\n/**\n * @param {Node} node\n * @param {Node=} addedNode\n * @param {Node=} removedNode\n */\nfunction scheduleObserver(node, addedNode, removedNode) {\n let observer = node.__shady && node.__shady.observer;\n if (observer) {\n if (addedNode) {\n observer.addedNodes.push(addedNode);\n }\n if (removedNode) {\n observer.removedNodes.push(removedNode);\n }\n observer.schedule();\n }\n}\n\n/**\n * @param {Node} node\n * @param {Object=} options\n */\nexport function getRootNode(node, options) { // eslint-disable-line no-unused-vars\n if (!node || !node.nodeType) {\n return;\n }\n node.__shady = node.__shady || {};\n let root = node.__shady.ownerShadyRoot;\n if (root === undefined) {\n if (utils.isShadyRoot(node)) {\n root = node;\n } else {\n let parent = node.parentNode;\n root = parent ? getRootNode(parent) : node;\n }\n // memo-ize result for performance but only memo-ize\n // result if node is in the document. This avoids a problem where a root\n // can be cached while an element is inside a fragment.\n // If this happens and we cache the result, the value can become stale\n // because for perf we avoid processing the subtree of added fragments.\n if (nativeMethods.contains.call(document.documentElement, node)) {\n node.__shady.ownerShadyRoot = root;\n }\n }\n return root;\n}\n\n// NOTE: `query` is used primarily for ShadyDOM's querySelector impl,\n// but it's also generally useful to recurse through the element tree\n// and is used by Polymer's styling system.\n/**\n * @param {Node} node\n * @param {Function} matcher\n * @param {Function=} halter\n */\nexport function query(node, matcher, halter) {\n let list = [];\n queryElements(node.childNodes, matcher,\n halter, list);\n return list;\n}\n\nfunction queryElements(elements, matcher, halter, list) {\n for (let i=0, l=elements.length, c; (i host\n this.host = host;\n this._mode = options && options.mode;\n host.__shady = host.__shady || {};\n host.__shady.root = this;\n host.__shady.publicRoot = this._mode !== 'closed' ? this : null;\n // state flags\n this._renderPending = false;\n this._hasRendered = false;\n this._slotList = [];\n this._slotMap = {};\n this.__pendingSlots = [];\n // fast path initial render: remove existing physical dom.\n let c$ = childNodes(host);\n for (let i=0, l=c$.length; i < l; i++) {\n removeChild.call(host, c$[i])\n }\n}\n\n// async render\nShadyRoot.prototype._asyncRender = function() {\n if (!this._renderPending) {\n this._renderPending = true;\n enqueue(() => this._render());\n }\n}\n\n// returns the oldest renderPending ancestor root.\nShadyRoot.prototype._getRenderRoot = function() {\n let renderRoot;\n let root = this;\n while (root) {\n if (root._renderPending) {\n renderRoot = root;\n }\n root = root._rendererForHost();\n }\n return renderRoot;\n}\n\n// Returns the shadyRoot `this.host` if `this.host`\n// has children that require distribution.\nShadyRoot.prototype._rendererForHost = function() {\n let root = this.host.getRootNode();\n if (utils.isShadyRoot(root)) {\n let c$ = this.host.childNodes;\n for (let i=0, c; i < c$.length; i++) {\n c = c$[i];\n if (this._isInsertionPoint(c)) {\n return root;\n }\n }\n }\n}\n\nShadyRoot.prototype._render = function() {\n const root = this._getRenderRoot();\n if (root) {\n root['_renderRoot']();\n }\n}\n\n// NOTE: avoid renaming to ease testability.\nShadyRoot.prototype['_renderRoot'] = function() {\n this._renderPending = false;\n this._distribute();\n this._compose();\n this._hasRendered = true;\n}\n\nShadyRoot.prototype._distribute = function() {\n this._validateSlots();\n // capture # of previously assigned nodes to help determine if dirty.\n for (let i=0, slot; i < this._slotList.length; i++) {\n slot = this._slotList[i];\n this._clearSlotAssignedNodes(slot);\n }\n // distribute host children.\n for (let n=this.host.firstChild; n; n=n.nextSibling) {\n this._distributeNodeToSlot(n);\n }\n // fallback content, slotchange, and dirty roots\n for (let i=0, slot; i < this._slotList.length; i++) {\n slot = this._slotList[i];\n // distribute fallback content\n if (!slot.__shady.assignedNodes.length) {\n for (let n=slot.firstChild; n; n=n.nextSibling) {\n this._distributeNodeToSlot(n, slot);\n }\n }\n const slotParent = slot.parentNode;\n const slotParentRoot = slotParent.__shady && slotParent.__shady.root;\n if (slotParentRoot && slotParentRoot._hasInsertionPoint()) {\n slotParentRoot['_renderRoot']();\n }\n this._addAssignedToFlattenedNodes(slot.__shady.flattenedNodes,\n slot.__shady.assignedNodes);\n let prevAssignedNodes = slot.__shady._previouslyAssignedNodes;\n if (prevAssignedNodes) {\n for (let i=0; i < prevAssignedNodes.length; i++) {\n prevAssignedNodes[i].__shady._prevAssignedSlot = null;\n }\n slot.__shady._previouslyAssignedNodes = null;\n // dirty if previously less assigned nodes than previously assigned.\n if (prevAssignedNodes.length > slot.__shady.assignedNodes.length) {\n slot.__shady.dirty = true;\n }\n }\n /* Note: A slot is marked dirty whenever a node is newly assigned to it\n or a node is assigned to a different slot (done in `_distributeNodeToSlot`)\n or if the number of nodes assigned to the slot has decreased (done above);\n */\n if (slot.__shady.dirty) {\n slot.__shady.dirty = false;\n this._fireSlotChange(slot);\n }\n }\n}\n\n/**\n * Distributes given `node` to the appropriate slot based on its `slot`\n * attribute. If `forcedSlot` is given, then the node is distributed to the\n * `forcedSlot`.\n * Note: slot to which the node is assigned will be marked dirty for firing\n * `slotchange`.\n * @param {Node} node\n * @param {Node=} forcedSlot\n *\n */\nShadyRoot.prototype._distributeNodeToSlot = function(node, forcedSlot) {\n node.__shady = node.__shady || {};\n let oldSlot = node.__shady._prevAssignedSlot;\n node.__shady._prevAssignedSlot = null;\n let slot = forcedSlot;\n if (!slot) {\n let name = node.slot || CATCHALL_NAME;\n const list = this._slotMap[name];\n slot = list && list[0];\n }\n if (slot) {\n slot.__shady.assignedNodes.push(node);\n node.__shady.assignedSlot = slot;\n } else {\n node.__shady.assignedSlot = undefined;\n }\n if (oldSlot !== node.__shady.assignedSlot) {\n if (node.__shady.assignedSlot) {\n node.__shady.assignedSlot.__shady.dirty = true;\n }\n }\n}\n\n/**\n * Clears the assignedNodes tracking data for a given `slot`. Note, the current\n * assigned node data is tracked (via _previouslyAssignedNodes and\n * _prevAssignedSlot) to see if `slotchange` should fire. This data may be out\n * of date at this time because the assigned nodes may have already been\n * distributed to another root. This is ok since this data is only used to\n * track changes.\n * @param {HTMLSlotElement} slot\n */\nShadyRoot.prototype._clearSlotAssignedNodes = function(slot) {\n let n$ = slot.__shady.assignedNodes;\n slot.__shady.assignedNodes = [];\n slot.__shady.flattenedNodes = [];\n slot.__shady._previouslyAssignedNodes = n$;\n if (n$) {\n for (let i=0; i < n$.length; i++) {\n let n = n$[i];\n n.__shady._prevAssignedSlot = n.__shady.assignedSlot;\n // only clear if it was previously set to this slot;\n // this helps ensure that if the node has otherwise been distributed\n // ignore it.\n if (n.__shady.assignedSlot === slot) {\n n.__shady.assignedSlot = null;\n }\n }\n }\n}\n\nShadyRoot.prototype._addAssignedToFlattenedNodes = function(flattened, assigned) {\n for (let i=0, n; (i elements and not the\n// shadowRoot into the host. The latter is performend via a fast path\n// in the `logical-mutation`.insertBefore.\nShadyRoot.prototype._compose = function() {\n const slots = this._slotList;\n let composeList = [];\n for (let i=0; i < slots.length; i++) {\n const parent = slots[i].parentNode;\n /* compose node only if:\n (1) parent does not have a shadowRoot since shadowRoot has already\n composed into the host\n (2) we're not already composing it\n [consider (n^2) but rare better than Set]\n */\n if (!(parent.__shady && parent.__shady.root) &&\n composeList.indexOf(parent) < 0) {\n composeList.push(parent);\n }\n }\n for (let i=0; i < composeList.length; i++) {\n const node = composeList[i];\n const targetNode = node === this ? this.host : node;\n this._updateChildNodes(targetNode, this._composeNode(node));\n }\n}\n\n// Returns the list of nodes which should be rendered inside `node`.\nShadyRoot.prototype._composeNode = function(node) {\n let children = [];\n let c$ = node.childNodes;\n for (let i = 0; i < c$.length; i++) {\n let child = c$[i];\n // Note: if we see a slot here, the nodes are guaranteed to need to be\n // composed here. This is because if there is redistribution, it has\n // already been handled by this point.\n if (this._isInsertionPoint(child)) {\n let flattenedNodes = child.__shady.flattenedNodes;\n for (let j = 0; j < flattenedNodes.length; j++) {\n let distributedNode = flattenedNodes[j];\n children.push(distributedNode);\n }\n } else {\n children.push(child);\n }\n }\n return children;\n}\n\nShadyRoot.prototype._isInsertionPoint = function(node) {\n return node.localName == 'slot';\n }\n\n// Ensures that the rendered node list inside `container` is `children`.\nShadyRoot.prototype._updateChildNodes = function(container, children) {\n let composed = childNodes(container);\n let splices = calculateSplices(children, composed);\n // process removals\n for (let i=0, d=0, s; (i {\n let listA = ancestorList(a);\n let listB = ancestorList(b);\n for (var i=0; i < listA.length; i++) {\n let nA = listA[i];\n let nB = listB[i];\n if (nA !== nB) {\n let c$ = Array.from(nA.parentNode.childNodes);\n return c$.indexOf(nA) - c$.indexOf(nB);\n }\n }\n });\n}\n\nfunction ancestorList(node) {\n let ancestors = [];\n do {\n ancestors.unshift(node);\n } while ((node = node.parentNode));\n return ancestors;\n}\n\n/**\n * Removes from tracked slot data any slots contained within `container` and\n * then updates the tracked data (_slotList and _slotMap).\n * Any removed slots also have their `assignedNodes` removed from comopsed dom.\n */\nShadyRoot.prototype._removeContainedSlots = function(container) {\n this._validateSlots();\n let didRemove;\n const map = this._slotMap;\n for (let n in map) {\n let slots = map[n];\n for (let i=0; i < slots.length; i++) {\n let slot = slots[i];\n if (utils.contains(container, slot)) {\n slots.splice(i, 1);\n const x = this._slotList.indexOf(slot);\n if (x >= 0) {\n this._slotList.splice(x, 1);\n }\n i--;\n this._removeFlattenedNodes(slot);\n didRemove = true;\n }\n }\n }\n return didRemove;\n}\n\nShadyRoot.prototype._updateSlotName = function(slot) {\n const oldName = slot.__slotName;\n const name = this._nameForSlot(slot);\n if (name === oldName) {\n return;\n }\n // remove from existing tracking\n let slots = this._slotMap[oldName];\n const i = slots.indexOf(slot);\n if (i >= 0) {\n slots.splice(i, 1);\n }\n // add to new location and sort if nedessary\n let list = this._slotMap[name] || (this._slotMap[name] = []);\n list.push(slot);\n if (list.length > 1) {\n this._slotMap[name] = this._sortSlots(list);\n }\n}\n\nShadyRoot.prototype._removeFlattenedNodes = function(slot) {\n let n$ = slot.__shady.flattenedNodes;\n if (n$) {\n for (let i=0; i {\n this.flush();\n });\n }\n }\n\n flush() {\n if (this._scheduled) {\n this._scheduled = false;\n let mutations = this.takeRecords();\n if (mutations.length) {\n this.callbacks.forEach(function(cb) {\n cb(mutations);\n });\n }\n }\n }\n\n takeRecords() {\n if (this.addedNodes.length || this.removedNodes.length) {\n let mutations = [{\n addedNodes: this.addedNodes,\n removedNodes: this.removedNodes\n }];\n this.addedNodes = [];\n this.removedNodes = [];\n return mutations;\n }\n return [];\n }\n\n}\n\n// TODO(sorvell): consider instead polyfilling MutationObserver\n// directly so that users do not have to fork their code.\n// Supporting the entire api may be challenging: e.g. filtering out\n// removed nodes in the wrong scope and seeing non-distributing\n// subtree child mutations.\nexport let observeChildren = function(node, callback) {\n node.__shady = node.__shady || {};\n if (!node.__shady.observer) {\n node.__shady.observer = new AsyncObserver();\n }\n node.__shady.observer.callbacks.add(callback);\n let observer = node.__shady.observer;\n return {\n _callback: callback,\n _observer: observer,\n _node: node,\n takeRecords() {\n return observer.takeRecords()\n }\n };\n}\n\nexport let unobserveChildren = function(handle) {\n let observer = handle && handle._observer;\n if (observer) {\n observer.callbacks.delete(handle._callback);\n if (!observer.callbacks.size) {\n handle._node.__shady.observer = null;\n }\n }\n}\n\nexport function filterMutations(mutations, target) {\n /** @const {Node} */\n const targetRootNode = target.getRootNode();\n return mutations.map(function(mutation) {\n /** @const {boolean} */\n const mutationInScope = (targetRootNode === mutation.target.getRootNode());\n if (mutationInScope && mutation.addedNodes) {\n let nodes = Array.from(mutation.addedNodes).filter(function(n) {\n return (targetRootNode === n.getRootNode());\n });\n if (nodes.length) {\n mutation = Object.create(mutation);\n Object.defineProperty(mutation, 'addedNodes', {\n value: nodes,\n configurable: true\n });\n return mutation;\n }\n } else if (mutationInScope) {\n return mutation;\n }\n }).filter(function(m) { return m});\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport * as nativeMethods from './native-methods.js';\n\n/*\nMake this name unique so it is unlikely to conflict with properties on objects passed to `addEventListener`\nhttps://github.com/webcomponents/shadydom/issues/173\n*/\nconst /** string */ eventWrappersName = `__eventWrappers${Date.now()}`;\n\n// https://github.com/w3c/webcomponents/issues/513#issuecomment-224183937\nlet alwaysComposed = {\n 'blur': true,\n 'focus': true,\n 'focusin': true,\n 'focusout': true,\n 'click': true,\n 'dblclick': true,\n 'mousedown': true,\n 'mouseenter': true,\n 'mouseleave': true,\n 'mousemove': true,\n 'mouseout': true,\n 'mouseover': true,\n 'mouseup': true,\n 'wheel': true,\n 'beforeinput': true,\n 'input': true,\n 'keydown': true,\n 'keyup': true,\n 'compositionstart': true,\n 'compositionupdate': true,\n 'compositionend': true,\n 'touchstart': true,\n 'touchend': true,\n 'touchmove': true,\n 'touchcancel': true,\n 'pointerover': true,\n 'pointerenter': true,\n 'pointerdown': true,\n 'pointermove': true,\n 'pointerup': true,\n 'pointercancel': true,\n 'pointerout': true,\n 'pointerleave': true,\n 'gotpointercapture': true,\n 'lostpointercapture': true,\n 'dragstart': true,\n 'drag': true,\n 'dragenter': true,\n 'dragleave': true,\n 'dragover': true,\n 'drop': true,\n 'dragend': true,\n 'DOMActivate': true,\n 'DOMFocusIn': true,\n 'DOMFocusOut': true,\n 'keypress': true\n};\n\nfunction pathComposer(startNode, composed) {\n let composedPath = [];\n let current = startNode;\n let startRoot = startNode === window ? window : startNode.getRootNode();\n while (current) {\n composedPath.push(current);\n if (current.assignedSlot) {\n current = current.assignedSlot;\n } else if (current.nodeType === Node.DOCUMENT_FRAGMENT_NODE && current.host && (composed || current !== startRoot)) {\n current = current.host;\n } else {\n current = current.parentNode;\n }\n }\n // event composedPath includes window when startNode's ownerRoot is document\n if (composedPath[composedPath.length - 1] === document) {\n composedPath.push(window);\n }\n return composedPath;\n}\n\nfunction retarget(refNode, path) {\n if (!utils.isShadyRoot) {\n return refNode;\n }\n // If ANCESTOR's root is not a shadow root or ANCESTOR's root is BASE's\n // shadow-including inclusive ancestor, return ANCESTOR.\n let refNodePath = pathComposer(refNode, true);\n let p$ = path;\n for (let i=0, ancestor, lastRoot, root, rootIdx; i < p$.length; i++) {\n ancestor = p$[i];\n root = ancestor === window ? window : ancestor.getRootNode();\n if (root !== lastRoot) {\n rootIdx = refNodePath.indexOf(root);\n lastRoot = root;\n }\n if (!utils.isShadyRoot(root) || rootIdx > -1) {\n return ancestor;\n }\n }\n}\n\nlet eventMixin = {\n\n /**\n * @this {Event}\n */\n get composed() {\n // isTrusted may not exist in this browser, so just check if isTrusted is explicitly false\n if (this.isTrusted !== false && this.__composed === undefined) {\n this.__composed = alwaysComposed[this.type];\n }\n return this.__composed || false;\n },\n\n /**\n * @this {Event}\n */\n composedPath() {\n if (!this.__composedPath) {\n this.__composedPath = pathComposer(this['__target'], this.composed);\n }\n return this.__composedPath;\n },\n\n /**\n * @this {Event}\n */\n get target() {\n return retarget(this.currentTarget, this.composedPath());\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-relatedtarget-retargeting\n /**\n * @this {Event}\n */\n get relatedTarget() {\n if (!this.__relatedTarget) {\n return null;\n }\n if (!this.__relatedTargetComposedPath) {\n this.__relatedTargetComposedPath = pathComposer(this.__relatedTarget, true);\n }\n // find the deepest node in relatedTarget composed path that is in the same root with the currentTarget\n return retarget(this.currentTarget, this.__relatedTargetComposedPath);\n },\n /**\n * @this {Event}\n */\n stopPropagation() {\n Event.prototype.stopPropagation.call(this);\n this.__propagationStopped = true;\n },\n /**\n * @this {Event}\n */\n stopImmediatePropagation() {\n Event.prototype.stopImmediatePropagation.call(this);\n this.__immediatePropagationStopped = true;\n this.__propagationStopped = true;\n }\n\n};\n\nfunction mixinComposedFlag(Base) {\n // NOTE: avoiding use of `class` here so that transpiled output does not\n // try to do `Base.call` with a dom construtor.\n let klazz = function(type, options) {\n let event = new Base(type, options);\n event.__composed = options && Boolean(options['composed']);\n return event;\n }\n // put constructor properties on subclass\n utils.mixin(klazz, Base);\n klazz.prototype = Base.prototype;\n return klazz;\n}\n\nlet nonBubblingEventsToRetarget = {\n 'focus': true,\n 'blur': true\n};\n\n\n/**\n * Check if the event has been retargeted by comparing original `target`, and calculated `target`\n * @param {Event} event\n * @return {boolean} True if the original target and calculated target are the same\n */\nfunction hasRetargeted(event) {\n return event['__target'] !== event.target || event.__relatedTarget !== event.relatedTarget;\n}\n\n/**\n *\n * @param {Event} event\n * @param {Node} node\n * @param {string} phase\n */\nfunction fireHandlers(event, node, phase) {\n let hs = node.__handlers && node.__handlers[event.type] &&\n node.__handlers[event.type][phase];\n if (hs) {\n for (let i = 0, fn; (fn = hs[i]); i++) {\n if (hasRetargeted(event) && event.target === event.relatedTarget) {\n return;\n }\n fn.call(node, event);\n if (event.__immediatePropagationStopped) {\n return;\n }\n }\n }\n}\n\nfunction retargetNonBubblingEvent(e) {\n let path = e.composedPath();\n let node;\n // override `currentTarget` to let patched `target` calculate correctly\n Object.defineProperty(e, 'currentTarget', {\n get: function() {\n return node;\n },\n configurable: true\n });\n for (let i = path.length - 1; i >= 0; i--) {\n node = path[i];\n // capture phase fires all capture handlers\n fireHandlers(e, node, 'capture');\n if (e.__propagationStopped) {\n return;\n }\n }\n\n // set the event phase to `AT_TARGET` as in spec\n Object.defineProperty(e, 'eventPhase', {get() { return Event.AT_TARGET }});\n\n // the event only needs to be fired when owner roots change when iterating the event path\n // keep track of the last seen owner root\n let lastFiredRoot;\n for (let i = 0; i < path.length; i++) {\n node = path[i];\n const root = node.__shady && node.__shady.root;\n if (i === 0 || (root && root === lastFiredRoot)) {\n fireHandlers(e, node, 'bubble');\n // don't bother with window, it doesn't have `getRootNode` and will be last in the path anyway\n if (node !== window) {\n lastFiredRoot = node.getRootNode();\n }\n if (e.__propagationStopped) {\n return;\n }\n }\n }\n}\n\nfunction listenerSettingsEqual(savedListener, node, type, capture, once, passive) {\n let {\n node: savedNode,\n type: savedType,\n capture: savedCapture,\n once: savedOnce,\n passive: savedPassive\n } = savedListener;\n return node === savedNode &&\n type === savedType &&\n capture === savedCapture &&\n once === savedOnce &&\n passive === savedPassive;\n}\n\nexport function findListener(wrappers, node, type, capture, once, passive) {\n for (let i = 0; i < wrappers.length; i++) {\n if (listenerSettingsEqual(wrappers[i], node, type, capture, once, passive)) {\n return i;\n }\n }\n return -1;\n}\n\n/**\n * Firefox can throw on accessing eventWrappers inside of `removeEventListener` during a selenium run\n * Try/Catch accessing eventWrappers to work around\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1353074\n */\nfunction getEventWrappers(eventLike) {\n let wrappers = null;\n try {\n wrappers = eventLike[eventWrappersName];\n } catch (e) {} // eslint-disable-line no-empty\n return wrappers;\n}\n\n/**\n * @this {Event}\n */\nexport function addEventListener(type, fnOrObj, optionsOrCapture) {\n if (!fnOrObj) {\n return;\n }\n\n const handlerType = typeof fnOrObj;\n\n // bail if `fnOrObj` is not a function, not an object\n if (handlerType !== 'function' && handlerType !== 'object') {\n return;\n }\n\n // bail if `fnOrObj` is an object without a `handleEvent` method\n if (handlerType === 'object' && (!fnOrObj.handleEvent || typeof fnOrObj.handleEvent !== 'function')) {\n return;\n }\n\n // The callback `fn` might be used for multiple nodes/events. Since we generate\n // a wrapper function, we need to keep track of it when we remove the listener.\n // It's more efficient to store the node/type/options information as Array in\n // `fn` itself rather than the node (we assume that the same callback is used\n // for few nodes at most, whereas a node will likely have many event listeners).\n // NOTE(valdrin) invoking external functions is costly, inline has better perf.\n let capture, once, passive;\n if (optionsOrCapture && typeof optionsOrCapture === 'object') {\n capture = Boolean(optionsOrCapture.capture);\n once = Boolean(optionsOrCapture.once);\n passive = Boolean(optionsOrCapture.passive);\n } else {\n capture = Boolean(optionsOrCapture);\n once = false;\n passive = false;\n }\n // hack to let ShadyRoots have event listeners\n // event listener will be on host, but `currentTarget`\n // will be set to shadyroot for event listener\n let target = (optionsOrCapture && optionsOrCapture.__shadyTarget) || this;\n\n let wrappers = fnOrObj[eventWrappersName];\n if (wrappers) {\n // Stop if the wrapper function has already been created.\n if (findListener(wrappers, target, type, capture, once, passive) > -1) {\n return;\n }\n } else {\n fnOrObj[eventWrappersName] = [];\n }\n\n /**\n * @this {HTMLElement}\n * @param {Event} e\n */\n const wrapperFn = function(e) {\n // Support `once` option.\n if (once) {\n this.removeEventListener(type, fnOrObj, optionsOrCapture);\n }\n if (!e['__target']) {\n patchEvent(e);\n }\n let lastCurrentTargetDesc;\n if (target !== this) {\n // replace `currentTarget` to make `target` and `relatedTarget` correct for inside the shadowroot\n lastCurrentTargetDesc = Object.getOwnPropertyDescriptor(e, 'currentTarget');\n Object.defineProperty(e, 'currentTarget', {get() { return target }, configurable: true});\n }\n // There are two critera that should stop events from firing on this node\n // 1. the event is not composed and the current node is not in the same root as the target\n // 2. when bubbling, if after retargeting, relatedTarget and target point to the same node\n if (e.composed || e.composedPath().indexOf(target) > -1) {\n if (hasRetargeted(e) && e.target === e.relatedTarget) {\n if (e.eventPhase === Event.BUBBLING_PHASE) {\n e.stopImmediatePropagation();\n }\n return;\n }\n // prevent non-bubbling events from triggering bubbling handlers on shadowroot, but only if not in capture phase\n if (e.eventPhase !== Event.CAPTURING_PHASE && !e.bubbles && e.target !== target && !(target instanceof Window)) {\n return;\n }\n let ret = handlerType === 'function' ?\n fnOrObj.call(target, e) :\n (fnOrObj.handleEvent && fnOrObj.handleEvent(e));\n if (target !== this) {\n // replace the \"correct\" `currentTarget`\n if (lastCurrentTargetDesc) {\n Object.defineProperty(e, 'currentTarget', lastCurrentTargetDesc);\n lastCurrentTargetDesc = null;\n } else {\n delete e['currentTarget'];\n }\n }\n return ret;\n }\n };\n // Store the wrapper information.\n fnOrObj[eventWrappersName].push({\n node: this,\n type: type,\n capture: capture,\n once: once,\n passive: passive,\n wrapperFn: wrapperFn\n });\n\n if (nonBubblingEventsToRetarget[type]) {\n this.__handlers = this.__handlers || {};\n this.__handlers[type] = this.__handlers[type] ||\n {'capture': [], 'bubble': []};\n this.__handlers[type][capture ? 'capture' : 'bubble'].push(wrapperFn);\n } else {\n let ael = this instanceof Window ? nativeMethods.windowAddEventListener :\n nativeMethods.addEventListener;\n ael.call(this, type, wrapperFn, optionsOrCapture);\n }\n}\n\n/**\n * @this {Event}\n */\nexport function removeEventListener(type, fnOrObj, optionsOrCapture) {\n if (!fnOrObj) {\n return;\n }\n\n // NOTE(valdrin) invoking external functions is costly, inline has better perf.\n let capture, once, passive;\n if (optionsOrCapture && typeof optionsOrCapture === 'object') {\n capture = Boolean(optionsOrCapture.capture);\n once = Boolean(optionsOrCapture.once);\n passive = Boolean(optionsOrCapture.passive);\n } else {\n capture = Boolean(optionsOrCapture);\n once = false;\n passive = false;\n }\n let target = (optionsOrCapture && optionsOrCapture.__shadyTarget) || this;\n // Search the wrapped function.\n let wrapperFn = undefined;\n let wrappers = getEventWrappers(fnOrObj);\n if (wrappers) {\n let idx = findListener(wrappers, target, type, capture, once, passive);\n if (idx > -1) {\n wrapperFn = wrappers.splice(idx, 1)[0].wrapperFn;\n // Cleanup.\n if (!wrappers.length) {\n fnOrObj[eventWrappersName] = undefined;\n }\n }\n }\n let rel = this instanceof Window ? nativeMethods.windowRemoveEventListener :\n nativeMethods.removeEventListener;\n rel.call(this, type, wrapperFn || fnOrObj, optionsOrCapture);\n if (wrapperFn && nonBubblingEventsToRetarget[type] &&\n this.__handlers && this.__handlers[type]) {\n const arr = this.__handlers[type][capture ? 'capture' : 'bubble'];\n const idx = arr.indexOf(wrapperFn);\n if (idx > -1) {\n arr.splice(idx, 1);\n }\n }\n}\n\nfunction activateFocusEventOverrides() {\n for (let ev in nonBubblingEventsToRetarget) {\n window.addEventListener(ev, function(e) {\n if (!e['__target']) {\n patchEvent(e);\n retargetNonBubblingEvent(e);\n }\n }, true);\n }\n}\n\nfunction patchEvent(event) {\n event['__target'] = event.target;\n event.__relatedTarget = event.relatedTarget;\n // patch event prototype if we can\n if (utils.settings.hasDescriptors) {\n utils.patchPrototype(event, eventMixin);\n // and fallback to patching instance\n } else {\n utils.extend(event, eventMixin);\n }\n}\n\nlet PatchedEvent = mixinComposedFlag(window.Event);\nlet PatchedCustomEvent = mixinComposedFlag(window.CustomEvent);\nlet PatchedMouseEvent = mixinComposedFlag(window.MouseEvent);\n\nexport function patchEvents() {\n window.Event = PatchedEvent;\n window.CustomEvent = PatchedCustomEvent;\n window.MouseEvent = PatchedMouseEvent;\n activateFocusEventOverrides();\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {flush} from './flush.js';\nimport {dispatchEvent, contains as nativeContains} from './native-methods.js';\nimport * as mutation from './logical-mutation.js';\nimport {ActiveElementAccessor, ShadowRootAccessor, patchAccessors} from './patch-accessors.js';\nimport {addEventListener, removeEventListener} from './patch-events.js';\nimport {attachShadow, ShadyRoot} from './attach-shadow.js';\n\nfunction getAssignedSlot(node) {\n mutation.renderRootNode(node);\n return node.__shady && node.__shady.assignedSlot || null;\n}\n\nlet windowMixin = {\n\n // NOTE: ensure these methods are bound to `window` so that `this` is correct\n // when called directly from global context without a receiver; e.g.\n // `addEventListener(...)`.\n addEventListener: addEventListener.bind(window),\n\n removeEventListener: removeEventListener.bind(window)\n\n};\n\nlet nodeMixin = {\n\n addEventListener: addEventListener,\n\n removeEventListener: removeEventListener,\n\n appendChild(node) {\n return mutation.insertBefore(this, node);\n },\n\n insertBefore(node, ref_node) {\n return mutation.insertBefore(this, node, ref_node);\n },\n\n removeChild(node) {\n return mutation.removeChild(this, node);\n },\n\n /**\n * @this {Node}\n */\n replaceChild(node, ref_node) {\n mutation.insertBefore(this, node, ref_node);\n mutation.removeChild(this, ref_node);\n return node;\n },\n\n /**\n * @this {Node}\n */\n cloneNode(deep) {\n return mutation.cloneNode(this, deep);\n },\n\n /**\n * @this {Node}\n */\n getRootNode(options) {\n return mutation.getRootNode(this, options);\n },\n\n contains(node) {\n return utils.contains(this, node);\n },\n\n /**\n * @this {Node}\n */\n get isConnected() {\n // Fast path for distributed nodes.\n const ownerDocument = this.ownerDocument;\n if (utils.hasDocumentContains && nativeContains.call(ownerDocument, this)) {\n return true;\n }\n if (ownerDocument.documentElement &&\n nativeContains.call(ownerDocument.documentElement, this)) {\n return true;\n }\n let node = this;\n while (node && !(node instanceof Document)) {\n node = node.parentNode || (node instanceof ShadyRoot ? /** @type {ShadowRoot} */(node).host : undefined);\n }\n return !!(node && node instanceof Document);\n },\n\n /**\n * @this {Node}\n */\n dispatchEvent(event) {\n flush();\n return dispatchEvent.call(this, event);\n }\n\n};\n\n// NOTE: For some reason 'Text' redefines 'assignedSlot'\nlet textMixin = {\n /**\n * @this {Text}\n */\n get assignedSlot() {\n return getAssignedSlot(this);\n }\n};\n\nlet fragmentMixin = {\n\n // TODO(sorvell): consider doing native QSA and filtering results.\n /**\n * @this {DocumentFragment}\n */\n querySelector(selector) {\n // match selector and halt on first result.\n let result = mutation.query(this, function(n) {\n return utils.matchesSelector(n, selector);\n }, function(n) {\n return Boolean(n);\n })[0];\n return result || null;\n },\n\n /**\n * @this {DocumentFragment}\n */\n querySelectorAll(selector) {\n return mutation.query(this, function(n) {\n return utils.matchesSelector(n, selector);\n });\n }\n\n};\n\nlet slotMixin = {\n\n /**\n * @this {HTMLSlotElement}\n */\n assignedNodes(options) {\n if (this.localName === 'slot') {\n mutation.renderRootNode(this);\n return this.__shady ?\n ((options && options.flatten ? this.__shady.flattenedNodes :\n this.__shady.assignedNodes) || []) :\n [];\n }\n }\n\n};\n\nlet elementMixin = utils.extendAll({\n\n /**\n * @this {HTMLElement}\n */\n setAttribute(name, value) {\n mutation.setAttribute(this, name, value);\n },\n\n /**\n * @this {HTMLElement}\n */\n removeAttribute(name) {\n mutation.removeAttribute(this, name);\n },\n\n /**\n * @this {HTMLElement}\n */\n attachShadow(options) {\n return attachShadow(this, options);\n },\n\n /**\n * @this {HTMLElement}\n */\n get slot() {\n return this.getAttribute('slot');\n },\n\n /**\n * @this {HTMLElement}\n */\n set slot(value) {\n mutation.setAttribute(this, 'slot', value);\n },\n\n /**\n * @this {HTMLElement}\n */\n get assignedSlot() {\n return getAssignedSlot(this);\n }\n\n}, fragmentMixin, slotMixin);\n\nObject.defineProperties(elementMixin, ShadowRootAccessor);\n\nlet documentMixin = utils.extendAll({\n /**\n * @this {Document}\n */\n importNode(node, deep) {\n return mutation.importNode(node, deep);\n },\n\n /**\n * @this {Document}\n */\n getElementById(id) {\n let result = mutation.query(this, function(n) {\n return n.id == id;\n }, function(n) {\n return Boolean(n);\n })[0];\n return result || null;\n }\n\n}, fragmentMixin);\n\nObject.defineProperties(documentMixin, {\n '_activeElement': ActiveElementAccessor.activeElement\n});\n\nlet nativeBlur = HTMLElement.prototype.blur;\n\nlet htmlElementMixin = utils.extendAll({\n /**\n * @this {HTMLElement}\n */\n blur() {\n let root = this.__shady && this.__shady.root;\n let shadowActive = root && root.activeElement;\n if (shadowActive) {\n shadowActive.blur();\n } else {\n nativeBlur.call(this);\n }\n }\n})\n\nfunction patchBuiltin(proto, obj) {\n let n$ = Object.getOwnPropertyNames(obj);\n for (let i=0; i < n$.length; i++) {\n let n = n$[i];\n let d = Object.getOwnPropertyDescriptor(obj, n);\n // NOTE: we prefer writing directly here because some browsers\n // have descriptors that are writable but not configurable (e.g.\n // `appendChild` on older browsers)\n if (d.value) {\n proto[n] = d.value;\n } else {\n Object.defineProperty(proto, n, d);\n }\n }\n}\n\n\n// Apply patches to builtins (e.g. Element.prototype). Some of these patches\n// can be done unconditionally (mostly methods like\n// `Element.prototype.appendChild`) and some can only be done when the browser\n// has proper descriptors on the builtin prototype\n// (e.g. `Element.prototype.firstChild`)`. When descriptors are not available,\n// elements are individually patched when needed (see e.g.\n// `patchInside/OutsideElementAccessors` in `patch-accessors.js`).\nexport function patchBuiltins() {\n let nativeHTMLElement =\n (window['customElements'] && window['customElements']['nativeHTMLElement']) ||\n HTMLElement;\n // These patches can always be done, for all supported browsers.\n patchBuiltin(window.Node.prototype, nodeMixin);\n patchBuiltin(window.Window.prototype, windowMixin);\n patchBuiltin(window.Text.prototype, textMixin);\n patchBuiltin(window.DocumentFragment.prototype, fragmentMixin);\n patchBuiltin(window.Element.prototype, elementMixin);\n patchBuiltin(window.Document.prototype, documentMixin);\n if (window.HTMLSlotElement) {\n patchBuiltin(window.HTMLSlotElement.prototype, slotMixin);\n }\n patchBuiltin(nativeHTMLElement.prototype, htmlElementMixin);\n // These patches can *only* be done\n // on browsers that have proper property descriptors on builtin prototypes.\n // This includes: IE11, Edge, Chrome >= 4?; Safari >= 10, Firefox\n // On older browsers (Chrome <= 4?, Safari 9), a per element patching\n // strategy is used for patching accessors.\n if (utils.settings.hasDescriptors) {\n patchAccessors(window.Node.prototype);\n patchAccessors(window.Text.prototype);\n patchAccessors(window.DocumentFragment.prototype);\n patchAccessors(window.Element.prototype);\n patchAccessors(nativeHTMLElement.prototype);\n patchAccessors(window.Document.prototype);\n if (window.HTMLSlotElement) {\n patchAccessors(window.HTMLSlotElement.prototype);\n }\n }\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * Patches elements that interacts with ShadyDOM\n * such that tree traversal and mutation apis act like they would under\n * ShadowDOM.\n *\n * This import enables seemless interaction with ShadyDOM powered\n * custom elements, enabling better interoperation with 3rd party code,\n * libraries, and frameworks that use DOM tree manipulation apis.\n */\n\nimport * as utils from './utils.js';\nimport {flush, enqueue} from './flush.js';\nimport {observeChildren, unobserveChildren, filterMutations} from './observe-changes.js';\nimport * as nativeMethods from './native-methods.js';\nimport * as nativeTree from './native-tree.js';\nimport {patchBuiltins} from './patch-builtins.js';\nimport {patchEvents} from './patch-events.js';\nimport {ShadyRoot} from './attach-shadow.js';\n\nif (utils.settings.inUse) {\n let ShadyDOM = {\n // TODO(sorvell): remove when Polymer does not depend on this.\n 'inUse': utils.settings.inUse,\n // TODO(sorvell): remove when Polymer does not depend on this\n 'patch': (node) => node,\n 'isShadyRoot': utils.isShadyRoot,\n 'enqueue': enqueue,\n 'flush': flush,\n 'settings': utils.settings,\n 'filterMutations': filterMutations,\n 'observeChildren': observeChildren,\n 'unobserveChildren': unobserveChildren,\n 'nativeMethods': nativeMethods,\n 'nativeTree': nativeTree\n };\n\n window['ShadyDOM'] = ShadyDOM;\n\n // Apply patches to events...\n patchEvents();\n // Apply patches to builtins (e.g. Element.prototype) where applicable.\n patchBuiltins();\n\n window.ShadowRoot = ShadyRoot;\n}\n"]} \ No newline at end of file +{"version":3,"sources":[" [synthetic:util/defineproperty] "," [synthetic:util/global] "," [synthetic:es6/symbol] "," [synthetic:es6/util/makeiterator] "," [synthetic:es6/util/arrayfromiterator] ","src/array-splice.js","src/utils.js","src/innerHTML.js","src/native-tree.js","src/native-methods.js","src/patch-accessors.js","src/logical-tree.js","src/logical-mutation.js","src/attach-shadow.js"," [synthetic:es6/util/arrayfromiterable] ","src/flush.js","src/observe-changes.js","src/patch-events.js","src/patch-builtins.js","src/shadydom.js"],"names":["$jscomp.defineProperty","$jscomp.global","$jscomp.initSymbol","$jscomp.Symbol","$jscomp.SYMBOL_PREFIX","$jscomp.arrayIterator","$jscomp.initSymbolIterator","$jscomp.iteratorPrototype","newSplice","index","addedCount","removed","calcSplices","current","currentEnd","old","oldEnd","prefixCount","suffixCount","minLength","Math","min","currentStart","oldStart","i","currentValue","previousValue","length","index1","index2","count","equals","splice","push","rowCount","columnCount","distances","Array","j","north","west","edits","EDIT_ADD","EDIT_DELETE","northWest","EDIT_LEAVE","EDIT_UPDATE","reverse","undefined","splices","oldIndex","settings","window","hasNativeShadowDOM","attachShadow","Element","prototype","getRootNode","Node","desc","Object","getOwnPropertyDescriptor","hasDescriptors","configurable","get","inUse","isTrackingLogicalChildNodes","node","__shady","firstChild","isShadyRoot","obj","__localName","ownerShadyRootForNode","root","p","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","extend","target","source","n$","getOwnPropertyNames","n","pd","defineProperty","extendAll","sources","mixin","twiddle","document","createTextNode","content","queue","observe","MutationObserver","shift","e","textContent","characterData","microtask","callback","hasDocumentContains","contains","container","parentNode","escapeAttrRegExp","escapeDataRegExp","escapeReplace","c","makeSet","arr","set","voidElements","plaintextParents","getInnerHTML","localName","s","c$","childNodes","l","child","nodeType","ELEMENT_NODE","tagName","attrs","attributes","attr","name","value","replace","TEXT_NODE","data","COMMENT_NODE","console","error","Error","nodeWalker","createTreeWalker","NodeFilter","SHOW_ALL","elementWalker","SHOW_ELEMENT","nodes","currentNode","nextSibling","lastChild","previousSibling","parentElement","firstElementChild","lastElementChild","previousElementSibling","nextElementSibling","children","innerHTML","DOCUMENT_FRAGMENT_NODE","textWalker","SHOW_TEXT","nextNode","nodeValue","insertBefore","removeChild","setAttribute","removeAttribute","cloneNode","importNode","Document","addEventListener","removeEventListener","windowAddEventListener","Window","windowRemoveEventListener","dispatchEvent","querySelector","querySelectorAll","HTMLElement","appendChild","nativeInnerHTMLDesc","inertDoc","implementation","createHTMLDocument","nativeActiveElementDescriptor","OutsideAccessors","nativeTree","className","getAttribute","InsideAccessors","item","childNodes.item","childElementCount","tc","cn","join","text","filter","call","children.item","containerName","htmlContainer","createElement","ShadowRootAccessor","shadowRoot","publicRoot","ActiveElementAccessor","activeElement","active","host","nativeContains","activeRoot","patchAccessorGroup","descriptors","force","objDesc","warn","patchAccessors","proto","patchOutsideElementAccessors","element","__outsideAccessors","patchInsideElementAccessors","__insideAccessors","linkNode","ref_node","ps","ns","recordChildNodes","parent","ownerRoot","slots","slotsAdded","__pendingSlots","$jscomp.arrayFromIterator","$jscomp.makeIterator","_asyncRender","resetTo","hasShadowRootWithSlot","preventNativeInsert","firstComposedNode","nativeMethods","scheduleObserver","preventNativeRemove","removeOwnerShadyRoot","changeSlotContent","_validateSlots","map","_slotMap","slot","x","_slotList","indexOf","flattenedNodes","didRemove","ownerShadyRoot","composed","flattened","_hasInsertionPoint","distributeAttributeChange","oldName","__slotName","_nameForSlot","list","_sortSlots","addedNode","removedNode","observer","addedNodes","removedNodes","schedule","documentElement","query","matcher","halter","queryElements","elements","result","scopingShim","deep","ownerDocument","nc","flushList","scheduled","enqueue","flush","didFlush","ShadyRootConstructionToken","ShadyRoot","token","options","TypeError","createDocumentFragment","__proto__","_mode","mode","_renderPending","create","DocumentFragment","ShadyRoot.prototype._asyncRender","_render","ShadyRoot.prototype._render","renderRoot","_distribute","assignedNodes","_previouslyAssignedNodes","_prevAssignedSlot","assignedSlot","_distributeNodeToSlot","slotParent","slotParentRoot","_addAssignedToFlattenedNodes","prevAssignedNodes","dirty","_fireSlotChange","_compose","composeList","targetNode","distributedNode","d","next","ShadyRoot.prototype._distributeNodeToSlot","forcedSlot","oldSlot","CATCHALL_NAME","ShadyRoot.prototype._addAssignedToFlattenedNodes","assigned","nestedAssigned","ShadyRoot.prototype._fireSlotChange","Event","ShadyRoot.prototype._validateSlots","slotNamesToSort","_mapSlots","ShadyRoot.prototype._nameForSlot","ShadyRoot.prototype._sortSlots","sort","a","b","listA","ancestorList","listB","nA","nB","from","ancestors","unshift","ShadyRoot.prototype._hasInsertionPoint","ShadyRoot.prototype.addEventListener","type","fn","optionsOrCapture","capture","__shadyTarget","ShadyRoot.prototype.removeEventListener","getElementById","ShadyRoot.prototype.getElementById","id","constructor","AsyncObserver","_scheduled","callbacks","Set","mutations","takeRecords","forEach","cb","observeChildren","add","_callback","_observer","_node","unobserveChildren","handle","delete","size","filterMutations","targetRootNode","mutation","mutationInScope","m","eventWrappersName","Date","now","alwaysComposed","pathComposer","startNode","composedPath","startRoot","retarget","refNode","path","refNodePath","ancestor","lastRoot","rootIdx","eventMixin","isTrusted","__composed","__composedPath","currentTarget","relatedTarget","__relatedTarget","__relatedTargetComposedPath","stopPropagation","__propagationStopped","stopImmediatePropagation","__immediatePropagationStopped","mixinComposedFlag","Base","klazz","event","nonBubblingEventsToRetarget","hasRetargeted","fireHandlers","phase","hs","__handlers","retargetNonBubblingEvent","AT_TARGET","lastFiredRoot","findListener","wrappers","once","passive","savedType","savedListener","savedCapture","savedOnce","savedPassive","savedNode","fnOrObj","handlerType","handleEvent","wrapperFn","patchEvent","lastCurrentTargetDesc","eventPhase","BUBBLING_PHASE","CAPTURING_PHASE","bubbles","ret","ael","idx","rel","activateFocusEventOverrides","ev","getPrototypeOf","hasOwnProperty","patchProto","__sourceProto","PatchedEvent","PatchedCustomEvent","CustomEvent","PatchedMouseEvent","MouseEvent","getAssignedSlot","windowMixin","bind","nodeMixin","replaceChild","isConnected","textMixin","fragmentMixin","selector","slotMixin","flatten","elementMixin","defineProperties","documentMixin","nativeBlur","blur","htmlElementMixin","shadowActive","patchBuiltin","ShadyDOM","patch","nativeHTMLElement","Text","HTMLSlotElement","ShadowRoot"],"mappings":"A;;;;;;;;;aAoCA,IAAAA,GAC4D,UAAxD,EA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e","file":"shadydom.min.js","sourcesContent":[null,null,null,null,null,"/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nfunction newSplice(index, removed, addedCount) {\n return {\n index: index,\n removed: removed,\n addedCount: addedCount\n };\n}\n\nconst EDIT_LEAVE = 0;\nconst EDIT_UPDATE = 1;\nconst EDIT_ADD = 2;\nconst EDIT_DELETE = 3;\n\n// Note: This function is *based* on the computation of the Levenshtein\n// \"edit\" distance. The one change is that \"updates\" are treated as two\n// edits - not one. With Array splices, an update is really a delete\n// followed by an add. By retaining this, we optimize for \"keeping\" the\n// maximum array items in the original array. For example:\n//\n// 'xxxx123' -> '123yyyy'\n//\n// With 1-edit updates, the shortest path would be just to update all seven\n// characters. With 2-edit updates, we delete 4, leave 3, and add 4. This\n// leaves the substring '123' intact.\nfunction calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n // \"Deletion\" columns\n let rowCount = oldEnd - oldStart + 1;\n let columnCount = currentEnd - currentStart + 1;\n let distances = new Array(rowCount);\n\n // \"Addition\" rows. Initialize null column.\n for (let i = 0; i < rowCount; i++) {\n distances[i] = new Array(columnCount);\n distances[i][0] = i;\n }\n\n // Initialize null row\n for (let j = 0; j < columnCount; j++)\n distances[0][j] = j;\n\n for (let i = 1; i < rowCount; i++) {\n for (let j = 1; j < columnCount; j++) {\n if (equals(current[currentStart + j - 1], old[oldStart + i - 1]))\n distances[i][j] = distances[i - 1][j - 1];\n else {\n let north = distances[i - 1][j] + 1;\n let west = distances[i][j - 1] + 1;\n distances[i][j] = north < west ? north : west;\n }\n }\n }\n\n return distances;\n}\n\n// This starts at the final weight, and walks \"backward\" by finding\n// the minimum previous weight recursively until the origin of the weight\n// matrix.\nfunction spliceOperationsFromEditDistances(distances) {\n let i = distances.length - 1;\n let j = distances[0].length - 1;\n let current = distances[i][j];\n let edits = [];\n while (i > 0 || j > 0) {\n if (i == 0) {\n edits.push(EDIT_ADD);\n j--;\n continue;\n }\n if (j == 0) {\n edits.push(EDIT_DELETE);\n i--;\n continue;\n }\n let northWest = distances[i - 1][j - 1];\n let west = distances[i - 1][j];\n let north = distances[i][j - 1];\n\n let min;\n if (west < north)\n min = west < northWest ? west : northWest;\n else\n min = north < northWest ? north : northWest;\n\n if (min == northWest) {\n if (northWest == current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = northWest;\n }\n i--;\n j--;\n } else if (min == west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n return edits;\n}\n\n/**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n * \n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n */\n\n/**\n * Lacking individual splice mutation information, the minimal set of\n * splices can be synthesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortest path through it.\n *\n * Complexity: O(l * p)\n * l: The length of the current array\n * p: The length of the old array\n */\nfunction calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n let prefixCount = 0;\n let suffixCount = 0;\n let splice;\n\n let minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n if (currentStart == 0 && oldStart == 0)\n prefixCount = sharedPrefix(current, old, minLength);\n\n if (currentEnd == current.length && oldEnd == old.length)\n suffixCount = sharedSuffix(current, old, minLength - prefixCount);\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\n if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)\n return [];\n\n if (currentStart == currentEnd) {\n splice = newSplice(currentStart, [], 0);\n while (oldStart < oldEnd)\n splice.removed.push(old[oldStart++]);\n\n return [ splice ];\n } else if (oldStart == oldEnd)\n return [ newSplice(currentStart, [], currentEnd - currentStart) ];\n\n let ops = spliceOperationsFromEditDistances(\n calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd));\n\n splice = undefined;\n let splices = [];\n let index = currentStart;\n let oldIndex = oldStart;\n for (let i = 0; i < ops.length; i++) {\n switch(ops[i]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(splice);\n splice = undefined;\n }\n\n index++;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n break;\n case EDIT_DELETE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (splice) {\n splices.push(splice);\n }\n return splices;\n}\n\nfunction sharedPrefix(current, old, searchLength) {\n for (let i = 0; i < searchLength; i++)\n if (!equals(current[i], old[i]))\n return i;\n return searchLength;\n}\n\nfunction sharedSuffix(current, old, searchLength) {\n let index1 = current.length;\n let index2 = old.length;\n let count = 0;\n while (count < searchLength && equals(current[--index1], old[--index2]))\n count++;\n\n return count;\n}\n\nfunction equals(currentValue, previousValue) {\n return currentValue === previousValue;\n}\n\nexport function calculateSplices(current, previous) {\n return calcSplices(current, 0, current.length, previous, 0,\n previous.length);\n}\n\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport let settings = window['ShadyDOM'] || {};\n\nsettings.hasNativeShadowDOM = Boolean(Element.prototype.attachShadow && Node.prototype.getRootNode);\n\nlet desc = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild');\n\nsettings.hasDescriptors = Boolean(desc && desc.configurable && desc.get);\nsettings.inUse = settings['force'] || !settings.hasNativeShadowDOM;\n\nexport function isTrackingLogicalChildNodes(node) {\n return (node.__shady && node.__shady.firstChild !== undefined);\n}\n\nexport function isShadyRoot(obj) {\n return Boolean(obj.__localName === 'ShadyRoot');\n}\n\nexport function ownerShadyRootForNode(node) {\n let root = node.getRootNode();\n if (isShadyRoot(root)) {\n return root;\n }\n}\n\nlet p = Element.prototype;\nlet matches = p.matches || p.matchesSelector ||\n p.mozMatchesSelector || p.msMatchesSelector ||\n p.oMatchesSelector || p.webkitMatchesSelector;\n\nexport function matchesSelector(element, selector) {\n return matches.call(element, selector);\n}\n\nfunction copyOwnProperty(name, source, target) {\n let pd = Object.getOwnPropertyDescriptor(source, name);\n if (pd) {\n Object.defineProperty(target, name, pd);\n }\n}\n\nexport function extend(target, source) {\n if (target && source) {\n let n$ = Object.getOwnPropertyNames(source);\n for (let i=0, n; (i {\n while (queue.length) {\n // catch errors in user code...\n try {\n queue.shift()();\n } catch(e) {\n // enqueue another record and throw\n twiddle.textContent = content++;\n throw(e);\n }\n }\n}).observe(twiddle, {characterData: true});\n\n// use MutationObserver to get microtask async timing.\nexport function microtask(callback) {\n queue.push(callback);\n twiddle.textContent = content++;\n}\n\nexport const hasDocumentContains = Boolean(document.contains);\n\nexport function contains(container, node) {\n while (node) {\n if (node == container) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n// Cribbed from ShadowDOM polyfill\n// https://github.com/webcomponents/webcomponentsjs/blob/master/src/ShadowDOM/wrappers/HTMLElement.js#L28\n/////////////////////////////////////////////////////////////////////////////\n// innerHTML and outerHTML\n\n// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#escapingString\nlet escapeAttrRegExp = /[&\\u00A0\"]/g;\nlet escapeDataRegExp = /[&\\u00A0<>]/g;\n\nfunction escapeReplace(c) {\n switch (c) {\n case '&':\n return '&';\n case '<':\n return '<';\n case '>':\n return '>';\n case '\"':\n return '"';\n case '\\u00A0':\n return ' ';\n }\n}\n\nfunction escapeAttr(s) {\n return s.replace(escapeAttrRegExp, escapeReplace);\n}\n\nfunction escapeData(s) {\n return s.replace(escapeDataRegExp, escapeReplace);\n}\n\nfunction makeSet(arr) {\n let set = {};\n for (let i = 0; i < arr.length; i++) {\n set[arr[i]] = true;\n }\n return set;\n}\n\n// http://www.whatwg.org/specs/web-apps/current-work/#void-elements\nlet voidElements = makeSet([\n 'area',\n 'base',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n]);\n\nlet plaintextParents = makeSet([\n 'style',\n 'script',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'plaintext',\n 'noscript'\n]);\n\n/**\n * @param {Node} node\n * @param {Node} parentNode\n * @param {Function=} callback\n */\nexport function getOuterHTML(node, parentNode, callback) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE: {\n let tagName = node.localName;\n let s = '<' + tagName;\n let attrs = node.attributes;\n for (let i = 0, attr; (attr = attrs[i]); i++) {\n s += ' ' + attr.name + '=\"' + escapeAttr(attr.value) + '\"';\n }\n s += '>';\n if (voidElements[tagName]) {\n return s;\n }\n return s + getInnerHTML(node, callback) + '';\n }\n case Node.TEXT_NODE: {\n let data = /** @type {Text} */ (node).data;\n if (parentNode && plaintextParents[parentNode.localName]) {\n return data;\n }\n return escapeData(data);\n }\n case Node.COMMENT_NODE: {\n return '';\n }\n default: {\n window.console.error(node);\n throw new Error('not implemented');\n }\n }\n}\n\n/**\n * @param {Node} node\n * @param {Function=} callback\n */\nexport function getInnerHTML(node, callback) {\n if (node.localName === 'template') {\n node = /** @type {HTMLTemplateElement} */ (node).content;\n }\n let s = '';\n let c$ = callback ? callback(node) : node.childNodes;\n for (let i=0, l=c$.length, child; (i childNodes(n));\n}\n\nexport function textContent(node) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_FRAGMENT_NODE:\n let textWalker = document.createTreeWalker(node, NodeFilter.SHOW_TEXT,\n null, false);\n let content = '', n;\n while ( (n = textWalker.nextNode()) ) {\n // TODO(sorvell): can't use textContent since we patch it on Node.prototype!\n // However, should probably patch it only on element.\n content += n.nodeValue;\n }\n return content;\n default:\n return node.nodeValue;\n }\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nexport let appendChild = Element.prototype.appendChild;\nexport let insertBefore = Element.prototype.insertBefore;\nexport let removeChild = Element.prototype.removeChild;\nexport let setAttribute = Element.prototype.setAttribute;\nexport let removeAttribute = Element.prototype.removeAttribute;\nexport let cloneNode = Element.prototype.cloneNode;\nexport let importNode = Document.prototype.importNode;\nexport let addEventListener = Element.prototype.addEventListener;\nexport let removeEventListener = Element.prototype.removeEventListener;\nexport let windowAddEventListener = Window.prototype.addEventListener;\nexport let windowRemoveEventListener = Window.prototype.removeEventListener;\nexport let dispatchEvent = Element.prototype.dispatchEvent;\nexport let querySelector = Element.prototype.querySelector;\nexport let querySelectorAll = Element.prototype.querySelectorAll;\nexport let contains = Node.prototype.contains || HTMLElement.prototype.contains;\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {getInnerHTML} from './innerHTML.js';\nimport * as nativeTree from './native-tree.js';\nimport {contains as nativeContains} from './native-methods.js';\n\nfunction clearNode(node) {\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n}\n\nconst nativeInnerHTMLDesc = /** @type {ObjectPropertyDescriptor} */(\n Object.getOwnPropertyDescriptor(Element.prototype, 'innerHTML') ||\n Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'innerHTML'));\n\nconst inertDoc = document.implementation.createHTMLDocument('inert');\n\nconst nativeActiveElementDescriptor =\n /** @type {ObjectPropertyDescriptor} */(\n Object.getOwnPropertyDescriptor(Document.prototype, 'activeElement')\n );\nfunction getDocumentActiveElement() {\n if (nativeActiveElementDescriptor && nativeActiveElementDescriptor.get) {\n return nativeActiveElementDescriptor.get.call(document);\n } else if (!utils.settings.hasDescriptors) {\n return document.activeElement;\n }\n}\n\nfunction activeElementForNode(node) {\n let active = getDocumentActiveElement();\n // In IE11, activeElement might be an empty object if the document is\n // contained in an iframe.\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10998788/\n if (!active || !active.nodeType) {\n return null;\n }\n let isShadyRoot = !!(utils.isShadyRoot(node));\n if (node !== document) {\n // If this node isn't a document or shady root, then it doesn't have\n // an active element.\n if (!isShadyRoot) {\n return null;\n }\n // If this shady root's host is the active element or the active\n // element is not a descendant of the host (in the composed tree),\n // then it doesn't have an active element.\n if (node.host === active ||\n !nativeContains.call(node.host, active)) {\n return null;\n }\n }\n // This node is either the document or a shady root of which the active\n // element is a (composed) descendant of its host; iterate upwards to\n // find the active element's most shallow host within it.\n let activeRoot = utils.ownerShadyRootForNode(active);\n while (activeRoot && activeRoot !== node) {\n active = activeRoot.host;\n activeRoot = utils.ownerShadyRootForNode(active);\n }\n if (node === document) {\n // This node is the document, so activeRoot should be null.\n return activeRoot ? null : active;\n } else {\n // This node is a non-document shady root, and it should be\n // activeRoot.\n return activeRoot === node ? active : null;\n }\n}\n\nlet OutsideAccessors = {\n\n parentElement: {\n /** @this {Node} */\n get() {\n let l = this.__shady && this.__shady.parentNode;\n if (l && l.nodeType !== Node.ELEMENT_NODE) {\n l = null;\n }\n return l !== undefined ? l : nativeTree.parentElement(this);\n },\n configurable: true\n },\n\n parentNode: {\n /** @this {Node} */\n get() {\n let l = this.__shady && this.__shady.parentNode;\n return l !== undefined ? l : nativeTree.parentNode(this);\n },\n configurable: true\n },\n\n nextSibling: {\n /** @this {Node} */\n get() {\n let l = this.__shady && this.__shady.nextSibling;\n return l !== undefined ? l : nativeTree.nextSibling(this);\n },\n configurable: true\n },\n\n previousSibling: {\n /** @this {Node} */\n get() {\n let l = this.__shady && this.__shady.previousSibling;\n return l !== undefined ? l : nativeTree.previousSibling(this);\n },\n configurable: true\n },\n\n className: {\n /**\n * @this {HTMLElement}\n */\n get() {\n return this.getAttribute('class') || '';\n },\n /**\n * @this {HTMLElement}\n */\n set(value) {\n this.setAttribute('class', value);\n },\n configurable: true\n },\n\n // fragment, element, document\n nextElementSibling: {\n /**\n * @this {HTMLElement}\n */\n get() {\n if (this.__shady && this.__shady.nextSibling !== undefined) {\n let n = this.nextSibling;\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n.nextSibling;\n }\n return n;\n } else {\n return nativeTree.nextElementSibling(this);\n }\n },\n configurable: true\n },\n\n previousElementSibling: {\n /**\n * @this {HTMLElement}\n */\n get() {\n if (this.__shady && this.__shady.previousSibling !== undefined) {\n let n = this.previousSibling;\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n.previousSibling;\n }\n return n;\n } else {\n return nativeTree.previousElementSibling(this);\n }\n },\n configurable: true\n }\n\n};\n\nlet InsideAccessors = {\n\n childNodes: {\n /**\n * @this {HTMLElement}\n */\n get() {\n let childNodes;\n if (utils.isTrackingLogicalChildNodes(this)) {\n if (!this.__shady.childNodes) {\n this.__shady.childNodes = [];\n for (let n=this.firstChild; n; n=n.nextSibling) {\n this.__shady.childNodes.push(n);\n }\n }\n childNodes = this.__shady.childNodes;\n } else {\n childNodes = nativeTree.childNodes(this);\n }\n childNodes.item = function(index) {\n return childNodes[index];\n }\n return childNodes;\n },\n configurable: true\n },\n\n childElementCount: {\n /** @this {HTMLElement} */\n get() {\n return this.children.length;\n },\n configurable: true\n },\n\n firstChild: {\n /** @this {HTMLElement} */\n get() {\n let l = this.__shady && this.__shady.firstChild;\n return l !== undefined ? l : nativeTree.firstChild(this);\n },\n configurable: true\n },\n\n lastChild: {\n /** @this {HTMLElement} */\n get() {\n let l = this.__shady && this.__shady.lastChild;\n return l !== undefined ? l : nativeTree.lastChild(this);\n },\n configurable: true\n },\n\n textContent: {\n /**\n * @this {HTMLElement}\n */\n get() {\n if (utils.isTrackingLogicalChildNodes(this)) {\n let tc = [];\n for (let i = 0, cn = this.childNodes, c; (c = cn[i]); i++) {\n if (c.nodeType !== Node.COMMENT_NODE) {\n tc.push(c.textContent);\n }\n }\n return tc.join('');\n } else {\n return nativeTree.textContent(this);\n }\n },\n /**\n * @this {HTMLElement}\n * @param {string} text\n */\n set(text) {\n if (typeof text === 'undefined' || text === null) {\n text = ''\n }\n switch (this.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_FRAGMENT_NODE:\n clearNode(this);\n // Document fragments must have no childnodes if setting a blank string\n if (text.length > 0 || this.nodeType === Node.ELEMENT_NODE) {\n this.appendChild(document.createTextNode(text));\n }\n break;\n default:\n // TODO(sorvell): can't do this if patch nodeValue.\n this.nodeValue = text;\n break;\n }\n },\n configurable: true\n },\n\n // fragment, element, document\n firstElementChild: {\n /**\n * @this {HTMLElement}\n */\n get() {\n if (this.__shady && this.__shady.firstChild !== undefined) {\n let n = this.firstChild;\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n.nextSibling;\n }\n return n;\n } else {\n return nativeTree.firstElementChild(this);\n }\n },\n configurable: true\n },\n\n lastElementChild: {\n /**\n * @this {HTMLElement}\n */\n get() {\n if (this.__shady && this.__shady.lastChild !== undefined) {\n let n = this.lastChild;\n while (n && n.nodeType !== Node.ELEMENT_NODE) {\n n = n.previousSibling;\n }\n return n;\n } else {\n return nativeTree.lastElementChild(this);\n }\n },\n configurable: true\n },\n\n children: {\n /**\n * @this {HTMLElement}\n */\n get() {\n let children;\n if (utils.isTrackingLogicalChildNodes(this)) {\n children = Array.prototype.filter.call(this.childNodes, function(n) {\n return (n.nodeType === Node.ELEMENT_NODE);\n });\n } else {\n children = nativeTree.children(this);\n }\n children.item = function(index) {\n return children[index];\n }\n return children;\n },\n configurable: true\n },\n\n // element (HTMLElement on IE11)\n innerHTML: {\n /**\n * @this {HTMLElement}\n */\n get() {\n const content = this.localName === 'template' ?\n /** @type {HTMLTemplateElement} */(this).content : this;\n if (utils.isTrackingLogicalChildNodes(this)) {\n return getInnerHTML(content);\n } else {\n return nativeTree.innerHTML(content);\n }\n },\n /**\n * @this {HTMLElement}\n */\n set(text) {\n const content = this.localName === 'template' ?\n /** @type {HTMLTemplateElement} */(this).content : this;\n clearNode(content);\n let containerName = this.localName;\n if (!containerName || containerName === 'template') {\n containerName = 'div';\n }\n const htmlContainer = inertDoc.createElement(containerName);\n if (nativeInnerHTMLDesc && nativeInnerHTMLDesc.set) {\n nativeInnerHTMLDesc.set.call(htmlContainer, text);\n } else {\n htmlContainer.innerHTML = text;\n }\n while (htmlContainer.firstChild) {\n content.appendChild(htmlContainer.firstChild);\n }\n },\n configurable: true\n }\n\n};\n\n// Note: Can be patched on element prototype on all browsers.\n// Must be patched on instance on browsers that support native Shadow DOM\n// but do not have builtin accessors (old Chrome).\nexport let ShadowRootAccessor = {\n\n shadowRoot: {\n /**\n * @this {HTMLElement}\n */\n get() {\n return this.__shady && this.__shady.publicRoot || null;\n },\n configurable: true\n }\n};\n\n// Note: Can be patched on document prototype on browsers with builtin accessors.\n// Must be patched separately on simulated ShadowRoot.\n// Must be patched as `_activeElement` on browsers without builtin accessors.\nexport let ActiveElementAccessor = {\n\n activeElement: {\n /**\n * @this {HTMLElement}\n */\n get() {\n return activeElementForNode(this);\n },\n /**\n * @this {HTMLElement}\n */\n set() {},\n configurable: true\n }\n\n};\n\n// patch a group of descriptors on an object only if it exists or if the `force`\n// argument is true.\n/**\n * @param {!Object} obj\n * @param {!Object} descriptors\n * @param {boolean=} force\n */\nfunction patchAccessorGroup(obj, descriptors, force) {\n for (let p in descriptors) {\n let objDesc = Object.getOwnPropertyDescriptor(obj, p);\n if ((objDesc && objDesc.configurable) ||\n (!objDesc && force)) {\n Object.defineProperty(obj, p, descriptors[p]);\n } else if (force) {\n console.warn('Could not define', p, 'on', obj);\n }\n }\n}\n\n// patch dom accessors on proto where they exist\nexport function patchAccessors(proto) {\n patchAccessorGroup(proto, OutsideAccessors);\n patchAccessorGroup(proto, InsideAccessors);\n patchAccessorGroup(proto, ActiveElementAccessor);\n}\n\n// ensure element descriptors (IE/Edge don't have em)\nexport function patchShadowRootAccessors(proto) {\n patchAccessorGroup(proto, InsideAccessors, true);\n patchAccessorGroup(proto, ActiveElementAccessor, true);\n}\n\n// ensure an element has patched \"outside\" accessors; no-op when not needed\nexport let patchOutsideElementAccessors = utils.settings.hasDescriptors ?\n function() {} : function(element) {\n if (!(element.__shady && element.__shady.__outsideAccessors)) {\n element.__shady = element.__shady || {};\n element.__shady.__outsideAccessors = true;\n patchAccessorGroup(element, OutsideAccessors, true);\n }\n }\n\n// ensure an element has patched \"inside\" accessors; no-op when not needed\nexport let patchInsideElementAccessors = utils.settings.hasDescriptors ?\n function() {} : function(element) {\n if (!(element.__shady && element.__shady.__insideAccessors)) {\n element.__shady = element.__shady || {};\n element.__shady.__insideAccessors = true;\n patchAccessorGroup(element, InsideAccessors, true);\n patchAccessorGroup(element, ShadowRootAccessor, true);\n }\n }\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport {patchInsideElementAccessors, patchOutsideElementAccessors} from './patch-accessors.js';\nimport {firstChild, lastChild, childNodes} from './native-tree.js';\n\nexport function recordInsertBefore(node, container, ref_node) {\n patchInsideElementAccessors(container);\n container.__shady = container.__shady || {};\n if (container.__shady.firstChild !== undefined) {\n container.__shady.childNodes = null;\n }\n // handle document fragments\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n let c$ = node.childNodes;\n for (let i=0; i < c$.length; i++) {\n linkNode(c$[i], container, ref_node);\n }\n // cleanup logical dom in doc fragment.\n node.__shady = node.__shady || {};\n let resetTo = (node.__shady.firstChild !== undefined) ? null : undefined;\n node.__shady.firstChild = node.__shady.lastChild = resetTo;\n node.__shady.childNodes = resetTo;\n } else {\n linkNode(node, container, ref_node);\n }\n}\n\nfunction linkNode(node, container, ref_node) {\n patchOutsideElementAccessors(node);\n ref_node = ref_node || null;\n node.__shady = node.__shady || {};\n container.__shady = container.__shady || {};\n if (ref_node) {\n ref_node.__shady = ref_node.__shady || {};\n }\n // update ref_node.previousSibling <-> node\n node.__shady.previousSibling = ref_node ? ref_node.__shady.previousSibling :\n container.lastChild;\n let ps = node.__shady.previousSibling;\n if (ps && ps.__shady) {\n ps.__shady.nextSibling = node;\n }\n // update node <-> ref_node\n let ns = node.__shady.nextSibling = ref_node;\n if (ns && ns.__shady) {\n ns.__shady.previousSibling = node;\n }\n // update node <-> container\n node.__shady.parentNode = container;\n if (ref_node) {\n if (ref_node === container.__shady.firstChild) {\n container.__shady.firstChild = node;\n }\n } else {\n container.__shady.lastChild = node;\n if (!container.__shady.firstChild) {\n container.__shady.firstChild = node;\n }\n }\n // remove caching of childNodes\n container.__shady.childNodes = null;\n}\n\nexport function recordRemoveChild(node, container) {\n node.__shady = node.__shady || {};\n container.__shady = container.__shady || {};\n if (node === container.__shady.firstChild) {\n container.__shady.firstChild = node.__shady.nextSibling;\n }\n if (node === container.__shady.lastChild) {\n container.__shady.lastChild = node.__shady.previousSibling;\n }\n let p = node.__shady.previousSibling;\n let n = node.__shady.nextSibling;\n if (p) {\n p.__shady = p.__shady || {};\n p.__shady.nextSibling = n;\n }\n if (n) {\n n.__shady = n.__shady || {};\n n.__shady.previousSibling = p;\n }\n // When an element is removed, logical data is no longer tracked.\n // Explicitly set `undefined` here to indicate this. This is disginguished\n // from `null` which is set if info is null.\n node.__shady.parentNode = node.__shady.previousSibling =\n node.__shady.nextSibling = undefined;\n if (container.__shady.childNodes !== undefined) {\n // remove caching of childNodes\n container.__shady.childNodes = null;\n }\n}\n\nexport let recordChildNodes = function(node) {\n if (!node.__shady || node.__shady.firstChild === undefined) {\n node.__shady = node.__shady || {};\n node.__shady.firstChild = firstChild(node);\n node.__shady.lastChild = lastChild(node);\n patchInsideElementAccessors(node);\n let c$ = node.__shady.childNodes = childNodes(node);\n for (let i=0, n; (i is added or a node is added to a host with a shadowRoot\n// with a slot, a standard dom `insert` call is aborted and `_asyncRender`\n// is called on the relevant shadowRoot. In all other cases, a standard dom\n// `insert` can be made, but the location and ref_node may need to be changed.\n/**\n * @param {Node} parent\n * @param {Node} node\n * @param {Node=} ref_node\n */\nexport function insertBefore(parent, node, ref_node) {\n if (node === parent) {\n throw Error(`Failed to execute 'appendChild' on 'Node': The new child element contains the parent.`);\n }\n if (ref_node) {\n let p = ref_node.__shady && ref_node.__shady.parentNode;\n if ((p !== undefined && p !== parent) ||\n (p === undefined && parentNode(ref_node) !== parent)) {\n throw Error(`Failed to execute 'insertBefore' on 'Node': The node ` +\n `before which the new node is to be inserted is not a child of this node.`);\n }\n }\n if (ref_node === node) {\n return node;\n }\n // remove from existing location\n if (node.parentNode) {\n // NOTE: avoid node.removeChild as this *can* trigger another patched\n // method (e.g. custom elements) and we want only the shady method to run.\n removeChild(node.parentNode, node);\n }\n // add to new parent\n let preventNativeInsert;\n let ownerRoot = utils.ownerShadyRootForNode(parent);\n // if a slot is added, must render containing root.\n let slotsAdded = ownerRoot && findContainedSlots(node);\n if (slotsAdded) {\n ownerRoot._addSlots(slotsAdded);\n }\n if (ownerRoot && (parent.localName === 'slot' || slotsAdded)) {\n ownerRoot._asyncRender();\n }\n if (utils.isTrackingLogicalChildNodes(parent)) {\n logicalTree.recordInsertBefore(node, parent, ref_node);\n // when inserting into a host with a shadowRoot with slot, use\n // `shadowRoot._asyncRender()` via `attach-shadow` module\n if (hasShadowRootWithSlot(parent)) {\n parent.__shady.root._asyncRender();\n preventNativeInsert = true;\n // when inserting into a host with shadowRoot with NO slot, do nothing\n // as the node should not be added to composed dome anywhere.\n } else if (parent.__shady.root) {\n preventNativeInsert = true;\n }\n }\n if (!preventNativeInsert) {\n // if adding to a shadyRoot, add to host instead\n let container = utils.isShadyRoot(parent) ?\n /** @type {ShadowRoot} */(parent).host : parent;\n // if ref_node, get the ref_node that's actually in composed dom.\n if (ref_node) {\n ref_node = firstComposedNode(ref_node);\n nativeMethods.insertBefore.call(container, node, ref_node);\n } else {\n nativeMethods.appendChild.call(container, node);\n }\n }\n scheduleObserver(parent, node);\n return node;\n}\n\nfunction findContainedSlots(node) {\n if (!node['__noInsertionPoint']) {\n let slots;\n if (node.localName === 'slot') {\n slots = [node];\n } else if (node.querySelectorAll) {\n slots = node.querySelectorAll('slot');\n }\n if (slots && slots.length) {\n return slots;\n }\n }\n}\n\n/**\n * Patched `removeChild`. Note that all dom \"removals\" are routed here.\n * Removes the given `node` from the element's `children`.\n * This method also performs dom composition.\n * @param {Node} parent\n * @param {Node} node\n*/\nexport function removeChild(parent, node) {\n if (node.parentNode !== parent) {\n throw Error('The node to be removed is not a child of this node: ' +\n node);\n }\n let preventNativeRemove;\n let ownerRoot = utils.ownerShadyRootForNode(node);\n let removingInsertionPoint;\n if (utils.isTrackingLogicalChildNodes(parent)) {\n logicalTree.recordRemoveChild(node, parent);\n if (hasShadowRootWithSlot(parent)) {\n parent.__shady.root._asyncRender();\n preventNativeRemove = true;\n }\n }\n removeOwnerShadyRoot(node);\n // if removing slot, must render containing root\n if (ownerRoot) {\n let changeSlotContent = parent && parent.localName === 'slot';\n if (changeSlotContent) {\n preventNativeRemove = true;\n }\n removingInsertionPoint = ownerRoot._removeContainedSlots(node);\n if (removingInsertionPoint || changeSlotContent) {\n ownerRoot._asyncRender();\n }\n }\n if (!preventNativeRemove) {\n // if removing from a shadyRoot, remove form host instead\n let container = utils.isShadyRoot(parent) ?\n /** @type {ShadowRoot} */(parent).host :\n parent;\n // not guaranteed to physically be in container; e.g.\n // (1) if parent has a shadyRoot, element may or may not at distributed\n // location (could be undistributed)\n // (2) if parent is a slot, element may not ben in composed dom\n if (!(parent.__shady.root || node.localName === 'slot') ||\n (container === parentNode(node))) {\n nativeMethods.removeChild.call(container, node);\n }\n }\n scheduleObserver(parent, null, node);\n return node;\n}\n\nfunction removeOwnerShadyRoot(node) {\n // optimization: only reset the tree if node is actually in a root\n if (hasCachedOwnerRoot(node)) {\n let c$ = node.childNodes;\n for (let i=0, l=c$.length, n; (i` element's `name`\n * attribute changes, updates the root's slot map and renders.\n * @param {Node} node\n * @param {string} name\n */\nfunction distributeAttributeChange(node, name) {\n if (name === 'slot') {\n const parent = node.parentNode;\n if (hasShadowRootWithSlot(parent)) {\n parent.__shady.root._asyncRender();\n }\n } else if (node.localName === 'slot' && name === 'name') {\n let root = utils.ownerShadyRootForNode(node);\n if (root) {\n root._updateSlotName(node);\n root._asyncRender();\n }\n }\n}\n\n/**\n * @param {Node} node\n * @param {Node=} addedNode\n * @param {Node=} removedNode\n */\nfunction scheduleObserver(node, addedNode, removedNode) {\n let observer = node.__shady && node.__shady.observer;\n if (observer) {\n if (addedNode) {\n observer.addedNodes.push(addedNode);\n }\n if (removedNode) {\n observer.removedNodes.push(removedNode);\n }\n observer.schedule();\n }\n}\n\n/**\n * @param {Node} node\n * @param {Object=} options\n */\nexport function getRootNode(node, options) { // eslint-disable-line no-unused-vars\n if (!node || !node.nodeType) {\n return;\n }\n node.__shady = node.__shady || {};\n let root = node.__shady.ownerShadyRoot;\n if (root === undefined) {\n if (utils.isShadyRoot(node)) {\n root = node;\n } else {\n let parent = node.parentNode;\n root = parent ? getRootNode(parent) : node;\n }\n // memo-ize result for performance but only memo-ize\n // result if node is in the document. This avoids a problem where a root\n // can be cached while an element is inside a fragment.\n // If this happens and we cache the result, the value can become stale\n // because for perf we avoid processing the subtree of added fragments.\n if (nativeMethods.contains.call(document.documentElement, node)) {\n node.__shady.ownerShadyRoot = root;\n }\n }\n return root;\n}\n\n// NOTE: `query` is used primarily for ShadyDOM's querySelector impl,\n// but it's also generally useful to recurse through the element tree\n// and is used by Polymer's styling system.\n/**\n * @param {Node} node\n * @param {Function} matcher\n * @param {Function=} halter\n */\nexport function query(node, matcher, halter) {\n let list = [];\n queryElements(node.childNodes, matcher,\n halter, list);\n return list;\n}\n\nfunction queryElements(elements, matcher, halter, list) {\n for (let i=0, l=elements.length, c; (i host\n this.host = host;\n this._mode = options && options.mode;\n host.__shady = host.__shady || {};\n host.__shady.root = this;\n host.__shady.publicRoot = this._mode !== 'closed' ? this : null;\n // state flags\n this._renderPending = false;\n this._hasRendered = false;\n this._slotList = [];\n this._slotMap = {};\n this.__pendingSlots = [];\n // fast path initial render: remove existing physical dom.\n let c$ = childNodes(host);\n for (let i=0, l=c$.length; i < l; i++) {\n removeChild.call(host, c$[i])\n }\n}\n\n// async render\nShadyRoot.prototype._asyncRender = function() {\n if (!this._renderPending) {\n this._renderPending = true;\n enqueue(() => this._render());\n }\n}\n\n// returns the oldest renderPending ancestor root.\nShadyRoot.prototype._getRenderRoot = function() {\n let renderRoot;\n let root = this;\n while (root) {\n if (root._renderPending) {\n renderRoot = root;\n }\n root = root._rendererForHost();\n }\n return renderRoot;\n}\n\n// Returns the shadyRoot `this.host` if `this.host`\n// has children that require distribution.\nShadyRoot.prototype._rendererForHost = function() {\n let root = this.host.getRootNode();\n if (utils.isShadyRoot(root)) {\n let c$ = this.host.childNodes;\n for (let i=0, c; i < c$.length; i++) {\n c = c$[i];\n if (this._isInsertionPoint(c)) {\n return root;\n }\n }\n }\n}\n\nShadyRoot.prototype._render = function() {\n const root = this._getRenderRoot();\n if (root) {\n root['_renderRoot']();\n }\n}\n\n// NOTE: avoid renaming to ease testability.\nShadyRoot.prototype['_renderRoot'] = function() {\n this._renderPending = false;\n this._distribute();\n this._compose();\n this._hasRendered = true;\n}\n\nShadyRoot.prototype._distribute = function() {\n this._validateSlots();\n // capture # of previously assigned nodes to help determine if dirty.\n for (let i=0, slot; i < this._slotList.length; i++) {\n slot = this._slotList[i];\n this._clearSlotAssignedNodes(slot);\n }\n // distribute host children.\n for (let n=this.host.firstChild; n; n=n.nextSibling) {\n this._distributeNodeToSlot(n);\n }\n // fallback content, slotchange, and dirty roots\n for (let i=0, slot; i < this._slotList.length; i++) {\n slot = this._slotList[i];\n // distribute fallback content\n if (!slot.__shady.assignedNodes.length) {\n for (let n=slot.firstChild; n; n=n.nextSibling) {\n this._distributeNodeToSlot(n, slot);\n }\n }\n const slotParent = slot.parentNode;\n const slotParentRoot = slotParent.__shady && slotParent.__shady.root;\n if (slotParentRoot && slotParentRoot._hasInsertionPoint()) {\n slotParentRoot['_renderRoot']();\n }\n this._addAssignedToFlattenedNodes(slot.__shady.flattenedNodes,\n slot.__shady.assignedNodes);\n let prevAssignedNodes = slot.__shady._previouslyAssignedNodes;\n if (prevAssignedNodes) {\n for (let i=0; i < prevAssignedNodes.length; i++) {\n prevAssignedNodes[i].__shady._prevAssignedSlot = null;\n }\n slot.__shady._previouslyAssignedNodes = null;\n // dirty if previously less assigned nodes than previously assigned.\n if (prevAssignedNodes.length > slot.__shady.assignedNodes.length) {\n slot.__shady.dirty = true;\n }\n }\n /* Note: A slot is marked dirty whenever a node is newly assigned to it\n or a node is assigned to a different slot (done in `_distributeNodeToSlot`)\n or if the number of nodes assigned to the slot has decreased (done above);\n */\n if (slot.__shady.dirty) {\n slot.__shady.dirty = false;\n this._fireSlotChange(slot);\n }\n }\n}\n\n/**\n * Distributes given `node` to the appropriate slot based on its `slot`\n * attribute. If `forcedSlot` is given, then the node is distributed to the\n * `forcedSlot`.\n * Note: slot to which the node is assigned will be marked dirty for firing\n * `slotchange`.\n * @param {Node} node\n * @param {Node=} forcedSlot\n *\n */\nShadyRoot.prototype._distributeNodeToSlot = function(node, forcedSlot) {\n node.__shady = node.__shady || {};\n let oldSlot = node.__shady._prevAssignedSlot;\n node.__shady._prevAssignedSlot = null;\n let slot = forcedSlot;\n if (!slot) {\n let name = node.slot || CATCHALL_NAME;\n const list = this._slotMap[name];\n slot = list && list[0];\n }\n if (slot) {\n slot.__shady.assignedNodes.push(node);\n node.__shady.assignedSlot = slot;\n } else {\n node.__shady.assignedSlot = undefined;\n }\n if (oldSlot !== node.__shady.assignedSlot) {\n if (node.__shady.assignedSlot) {\n node.__shady.assignedSlot.__shady.dirty = true;\n }\n }\n}\n\n/**\n * Clears the assignedNodes tracking data for a given `slot`. Note, the current\n * assigned node data is tracked (via _previouslyAssignedNodes and\n * _prevAssignedSlot) to see if `slotchange` should fire. This data may be out\n * of date at this time because the assigned nodes may have already been\n * distributed to another root. This is ok since this data is only used to\n * track changes.\n * @param {HTMLSlotElement} slot\n */\nShadyRoot.prototype._clearSlotAssignedNodes = function(slot) {\n let n$ = slot.__shady.assignedNodes;\n slot.__shady.assignedNodes = [];\n slot.__shady.flattenedNodes = [];\n slot.__shady._previouslyAssignedNodes = n$;\n if (n$) {\n for (let i=0; i < n$.length; i++) {\n let n = n$[i];\n n.__shady._prevAssignedSlot = n.__shady.assignedSlot;\n // only clear if it was previously set to this slot;\n // this helps ensure that if the node has otherwise been distributed\n // ignore it.\n if (n.__shady.assignedSlot === slot) {\n n.__shady.assignedSlot = null;\n }\n }\n }\n}\n\nShadyRoot.prototype._addAssignedToFlattenedNodes = function(flattened, assigned) {\n for (let i=0, n; (i elements and not the\n// shadowRoot into the host. The latter is performend via a fast path\n// in the `logical-mutation`.insertBefore.\nShadyRoot.prototype._compose = function() {\n const slots = this._slotList;\n let composeList = [];\n for (let i=0; i < slots.length; i++) {\n const parent = slots[i].parentNode;\n /* compose node only if:\n (1) parent does not have a shadowRoot since shadowRoot has already\n composed into the host\n (2) we're not already composing it\n [consider (n^2) but rare better than Set]\n */\n if (!(parent.__shady && parent.__shady.root) &&\n composeList.indexOf(parent) < 0) {\n composeList.push(parent);\n }\n }\n for (let i=0; i < composeList.length; i++) {\n const node = composeList[i];\n const targetNode = node === this ? this.host : node;\n this._updateChildNodes(targetNode, this._composeNode(node));\n }\n}\n\n// Returns the list of nodes which should be rendered inside `node`.\nShadyRoot.prototype._composeNode = function(node) {\n let children = [];\n let c$ = node.childNodes;\n for (let i = 0; i < c$.length; i++) {\n let child = c$[i];\n // Note: if we see a slot here, the nodes are guaranteed to need to be\n // composed here. This is because if there is redistribution, it has\n // already been handled by this point.\n if (this._isInsertionPoint(child)) {\n let flattenedNodes = child.__shady.flattenedNodes;\n for (let j = 0; j < flattenedNodes.length; j++) {\n let distributedNode = flattenedNodes[j];\n children.push(distributedNode);\n }\n } else {\n children.push(child);\n }\n }\n return children;\n}\n\nShadyRoot.prototype._isInsertionPoint = function(node) {\n return node.localName == 'slot';\n }\n\n// Ensures that the rendered node list inside `container` is `children`.\nShadyRoot.prototype._updateChildNodes = function(container, children) {\n let composed = childNodes(container);\n let splices = calculateSplices(children, composed);\n // process removals\n for (let i=0, d=0, s; (i {\n let listA = ancestorList(a);\n let listB = ancestorList(b);\n for (var i=0; i < listA.length; i++) {\n let nA = listA[i];\n let nB = listB[i];\n if (nA !== nB) {\n let c$ = Array.from(nA.parentNode.childNodes);\n return c$.indexOf(nA) - c$.indexOf(nB);\n }\n }\n });\n}\n\nfunction ancestorList(node) {\n let ancestors = [];\n do {\n ancestors.unshift(node);\n } while ((node = node.parentNode));\n return ancestors;\n}\n\n/**\n * Removes from tracked slot data any slots contained within `container` and\n * then updates the tracked data (_slotList and _slotMap).\n * Any removed slots also have their `assignedNodes` removed from comopsed dom.\n */\nShadyRoot.prototype._removeContainedSlots = function(container) {\n this._validateSlots();\n let didRemove;\n const map = this._slotMap;\n for (let n in map) {\n let slots = map[n];\n for (let i=0; i < slots.length; i++) {\n let slot = slots[i];\n if (utils.contains(container, slot)) {\n slots.splice(i, 1);\n const x = this._slotList.indexOf(slot);\n if (x >= 0) {\n this._slotList.splice(x, 1);\n }\n i--;\n this._removeFlattenedNodes(slot);\n didRemove = true;\n }\n }\n }\n return didRemove;\n}\n\nShadyRoot.prototype._updateSlotName = function(slot) {\n const oldName = slot.__slotName;\n const name = this._nameForSlot(slot);\n if (name === oldName) {\n return;\n }\n // remove from existing tracking\n let slots = this._slotMap[oldName];\n const i = slots.indexOf(slot);\n if (i >= 0) {\n slots.splice(i, 1);\n }\n // add to new location and sort if nedessary\n let list = this._slotMap[name] || (this._slotMap[name] = []);\n list.push(slot);\n if (list.length > 1) {\n this._slotMap[name] = this._sortSlots(list);\n }\n}\n\nShadyRoot.prototype._removeFlattenedNodes = function(slot) {\n let n$ = slot.__shady.flattenedNodes;\n if (n$) {\n for (let i=0; i {\n this.flush();\n });\n }\n }\n\n flush() {\n if (this._scheduled) {\n this._scheduled = false;\n let mutations = this.takeRecords();\n if (mutations.length) {\n this.callbacks.forEach(function(cb) {\n cb(mutations);\n });\n }\n }\n }\n\n takeRecords() {\n if (this.addedNodes.length || this.removedNodes.length) {\n let mutations = [{\n addedNodes: this.addedNodes,\n removedNodes: this.removedNodes\n }];\n this.addedNodes = [];\n this.removedNodes = [];\n return mutations;\n }\n return [];\n }\n\n}\n\n// TODO(sorvell): consider instead polyfilling MutationObserver\n// directly so that users do not have to fork their code.\n// Supporting the entire api may be challenging: e.g. filtering out\n// removed nodes in the wrong scope and seeing non-distributing\n// subtree child mutations.\nexport let observeChildren = function(node, callback) {\n node.__shady = node.__shady || {};\n if (!node.__shady.observer) {\n node.__shady.observer = new AsyncObserver();\n }\n node.__shady.observer.callbacks.add(callback);\n let observer = node.__shady.observer;\n return {\n _callback: callback,\n _observer: observer,\n _node: node,\n takeRecords() {\n return observer.takeRecords()\n }\n };\n}\n\nexport let unobserveChildren = function(handle) {\n let observer = handle && handle._observer;\n if (observer) {\n observer.callbacks.delete(handle._callback);\n if (!observer.callbacks.size) {\n handle._node.__shady.observer = null;\n }\n }\n}\n\nexport function filterMutations(mutations, target) {\n /** @const {Node} */\n const targetRootNode = target.getRootNode();\n return mutations.map(function(mutation) {\n /** @const {boolean} */\n const mutationInScope = (targetRootNode === mutation.target.getRootNode());\n if (mutationInScope && mutation.addedNodes) {\n let nodes = Array.from(mutation.addedNodes).filter(function(n) {\n return (targetRootNode === n.getRootNode());\n });\n if (nodes.length) {\n mutation = Object.create(mutation);\n Object.defineProperty(mutation, 'addedNodes', {\n value: nodes,\n configurable: true\n });\n return mutation;\n }\n } else if (mutationInScope) {\n return mutation;\n }\n }).filter(function(m) { return m});\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport * as nativeMethods from './native-methods.js';\n\n/*\nMake this name unique so it is unlikely to conflict with properties on objects passed to `addEventListener`\nhttps://github.com/webcomponents/shadydom/issues/173\n*/\nconst /** string */ eventWrappersName = `__eventWrappers${Date.now()}`;\n\n// https://github.com/w3c/webcomponents/issues/513#issuecomment-224183937\nlet alwaysComposed = {\n 'blur': true,\n 'focus': true,\n 'focusin': true,\n 'focusout': true,\n 'click': true,\n 'dblclick': true,\n 'mousedown': true,\n 'mouseenter': true,\n 'mouseleave': true,\n 'mousemove': true,\n 'mouseout': true,\n 'mouseover': true,\n 'mouseup': true,\n 'wheel': true,\n 'beforeinput': true,\n 'input': true,\n 'keydown': true,\n 'keyup': true,\n 'compositionstart': true,\n 'compositionupdate': true,\n 'compositionend': true,\n 'touchstart': true,\n 'touchend': true,\n 'touchmove': true,\n 'touchcancel': true,\n 'pointerover': true,\n 'pointerenter': true,\n 'pointerdown': true,\n 'pointermove': true,\n 'pointerup': true,\n 'pointercancel': true,\n 'pointerout': true,\n 'pointerleave': true,\n 'gotpointercapture': true,\n 'lostpointercapture': true,\n 'dragstart': true,\n 'drag': true,\n 'dragenter': true,\n 'dragleave': true,\n 'dragover': true,\n 'drop': true,\n 'dragend': true,\n 'DOMActivate': true,\n 'DOMFocusIn': true,\n 'DOMFocusOut': true,\n 'keypress': true\n};\n\nfunction pathComposer(startNode, composed) {\n let composedPath = [];\n let current = startNode;\n let startRoot = startNode === window ? window : startNode.getRootNode();\n while (current) {\n composedPath.push(current);\n if (current.assignedSlot) {\n current = current.assignedSlot;\n } else if (current.nodeType === Node.DOCUMENT_FRAGMENT_NODE && current.host && (composed || current !== startRoot)) {\n current = current.host;\n } else {\n current = current.parentNode;\n }\n }\n // event composedPath includes window when startNode's ownerRoot is document\n if (composedPath[composedPath.length - 1] === document) {\n composedPath.push(window);\n }\n return composedPath;\n}\n\nfunction retarget(refNode, path) {\n if (!utils.isShadyRoot) {\n return refNode;\n }\n // If ANCESTOR's root is not a shadow root or ANCESTOR's root is BASE's\n // shadow-including inclusive ancestor, return ANCESTOR.\n let refNodePath = pathComposer(refNode, true);\n let p$ = path;\n for (let i=0, ancestor, lastRoot, root, rootIdx; i < p$.length; i++) {\n ancestor = p$[i];\n root = ancestor === window ? window : ancestor.getRootNode();\n if (root !== lastRoot) {\n rootIdx = refNodePath.indexOf(root);\n lastRoot = root;\n }\n if (!utils.isShadyRoot(root) || rootIdx > -1) {\n return ancestor;\n }\n }\n}\n\nlet eventMixin = {\n\n /**\n * @this {Event}\n */\n get composed() {\n // isTrusted may not exist in this browser, so just check if isTrusted is explicitly false\n if (this.isTrusted !== false && this.__composed === undefined) {\n this.__composed = alwaysComposed[this.type];\n }\n return this.__composed || false;\n },\n\n /**\n * @this {Event}\n */\n composedPath() {\n if (!this.__composedPath) {\n this.__composedPath = pathComposer(this['__target'], this.composed);\n }\n return this.__composedPath;\n },\n\n /**\n * @this {Event}\n */\n get target() {\n return retarget(this.currentTarget, this.composedPath());\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-relatedtarget-retargeting\n /**\n * @this {Event}\n */\n get relatedTarget() {\n if (!this.__relatedTarget) {\n return null;\n }\n if (!this.__relatedTargetComposedPath) {\n this.__relatedTargetComposedPath = pathComposer(this.__relatedTarget, true);\n }\n // find the deepest node in relatedTarget composed path that is in the same root with the currentTarget\n return retarget(this.currentTarget, this.__relatedTargetComposedPath);\n },\n /**\n * @this {Event}\n */\n stopPropagation() {\n Event.prototype.stopPropagation.call(this);\n this.__propagationStopped = true;\n },\n /**\n * @this {Event}\n */\n stopImmediatePropagation() {\n Event.prototype.stopImmediatePropagation.call(this);\n this.__immediatePropagationStopped = true;\n this.__propagationStopped = true;\n }\n\n};\n\nfunction mixinComposedFlag(Base) {\n // NOTE: avoiding use of `class` here so that transpiled output does not\n // try to do `Base.call` with a dom construtor.\n let klazz = function(type, options) {\n let event = new Base(type, options);\n event.__composed = options && Boolean(options['composed']);\n return event;\n }\n // put constructor properties on subclass\n utils.mixin(klazz, Base);\n klazz.prototype = Base.prototype;\n return klazz;\n}\n\nlet nonBubblingEventsToRetarget = {\n 'focus': true,\n 'blur': true\n};\n\n\n/**\n * Check if the event has been retargeted by comparing original `target`, and calculated `target`\n * @param {Event} event\n * @return {boolean} True if the original target and calculated target are the same\n */\nfunction hasRetargeted(event) {\n return event['__target'] !== event.target || event.__relatedTarget !== event.relatedTarget;\n}\n\n/**\n *\n * @param {Event} event\n * @param {Node} node\n * @param {string} phase\n */\nfunction fireHandlers(event, node, phase) {\n let hs = node.__handlers && node.__handlers[event.type] &&\n node.__handlers[event.type][phase];\n if (hs) {\n for (let i = 0, fn; (fn = hs[i]); i++) {\n if (hasRetargeted(event) && event.target === event.relatedTarget) {\n return;\n }\n fn.call(node, event);\n if (event.__immediatePropagationStopped) {\n return;\n }\n }\n }\n}\n\nfunction retargetNonBubblingEvent(e) {\n let path = e.composedPath();\n let node;\n // override `currentTarget` to let patched `target` calculate correctly\n Object.defineProperty(e, 'currentTarget', {\n get: function() {\n return node;\n },\n configurable: true\n });\n for (let i = path.length - 1; i >= 0; i--) {\n node = path[i];\n // capture phase fires all capture handlers\n fireHandlers(e, node, 'capture');\n if (e.__propagationStopped) {\n return;\n }\n }\n\n // set the event phase to `AT_TARGET` as in spec\n Object.defineProperty(e, 'eventPhase', {get() { return Event.AT_TARGET }});\n\n // the event only needs to be fired when owner roots change when iterating the event path\n // keep track of the last seen owner root\n let lastFiredRoot;\n for (let i = 0; i < path.length; i++) {\n node = path[i];\n const root = node.__shady && node.__shady.root;\n if (i === 0 || (root && root === lastFiredRoot)) {\n fireHandlers(e, node, 'bubble');\n // don't bother with window, it doesn't have `getRootNode` and will be last in the path anyway\n if (node !== window) {\n lastFiredRoot = node.getRootNode();\n }\n if (e.__propagationStopped) {\n return;\n }\n }\n }\n}\n\nfunction listenerSettingsEqual(savedListener, node, type, capture, once, passive) {\n let {\n node: savedNode,\n type: savedType,\n capture: savedCapture,\n once: savedOnce,\n passive: savedPassive\n } = savedListener;\n return node === savedNode &&\n type === savedType &&\n capture === savedCapture &&\n once === savedOnce &&\n passive === savedPassive;\n}\n\nexport function findListener(wrappers, node, type, capture, once, passive) {\n for (let i = 0; i < wrappers.length; i++) {\n if (listenerSettingsEqual(wrappers[i], node, type, capture, once, passive)) {\n return i;\n }\n }\n return -1;\n}\n\n/**\n * Firefox can throw on accessing eventWrappers inside of `removeEventListener` during a selenium run\n * Try/Catch accessing eventWrappers to work around\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1353074\n */\nfunction getEventWrappers(eventLike) {\n let wrappers = null;\n try {\n wrappers = eventLike[eventWrappersName];\n } catch (e) {} // eslint-disable-line no-empty\n return wrappers;\n}\n\n/**\n * @this {Event}\n */\nexport function addEventListener(type, fnOrObj, optionsOrCapture) {\n if (!fnOrObj) {\n return;\n }\n\n const handlerType = typeof fnOrObj;\n\n // bail if `fnOrObj` is not a function, not an object\n if (handlerType !== 'function' && handlerType !== 'object') {\n return;\n }\n\n // bail if `fnOrObj` is an object without a `handleEvent` method\n if (handlerType === 'object' && (!fnOrObj.handleEvent || typeof fnOrObj.handleEvent !== 'function')) {\n return;\n }\n\n // The callback `fn` might be used for multiple nodes/events. Since we generate\n // a wrapper function, we need to keep track of it when we remove the listener.\n // It's more efficient to store the node/type/options information as Array in\n // `fn` itself rather than the node (we assume that the same callback is used\n // for few nodes at most, whereas a node will likely have many event listeners).\n // NOTE(valdrin) invoking external functions is costly, inline has better perf.\n let capture, once, passive;\n if (optionsOrCapture && typeof optionsOrCapture === 'object') {\n capture = Boolean(optionsOrCapture.capture);\n once = Boolean(optionsOrCapture.once);\n passive = Boolean(optionsOrCapture.passive);\n } else {\n capture = Boolean(optionsOrCapture);\n once = false;\n passive = false;\n }\n // hack to let ShadyRoots have event listeners\n // event listener will be on host, but `currentTarget`\n // will be set to shadyroot for event listener\n let target = (optionsOrCapture && optionsOrCapture.__shadyTarget) || this;\n\n let wrappers = fnOrObj[eventWrappersName];\n if (wrappers) {\n // Stop if the wrapper function has already been created.\n if (findListener(wrappers, target, type, capture, once, passive) > -1) {\n return;\n }\n } else {\n fnOrObj[eventWrappersName] = [];\n }\n\n /**\n * @this {HTMLElement}\n * @param {Event} e\n */\n const wrapperFn = function(e) {\n // Support `once` option.\n if (once) {\n this.removeEventListener(type, fnOrObj, optionsOrCapture);\n }\n if (!e['__target']) {\n patchEvent(e);\n }\n let lastCurrentTargetDesc;\n if (target !== this) {\n // replace `currentTarget` to make `target` and `relatedTarget` correct for inside the shadowroot\n lastCurrentTargetDesc = Object.getOwnPropertyDescriptor(e, 'currentTarget');\n Object.defineProperty(e, 'currentTarget', {get() { return target }, configurable: true});\n }\n // There are two critera that should stop events from firing on this node\n // 1. the event is not composed and the current node is not in the same root as the target\n // 2. when bubbling, if after retargeting, relatedTarget and target point to the same node\n if (e.composed || e.composedPath().indexOf(target) > -1) {\n if (hasRetargeted(e) && e.target === e.relatedTarget) {\n if (e.eventPhase === Event.BUBBLING_PHASE) {\n e.stopImmediatePropagation();\n }\n return;\n }\n // prevent non-bubbling events from triggering bubbling handlers on shadowroot, but only if not in capture phase\n if (e.eventPhase !== Event.CAPTURING_PHASE && !e.bubbles && e.target !== target && !(target instanceof Window)) {\n return;\n }\n let ret = handlerType === 'function' ?\n fnOrObj.call(target, e) :\n (fnOrObj.handleEvent && fnOrObj.handleEvent(e));\n if (target !== this) {\n // replace the \"correct\" `currentTarget`\n if (lastCurrentTargetDesc) {\n Object.defineProperty(e, 'currentTarget', lastCurrentTargetDesc);\n lastCurrentTargetDesc = null;\n } else {\n delete e['currentTarget'];\n }\n }\n return ret;\n }\n };\n // Store the wrapper information.\n fnOrObj[eventWrappersName].push({\n // note: use target here which is either a shadowRoot\n // (when the host element is proxy'ing the event) or this element\n node: target,\n type: type,\n capture: capture,\n once: once,\n passive: passive,\n wrapperFn: wrapperFn\n });\n\n if (nonBubblingEventsToRetarget[type]) {\n this.__handlers = this.__handlers || {};\n this.__handlers[type] = this.__handlers[type] ||\n {'capture': [], 'bubble': []};\n this.__handlers[type][capture ? 'capture' : 'bubble'].push(wrapperFn);\n } else {\n let ael = this instanceof Window ? nativeMethods.windowAddEventListener :\n nativeMethods.addEventListener;\n ael.call(this, type, wrapperFn, optionsOrCapture);\n }\n}\n\n/**\n * @this {Event}\n */\nexport function removeEventListener(type, fnOrObj, optionsOrCapture) {\n if (!fnOrObj) {\n return;\n }\n\n // NOTE(valdrin) invoking external functions is costly, inline has better perf.\n let capture, once, passive;\n if (optionsOrCapture && typeof optionsOrCapture === 'object') {\n capture = Boolean(optionsOrCapture.capture);\n once = Boolean(optionsOrCapture.once);\n passive = Boolean(optionsOrCapture.passive);\n } else {\n capture = Boolean(optionsOrCapture);\n once = false;\n passive = false;\n }\n let target = (optionsOrCapture && optionsOrCapture.__shadyTarget) || this;\n // Search the wrapped function.\n let wrapperFn = undefined;\n let wrappers = getEventWrappers(fnOrObj);\n if (wrappers) {\n let idx = findListener(wrappers, target, type, capture, once, passive);\n if (idx > -1) {\n wrapperFn = wrappers.splice(idx, 1)[0].wrapperFn;\n // Cleanup.\n if (!wrappers.length) {\n fnOrObj[eventWrappersName] = undefined;\n }\n }\n }\n let rel = this instanceof Window ? nativeMethods.windowRemoveEventListener :\n nativeMethods.removeEventListener;\n rel.call(this, type, wrapperFn || fnOrObj, optionsOrCapture);\n if (wrapperFn && nonBubblingEventsToRetarget[type] &&\n this.__handlers && this.__handlers[type]) {\n const arr = this.__handlers[type][capture ? 'capture' : 'bubble'];\n const idx = arr.indexOf(wrapperFn);\n if (idx > -1) {\n arr.splice(idx, 1);\n }\n }\n}\n\nfunction activateFocusEventOverrides() {\n for (let ev in nonBubblingEventsToRetarget) {\n window.addEventListener(ev, function(e) {\n if (!e['__target']) {\n patchEvent(e);\n retargetNonBubblingEvent(e);\n }\n }, true);\n }\n}\n\nfunction patchEvent(event) {\n event['__target'] = event.target;\n event.__relatedTarget = event.relatedTarget;\n // patch event prototype if we can\n if (utils.settings.hasDescriptors) {\n utils.patchPrototype(event, eventMixin);\n // and fallback to patching instance\n } else {\n utils.extend(event, eventMixin);\n }\n}\n\nlet PatchedEvent = mixinComposedFlag(window.Event);\nlet PatchedCustomEvent = mixinComposedFlag(window.CustomEvent);\nlet PatchedMouseEvent = mixinComposedFlag(window.MouseEvent);\n\nexport function patchEvents() {\n window.Event = PatchedEvent;\n window.CustomEvent = PatchedCustomEvent;\n window.MouseEvent = PatchedMouseEvent;\n activateFocusEventOverrides();\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport * as utils from './utils.js';\nimport {flush} from './flush.js';\nimport {dispatchEvent, contains as nativeContains} from './native-methods.js';\nimport * as mutation from './logical-mutation.js';\nimport {ActiveElementAccessor, ShadowRootAccessor, patchAccessors} from './patch-accessors.js';\nimport {addEventListener, removeEventListener} from './patch-events.js';\nimport {attachShadow, ShadyRoot} from './attach-shadow.js';\n\nfunction getAssignedSlot(node) {\n mutation.renderRootNode(node);\n return node.__shady && node.__shady.assignedSlot || null;\n}\n\nlet windowMixin = {\n\n // NOTE: ensure these methods are bound to `window` so that `this` is correct\n // when called directly from global context without a receiver; e.g.\n // `addEventListener(...)`.\n addEventListener: addEventListener.bind(window),\n\n removeEventListener: removeEventListener.bind(window)\n\n};\n\nlet nodeMixin = {\n\n addEventListener: addEventListener,\n\n removeEventListener: removeEventListener,\n\n appendChild(node) {\n return mutation.insertBefore(this, node);\n },\n\n insertBefore(node, ref_node) {\n return mutation.insertBefore(this, node, ref_node);\n },\n\n removeChild(node) {\n return mutation.removeChild(this, node);\n },\n\n /**\n * @this {Node}\n */\n replaceChild(node, ref_node) {\n mutation.insertBefore(this, node, ref_node);\n mutation.removeChild(this, ref_node);\n return node;\n },\n\n /**\n * @this {Node}\n */\n cloneNode(deep) {\n return mutation.cloneNode(this, deep);\n },\n\n /**\n * @this {Node}\n */\n getRootNode(options) {\n return mutation.getRootNode(this, options);\n },\n\n contains(node) {\n return utils.contains(this, node);\n },\n\n /**\n * @this {Node}\n */\n get isConnected() {\n // Fast path for distributed nodes.\n const ownerDocument = this.ownerDocument;\n if (utils.hasDocumentContains && nativeContains.call(ownerDocument, this)) {\n return true;\n }\n if (ownerDocument.documentElement &&\n nativeContains.call(ownerDocument.documentElement, this)) {\n return true;\n }\n let node = this;\n while (node && !(node instanceof Document)) {\n node = node.parentNode || (node instanceof ShadyRoot ? /** @type {ShadowRoot} */(node).host : undefined);\n }\n return !!(node && node instanceof Document);\n },\n\n /**\n * @this {Node}\n */\n dispatchEvent(event) {\n flush();\n return dispatchEvent.call(this, event);\n }\n\n};\n\n// NOTE: For some reason 'Text' redefines 'assignedSlot'\nlet textMixin = {\n /**\n * @this {Text}\n */\n get assignedSlot() {\n return getAssignedSlot(this);\n }\n};\n\nlet fragmentMixin = {\n\n // TODO(sorvell): consider doing native QSA and filtering results.\n /**\n * @this {DocumentFragment}\n */\n querySelector(selector) {\n // match selector and halt on first result.\n let result = mutation.query(this, function(n) {\n return utils.matchesSelector(n, selector);\n }, function(n) {\n return Boolean(n);\n })[0];\n return result || null;\n },\n\n /**\n * @this {DocumentFragment}\n */\n querySelectorAll(selector) {\n return mutation.query(this, function(n) {\n return utils.matchesSelector(n, selector);\n });\n }\n\n};\n\nlet slotMixin = {\n\n /**\n * @this {HTMLSlotElement}\n */\n assignedNodes(options) {\n if (this.localName === 'slot') {\n mutation.renderRootNode(this);\n return this.__shady ?\n ((options && options.flatten ? this.__shady.flattenedNodes :\n this.__shady.assignedNodes) || []) :\n [];\n }\n }\n\n};\n\nlet elementMixin = utils.extendAll({\n\n /**\n * @this {HTMLElement}\n */\n setAttribute(name, value) {\n mutation.setAttribute(this, name, value);\n },\n\n /**\n * @this {HTMLElement}\n */\n removeAttribute(name) {\n mutation.removeAttribute(this, name);\n },\n\n /**\n * @this {HTMLElement}\n */\n attachShadow(options) {\n return attachShadow(this, options);\n },\n\n /**\n * @this {HTMLElement}\n */\n get slot() {\n return this.getAttribute('slot');\n },\n\n /**\n * @this {HTMLElement}\n */\n set slot(value) {\n mutation.setAttribute(this, 'slot', value);\n },\n\n /**\n * @this {HTMLElement}\n */\n get assignedSlot() {\n return getAssignedSlot(this);\n }\n\n}, fragmentMixin, slotMixin);\n\nObject.defineProperties(elementMixin, ShadowRootAccessor);\n\nlet documentMixin = utils.extendAll({\n /**\n * @this {Document}\n */\n importNode(node, deep) {\n return mutation.importNode(node, deep);\n },\n\n /**\n * @this {Document}\n */\n getElementById(id) {\n let result = mutation.query(this, function(n) {\n return n.id == id;\n }, function(n) {\n return Boolean(n);\n })[0];\n return result || null;\n }\n\n}, fragmentMixin);\n\nObject.defineProperties(documentMixin, {\n '_activeElement': ActiveElementAccessor.activeElement\n});\n\nlet nativeBlur = HTMLElement.prototype.blur;\n\nlet htmlElementMixin = utils.extendAll({\n /**\n * @this {HTMLElement}\n */\n blur() {\n let root = this.__shady && this.__shady.root;\n let shadowActive = root && root.activeElement;\n if (shadowActive) {\n shadowActive.blur();\n } else {\n nativeBlur.call(this);\n }\n }\n})\n\nfunction patchBuiltin(proto, obj) {\n let n$ = Object.getOwnPropertyNames(obj);\n for (let i=0; i < n$.length; i++) {\n let n = n$[i];\n let d = Object.getOwnPropertyDescriptor(obj, n);\n // NOTE: we prefer writing directly here because some browsers\n // have descriptors that are writable but not configurable (e.g.\n // `appendChild` on older browsers)\n if (d.value) {\n proto[n] = d.value;\n } else {\n Object.defineProperty(proto, n, d);\n }\n }\n}\n\n\n// Apply patches to builtins (e.g. Element.prototype). Some of these patches\n// can be done unconditionally (mostly methods like\n// `Element.prototype.appendChild`) and some can only be done when the browser\n// has proper descriptors on the builtin prototype\n// (e.g. `Element.prototype.firstChild`)`. When descriptors are not available,\n// elements are individually patched when needed (see e.g.\n// `patchInside/OutsideElementAccessors` in `patch-accessors.js`).\nexport function patchBuiltins() {\n let nativeHTMLElement =\n (window['customElements'] && window['customElements']['nativeHTMLElement']) ||\n HTMLElement;\n // These patches can always be done, for all supported browsers.\n patchBuiltin(window.Node.prototype, nodeMixin);\n patchBuiltin(window.Window.prototype, windowMixin);\n patchBuiltin(window.Text.prototype, textMixin);\n patchBuiltin(window.DocumentFragment.prototype, fragmentMixin);\n patchBuiltin(window.Element.prototype, elementMixin);\n patchBuiltin(window.Document.prototype, documentMixin);\n if (window.HTMLSlotElement) {\n patchBuiltin(window.HTMLSlotElement.prototype, slotMixin);\n }\n patchBuiltin(nativeHTMLElement.prototype, htmlElementMixin);\n // These patches can *only* be done\n // on browsers that have proper property descriptors on builtin prototypes.\n // This includes: IE11, Edge, Chrome >= 4?; Safari >= 10, Firefox\n // On older browsers (Chrome <= 4?, Safari 9), a per element patching\n // strategy is used for patching accessors.\n if (utils.settings.hasDescriptors) {\n patchAccessors(window.Node.prototype);\n patchAccessors(window.Text.prototype);\n patchAccessors(window.DocumentFragment.prototype);\n patchAccessors(window.Element.prototype);\n patchAccessors(nativeHTMLElement.prototype);\n patchAccessors(window.Document.prototype);\n if (window.HTMLSlotElement) {\n patchAccessors(window.HTMLSlotElement.prototype);\n }\n }\n}\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * Patches elements that interacts with ShadyDOM\n * such that tree traversal and mutation apis act like they would under\n * ShadowDOM.\n *\n * This import enables seemless interaction with ShadyDOM powered\n * custom elements, enabling better interoperation with 3rd party code,\n * libraries, and frameworks that use DOM tree manipulation apis.\n */\n\nimport * as utils from './utils.js';\nimport {flush, enqueue} from './flush.js';\nimport {observeChildren, unobserveChildren, filterMutations} from './observe-changes.js';\nimport * as nativeMethods from './native-methods.js';\nimport * as nativeTree from './native-tree.js';\nimport {patchBuiltins} from './patch-builtins.js';\nimport {patchEvents} from './patch-events.js';\nimport {ShadyRoot} from './attach-shadow.js';\n\nif (utils.settings.inUse) {\n let ShadyDOM = {\n // TODO(sorvell): remove when Polymer does not depend on this.\n 'inUse': utils.settings.inUse,\n // TODO(sorvell): remove when Polymer does not depend on this\n 'patch': (node) => node,\n 'isShadyRoot': utils.isShadyRoot,\n 'enqueue': enqueue,\n 'flush': flush,\n 'settings': utils.settings,\n 'filterMutations': filterMutations,\n 'observeChildren': observeChildren,\n 'unobserveChildren': unobserveChildren,\n 'nativeMethods': nativeMethods,\n 'nativeTree': nativeTree\n };\n\n window['ShadyDOM'] = ShadyDOM;\n\n // Apply patches to events...\n patchEvents();\n // Apply patches to builtins (e.g. Element.prototype) where applicable.\n patchBuiltins();\n\n window.ShadowRoot = ShadyRoot;\n}\n"]} \ No newline at end of file diff --git a/src/patch-events.js b/src/patch-events.js index d51af24..d01203a 100644 --- a/src/patch-events.js +++ b/src/patch-events.js @@ -400,7 +400,9 @@ export function addEventListener(type, fnOrObj, optionsOrCapture) { }; // Store the wrapper information. fnOrObj[eventWrappersName].push({ - node: this, + // note: use target here which is either a shadowRoot + // (when the host element is proxy'ing the event) or this element + node: target, type: type, capture: capture, once: once, diff --git a/tests/event-path.html b/tests/event-path.html index 17e04f4..2f39213 100644 --- a/tests/event-path.html +++ b/tests/event-path.html @@ -38,7 +38,7 @@ + + + + + + diff --git a/wct.conf.json b/wct.conf.json index 7bd506e..b70c2d5 100644 --- a/wct.conf.json +++ b/wct.conf.json @@ -1,3 +1,12 @@ { - "suites": ["tests/runner.html"] + "suites": ["tests/runner.html"], + "plugins": { + "local": { + "browserOptions": { + "chrome": [ + "no-sandbox" + ] + } + } + } }